diff --git a/.gitignore b/.gitignore index 6435addffd..e098358c2e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,7 @@ cmake-build-debug/* .cmake/* build.ninja .ninja* + +# Modules +*.gcm a.out diff --git a/include/boost/math/constants/calculate_constants.hpp b/include/boost/math/constants/calculate_constants.hpp index 3db74c3b66..7fc1d3c454 100644 --- a/include/boost/math/constants/calculate_constants.hpp +++ b/include/boost/math/constants/calculate_constants.hpp @@ -7,7 +7,10 @@ #ifndef BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED #define BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED + +#ifndef BOOST_MATH_AS_MODULE #include +#endif namespace boost{ namespace math{ namespace constants{ namespace detail{ diff --git a/include/boost/math/constants/constants.hpp b/include/boost/math/constants/constants.hpp index 4bf81c61d1..a9a2e92937 100644 --- a/include/boost/math/constants/constants.hpp +++ b/include/boost/math/constants/constants.hpp @@ -7,11 +7,11 @@ #ifndef BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED #define BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include -#include #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4127 4701) @@ -21,6 +21,8 @@ #endif #include #include +#endif +#include #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) // @@ -50,7 +52,7 @@ namespace boost{ namespace math // (This is necessary because you can't use a numeric constant // since even a long double might not have enough digits). - enum construction_method + BOOST_MATH_MODULE_EXPORT enum construction_method { construct_from_float = 1, construct_from_double = 2, @@ -71,7 +73,11 @@ namespace boost{ namespace math // // Max number of binary digits in the string representations of our constants: // +#ifndef BOOST_MATH_AS_MODULE static constexpr int max_string_digits = (101 * 1000L) / 301L; +#else + inline constexpr int max_string_digits = (101 * 1000L) / 301L; +#endif template struct construction_traits @@ -231,16 +237,16 @@ namespace boost{ namespace math \ \ /* The actual forwarding function: */ \ - template inline constexpr typename detail::constant_return::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(Policy)) BOOST_MATH_NOEXCEPT(T)\ + BOOST_MATH_MODULE_EXPORT template inline constexpr typename detail::constant_return::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(Policy)) BOOST_MATH_NOEXCEPT(T)\ { return detail:: BOOST_MATH_JOIN(constant_, name)::get(typename construction_traits::type()); }\ - template inline constexpr typename detail::constant_return::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_MATH_NOEXCEPT(T)\ + BOOST_MATH_MODULE_EXPORT template inline constexpr typename detail::constant_return::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_MATH_NOEXCEPT(T)\ { return name >(); }\ \ \ /* Now the namespace specific versions: */ \ - } namespace float_constants{ static constexpr float name = BOOST_MATH_JOIN(x, F); }\ - namespace double_constants{ static constexpr double name = x; } \ - namespace long_double_constants{ static constexpr long double name = BOOST_MATH_JOIN(x, L); }\ + } BOOST_MATH_MODULE_EXPORT namespace float_constants{ constexpr float name = BOOST_MATH_JOIN(x, F); }\ + BOOST_MATH_MODULE_EXPORT namespace double_constants{ constexpr double name = x; } \ + BOOST_MATH_MODULE_EXPORT namespace long_double_constants{ constexpr long double name = BOOST_MATH_JOIN(x, L); }\ namespace constants{ BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01") @@ -327,7 +333,7 @@ namespace boost{ namespace math BOOST_DEFINE_MATH_CONSTANT(laplace_limit, 0.662743419349181580974742097109252907056233549115022417, "0.66274341934918158097474209710925290705623354911502241752039253499097185308651127724965480259895818168") #endif -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T tau() { return two_pi(); } } // namespace constants diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index 070266c7fe..afed4fc779 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -9,6 +9,9 @@ #define BOOST_MATH_POLICY_ERROR_HANDLING_HPP #include + +#ifndef BOOST_MATH_AS_MODULE +#include #include #include #include @@ -19,13 +22,13 @@ #include #include #include -#include -#include -#ifndef BOOST_MATH_NO_EXCEPTIONS #include -#include +#include #endif +#include +#include + #ifdef _MSC_VER # pragma warning(push) // Quiet warnings in boost/format.hpp # pragma warning(disable: 4996) // _SCL_SECURE_NO_DEPRECATE @@ -36,46 +39,47 @@ // Note that this only occurs when the compiler can deduce code is unreachable, // for example when policy macros are used to ignore errors rather than throw. #endif -#include namespace boost{ namespace math{ -#ifndef BOOST_MATH_NO_EXCEPTIONS - -class evaluation_error : public std::runtime_error +BOOST_MATH_MODULE_EXPORT class evaluation_error : public std::runtime_error { public: - explicit evaluation_error(const std::string& s) : std::runtime_error(s){} + evaluation_error(const std::string& s) : std::runtime_error(s){} +#if defined(BOOST_MATH_AS_MODULE) && defined(__GNUC__) + ~evaluation_error() {} +#endif }; -class rounding_error : public std::runtime_error +BOOST_MATH_MODULE_EXPORT class rounding_error : public std::runtime_error { public: - explicit rounding_error(const std::string& s) : std::runtime_error(s){} -}; - + rounding_error(const std::string& s) : std::runtime_error(s){} +#if defined(BOOST_MATH_AS_MODULE) && defined(__GNUC__) + ~rounding_error() {} #endif +}; namespace policies{ // // Forward declarations of user error handlers, // it's up to the user to provide the definition of these: // -template +BOOST_MATH_MODULE_EXPORT template T user_domain_error(const char* function, const char* message, const T& val); -template +BOOST_MATH_MODULE_EXPORT template T user_pole_error(const char* function, const char* message, const T& val); -template +BOOST_MATH_MODULE_EXPORT template T user_overflow_error(const char* function, const char* message, const T& val); -template +BOOST_MATH_MODULE_EXPORT template T user_underflow_error(const char* function, const char* message, const T& val); -template +BOOST_MATH_MODULE_EXPORT template T user_denorm_error(const char* function, const char* message, const T& val); -template +BOOST_MATH_MODULE_EXPORT template T user_evaluation_error(const char* function, const char* message, const T& val); -template -TargetType user_rounding_error(const char* function, const char* message, const T& val, const TargetType& t); -template +BOOST_MATH_MODULE_EXPORT template +T user_rounding_error(const char* function, const char* message, const T& val, const TargetType& t); +BOOST_MATH_MODULE_EXPORT template T user_indeterminate_result_error(const char* function, const char* message, const T& val); namespace detail @@ -657,7 +661,7 @@ inline T raise_indeterminate_result_error( } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T raise_domain_error(const char* function, const char* message, const T& val, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::domain_error_type policy_type; @@ -666,7 +670,7 @@ inline constexpr T raise_domain_error(const char* function, const char* message, val, policy_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T raise_pole_error(const char* function, const char* message, const T& val, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::pole_error_type policy_type; @@ -675,7 +679,7 @@ inline constexpr T raise_pole_error(const char* function, const char* message, c val, policy_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T raise_overflow_error(const char* function, const char* message, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::overflow_error_type policy_type; @@ -684,7 +688,7 @@ inline constexpr T raise_overflow_error(const char* function, const char* messag policy_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T raise_overflow_error(const char* function, const char* message, const T& val, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::overflow_error_type policy_type; @@ -693,7 +697,7 @@ inline constexpr T raise_overflow_error(const char* function, const char* messag val, policy_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T raise_underflow_error(const char* function, const char* message, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::underflow_error_type policy_type; @@ -702,7 +706,7 @@ inline constexpr T raise_underflow_error(const char* function, const char* messa policy_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T raise_denorm_error(const char* function, const char* message, const T& val, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::denorm_error_type policy_type; @@ -712,7 +716,7 @@ inline constexpr T raise_denorm_error(const char* function, const char* message, policy_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T raise_evaluation_error(const char* function, const char* message, const T& val, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::evaluation_error_type policy_type; @@ -721,7 +725,7 @@ inline constexpr T raise_evaluation_error(const char* function, const char* mess val, policy_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr TargetType raise_rounding_error(const char* function, const char* message, const T& val, const TargetType& t, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::rounding_error_type policy_type; @@ -730,7 +734,7 @@ inline constexpr TargetType raise_rounding_error(const char* function, const cha val, t, policy_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T raise_indeterminate_result_error(const char* function, const char* message, const T& val, const R& result, const Policy&) noexcept(is_noexcept_error_policy::value && BOOST_MATH_IS_FLOAT(T)) { typedef typename Policy::indeterminate_result_error_type policy_type; @@ -831,8 +835,8 @@ BOOST_MATH_FORCEINLINE constexpr bool check_denorm(std::complex /* val */, R* } // namespace detail -template -BOOST_MATH_FORCEINLINE R checked_narrowing_cast(T val, const char* function) noexcept(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && is_noexcept_error_policy::value) +BOOST_MATH_MODULE_EXPORT template +inline R checked_narrowing_cast(T val, const char* function) noexcept(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && is_noexcept_error_policy::value) { typedef typename Policy::overflow_error_type overflow_type; typedef typename Policy::underflow_error_type underflow_type; @@ -851,7 +855,7 @@ BOOST_MATH_FORCEINLINE R checked_narrowing_cast(T val, const char* function) noe return static_cast(val); } -template +BOOST_MATH_MODULE_EXPORT template inline void check_series_iterations(const char* function, std::uintmax_t max_iter, const Policy& pol) noexcept(BOOST_MATH_IS_FLOAT(T) && is_noexcept_error_policy::value) { if(max_iter >= policies::get_max_series_iterations()) @@ -860,7 +864,7 @@ inline void check_series_iterations(const char* function, std::uintmax_t max_ite "Series evaluation exceeded %1% iterations, giving up now.", static_cast(static_cast(max_iter)), pol); } -template +BOOST_MATH_MODULE_EXPORT template inline void check_root_iterations(const char* function, std::uintmax_t max_iter, const Policy& pol) noexcept(BOOST_MATH_IS_FLOAT(T) && is_noexcept_error_policy::value) { if(max_iter >= policies::get_max_root_iterations()) diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index eb09682e32..bca81e9d36 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -8,12 +8,15 @@ #define BOOST_MATH_POLICY_HPP #include + +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include #include #include +#endif namespace boost{ namespace math{ @@ -21,9 +24,10 @@ namespace mp = tools::meta_programming; namespace tools{ -template -constexpr int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept; -template +BOOST_MATH_MODULE_EXPORT template +inline constexpr int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) noexcept; + +BOOST_MATH_MODULE_EXPORT template constexpr T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(std::is_floating_point::value); } @@ -106,7 +110,7 @@ namespace policies{ #endif #define BOOST_MATH_META_INT(Type, name, Default) \ - template \ + BOOST_MATH_MODULE_EXPORT template \ class name : public std::integral_constant{}; \ \ namespace detail{ \ @@ -135,7 +139,7 @@ namespace policies{ }; #define BOOST_MATH_META_BOOL(name, Default) \ - template \ + BOOST_MATH_MODULE_EXPORT template \ class name : public std::integral_constant{}; \ \ namespace detail{ \ @@ -166,7 +170,7 @@ namespace policies{ // // Begin by defining policy types for error handling: // -enum error_policy_type +BOOST_MATH_MODULE_EXPORT enum error_policy_type { throw_on_error = 0, errno_on_error = 1, @@ -192,7 +196,7 @@ BOOST_MATH_META_BOOL(assert_undefined, BOOST_MATH_ASSERT_UNDEFINED_POLICY) // // Policy types for discrete quantiles: // -enum discrete_quantile_policy_type +BOOST_MATH_MODULE_EXPORT enum discrete_quantile_policy_type { real, integer_round_outwards, @@ -220,7 +224,7 @@ BOOST_MATH_META_INT(unsigned long, max_root_iterations, BOOST_MATH_MAX_ROOT_ITER BOOST_PARAMETER_TEMPLATE_KEYWORD(name##_name)\ BOOST_PARAMETER_NAME(name##_name) -struct default_policy{}; +BOOST_MATH_MODULE_EXPORT struct default_policy{}; namespace detail{ // @@ -342,8 +346,9 @@ typedef default_args class policy { @@ -466,6 +472,7 @@ class policy; }; +BOOST_MATH_MODULE_EXPORT template <> struct policy { @@ -491,9 +498,10 @@ struct policy; }; +BOOST_MATH_MODULE_EXPORT template struct normalise, promote_float, @@ -623,6 +632,7 @@ struct normalise, using type = policy; }; +BOOST_MATH_MODULE_EXPORT template <> struct normalise, promote_float, @@ -640,80 +650,80 @@ struct normalise, using type = policy; }; -inline constexpr policy<> make_policy() noexcept -{ return {}; } +BOOST_MATH_MODULE_EXPORT inline constexpr policy<> make_policy() noexcept +{ return policy<>(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1>::type make_policy(const A1&) noexcept { typedef typename normalise, A1>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2>::type make_policy(const A1&, const A2&) noexcept { typedef typename normalise, A1, A2>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&) noexcept { typedef typename normalise, A1, A2, A3>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&) noexcept { typedef typename normalise, A1, A2, A3, A4>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&) noexcept { typedef typename normalise, A1, A2, A3, A4, A5>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&) noexcept { typedef typename normalise, A1, A2, A3, A4, A5, A6>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&) noexcept { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&) noexcept { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&) noexcept { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&) noexcept { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type; return result_type(); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&) noexcept { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type; @@ -723,25 +733,25 @@ inline constexpr typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9 // // Traits class to handle internal promotion: // -template +BOOST_MATH_MODULE_EXPORT template struct evaluation { typedef Real type; }; -template +BOOST_MATH_MODULE_EXPORT template struct evaluation { using type = typename std::conditional::type; }; -template +BOOST_MATH_MODULE_EXPORT template struct evaluation { using type = typename std::conditional::type; }; -template +BOOST_MATH_MODULE_EXPORT template struct precision { static_assert((std::numeric_limits::radix == 2) || ((std::numeric_limits::is_specialized == 0) || (std::numeric_limits::digits == 0)), @@ -782,7 +792,7 @@ struct precision #ifdef BOOST_MATH_USE_FLOAT128 -template +BOOST_MATH_MODULE_EXPORT template struct precision { typedef std::integral_constant type; @@ -808,26 +818,26 @@ inline constexpr int digits_imp(std::false_type const&) noexcept } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline constexpr int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept { typedef std::integral_constant::is_specialized > tag_type; return detail::digits_imp(tag_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr int digits_base10(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept { return boost::math::policies::digits() * 301 / 1000L; } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr unsigned long get_max_series_iterations() noexcept { typedef typename Policy::max_series_iterations_type iter_type; return iter_type::value; } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr unsigned long get_max_root_iterations() noexcept { typedef typename Policy::max_root_iterations_type iter_type; @@ -890,7 +900,7 @@ inline constexpr T get_epsilon_imp(std::false_type const&) noexcept(std::is_floa } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(std::is_floating_point::value) { typedef std::integral_constant::is_specialized && (std::numeric_limits::radix == 2)) > tag_type; @@ -922,7 +932,7 @@ class is_policy_imp } -template +BOOST_MATH_MODULE_EXPORT template class is_policy { public: @@ -933,7 +943,7 @@ class is_policy // // Helper traits class for distribution error handling: // -template +BOOST_MATH_MODULE_EXPORT template struct constructor_error_check { using domain_error_type = typename Policy::domain_error_type; @@ -943,7 +953,7 @@ struct constructor_error_check std::false_type>::type; }; -template +BOOST_MATH_MODULE_EXPORT template struct method_error_check { using domain_error_type = typename Policy::domain_error_type; @@ -955,7 +965,7 @@ struct method_error_check // // Does the Policy ever throw on error? // -template +BOOST_MATH_MODULE_EXPORT template struct is_noexcept_error_policy { typedef typename Policy::domain_error_type t1; diff --git a/include/boost/math/special_functions/bernoulli.hpp b/include/boost/math/special_functions/bernoulli.hpp index 102b49399e..75ce18a427 100644 --- a/include/boost/math/special_functions/bernoulli.hpp +++ b/include/boost/math/special_functions/bernoulli.hpp @@ -11,7 +11,9 @@ #ifndef _BOOST_BERNOULLI_B2N_2013_05_30_HPP_ #define _BOOST_BERNOULLI_B2N_2013_05_30_HPP_ +#ifndef BOOST_MATH_AS_MODULE #include +#endif #include #include @@ -58,7 +60,7 @@ OutputIterator bernoulli_number_imp(OutputIterator out, std::size_t start, std:: } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline T bernoulli_b2n(const int i, const Policy &pol) { using tag_type = std::integral_constant::value>; @@ -72,13 +74,13 @@ inline T bernoulli_b2n(const int i, const Policy &pol) return result; } -template +BOOST_MATH_MODULE_EXPORT template inline T bernoulli_b2n(const int i) { return boost::math::bernoulli_b2n(i, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline OutputIterator bernoulli_b2n(const int start_index, const unsigned number_of_bernoullis_b2n, OutputIterator out_it, @@ -94,7 +96,7 @@ inline OutputIterator bernoulli_b2n(const int start_index, return boost::math::detail::bernoulli_number_imp(out_it, start_index, number_of_bernoullis_b2n, pol, tag_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline OutputIterator bernoulli_b2n(const int start_index, const unsigned number_of_bernoullis_b2n, OutputIterator out_it) @@ -102,7 +104,7 @@ inline OutputIterator bernoulli_b2n(const int start_index, return boost::math::bernoulli_b2n(start_index, number_of_bernoullis_b2n, out_it, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline T tangent_t2n(const int i, const Policy &pol) { if(i < 0) @@ -115,13 +117,13 @@ inline T tangent_t2n(const int i, const Policy &pol) return result; } -template +BOOST_MATH_MODULE_EXPORT template inline T tangent_t2n(const int i) { return boost::math::tangent_t2n(i, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline OutputIterator tangent_t2n(const int start_index, const unsigned number_of_tangent_t2n, OutputIterator out_it, @@ -136,7 +138,7 @@ inline OutputIterator tangent_t2n(const int start_index, return boost::math::detail::get_bernoulli_numbers_cache().copy_tangent_numbers(out_it, start_index, number_of_tangent_t2n, pol); } -template +BOOST_MATH_MODULE_EXPORT template inline OutputIterator tangent_t2n(const int start_index, const unsigned number_of_tangent_t2n, OutputIterator out_it) diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index e09700ec5e..59bcae4dd4 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -10,13 +10,15 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include #include #include -#include #include -#include #include +#endif +#include +#include namespace boost{ namespace math{ namespace detail{ @@ -59,7 +61,7 @@ T cos_pi_imp(T x, const Policy&) } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type cos_pi(T x, const Policy&) { typedef typename tools::promote_args::type result_type; @@ -76,7 +78,7 @@ inline typename tools::promote_args::type cos_pi(T x, const Policy&) return policies::checked_narrowing_cast(boost::math::detail::cos_pi_imp(x, forwarding_policy()), "cos_pi"); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type cos_pi(T x) { return boost::math::cos_pi(x, policies::policy<>()); diff --git a/include/boost/math/special_functions/detail/bernoulli_details.hpp b/include/boost/math/special_functions/detail/bernoulli_details.hpp index 419ddddbb6..af10efb532 100644 --- a/include/boost/math/special_functions/detail/bernoulli_details.hpp +++ b/include/boost/math/special_functions/detail/bernoulli_details.hpp @@ -7,20 +7,27 @@ #ifndef BOOST_MATH_BERNOULLI_DETAIL_HPP #define BOOST_MATH_BERNOULLI_DETAIL_HPP +#include +#include +#ifndef BOOST_MATH_BERNOULLI_NOTHREADS #include +#endif +#ifndef BOOST_MATH_AS_MODULE #include #include -#include -#include #include #include #include +#include +#endif +#ifndef BOOST_MATH_AS_MODULE #if defined(BOOST_MATH_HAS_THREADS) && !defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_MATH_NO_ATOMIC_INT) #include #else # define BOOST_MATH_BERNOULLI_NOTHREADS #endif +#endif namespace boost{ namespace math{ namespace detail{ // diff --git a/include/boost/math/special_functions/detail/erf_inv.hpp b/include/boost/math/special_functions/detail/erf_inv.hpp index 0054a74266..c10bff8f5f 100644 --- a/include/boost/math/special_functions/detail/erf_inv.hpp +++ b/include/boost/math/special_functions/detail/erf_inv.hpp @@ -13,7 +13,9 @@ #pragma warning(disable:4702) // Unreachable code: optimization warning #endif +#ifndef BOOST_MATH_AS_MODULE #include +#endif namespace boost{ namespace math{ @@ -343,7 +345,7 @@ T erf_inv_imp(const T& p, const T& q, const Policy& pol, const std::integral_con } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template typename tools::promote_args::type erfc_inv(T z, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -404,7 +406,7 @@ typename tools::promote_args::type erfc_inv(T z, const Policy& pol) detail::erf_inv_imp(static_cast(p), static_cast(q), forwarding_policy(), static_cast(nullptr)), function); } -template +BOOST_MATH_MODULE_EXPORT template typename tools::promote_args::type erf_inv(T z, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -472,13 +474,13 @@ typename tools::promote_args::type erf_inv(T z, const Policy& pol) detail::erf_inv_imp(static_cast(p), static_cast(q), forwarding_policy(), static_cast(nullptr)), function); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type erfc_inv(T z) { return erfc_inv(z, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type erf_inv(T z) { return erf_inv(z, policies::policy<>()); diff --git a/include/boost/math/special_functions/detail/fp_traits.hpp b/include/boost/math/special_functions/detail/fp_traits.hpp index 2947a32a21..6f4495aa71 100644 --- a/include/boost/math/special_functions/detail/fp_traits.hpp +++ b/include/boost/math/special_functions/detail/fp_traits.hpp @@ -20,10 +20,12 @@ With these techniques, the code could be simplified. # define BOOST_FPCLASSIFY_VAX_FORMAT #endif +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include +#endif #include #include @@ -34,6 +36,18 @@ With these techniques, the code could be simplified. #define BOOST_MATH_ENDIAN_BIG_BYTE BOOST_ENDIAN_BIG_BYTE #define BOOST_MATH_ENDIAN_LITTLE_BYTE BOOST_ENDIAN_LITTLE_BYTE +#elif (__cplusplus >= 202002L || _MSVC_LANG >= 202002L) + +#if __has_include() +#ifndef BOOST_MATH_STANDALONE +#include +#endif +#define BOOST_MATH_ENDIAN_BIG_BYTE (std::endian::native == std::endian::big) +#define BOOST_MATH_ENDIAN_LITTLE_BYTE (std::endian::native == std::endian::little) +#else +#error Missing header. Please disable standalone mode, and file an issue at https://github.com/boostorg/math +#endif + #elif defined(_WIN32) #define BOOST_MATH_ENDIAN_BIG_BYTE 0 diff --git a/include/boost/math/special_functions/detail/gamma_inva.hpp b/include/boost/math/special_functions/detail/gamma_inva.hpp index 75ac89e433..1e0cd21555 100644 --- a/include/boost/math/special_functions/detail/gamma_inva.hpp +++ b/include/boost/math/special_functions/detail/gamma_inva.hpp @@ -17,8 +17,10 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include #include +#endif namespace boost{ namespace math{ namespace detail{ @@ -150,8 +152,8 @@ T gamma_inva_imp(const T& z, const T& p, const T& q, const Policy& pol) } // namespace detail -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_p_inva(T1 x, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -180,8 +182,8 @@ inline typename tools::promote_args::type pol), "boost::math::gamma_p_inva<%1%>(%1%, %1%)"); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_q_inva(T1 x, T2 q, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -210,14 +212,14 @@ inline typename tools::promote_args::type pol), "boost::math::gamma_q_inva<%1%>(%1%, %1%)"); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_p_inva(T1 x, T2 p) { return boost::math::gamma_p_inva(x, p, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type gamma_q_inva(T1 x, T2 q) { diff --git a/include/boost/math/special_functions/detail/igamma_inverse.hpp b/include/boost/math/special_functions/detail/igamma_inverse.hpp index f6bbcd72d5..b5c6bdfe26 100644 --- a/include/boost/math/special_functions/detail/igamma_inverse.hpp +++ b/include/boost/math/special_functions/detail/igamma_inverse.hpp @@ -11,10 +11,12 @@ #endif #include +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include +#endif namespace boost{ namespace math{ @@ -517,8 +519,8 @@ T gamma_q_inv_imp(T a, T q, const Policy& pol) } // namespace detail -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -527,8 +529,8 @@ inline typename tools::promote_args::type static_cast(p), pol); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_q_inv(T1 a, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -537,15 +539,15 @@ inline typename tools::promote_args::type static_cast(p), pol); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_p_inv(T1 a, T2 p) { return gamma_p_inv(a, p, policies::policy<>()); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_q_inv(T1 a, T2 p) { return gamma_q_inv(a, p, policies::policy<>()); diff --git a/include/boost/math/special_functions/detail/igamma_large.hpp b/include/boost/math/special_functions/detail/igamma_large.hpp index 5483b53fb6..aa2ce53c01 100644 --- a/include/boost/math/special_functions/detail/igamma_large.hpp +++ b/include/boost/math/special_functions/detail/igamma_large.hpp @@ -59,7 +59,16 @@ #pragma GCC system_header #endif -namespace boost{ namespace math{ namespace detail{ +namespace boost{ namespace math{ + +#ifdef BOOST_MATH_AS_MODULE +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type erf(T z); +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type erfc(T z); +#endif + +namespace detail{ // This version will never be called (at runtime), it's a stub used // when T is unsuitable to be passed to these routines: diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 8ca3663147..90efcd2991 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -11,21 +11,23 @@ #ifndef _BOOST_POLYGAMMA_DETAIL_2013_07_30_HPP_ #define _BOOST_POLYGAMMA_DETAIL_2013_07_30_HPP_ +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include -#include #include +#endif +#include +#include +#include #include #include #include #include #include -#include -#include -#ifdef BOOST_MATH_HAS_THREADS +#if defined(BOOST_MATH_HAS_THREADS) && !defined(BOOST_MATH_AS_MODULE) #include #endif diff --git a/include/boost/math/special_functions/detail/unchecked_bernoulli.hpp b/include/boost/math/special_functions/detail/unchecked_bernoulli.hpp index 676332983a..78fe04339d 100644 --- a/include/boost/math/special_functions/detail/unchecked_bernoulli.hpp +++ b/include/boost/math/special_functions/detail/unchecked_bernoulli.hpp @@ -11,6 +11,7 @@ #ifndef BOOST_MATH_UNCHECKED_BERNOULLI_HPP #define BOOST_MATH_UNCHECKED_BERNOULLI_HPP +#ifndef BOOST_MATH_AS_MODULE #include #include #include @@ -19,6 +20,7 @@ #include #include #include +#endif namespace boost { namespace math { @@ -78,7 +80,7 @@ struct bernoulli_imp_variant } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template struct max_bernoulli_b2n : public detail::max_bernoulli_index::value>{}; namespace detail { @@ -1292,7 +1294,7 @@ inline T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant +BOOST_MATH_MODULE_EXPORT template inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION T unchecked_bernoulli_b2n(const std::size_t n) { typedef std::integral_constant::value> tag_type; diff --git a/include/boost/math/special_functions/detail/unchecked_factorial.hpp b/include/boost/math/special_functions/detail/unchecked_factorial.hpp index b528a24fe9..289a8da9b1 100644 --- a/include/boost/math/special_functions/detail/unchecked_factorial.hpp +++ b/include/boost/math/special_functions/detail/unchecked_factorial.hpp @@ -18,11 +18,13 @@ #ifdef _MSC_VER #pragma warning(pop) #endif +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include #include +#endif #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) // @@ -37,7 +39,7 @@ namespace boost { namespace math { // Forward declarations: -template +BOOST_MATH_MODULE_EXPORT template struct max_factorial; // // see https://github.com/boostorg/math/issues/923 @@ -46,6 +48,9 @@ struct max_factorial; template struct unchecked_factorial_data; +BOOST_MATH_MODULE_EXPORT template +RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); + template struct unchecked_factorial_data { @@ -136,13 +141,13 @@ template #endif // Definitions: -template <> +BOOST_MATH_MODULE_EXPORT template <> inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION float unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(float)) { return unchecked_factorial_data::factorials[i]; } -template <> +BOOST_MATH_MODULE_EXPORT template <> struct max_factorial { static constexpr unsigned value = 34; @@ -509,13 +514,13 @@ template }}; #endif -template <> +BOOST_MATH_MODULE_EXPORT template <> inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION double unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(double)) { return unchecked_factorial_data::factorials[i]; } -template <> +BOOST_MATH_MODULE_EXPORT template <> struct max_factorial { static constexpr unsigned value = 170; @@ -882,13 +887,13 @@ template }}; #endif -template <> +BOOST_MATH_MODULE_EXPORT template <> inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION long double unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(long double)) { return unchecked_factorial_data::factorials[i]; } -template <> +BOOST_MATH_MODULE_EXPORT template <> struct max_factorial { static constexpr unsigned value = 170; @@ -1263,7 +1268,7 @@ inline BOOST_MATH_CONSTEXPR_TABLE_FUNCTION BOOST_MATH_FLOAT128_TYPE unchecked_fa return unchecked_factorial_data::factorials[i]; } -template <> +BOOST_MATH_MODULE_EXPORT template <> struct max_factorial { static constexpr unsigned value = 170; @@ -1583,7 +1588,7 @@ inline T unchecked_factorial_imp(unsigned i, const std::integral_constant +BOOST_MATH_MODULE_EXPORT template inline T unchecked_factorial(unsigned i) { typedef typename boost::math::policies::precision >::type tag_type; @@ -1596,7 +1601,7 @@ inline T unchecked_factorial(unsigned i) #define BOOST_MATH_DETAIL_FLOAT128_MAX_FACTORIAL #endif -template +BOOST_MATH_MODULE_EXPORT template struct max_factorial { static constexpr unsigned value = diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index 3922de7d25..521930cc70 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -12,13 +12,15 @@ #pragma warning(disable:4702) // Unreachable code (release mode only warning) #endif +#ifndef BOOST_MATH_AS_MODULE #include #include -#include -#include #include #include +#endif +#include #include +#include #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) // @@ -566,8 +568,8 @@ T digamma_imp(T x, const std::integral_constant* t, const Policy& pol) } // namespace detail -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type digamma(T x, const Policy&) { typedef typename tools::promote_args::type result_type; @@ -591,8 +593,8 @@ inline typename tools::promote_args::type static_cast(nullptr), forwarding_policy()), "boost::math::digamma<%1%>(%1%)"); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type digamma(T x) { return digamma(x, policies::policy<>()); diff --git a/include/boost/math/special_functions/erf.hpp b/include/boost/math/special_functions/erf.hpp index 57ff605299..d5c67fe9cc 100644 --- a/include/boost/math/special_functions/erf.hpp +++ b/include/boost/math/special_functions/erf.hpp @@ -10,11 +10,13 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include -#include -#include #include #include +#endif +#include +#include #include #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) @@ -1174,7 +1176,7 @@ T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type erf(T z, const Policy& /* pol */) { typedef typename tools::promote_args::type result_type; @@ -1207,7 +1209,7 @@ inline typename tools::promote_args::type erf(T z, const Policy& /* pol */) tag_type()), "boost::math::erf<%1%>(%1%, %1%)"); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type erfc(T z, const Policy& /* pol */) { typedef typename tools::promote_args::type result_type; @@ -1240,13 +1242,13 @@ inline typename tools::promote_args::type erfc(T z, const Policy& /* pol */) tag_type()), "boost::math::erfc<%1%>(%1%, %1%)"); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type erf(T z) { return boost::math::erf(z, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type erfc(T z) { return boost::math::erfc(z, policies::policy<>()); diff --git a/include/boost/math/special_functions/expm1.hpp b/include/boost/math/special_functions/expm1.hpp index eec6356031..c7d4f157b5 100644 --- a/include/boost/math/special_functions/expm1.hpp +++ b/include/boost/math/special_functions/expm1.hpp @@ -10,16 +10,18 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include #include #include -#include -#include -#include -#include #include #include #include +#include +#endif +#include +#include +#include #include #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) @@ -258,7 +260,7 @@ T expm1_imp(T x, const std::integral_constant&, const P& pol) } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type expm1(T x, const Policy& /* pol */) { typedef typename tools::promote_args::type result_type; @@ -294,17 +296,17 @@ inline typename tools::promote_args::type expm1(T x, const Policy& /* pol */) #if defined(BOOST_HAS_EXPM1) && !(defined(__osf__) && defined(__DECCXX_VER)) # ifdef BOOST_MATH_USE_C99 -inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); } +BOOST_MATH_MODULE_EXPORT inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); } # ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); } +BOOST_MATH_MODULE_EXPORT inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); } # endif # else -inline float expm1(float x, const policies::policy<>&){ return static_cast(::expm1(x)); } +BOOST_MATH_MODULE_EXPORT inline float expm1(float x, const policies::policy<>&){ return static_cast(::expm1(x)); } # endif -inline double expm1(double x, const policies::policy<>&){ return ::expm1(x); } +BOOST_MATH_MODULE_EXPORT inline double expm1(double x, const policies::policy<>&){ return ::expm1(x); } #endif -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type expm1(T x) { return expm1(x, policies::policy<>()); diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp index 7229635cb9..a11cf877cf 100644 --- a/include/boost/math/special_functions/factorials.hpp +++ b/include/boost/math/special_functions/factorials.hpp @@ -10,24 +10,19 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include -#include -#include #include -#ifdef _MSC_VER -#pragma warning(push) // Temporary until lexical cast fixed. -#pragma warning(disable: 4127 4701) -#endif -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include #include +#endif +#include +#include namespace boost { namespace math { -template +BOOST_MATH_MODULE_EXPORT template inline T factorial(unsigned i, const Policy& pol) { static_assert(!std::is_integral::value, "Type T must not be an integral type"); @@ -48,7 +43,7 @@ inline T factorial(unsigned i, const Policy& pol) return floor(result + 0.5f); } -template +BOOST_MATH_MODULE_EXPORT template inline T factorial(unsigned i) { return factorial(i, policies::policy<>()); @@ -71,7 +66,7 @@ inline double factorial(unsigned i) return tools::overflow_error(BOOST_CURRENT_FUNCTION); } */ -template +BOOST_MATH_MODULE_EXPORT template T double_factorial(unsigned i, const Policy& pol) { static_assert(!std::is_integral::value, "Type T must not be an integral type"); @@ -106,7 +101,7 @@ T double_factorial(unsigned i, const Policy& pol) return policies::raise_overflow_error("boost::math::double_factorial<%1%>(unsigned)", 0, pol); } -template +BOOST_MATH_MODULE_EXPORT template inline T double_factorial(unsigned i) { return double_factorial(i, policies::policy<>()); @@ -226,7 +221,7 @@ inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type falling_factorial(RT x, unsigned n) { @@ -235,7 +230,7 @@ inline typename tools::promote_args::type static_cast(x), n, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol) { @@ -244,7 +239,7 @@ inline typename tools::promote_args::type static_cast(x), n, pol); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type rising_factorial(RT x, int n) { @@ -253,7 +248,7 @@ inline typename tools::promote_args::type static_cast(x), n, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol) { diff --git a/include/boost/math/special_functions/fpclassify.hpp b/include/boost/math/special_functions/fpclassify.hpp index 2c504d7ac8..d6a721488e 100644 --- a/include/boost/math/special_functions/fpclassify.hpp +++ b/include/boost/math/special_functions/fpclassify.hpp @@ -11,11 +11,13 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include #include #include -#include #include +#endif +#include #include /*! \file fpclassify.hpp @@ -75,7 +77,7 @@ at compile time, then comparison with std::numeric_limits values is used. */ - +#ifndef BOOST_MATH_AS_MODULE #if defined(_MSC_VER) || defined(BOOST_BORLANDC) #include #endif @@ -87,6 +89,7 @@ is used. #endif #endif #endif +#endif #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::abs; using ::fabs; } @@ -149,14 +152,14 @@ namespace detail{ #ifdef BOOST_MATH_USE_STD_FPCLASSIFY template -inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&) +inline int fpclassify_imp /**/(T t, const native_tag&) { return (std::fpclassify)(t); } #endif template -inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) +inline int fpclassify_imp /**/(T t, const generic_tag&) { BOOST_MATH_INSTRUMENT_VARIABLE(t); @@ -192,7 +195,7 @@ inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) } template -inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) +inline int fpclassify_imp /**/(T t, const generic_tag&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized) @@ -208,7 +211,7 @@ inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) } template -int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag) +int fpclassify_imp /**/(T x, ieee_copy_all_bits_tag) { typedef typename fp_traits::type traits; @@ -237,7 +240,7 @@ int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag) } template -int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) +int fpclassify_imp /**/(T x, ieee_copy_leading_bits_tag) { typedef typename fp_traits::type traits; @@ -264,7 +267,7 @@ int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) } #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && (defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)) -inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +inline int fpclassify_imp /**/(long double t, const native_tag&) { return boost::math::detail::fpclassify_imp(t, generic_tag()); } @@ -272,8 +275,8 @@ inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag& } // namespace detail -template -inline int fpclassify BOOST_NO_MACRO_EXPAND(T t) +BOOST_MATH_MODULE_EXPORT template +inline int fpclassify /**/(T t) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; @@ -288,8 +291,8 @@ inline int fpclassify BOOST_NO_MACRO_EXPAND(T t) } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -template <> -inline int fpclassify BOOST_NO_MACRO_EXPAND(long double t) +BOOST_MATH_MODULE_EXPORT template <> +inline int fpclassify /**/(long double t) { typedef detail::fp_traits::type traits; typedef traits::method method; @@ -343,7 +346,7 @@ namespace detail { } #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) -inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +inline bool isfinite_impl /**/(long double t, const native_tag&) { return boost::math::detail::isfinite_impl(t, generic_tag()); } @@ -351,7 +354,7 @@ inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag& } -template +BOOST_MATH_MODULE_EXPORT template inline bool (isfinite)(T x) { //!< \brief return true if floating-point type t is finite. typedef typename detail::fp_traits::type traits; @@ -362,7 +365,7 @@ inline bool (isfinite)(T x) } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -template<> +BOOST_MATH_MODULE_EXPORT template<> inline bool (isfinite)(long double x) { //!< \brief return true if floating-point type t is finite. typedef detail::fp_traits::type traits; @@ -414,7 +417,7 @@ namespace detail { } #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) -inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +inline bool isnormal_impl /**/(long double t, const native_tag&) { return boost::math::detail::isnormal_impl(t, generic_tag()); } @@ -422,7 +425,7 @@ inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag& } -template +BOOST_MATH_MODULE_EXPORT template inline bool (isnormal)(T x) { typedef typename detail::fp_traits::type traits; @@ -433,7 +436,7 @@ inline bool (isnormal)(T x) } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -template<> +BOOST_MATH_MODULE_EXPORT template<> inline bool (isnormal)(long double x) { typedef detail::fp_traits::type traits; @@ -503,7 +506,7 @@ namespace detail { } #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) -inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) +inline bool isinf_impl /**/(long double t, const native_tag&) { return boost::math::detail::isinf_impl(t, generic_tag()); } @@ -511,7 +514,7 @@ inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline bool (isinf)(T x) { typedef typename detail::fp_traits::type traits; @@ -522,7 +525,7 @@ inline bool (isinf)(T x) } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -template<> +BOOST_MATH_MODULE_EXPORT template<> inline bool (isinf)(long double x) { typedef detail::fp_traits::type traits; @@ -533,7 +536,7 @@ inline bool (isinf)(long double x) } #endif #if defined(BOOST_MATH_USE_FLOAT128) && defined(BOOST_MATH_HAS_QUADMATH_H) -template<> +BOOST_MATH_MODULE_EXPORT template<> inline bool (isinf)(__float128 x) { return ::isinfq(x); @@ -601,7 +604,7 @@ namespace detail { } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline bool (isnan)(T x) { //!< \brief return true if floating-point type t is NaN (Not A Number). typedef typename detail::fp_traits::type traits; @@ -611,11 +614,11 @@ inline bool (isnan)(T x) } #ifdef isnan -template <> inline bool isnan BOOST_NO_MACRO_EXPAND(float t){ return ::boost::math_detail::is_nan_helper(t, std::true_type()); } -template <> inline bool isnan BOOST_NO_MACRO_EXPAND(double t){ return ::boost::math_detail::is_nan_helper(t, std::true_type()); } -template <> inline bool isnan BOOST_NO_MACRO_EXPAND(long double t){ return ::boost::math_detail::is_nan_helper(t, std::true_type()); } +BOOST_MATH_MODULE_EXPORT template <> inline bool isnan /**/(float t){ return ::boost::math_detail::is_nan_helper(t, std::true_type()); } +BOOST_MATH_MODULE_EXPORT template <> inline bool isnan /**/(double t){ return ::boost::math_detail::is_nan_helper(t, std::true_type()); } +BOOST_MATH_MODULE_EXPORT template <> inline bool isnan /**/(long double t){ return ::boost::math_detail::is_nan_helper(t, std::true_type()); } #elif defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) -template<> +BOOST_MATH_MODULE_EXPORT template<> inline bool (isnan)(long double x) { //!< \brief return true if floating-point type t is NaN (Not A Number). typedef detail::fp_traits::type traits; @@ -625,7 +628,7 @@ inline bool (isnan)(long double x) } #endif #if defined(BOOST_MATH_USE_FLOAT128) && defined(BOOST_MATH_HAS_QUADMATH_H) -template<> +BOOST_MATH_MODULE_EXPORT template<> inline bool (isnan)(__float128 x) { return ::isnanq(x); diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index a58ea3e693..0167035950 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -14,30 +14,37 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE +// In module core +#include +#include +#include +#include +#endif + #include #include -#include #include #include #include -#include -#include -#include #include -#include #include #include #include -#include #include #include #include #include #include +#ifndef BOOST_MATH_AS_MODULE #include #include #include +#include +#include +#include +#endif #ifdef _MSC_VER # pragma warning(push) @@ -1832,93 +1839,6 @@ inline typename tools::promote_args::type return policies::checked_narrowing_cast(detail::gamma_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)"); } -template -struct igamma_initializer -{ - struct init - { - init() - { - typedef typename policies::precision::type precision_type; - - typedef std::integral_constant tag_type; - - do_init(tag_type()); - } - template - static void do_init(const std::integral_constant&) - { - // If std::numeric_limits::digits is zero, we must not call - // our initialization code here as the precision presumably - // varies at runtime, and will not have been set yet. Plus the - // code requiring initialization isn't called when digits == 0. - if(std::numeric_limits::digits) - { - boost::math::gamma_p(static_cast(400), static_cast(400), Policy()); - } - } - static void do_init(const std::integral_constant&){} - void force_instantiate()const{} - }; - static const init initializer; - static void force_instantiate() - { - initializer.force_instantiate(); - } -}; - -template -const typename igamma_initializer::init igamma_initializer::initializer; - -template -struct lgamma_initializer -{ - struct init - { - init() - { - typedef typename policies::precision::type precision_type; - typedef std::integral_constant tag_type; - - do_init(tag_type()); - } - static void do_init(const std::integral_constant&) - { - boost::math::lgamma(static_cast(2.5), Policy()); - boost::math::lgamma(static_cast(1.25), Policy()); - boost::math::lgamma(static_cast(1.75), Policy()); - } - static void do_init(const std::integral_constant&) - { - boost::math::lgamma(static_cast(2.5), Policy()); - boost::math::lgamma(static_cast(1.25), Policy()); - boost::math::lgamma(static_cast(1.5), Policy()); - boost::math::lgamma(static_cast(1.75), Policy()); - } - static void do_init(const std::integral_constant&) - { - } - void force_instantiate()const{} - }; - static const init initializer; - static void force_instantiate() - { - initializer.force_instantiate(); - } -}; - -template -const typename lgamma_initializer::init lgamma_initializer::initializer; - template inline tools::promote_args_t tgamma(T1 a, T2 z, const Policy&, const std::false_type) @@ -1934,8 +1854,6 @@ inline tools::promote_args_t policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; - igamma_initializer::force_instantiate(); - return policies::checked_narrowing_cast( detail::gamma_incomplete_imp(static_cast(a), static_cast(z), false, true, @@ -1952,15 +1870,15 @@ inline tools::promote_args_t } // namespace detail -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma(T z) { return tgamma(z, policies::policy<>()); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type lgamma(T z, int* sign, const Policy&) { BOOST_FPU_EXCEPTION_GUARD @@ -1974,34 +1892,32 @@ inline typename tools::promote_args::type policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; - detail::lgamma_initializer::force_instantiate(); - return policies::checked_narrowing_cast(detail::lgamma_imp(static_cast(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)"); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type lgamma(T z, int* sign) { return lgamma(z, sign, policies::policy<>()); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type lgamma(T x, const Policy& pol) { return ::boost::math::lgamma(x, nullptr, pol); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type lgamma(T x) { return ::boost::math::lgamma(x, nullptr, policies::policy<>()); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma1pm1(T z, const Policy& /* pol */) { BOOST_FPU_EXCEPTION_GUARD @@ -2018,8 +1934,8 @@ inline typename tools::promote_args::type return policies::checked_narrowing_cast::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)"); } -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma1pm1(T z) { return tgamma1pm1(z, policies::policy<>()); @@ -2028,8 +1944,8 @@ inline typename tools::promote_args::type // // Full upper incomplete gamma: // -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma(T1 a, T2 z) { // @@ -2040,8 +1956,8 @@ inline tools::promote_args_t using result_type = tools::promote_args_t; return static_cast(detail::tgamma(a, z, maybe_policy())); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma(T1 a, T2 z, const Policy& pol) { using result_type = tools::promote_args_t; @@ -2050,8 +1966,8 @@ inline tools::promote_args_t // // Full lower incomplete gamma: // -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma_lower(T1 a, T2 z, const Policy&) { BOOST_FPU_EXCEPTION_GUARD @@ -2065,15 +1981,13 @@ inline tools::promote_args_t policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; - detail::igamma_initializer::force_instantiate(); - return policies::checked_narrowing_cast( detail::gamma_incomplete_imp(static_cast(a), static_cast(z), false, false, forwarding_policy(), static_cast(nullptr)), "tgamma_lower<%1%>(%1%, %1%)"); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma_lower(T1 a, T2 z) { return tgamma_lower(a, z, policies::policy<>()); @@ -2081,8 +1995,8 @@ inline tools::promote_args_t // // Regularised upper incomplete gamma: // -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_q(T1 a, T2 z, const Policy& /* pol */) { BOOST_FPU_EXCEPTION_GUARD @@ -2096,15 +2010,13 @@ inline tools::promote_args_t policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; - detail::igamma_initializer::force_instantiate(); - return policies::checked_narrowing_cast( detail::gamma_incomplete_imp(static_cast(a), static_cast(z), true, true, forwarding_policy(), static_cast(nullptr)), "gamma_q<%1%>(%1%, %1%)"); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_q(T1 a, T2 z) { return gamma_q(a, z, policies::policy<>()); @@ -2112,8 +2024,8 @@ inline tools::promote_args_t // // Regularised lower incomplete gamma: // -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_p(T1 a, T2 z, const Policy&) { BOOST_FPU_EXCEPTION_GUARD @@ -2127,23 +2039,21 @@ inline tools::promote_args_t policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; - detail::igamma_initializer::force_instantiate(); - return policies::checked_narrowing_cast( detail::gamma_incomplete_imp(static_cast(a), static_cast(z), true, false, forwarding_policy(), static_cast(nullptr)), "gamma_p<%1%>(%1%, %1%)"); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_p(T1 a, T2 z) { return gamma_p(a, z, policies::policy<>()); } // ratios of gamma functions: -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy& /* pol */) { BOOST_FPU_EXCEPTION_GUARD @@ -2158,14 +2068,14 @@ inline tools::promote_args_t return policies::checked_narrowing_cast(detail::tgamma_delta_ratio_imp(static_cast(z), static_cast(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta) { return tgamma_delta_ratio(z, delta, policies::policy<>()); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&) { typedef tools::promote_args_t result_type; @@ -2179,15 +2089,15 @@ inline tools::promote_args_t return policies::checked_narrowing_cast(detail::tgamma_ratio_imp(static_cast(a), static_cast(b), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type tgamma_ratio(T1 a, T2 b) { return tgamma_ratio(a, b, policies::policy<>()); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&) { BOOST_FPU_EXCEPTION_GUARD @@ -2202,8 +2112,8 @@ inline tools::promote_args_t return policies::checked_narrowing_cast(detail::gamma_p_derivative_imp(static_cast(a), static_cast(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)"); } -template -inline tools::promote_args_t +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x) { return gamma_p_derivative(a, x, policies::policy<>()); diff --git a/include/boost/math/special_functions/lanczos.hpp b/include/boost/math/special_functions/lanczos.hpp index d75a968cdb..a7f88f47e6 100644 --- a/include/boost/math/special_functions/lanczos.hpp +++ b/include/boost/math/special_functions/lanczos.hpp @@ -12,11 +12,13 @@ #include #include +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include #include +#endif #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) // diff --git a/include/boost/math/special_functions/log1p.hpp b/include/boost/math/special_functions/log1p.hpp index 9b8a8e0eb7..677e690f35 100644 --- a/include/boost/math/special_functions/log1p.hpp +++ b/include/boost/math/special_functions/log1p.hpp @@ -12,17 +12,20 @@ #pragma warning(disable:4702) // Unreachable code (release mode only warning) #endif +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include -#include -#include -#include #include #include -#include #include +#include +#endif +#include +#include +#include +#include #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) // @@ -36,6 +39,11 @@ namespace boost{ namespace math{ +#ifdef BOOST_MATH_AS_MODULE +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type log1p(T x, const Policy&); +#endif + namespace detail { // Functor log1p_series returns the next term in the Taylor series @@ -293,7 +301,7 @@ const typename log1p_initializer::init log1p_initializer +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type log1p(T x, const Policy&) { typedef typename tools::promote_args::type result_type; @@ -327,7 +335,7 @@ inline typename tools::promote_args::type log1p(T x, const Policy&) #if defined(BOOST_HAS_LOG1P) && !(defined(__osf__) && defined(__DECCXX_VER)) # ifdef BOOST_MATH_USE_C99 -template +BOOST_MATH_MODULE_EXPORT template inline float log1p(float x, const Policy& pol) { if(x < -1) @@ -352,7 +360,7 @@ inline long double log1p(long double x, const Policy& pol) } #endif #else -template +BOOST_MATH_MODULE_EXPORT template inline float log1p(float x, const Policy& pol) { if(x < -1) @@ -364,7 +372,7 @@ inline float log1p(float x, const Policy& pol) return ::log1p(x); } #endif -template +BOOST_MATH_MODULE_EXPORT template inline double log1p(double x, const Policy& pol) { if(x < -1) @@ -381,7 +389,7 @@ inline double log1p(double x, const Policy& pol) // that your compilers optimizer won't mess this code up!! // Currently tested with VC8 and Intel 9.1. // -template +BOOST_MATH_MODULE_EXPORT template inline double log1p(double x, const Policy& pol) { if(x < -1) @@ -396,7 +404,7 @@ inline double log1p(double x, const Policy& pol) else return ::log(u)*(x/(u-1.0)); } -template +BOOST_MATH_MODULE_EXPORT template inline float log1p(float x, const Policy& pol) { return static_cast(boost::math::log1p(static_cast(x), pol)); @@ -406,7 +414,7 @@ inline float log1p(float x, const Policy& pol) // For some reason this fails to compile under WinCE... // Needs more investigation. // -template +BOOST_MATH_MODULE_EXPORT template inline long double log1p(long double x, const Policy& pol) { if(x < -1) @@ -424,7 +432,7 @@ inline long double log1p(long double x, const Policy& pol) #endif #endif -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type log1p(T x) { return boost::math::log1p(x, policies::policy<>()); @@ -432,8 +440,8 @@ inline typename tools::promote_args::type log1p(T x) // // Compute log(1+x)-x: // -template -inline typename tools::promote_args::type +BOOST_MATH_MODULE_EXPORT template +inline typename tools::promote_args::type log1pmx(T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -464,7 +472,7 @@ inline typename tools::promote_args::type return result; } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type log1pmx(T x) { return log1pmx(x, policies::policy<>()); diff --git a/include/boost/math/special_functions/next.hpp b/include/boost/math/special_functions/next.hpp index c696b97b5f..d02a713018 100644 --- a/include/boost/math/special_functions/next.hpp +++ b/include/boost/math/special_functions/next.hpp @@ -10,22 +10,25 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE +#include +#include #include +#endif #include #include #include #include #include -#include -#include - +#ifndef BOOST_MATH_AS_MODULE #if !defined(_CRAYC) && !defined(__CUDACC__) && (!defined(__GNUC__) || (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3))) #if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__SSE2__) #include "xmmintrin.h" #define BOOST_MATH_CHECK_SSE2 #endif #endif +#endif namespace boost{ namespace math{ @@ -36,6 +39,21 @@ namespace boost{ namespace math{ } +#ifdef BOOST_MATH_AS_MODULE +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type float_next(const T& val, const Policy& pol); +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type float_prior(const T& val, const Policy& pol); +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type float_distance(const T& a, const U& b, const Policy& pol); +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type float_distance(const T& a, const U& b); +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type float_advance(T val, int distance, const Policy& pol); +BOOST_MATH_MODULE_EXPORT template +typename tools::promote_args::type float_advance(const T& val, int distance); +#endif + namespace detail{ template @@ -279,7 +297,7 @@ T float_next_imp(const T& val, const std::false_type&, const Policy& pol) } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type float_next(const T& val, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -309,7 +327,7 @@ inline double float_next(const double& val, const Policy& pol) } #endif -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type float_next(const T& val) { return float_next(val, policies::policy<>()); @@ -415,7 +433,7 @@ T float_prior_imp(const T& val, const std::false_type&, const Policy& pol) } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type float_prior(const T& val, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -445,20 +463,20 @@ inline double float_prior(const double& val, const Policy& pol) } #endif -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type float_prior(const T& val) { return float_prior(val, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type nextafter(const T& val, const U& direction, const Policy& pol) { typedef typename tools::promote_args::type result_type; return val < direction ? boost::math::float_next(val, pol) : val == direction ? val : boost::math::float_prior(val, pol); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type nextafter(const T& val, const U& direction) { return nextafter(val, direction, policies::policy<>()); @@ -678,7 +696,7 @@ T float_distance_imp(const T& a, const T& b, const std::false_type&, const Polic } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type float_distance(const T& a, const U& b, const Policy& pol) { // @@ -712,7 +730,7 @@ inline typename tools::promote_args::type float_distance(const T& a, const } } -template +BOOST_MATH_MODULE_EXPORT template typename tools::promote_args::type float_distance(const T& a, const U& b) { return boost::math::float_distance(a, b, policies::policy<>()); @@ -889,14 +907,14 @@ T float_advance_imp(T val, int distance, const std::false_type&, const Policy& p } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type float_advance(T val, int distance, const Policy& pol) { typedef typename tools::promote_args::type result_type; return detail::float_advance_imp(detail::normalize_value(static_cast(val), typename detail::has_hidden_guard_digits::type()), distance, std::integral_constant::is_specialized || (std::numeric_limits::radix == 2)>(), pol); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type float_advance(const T& val, int distance) { return boost::math::float_advance(val, distance, policies::policy<>()); diff --git a/include/boost/math/special_functions/pow.hpp b/include/boost/math/special_functions/pow.hpp index 9c64889977..9555132da6 100644 --- a/include/boost/math/special_functions/pow.hpp +++ b/include/boost/math/special_functions/pow.hpp @@ -12,12 +12,12 @@ #ifndef BOOST_MATH_POW_HPP #define BOOST_MATH_POW_HPP - +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include - +#endif namespace boost { namespace math { @@ -119,14 +119,14 @@ struct select_power_if_positive } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template BOOST_MATH_CXX14_CONSTEXPR inline typename tools::promote_args::type pow(T base, const Policy& policy) { using result_type = typename tools::promote_args::type; return detail::select_power_if_positive::type::result(static_cast(base), policy); } -template +BOOST_MATH_MODULE_EXPORT template BOOST_MATH_CXX14_CONSTEXPR inline typename tools::promote_args::type pow(T base) { return pow(base, policies::policy<>()); } diff --git a/include/boost/math/special_functions/powm1.hpp b/include/boost/math/special_functions/powm1.hpp index e52277b16d..e1152ff445 100644 --- a/include/boost/math/special_functions/powm1.hpp +++ b/include/boost/math/special_functions/powm1.hpp @@ -12,11 +12,14 @@ #pragma warning(disable:4702) // Unreachable code (release mode only warning) #endif +#ifndef BOOST_MATH_AS_MODULE #include -#include -#include #include #include +#include +#endif +#include +#include #include namespace boost{ namespace math{ namespace detail{ @@ -58,7 +61,7 @@ inline T powm1_imp(const T x, const T y, const Policy& pol) } // detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type powm1(const T1 a, const T2 z) { @@ -66,7 +69,7 @@ inline typename tools::promote_args::type return detail::powm1_imp(static_cast(a), static_cast(z), policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type powm1(const T1 a, const T2 z, const Policy& pol) { @@ -84,6 +87,3 @@ inline typename tools::promote_args::type #endif // BOOST_MATH_POWM1 - - - diff --git a/include/boost/math/special_functions/sign.hpp b/include/boost/math/special_functions/sign.hpp index 8f9fc4793a..155b70677c 100644 --- a/include/boost/math/special_functions/sign.hpp +++ b/include/boost/math/special_functions/sign.hpp @@ -14,7 +14,9 @@ #endif #include +#ifndef BOOST_MATH_AS_MODULE #include +#endif #include namespace boost{ namespace math{ @@ -150,7 +152,7 @@ namespace detail { } // namespace detail -template int (signbit)(T x) +BOOST_MATH_MODULE_EXPORT template int (signbit)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; @@ -159,13 +161,13 @@ template int (signbit)(T x) return detail::signbit_impl(static_cast(x), method()); } -template -inline int sign BOOST_NO_MACRO_EXPAND(const T& z) +BOOST_MATH_MODULE_EXPORT template +inline int sign /**/(const T& z) { return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1; } -template typename tools::promote_args_permissive::type (changesign)(const T& x) +BOOST_MATH_MODULE_EXPORT template typename tools::promote_args_permissive::type (changesign)(const T& x) { //!< \brief return unchanged binary pattern of x, except for change of sign bit. typedef typename detail::fp_traits::sign_change_type traits; typedef typename traits::method method; @@ -175,9 +177,9 @@ template typename tools::promote_args_permissive::type (changesign) return detail::changesign_impl(static_cast(x), method()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args_permissive::type - copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y) + copysign /**/(const T& x, const U& y) { BOOST_MATH_STD_USING typedef typename tools::promote_args_permissive::type result_type; diff --git a/include/boost/math/special_functions/sin_pi.hpp b/include/boost/math/special_functions/sin_pi.hpp index 5b8eb6fcf2..464a2ffea4 100644 --- a/include/boost/math/special_functions/sin_pi.hpp +++ b/include/boost/math/special_functions/sin_pi.hpp @@ -10,13 +10,15 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include #include -#include #include #include -#include #include +#endif +#include +#include namespace boost{ namespace math{ namespace detail{ @@ -55,7 +57,7 @@ inline T sin_pi_imp(T x, const Policy& pol) } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type sin_pi(T x, const Policy&) { typedef typename tools::promote_args::type result_type; @@ -72,7 +74,7 @@ inline typename tools::promote_args::type sin_pi(T x, const Policy&) return policies::checked_narrowing_cast(boost::math::detail::sin_pi_imp(x, forwarding_policy()), "sin_pi"); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type sin_pi(T x) { return boost::math::sin_pi(x, policies::policy<>()); diff --git a/include/boost/math/special_functions/sqrt1pm1.hpp b/include/boost/math/special_functions/sqrt1pm1.hpp index 041916a53f..6c012a87e7 100644 --- a/include/boost/math/special_functions/sqrt1pm1.hpp +++ b/include/boost/math/special_functions/sqrt1pm1.hpp @@ -10,7 +10,9 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include +#endif #include #include @@ -20,7 +22,7 @@ namespace boost{ namespace math{ -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type sqrt1pm1(const T& val, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -31,7 +33,7 @@ inline typename tools::promote_args::type sqrt1pm1(const T& val, const Policy return boost::math::expm1(boost::math::log1p(val, pol) / 2, pol); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type sqrt1pm1(const T& val) { return sqrt1pm1(val, policies::policy<>()); diff --git a/include/boost/math/special_functions/trigamma.hpp b/include/boost/math/special_functions/trigamma.hpp index f74b43db1f..12583b81a1 100644 --- a/include/boost/math/special_functions/trigamma.hpp +++ b/include/boost/math/special_functions/trigamma.hpp @@ -10,12 +10,14 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include #include -#include -#include #include #include +#endif +#include +#include #include #include @@ -426,7 +428,7 @@ const typename trigamma_initializer::init trigamma_initializer +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type trigamma(T x, const Policy&) { @@ -454,7 +456,7 @@ inline typename tools::promote_args::type static_cast(nullptr), forwarding_policy()), "boost::math::trigamma<%1%>(%1%)"); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type trigamma(T x) { diff --git a/include/boost/math/special_functions/trunc.hpp b/include/boost/math/special_functions/trunc.hpp index a084de560b..9cce2c4acd 100644 --- a/include/boost/math/special_functions/trunc.hpp +++ b/include/boost/math/special_functions/trunc.hpp @@ -11,11 +11,13 @@ #pragma once #endif +#include +#ifndef BOOST_MATH_AS_MODULE #include #include -#include -#include #include +#endif +#include #include #include @@ -26,7 +28,7 @@ namespace boost{ namespace math{ namespace detail{ -template +BOOST_MATH_MODULE_EXPORT template inline tools::promote_args_t trunc(const T& v, const Policy& pol, const std::false_type&) { BOOST_MATH_STD_USING @@ -38,7 +40,7 @@ inline tools::promote_args_t trunc(const T& v, const Policy& pol, const std:: return (v >= 0) ? static_cast(floor(v)) : static_cast(ceil(v)); } -template +BOOST_MATH_MODULE_EXPORT template inline tools::promote_args_t trunc(const T& v, const Policy&, const std::true_type&) { return v; @@ -46,12 +48,12 @@ inline tools::promote_args_t trunc(const T& v, const Policy&, const std::true } -template +BOOST_MATH_MODULE_EXPORT template inline tools::promote_args_t trunc(const T& v, const Policy& pol) { return detail::trunc(v, pol, std::integral_constant::value>()); } -template +BOOST_MATH_MODULE_EXPORT template inline tools::promote_args_t trunc(const T& v) { return trunc(v, policies::policy<>()); @@ -69,7 +71,7 @@ inline tools::promote_args_t trunc(const T& v) // is to avoid macro substiution from MSVC // https://stackoverflow.com/questions/27442885/syntax-error-with-stdnumeric-limitsmax // -template +BOOST_MATH_MODULE_EXPORT template inline int itrunc(const T& v, const Policy& pol) { BOOST_MATH_STD_USING @@ -110,13 +112,13 @@ inline int itrunc(const T& v, const Policy& pol) return static_cast(r); } -template +BOOST_MATH_MODULE_EXPORT template inline int itrunc(const T& v) { return itrunc(v, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline long ltrunc(const T& v, const Policy& pol) { BOOST_MATH_STD_USING @@ -157,13 +159,13 @@ inline long ltrunc(const T& v, const Policy& pol) return static_cast(r); } -template +BOOST_MATH_MODULE_EXPORT template inline long ltrunc(const T& v) { return ltrunc(v, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline long long lltrunc(const T& v, const Policy& pol) { BOOST_MATH_STD_USING @@ -204,20 +206,20 @@ inline long long lltrunc(const T& v, const Policy& pol) return static_cast(r); } -template +BOOST_MATH_MODULE_EXPORT template inline long long lltrunc(const T& v) { return lltrunc(v, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline typename std::enable_if::value, int>::type iconvert(const T& v, const Policy&) { return static_cast(v); } -template +BOOST_MATH_MODULE_EXPORT template inline typename std::enable_if::value, int>::type iconvert(const T& v, const Policy& pol) { @@ -225,14 +227,14 @@ inline typename std::enable_if::value, int>::type return itrunc(v, pol); } -template +BOOST_MATH_MODULE_EXPORT template inline typename std::enable_if::value, long>::type lconvert(const T& v, const Policy&) { return static_cast(v); } -template +BOOST_MATH_MODULE_EXPORT template inline typename std::enable_if::value, long>::type lconvert(const T& v, const Policy& pol) { @@ -240,16 +242,16 @@ inline typename std::enable_if::value, long>::ty return ltrunc(v, pol); } -template +BOOST_MATH_MODULE_EXPORT template inline typename std::enable_if::value, long long>::type - llconvertert(const T& v, const Policy&) + llconvert(const T& v, const Policy&) { return static_cast(v); } -template +BOOST_MATH_MODULE_EXPORT template inline typename std::enable_if::value, long long>::type - llconvertert(const T& v, const Policy& pol) + llconvert(const T& v, const Policy& pol) { using boost::math::lltrunc; return lltrunc(v, pol); diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index 1a3bba7485..a6c88be1d7 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -10,11 +10,13 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include #include +#include +#endif #include #include -#include #include #include #include @@ -1059,7 +1061,7 @@ const typename zeta_initializer::init zeta_initializer +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type zeta(T s, const Policy&) { typedef typename tools::promote_args::type result_type; @@ -1087,7 +1089,7 @@ inline typename tools::promote_args::type zeta(T s, const Policy&) tag_type()), "boost::math::zeta<%1%>(%1%)"); } -template +BOOST_MATH_MODULE_EXPORT template inline typename tools::promote_args::type zeta(T s) { return zeta(s, policies::policy<>()); diff --git a/include/boost/math/tools/big_constant.hpp b/include/boost/math/tools/big_constant.hpp index eaa34dd230..afbbc0179f 100644 --- a/include/boost/math/tools/big_constant.hpp +++ b/include/boost/math/tools/big_constant.hpp @@ -12,9 +12,11 @@ #include #endif +#ifndef BOOST_MATH_AS_MODULE #include #include #include +#endif namespace boost{ namespace math{ diff --git a/include/boost/math/tools/complex.hpp b/include/boost/math/tools/complex.hpp index d462ca8092..8f8dc077bf 100644 --- a/include/boost/math/tools/complex.hpp +++ b/include/boost/math/tools/complex.hpp @@ -10,7 +10,9 @@ #ifndef BOOST_MATH_TOOLS_COMPLEX_HPP #define BOOST_MATH_TOOLS_COMPLEX_HPP +#ifndef BOOST_MATH_AS_MODULE #include +#endif #include namespace boost { diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 9e4b7d7ca9..5364739004 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -190,6 +190,7 @@ #endif // BOOST_MATH_STANDALONE +#ifndef BOOST_MATH_AS_MODULE // Support compilers with P0024R2 implemented without linking TBB // https://en.cppreference.com/w/cpp/compiler_support #if !defined(BOOST_MATH_NO_CXX17_HDR_EXECUTION) && defined(BOOST_MATH_HAS_THREADS) @@ -216,6 +217,11 @@ #include #include +#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) +# include +#endif +#endif + #include #if (defined(__NetBSD__) || defined(__EMSCRIPTEN__)\ @@ -408,7 +414,9 @@ struct non_type {}; // // noexcept support: // +#ifndef BOOST_MATH_AS_MODULE #include +#endif #define BOOST_MATH_NOEXCEPT(T) noexcept(std::is_floating_point::value) #define BOOST_MATH_IS_FLOAT(T) (std::is_floating_point::value) @@ -554,8 +562,9 @@ struct is_integer_for_rounding // on entrance to these functions. This appears to have been fixed in Glibc 2.14 (May 2011). // Much more information in this message thread: https://groups.google.com/forum/#!topic/boost-list/ZT99wtIFlb4 // - +#ifndef BOOST_MATH_AS_MODULE #include +#endif # ifdef FE_ALL_EXCEPT @@ -640,6 +649,17 @@ namespace boost{ namespace math{ #define BOOST_MATH_CONSTEXPR_TABLE_FUNCTION #endif +// +// Module build support: +// +#ifdef BOOST_MATH_AS_MODULE +# define BOOST_MATH_MODULE_EXPORT export +# define BOOST_MATH_STATIC_CONST inline constexpr +#else +# define BOOST_MATH_MODULE_EXPORT +# define BOOST_MATH_STATIC_CONST static constexpr +#endif + #endif // BOOST_MATH_TOOLS_CONFIG_HPP diff --git a/include/boost/math/tools/convert_from_string.hpp b/include/boost/math/tools/convert_from_string.hpp index 3b7895cdf6..56d0b451ea 100644 --- a/include/boost/math/tools/convert_from_string.hpp +++ b/include/boost/math/tools/convert_from_string.hpp @@ -12,6 +12,8 @@ #endif #include + +#ifndef BOOST_MATH_AS_MODULE #include #ifndef BOOST_MATH_STANDALONE @@ -26,6 +28,7 @@ # pragma pop_macro( "I" ) #endif +#endif #endif namespace boost{ namespace math{ namespace tools{ diff --git a/include/boost/math/tools/fraction.hpp b/include/boost/math/tools/fraction.hpp index a64c070258..0396e49122 100644 --- a/include/boost/math/tools/fraction.hpp +++ b/include/boost/math/tools/fraction.hpp @@ -10,11 +10,13 @@ #pragma once #endif -#include #include +#ifndef BOOST_MATH_AS_MODULE +#include #include #include #include +#endif namespace boost{ namespace math{ namespace tools{ diff --git a/include/boost/math/tools/is_detected.hpp b/include/boost/math/tools/is_detected.hpp index 8dfe86b740..9245990a5d 100644 --- a/include/boost/math/tools/is_detected.hpp +++ b/include/boost/math/tools/is_detected.hpp @@ -8,7 +8,9 @@ #ifndef BOOST_MATH_TOOLS_IS_DETECTED_HPP #define BOOST_MATH_TOOLS_IS_DETECTED_HPP +#ifndef BOOST_MATH_AS_MODULE #include +#endif namespace boost { namespace math { namespace tools { diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index a7a807ea28..c9610b6f03 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -10,14 +10,16 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include -#include #include #include #include #include #include #include // LDBL_MANT_DIG +#include +#endif namespace boost{ namespace math { @@ -35,7 +37,7 @@ namespace tools // template <> NTL::RR max_value ... // See Conceptual Requirements for Real Number Types. -template +BOOST_MATH_MODULE_EXPORT template inline constexpr int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) noexcept { static_assert( ::std::numeric_limits::is_specialized, "Type T must be specialized"); @@ -46,7 +48,7 @@ inline constexpr int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) noexcept : ((std::numeric_limits::digits + 1) * 1000L) / 301L; } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(std::is_floating_point::value) { static_assert( ::std::numeric_limits::is_specialized, "Type T must be specialized"); @@ -54,7 +56,7 @@ inline constexpr T max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(std } // Also used as a finite 'infinite' value for - and +infinity, for example: // -max_value = -1.79769e+308, max_value = 1.79769e+308. -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(std::is_floating_point::value) { static_assert( ::std::numeric_limits::is_specialized, "Type T must be specialized"); @@ -199,7 +201,7 @@ struct log_limit_noexcept_traits : public log_limit_noexcept_traits_imp +BOOST_MATH_MODULE_EXPORT template inline constexpr T log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(detail::log_limit_noexcept_traits::value) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS @@ -212,7 +214,7 @@ inline constexpr T log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept( #endif } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(detail::log_limit_noexcept_traits::value) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS @@ -229,7 +231,7 @@ inline constexpr T log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept( #pragma warning(pop) #endif -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) noexcept(std::is_floating_point::value) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS @@ -369,19 +371,19 @@ struct root_epsilon_traits } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T root_epsilon() noexcept(std::is_floating_point::value && detail::root_epsilon_traits::has_noexcept) { return detail::root_epsilon_imp(static_cast(nullptr), typename detail::root_epsilon_traits::tag_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T cbrt_epsilon() noexcept(std::is_floating_point::value && detail::root_epsilon_traits::has_noexcept) { return detail::cbrt_epsilon_imp(static_cast(nullptr), typename detail::root_epsilon_traits::tag_type()); } -template +BOOST_MATH_MODULE_EXPORT template inline constexpr T forth_root_epsilon() noexcept(std::is_floating_point::value && detail::root_epsilon_traits::has_noexcept) { return detail::forth_root_epsilon_imp(static_cast(nullptr), typename detail::root_epsilon_traits::tag_type()); diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index c117e9575d..941c813580 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -24,7 +24,9 @@ #endif #include +#ifndef BOOST_MATH_STANDALONE #include +#endif #if defined __has_include # if __cplusplus > 202002L || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) diff --git a/include/boost/math/tools/rational.hpp b/include/boost/math/tools/rational.hpp index 69b7251539..9e3deb1580 100644 --- a/include/boost/math/tools/rational.hpp +++ b/include/boost/math/tools/rational.hpp @@ -10,7 +10,9 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include +#endif #include #include @@ -167,7 +169,7 @@ namespace boost{ namespace math{ namespace tools{ // // Forward declaration to keep two phase lookup happy: // -template +BOOST_MATH_MODULE_EXPORT template U evaluate_polynomial(const T* poly, U const& z, std::size_t count) BOOST_MATH_NOEXCEPT(U); namespace detail{ @@ -185,7 +187,7 @@ inline V evaluate_polynomial_c_imp(const T* a, const V& val, const Tag*) BOOST_M // This requires a for-loop which may be more expensive than // the loop expanded versions above: // -template +BOOST_MATH_MODULE_EXPORT template inline U evaluate_polynomial(const T* poly, U const& z, std::size_t count) BOOST_MATH_NOEXCEPT(U) { BOOST_MATH_ASSERT(count > 0); @@ -201,14 +203,14 @@ inline U evaluate_polynomial(const T* poly, U const& z, std::size_t count) BOOST // Compile time sized polynomials, just inline forwarders to the // implementations above: // -template +BOOST_MATH_MODULE_EXPORT template inline V evaluate_polynomial(const T(&a)[N], const V& val) BOOST_MATH_NOEXCEPT(V) { typedef std::integral_constant tag_type; return detail::evaluate_polynomial_c_imp(static_cast(a), val, static_cast(nullptr)); } -template +BOOST_MATH_MODULE_EXPORT template inline V evaluate_polynomial(const std::array& a, const V& val) BOOST_MATH_NOEXCEPT(V) { typedef std::integral_constant tag_type; @@ -217,19 +219,19 @@ inline V evaluate_polynomial(const std::array& a, const V& val) BOOST_MATH_ // // Even polynomials are trivial: just square the argument! // -template +BOOST_MATH_MODULE_EXPORT template inline U evaluate_even_polynomial(const T* poly, U z, std::size_t count) BOOST_MATH_NOEXCEPT(U) { return evaluate_polynomial(poly, U(z*z), count); } -template +BOOST_MATH_MODULE_EXPORT template inline V evaluate_even_polynomial(const T(&a)[N], const V& z) BOOST_MATH_NOEXCEPT(V) { return evaluate_polynomial(a, V(z*z)); } -template +BOOST_MATH_MODULE_EXPORT template inline V evaluate_even_polynomial(const std::array& a, const V& z) BOOST_MATH_NOEXCEPT(V) { return evaluate_polynomial(a, V(z*z)); @@ -237,27 +239,27 @@ inline V evaluate_even_polynomial(const std::array& a, const V& z) BOOST_MA // // Odd polynomials come next: // -template +BOOST_MATH_MODULE_EXPORT template inline U evaluate_odd_polynomial(const T* poly, U z, std::size_t count) BOOST_MATH_NOEXCEPT(U) { return poly[0] + z * evaluate_polynomial(poly+1, U(z*z), count-1); } -template +BOOST_MATH_MODULE_EXPORT template inline V evaluate_odd_polynomial(const T(&a)[N], const V& z) BOOST_MATH_NOEXCEPT(V) { typedef std::integral_constant tag_type; return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a) + 1, V(z*z), static_cast(nullptr)); } -template +BOOST_MATH_MODULE_EXPORT template inline V evaluate_odd_polynomial(const std::array& a, const V& z) BOOST_MATH_NOEXCEPT(V) { typedef std::integral_constant tag_type; return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a.data()) + 1, V(z*z), static_cast(nullptr)); } -template +BOOST_MATH_MODULE_EXPORT template V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count) BOOST_MATH_NOEXCEPT(V); namespace detail{ @@ -277,7 +279,7 @@ inline V evaluate_rational_c_imp(const T* num, const U* denom, const V& z, const // occur in polynomial evaluation, if z is large. This is important // in our Lanczos code for example. // -template +BOOST_MATH_MODULE_EXPORT template V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count) BOOST_MATH_NOEXCEPT(V) { V z(z_); @@ -310,13 +312,13 @@ V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count return s1 / s2; } -template +BOOST_MATH_MODULE_EXPORT template inline V evaluate_rational(const T(&a)[N], const U(&b)[N], const V& z) BOOST_MATH_NOEXCEPT(V) { return detail::evaluate_rational_c_imp(a, b, z, static_cast*>(nullptr)); } -template +BOOST_MATH_MODULE_EXPORT template inline V evaluate_rational(const std::array& a, const std::array& b, const V& z) BOOST_MATH_NOEXCEPT(V) { return detail::evaluate_rational_c_imp(a.data(), b.data(), z, static_cast*>(nullptr)); diff --git a/include/boost/math/tools/roots.hpp b/include/boost/math/tools/roots.hpp index 97e67fae95..6b06bfabfa 100644 --- a/include/boost/math/tools/roots.hpp +++ b/include/boost/math/tools/roots.hpp @@ -11,13 +11,15 @@ #endif #include // test for multiprecision types in complex Newton +#ifndef BOOST_MATH_AS_MODULE #include #include #include #include +#include +#endif #include -#include #include #include @@ -127,7 +129,7 @@ void handle_zero_derivative(F f, } // namespace -template +BOOST_MATH_MODULE_EXPORT template std::pair bisect(F f, T min, T max, Tol tol, std::uintmax_t& max_iter, const Policy& pol) noexcept(policies::is_noexcept_error_policy::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { T fmin = f(min); @@ -199,13 +201,13 @@ std::pair bisect(F f, T min, T max, Tol tol, std::uintmax_t& max_iter, con return std::make_pair(min, max); } -template +BOOST_MATH_MODULE_EXPORT template inline std::pair bisect(F f, T min, T max, Tol tol, std::uintmax_t& max_iter) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { return bisect(f, min, max, tol, max_iter, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline std::pair bisect(F f, T min, T max, Tol tol) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { std::uintmax_t m = (std::numeric_limits::max)(); @@ -213,7 +215,7 @@ inline std::pair bisect(F f, T min, T max, Tol tol) noexcept(policies::is_ } -template +BOOST_MATH_MODULE_EXPORT template T newton_raphson_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { BOOST_MATH_STD_USING @@ -331,7 +333,7 @@ T newton_raphson_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& return result; } -template +BOOST_MATH_MODULE_EXPORT template inline T newton_raphson_iterate(F f, T guess, T min, T max, int digits) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { std::uintmax_t m = (std::numeric_limits::max)(); @@ -717,13 +719,13 @@ namespace detail { } } // T second_order_root_finder -template +BOOST_MATH_MODULE_EXPORT template T halley_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { return detail::second_order_root_finder(f, guess, min, max, digits, max_iter); } -template +BOOST_MATH_MODULE_EXPORT template inline T halley_iterate(F f, T guess, T min, T max, int digits) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { std::uintmax_t m = (std::numeric_limits::max)(); @@ -755,13 +757,13 @@ namespace detail { } -template +BOOST_MATH_MODULE_EXPORT template T schroder_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { return detail::second_order_root_finder(f, guess, min, max, digits, max_iter); } -template +BOOST_MATH_MODULE_EXPORT template inline T schroder_iterate(F f, T guess, T min, T max, int digits) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { std::uintmax_t m = (std::numeric_limits::max)(); @@ -770,13 +772,13 @@ inline T schroder_iterate(F f, T guess, T min, T max, int digits) noexcept(polic // // These two are the old spelling of this function, retained for backwards compatibility just in case: // -template +BOOST_MATH_MODULE_EXPORT template T schroeder_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { return detail::second_order_root_finder(f, guess, min, max, digits, max_iter); } -template +BOOST_MATH_MODULE_EXPORT template inline T schroeder_iterate(F f, T guess, T min, T max, int digits) noexcept(policies::is_noexcept_error_policy >::value&& BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval()(std::declval()))) { std::uintmax_t m = (std::numeric_limits::max)(); @@ -790,7 +792,7 @@ inline T schroeder_iterate(F f, T guess, T min, T max, int digits) noexcept(poli * so this default should recover full precision even in this somewhat pathological case. * For isolated roots, the problem is so rapidly convergent that this doesn't matter at all. */ -template +BOOST_MATH_MODULE_EXPORT template ComplexType complex_newton(F g, ComplexType guess, int max_iterations = std::numeric_limits::digits) { typedef typename ComplexType::value_type Real; @@ -1012,7 +1014,7 @@ std::pair quadratic_roots_imp(T const& a, T const& b, T const& c) } } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template inline std::pair::type, typename tools::promote_args::type> quadratic_roots(T1 const& a, T2 const& b, T3 const& c) { typedef typename tools::promote_args::type value_type; diff --git a/include/boost/math/tools/series.hpp b/include/boost/math/tools/series.hpp index a4822fea43..993cbc587a 100644 --- a/include/boost/math/tools/series.hpp +++ b/include/boost/math/tools/series.hpp @@ -10,9 +10,11 @@ #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include #include #include +#endif #include namespace boost{ namespace math{ namespace tools{ diff --git a/include/boost/math/tools/toms748_solve.hpp b/include/boost/math/tools/toms748_solve.hpp index ea93713224..8f80e05eff 100644 --- a/include/boost/math/tools/toms748_solve.hpp +++ b/include/boost/math/tools/toms748_solve.hpp @@ -14,9 +14,11 @@ #include #include #include +#ifndef BOOST_MATH_AS_MODULE #include #include #include +#endif #ifdef BOOST_MATH_LOG_ROOT_ITERATIONS # define BOOST_MATH_LOGGER_INCLUDE @@ -28,7 +30,7 @@ namespace boost{ namespace math{ namespace tools{ -template +BOOST_MATH_MODULE_EXPORT template class eps_tolerance { public: @@ -50,7 +52,7 @@ class eps_tolerance T eps; }; -struct equal_floor +BOOST_MATH_MODULE_EXPORT struct equal_floor { equal_floor()= default; template @@ -61,7 +63,7 @@ struct equal_floor } }; -struct equal_ceil +BOOST_MATH_MODULE_EXPORT struct equal_ceil { equal_ceil()= default; template @@ -72,7 +74,7 @@ struct equal_ceil } }; -struct equal_nearest_integer +BOOST_MATH_MODULE_EXPORT struct equal_nearest_integer { equal_nearest_integer()= default; template @@ -292,7 +294,7 @@ T cubic_interpolate(const T& a, const T& b, const T& d, } // namespace detail -template +BOOST_MATH_MODULE_EXPORT template std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, std::uintmax_t& max_iter, const Policy& pol) { // @@ -475,13 +477,13 @@ std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const return std::make_pair(a, b); } -template +BOOST_MATH_MODULE_EXPORT template inline std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, std::uintmax_t& max_iter) { return toms748_solve(f, ax, bx, fax, fbx, tol, max_iter, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template inline std::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, std::uintmax_t& max_iter, const Policy& pol) { if (max_iter <= 2) @@ -492,13 +494,13 @@ inline std::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, std return r; } -template +BOOST_MATH_MODULE_EXPORT template inline std::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, std::uintmax_t& max_iter) { return toms748_solve(f, ax, bx, tol, max_iter, policies::policy<>()); } -template +BOOST_MATH_MODULE_EXPORT template std::pair bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, std::uintmax_t& max_iter, const Policy& pol) { BOOST_MATH_STD_USING @@ -607,7 +609,7 @@ std::pair bracket_and_solve_root(F f, const T& guess, T factor, bool risin return r; } -template +BOOST_MATH_MODULE_EXPORT template inline std::pair bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, std::uintmax_t& max_iter) { return bracket_and_solve_root(f, guess, factor, rising, tol, max_iter, policies::policy<>()); diff --git a/include/boost/math/tools/traits.hpp b/include/boost/math/tools/traits.hpp index 46bb9cddd4..ca2b8dcdc0 100644 --- a/include/boost/math/tools/traits.hpp +++ b/include/boost/math/tools/traits.hpp @@ -25,7 +25,9 @@ as defined above, and has member functions "scale" and "location". #pragma once #endif +#ifndef BOOST_MATH_AS_MODULE #include +#endif namespace boost{ namespace math{ namespace tools{ diff --git a/module/constants.cxx b/module/constants.cxx new file mode 100644 index 0000000000..5b7ca68eee --- /dev/null +++ b/module/constants.cxx @@ -0,0 +1,30 @@ +// (C) Copyright John Maddock 2022. +// 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) + +module; + +#define BOOST_MATH_CONSTANTS_AS_MODULE +#define BOOST_MATH_AS_MODULE +#define BOOST_MATH_STANDALONE + +// For config: +#include // for min and max +#include +#include +#include +#include +#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) +# include +#endif +#include +#include +#include +#include + +export module boost.math.constants; + +import boost.math.core; + +#include diff --git a/module/core.cxx b/module/core.cxx new file mode 100644 index 0000000000..faa9cf662d --- /dev/null +++ b/module/core.cxx @@ -0,0 +1,95 @@ +// (C) Copyright John Maddock 2022. +// 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) + +module; + +#define BOOST_MATH_POLICIES_AS_MODULE +#define BOOST_MATH_AS_MODULE +#define BOOST_MATH_STANDALONE + +// For config: +#include // for min and max +#include +#include +#include +#include +#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) +# include +#endif +#include +#include + +// For error_handling.hpp and policies.hpp: +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // LDBL_MANT_DIG + +// for fptraits.hpp: +#if (__cplusplus >= 202002L || _MSVC_LANG >= 202002L) +#if __has_include() +#include +#endif +#endif + +// for fpclassify.hpp: +#include +#ifdef BOOST_MATH_USE_FLOAT128 +#ifdef __has_include +#if __has_include("quadmath.h") +#include "quadmath.h" +#define BOOST_MATH_HAS_QUADMATH_H +#endif +#endif +#endif + +// for next.hpp: +#if !defined(_CRAYC) && !defined(__CUDACC__) && (!defined(__GNUC__) || (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3))) +#if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__SSE2__) +#include "xmmintrin.h" +#define BOOST_MATH_CHECK_SSE2 +#endif +#endif + +// for roots: +#include + +// for rational.hpp: +#include + + + +export module boost.math.core; + +#pragma warning(disable:5244) + +#include +#include +#include +#include // for argument promotion. +#include +#include +#include +#include +#include +#include +#include diff --git a/module/math.cxx b/module/math.cxx new file mode 100644 index 0000000000..1eb1078c35 --- /dev/null +++ b/module/math.cxx @@ -0,0 +1,10 @@ +// (C) Copyright John Maddock 2022. +// 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) + + +export module boost.math; + +export import boost.math.core; +export import boost.math.constants; diff --git a/module/sf.cxx b/module/sf.cxx new file mode 100644 index 0000000000..4b1d5c04fa --- /dev/null +++ b/module/sf.cxx @@ -0,0 +1,211 @@ +// (C) Copyright John Maddock 2022. +// (C) Copyright Matt Borland 2024. +// 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) + +module; + +#define BOOST_MATH_SF_AS_MODULE +#define BOOST_MATH_AS_MODULE +#define BOOST_MATH_STANDALONE + +#if defined(__cpp_lib_modules) && __cpp_lib_modules >= 202207L + +import std; +import std.compat; + +#else + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +#include + + +export module boost.math.special_functions; + +import boost.math.core; +import boost.math.constants; + +// +// Forward declarations in math_fwd.hpp are not available, so forward declare what we need to first: +// +export namespace boost::math { + + template + struct max_factorial; + template + RT factorial(unsigned int); + template + RT factorial(unsigned int, const Policy& pol); + template + RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); + template + RT double_factorial(unsigned i); + template + RT double_factorial(unsigned i, const Policy& pol); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol); + + template + typename tools::promote_args::type rising_factorial(RT x, int n); + + template + typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol); + + // Gamma functions. + template + typename tools::promote_args::type tgamma(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z, const Policy& pol); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT z, int* sign); + + template + typename tools::promote_args::type lgamma(RT z, int* sign, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT x); + + template + typename tools::promote_args::type lgamma(RT x, const Policy& pol); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_p(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&); + + // gamma inverse. + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q, const Policy&); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q, const Policy&); + + // digamma: + template + typename tools::promote_args::type digamma(T x); + + template + typename tools::promote_args::type digamma(T x, const Policy&); + + // trigamma: + template + typename tools::promote_args::type trigamma(T x); + + template + typename tools::promote_args::type trigamma(T x, const Policy&); + + // polygamma: + template + typename tools::promote_args::type polygamma(int n, T x); + + template + typename tools::promote_args::type polygamma(int n, T x, const Policy&); + + // erf & erfc error functions. + template // Error function. + typename tools::promote_args::type erf(RT z); + template // Error function. + typename tools::promote_args::type erf(RT z, const Policy&); + + template // Error function complement. + typename tools::promote_args::type erfc(RT z); + template // Error function complement. + typename tools::promote_args::type erfc(RT z, const Policy&); + + template // Error function inverse. + typename tools::promote_args::type erf_inv(RT z); + template // Error function inverse. + typename tools::promote_args::type erf_inv(RT z, const Policy& pol); + + template // Error function complement inverse. + typename tools::promote_args::type erfc_inv(RT z); + template // Error function complement inverse. + typename tools::promote_args::type erfc_inv(RT z, const Policy& pol); + + // Zeta: + template + typename tools::promote_args::type zeta(T s, const Policy&); +} + +#include +#include +#include +#include +#include +#include +#include diff --git a/test/modules/Jamfile.v2 b/test/modules/Jamfile.v2 new file mode 100644 index 0000000000..986e5aeff2 --- /dev/null +++ b/test/modules/Jamfile.v2 @@ -0,0 +1,36 @@ +# Copyright Daryle Walker, Hubert Holin, John Maddock 2006 - 2007 +# copyright Paul A. Bristow 2006 - 2010 +# 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. +# \math_toolkit\libs\math\test\jamfile.v2 +# Runs all math toolkit tests, functions & distributions, +# and build math examples. + +# bring in the rules for testing +import testing ; +import modules ; +import path ; +import pch ; +import ../../config/checks/config : requires ; + + +project + : requirements + msvc:all + msvc:on + ../../../.. + msvc:latest + gcc:-fmodules-ts + gcc:23 + ; + +obj core : ../../module/core.cxx : msvc:-interface ; +obj constants : ../../module/constants.cxx core : msvc:-interface core ; +obj special_functions : ../../module/sf.cxx constants core : msvc:-interface core constants ; + +run test_policy.cpp core : : : core ; +run test_core.cpp core : : : core ; +run test_constants.cpp constants core : : : constants ; +run test_sf.cpp special_functions constants core : : : special_functions ; + diff --git a/test/modules/sf_pp.cxx b/test/modules/sf_pp.cxx new file mode 100644 index 0000000000..ef63be2992 --- /dev/null +++ b/test/modules/sf_pp.cxx @@ -0,0 +1,87589 @@ +# 0 "../../module/sf.cxx" +# 0 "" +# 0 "" +# 1 "../../module/sf.cxx" + + + + + +module ; + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 1 3 +# 278 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 + +# 278 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 +namespace std +{ + typedef long long unsigned int size_t; + typedef long long int ptrdiff_t; + + + typedef decltype(nullptr) nullptr_t; + +} +# 300 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 +namespace std +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +namespace __gnu_cxx +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +# 586 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/os_defines.h" 1 3 +# 587 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/cpu_defines.h" 1 3 +# 590 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 2 3 +# 777 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/pstl_config.h" 1 3 +# 778 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 2 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 + +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 +extern "C++" { + +namespace std +{ + + + struct __true_type { }; + struct __false_type { }; + + template + struct __truth_type + { typedef __false_type __type; }; + + template<> + struct __truth_type + { typedef __true_type __type; }; + + + + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + + + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; +# 287 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + + + + + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + + + + + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + enum class byte : unsigned char; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template struct iterator_traits; + + + template + struct __is_nonvolatile_trivially_copyable + { + enum { __value = __is_trivially_copyable(_Tp) }; + }; + + + + + template + struct __is_nonvolatile_trivially_copyable + { + enum { __value = 0 }; + }; + + + template + struct __memcpyable + { + enum { __value = 0 }; + }; + + template + struct __memcpyable<_Tp*, _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcpyable<_Tp*, const _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + + + + + + template + struct __memcmpable + { + enum { __value = 0 }; + }; + + + template + struct __memcmpable<_Tp*, _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcmpable + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcmpable<_Tp*, const _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + + + + + + + template::__value + + > + struct __is_memcmp_ordered + { + static const bool __value = _Tp(-1) > _Tp(1); + }; + + template + struct __is_memcmp_ordered<_Tp, false> + { + static const bool __value = false; + }; + + + template + struct __is_memcmp_ordered_with + { + static const bool __value = __is_memcmp_ordered<_Tp>::__value + && __is_memcmp_ordered<_Up>::__value; + }; + + template + struct __is_memcmp_ordered_with<_Tp, _Up, false> + { + static const bool __value = false; + }; +# 532 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 + template<> + struct __is_memcmp_ordered_with + { static constexpr bool __value = true; }; + + template + struct __is_memcmp_ordered_with<_Tp, std::byte, _SameSize> + { static constexpr bool __value = false; }; + + template + struct __is_memcmp_ordered_with + { static constexpr bool __value = false; }; + + + + + + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + template + constexpr + inline _Iterator + __miter_base(_Iterator __it) + { return __it; } + + +} +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/type_traits.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/type_traits.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/type_traits.h" 3 + + + + +extern "C++" { + +namespace __gnu_cxx +{ + + + + template + struct __enable_if + { }; + + template + struct __enable_if + { typedef _Tp __type; }; + + + + template + struct __conditional_type + { typedef _Iftrue __type; }; + + template + struct __conditional_type + { typedef _Iffalse __type; }; + + + + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + + + template<> + struct __add_unsigned; + + template<> + struct __add_unsigned; + + + + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef short __type; }; + + template<> + struct __remove_unsigned + { typedef int __type; }; + + template<> + struct __remove_unsigned + { typedef long __type; }; + + template<> + struct __remove_unsigned + { typedef long long __type; }; + + + template<> + struct __remove_unsigned; + + template<> + struct __remove_unsigned; + + + + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + + template + inline bool + __is_null_pointer(_Type) + { return false; } + + + inline bool + __is_null_pointer(std::nullptr_t) + { return true; } + + + + template::__value> + struct __promote + { typedef double __type; }; + + + + + template + struct __promote<_Tp, false> + { }; + + template<> + struct __promote + { typedef long double __type; }; + + template<> + struct __promote + { typedef double __type; }; + + template<> + struct __promote + { typedef float __type; }; + + template::__type, + typename _Up2 = typename __promote<_Up>::__type> + struct __promote_2 + { + typedef __typeof__(_Tp2() + _Up2()) __type; + }; + + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type> + struct __promote_3 + { + typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; + }; + + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type, + typename _Wp2 = typename __promote<_Wp>::__type> + struct __promote_4 + { + typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; + }; + + +} +} +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h" 1 3 +# 98 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h" 3 + +# 107 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h" 3 + +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_secapi.h" 1 3 +# 44 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_secapi.h" 3 +extern "C++" { +template + struct __if_array; +template + struct __if_array { + typedef __dsttype __type; +}; +} +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 2 3 +# 287 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h" 1 3 +# 9 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 1 3 +# 621 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sdks/_mingw_ddk.h" 1 3 +# 622 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 2 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h" 2 3 + + + + +#pragma pack(push,_CRT_PACKING) + + + +extern "C" { + + + + + + typedef __builtin_va_list __gnuc_va_list; + + + + + + + typedef __gnuc_va_list va_list; +# 99 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h" 3 +} + + + +#pragma pack(pop) +# 288 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 2 3 +# 573 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +extern "C" { +# 584 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +void __attribute__((__cdecl__)) __debugbreak(void); +extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) void __attribute__((__cdecl__)) __debugbreak(void) +{ + + __asm__ __volatile__("int {$}3":); + + + + + + + +} + + + + +const char *__mingw_get_crt_info (void); + + +} +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 2 3 + + + + +#pragma pack(push,_CRT_PACKING) +# 35 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef unsigned long long size_t; +# 45 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef long long ssize_t; + + + + + + +typedef size_t rsize_t; +# 62 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef long long intptr_t; +# 75 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef unsigned long long uintptr_t; +# 88 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef long long ptrdiff_t; +# 106 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +typedef unsigned short wint_t; +typedef unsigned short wctype_t; + + + + + +typedef int errno_t; + + + + +typedef long __time32_t; + + + + +__extension__ typedef long long __time64_t; +# 138 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +typedef __time64_t time_t; +# 430 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +struct threadlocaleinfostruct; +struct threadmbcinfostruct; +typedef struct threadlocaleinfostruct *pthreadlocinfo; +typedef struct threadmbcinfostruct *pthreadmbcinfo; +struct __lc_time_data; + +typedef struct localeinfo_struct { + pthreadlocinfo locinfo; + pthreadmbcinfo mbcinfo; +} _locale_tstruct,*_locale_t; + + + +typedef struct tagLC_ID { + unsigned short wLanguage; + unsigned short wCountry; + unsigned short wCodePage; +} LC_ID,*LPLC_ID; + + + + +typedef struct threadlocaleinfostruct { + + + + + + int refcount; + unsigned int lc_codepage; + unsigned int lc_collate_cp; + unsigned long lc_handle[6]; + LC_ID lc_id[6]; + struct { + char *locale; + wchar_t *wlocale; + int *refcount; + int *wrefcount; + } lc_category[6]; + int lc_clike; + int mb_cur_max; + int *lconv_intl_refcount; + int *lconv_num_refcount; + int *lconv_mon_refcount; + struct lconv *lconv; + int *ctype1_refcount; + unsigned short *ctype1; + const unsigned short *pctype; + const unsigned char *pclmap; + const unsigned char *pcumap; + struct __lc_time_data *lc_time_curr; + +} threadlocinfo; +# 501 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +#pragma pack(pop) +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h" 2 3 +# 14 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 2 3 + +struct _exception; + +#pragma pack(push,_CRT_PACKING) +# 77 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 +extern "C++" { +template struct __mingw_types_compatible_p { + static const bool result = false; +}; + +template struct __mingw_types_compatible_p { + static const bool result = true; +}; + +template struct __mingw_types_compatible_p { + static const bool result = true; +}; + +template struct __mingw_types_compatible_p { + static const bool result = true; +}; +} +# 111 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 +extern "C" { + + + + + + + + typedef union __mingw_dbl_type_t { + double x; + unsigned long long val; + __extension__ struct { + unsigned int low, high; + } lh; + } __mingw_dbl_type_t; + + typedef union __mingw_flt_type_t { + float x; + unsigned int val; + } __mingw_flt_type_t; + + typedef union __mingw_ldbl_type_t + { + long double x; + __extension__ struct { + unsigned int low, high; + int sign_exponent : 16; + int res1 : 16; + int res0 : 32; + } lh; + } __mingw_ldbl_type_t; +# 150 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern double * __imp__HUGE; +# 163 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + struct _exception { + int type; + const char *name; + double arg1; + double arg2; + double retval; + }; + + void __mingw_raise_matherr (int typ, const char *name, double a1, double a2, + double rslt); + void __mingw_setusermatherr (int (__attribute__((__cdecl__)) *)(struct _exception *)); + __attribute__ ((__dllimport__)) void __setusermatherr(int (__attribute__((__cdecl__)) *)(struct _exception *)); + + + + double __attribute__((__cdecl__)) sin(double _X); + double __attribute__((__cdecl__)) cos(double _X); + double __attribute__((__cdecl__)) tan(double _X); + double __attribute__((__cdecl__)) sinh(double _X); + double __attribute__((__cdecl__)) cosh(double _X); + double __attribute__((__cdecl__)) tanh(double _X); + double __attribute__((__cdecl__)) asin(double _X); + double __attribute__((__cdecl__)) acos(double _X); + double __attribute__((__cdecl__)) atan(double _X); + double __attribute__((__cdecl__)) atan2(double _Y,double _X); + double __attribute__((__cdecl__)) exp(double _X); + double __attribute__((__cdecl__)) log(double _X); + double __attribute__((__cdecl__)) log10(double _X); + double __attribute__((__cdecl__)) pow(double _X,double _Y); + double __attribute__((__cdecl__)) sqrt(double _X); + double __attribute__((__cdecl__)) ceil(double _X); + double __attribute__((__cdecl__)) floor(double _X); + + + extern float __attribute__((__cdecl__)) fabsf (float x); + extern long double __attribute__((__cdecl__)) fabsl (long double); + extern double __attribute__((__cdecl__)) fabs (double _X); +# 238 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + double __attribute__((__cdecl__)) ldexp(double _X,int _Y); + double __attribute__((__cdecl__)) frexp(double _X,int *_Y); + double __attribute__((__cdecl__)) modf(double _X,double *_Y); + double __attribute__((__cdecl__)) fmod(double _X,double _Y); + + void __attribute__((__cdecl__)) sincos (double __x, double *p_sin, double *p_cos); + void __attribute__((__cdecl__)) sincosl (long double __x, long double *p_sin, long double *p_cos); + void __attribute__((__cdecl__)) sincosf (float __x, float *p_sin, float *p_cos); + + + + int __attribute__((__cdecl__)) abs(int _X); + long __attribute__((__cdecl__)) labs(long _X); + + + + double __attribute__((__cdecl__)) atof(const char *_String); + double __attribute__((__cdecl__)) _atof_l(const char *_String,_locale_t _Locale); +# 367 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 +typedef float float_t; +typedef double double_t; +# 402 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern int __attribute__((__cdecl__)) __fpclassifyl (long double); + extern int __attribute__((__cdecl__)) __fpclassifyf (float); + extern int __attribute__((__cdecl__)) __fpclassify (double); +# 515 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern int __attribute__((__cdecl__)) __isnan (double); + extern int __attribute__((__cdecl__)) __isnanf (float); + extern int __attribute__((__cdecl__)) __isnanl (long double); +# 602 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern int __attribute__((__cdecl__)) __signbit (double); + extern int __attribute__((__cdecl__)) __signbitf (float); + extern int __attribute__((__cdecl__)) __signbitl (long double); +# 659 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern float __attribute__((__cdecl__)) sinf(float _X); + extern long double __attribute__((__cdecl__)) sinl(long double); + + extern float __attribute__((__cdecl__)) cosf(float _X); + extern long double __attribute__((__cdecl__)) cosl(long double); + + extern float __attribute__((__cdecl__)) tanf(float _X); + extern long double __attribute__((__cdecl__)) tanl(long double); + extern float __attribute__((__cdecl__)) asinf(float _X); + extern long double __attribute__((__cdecl__)) asinl(long double); + + extern float __attribute__((__cdecl__)) acosf (float); + extern long double __attribute__((__cdecl__)) acosl (long double); + + extern float __attribute__((__cdecl__)) atanf (float); + extern long double __attribute__((__cdecl__)) atanl (long double); + + extern float __attribute__((__cdecl__)) atan2f (float, float); + extern long double __attribute__((__cdecl__)) atan2l (long double, long double); + + + extern float __attribute__((__cdecl__)) sinhf(float _X); + + + + extern long double __attribute__((__cdecl__)) sinhl(long double); + + extern float __attribute__((__cdecl__)) coshf(float _X); + + + + extern long double __attribute__((__cdecl__)) coshl(long double); + + extern float __attribute__((__cdecl__)) tanhf(float _X); + + + + extern long double __attribute__((__cdecl__)) tanhl(long double); + + + + extern double __attribute__((__cdecl__)) acosh (double); + extern float __attribute__((__cdecl__)) acoshf (float); + extern long double __attribute__((__cdecl__)) acoshl (long double); + + + extern double __attribute__((__cdecl__)) asinh (double); + extern float __attribute__((__cdecl__)) asinhf (float); + extern long double __attribute__((__cdecl__)) asinhl (long double); + + + extern double __attribute__((__cdecl__)) atanh (double); + extern float __attribute__((__cdecl__)) atanhf (float); + extern long double __attribute__((__cdecl__)) atanhl (long double); + + + + extern float __attribute__((__cdecl__)) expf(float _X); + + + + extern long double __attribute__((__cdecl__)) expl(long double); + + + extern double __attribute__((__cdecl__)) exp2(double); + extern float __attribute__((__cdecl__)) exp2f(float); + extern long double __attribute__((__cdecl__)) exp2l(long double); + + + + extern double __attribute__((__cdecl__)) expm1(double); + extern float __attribute__((__cdecl__)) expm1f(float); + extern long double __attribute__((__cdecl__)) expm1l(long double); + + + extern float frexpf(float _X,int *_Y); + + + + extern long double __attribute__((__cdecl__)) frexpl(long double,int *); + + + + + extern int __attribute__((__cdecl__)) ilogb (double); + extern int __attribute__((__cdecl__)) ilogbf (float); + extern int __attribute__((__cdecl__)) ilogbl (long double); + + + extern float __attribute__((__cdecl__)) ldexpf(float _X,int _Y); + + + + extern long double __attribute__((__cdecl__)) ldexpl (long double, int); + + + extern float __attribute__((__cdecl__)) logf (float); + extern long double __attribute__((__cdecl__)) logl(long double); + + + extern float __attribute__((__cdecl__)) log10f (float); + extern long double __attribute__((__cdecl__)) log10l(long double); + + + extern double __attribute__((__cdecl__)) log1p(double); + extern float __attribute__((__cdecl__)) log1pf(float); + extern long double __attribute__((__cdecl__)) log1pl(long double); + + + extern double __attribute__((__cdecl__)) log2 (double); + extern float __attribute__((__cdecl__)) log2f (float); + extern long double __attribute__((__cdecl__)) log2l (long double); + + + extern double __attribute__((__cdecl__)) logb (double); + extern float __attribute__((__cdecl__)) logbf (float); + extern long double __attribute__((__cdecl__)) logbl (long double); +# 862 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern float __attribute__((__cdecl__)) modff (float, float*); + extern long double __attribute__((__cdecl__)) modfl (long double, long double*); + + + extern double __attribute__((__cdecl__)) scalbn (double, int); + extern float __attribute__((__cdecl__)) scalbnf (float, int); + extern long double __attribute__((__cdecl__)) scalbnl (long double, int); + + extern double __attribute__((__cdecl__)) scalbln (double, long); + extern float __attribute__((__cdecl__)) scalblnf (float, long); + extern long double __attribute__((__cdecl__)) scalblnl (long double, long); + + + + extern double __attribute__((__cdecl__)) cbrt (double); + extern float __attribute__((__cdecl__)) cbrtf (float); + extern long double __attribute__((__cdecl__)) cbrtl (long double); + + + extern double __attribute__((__cdecl__)) hypot (double, double) ; + extern float __attribute__((__cdecl__)) hypotf (float x, float y); + + + + extern long double __attribute__((__cdecl__)) hypotl (long double, long double); + + + extern float __attribute__((__cdecl__)) powf(float _X,float _Y); + + + + extern long double __attribute__((__cdecl__)) powl (long double, long double); + + + extern float __attribute__((__cdecl__)) sqrtf (float); + extern long double sqrtl(long double); + + + extern double __attribute__((__cdecl__)) erf (double); + extern float __attribute__((__cdecl__)) erff (float); + extern long double __attribute__((__cdecl__)) erfl (long double); + + + extern double __attribute__((__cdecl__)) erfc (double); + extern float __attribute__((__cdecl__)) erfcf (float); + extern long double __attribute__((__cdecl__)) erfcl (long double); + + + extern double __attribute__((__cdecl__)) lgamma (double); + extern float __attribute__((__cdecl__)) lgammaf (float); + extern long double __attribute__((__cdecl__)) lgammal (long double); + + extern int signgam; + + + extern double __attribute__((__cdecl__)) tgamma (double); + extern float __attribute__((__cdecl__)) tgammaf (float); + extern long double __attribute__((__cdecl__)) tgammal (long double); + + + extern float __attribute__((__cdecl__)) ceilf (float); + extern long double __attribute__((__cdecl__)) ceill (long double); + + + extern float __attribute__((__cdecl__)) floorf (float); + extern long double __attribute__((__cdecl__)) floorl (long double); + + + extern double __attribute__((__cdecl__)) nearbyint ( double); + extern float __attribute__((__cdecl__)) nearbyintf (float); + extern long double __attribute__((__cdecl__)) nearbyintl (long double); + + + +extern double __attribute__((__cdecl__)) rint (double); +extern float __attribute__((__cdecl__)) rintf (float); +extern long double __attribute__((__cdecl__)) rintl (long double); + + +extern long __attribute__((__cdecl__)) lrint (double); +extern long __attribute__((__cdecl__)) lrintf (float); +extern long __attribute__((__cdecl__)) lrintl (long double); + +__extension__ long long __attribute__((__cdecl__)) llrint (double); +__extension__ long long __attribute__((__cdecl__)) llrintf (float); +__extension__ long long __attribute__((__cdecl__)) llrintl (long double); +# 1029 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern double __attribute__((__cdecl__)) round (double); + extern float __attribute__((__cdecl__)) roundf (float); + extern long double __attribute__((__cdecl__)) roundl (long double); + + + extern long __attribute__((__cdecl__)) lround (double); + extern long __attribute__((__cdecl__)) lroundf (float); + extern long __attribute__((__cdecl__)) lroundl (long double); + __extension__ long long __attribute__((__cdecl__)) llround (double); + __extension__ long long __attribute__((__cdecl__)) llroundf (float); + __extension__ long long __attribute__((__cdecl__)) llroundl (long double); + + + + extern double __attribute__((__cdecl__)) trunc (double); + extern float __attribute__((__cdecl__)) truncf (float); + extern long double __attribute__((__cdecl__)) truncl (long double); + + + extern float __attribute__((__cdecl__)) fmodf (float, float); + extern long double __attribute__((__cdecl__)) fmodl (long double, long double); + + + extern double __attribute__((__cdecl__)) remainder (double, double); + extern float __attribute__((__cdecl__)) remainderf (float, float); + extern long double __attribute__((__cdecl__)) remainderl (long double, long double); + + + extern double __attribute__((__cdecl__)) remquo(double, double, int *); + extern float __attribute__((__cdecl__)) remquof(float, float, int *); + extern long double __attribute__((__cdecl__)) remquol(long double, long double, int *); + + + extern double __attribute__((__cdecl__)) copysign (double, double); + extern float __attribute__((__cdecl__)) copysignf (float, float); + extern long double __attribute__((__cdecl__)) copysignl (long double, long double); +# 1086 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern double __attribute__((__cdecl__)) nan(const char *tagp); + extern float __attribute__((__cdecl__)) nanf(const char *tagp); + extern long double __attribute__((__cdecl__)) nanl(const char *tagp); +# 1097 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern double __attribute__((__cdecl__)) nextafter (double, double); + extern float __attribute__((__cdecl__)) nextafterf (float, float); + extern long double __attribute__((__cdecl__)) nextafterl (long double, long double); + + + extern double __attribute__((__cdecl__)) nexttoward (double, long double); + extern float __attribute__((__cdecl__)) nexttowardf (float, long double); + extern long double __attribute__((__cdecl__)) nexttowardl (long double, long double); + + + + extern double __attribute__((__cdecl__)) fdim (double x, double y); + extern float __attribute__((__cdecl__)) fdimf (float x, float y); + extern long double __attribute__((__cdecl__)) fdiml (long double x, long double y); + + + + + + + + extern double __attribute__((__cdecl__)) fmax (double, double); + extern float __attribute__((__cdecl__)) fmaxf (float, float); + extern long double __attribute__((__cdecl__)) fmaxl (long double, long double); + + + extern double __attribute__((__cdecl__)) fmin (double, double); + extern float __attribute__((__cdecl__)) fminf (float, float); + extern long double __attribute__((__cdecl__)) fminl (long double, long double); + + + + extern double __attribute__((__cdecl__)) fma (double, double, double); + extern float __attribute__((__cdecl__)) fmaf (float, float, float); + extern long double __attribute__((__cdecl__)) fmal (long double, long double, long double); +# 1180 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _copysignf (float _Number,float _Sign); + __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _chgsignf (float _X); + __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _logbf(float _X); + __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _nextafterf(float _X,float _Y); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _finitef(float _X); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isnanf(float _X); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fpclassf(float _X); +# 1575 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 +} + + + + +#pragma pack(pop) +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 3 + + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_wstdlib.h" 1 3 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_wstdlib.h" 3 +extern "C" { + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _itow_s(int _Val, wchar_t (&_DstBuf)[__size], int _Radix) { return _itow_s(_Val, _DstBuf, __size, _Radix); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _ltow_s(long _Val, wchar_t (&_DstBuf)[__size], int _Radix) { return _ltow_s(_Val, _DstBuf, __size, _Radix); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _ultow_s(unsigned long _Val, wchar_t (&_DstBuf)[__size], int _Radix) { return _ultow_s(_Val, _DstBuf, __size, _Radix); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wgetenv_s(size_t* _ReturnSize, wchar_t (&_DstBuf)[__size], const wchar_t* _VarName) { return _wgetenv_s(_ReturnSize, _DstBuf, __size, _VarName); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _i64tow_s(long long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ui64tow_s(unsigned long long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wmakepath_s(wchar_t (&_PathResult)[__size], const wchar_t* _Drive, const wchar_t* _Dir, const wchar_t* _Filename, const wchar_t* _Ext) { return _wmakepath_s(_PathResult,__size,_Drive,_Dir,_Filename,_Ext); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wputenv_s(const wchar_t *_Name,const wchar_t *_Value); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wsearchenv_s(const wchar_t* _Filename, const wchar_t* _EnvVar, wchar_t (&_ResultPath)[__size]) { return _wsearchenv_s(_Filename, _EnvVar, _ResultPath, __size); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wsplitpath_s(const wchar_t *_Dest, wchar_t (&__drive)[__drive_size], wchar_t (&__dir)[__dir_size], wchar_t (&__name)[__name_size], wchar_t (&__ext)[__ext_size]) { return _wsplitpath_s(_Dest, __drive, __drive_size, __dir, __dir_size, __name, __name_size, __ext, __ext_size); } } + + +} +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 1 3 4 +# 34 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/syslimits.h" 1 3 4 + + + + + + +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 1 3 4 +# 203 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/limits.h" 1 3 4 +# 204 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 2 3 4 +# 8 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/syslimits.h" 2 3 4 +# 35 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 2 3 4 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 2 3 +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 50 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + typedef int (__attribute__((__cdecl__)) *_onexit_t)(void); +# 60 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + typedef struct _div_t { + int quot; + int rem; + } div_t; + + typedef struct _ldiv_t { + long quot; + long rem; + } ldiv_t; + + + + + +#pragma pack(4) + typedef struct { + unsigned char ld[10]; + } _LDOUBLE; +#pragma pack() + + + + typedef struct { + double x; + } _CRT_DOUBLE; + + typedef struct { + float f; + } _CRT_FLOAT; + + + + + typedef struct { + long double x; + } _LONGDOUBLE; + + + +#pragma pack(4) + typedef struct { + unsigned char ld12[12]; + } _LDBL12; +#pragma pack() +# 116 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + extern int * __imp___mb_cur_max; + + + + +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) ___mb_cur_max_func(void); +# 143 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + typedef void (__attribute__((__cdecl__)) *_purecall_handler)(void); + + __attribute__ ((__dllimport__)) _purecall_handler __attribute__((__cdecl__)) _set_purecall_handler(_purecall_handler _Handler); + __attribute__ ((__dllimport__)) _purecall_handler __attribute__((__cdecl__)) _get_purecall_handler(void); + + typedef void (__attribute__((__cdecl__)) *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t); + __attribute__ ((__dllimport__)) _invalid_parameter_handler __attribute__((__cdecl__)) _set_invalid_parameter_handler(_invalid_parameter_handler _Handler); + __attribute__ ((__dllimport__)) _invalid_parameter_handler __attribute__((__cdecl__)) _get_invalid_parameter_handler(void); + + + + __attribute__ ((__dllimport__)) extern int *__attribute__((__cdecl__)) _errno(void); + + errno_t __attribute__((__cdecl__)) _set_errno(int _Value); + errno_t __attribute__((__cdecl__)) _get_errno(int *_Value); + + __attribute__ ((__dllimport__)) unsigned long *__attribute__((__cdecl__)) __doserrno(void); + + errno_t __attribute__((__cdecl__)) _set_doserrno(unsigned long _Value); + errno_t __attribute__((__cdecl__)) _get_doserrno(unsigned long *_Value); +# 173 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + extern __attribute__((dllimport)) char *_sys_errlist[1]; + extern __attribute__((dllimport)) int _sys_nerr; + + + + + + __attribute__ ((__dllimport__)) char ***__attribute__((__cdecl__)) __p___argv(void); + __attribute__ ((__dllimport__)) int *__attribute__((__cdecl__)) __p__fmode(void); +# 191 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + errno_t __attribute__((__cdecl__)) _get_pgmptr(char **_Value); + errno_t __attribute__((__cdecl__)) _get_wpgmptr(wchar_t **_Value); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _set_fmode(int _Mode); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_fmode(int *_PMode); +# 282 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + extern int * __imp___argc; + + + + extern char *** __imp___argv; + + + + extern wchar_t *** __imp___wargv; +# 322 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + extern char *** __imp__environ; + + + + + extern wchar_t *** __imp__wenviron; + + + + + + + extern char ** __imp__pgmptr; + + + + + extern wchar_t ** __imp__wpgmptr; + + + + + extern unsigned int * __imp__osplatform; + + + + + extern unsigned int * __imp__osver; + + + + + extern unsigned int * __imp__winver; + + + + + extern unsigned int * __imp__winmajor; + + + + + extern unsigned int * __imp__winminor; + + + + + + errno_t __attribute__((__cdecl__)) _get_osplatform(unsigned int *_Value); + errno_t __attribute__((__cdecl__)) _get_osver(unsigned int *_Value); + errno_t __attribute__((__cdecl__)) _get_winver(unsigned int *_Value); + errno_t __attribute__((__cdecl__)) _get_winmajor(unsigned int *_Value); + errno_t __attribute__((__cdecl__)) _get_winminor(unsigned int *_Value); + + + + + extern "C++" { + template char (*__countof_helper( _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray]; + + } + + + + + + void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) exit(int _Code) __attribute__ ((__noreturn__)); + void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _exit(int _Code) __attribute__ ((__noreturn__)); + + + + + + + void __attribute__((__cdecl__)) _Exit(int) __attribute__ ((__noreturn__)); + + + + + + + + + void __attribute__((__cdecl__)) __attribute__ ((__noreturn__)) abort(void); + + + + + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _set_abort_behavior(unsigned int _Flags,unsigned int _Mask); + + + + + + + + __extension__ long long __attribute__((__cdecl__)) _abs64(long long); + + extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) long long __attribute__((__cdecl__)) _abs64(long long x) { + return __builtin_llabs(x); + } + + + int __attribute__((__cdecl__)) atexit(void (__attribute__((__cdecl__)) *)(void)); +# 434 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + int __attribute__((__cdecl__)) atoi(const char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoi_l(const char *_Str,_locale_t _Locale); + long __attribute__((__cdecl__)) atol(const char *_Str); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _atol_l(const char *_Str,_locale_t _Locale); + + + void *__attribute__((__cdecl__)) bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(const void *,const void *)); + void __attribute__((__cdecl__)) qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(const void *,const void *)); + + unsigned short __attribute__((__cdecl__)) _byteswap_ushort(unsigned short _Short); + unsigned long __attribute__((__cdecl__)) _byteswap_ulong (unsigned long _Long); + __extension__ unsigned long long __attribute__((__cdecl__)) _byteswap_uint64(unsigned long long _Int64); + div_t __attribute__((__cdecl__)) div(int _Numerator,int _Denominator); + char *__attribute__((__cdecl__)) getenv(const char *_VarName) ; + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _itoa(int _Value,char *_Dest,int _Radix); + __extension__ __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _i64toa(long long _Val,char *_DstBuf,int _Radix) ; + __extension__ __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ui64toa(unsigned long long _Val,char *_DstBuf,int _Radix) ; + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _atoi64(const char *_String); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _atoi64_l(const char *_String,_locale_t _Locale); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _strtoi64(const char *_String,char **_EndPtr,int _Radix); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale); + __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _strtoui64(const char *_String,char **_EndPtr,int _Radix); + __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale); + ldiv_t __attribute__((__cdecl__)) ldiv(long _Numerator,long _Denominator); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ltoa(long _Value,char *_Dest,int _Radix) ; + int __attribute__((__cdecl__)) mblen(const char *_Ch,size_t _MaxCount); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrlen(const char *_Str); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrlen_l(const char *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrnlen(const char *_Str,size_t _MaxCount); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale); + int __attribute__((__cdecl__)) mbtowc(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SrcSizeInBytes); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _mbtowc_l(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale); + size_t __attribute__((__cdecl__)) mbstowcs(wchar_t * __restrict__ _Dest,const char * __restrict__ _Source,size_t _MaxCount); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstowcs_l(wchar_t * __restrict__ _Dest,const char * __restrict__ _Source,size_t _MaxCount,_locale_t _Locale); + int __attribute__((__cdecl__)) mkstemp(char *template_name); + int __attribute__((__cdecl__)) rand(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_error_mode(int _Mode); + void __attribute__((__cdecl__)) srand(unsigned int _Seed); +# 483 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +inline __attribute__((__cdecl__)) +double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtod(const char * __restrict__ _Str,char ** __restrict__ _EndPtr) +{ + double __attribute__((__cdecl__)) __mingw_strtod (const char * __restrict__, char ** __restrict__); + return __mingw_strtod( _Str, _EndPtr); +} + +inline __attribute__((__cdecl__)) +float __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtof(const char * __restrict__ _Str,char ** __restrict__ _EndPtr) +{ + float __attribute__((__cdecl__)) __mingw_strtof (const char * __restrict__, char ** __restrict__); + return __mingw_strtof( _Str, _EndPtr); +} + + + + + + + long double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtold(const char * __restrict__ , char ** __restrict__ ); + + + extern double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) + __strtod (const char * __restrict__ , char ** __restrict__); + + + + + + + + float __attribute__((__cdecl__)) __mingw_strtof (const char * __restrict__, char ** __restrict__); + double __attribute__((__cdecl__)) __mingw_strtod (const char * __restrict__, char ** __restrict__); + long double __attribute__((__cdecl__)) __mingw_strtold(const char * __restrict__, char ** __restrict__); + + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _strtod_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,_locale_t _Locale); + long __attribute__((__cdecl__)) strtol(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _strtol_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); + unsigned long __attribute__((__cdecl__)) strtoul(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix); + __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _strtoul_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); + + + int __attribute__((__cdecl__)) system(const char *_Command); + + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ultoa(unsigned long _Value,char *_Dest,int _Radix) ; + int __attribute__((__cdecl__)) wctomb(char *_MbCh,wchar_t _WCh) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale) ; + size_t __attribute__((__cdecl__)) wcstombs(char * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _MaxCount) ; + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _wcstombs_l(char * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _MaxCount,_locale_t _Locale) ; + + + + void *__attribute__((__cdecl__)) calloc(size_t _NumOfElements,size_t _SizeOfElements); + void __attribute__((__cdecl__)) free(void *_Memory); + void *__attribute__((__cdecl__)) malloc(size_t _Size); + void *__attribute__((__cdecl__)) realloc(void *_Memory,size_t _NewSize); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _recalloc(void *_Memory,size_t _Count,size_t _Size); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _aligned_free(void *_Memory); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_malloc(size_t _Size,size_t _Alignment); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); + + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _itow(int _Value,wchar_t *_Dest,int _Radix) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ltow(long _Value,wchar_t *_Dest,int _Radix) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix) ; + + double __attribute__((__cdecl__)) __mingw_wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr); + float __attribute__((__cdecl__)) __mingw_wcstof(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr); + long double __attribute__((__cdecl__)) __mingw_wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__); + + + inline __attribute__((__cdecl__)) + double __attribute__((__cdecl__)) wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){ + return __mingw_wcstod(_Str,_EndPtr); + } + inline __attribute__((__cdecl__)) + float __attribute__((__cdecl__)) wcstof(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){ + return __mingw_wcstof(_Str,_EndPtr); + } + + + + + + + long double __attribute__((__cdecl__)) wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__); + + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wcstod_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,_locale_t _Locale); + long __attribute__((__cdecl__)) wcstol(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wcstol_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); + unsigned long __attribute__((__cdecl__)) wcstoul(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix); + __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _wcstoul_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wgetenv(const wchar_t *_VarName) ; + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wsystem(const wchar_t *_Command); + + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wtof(const wchar_t *_Str); + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wtof_l(const wchar_t *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wtoi(const wchar_t *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wtoi_l(const wchar_t *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wtol(const wchar_t *_Str); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wtol_l(const wchar_t *_Str,_locale_t _Locale); + + __extension__ __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _i64tow(long long _Val,wchar_t *_DstBuf,int _Radix) ; + __extension__ __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ui64tow(unsigned long long _Val,wchar_t *_DstBuf,int _Radix) ; + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wtoi64(const wchar_t *_Str); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wtoi64_l(const wchar_t *_Str,_locale_t _Locale); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); + __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); + __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putenv(const char *_EnvString); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wputenv(const wchar_t *_EnvString); + + + + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign) ; + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign) ; + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _gcvt(double _Val,int _NumOfDigits,char *_DstBuf) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atodbl(_CRT_DOUBLE *_Result,char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoldbl(_LDOUBLE *_Result,char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoflt(_CRT_FLOAT *_Result,char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale); +# 634 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +unsigned long __attribute__((__cdecl__)) _lrotl(unsigned long,int); +unsigned long __attribute__((__cdecl__)) _lrotr(unsigned long,int); + + + + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); + _onexit_t __attribute__((__cdecl__)) _onexit(_onexit_t _Func); + + + + void __attribute__((__cdecl__)) perror(const char *_ErrMsg); + + + + + + __extension__ unsigned long long __attribute__((__cdecl__)) _rotl64(unsigned long long _Val,int _Shift); + __extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long Value,int Shift); + + + + + + + unsigned int __attribute__((__cdecl__)) _rotr(unsigned int _Val,int _Shift); + unsigned int __attribute__((__cdecl__)) _rotl(unsigned int _Val,int _Shift); + + + __extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long _Val,int _Shift); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath) ; + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext) ; + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _swab(char *_Buf1,char *_Buf2,int _SizeInBytes); + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wperror(const wchar_t *_ErrMsg); + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath) ; + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext) ; + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _beep(unsigned _Frequency,unsigned _Duration) __attribute__ ((__deprecated__)); + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _seterrormode(int _Mode) __attribute__ ((__deprecated__)); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _sleep(unsigned long _Duration) __attribute__ ((__deprecated__)); +# 705 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + char *__attribute__((__cdecl__)) ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign) ; + char *__attribute__((__cdecl__)) fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign) ; + char *__attribute__((__cdecl__)) gcvt(double _Val,int _NumOfDigits,char *_DstBuf) ; + char *__attribute__((__cdecl__)) itoa(int _Val,char *_DstBuf,int _Radix) ; + char *__attribute__((__cdecl__)) ltoa(long _Val,char *_DstBuf,int _Radix) ; + int __attribute__((__cdecl__)) putenv(const char *_EnvString) ; + + + + void __attribute__((__cdecl__)) swab(char *_Buf1,char *_Buf2,int _SizeInBytes) ; + + + char *__attribute__((__cdecl__)) ultoa(unsigned long _Val,char *_Dstbuf,int _Radix) ; + _onexit_t __attribute__((__cdecl__)) onexit(_onexit_t _Func); + + + + + + typedef struct { __extension__ long long quot, rem; } lldiv_t; + + __extension__ lldiv_t __attribute__((__cdecl__)) lldiv(long long, long long); + + __extension__ long long __attribute__((__cdecl__)) llabs(long long); + + + + + __extension__ long long __attribute__((__cdecl__)) strtoll(const char * __restrict__, char ** __restrict, int); + __extension__ unsigned long long __attribute__((__cdecl__)) strtoull(const char * __restrict__, char ** __restrict__, int); + + + __extension__ long long __attribute__((__cdecl__)) atoll (const char *); +# 760 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +} + + +#pragma pack(pop) + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h" 1 3 +# 9 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 1 3 +# 30 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 1 3 +# 31 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 2 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h" 2 3 + + +extern "C" { + + + __attribute__ ((__dllimport__)) void * __attribute__((__cdecl__)) bsearch_s(const void *_Key,const void *_Base,rsize_t _NumOfElements,rsize_t _SizeOfElements,int (__attribute__((__cdecl__)) * _PtFuncCompare)(void *, const void *, const void *), void *_Context); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) getenv_s(size_t *_ReturnSize,char *_DstBuf,rsize_t _DstSize,const char *_VarName); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) getenv_s(size_t * _ReturnSize, char (&_Dest)[__size], const char * _VarName) { return getenv_s(_ReturnSize, _Dest, __size, _VarName); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _itoa_s(int _Value, char (&_Dest)[__size], int _Radix) { return _itoa_s(_Value, _Dest, __size, _Radix); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _i64toa_s(long long _Val,char *_DstBuf,size_t _Size,int _Radix); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ui64toa_s(unsigned long long _Val,char *_DstBuf,size_t _Size,int _Radix); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _ltoa_s(long _Value, char (&_Dest)[__size], int _Radix) { return _ltoa_s(_Value, _Dest, __size, _Radix); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) mbstowcs_s(size_t * _PtNumOfCharConverted, wchar_t (&_Dest)[__size], const char * _Source, size_t _MaxCount) { return mbstowcs_s(_PtNumOfCharConverted, _Dest, __size, _Source, _MaxCount); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _mbstowcs_s_l(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount,_locale_t _Locale); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _mbstowcs_s_l(size_t * _PtNumOfCharConverted, wchar_t (&_Dest)[__size], const char * _Source, size_t _MaxCount, _locale_t _Locale) { return _mbstowcs_s_l(_PtNumOfCharConverted, _Dest, __size, _Source, _MaxCount, _Locale); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _ultoa_s(unsigned long _Value, char (&_Dest)[__size], int _Radix) { return _ultoa_s(_Value, _Dest, __size, _Radix); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wctomb_s(int *_SizeConverted,char *_MbCh,rsize_t _SizeInBytes,wchar_t _WCh); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcstombs_s(size_t* _PtNumOfCharConverted, char (&_Dst)[__size], const wchar_t* _Src, size_t _MaxCountInBytes) { return wcstombs_s(_PtNumOfCharConverted, _Dst, __size, _Src, _MaxCountInBytes); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcstombs_s_l(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes,_locale_t _Locale); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcstombs_s_l(size_t* _PtNumOfCharConverted, char (&_Dst)[__size], const wchar_t* _Src, size_t _MaxCountInBytes, _locale_t _Locale) { return _wcstombs_s_l(_PtNumOfCharConverted, _Dst, __size, _Src, _MaxCountInBytes, _Locale); } } + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _putenv_s(const char *_Name,const char *_Value); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _splitpath_s(const char *_FullPath,char *_Drive,size_t _DriveSize,char *_Dir,size_t _DirSize,char *_Filename,size_t _FilenameSize,char *_Ext,size_t _ExtSize); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _splitpath_s(const char *_Dest, char (&__drive)[__drive_size], char (&__dir)[__dir_size], char (&__name)[__name_size], char (&__ext)[__ext_size]) { return _splitpath_s(_Dest, __drive, __drive_size, __dir, __dir_size, __name, __name_size, __ext, __ext_size); } } + + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) qsort_s(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(void *,const void *,const void *),void *_Context); + + + + + +} +# 766 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 46 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 + typedef struct _heapinfo { + int *_pentry; + size_t _size; + int _useflag; + } _HEAPINFO; + + + extern unsigned int _amblksiz; +# 74 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 +void * __mingw_aligned_malloc (size_t _Size, size_t _Alignment); +void __mingw_aligned_free (void *_Memory); +void * __mingw_aligned_offset_realloc (void *_Memory, size_t _Size, size_t _Alignment, size_t _Offset); +void * __mingw_aligned_realloc (void *_Memory, size_t _Size, size_t _Offset); + + +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mm_malloc.h" 1 3 4 +# 27 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mm_malloc.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 1 3 4 +# 28 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mm_malloc.h" 2 3 4 + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/errno.h" 1 3 4 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/errno.h" 3 4 +extern "C" { +# 239 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/errno.h" 3 4 +} +# 30 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mm_malloc.h" 2 3 4 + + +static __inline__ void * +_mm_malloc (size_t __size, size_t __align) +{ + void * __malloc_ptr; + void * __aligned_ptr; + + + if (__align & (__align - 1)) + { + + (*_errno()) = 22; + + return ((void *) 0); + } + + if (__size == 0) + return ((void *) 0); + + + + + + if (__align < 2 * sizeof (void *)) + __align = 2 * sizeof (void *); + + __malloc_ptr = malloc (__size + __align); + if (!__malloc_ptr) + return ((void *) 0); + + + __aligned_ptr = (void *) (((size_t) __malloc_ptr + __align) + & ~((size_t) (__align) - 1)); + + + ((void **) __aligned_ptr)[-1] = __malloc_ptr; + + return __aligned_ptr; +} + +static __inline__ void +_mm_free (void *__aligned_ptr) +{ + if (__aligned_ptr) + free (((void **) __aligned_ptr)[-1]); +} +# 81 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 2 3 + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _resetstkoflw (void); + + __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _set_malloc_crt_max_wait(unsigned long _NewValue); + + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _expand(void *_Memory,size_t _NewSize); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _msize(void *_Memory); + + + + + + + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _get_sbh_threshold(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_sbh_threshold(size_t _NewValue); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _set_amblksiz(size_t _Value); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_amblksiz(size_t *_Value); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapadd(void *_Memory,size_t _Size); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapchk(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapmin(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapset(unsigned int _Fill); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapwalk(_HEAPINFO *_EntryInfo); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _heapused(size_t *_Used,size_t *_Commit); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _get_heap_handle(void); +# 120 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 + static __inline void *_MarkAllocaS(void *_Ptr,unsigned int _Marker) { + if(_Ptr) { + *((unsigned int*)_Ptr) = _Marker; + _Ptr = (char*)_Ptr + 16; + } + return _Ptr; + } +# 139 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 + static __inline void __attribute__((__cdecl__)) _freea(void *_Memory) { + unsigned int _Marker; + if(_Memory) { + _Memory = (char*)_Memory - 16; + _Marker = *(unsigned int *)_Memory; + if(_Marker==0xDDDD) { + free(_Memory); + } + + + + + + } + } +# 182 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 +} + + +#pragma pack(pop) +# 767 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 2 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 2 3 + + + + + + + +extern "C++" +{ +namespace std +{ + + + using ::abs; + + + inline long + abs(long __i) { return __builtin_labs(__i); } + + + + inline long long + abs(long long __x) { return __builtin_llabs (__x); } +# 70 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 3 + inline constexpr double + abs(double __x) + { return __builtin_fabs(__x); } + + inline constexpr float + abs(float __x) + { return __builtin_fabsf(__x); } + + inline constexpr long double + abs(long double __x) + { return __builtin_fabsl(__x); } +# 107 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 3 + +} +} +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 +# 77 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 +extern "C++" +{ +namespace std +{ + + + using ::acos; + + + inline constexpr float + acos(float __x) + { return __builtin_acosf(__x); } + + inline constexpr long double + acos(long double __x) + { return __builtin_acosl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acos(_Tp __x) + { return __builtin_acos(__x); } + + using ::asin; + + + inline constexpr float + asin(float __x) + { return __builtin_asinf(__x); } + + inline constexpr long double + asin(long double __x) + { return __builtin_asinl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asin(_Tp __x) + { return __builtin_asin(__x); } + + using ::atan; + + + inline constexpr float + atan(float __x) + { return __builtin_atanf(__x); } + + inline constexpr long double + atan(long double __x) + { return __builtin_atanl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atan(_Tp __x) + { return __builtin_atan(__x); } + + using ::atan2; + + + inline constexpr float + atan2(float __y, float __x) + { return __builtin_atan2f(__y, __x); } + + inline constexpr long double + atan2(long double __y, long double __x) + { return __builtin_atan2l(__y, __x); } + + + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + atan2(_Tp __y, _Up __x) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return atan2(__type(__y), __type(__x)); + } + + using ::ceil; + + + inline constexpr float + ceil(float __x) + { return __builtin_ceilf(__x); } + + inline constexpr long double + ceil(long double __x) + { return __builtin_ceill(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ceil(_Tp __x) + { return __builtin_ceil(__x); } + + using ::cos; + + + inline constexpr float + cos(float __x) + { return __builtin_cosf(__x); } + + inline constexpr long double + cos(long double __x) + { return __builtin_cosl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cos(_Tp __x) + { return __builtin_cos(__x); } + + using ::cosh; + + + inline constexpr float + cosh(float __x) + { return __builtin_coshf(__x); } + + inline constexpr long double + cosh(long double __x) + { return __builtin_coshl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cosh(_Tp __x) + { return __builtin_cosh(__x); } + + using ::exp; + + + inline constexpr float + exp(float __x) + { return __builtin_expf(__x); } + + inline constexpr long double + exp(long double __x) + { return __builtin_expl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp(_Tp __x) + { return __builtin_exp(__x); } + + using ::fabs; + + + inline constexpr float + fabs(float __x) + { return __builtin_fabsf(__x); } + + inline constexpr long double + fabs(long double __x) + { return __builtin_fabsl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + fabs(_Tp __x) + { return __builtin_fabs(__x); } + + using ::floor; + + + inline constexpr float + floor(float __x) + { return __builtin_floorf(__x); } + + inline constexpr long double + floor(long double __x) + { return __builtin_floorl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + floor(_Tp __x) + { return __builtin_floor(__x); } + + using ::fmod; + + + inline constexpr float + fmod(float __x, float __y) + { return __builtin_fmodf(__x, __y); } + + inline constexpr long double + fmod(long double __x, long double __y) + { return __builtin_fmodl(__x, __y); } + + + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmod(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmod(__type(__x), __type(__y)); + } + + using ::frexp; + + + inline float + frexp(float __x, int* __exp) + { return __builtin_frexpf(__x, __exp); } + + inline long double + frexp(long double __x, int* __exp) + { return __builtin_frexpl(__x, __exp); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + frexp(_Tp __x, int* __exp) + { return __builtin_frexp(__x, __exp); } + + using ::ldexp; + + + inline constexpr float + ldexp(float __x, int __exp) + { return __builtin_ldexpf(__x, __exp); } + + inline constexpr long double + ldexp(long double __x, int __exp) + { return __builtin_ldexpl(__x, __exp); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ldexp(_Tp __x, int __exp) + { return __builtin_ldexp(__x, __exp); } + + using ::log; + + + inline constexpr float + log(float __x) + { return __builtin_logf(__x); } + + inline constexpr long double + log(long double __x) + { return __builtin_logl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log(_Tp __x) + { return __builtin_log(__x); } + + using ::log10; + + + inline constexpr float + log10(float __x) + { return __builtin_log10f(__x); } + + inline constexpr long double + log10(long double __x) + { return __builtin_log10l(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log10(_Tp __x) + { return __builtin_log10(__x); } + + using ::modf; + + + inline float + modf(float __x, float* __iptr) + { return __builtin_modff(__x, __iptr); } + + inline long double + modf(long double __x, long double* __iptr) + { return __builtin_modfl(__x, __iptr); } + + + using ::pow; + + + inline constexpr float + pow(float __x, float __y) + { return __builtin_powf(__x, __y); } + + inline constexpr long double + pow(long double __x, long double __y) + { return __builtin_powl(__x, __y); } +# 412 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + pow(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return pow(__type(__x), __type(__y)); + } + + using ::sin; + + + inline constexpr float + sin(float __x) + { return __builtin_sinf(__x); } + + inline constexpr long double + sin(long double __x) + { return __builtin_sinl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sin(_Tp __x) + { return __builtin_sin(__x); } + + using ::sinh; + + + inline constexpr float + sinh(float __x) + { return __builtin_sinhf(__x); } + + inline constexpr long double + sinh(long double __x) + { return __builtin_sinhl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sinh(_Tp __x) + { return __builtin_sinh(__x); } + + using ::sqrt; + + + inline constexpr float + sqrt(float __x) + { return __builtin_sqrtf(__x); } + + inline constexpr long double + sqrt(long double __x) + { return __builtin_sqrtl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sqrt(_Tp __x) + { return __builtin_sqrt(__x); } + + using ::tan; + + + inline constexpr float + tan(float __x) + { return __builtin_tanf(__x); } + + inline constexpr long double + tan(long double __x) + { return __builtin_tanl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tan(_Tp __x) + { return __builtin_tan(__x); } + + using ::tanh; + + + inline constexpr float + tanh(float __x) + { return __builtin_tanhf(__x); } + + inline constexpr long double + tanh(long double __x) + { return __builtin_tanhl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tanh(_Tp __x) + { return __builtin_tanh(__x); } +# 536 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + constexpr int + fpclassify(float __x) + { return __builtin_fpclassify(0x0100, (0x0100 | 0x0400), 0x0400, + (0x0400 | 0x4000), 0x4000, __x); } + + constexpr int + fpclassify(double __x) + { return __builtin_fpclassify(0x0100, (0x0100 | 0x0400), 0x0400, + (0x0400 | 0x4000), 0x4000, __x); } + + constexpr int + fpclassify(long double __x) + { return __builtin_fpclassify(0x0100, (0x0100 | 0x0400), 0x0400, + (0x0400 | 0x4000), 0x4000, __x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + int>::__type + fpclassify(_Tp __x) + { return __x != 0 ? 0x0400 : 0x4000; } + + + + constexpr bool + isfinite(float __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isfinite(double __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isfinite(long double __x) + { return __builtin_isfinite(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isfinite(_Tp __x) + { return true; } + + + + constexpr bool + isinf(float __x) + { return __builtin_isinf(__x); } + + + + + + constexpr bool + isinf(double __x) + { return __builtin_isinf(__x); } + + + constexpr bool + isinf(long double __x) + { return __builtin_isinf(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isinf(_Tp __x) + { return false; } + + + + constexpr bool + isnan(float __x) + { return __builtin_isnan(__x); } + + + + + + constexpr bool + isnan(double __x) + { return __builtin_isnan(__x); } + + + constexpr bool + isnan(long double __x) + { return __builtin_isnan(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isnan(_Tp __x) + { return false; } + + + + constexpr bool + isnormal(float __x) + { return __builtin_isnormal(__x); } + + constexpr bool + isnormal(double __x) + { return __builtin_isnormal(__x); } + + constexpr bool + isnormal(long double __x) + { return __builtin_isnormal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isnormal(_Tp __x) + { return __x != 0 ? true : false; } + + + + + constexpr bool + signbit(float __x) + { return __builtin_signbit(__x); } + + constexpr bool + signbit(double __x) + { return __builtin_signbit(__x); } + + constexpr bool + signbit(long double __x) + { return __builtin_signbit(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + signbit(_Tp __x) + { return __x < 0 ? true : false; } + + + + constexpr bool + isgreater(float __x, float __y) + { return __builtin_isgreater(__x, __y); } + + constexpr bool + isgreater(double __x, double __y) + { return __builtin_isgreater(__x, __y); } + + constexpr bool + isgreater(long double __x, long double __y) + { return __builtin_isgreater(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isgreater(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isgreater(__type(__x), __type(__y)); + } + + + + constexpr bool + isgreaterequal(float __x, float __y) + { return __builtin_isgreaterequal(__x, __y); } + + constexpr bool + isgreaterequal(double __x, double __y) + { return __builtin_isgreaterequal(__x, __y); } + + constexpr bool + isgreaterequal(long double __x, long double __y) + { return __builtin_isgreaterequal(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isgreaterequal(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isgreaterequal(__type(__x), __type(__y)); + } + + + + constexpr bool + isless(float __x, float __y) + { return __builtin_isless(__x, __y); } + + constexpr bool + isless(double __x, double __y) + { return __builtin_isless(__x, __y); } + + constexpr bool + isless(long double __x, long double __y) + { return __builtin_isless(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isless(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isless(__type(__x), __type(__y)); + } + + + + constexpr bool + islessequal(float __x, float __y) + { return __builtin_islessequal(__x, __y); } + + constexpr bool + islessequal(double __x, double __y) + { return __builtin_islessequal(__x, __y); } + + constexpr bool + islessequal(long double __x, long double __y) + { return __builtin_islessequal(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + islessequal(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_islessequal(__type(__x), __type(__y)); + } + + + + constexpr bool + islessgreater(float __x, float __y) + { return __builtin_islessgreater(__x, __y); } + + constexpr bool + islessgreater(double __x, double __y) + { return __builtin_islessgreater(__x, __y); } + + constexpr bool + islessgreater(long double __x, long double __y) + { return __builtin_islessgreater(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + islessgreater(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_islessgreater(__type(__x), __type(__y)); + } + + + + constexpr bool + isunordered(float __x, float __y) + { return __builtin_isunordered(__x, __y); } + + constexpr bool + isunordered(double __x, double __y) + { return __builtin_isunordered(__x, __y); } + + constexpr bool + isunordered(long double __x, long double __y) + { return __builtin_isunordered(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isunordered(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isunordered(__type(__x), __type(__y)); + } +# 1065 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + using ::double_t; + using ::float_t; + + + using ::acosh; + using ::acoshf; + using ::acoshl; + + using ::asinh; + using ::asinhf; + using ::asinhl; + + using ::atanh; + using ::atanhf; + using ::atanhl; + + using ::cbrt; + using ::cbrtf; + using ::cbrtl; + + using ::copysign; + using ::copysignf; + using ::copysignl; + + using ::erf; + using ::erff; + using ::erfl; + + using ::erfc; + using ::erfcf; + using ::erfcl; + + using ::exp2; + using ::exp2f; + using ::exp2l; + + using ::expm1; + using ::expm1f; + using ::expm1l; + + using ::fdim; + using ::fdimf; + using ::fdiml; + + using ::fma; + using ::fmaf; + using ::fmal; + + using ::fmax; + using ::fmaxf; + using ::fmaxl; + + using ::fmin; + using ::fminf; + using ::fminl; + + using ::hypot; + using ::hypotf; + using ::hypotl; + + using ::ilogb; + using ::ilogbf; + using ::ilogbl; + + using ::lgamma; + using ::lgammaf; + using ::lgammal; + + + using ::llrint; + using ::llrintf; + using ::llrintl; + + using ::llround; + using ::llroundf; + using ::llroundl; + + + using ::log1p; + using ::log1pf; + using ::log1pl; + + using ::log2; + using ::log2f; + using ::log2l; + + using ::logb; + using ::logbf; + using ::logbl; + + using ::lrint; + using ::lrintf; + using ::lrintl; + + using ::lround; + using ::lroundf; + using ::lroundl; + + using ::nan; + using ::nanf; + using ::nanl; + + using ::nearbyint; + using ::nearbyintf; + using ::nearbyintl; + + using ::nextafter; + using ::nextafterf; + using ::nextafterl; + + using ::nexttoward; + using ::nexttowardf; + using ::nexttowardl; + + using ::remainder; + using ::remainderf; + using ::remainderl; + + using ::remquo; + using ::remquof; + using ::remquol; + + using ::rint; + using ::rintf; + using ::rintl; + + using ::round; + using ::roundf; + using ::roundl; + + using ::scalbln; + using ::scalblnf; + using ::scalblnl; + + using ::scalbn; + using ::scalbnf; + using ::scalbnl; + + using ::tgamma; + using ::tgammaf; + using ::tgammal; + + using ::trunc; + using ::truncf; + using ::truncl; + + + + constexpr float + acosh(float __x) + { return __builtin_acoshf(__x); } + + constexpr long double + acosh(long double __x) + { return __builtin_acoshl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acosh(_Tp __x) + { return __builtin_acosh(__x); } + + + + constexpr float + asinh(float __x) + { return __builtin_asinhf(__x); } + + constexpr long double + asinh(long double __x) + { return __builtin_asinhl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asinh(_Tp __x) + { return __builtin_asinh(__x); } + + + + constexpr float + atanh(float __x) + { return __builtin_atanhf(__x); } + + constexpr long double + atanh(long double __x) + { return __builtin_atanhl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atanh(_Tp __x) + { return __builtin_atanh(__x); } + + + + constexpr float + cbrt(float __x) + { return __builtin_cbrtf(__x); } + + constexpr long double + cbrt(long double __x) + { return __builtin_cbrtl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cbrt(_Tp __x) + { return __builtin_cbrt(__x); } + + + + constexpr float + copysign(float __x, float __y) + { return __builtin_copysignf(__x, __y); } + + constexpr long double + copysign(long double __x, long double __y) + { return __builtin_copysignl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + copysign(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return copysign(__type(__x), __type(__y)); + } + + + + constexpr float + erf(float __x) + { return __builtin_erff(__x); } + + constexpr long double + erf(long double __x) + { return __builtin_erfl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + erf(_Tp __x) + { return __builtin_erf(__x); } + + + + constexpr float + erfc(float __x) + { return __builtin_erfcf(__x); } + + constexpr long double + erfc(long double __x) + { return __builtin_erfcl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + erfc(_Tp __x) + { return __builtin_erfc(__x); } + + + + constexpr float + exp2(float __x) + { return __builtin_exp2f(__x); } + + constexpr long double + exp2(long double __x) + { return __builtin_exp2l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp2(_Tp __x) + { return __builtin_exp2(__x); } + + + + constexpr float + expm1(float __x) + { return __builtin_expm1f(__x); } + + constexpr long double + expm1(long double __x) + { return __builtin_expm1l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + expm1(_Tp __x) + { return __builtin_expm1(__x); } + + + + constexpr float + fdim(float __x, float __y) + { return __builtin_fdimf(__x, __y); } + + constexpr long double + fdim(long double __x, long double __y) + { return __builtin_fdiml(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fdim(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fdim(__type(__x), __type(__y)); + } + + + + constexpr float + fma(float __x, float __y, float __z) + { return __builtin_fmaf(__x, __y, __z); } + + constexpr long double + fma(long double __x, long double __y, long double __z) + { return __builtin_fmal(__x, __y, __z); } + + + + template + constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type + fma(_Tp __x, _Up __y, _Vp __z) + { + typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; + return fma(__type(__x), __type(__y), __type(__z)); + } + + + + constexpr float + fmax(float __x, float __y) + { return __builtin_fmaxf(__x, __y); } + + constexpr long double + fmax(long double __x, long double __y) + { return __builtin_fmaxl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmax(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmax(__type(__x), __type(__y)); + } + + + + constexpr float + fmin(float __x, float __y) + { return __builtin_fminf(__x, __y); } + + constexpr long double + fmin(long double __x, long double __y) + { return __builtin_fminl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmin(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmin(__type(__x), __type(__y)); + } + + + + constexpr float + hypot(float __x, float __y) + { return __builtin_hypotf(__x, __y); } + + constexpr long double + hypot(long double __x, long double __y) + { return __builtin_hypotl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + hypot(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return hypot(__type(__x), __type(__y)); + } + + + + constexpr int + ilogb(float __x) + { return __builtin_ilogbf(__x); } + + constexpr int + ilogb(long double __x) + { return __builtin_ilogbl(__x); } + + + + template + constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + int>::__type + ilogb(_Tp __x) + { return __builtin_ilogb(__x); } + + + + constexpr float + lgamma(float __x) + { return __builtin_lgammaf(__x); } + + constexpr long double + lgamma(long double __x) + { return __builtin_lgammal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + lgamma(_Tp __x) + { return __builtin_lgamma(__x); } + + + + constexpr long long + llrint(float __x) + { return __builtin_llrintf(__x); } + + constexpr long long + llrint(long double __x) + { return __builtin_llrintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long long>::__type + llrint(_Tp __x) + { return __builtin_llrint(__x); } + + + + constexpr long long + llround(float __x) + { return __builtin_llroundf(__x); } + + constexpr long long + llround(long double __x) + { return __builtin_llroundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long long>::__type + llround(_Tp __x) + { return __builtin_llround(__x); } + + + + constexpr float + log1p(float __x) + { return __builtin_log1pf(__x); } + + constexpr long double + log1p(long double __x) + { return __builtin_log1pl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log1p(_Tp __x) + { return __builtin_log1p(__x); } + + + + + constexpr float + log2(float __x) + { return __builtin_log2f(__x); } + + constexpr long double + log2(long double __x) + { return __builtin_log2l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log2(_Tp __x) + { return __builtin_log2(__x); } + + + + constexpr float + logb(float __x) + { return __builtin_logbf(__x); } + + constexpr long double + logb(long double __x) + { return __builtin_logbl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + logb(_Tp __x) + { return __builtin_logb(__x); } + + + + constexpr long + lrint(float __x) + { return __builtin_lrintf(__x); } + + constexpr long + lrint(long double __x) + { return __builtin_lrintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long>::__type + lrint(_Tp __x) + { return __builtin_lrint(__x); } + + + + constexpr long + lround(float __x) + { return __builtin_lroundf(__x); } + + constexpr long + lround(long double __x) + { return __builtin_lroundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long>::__type + lround(_Tp __x) + { return __builtin_lround(__x); } + + + + constexpr float + nearbyint(float __x) + { return __builtin_nearbyintf(__x); } + + constexpr long double + nearbyint(long double __x) + { return __builtin_nearbyintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + nearbyint(_Tp __x) + { return __builtin_nearbyint(__x); } + + + + constexpr float + nextafter(float __x, float __y) + { return __builtin_nextafterf(__x, __y); } + + constexpr long double + nextafter(long double __x, long double __y) + { return __builtin_nextafterl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + nextafter(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return nextafter(__type(__x), __type(__y)); + } + + + + constexpr float + nexttoward(float __x, long double __y) + { return __builtin_nexttowardf(__x, __y); } + + constexpr long double + nexttoward(long double __x, long double __y) + { return __builtin_nexttowardl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + nexttoward(_Tp __x, long double __y) + { return __builtin_nexttoward(__x, __y); } + + + + constexpr float + remainder(float __x, float __y) + { return __builtin_remainderf(__x, __y); } + + constexpr long double + remainder(long double __x, long double __y) + { return __builtin_remainderl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + remainder(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return remainder(__type(__x), __type(__y)); + } + + + + inline float + remquo(float __x, float __y, int* __pquo) + { return __builtin_remquof(__x, __y, __pquo); } + + inline long double + remquo(long double __x, long double __y, int* __pquo) + { return __builtin_remquol(__x, __y, __pquo); } + + + + template + inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + remquo(_Tp __x, _Up __y, int* __pquo) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return remquo(__type(__x), __type(__y), __pquo); + } + + + + constexpr float + rint(float __x) + { return __builtin_rintf(__x); } + + constexpr long double + rint(long double __x) + { return __builtin_rintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + rint(_Tp __x) + { return __builtin_rint(__x); } + + + + constexpr float + round(float __x) + { return __builtin_roundf(__x); } + + constexpr long double + round(long double __x) + { return __builtin_roundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + round(_Tp __x) + { return __builtin_round(__x); } + + + + constexpr float + scalbln(float __x, long __ex) + { return __builtin_scalblnf(__x, __ex); } + + constexpr long double + scalbln(long double __x, long __ex) + { return __builtin_scalblnl(__x, __ex); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + scalbln(_Tp __x, long __ex) + { return __builtin_scalbln(__x, __ex); } + + + + constexpr float + scalbn(float __x, int __ex) + { return __builtin_scalbnf(__x, __ex); } + + constexpr long double + scalbn(long double __x, int __ex) + { return __builtin_scalbnl(__x, __ex); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + scalbn(_Tp __x, int __ex) + { return __builtin_scalbn(__x, __ex); } + + + + constexpr float + tgamma(float __x) + { return __builtin_tgammaf(__x); } + + constexpr long double + tgamma(long double __x) + { return __builtin_tgammal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tgamma(_Tp __x) + { return __builtin_tgamma(__x); } + + + + constexpr float + trunc(float __x) + { return __builtin_truncf(__x); } + + constexpr long double + trunc(long double __x) + { return __builtin_truncl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + trunc(_Tp __x) + { return __builtin_trunc(__x); } +# 1852 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + template + inline _Tp + __hypot3(_Tp __x, _Tp __y, _Tp __z) + { + __x = std::abs(__x); + __y = std::abs(__y); + __z = std::abs(__z); + if (_Tp __a = __x < __y ? __y < __z ? __z : __y : __x < __z ? __z : __x) + return __a * std::sqrt((__x / __a) * (__x / __a) + + (__y / __a) * (__y / __a) + + (__z / __a) * (__z / __a)); + else + return {}; + } + + inline float + hypot(float __x, float __y, float __z) + { return std::__hypot3(__x, __y, __z); } + + inline double + hypot(double __x, double __y, double __z) + { return std::__hypot3(__x, __y, __z); } + + inline long double + hypot(long double __x, long double __y, long double __z) + { return std::__hypot3(__x, __y, __z); } + + template + typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type + hypot(_Tp __x, _Up __y, _Vp __z) + { + using __type = typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type; + return std::__hypot3<__type>(__x, __y, __z); + } + + + + + + + template + constexpr _Fp + __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept + { + if ((__a <= 0 && __b >= 0) || (__a >= 0 && __b <= 0)) + return __t * __b + (1 - __t) * __a; + + if (__t == 1) + return __b; + + + + const _Fp __x = __a + __t * (__b - __a); + return (__t > 1) == (__b > __a) + ? (__b < __x ? __x : __b) + : (__b > __x ? __x : __b); + } + + constexpr float + lerp(float __a, float __b, float __t) noexcept + { return std::__lerp(__a, __b, __t); } + + constexpr double + lerp(double __a, double __b, double __t) noexcept + { return std::__lerp(__a, __b, __t); } + + constexpr long double + lerp(long double __a, long double __b, long double __t) noexcept + { return std::__lerp(__a, __b, __t); } + + + +} + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 +#pragma GCC visibility push(default) +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 1 3 +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functexcept.h" 1 3 +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functexcept.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_defines.h" 1 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functexcept.h" 2 3 + +namespace std +{ + + + + void + __throw_bad_exception(void) __attribute__((__noreturn__)); + + + void + __throw_bad_alloc(void) __attribute__((__noreturn__)); + + void + __throw_bad_array_new_length(void) __attribute__((__noreturn__)); + + + void + __throw_bad_cast(void) __attribute__((__noreturn__)); + + void + __throw_bad_typeid(void) __attribute__((__noreturn__)); + + + void + __throw_logic_error(const char*) __attribute__((__noreturn__)); + + void + __throw_domain_error(const char*) __attribute__((__noreturn__)); + + void + __throw_invalid_argument(const char*) __attribute__((__noreturn__)); + + void + __throw_length_error(const char*) __attribute__((__noreturn__)); + + void + __throw_out_of_range(const char*) __attribute__((__noreturn__)); + + void + __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__)) + __attribute__((__format__(__gnu_printf__, 1, 2))); + + void + __throw_runtime_error(const char*) __attribute__((__noreturn__)); + + void + __throw_range_error(const char*) __attribute__((__noreturn__)); + + void + __throw_overflow_error(const char*) __attribute__((__noreturn__)); + + void + __throw_underflow_error(const char*) __attribute__((__noreturn__)); + + + void + __throw_ios_failure(const char*) __attribute__((__noreturn__)); + + void + __throw_ios_failure(const char*, int) __attribute__((__noreturn__)); + + + void + __throw_system_error(int) __attribute__((__noreturn__)); + + + void + __throw_future_error(int) __attribute__((__noreturn__)); + + + void + __throw_bad_function_call() __attribute__((__noreturn__)); + + +} +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + + + + +namespace __gnu_cxx +{ + +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + template + struct __is_integer_nonstrict + : public std::__is_integer<_Tp> + { + using std::__is_integer<_Tp>::__value; + + + enum { __width = __value ? sizeof(_Tp) * 8 : 0 }; + }; + + template + struct __numeric_traits_integer + { + + static_assert(__is_integer_nonstrict<_Value>::__value, + "invalid specialization"); + + + + + static const bool __is_signed = (_Value)(-1) < 0; + static const int __digits + = __is_integer_nonstrict<_Value>::__width - __is_signed; + + + static const _Value __max = __is_signed + ? (((((_Value)1 << (__digits - 1)) - 1) << 1) + 1) + : ~(_Value)0; + static const _Value __min = __is_signed ? -__max - 1 : (_Value)0; + }; + + template + const _Value __numeric_traits_integer<_Value>::__min; + + template + const _Value __numeric_traits_integer<_Value>::__max; + + template + const bool __numeric_traits_integer<_Value>::__is_signed; + + template + const int __numeric_traits_integer<_Value>::__digits; +# 128 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + template<> struct __is_integer_nonstrict<__int128> { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; }; template<> struct __is_integer_nonstrict { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; }; + + + + + + + template + using __int_traits = __numeric_traits_integer<_Tp>; +# 155 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + template + struct __numeric_traits_floating + { + + static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136); + + + static const bool __is_signed = true; + static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); + static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); + }; + + template + const int __numeric_traits_floating<_Value>::__max_digits10; + + template + const bool __numeric_traits_floating<_Value>::__is_signed; + + template + const int __numeric_traits_floating<_Value>::__digits10; + + template + const int __numeric_traits_floating<_Value>::__max_exponent10; + + + + + + + template + struct __numeric_traits + : public __numeric_traits_integer<_Value> + { }; + + template<> + struct __numeric_traits + : public __numeric_traits_floating + { }; + + template<> + struct __numeric_traits + : public __numeric_traits_floating + { }; + + template<> + struct __numeric_traits + : public __numeric_traits_floating + { }; +# 236 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + +} +# 64 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 1 3 +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 1 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 +namespace std +{ + + + + + + + + template + inline constexpr _Tp* + __addressof(_Tp& __r) noexcept + { return __builtin_addressof(__r); } + + + + +} + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + + + + + + + +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct integral_constant + { + static constexpr _Tp value = __v; + typedef _Tp value_type; + typedef integral_constant<_Tp, __v> type; + constexpr operator value_type() const noexcept { return value; } + + + + + constexpr value_type operator()() const noexcept { return value; } + + }; + + template + constexpr _Tp integral_constant<_Tp, __v>::value; + + + typedef integral_constant true_type; + + + typedef integral_constant false_type; + + template + using __bool_constant = integral_constant; + + + + template + using bool_constant = integral_constant; + + + + + template + struct conditional; + + template + struct __type_identity + { using type = _Type; }; + + template + using __type_identity_t = typename __type_identity<_Tp>::type; + + template + struct __or_; + + template<> + struct __or_<> + : public false_type + { }; + + template + struct __or_<_B1> + : public _B1 + { }; + + template + struct __or_<_B1, _B2> + : public conditional<_B1::value, _B1, _B2>::type + { }; + + template + struct __or_<_B1, _B2, _B3, _Bn...> + : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type + { }; + + template + struct __and_; + + template<> + struct __and_<> + : public true_type + { }; + + template + struct __and_<_B1> + : public _B1 + { }; + + template + struct __and_<_B1, _B2> + : public conditional<_B1::value, _B2, _B1>::type + { }; + + template + struct __and_<_B1, _B2, _B3, _Bn...> + : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type + { }; + + template + struct __not_ + : public __bool_constant + { }; + + + + template + inline constexpr bool __or_v = __or_<_Bn...>::value; + template + inline constexpr bool __and_v = __and_<_Bn...>::value; + + + + template + struct conjunction + : __and_<_Bn...> + { }; + + template + struct disjunction + : __or_<_Bn...> + { }; + + template + struct negation + : __not_<_Pp> + { }; + + template + inline constexpr bool conjunction_v = conjunction<_Bn...>::value; + + template + inline constexpr bool disjunction_v = disjunction<_Bn...>::value; + + template + inline constexpr bool negation_v = negation<_Pp>::value; + + + + + template + struct is_reference; + template + struct is_function; + template + struct is_void; + template + struct __is_array_unknown_bounds; + + + + + template + constexpr true_type __is_complete_or_unbounded(__type_identity<_Tp>) + { return {}; } + + template + constexpr typename __or_< + is_reference<_NestedType>, + is_function<_NestedType>, + is_void<_NestedType>, + __is_array_unknown_bounds<_NestedType> + >::type __is_complete_or_unbounded(_TypeIdentity) + { return {}; } + + + + + + + template + struct __success_type + { typedef _Tp type; }; + + struct __failure_type + { }; + + template + struct remove_cv; + + + template + using __remove_cv_t = typename remove_cv<_Tp>::type; + + template + struct is_const; + + + + template + struct __is_void_helper + : public false_type { }; + + template<> + struct __is_void_helper + : public true_type { }; + + + template + struct is_void + : public __is_void_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct __is_integral_helper + : public false_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + + + + + template<> + struct __is_integral_helper + : public true_type { }; + + + + template<> + struct __is_integral_helper + : public true_type { }; + + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; +# 367 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct is_integral + : public __is_integral_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct __is_floating_point_helper + : public false_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; +# 395 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct is_floating_point + : public __is_floating_point_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_array + : public false_type { }; + + template + struct is_array<_Tp[_Size]> + : public true_type { }; + + template + struct is_array<_Tp[]> + : public true_type { }; + + template + struct __is_pointer_helper + : public false_type { }; + + template + struct __is_pointer_helper<_Tp*> + : public true_type { }; + + + template + struct is_pointer + : public __is_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_lvalue_reference + : public false_type { }; + + template + struct is_lvalue_reference<_Tp&> + : public true_type { }; + + + template + struct is_rvalue_reference + : public false_type { }; + + template + struct is_rvalue_reference<_Tp&&> + : public true_type { }; + + template + struct __is_member_object_pointer_helper + : public false_type { }; + + template + struct __is_member_object_pointer_helper<_Tp _Cp::*> + : public __not_>::type { }; + + + template + struct is_member_object_pointer + : public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct __is_member_function_pointer_helper + : public false_type { }; + + template + struct __is_member_function_pointer_helper<_Tp _Cp::*> + : public is_function<_Tp>::type { }; + + + template + struct is_member_function_pointer + : public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_enum + : public integral_constant + { }; + + + template + struct is_union + : public integral_constant + { }; + + + template + struct is_class + : public integral_constant + { }; + + + template + struct is_function + : public __bool_constant::value> { }; + + template + struct is_function<_Tp&> + : public false_type { }; + + template + struct is_function<_Tp&&> + : public false_type { }; + + + + template + struct __is_null_pointer_helper + : public false_type { }; + + template<> + struct __is_null_pointer_helper + : public true_type { }; + + + template + struct is_null_pointer + : public __is_null_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct __is_nullptr_t + : public is_null_pointer<_Tp> + { } __attribute__ ((__deprecated__ ("use '" "std::is_null_pointer" "' instead"))); + + + + + template + struct is_reference + : public __or_, + is_rvalue_reference<_Tp>>::type + { }; + + + template + struct is_arithmetic + : public __or_, is_floating_point<_Tp>>::type + { }; + + + template + struct is_fundamental + : public __or_, is_void<_Tp>, + is_null_pointer<_Tp>>::type + { }; + + + template + struct is_object + : public __not_<__or_, is_reference<_Tp>, + is_void<_Tp>>>::type + { }; + + template + struct is_member_pointer; + + + template + struct is_scalar + : public __or_, is_enum<_Tp>, is_pointer<_Tp>, + is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type + { }; + + + template + struct is_compound + : public __not_>::type { }; + + template + struct __is_member_pointer_helper + : public false_type { }; + + template + struct __is_member_pointer_helper<_Tp _Cp::*> + : public true_type { }; + + + template + struct is_member_pointer + : public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct is_same; + + template + using __is_one_of = __or_...>; + + + template + using __is_signed_integer = __is_one_of<__remove_cv_t<_Tp>, + signed char, signed short, signed int, signed long, + signed long long +# 607 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + >; + + + template + using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>, + unsigned char, unsigned short, unsigned int, unsigned long, + unsigned long long +# 626 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + >; + + + template + using __is_standard_integer + = __or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>>; + + + template using __void_t = void; + + + + template + struct __is_referenceable + : public false_type + { }; + + template + struct __is_referenceable<_Tp, __void_t<_Tp&>> + : public true_type + { }; + + + + + template + struct is_const + : public false_type { }; + + template + struct is_const<_Tp const> + : public true_type { }; + + + template + struct is_volatile + : public false_type { }; + + template + struct is_volatile<_Tp volatile> + : public true_type { }; + + + template + struct is_trivial + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_copyable + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_standard_layout + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + template + struct + [[deprecated("use is_standard_layout && is_trivial instead")]] + is_pod + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct + [[__deprecated__]] + is_literal_type + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_empty + : public integral_constant + { }; + + + template + struct is_polymorphic + : public integral_constant + { }; + + + + + template + struct is_final + : public integral_constant + { }; + + + + template + struct is_abstract + : public integral_constant + { }; + + template::value> + struct __is_signed_helper + : public false_type { }; + + template + struct __is_signed_helper<_Tp, true> + : public integral_constant + { }; + + + template + struct is_signed + : public __is_signed_helper<_Tp>::type + { }; + + + template + struct is_unsigned + : public __and_, __not_>> + { }; +# 775 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + _Up + __declval(int); + + template + _Tp + __declval(long); + + template + auto declval() noexcept -> decltype(__declval<_Tp>(0)); + + template + struct extent; + + template + struct remove_all_extents; + + template + struct __is_array_known_bounds + : public integral_constant::value > 0)> + { }; + + template + struct __is_array_unknown_bounds + : public __and_, __not_>> + { }; + + + + + + + struct __do_is_destructible_impl + { + template().~_Tp())> + static true_type __test(int); + + template + static false_type __test(...); + }; + + template + struct __is_destructible_impl + : public __do_is_destructible_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template, + __is_array_unknown_bounds<_Tp>, + is_function<_Tp>>::value, + bool = __or_, is_scalar<_Tp>>::value> + struct __is_destructible_safe; + + template + struct __is_destructible_safe<_Tp, false, false> + : public __is_destructible_impl::type>::type + { }; + + template + struct __is_destructible_safe<_Tp, true, false> + : public false_type { }; + + template + struct __is_destructible_safe<_Tp, false, true> + : public true_type { }; + + + template + struct is_destructible + : public __is_destructible_safe<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + + + struct __do_is_nt_destructible_impl + { + template + static __bool_constant().~_Tp())> + __test(int); + + template + static false_type __test(...); + }; + + template + struct __is_nt_destructible_impl + : public __do_is_nt_destructible_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template, + __is_array_unknown_bounds<_Tp>, + is_function<_Tp>>::value, + bool = __or_, is_scalar<_Tp>>::value> + struct __is_nt_destructible_safe; + + template + struct __is_nt_destructible_safe<_Tp, false, false> + : public __is_nt_destructible_impl::type>::type + { }; + + template + struct __is_nt_destructible_safe<_Tp, true, false> + : public false_type { }; + + template + struct __is_nt_destructible_safe<_Tp, false, true> + : public true_type { }; + + + template + struct is_nothrow_destructible + : public __is_nt_destructible_safe<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + struct __is_constructible_impl + : public __bool_constant<__is_constructible(_Tp, _Args...)> + { }; + + + template + struct is_constructible + : public __is_constructible_impl<_Tp, _Args...> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_default_constructible + : public __is_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_copy_constructible_impl; + + template + struct __is_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_copy_constructible_impl<_Tp, true> + : public __is_constructible_impl<_Tp, const _Tp&> + { }; + + + template + struct is_copy_constructible + : public __is_copy_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_move_constructible_impl; + + template + struct __is_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_move_constructible_impl<_Tp, true> + : public __is_constructible_impl<_Tp, _Tp&&> + { }; + + + template + struct is_move_constructible + : public __is_move_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + using __is_nothrow_constructible_impl + = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>; + + + template + struct is_nothrow_constructible + : public __is_nothrow_constructible_impl<_Tp, _Args...>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_default_constructible + : public __bool_constant<__is_nothrow_constructible(_Tp)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template::value> + struct __is_nothrow_copy_constructible_impl; + + template + struct __is_nothrow_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nothrow_copy_constructible_impl<_Tp, true> + : public __is_nothrow_constructible_impl<_Tp, const _Tp&> + { }; + + + template + struct is_nothrow_copy_constructible + : public __is_nothrow_copy_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_nothrow_move_constructible_impl; + + template + struct __is_nothrow_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nothrow_move_constructible_impl<_Tp, true> + : public __is_nothrow_constructible_impl<_Tp, _Tp&&> + { }; + + + template + struct is_nothrow_move_constructible + : public __is_nothrow_move_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_assignable + : public __bool_constant<__is_assignable(_Tp, _Up)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_copy_assignable_impl; + + template + struct __is_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_copy_assignable_impl<_Tp, true> + : public __bool_constant<__is_assignable(_Tp&, const _Tp&)> + { }; + + + template + struct is_copy_assignable + : public __is_copy_assignable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_move_assignable_impl; + + template + struct __is_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_move_assignable_impl<_Tp, true> + : public __bool_constant<__is_assignable(_Tp&, _Tp&&)> + { }; + + + template + struct is_move_assignable + : public __is_move_assignable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + using __is_nothrow_assignable_impl + = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>; + + + template + struct is_nothrow_assignable + : public __is_nothrow_assignable_impl<_Tp, _Up> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_nt_copy_assignable_impl; + + template + struct __is_nt_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nt_copy_assignable_impl<_Tp, true> + : public __is_nothrow_assignable_impl<_Tp&, const _Tp&> + { }; + + + template + struct is_nothrow_copy_assignable + : public __is_nt_copy_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_nt_move_assignable_impl; + + template + struct __is_nt_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nt_move_assignable_impl<_Tp, true> + : public __is_nothrow_assignable_impl<_Tp&, _Tp&&> + { }; + + + template + struct is_nothrow_move_assignable + : public __is_nt_move_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_constructible + : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_default_constructible + : public __bool_constant<__is_trivially_constructible(_Tp)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + struct __do_is_implicitly_default_constructible_impl + { + template + static void __helper(const _Tp&); + + template + static true_type __test(const _Tp&, + decltype(__helper({}))* = 0); + + static false_type __test(...); + }; + + template + struct __is_implicitly_default_constructible_impl + : public __do_is_implicitly_default_constructible_impl + { + typedef decltype(__test(declval<_Tp>())) type; + }; + + template + struct __is_implicitly_default_constructible_safe + : public __is_implicitly_default_constructible_impl<_Tp>::type + { }; + + template + struct __is_implicitly_default_constructible + : public __and_<__is_constructible_impl<_Tp>, + __is_implicitly_default_constructible_safe<_Tp>> + { }; + + template::value> + struct __is_trivially_copy_constructible_impl; + + template + struct __is_trivially_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_copy_constructible_impl<_Tp, true> + : public __and_<__is_copy_constructible_impl<_Tp>, + integral_constant> + { }; + + + template + struct is_trivially_copy_constructible + : public __is_trivially_copy_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_move_constructible_impl; + + template + struct __is_trivially_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_move_constructible_impl<_Tp, true> + : public __and_<__is_move_constructible_impl<_Tp>, + integral_constant> + { }; + + + template + struct is_trivially_move_constructible + : public __is_trivially_move_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_assignable + : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_copy_assignable_impl; + + template + struct __is_trivially_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_copy_assignable_impl<_Tp, true> + : public __bool_constant<__is_trivially_assignable(_Tp&, const _Tp&)> + { }; + + + template + struct is_trivially_copy_assignable + : public __is_trivially_copy_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_move_assignable_impl; + + template + struct __is_trivially_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_move_assignable_impl<_Tp, true> + : public __bool_constant<__is_trivially_assignable(_Tp&, _Tp&&)> + { }; + + + template + struct is_trivially_move_assignable + : public __is_trivially_move_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_destructible + : public __and_<__is_destructible_safe<_Tp>, + __bool_constant<__has_trivial_destructor(_Tp)>> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + template + struct has_virtual_destructor + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + + + template + struct alignment_of + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct rank + : public integral_constant { }; + + template + struct rank<_Tp[_Size]> + : public integral_constant::value> { }; + + template + struct rank<_Tp[]> + : public integral_constant::value> { }; + + + template + struct extent + : public integral_constant { }; + + template + struct extent<_Tp[_Size], _Uint> + : public integral_constant::value> + { }; + + template + struct extent<_Tp[], _Uint> + : public integral_constant::value> + { }; + + + + + + template + struct is_same + + : public integral_constant + + + + { }; +# 1370 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct is_base_of + : public integral_constant + { }; + + template, is_function<_To>, + is_array<_To>>::value> + struct __is_convertible_helper + { + typedef typename is_void<_To>::type type; + }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + template + class __is_convertible_helper<_From, _To, false> + { + template + static void __test_aux(_To1) noexcept; + + template(std::declval<_From1>()))> + static true_type + __test(int); + + template + static false_type + __test(...); + + public: + typedef decltype(__test<_From, _To>(0)) type; + }; +#pragma GCC diagnostic pop + + + template + struct is_convertible + : public __is_convertible_helper<_From, _To>::type + { }; + + + template + using __is_array_convertible + = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>; + + template, is_function<_To>, + is_array<_To>>::value> + struct __is_nt_convertible_helper + : is_void<_To> + { }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + template + class __is_nt_convertible_helper<_From, _To, false> + { + template + static void __test_aux(_To1) noexcept; + + template + static + __bool_constant(std::declval<_From1>()))> + __test(int); + + template + static false_type + __test(...); + + public: + using type = decltype(__test<_From, _To>(0)); + }; +#pragma GCC diagnostic pop + + + template + struct __is_nothrow_convertible + : public __is_nt_convertible_helper<_From, _To>::type + { }; + + + + + template + struct is_nothrow_convertible + : public __is_nt_convertible_helper<_From, _To>::type + { }; + + + template + inline constexpr bool is_nothrow_convertible_v + = is_nothrow_convertible<_From, _To>::value; + + + + + + template + struct remove_const + { typedef _Tp type; }; + + template + struct remove_const<_Tp const> + { typedef _Tp type; }; + + + template + struct remove_volatile + { typedef _Tp type; }; + + template + struct remove_volatile<_Tp volatile> + { typedef _Tp type; }; + + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + + template + struct add_const + { typedef _Tp const type; }; + + + template + struct add_volatile + { typedef _Tp volatile type; }; + + + template + struct add_cv + { + typedef typename + add_const::type>::type type; + }; + + + + + + + template + using remove_const_t = typename remove_const<_Tp>::type; + + + template + using remove_volatile_t = typename remove_volatile<_Tp>::type; + + + template + using remove_cv_t = typename remove_cv<_Tp>::type; + + + template + using add_const_t = typename add_const<_Tp>::type; + + + template + using add_volatile_t = typename add_volatile<_Tp>::type; + + + template + using add_cv_t = typename add_cv<_Tp>::type; + + + + + + template + struct remove_reference + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&> + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&&> + { typedef _Tp type; }; + + template::value> + struct __add_lvalue_reference_helper + { typedef _Tp type; }; + + template + struct __add_lvalue_reference_helper<_Tp, true> + { typedef _Tp& type; }; + + + template + struct add_lvalue_reference + : public __add_lvalue_reference_helper<_Tp> + { }; + + template::value> + struct __add_rvalue_reference_helper + { typedef _Tp type; }; + + template + struct __add_rvalue_reference_helper<_Tp, true> + { typedef _Tp&& type; }; + + + template + struct add_rvalue_reference + : public __add_rvalue_reference_helper<_Tp> + { }; + + + + template + using remove_reference_t = typename remove_reference<_Tp>::type; + + + template + using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; + + + template + using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; + + + + + + template + struct __cv_selector; + + template + struct __cv_selector<_Unqualified, false, false> + { typedef _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, false, true> + { typedef volatile _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, true, false> + { typedef const _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, true, true> + { typedef const volatile _Unqualified __type; }; + + template::value, + bool _IsVol = is_volatile<_Qualified>::value> + class __match_cv_qualifiers + { + typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; + + public: + typedef typename __match::__type __type; + }; + + + template + struct __make_unsigned + { typedef _Tp __type; }; + + template<> + struct __make_unsigned + { typedef unsigned char __type; }; + + template<> + struct __make_unsigned + { typedef unsigned char __type; }; + + template<> + struct __make_unsigned + { typedef unsigned short __type; }; + + template<> + struct __make_unsigned + { typedef unsigned int __type; }; + + template<> + struct __make_unsigned + { typedef unsigned long __type; }; + + template<> + struct __make_unsigned + { typedef unsigned long long __type; }; +# 1690 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template::value, + bool _IsEnum = is_enum<_Tp>::value> + class __make_unsigned_selector; + + template + class __make_unsigned_selector<_Tp, true, false> + { + using __unsigned_type + = typename __make_unsigned<__remove_cv_t<_Tp>>::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; + }; + + class __make_unsigned_selector_base + { + protected: + template struct _List { }; + + template + struct _List<_Tp, _Up...> : _List<_Up...> + { static constexpr size_t __size = sizeof(_Tp); }; + + template + struct __select; + + template + struct __select<_Sz, _List<_Uint, _UInts...>, true> + { using __type = _Uint; }; + + template + struct __select<_Sz, _List<_Uint, _UInts...>, false> + : __select<_Sz, _List<_UInts...>> + { }; + }; + + + template + class __make_unsigned_selector<_Tp, false, true> + : __make_unsigned_selector_base + { + + using _UInts = _List; + + using __unsigned_type = typename __select::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; + }; + + + + + + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + + + + + template + struct make_unsigned + { typedef typename __make_unsigned_selector<_Tp>::__type type; }; + + + template<> + struct make_unsigned; + + + + template + struct __make_signed + { typedef _Tp __type; }; + + template<> + struct __make_signed + { typedef signed char __type; }; + + template<> + struct __make_signed + { typedef signed char __type; }; + + template<> + struct __make_signed + { typedef signed short __type; }; + + template<> + struct __make_signed + { typedef signed int __type; }; + + template<> + struct __make_signed + { typedef signed long __type; }; + + template<> + struct __make_signed + { typedef signed long long __type; }; +# 1844 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template::value, + bool _IsEnum = is_enum<_Tp>::value> + class __make_signed_selector; + + template + class __make_signed_selector<_Tp, true, false> + { + using __signed_type + = typename __make_signed<__remove_cv_t<_Tp>>::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __signed_type>::__type; + }; + + + template + class __make_signed_selector<_Tp, false, true> + { + typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; + + public: + typedef typename __make_signed_selector<__unsigned_type>::__type __type; + }; + + + + + + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + + + + + template + struct make_signed + { typedef typename __make_signed_selector<_Tp>::__type type; }; + + + template<> + struct make_signed; + + + + template + using make_signed_t = typename make_signed<_Tp>::type; + + + template + using make_unsigned_t = typename make_unsigned<_Tp>::type; + + + + + + template + struct remove_extent + { typedef _Tp type; }; + + template + struct remove_extent<_Tp[_Size]> + { typedef _Tp type; }; + + template + struct remove_extent<_Tp[]> + { typedef _Tp type; }; + + + template + struct remove_all_extents + { typedef _Tp type; }; + + template + struct remove_all_extents<_Tp[_Size]> + { typedef typename remove_all_extents<_Tp>::type type; }; + + template + struct remove_all_extents<_Tp[]> + { typedef typename remove_all_extents<_Tp>::type type; }; + + + + template + using remove_extent_t = typename remove_extent<_Tp>::type; + + + template + using remove_all_extents_t = typename remove_all_extents<_Tp>::type; + + + + + template + struct __remove_pointer_helper + { typedef _Tp type; }; + + template + struct __remove_pointer_helper<_Tp, _Up*> + { typedef _Up type; }; + + + template + struct remove_pointer + : public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>> + { }; + + + template, + is_void<_Tp>>::value> + struct __add_pointer_helper + { typedef _Tp type; }; + + template + struct __add_pointer_helper<_Tp, true> + { typedef typename remove_reference<_Tp>::type* type; }; + + template + struct add_pointer + : public __add_pointer_helper<_Tp> + { }; + + + + template + using remove_pointer_t = typename remove_pointer<_Tp>::type; + + + template + using add_pointer_t = typename add_pointer<_Tp>::type; + + + template + struct __aligned_storage_msa + { + union __type + { + unsigned char __data[_Len]; + struct __attribute__((__aligned__)) { } __align; + }; + }; +# 2027 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template::__type)> + struct aligned_storage + { + union type + { + unsigned char __data[_Len]; + struct __attribute__((__aligned__((_Align)))) { } __align; + }; + }; + + template + struct __strictest_alignment + { + static const size_t _S_alignment = 0; + static const size_t _S_size = 0; + }; + + template + struct __strictest_alignment<_Tp, _Types...> + { + static const size_t _S_alignment = + alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment + ? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment; + static const size_t _S_size = + sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size + ? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size; + }; +# 2066 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct aligned_union + { + private: + static_assert(sizeof...(_Types) != 0, "At least one type is required"); + + using __strictest = __strictest_alignment<_Types...>; + static const size_t _S_len = _Len > __strictest::_S_size + ? _Len : __strictest::_S_size; + public: + + static const size_t alignment_value = __strictest::_S_alignment; + + typedef typename aligned_storage<_S_len, alignment_value>::type type; + }; + + template + const size_t aligned_union<_Len, _Types...>::alignment_value; + + + + template::value, + bool _IsFunction = is_function<_Up>::value> + struct __decay_selector; + + + template + struct __decay_selector<_Up, false, false> + { typedef __remove_cv_t<_Up> __type; }; + + template + struct __decay_selector<_Up, true, false> + { typedef typename remove_extent<_Up>::type* __type; }; + + template + struct __decay_selector<_Up, false, true> + { typedef typename add_pointer<_Up>::type __type; }; + + + template + class decay + { + typedef typename remove_reference<_Tp>::type __remove_type; + + public: + typedef typename __decay_selector<__remove_type>::__type type; + }; + + + template + using __decay_t = typename decay<_Tp>::type; + + template + class reference_wrapper; + + + template + struct __strip_reference_wrapper + { + typedef _Tp __type; + }; + + template + struct __strip_reference_wrapper > + { + typedef _Tp& __type; + }; + + template + using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>; + + + + + template + struct enable_if + { }; + + + template + struct enable_if + { typedef _Tp type; }; + + + template + using __enable_if_t = typename enable_if<_Cond, _Tp>::type; + + template + using _Require = __enable_if_t<__and_<_Cond...>::value>; + + + + template + struct conditional + { typedef _Iftrue type; }; + + + template + struct conditional + { typedef _Iffalse type; }; + + + template + using __remove_cvref_t + = typename remove_cv::type>::type; + + + template + struct common_type; + + + + struct __do_common_type_impl + { + template + using __cond_t + = decltype(true ? std::declval<_Tp>() : std::declval<_Up>()); + + + + template + static __success_type<__decay_t<__cond_t<_Tp, _Up>>> + _S_test(int); + + + + + template + static __success_type<__remove_cvref_t<__cond_t>> + _S_test_2(int); + + + template + static __failure_type + _S_test_2(...); + + template + static decltype(_S_test_2<_Tp, _Up>(0)) + _S_test(...); + }; + + + template<> + struct common_type<> + { }; + + + template + struct common_type<_Tp0> + : public common_type<_Tp0, _Tp0> + { }; + + + template, typename _Dp2 = __decay_t<_Tp2>> + struct __common_type_impl + { + + + using type = common_type<_Dp1, _Dp2>; + }; + + template + struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2> + : private __do_common_type_impl + { + + + using type = decltype(_S_test<_Tp1, _Tp2>(0)); + }; + + + template + struct common_type<_Tp1, _Tp2> + : public __common_type_impl<_Tp1, _Tp2>::type + { }; + + template + struct __common_type_pack + { }; + + template + struct __common_type_fold; + + + template + struct common_type<_Tp1, _Tp2, _Rp...> + : public __common_type_fold, + __common_type_pack<_Rp...>> + { }; + + + + + template + struct __common_type_fold<_CTp, __common_type_pack<_Rp...>, + __void_t> + : public common_type + { }; + + + template + struct __common_type_fold<_CTp, _Rp, void> + { }; + + template::value> + struct __underlying_type_impl + { + using type = __underlying_type(_Tp); + }; + + template + struct __underlying_type_impl<_Tp, false> + { }; + + + template + struct underlying_type + : public __underlying_type_impl<_Tp> + { }; + + template + struct __declval_protector + { + static const bool __stop = false; + }; + + template + auto declval() noexcept -> decltype(__declval<_Tp>(0)) + { + static_assert(__declval_protector<_Tp>::__stop, + "declval() must not be used!"); + return __declval<_Tp>(0); + } + + + template + struct result_of; + + + + + + struct __invoke_memfun_ref { }; + struct __invoke_memfun_deref { }; + struct __invoke_memobj_ref { }; + struct __invoke_memobj_deref { }; + struct __invoke_other { }; + + + template + struct __result_of_success : __success_type<_Tp> + { using __invoke_type = _Tag; }; + + + struct __result_of_memfun_ref_impl + { + template + static __result_of_success().*std::declval<_Fp>())(std::declval<_Args>()...) + ), __invoke_memfun_ref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memfun_ref + : private __result_of_memfun_ref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; + }; + + + struct __result_of_memfun_deref_impl + { + template + static __result_of_success()).*std::declval<_Fp>())(std::declval<_Args>()...) + ), __invoke_memfun_deref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memfun_deref + : private __result_of_memfun_deref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; + }; + + + struct __result_of_memobj_ref_impl + { + template + static __result_of_success().*std::declval<_Fp>() + ), __invoke_memobj_ref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memobj_ref + : private __result_of_memobj_ref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; + }; + + + struct __result_of_memobj_deref_impl + { + template + static __result_of_success()).*std::declval<_Fp>() + ), __invoke_memobj_deref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memobj_deref + : private __result_of_memobj_deref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; + }; + + template + struct __result_of_memobj; + + template + struct __result_of_memobj<_Res _Class::*, _Arg> + { + typedef __remove_cvref_t<_Arg> _Argval; + typedef _Res _Class::* _MemPtr; + typedef typename conditional<__or_, + is_base_of<_Class, _Argval>>::value, + __result_of_memobj_ref<_MemPtr, _Arg>, + __result_of_memobj_deref<_MemPtr, _Arg> + >::type::type type; + }; + + template + struct __result_of_memfun; + + template + struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> + { + typedef typename remove_reference<_Arg>::type _Argval; + typedef _Res _Class::* _MemPtr; + typedef typename conditional::value, + __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, + __result_of_memfun_deref<_MemPtr, _Arg, _Args...> + >::type::type type; + }; + + + + + + + template> + struct __inv_unwrap + { + using type = _Tp; + }; + + template + struct __inv_unwrap<_Tp, reference_wrapper<_Up>> + { + using type = _Up&; + }; + + template + struct __result_of_impl + { + typedef __failure_type type; + }; + + template + struct __result_of_impl + : public __result_of_memobj<__decay_t<_MemPtr>, + typename __inv_unwrap<_Arg>::type> + { }; + + template + struct __result_of_impl + : public __result_of_memfun<__decay_t<_MemPtr>, + typename __inv_unwrap<_Arg>::type, _Args...> + { }; + + + struct __result_of_other_impl + { + template + static __result_of_success()(std::declval<_Args>()...) + ), __invoke_other> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_impl + : private __result_of_other_impl + { + typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; + }; + + + template + struct __invoke_result + : public __result_of_impl< + is_member_object_pointer< + typename remove_reference<_Functor>::type + >::value, + is_member_function_pointer< + typename remove_reference<_Functor>::type + >::value, + _Functor, _ArgTypes... + >::type + { }; + + template + struct result_of<_Functor(_ArgTypes...)> + : public __invoke_result<_Functor, _ArgTypes...> + { }; + + + + template::__type)> + using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; + + template + using aligned_union_t = typename aligned_union<_Len, _Types...>::type; + + + template + using decay_t = typename decay<_Tp>::type; + + + template + using enable_if_t = typename enable_if<_Cond, _Tp>::type; + + + template + using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type; + + + template + using common_type_t = typename common_type<_Tp...>::type; + + + template + using underlying_type_t = typename underlying_type<_Tp>::type; + + + template + using result_of_t = typename result_of<_Tp>::type; + + + + + + template using void_t = void; + + + + template class _Op, typename... _Args> + struct __detector + { + using value_t = false_type; + using type = _Default; + }; + + + template class _Op, + typename... _Args> + struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> + { + using value_t = true_type; + using type = _Op<_Args...>; + }; + + + template class _Op, + typename... _Args> + using __detected_or = __detector<_Default, void, _Op, _Args...>; + + + template class _Op, + typename... _Args> + using __detected_or_t + = typename __detected_or<_Default, _Op, _Args...>::type; +# 2584 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct __is_swappable; + + template + struct __is_nothrow_swappable; + + template + class tuple; + + template + struct __is_tuple_like_impl : false_type + { }; + + template + struct __is_tuple_like_impl> : true_type + { }; + + + template + struct __is_tuple_like + : public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type + { }; + + template + constexpr + inline + _Require<__not_<__is_tuple_like<_Tp>>, + is_move_constructible<_Tp>, + is_move_assignable<_Tp>> + swap(_Tp&, _Tp&) + noexcept(__and_, + is_nothrow_move_assignable<_Tp>>::value); + + template + constexpr + inline + __enable_if_t<__is_swappable<_Tp>::value> + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + noexcept(__is_nothrow_swappable<_Tp>::value); + + namespace __swappable_details { + using std::swap; + + struct __do_is_swappable_impl + { + template(), std::declval<_Tp&>()))> + static true_type __test(int); + + template + static false_type __test(...); + }; + + struct __do_is_nothrow_swappable_impl + { + template + static __bool_constant< + noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) + > __test(int); + + template + static false_type __test(...); + }; + + } + + template + struct __is_swappable_impl + : public __swappable_details::__do_is_swappable_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template + struct __is_nothrow_swappable_impl + : public __swappable_details::__do_is_nothrow_swappable_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template + struct __is_swappable + : public __is_swappable_impl<_Tp>::type + { }; + + template + struct __is_nothrow_swappable + : public __is_nothrow_swappable_impl<_Tp>::type + { }; + + + + + + + template + struct is_swappable + : public __is_swappable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_swappable + : public __is_nothrow_swappable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + template + inline constexpr bool is_swappable_v = + is_swappable<_Tp>::value; + + + template + inline constexpr bool is_nothrow_swappable_v = + is_nothrow_swappable<_Tp>::value; + + + namespace __swappable_with_details { + using std::swap; + + struct __do_is_swappable_with_impl + { + template(), std::declval<_Up>())), + typename + = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))> + static true_type __test(int); + + template + static false_type __test(...); + }; + + struct __do_is_nothrow_swappable_with_impl + { + template + static __bool_constant< + noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())) + && + noexcept(swap(std::declval<_Up>(), std::declval<_Tp>())) + > __test(int); + + template + static false_type __test(...); + }; + + } + + template + struct __is_swappable_with_impl + : public __swappable_with_details::__do_is_swappable_with_impl + { + typedef decltype(__test<_Tp, _Up>(0)) type; + }; + + + template + struct __is_swappable_with_impl<_Tp&, _Tp&> + : public __swappable_details::__do_is_swappable_impl + { + typedef decltype(__test<_Tp&>(0)) type; + }; + + template + struct __is_nothrow_swappable_with_impl + : public __swappable_with_details::__do_is_nothrow_swappable_with_impl + { + typedef decltype(__test<_Tp, _Up>(0)) type; + }; + + + template + struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&> + : public __swappable_details::__do_is_nothrow_swappable_impl + { + typedef decltype(__test<_Tp&>(0)) type; + }; + + + template + struct is_swappable_with + : public __is_swappable_with_impl<_Tp, _Up>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "first template argument must be a complete class or an unbounded array"); + static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}), + "second template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_swappable_with + : public __is_nothrow_swappable_with_impl<_Tp, _Up>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "first template argument must be a complete class or an unbounded array"); + static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}), + "second template argument must be a complete class or an unbounded array"); + }; + + + + template + inline constexpr bool is_swappable_with_v = + is_swappable_with<_Tp, _Up>::value; + + + template + inline constexpr bool is_nothrow_swappable_with_v = + is_nothrow_swappable_with<_Tp, _Up>::value; + + + + + + + + template::value, typename = void> + struct __is_invocable_impl : false_type { }; + + + template + struct __is_invocable_impl<_Result, _Ret, + true, + __void_t> + : true_type + { }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + + template + struct __is_invocable_impl<_Result, _Ret, + false, + __void_t> + { + private: + + + static typename _Result::type _S_get(); + + template + static void _S_conv(_Tp); + + + template(_S_get()))> + static true_type + _S_test(int); + + template + static false_type + _S_test(...); + + public: + using type = decltype(_S_test<_Ret>(1)); + }; +#pragma GCC diagnostic pop + + template + struct __is_invocable + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type + { }; + + template + constexpr bool __call_is_nt(__invoke_memfun_ref) + { + using _Up = typename __inv_unwrap<_Tp>::type; + return noexcept((std::declval<_Up>().*std::declval<_Fn>())( + std::declval<_Args>()...)); + } + + template + constexpr bool __call_is_nt(__invoke_memfun_deref) + { + return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( + std::declval<_Args>()...)); + } + + template + constexpr bool __call_is_nt(__invoke_memobj_ref) + { + using _Up = typename __inv_unwrap<_Tp>::type; + return noexcept(std::declval<_Up>().*std::declval<_Fn>()); + } + + template + constexpr bool __call_is_nt(__invoke_memobj_deref) + { + return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); + } + + template + constexpr bool __call_is_nt(__invoke_other) + { + return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); + } + + template + struct __call_is_nothrow + : __bool_constant< + std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) + > + { }; + + template + using __call_is_nothrow_ + = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; + + + template + struct __is_nothrow_invocable + : __and_<__is_invocable<_Fn, _Args...>, + __call_is_nothrow_<_Fn, _Args...>>::type + { }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + struct __nonesuchbase {}; + struct __nonesuch : private __nonesuchbase { + ~__nonesuch() = delete; + __nonesuch(__nonesuch const&) = delete; + void operator=(__nonesuch const&) = delete; + }; +#pragma GCC diagnostic pop + + + + + + template + struct invoke_result + : public __invoke_result<_Functor, _ArgTypes...> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}), + "_Functor must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + }; + + + template + using invoke_result_t = typename invoke_result<_Fn, _Args...>::type; + + + template + struct is_invocable + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), + "_Fn must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + }; + + + template + struct is_invocable_r + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), + "_Fn must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}), + "_Ret must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_invocable + : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>, + __call_is_nothrow_<_Fn, _ArgTypes...>>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), + "_Fn must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + }; + + template + struct __is_nt_invocable_impl : false_type { }; + + template + struct __is_nt_invocable_impl<_Result, _Ret, + __void_t> + : __or_, + __is_nothrow_convertible> + { }; + + + template + struct is_nothrow_invocable_r + : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>, + __call_is_nothrow_<_Fn, _ArgTypes...>>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), + "_Fn must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}), + "_Ret must be a complete class or an unbounded array"); + }; + + + template + inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; + + + template + inline constexpr bool is_nothrow_invocable_v + = is_nothrow_invocable<_Fn, _Args...>::value; + + + template + inline constexpr bool is_invocable_r_v + = is_invocable_r<_Ret, _Fn, _Args...>::value; + + + template + inline constexpr bool is_nothrow_invocable_r_v + = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; + + + + +template + inline constexpr bool is_void_v = is_void<_Tp>::value; +template + inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; +template + inline constexpr bool is_integral_v = is_integral<_Tp>::value; +template + inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; +template + inline constexpr bool is_array_v = is_array<_Tp>::value; +template + inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; +template + inline constexpr bool is_lvalue_reference_v = + is_lvalue_reference<_Tp>::value; +template + inline constexpr bool is_rvalue_reference_v = + is_rvalue_reference<_Tp>::value; +template + inline constexpr bool is_member_object_pointer_v = + is_member_object_pointer<_Tp>::value; +template + inline constexpr bool is_member_function_pointer_v = + is_member_function_pointer<_Tp>::value; +template + inline constexpr bool is_enum_v = is_enum<_Tp>::value; +template + inline constexpr bool is_union_v = is_union<_Tp>::value; +template + inline constexpr bool is_class_v = is_class<_Tp>::value; +template + inline constexpr bool is_function_v = is_function<_Tp>::value; +template + inline constexpr bool is_reference_v = is_reference<_Tp>::value; +template + inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; +template + inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; +template + inline constexpr bool is_object_v = is_object<_Tp>::value; +template + inline constexpr bool is_scalar_v = is_scalar<_Tp>::value; +template + inline constexpr bool is_compound_v = is_compound<_Tp>::value; +template + inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; +template + inline constexpr bool is_const_v = is_const<_Tp>::value; +template + inline constexpr bool is_volatile_v = is_volatile<_Tp>::value; +template + inline constexpr bool is_trivial_v = is_trivial<_Tp>::value; +template + inline constexpr bool is_trivially_copyable_v = + is_trivially_copyable<_Tp>::value; +template + inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +template + [[deprecated("use is_standard_layout_v && is_trivial_v instead")]] + inline constexpr bool is_pod_v = is_pod<_Tp>::value; +template + [[__deprecated__]] + inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; +#pragma GCC diagnostic pop + template + inline constexpr bool is_empty_v = is_empty<_Tp>::value; +template + inline constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; +template + inline constexpr bool is_abstract_v = is_abstract<_Tp>::value; +template + inline constexpr bool is_final_v = is_final<_Tp>::value; +template + inline constexpr bool is_signed_v = is_signed<_Tp>::value; +template + inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; +template + inline constexpr bool is_constructible_v = + is_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_default_constructible_v = + is_default_constructible<_Tp>::value; +template + inline constexpr bool is_copy_constructible_v = + is_copy_constructible<_Tp>::value; +template + inline constexpr bool is_move_constructible_v = + is_move_constructible<_Tp>::value; +template + inline constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; +template + inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; +template + inline constexpr bool is_destructible_v = is_destructible<_Tp>::value; +template + inline constexpr bool is_trivially_constructible_v = + is_trivially_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_trivially_default_constructible_v = + is_trivially_default_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_copy_constructible_v = + is_trivially_copy_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_move_constructible_v = + is_trivially_move_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_assignable_v = + is_trivially_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_trivially_copy_assignable_v = + is_trivially_copy_assignable<_Tp>::value; +template + inline constexpr bool is_trivially_move_assignable_v = + is_trivially_move_assignable<_Tp>::value; +template + inline constexpr bool is_trivially_destructible_v = + is_trivially_destructible<_Tp>::value; +template + inline constexpr bool is_nothrow_constructible_v = + is_nothrow_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_nothrow_default_constructible_v = + is_nothrow_default_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_copy_constructible_v = + is_nothrow_copy_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_move_constructible_v = + is_nothrow_move_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_assignable_v = + is_nothrow_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_nothrow_copy_assignable_v = + is_nothrow_copy_assignable<_Tp>::value; +template + inline constexpr bool is_nothrow_move_assignable_v = + is_nothrow_move_assignable<_Tp>::value; +template + inline constexpr bool is_nothrow_destructible_v = + is_nothrow_destructible<_Tp>::value; +template + inline constexpr bool has_virtual_destructor_v = + has_virtual_destructor<_Tp>::value; +template + inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value; +template + inline constexpr size_t rank_v = rank<_Tp>::value; +template + inline constexpr size_t extent_v = extent<_Tp, _Idx>::value; + +template + inline constexpr bool is_same_v = __is_same(_Tp, _Up); + + + + +template + inline constexpr bool is_base_of_v = is_base_of<_Base, _Derived>::value; +template + inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value; + + + + + template + struct has_unique_object_representations + : bool_constant<__has_unique_object_representations( + remove_cv_t> + )> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + inline constexpr bool has_unique_object_representations_v + = has_unique_object_representations<_Tp>::value; + + + + + + template + struct is_aggregate + : bool_constant<__is_aggregate(remove_cv_t<_Tp>)> + { }; + + + template + inline constexpr bool is_aggregate_v = is_aggregate<_Tp>::value; + + + + + + + + template + struct remove_cvref + : remove_cv<_Tp> + { }; + + template + struct remove_cvref<_Tp&> + : remove_cv<_Tp> + { }; + + template + struct remove_cvref<_Tp&&> + : remove_cv<_Tp> + { }; + + template + using remove_cvref_t = typename remove_cvref<_Tp>::type; + + + + template + struct type_identity { using type = _Tp; }; + + template + using type_identity_t = typename type_identity<_Tp>::type; + + + + + template + struct unwrap_reference { using type = _Tp; }; + + template + struct unwrap_reference> { using type = _Tp&; }; + + template + using unwrap_reference_t = typename unwrap_reference<_Tp>::type; + + + template + struct unwrap_ref_decay { using type = unwrap_reference_t>; }; + + template + using unwrap_ref_decay_t = typename unwrap_ref_decay<_Tp>::type; + + + + + template + struct is_bounded_array + : public __is_array_known_bounds<_Tp> + { }; + + + template + struct is_unbounded_array + : public __is_array_unknown_bounds<_Tp> + { }; + + template + inline constexpr bool is_bounded_array_v + = is_bounded_array<_Tp>::value; + + template + inline constexpr bool is_unbounded_array_v + = is_unbounded_array<_Tp>::value; +# 3323 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + constexpr inline bool + is_constant_evaluated() noexcept + { return __builtin_is_constant_evaluated(); } + + + template + using __copy_cv = typename __match_cv_qualifiers<_From, _To>::__type; + + template + using __cond_res + = decltype(false ? declval<_Xp(&)()>()() : declval<_Yp(&)()>()()); + + template + struct __common_ref_impl + { }; + + + template + using __common_ref = typename __common_ref_impl<_Ap, _Bp>::type; + + + template + using __condres_cvref + = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>; + + + template + struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>> + : enable_if>, + __condres_cvref<_Xp, _Yp>> + { }; + + + template + using __common_ref_C = remove_reference_t<__common_ref<_Xp&, _Yp&>>&&; + + + template + struct __common_ref_impl<_Xp&&, _Yp&&, + _Require>, + is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>> + { using type = __common_ref_C<_Xp, _Yp>; }; + + + template + using __common_ref_D = __common_ref; + + + template + struct __common_ref_impl<_Xp&&, _Yp&, + _Require>>> + { using type = __common_ref_D<_Xp, _Yp>; }; + + + template + struct __common_ref_impl<_Xp&, _Yp&&> + : __common_ref_impl<_Yp&&, _Xp&> + { }; + + template class _TQual, template class _UQual> + struct basic_common_reference + { }; + + template + struct __xref + { template using __type = __copy_cv<_Tp, _Up>; }; + + template + struct __xref<_Tp&> + { template using __type = __copy_cv<_Tp, _Up>&; }; + + template + struct __xref<_Tp&&> + { template using __type = __copy_cv<_Tp, _Up>&&; }; + + template + using __basic_common_ref + = typename basic_common_reference, + remove_cvref_t<_Tp2>, + __xref<_Tp1>::template __type, + __xref<_Tp2>::template __type>::type; + + template + struct common_reference; + + template + using common_reference_t = typename common_reference<_Tp...>::type; + + + template<> + struct common_reference<> + { }; + + + template + struct common_reference<_Tp0> + { using type = _Tp0; }; + + template + struct __common_reference_impl + : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1> + { }; + + + template + struct common_reference<_Tp1, _Tp2> + : __common_reference_impl<_Tp1, _Tp2> + { }; + + + template + struct __common_reference_impl<_Tp1&, _Tp2&, 1, + void_t<__common_ref<_Tp1&, _Tp2&>>> + { using type = __common_ref<_Tp1&, _Tp2&>; }; + + template + struct __common_reference_impl<_Tp1&&, _Tp2&&, 1, + void_t<__common_ref<_Tp1&&, _Tp2&&>>> + { using type = __common_ref<_Tp1&&, _Tp2&&>; }; + + template + struct __common_reference_impl<_Tp1&, _Tp2&&, 1, + void_t<__common_ref<_Tp1&, _Tp2&&>>> + { using type = __common_ref<_Tp1&, _Tp2&&>; }; + + template + struct __common_reference_impl<_Tp1&&, _Tp2&, 1, + void_t<__common_ref<_Tp1&&, _Tp2&>>> + { using type = __common_ref<_Tp1&&, _Tp2&>; }; + + + template + struct __common_reference_impl<_Tp1, _Tp2, 2, + void_t<__basic_common_ref<_Tp1, _Tp2>>> + { using type = __basic_common_ref<_Tp1, _Tp2>; }; + + + template + struct __common_reference_impl<_Tp1, _Tp2, 3, + void_t<__cond_res<_Tp1, _Tp2>>> + { using type = __cond_res<_Tp1, _Tp2>; }; + + + template + struct __common_reference_impl<_Tp1, _Tp2, 4, + void_t>> + { using type = common_type_t<_Tp1, _Tp2>; }; + + + template + struct __common_reference_impl<_Tp1, _Tp2, 5, void> + { }; + + + template + struct common_reference<_Tp1, _Tp2, _Rest...> + : __common_type_fold, + __common_type_pack<_Rest...>> + { }; + + + template + struct __common_type_fold, + __common_type_pack<_Rest...>, + void_t>> + : public common_reference, _Rest...> + { }; + + + + +} +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 2 3 + +namespace std +{ + +# 74 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 + template + [[__nodiscard__]] + constexpr _Tp&& + forward(typename std::remove_reference<_Tp>::type& __t) noexcept + { return static_cast<_Tp&&>(__t); } + + + + + + + + template + [[__nodiscard__]] + constexpr _Tp&& + forward(typename std::remove_reference<_Tp>::type&& __t) noexcept + { + static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" + " substituting _Tp must not be an lvalue reference type"); + return static_cast<_Tp&&>(__t); + } + + + + + + + template + [[__nodiscard__]] + constexpr typename std::remove_reference<_Tp>::type&& + move(_Tp&& __t) noexcept + { return static_cast::type&&>(__t); } + + + template + struct __move_if_noexcept_cond + : public __and_<__not_>, + is_copy_constructible<_Tp>>::type { }; +# 121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 + template + [[__nodiscard__]] + constexpr typename + conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type + move_if_noexcept(_Tp& __x) noexcept + { return std::move(__x); } +# 142 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 + template + [[__nodiscard__]] + inline constexpr _Tp* + addressof(_Tp& __r) noexcept + { return std::__addressof(__r); } + + + + template + const _Tp* addressof(const _Tp&&) = delete; + + + template + constexpr + inline _Tp + __exchange(_Tp& __obj, _Up&& __new_val) + { + _Tp __old_val = std::move(__obj); + __obj = std::forward<_Up>(__new_val); + return __old_val; + } +# 186 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 + template + constexpr + inline + + typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, + is_move_constructible<_Tp>, + is_move_assignable<_Tp>>::value>::type + + + + swap(_Tp& __a, _Tp& __b) + noexcept(__and_, is_nothrow_move_assignable<_Tp>>::value) + + { + + + + + _Tp __tmp = std::move(__a); + __a = std::move(__b); + __b = std::move(__tmp); + } + + + + + template + constexpr + inline + + typename enable_if<__is_swappable<_Tp>::value>::type + + + + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + noexcept(__is_nothrow_swappable<_Tp>::value) + { + for (size_t __n = 0; __n < _Nm; ++__n) + swap(__a[__n], __b[__n]); + } + + + +} +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 2 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/compare" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/compare" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/compare" 3 + + + +#pragma GCC visibility push(default) + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/concepts" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/concepts" 3 + +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/concepts" 3 +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/concepts" 3 +namespace std +{ + + + + + + + namespace __detail + { + template + concept __same_as = std::is_same_v<_Tp, _Up>; + } + + + template + concept same_as + = __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>; + + + template + concept derived_from = __is_base_of(_Base, _Derived) + && is_convertible_v; + + + template + concept convertible_to = is_convertible_v<_From, _To> + && requires(add_rvalue_reference_t<_From> (&__f)()) { + static_cast<_To>(__f()); + }; + + + template + concept common_reference_with + = same_as, common_reference_t<_Up, _Tp>> + && convertible_to<_Tp, common_reference_t<_Tp, _Up>> + && convertible_to<_Up, common_reference_t<_Tp, _Up>>; + + + template + concept common_with + = same_as, common_type_t<_Up, _Tp>> + && requires { + static_cast>(std::declval<_Tp>()); + static_cast>(std::declval<_Up>()); + } + && common_reference_with, + add_lvalue_reference_t> + && common_reference_with>, + common_reference_t< + add_lvalue_reference_t, + add_lvalue_reference_t>>; + + + + template + concept integral = is_integral_v<_Tp>; + + template + concept signed_integral = integral<_Tp> && is_signed_v<_Tp>; + + template + concept unsigned_integral = integral<_Tp> && !signed_integral<_Tp>; + + template + concept floating_point = is_floating_point_v<_Tp>; + + namespace __detail + { + template + using __cref = const remove_reference_t<_Tp>&; + + template + concept __class_or_enum + = is_class_v<_Tp> || is_union_v<_Tp> || is_enum_v<_Tp>; + } + + + template + concept assignable_from + = is_lvalue_reference_v<_Lhs> + && common_reference_with<__detail::__cref<_Lhs>, __detail::__cref<_Rhs>> + && requires(_Lhs __lhs, _Rhs&& __rhs) { + { __lhs = static_cast<_Rhs&&>(__rhs) } -> same_as<_Lhs>; + }; + + + template + concept destructible = is_nothrow_destructible_v<_Tp>; + + + template + concept constructible_from + = destructible<_Tp> && is_constructible_v<_Tp, _Args...>; + + + template + concept default_initializable = constructible_from<_Tp> + && requires + { + _Tp{}; + (void) ::new _Tp; + }; + + + template + concept move_constructible + = constructible_from<_Tp, _Tp> && convertible_to<_Tp, _Tp>; + + + template + concept copy_constructible + = move_constructible<_Tp> + && constructible_from<_Tp, _Tp&> && convertible_to<_Tp&, _Tp> + && constructible_from<_Tp, const _Tp&> && convertible_to + && constructible_from<_Tp, const _Tp> && convertible_to; + + + + namespace ranges + { + namespace __cust_swap + { + template void swap(_Tp&, _Tp&) = delete; + + template + concept __adl_swap + = (__detail::__class_or_enum> + || __detail::__class_or_enum>) + && requires(_Tp&& __t, _Up&& __u) { + swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); + }; + + struct _Swap + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__adl_swap<_Tp, _Up>) + return noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())); + else + return is_nothrow_move_constructible_v> + && is_nothrow_move_assignable_v>; + } + + public: + template + requires __adl_swap<_Tp, _Up> + || (same_as<_Tp, _Up> && is_lvalue_reference_v<_Tp> + && move_constructible> + && assignable_from<_Tp, remove_reference_t<_Tp>>) + constexpr void + operator()(_Tp&& __t, _Up&& __u) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + if constexpr (__adl_swap<_Tp, _Up>) + swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); + else + { + auto __tmp = static_cast&&>(__t); + __t = static_cast&&>(__u); + __u = static_cast&&>(__tmp); + } + } + + template + requires requires(const _Swap& __swap, _Tp& __e1, _Up& __e2) { + __swap(__e1, __e2); + } + constexpr void + operator()(_Tp (&__e1)[_Num], _Up (&__e2)[_Num]) const + noexcept(noexcept(std::declval()(*__e1, *__e2))) + { + for (size_t __n = 0; __n < _Num; ++__n) + (*this)(__e1[__n], __e2[__n]); + } + }; + } + + inline namespace __cust + { + inline constexpr __cust_swap::_Swap swap{}; + } + } + + template + concept swappable + = requires(_Tp& __a, _Tp& __b) { ranges::swap(__a, __b); }; + + template + concept swappable_with = common_reference_with<_Tp, _Up> + && requires(_Tp&& __t, _Up&& __u) { + ranges::swap(static_cast<_Tp&&>(__t), static_cast<_Tp&&>(__t)); + ranges::swap(static_cast<_Up&&>(__u), static_cast<_Up&&>(__u)); + ranges::swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); + ranges::swap(static_cast<_Up&&>(__u), static_cast<_Tp&&>(__t)); + }; + + + + template + concept movable = is_object_v<_Tp> && move_constructible<_Tp> + && assignable_from<_Tp&, _Tp> && swappable<_Tp>; + + template + concept copyable = copy_constructible<_Tp> && movable<_Tp> + && assignable_from<_Tp&, _Tp&> && assignable_from<_Tp&, const _Tp&> + && assignable_from<_Tp&, const _Tp>; + + template + concept semiregular = copyable<_Tp> && default_initializable<_Tp>; + + + + + namespace __detail + { + template + concept __boolean_testable_impl = convertible_to<_Tp, bool>; + + template + concept __boolean_testable + = __boolean_testable_impl<_Tp> + && requires(_Tp&& __t) + { { !static_cast<_Tp&&>(__t) } -> __boolean_testable_impl; }; + } + + + + namespace __detail + { + template + concept __weakly_eq_cmp_with + = requires(__detail::__cref<_Tp> __t, __detail::__cref<_Up> __u) { + { __t == __u } -> __boolean_testable; + { __t != __u } -> __boolean_testable; + { __u == __t } -> __boolean_testable; + { __u != __t } -> __boolean_testable; + }; + } + + template + concept equality_comparable = __detail::__weakly_eq_cmp_with<_Tp, _Tp>; + + template + concept equality_comparable_with + = equality_comparable<_Tp> && equality_comparable<_Up> + && common_reference_with<__detail::__cref<_Tp>, __detail::__cref<_Up>> + && equality_comparable, + __detail::__cref<_Up>>> + && __detail::__weakly_eq_cmp_with<_Tp, _Up>; + + namespace __detail + { + template + concept __partially_ordered_with + = requires(const remove_reference_t<_Tp>& __t, + const remove_reference_t<_Up>& __u) { + { __t < __u } -> __boolean_testable; + { __t > __u } -> __boolean_testable; + { __t <= __u } -> __boolean_testable; + { __t >= __u } -> __boolean_testable; + { __u < __t } -> __boolean_testable; + { __u > __t } -> __boolean_testable; + { __u <= __t } -> __boolean_testable; + { __u >= __t } -> __boolean_testable; + }; + } + + + template + concept totally_ordered + = equality_comparable<_Tp> + && __detail::__partially_ordered_with<_Tp, _Tp>; + + template + concept totally_ordered_with + = totally_ordered<_Tp> && totally_ordered<_Up> + && equality_comparable_with<_Tp, _Up> + && totally_ordered, + __detail::__cref<_Up>>> + && __detail::__partially_ordered_with<_Tp, _Up>; + + template + concept regular = semiregular<_Tp> && equality_comparable<_Tp>; + + + + + template + concept invocable = is_invocable_v<_Fn, _Args...>; + + + template + concept regular_invocable = invocable<_Fn, _Args...>; + + + template + concept predicate = regular_invocable<_Fn, _Args...> + && __detail::__boolean_testable>; + + + template + concept relation + = predicate<_Rel, _Tp, _Tp> && predicate<_Rel, _Up, _Up> + && predicate<_Rel, _Tp, _Up> && predicate<_Rel, _Up, _Tp>; + + + template + concept equivalence_relation = relation<_Rel, _Tp, _Up>; + + + template + concept strict_weak_order = relation<_Rel, _Tp, _Up>; + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/compare" 2 3 + + + + + +namespace std +{ + + + namespace __cmp_cat + { + using type = signed char; + + enum class _Ord : type { equivalent = 0, less = -1, greater = 1 }; + + enum class _Ncmp : type { _Unordered = 2 }; + + struct __unspec + { + constexpr __unspec(__unspec*) noexcept { } + }; + } + + class partial_ordering + { + + __cmp_cat::type _M_value; + + constexpr explicit + partial_ordering(__cmp_cat::_Ord __v) noexcept + : _M_value(__cmp_cat::type(__v)) + { } + + constexpr explicit + partial_ordering(__cmp_cat::_Ncmp __v) noexcept + : _M_value(__cmp_cat::type(__v)) + { } + + friend class weak_ordering; + friend class strong_ordering; + + public: + + static const partial_ordering less; + static const partial_ordering equivalent; + static const partial_ordering greater; + static const partial_ordering unordered; + + + friend constexpr bool + operator==(partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == 0; } + + friend constexpr bool + operator==(partial_ordering, partial_ordering) noexcept = default; + + friend constexpr bool + operator< (partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == -1; } + + friend constexpr bool + operator> (partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == 1; } + + friend constexpr bool + operator<=(partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value <= 0; } + + friend constexpr bool + operator>=(partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __cmp_cat::type(__v._M_value & 1) == __v._M_value; } + + friend constexpr bool + operator< (__cmp_cat::__unspec, partial_ordering __v) noexcept + { return __v._M_value == 1; } + + friend constexpr bool + operator> (__cmp_cat::__unspec, partial_ordering __v) noexcept + { return __v._M_value == -1; } + + friend constexpr bool + operator<=(__cmp_cat::__unspec, partial_ordering __v) noexcept + { return __cmp_cat::type(__v._M_value & 1) == __v._M_value; } + + friend constexpr bool + operator>=(__cmp_cat::__unspec, partial_ordering __v) noexcept + { return 0 >= __v._M_value; } + + friend constexpr partial_ordering + operator<=>(partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v; } + + friend constexpr partial_ordering + operator<=>(__cmp_cat::__unspec, partial_ordering __v) noexcept + { + if (__v._M_value & 1) + return partial_ordering(__cmp_cat::_Ord(-__v._M_value)); + else + return __v; + } + }; + + + inline constexpr partial_ordering + partial_ordering::less(__cmp_cat::_Ord::less); + + inline constexpr partial_ordering + partial_ordering::equivalent(__cmp_cat::_Ord::equivalent); + + inline constexpr partial_ordering + partial_ordering::greater(__cmp_cat::_Ord::greater); + + inline constexpr partial_ordering + partial_ordering::unordered(__cmp_cat::_Ncmp::_Unordered); + + class weak_ordering + { + __cmp_cat::type _M_value; + + constexpr explicit + weak_ordering(__cmp_cat::_Ord __v) noexcept : _M_value(__cmp_cat::type(__v)) + { } + + friend class strong_ordering; + + public: + + static const weak_ordering less; + static const weak_ordering equivalent; + static const weak_ordering greater; + + constexpr operator partial_ordering() const noexcept + { return partial_ordering(__cmp_cat::_Ord(_M_value)); } + + + friend constexpr bool + operator==(weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == 0; } + + friend constexpr bool + operator==(weak_ordering, weak_ordering) noexcept = default; + + friend constexpr bool + operator< (weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value < 0; } + + friend constexpr bool + operator> (weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value > 0; } + + friend constexpr bool + operator<=(weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value <= 0; } + + friend constexpr bool + operator>=(weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value >= 0; } + + friend constexpr bool + operator< (__cmp_cat::__unspec, weak_ordering __v) noexcept + { return 0 < __v._M_value; } + + friend constexpr bool + operator> (__cmp_cat::__unspec, weak_ordering __v) noexcept + { return 0 > __v._M_value; } + + friend constexpr bool + operator<=(__cmp_cat::__unspec, weak_ordering __v) noexcept + { return 0 <= __v._M_value; } + + friend constexpr bool + operator>=(__cmp_cat::__unspec, weak_ordering __v) noexcept + { return 0 >= __v._M_value; } + + friend constexpr weak_ordering + operator<=>(weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v; } + + friend constexpr weak_ordering + operator<=>(__cmp_cat::__unspec, weak_ordering __v) noexcept + { return weak_ordering(__cmp_cat::_Ord(-__v._M_value)); } + }; + + + inline constexpr weak_ordering + weak_ordering::less(__cmp_cat::_Ord::less); + + inline constexpr weak_ordering + weak_ordering::equivalent(__cmp_cat::_Ord::equivalent); + + inline constexpr weak_ordering + weak_ordering::greater(__cmp_cat::_Ord::greater); + + class strong_ordering + { + __cmp_cat::type _M_value; + + constexpr explicit + strong_ordering(__cmp_cat::_Ord __v) noexcept + : _M_value(__cmp_cat::type(__v)) + { } + + public: + + static const strong_ordering less; + static const strong_ordering equal; + static const strong_ordering equivalent; + static const strong_ordering greater; + + constexpr operator partial_ordering() const noexcept + { return partial_ordering(__cmp_cat::_Ord(_M_value)); } + + constexpr operator weak_ordering() const noexcept + { return weak_ordering(__cmp_cat::_Ord(_M_value)); } + + + friend constexpr bool + operator==(strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == 0; } + + friend constexpr bool + operator==(strong_ordering, strong_ordering) noexcept = default; + + friend constexpr bool + operator< (strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value < 0; } + + friend constexpr bool + operator> (strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value > 0; } + + friend constexpr bool + operator<=(strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value <= 0; } + + friend constexpr bool + operator>=(strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value >= 0; } + + friend constexpr bool + operator< (__cmp_cat::__unspec, strong_ordering __v) noexcept + { return 0 < __v._M_value; } + + friend constexpr bool + operator> (__cmp_cat::__unspec, strong_ordering __v) noexcept + { return 0 > __v._M_value; } + + friend constexpr bool + operator<=(__cmp_cat::__unspec, strong_ordering __v) noexcept + { return 0 <= __v._M_value; } + + friend constexpr bool + operator>=(__cmp_cat::__unspec, strong_ordering __v) noexcept + { return 0 >= __v._M_value; } + + friend constexpr strong_ordering + operator<=>(strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v; } + + friend constexpr strong_ordering + operator<=>(__cmp_cat::__unspec, strong_ordering __v) noexcept + { return strong_ordering(__cmp_cat::_Ord(-__v._M_value)); } + }; + + + inline constexpr strong_ordering + strong_ordering::less(__cmp_cat::_Ord::less); + + inline constexpr strong_ordering + strong_ordering::equal(__cmp_cat::_Ord::equivalent); + + inline constexpr strong_ordering + strong_ordering::equivalent(__cmp_cat::_Ord::equivalent); + + inline constexpr strong_ordering + strong_ordering::greater(__cmp_cat::_Ord::greater); + + + + constexpr bool + is_eq(partial_ordering __cmp) noexcept + { return __cmp == 0; } + + constexpr bool + is_neq(partial_ordering __cmp) noexcept + { return __cmp != 0; } + + constexpr bool + is_lt (partial_ordering __cmp) noexcept + { return __cmp < 0; } + + constexpr bool + is_lteq(partial_ordering __cmp) noexcept + { return __cmp <= 0; } + + constexpr bool + is_gt (partial_ordering __cmp) noexcept + { return __cmp > 0; } + + constexpr bool + is_gteq(partial_ordering __cmp) noexcept + { return __cmp >= 0; } + + namespace __detail + { + template + inline constexpr unsigned __cmp_cat_id = 1; + template<> + inline constexpr unsigned __cmp_cat_id = 2; + template<> + inline constexpr unsigned __cmp_cat_id = 4; + template<> + inline constexpr unsigned __cmp_cat_id = 8; + + template + constexpr auto __common_cmp_cat() + { + constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...); + + if constexpr (__cats & 1) + return; + + + else if constexpr (bool(__cats & __cmp_cat_id)) + return partial_ordering::equivalent; + + + else if constexpr (bool(__cats & __cmp_cat_id)) + return weak_ordering::equivalent; + + else + return strong_ordering::equivalent; + } + } + + + template + struct common_comparison_category + { + using type = decltype(__detail::__common_cmp_cat<_Ts...>()); + }; + + + + template + struct common_comparison_category<_Tp> + { using type = void; }; + + template<> + struct common_comparison_category + { using type = partial_ordering; }; + + template<> + struct common_comparison_category + { using type = weak_ordering; }; + + template<> + struct common_comparison_category + { using type = strong_ordering; }; + + template<> + struct common_comparison_category<> + { using type = strong_ordering; }; + + template + using common_comparison_category_t + = typename common_comparison_category<_Ts...>::type; + + + namespace __detail + { + template + concept __compares_as + = same_as, _Cat>; + } + + + template + concept three_way_comparable + = __detail::__weakly_eq_cmp_with<_Tp, _Tp> + && __detail::__partially_ordered_with<_Tp, _Tp> + && requires(const remove_reference_t<_Tp>& __a, + const remove_reference_t<_Tp>& __b) + { + { __a <=> __b } -> __detail::__compares_as<_Cat>; + }; + + template + concept three_way_comparable_with + = three_way_comparable<_Tp, _Cat> + && three_way_comparable<_Up, _Cat> + && common_reference_with&, + const remove_reference_t<_Up>&> + && three_way_comparable< + common_reference_t&, + const remove_reference_t<_Up>&>, _Cat> + && __detail::__weakly_eq_cmp_with<_Tp, _Up> + && __detail::__partially_ordered_with<_Tp, _Up> + && requires(const remove_reference_t<_Tp>& __t, + const remove_reference_t<_Up>& __u) + { + { __t <=> __u } -> __detail::__compares_as<_Cat>; + { __u <=> __t } -> __detail::__compares_as<_Cat>; + }; + + namespace __detail + { + template + using __cmp3way_res_t + = decltype(std::declval<_Tp>() <=> std::declval<_Up>()); + + + + + + + template + struct __cmp3way_res_impl + { }; + + template + requires requires { typename __cmp3way_res_t<__cref<_Tp>, __cref<_Up>>; } + struct __cmp3way_res_impl<_Tp, _Up> + { + using type = __cmp3way_res_t<__cref<_Tp>, __cref<_Up>>; + }; + } + + + template + struct compare_three_way_result + : __detail::__cmp3way_res_impl<_Tp, _Up> + { }; + + + template + using compare_three_way_result_t + = typename __detail::__cmp3way_res_impl<_Tp, _Up>::type; + + namespace __detail + { + + + + + template + concept __3way_builtin_ptr_cmp + = requires(_Tp&& __t, _Up&& __u) + { static_cast<_Tp&&>(__t) <=> static_cast<_Up&&>(__u); } + && convertible_to<_Tp, const volatile void*> + && convertible_to<_Up, const volatile void*> + && ! requires(_Tp&& __t, _Up&& __u) + { operator<=>(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); } + && ! requires(_Tp&& __t, _Up&& __u) + { static_cast<_Tp&&>(__t).operator<=>(static_cast<_Up&&>(__u)); }; + } + + + + + + struct compare_three_way + { + template + requires three_way_comparable_with<_Tp, _Up> + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Tp>() <=> std::declval<_Up>())) + { + if constexpr (__detail::__3way_builtin_ptr_cmp<_Tp, _Up>) + { + auto __pt = static_cast(__t); + auto __pu = static_cast(__u); + if (__builtin_is_constant_evaluated()) + return __pt <=> __pu; + auto __it = reinterpret_cast(__pt); + auto __iu = reinterpret_cast(__pu); + return __it <=> __iu; + } + else + return static_cast<_Tp&&>(__t) <=> static_cast<_Up&&>(__u); + } + + using is_transparent = void; + }; + + namespace __cmp_cust + { + template + constexpr weak_ordering + __fp_weak_ordering(_Tp __e, _Tp __f) + { + + + auto __cat = [](_Tp __fp) -> int { + const int __sign = __builtin_signbit(__fp) ? -1 : 1; + if (__builtin_isnormal(__fp)) + return (__fp == 0 ? 1 : 3) * __sign; + if (__builtin_isnan(__fp)) + return 5 * __sign; + if (int __inf = __builtin_isinf_sign(__fp)) + return 4 * __inf; + return 2 * __sign; + }; + + auto __po = __e <=> __f; + if (is_lt(__po)) + return weak_ordering::less; + else if (is_gt(__po)) + return weak_ordering::greater; + else if (__po == partial_ordering::equivalent) + return weak_ordering::equivalent; + else + { + + auto __isnan_sign = [](_Tp __fp) -> int { + return __builtin_isnan(__fp) + ? __builtin_signbit(__fp) ? -1 : 1 + : 0; + }; + auto __ord = __isnan_sign(__e) <=> __isnan_sign(__f); + if (is_eq(__ord)) + return weak_ordering::equivalent; + else if (is_lt(__ord)) + return weak_ordering::less; + else + return weak_ordering::greater; + } + } + + template + concept __adl_strong = requires(_Tp&& __t, _Up&& __u) + { + strong_ordering(strong_order(static_cast<_Tp&&>(__t), + static_cast<_Up&&>(__u))); + }; + + template + concept __adl_weak = requires(_Tp&& __t, _Up&& __u) + { + weak_ordering(weak_order(static_cast<_Tp&&>(__t), + static_cast<_Up&&>(__u))); + }; + + template + concept __adl_partial = requires(_Tp&& __t, _Up&& __u) + { + partial_ordering(partial_order(static_cast<_Tp&&>(__t), + static_cast<_Up&&>(__u))); + }; + + template + concept __cmp3way = requires(_Tp&& __t, _Up&& __u, compare_three_way __c) + { + _Ord(__c(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u))); + }; + + template + concept __strongly_ordered + = __adl_strong<_Tp, _Up> + + || __cmp3way; + + class _Strong_order + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (floating_point>) + return true; + else if constexpr (__adl_strong<_Tp, _Up>) + return noexcept(strong_ordering(strong_order(std::declval<_Tp>(), + std::declval<_Up>()))); + else if constexpr (__cmp3way) + return noexcept(compare_three_way()(std::declval<_Tp>(), + std::declval<_Up>())); + } + + friend class _Weak_order; + friend class _Strong_fallback; + + public: + template + requires __strongly_ordered<_Tp, _Up> + constexpr strong_ordering + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + + + + if constexpr (__adl_strong<_Tp, _Up>) + return strong_ordering(strong_order(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f))); + else if constexpr (__cmp3way) + return compare_three_way()(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + } + }; + + template + concept __weakly_ordered + = floating_point> + || __adl_weak<_Tp, _Up> + || __cmp3way + || __strongly_ordered<_Tp, _Up>; + + class _Weak_order + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (floating_point>) + return true; + else if constexpr (__adl_weak<_Tp, _Up>) + return noexcept(weak_ordering(weak_order(std::declval<_Tp>(), + std::declval<_Up>()))); + else if constexpr (__cmp3way) + return noexcept(compare_three_way()(std::declval<_Tp>(), + std::declval<_Up>())); + else if constexpr (__strongly_ordered<_Tp, _Up>) + return _Strong_order::_S_noexcept<_Tp, _Up>(); + } + + friend class _Partial_order; + friend class _Weak_fallback; + + public: + template + requires __weakly_ordered<_Tp, _Up> + constexpr weak_ordering + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (floating_point>) + return __cmp_cust::__fp_weak_ordering(__e, __f); + else if constexpr (__adl_weak<_Tp, _Up>) + return weak_ordering(weak_order(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f))); + else if constexpr (__cmp3way) + return compare_three_way()(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__strongly_ordered<_Tp, _Up>) + return _Strong_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + } + }; + + template + concept __partially_ordered + = __adl_partial<_Tp, _Up> + || __cmp3way + || __weakly_ordered<_Tp, _Up>; + + class _Partial_order + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (__adl_partial<_Tp, _Up>) + return noexcept(partial_ordering(partial_order(std::declval<_Tp>(), + std::declval<_Up>()))); + else if constexpr (__cmp3way) + return noexcept(compare_three_way()(std::declval<_Tp>(), + std::declval<_Up>())); + else if constexpr (__weakly_ordered<_Tp, _Up>) + return _Weak_order::_S_noexcept<_Tp, _Up>(); + } + + friend class _Partial_fallback; + + public: + template + requires __partially_ordered<_Tp, _Up> + constexpr partial_ordering + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (__adl_partial<_Tp, _Up>) + return partial_ordering(partial_order(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f))); + else if constexpr (__cmp3way) + return compare_three_way()(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__weakly_ordered<_Tp, _Up>) + return _Weak_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + } + }; + + template + concept __op_eq_lt = requires(_Tp&& __t, _Up&& __u) + { + { static_cast<_Tp&&>(__t) == static_cast<_Up&&>(__u) } + -> convertible_to; + { static_cast<_Tp&&>(__t) < static_cast<_Up&&>(__u) } + -> convertible_to; + }; + + class _Strong_fallback + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (__strongly_ordered<_Tp, _Up>) + return _Strong_order::_S_noexcept<_Tp, _Up>(); + else + return noexcept(bool(std::declval<_Tp>() == std::declval<_Up>())) + && noexcept(bool(std::declval<_Tp>() < std::declval<_Up>())); + } + + public: + template + requires __strongly_ordered<_Tp, _Up> || __op_eq_lt<_Tp, _Up> + constexpr decltype(auto) + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (__strongly_ordered<_Tp, _Up>) + return _Strong_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__op_eq_lt<_Tp, _Up>) + return static_cast<_Tp&&>(__e) == static_cast<_Up&&>(__f) + ? strong_ordering::equal + : static_cast<_Tp&&>(__e) < static_cast<_Up&&>(__f) + ? strong_ordering::less + : strong_ordering::greater; + } + }; + + class _Weak_fallback + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (__weakly_ordered<_Tp, _Up>) + return _Weak_order::_S_noexcept<_Tp, _Up>(); + else + return noexcept(bool(std::declval<_Tp>() == std::declval<_Up>())) + && noexcept(bool(std::declval<_Tp>() < std::declval<_Up>())); + } + + public: + template + requires __weakly_ordered<_Tp, _Up> || __op_eq_lt<_Tp, _Up> + constexpr decltype(auto) + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (__weakly_ordered<_Tp, _Up>) + return _Weak_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__op_eq_lt<_Tp, _Up>) + return static_cast<_Tp&&>(__e) == static_cast<_Up&&>(__f) + ? weak_ordering::equivalent + : static_cast<_Tp&&>(__e) < static_cast<_Up&&>(__f) + ? weak_ordering::less + : weak_ordering::greater; + } + }; + + class _Partial_fallback + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (__partially_ordered<_Tp, _Up>) + return _Partial_order::_S_noexcept<_Tp, _Up>(); + else + return noexcept(bool(std::declval<_Tp>() == std::declval<_Up>())) + && noexcept(bool(std::declval<_Tp>() < std::declval<_Up>())); + } + + public: + template + requires __partially_ordered<_Tp, _Up> || __op_eq_lt<_Tp, _Up> + constexpr decltype(auto) + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (__partially_ordered<_Tp, _Up>) + return _Partial_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__op_eq_lt<_Tp, _Up>) + return static_cast<_Tp&&>(__e) == static_cast<_Up&&>(__f) + ? partial_ordering::equivalent + : static_cast<_Tp&&>(__e) < static_cast<_Up&&>(__f) + ? partial_ordering::less + : static_cast<_Up&&>(__f) < static_cast<_Tp&&>(__e) + ? partial_ordering::greater + : partial_ordering::unordered; + } + }; + } + + + inline namespace __cmp_alg + { + inline constexpr __cmp_cust::_Strong_order strong_order{}; + + inline constexpr __cmp_cust::_Weak_order weak_order{}; + + inline constexpr __cmp_cust::_Partial_order partial_order{}; + + inline constexpr __cmp_cust::_Strong_fallback + compare_strong_order_fallback{}; + + inline constexpr __cmp_cust::_Weak_fallback + compare_weak_order_fallback{}; + + inline constexpr __cmp_cust::_Partial_fallback + compare_partial_order_fallback{}; + } + + namespace __detail + { + + inline constexpr struct _Synth3way + { + template + static constexpr bool + _S_noexcept(const _Tp* __t = nullptr, const _Up* __u = nullptr) + { + if constexpr (three_way_comparable_with<_Tp, _Up>) + return noexcept(*__t <=> *__u); + else + return noexcept(*__t < *__u) && noexcept(*__u < *__t); + } + + template + constexpr auto + operator()(const _Tp& __t, const _Up& __u) const + noexcept(_S_noexcept<_Tp, _Up>()) + requires requires + { + { __t < __u } -> __boolean_testable; + { __u < __t } -> __boolean_testable; + } + { + if constexpr (three_way_comparable_with<_Tp, _Up>) + return __t <=> __u; + else + { + if (__t < __u) + return weak_ordering::less; + else if (__u < __t) + return weak_ordering::greater; + else + return weak_ordering::equivalent; + } + } + } __synth3way = {}; + + + template + using __synth3way_t + = decltype(__detail::__synth3way(std::declval<_Tp&>(), + std::declval<_Up&>())); + } + +} + +#pragma GCC visibility pop +# 66 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 2 3 + + + +namespace std +{ + +# 80 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; + + + inline constexpr piecewise_construct_t piecewise_construct = + piecewise_construct_t(); + + + + + template + class tuple; + + template + struct _Index_tuple; + + + + + + + template + struct _PCC + { + template + static constexpr bool _ConstructiblePair() + { + return __and_, + is_constructible<_T2, const _U2&>>::value; + } + + template + static constexpr bool _ImplicitlyConvertiblePair() + { + return __and_, + is_convertible>::value; + } + + template + static constexpr bool _MoveConstructiblePair() + { + return __and_, + is_constructible<_T2, _U2&&>>::value; + } + + template + static constexpr bool _ImplicitlyMoveConvertiblePair() + { + return __and_, + is_convertible<_U2&&, _T2>>::value; + } + + template + static constexpr bool _CopyMovePair() + { + using __do_converts = __and_, + is_convertible<_U2&&, _T2>>; + using __converts = typename conditional<__implicit, + __do_converts, + __not_<__do_converts>>::type; + return __and_, + is_constructible<_T2, _U2&&>, + __converts + >::value; + } + + template + static constexpr bool _MoveCopyPair() + { + using __do_converts = __and_, + is_convertible>; + using __converts = typename conditional<__implicit, + __do_converts, + __not_<__do_converts>>::type; + return __and_, + is_constructible<_T2, const _U2&&>, + __converts + >::value; + } + }; + + template + struct _PCC + { + template + static constexpr bool _ConstructiblePair() + { + return false; + } + + template + static constexpr bool _ImplicitlyConvertiblePair() + { + return false; + } + + template + static constexpr bool _MoveConstructiblePair() + { + return false; + } + + template + static constexpr bool _ImplicitlyMoveConvertiblePair() + { + return false; + } + }; + + + template class __pair_base + { + + template friend struct pair; + __pair_base() = default; + ~__pair_base() = default; + __pair_base(const __pair_base&) = default; + __pair_base& operator=(const __pair_base&) = delete; + + }; +# 210 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + template + struct pair + : private __pair_base<_T1, _T2> + { + typedef _T1 first_type; + typedef _T2 second_type; + + _T1 first; + _T2 second; + + + + + + + template , + __is_implicitly_default_constructible<_U2>> + ::value, bool>::type = true> + + constexpr pair() + : first(), second() { } + + + template , + is_default_constructible<_U2>, + __not_< + __and_<__is_implicitly_default_constructible<_U1>, + __is_implicitly_default_constructible<_U2>>>> + ::value, bool>::type = false> + explicit constexpr pair() + : first(), second() { } +# 256 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + using _PCCP = _PCC; + + + + template() + && _PCCP::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } + + + template() + && !_PCCP::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } +# 288 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + template + using _PCCFP = _PCC::value + || !is_same<_T2, _U2>::value, + _T1, _T2>; + + + template::template + _ConstructiblePair<_U1, _U2>() + && _PCCFP<_U1, _U2>::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } + + template::template + _ConstructiblePair<_U1, _U2>() + && !_PCCFP<_U1, _U2>::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } + + + + constexpr pair(const pair&) = default; + constexpr pair(pair&&) = default; + + + template(), + bool>::type=true> + constexpr pair(_U1&& __x, const _T2& __y) + : first(std::forward<_U1>(__x)), second(__y) { } + + template(), + bool>::type=false> + explicit constexpr pair(_U1&& __x, const _T2& __y) + : first(std::forward<_U1>(__x)), second(__y) { } + + template(), + bool>::type=true> + constexpr pair(const _T1& __x, _U2&& __y) + : first(__x), second(std::forward<_U2>(__y)) { } + + template(), + bool>::type=false> + explicit pair(const _T1& __x, _U2&& __y) + : first(__x), second(std::forward<_U2>(__y)) { } + + template() + && _PCCP::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(_U1&& __x, _U2&& __y) + : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } + + template() + && !_PCCP::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(_U1&& __x, _U2&& __y) + : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } + + + template::template + _MoveConstructiblePair<_U1, _U2>() + && _PCCFP<_U1, _U2>::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(pair<_U1, _U2>&& __p) + : first(std::forward<_U1>(__p.first)), + second(std::forward<_U2>(__p.second)) { } + + template::template + _MoveConstructiblePair<_U1, _U2>() + && !_PCCFP<_U1, _U2>::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(pair<_U1, _U2>&& __p) + : first(std::forward<_U1>(__p.first)), + second(std::forward<_U2>(__p.second)) { } + + template + constexpr + pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); + + constexpr pair& + operator=(typename conditional< + __and_, + is_copy_assignable<_T2>>::value, + const pair&, const __nonesuch&>::type __p) + { + first = __p.first; + second = __p.second; + return *this; + } + + constexpr pair& + operator=(typename conditional< + __and_, + is_move_assignable<_T2>>::value, + pair&&, __nonesuch&&>::type __p) + noexcept(__and_, + is_nothrow_move_assignable<_T2>>::value) + { + first = std::forward(__p.first); + second = std::forward(__p.second); + return *this; + } + + template + constexpr + typename enable_if<__and_, + is_assignable<_T2&, const _U2&>>::value, + pair&>::type + operator=(const pair<_U1, _U2>& __p) + { + first = __p.first; + second = __p.second; + return *this; + } + + template + constexpr + typename enable_if<__and_, + is_assignable<_T2&, _U2&&>>::value, + pair&>::type + operator=(pair<_U1, _U2>&& __p) + { + first = std::forward<_U1>(__p.first); + second = std::forward<_U2>(__p.second); + return *this; + } + + + constexpr void + swap(pair& __p) + noexcept(__and_<__is_nothrow_swappable<_T1>, + __is_nothrow_swappable<_T2>>::value) + { + using std::swap; + swap(first, __p.first); + swap(second, __p.second); + } + + private: + template + constexpr + pair(tuple<_Args1...>&, tuple<_Args2...>&, + _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); + + }; + + + + + template pair(_T1, _T2) -> pair<_T1, _T2>; + + + + template + inline constexpr bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + + + template + constexpr common_comparison_category_t<__detail::__synth3way_t<_T1>, + __detail::__synth3way_t<_T2>> + operator<=>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { + if (auto __c = __detail::__synth3way(__x.first, __y.first); __c != 0) + return __c; + return __detail::__synth3way(__x.second, __y.second); + } +# 524 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + template + constexpr inline + + + typename enable_if<__and_<__is_swappable<_T1>, + __is_swappable<_T2>>::value>::type + + + + swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + + template + typename enable_if, + __is_swappable<_T2>>::value>::type + swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; +# 564 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + template + constexpr pair::__type, + typename __decay_and_strip<_T2>::__type> + make_pair(_T1&& __x, _T2&& __y) + { + typedef typename __decay_and_strip<_T1>::__type __ds_type1; + typedef typename __decay_and_strip<_T2>::__type __ds_type2; + typedef pair<__ds_type1, __ds_type2> __pair_type; + return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); + } +# 583 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + +} +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 +# 71 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ptr_traits.h" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ptr_traits.h" 3 +namespace __gnu_debug { struct _Safe_iterator_base; } + + +namespace std +{ + + + class __undefined; + + + template + struct __get_first_arg + { using type = __undefined; }; + + template class _Template, typename _Tp, + typename... _Types> + struct __get_first_arg<_Template<_Tp, _Types...>> + { using type = _Tp; }; + + template + using __get_first_arg_t = typename __get_first_arg<_Tp>::type; + + + template + struct __replace_first_arg + { }; + + template class _Template, typename _Up, + typename _Tp, typename... _Types> + struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> + { using type = _Template<_Up, _Types...>; }; + + template + using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; + + template + using __make_not_void + = typename conditional::value, __undefined, _Tp>::type; + + + + + + template + struct pointer_traits + { + private: + template + using __element_type = typename _Tp::element_type; + + template + using __difference_type = typename _Tp::difference_type; + + template + struct __rebind : __replace_first_arg<_Tp, _Up> { }; + + template + struct __rebind<_Tp, _Up, __void_t>> + { using type = typename _Tp::template rebind<_Up>; }; + + public: + + using pointer = _Ptr; + + + using element_type + = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; + + + using difference_type + = __detected_or_t; + + + template + using rebind = typename __rebind<_Ptr, _Up>::type; + + static _Ptr + pointer_to(__make_not_void& __e) + { return _Ptr::pointer_to(__e); } + + static_assert(!is_same::value, + "pointer type defines element_type or is like SomePointer"); + }; + + + + + + template + struct pointer_traits<_Tp*> + { + + typedef _Tp* pointer; + + typedef _Tp element_type; + + typedef ptrdiff_t difference_type; + + template + using rebind = _Up*; + + + + + + + static constexpr pointer + pointer_to(__make_not_void& __r) noexcept + { return std::addressof(__r); } + }; + + + template + using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; + + template + constexpr _Tp* + __to_address(_Tp* __ptr) noexcept + { + static_assert(!std::is_function<_Tp>::value, "not a function pointer"); + return __ptr; + } + + + + + + + + template + constexpr auto + __to_address(const _Ptr& __ptr) noexcept + -> decltype(std::pointer_traits<_Ptr>::to_address(__ptr)) + { return std::pointer_traits<_Ptr>::to_address(__ptr); } + + template + constexpr auto + __to_address(const _Ptr& __ptr, _None...) noexcept + { + if constexpr (is_base_of_v<__gnu_debug::_Safe_iterator_base, _Ptr>) + return std::__to_address(__ptr.base().operator->()); + else + return std::__to_address(__ptr.operator->()); + } +# 192 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ptr_traits.h" 3 + template + constexpr _Tp* + to_address(_Tp* __ptr) noexcept + { return std::__to_address(__ptr); } +# 204 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ptr_traits.h" 3 + template + constexpr auto + to_address(const _Ptr& __ptr) noexcept + { return std::__to_address(__ptr); } + + + +} +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_cmp.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_cmp.h" 3 +namespace std +{ + + + struct __is_transparent; + + + + + + struct identity + { + template + [[nodiscard]] + constexpr _Tp&& + operator()(_Tp&& __t) const noexcept + { return std::forward<_Tp>(__t); } + + using is_transparent = __is_transparent; + }; + + + + + +namespace ranges +{ + namespace __detail + { + + + + template + concept __less_builtin_ptr_cmp + = requires (_Tp&& __t, _Up&& __u) { { __t < __u } -> same_as; } + && convertible_to<_Tp, const volatile void*> + && convertible_to<_Up, const volatile void*> + && (! requires(_Tp&& __t, _Up&& __u) + { operator<(std::forward<_Tp>(__t), std::forward<_Up>(__u)); } + && ! requires(_Tp&& __t, _Up&& __u) + { std::forward<_Tp>(__t).operator<(std::forward<_Up>(__u)); }); + } + + + + + + + + struct equal_to + { + template + requires equality_comparable_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Tp>() == std::declval<_Up>())) + { return std::forward<_Tp>(__t) == std::forward<_Up>(__u); } + + using is_transparent = __is_transparent; + }; + + + struct not_equal_to + { + template + requires equality_comparable_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Up>() == std::declval<_Tp>())) + { return !equal_to{}(std::forward<_Tp>(__t), std::forward<_Up>(__u)); } + + using is_transparent = __is_transparent; + }; + + + struct less + { + template + requires totally_ordered_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Tp>() < std::declval<_Up>())) + { + if constexpr (__detail::__less_builtin_ptr_cmp<_Tp, _Up>) + { + + if (std::is_constant_evaluated()) + return __t < __u; + + auto __x = reinterpret_cast( + static_cast(std::forward<_Tp>(__t))); + auto __y = reinterpret_cast( + static_cast(std::forward<_Up>(__u))); + return __x < __y; + } + else + return std::forward<_Tp>(__t) < std::forward<_Up>(__u); + } + + using is_transparent = __is_transparent; + }; + + + struct greater + { + template + requires totally_ordered_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Up>() < std::declval<_Tp>())) + { return less{}(std::forward<_Up>(__u), std::forward<_Tp>(__t)); } + + using is_transparent = __is_transparent; + }; + + + struct greater_equal + { + template + requires totally_ordered_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Tp>() < std::declval<_Up>())) + { return !less{}(std::forward<_Tp>(__t), std::forward<_Up>(__u)); } + + using is_transparent = __is_transparent; + }; + + + struct less_equal + { + template + requires totally_ordered_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Up>() < std::declval<_Tp>())) + { return !less{}(std::forward<_Up>(__u), std::forward<_Tp>(__t)); } + + using is_transparent = __is_transparent; + }; + +} + + +} +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 2 3 + + +namespace std +{ + + + struct input_iterator_tag; + struct output_iterator_tag; + struct forward_iterator_tag; + struct bidirectional_iterator_tag; + struct random_access_iterator_tag; + struct contiguous_iterator_tag; + + template + struct iterator_traits; + + template requires is_object_v<_Tp> + struct iterator_traits<_Tp*>; + + template + struct __iterator_traits; + + namespace __detail + { + template + using __with_ref = _Tp&; + + template + concept __can_reference = requires { typename __with_ref<_Tp>; }; + + template + concept __dereferenceable = requires(_Tp& __t) + { + { *__t } -> __can_reference; + }; + } + + template<__detail::__dereferenceable _Tp> + using iter_reference_t = decltype(*std::declval<_Tp&>()); + + namespace ranges + { + namespace __cust_imove + { + void iter_move(); + + template + concept __adl_imove + = (std::__detail::__class_or_enum>) + && requires(_Tp&& __t) { iter_move(static_cast<_Tp&&>(__t)); }; + + struct _IMove + { + private: + template + struct __result + { using type = iter_reference_t<_Tp>; }; + + template + requires __adl_imove<_Tp> + struct __result<_Tp> + { using type = decltype(iter_move(std::declval<_Tp>())); }; + + template + requires (!__adl_imove<_Tp>) + && is_lvalue_reference_v> + struct __result<_Tp> + { using type = remove_reference_t>&&; }; + + template + static constexpr bool + _S_noexcept() + { + if constexpr (__adl_imove<_Tp>) + return noexcept(iter_move(std::declval<_Tp>())); + else + return noexcept(*std::declval<_Tp>()); + } + + public: + + template + using __type = typename __result<_Tp>::type; + + template + constexpr __type<_Tp> + operator()(_Tp&& __e) const + noexcept(_S_noexcept<_Tp>()) + { + if constexpr (__adl_imove<_Tp>) + return iter_move(static_cast<_Tp&&>(__e)); + else if constexpr (is_lvalue_reference_v>) + return static_cast<__type<_Tp>>(*__e); + else + return *__e; + } + }; + } + + inline namespace __cust + { + inline constexpr __cust_imove::_IMove iter_move{}; + } + } + + template<__detail::__dereferenceable _Tp> + requires __detail:: + __can_reference> + using iter_rvalue_reference_t + = ranges::__cust_imove::_IMove::__type<_Tp&>; + + template struct incrementable_traits { }; + + template requires is_object_v<_Tp> + struct incrementable_traits<_Tp*> + { using difference_type = ptrdiff_t; }; + + template + struct incrementable_traits + : incrementable_traits<_Iter> { }; + + template requires requires { typename _Tp::difference_type; } + struct incrementable_traits<_Tp> + { using difference_type = typename _Tp::difference_type; }; + + template + requires (!requires { typename _Tp::difference_type; } + && requires(const _Tp& __a, const _Tp& __b) + { { __a - __b } -> integral; }) + struct incrementable_traits<_Tp> + { + using difference_type + = make_signed_t() - std::declval<_Tp>())>; + }; + + + + template<> + struct incrementable_traits<__int128> + { using difference_type = __int128; }; + + template<> + struct incrementable_traits + { using difference_type = __int128; }; + + + namespace __detail + { + + + template + concept __primary_traits_iter + = __is_base_of(__iterator_traits<_Iter, void>, iterator_traits<_Iter>); + + template + struct __iter_traits_impl + { using type = iterator_traits<_Iter>; }; + + template + requires __primary_traits_iter<_Iter> + struct __iter_traits_impl<_Iter, _Tp> + { using type = _Tp; }; + + + template + using __iter_traits = typename __iter_traits_impl<_Iter, _Tp>::type; + + template + using __iter_diff_t = typename + __iter_traits<_Tp, incrementable_traits<_Tp>>::difference_type; + } + + template + using iter_difference_t = __detail::__iter_diff_t>; + + namespace __detail + { + template struct __cond_value_type { }; + + template requires is_object_v<_Tp> + struct __cond_value_type<_Tp> + { using value_type = remove_cv_t<_Tp>; }; + + template + concept __has_member_value_type + = requires { typename _Tp::value_type; }; + + template + concept __has_member_element_type + = requires { typename _Tp::element_type; }; + + } + + template struct indirectly_readable_traits { }; + + template + struct indirectly_readable_traits<_Tp*> + : __detail::__cond_value_type<_Tp> + { }; + + template requires is_array_v<_Iter> + struct indirectly_readable_traits<_Iter> + { using value_type = remove_cv_t>; }; + + template + struct indirectly_readable_traits + : indirectly_readable_traits<_Iter> + { }; + + template<__detail::__has_member_value_type _Tp> + struct indirectly_readable_traits<_Tp> + : __detail::__cond_value_type + { }; + + template<__detail::__has_member_element_type _Tp> + struct indirectly_readable_traits<_Tp> + : __detail::__cond_value_type + { }; + + + + template<__detail::__has_member_value_type _Tp> + requires __detail::__has_member_element_type<_Tp> + && same_as, + remove_cv_t> + struct indirectly_readable_traits<_Tp> + : __detail::__cond_value_type + { }; + + + + template<__detail::__has_member_value_type _Tp> + requires __detail::__has_member_element_type<_Tp> + struct indirectly_readable_traits<_Tp> + { }; + + namespace __detail + { + template + using __iter_value_t = typename + __iter_traits<_Tp, indirectly_readable_traits<_Tp>>::value_type; + } + + template + using iter_value_t = __detail::__iter_value_t>; + + namespace __detail + { + + + template + concept __cpp17_iterator = requires(_Iter __it) + { + { *__it } -> __can_reference; + { ++__it } -> same_as<_Iter&>; + { *__it++ } -> __can_reference; + } && copyable<_Iter>; + + template + concept __cpp17_input_iterator = __cpp17_iterator<_Iter> + && equality_comparable<_Iter> + && requires(_Iter __it) + { + typename incrementable_traits<_Iter>::difference_type; + typename indirectly_readable_traits<_Iter>::value_type; + typename common_reference_t&&, + typename indirectly_readable_traits<_Iter>::value_type&>; + typename common_reference_t::value_type&>; + requires signed_integral< + typename incrementable_traits<_Iter>::difference_type>; + }; + + template + concept __cpp17_fwd_iterator = __cpp17_input_iterator<_Iter> + && constructible_from<_Iter> + && is_lvalue_reference_v> + && same_as>, + typename indirectly_readable_traits<_Iter>::value_type> + && requires(_Iter __it) + { + { __it++ } -> convertible_to; + { *__it++ } -> same_as>; + }; + + template + concept __cpp17_bidi_iterator = __cpp17_fwd_iterator<_Iter> + && requires(_Iter __it) + { + { --__it } -> same_as<_Iter&>; + { __it-- } -> convertible_to; + { *__it-- } -> same_as>; + }; + + template + concept __cpp17_randacc_iterator = __cpp17_bidi_iterator<_Iter> + && totally_ordered<_Iter> + && requires(_Iter __it, + typename incrementable_traits<_Iter>::difference_type __n) + { + { __it += __n } -> same_as<_Iter&>; + { __it -= __n } -> same_as<_Iter&>; + { __it + __n } -> same_as<_Iter>; + { __n + __it } -> same_as<_Iter>; + { __it - __n } -> same_as<_Iter>; + { __it - __it } -> same_as; + { __it[__n] } -> convertible_to>; + }; + + template + concept __iter_with_nested_types = requires { + typename _Iter::iterator_category; + typename _Iter::value_type; + typename _Iter::difference_type; + typename _Iter::reference; + }; + + template + concept __iter_without_nested_types = !__iter_with_nested_types<_Iter>; + + template + concept __iter_without_category + = !requires { typename _Iter::iterator_category; }; + + } + + template + requires __detail::__iter_with_nested_types<_Iterator> + struct __iterator_traits<_Iterator, void> + { + private: + template + struct __ptr + { using type = void; }; + + template requires requires { typename _Iter::pointer; } + struct __ptr<_Iter> + { using type = typename _Iter::pointer; }; + + public: + using iterator_category = typename _Iterator::iterator_category; + using value_type = typename _Iterator::value_type; + using difference_type = typename _Iterator::difference_type; + using pointer = typename __ptr<_Iterator>::type; + using reference = typename _Iterator::reference; + }; + + template + requires __detail::__iter_without_nested_types<_Iterator> + && __detail::__cpp17_input_iterator<_Iterator> + struct __iterator_traits<_Iterator, void> + { + private: + template + struct __cat + { using type = input_iterator_tag; }; + + template + requires requires { typename _Iter::iterator_category; } + struct __cat<_Iter> + { using type = typename _Iter::iterator_category; }; + + template + requires __detail::__iter_without_category<_Iter> + && __detail::__cpp17_randacc_iterator<_Iter> + struct __cat<_Iter> + { using type = random_access_iterator_tag; }; + + template + requires __detail::__iter_without_category<_Iter> + && __detail::__cpp17_bidi_iterator<_Iter> + struct __cat<_Iter> + { using type = bidirectional_iterator_tag; }; + + template + requires __detail::__iter_without_category<_Iter> + && __detail::__cpp17_fwd_iterator<_Iter> + struct __cat<_Iter> + { using type = forward_iterator_tag; }; + + template + struct __ptr + { using type = void; }; + + template requires requires { typename _Iter::pointer; } + struct __ptr<_Iter> + { using type = typename _Iter::pointer; }; + + template + requires (!requires { typename _Iter::pointer; } + && requires(_Iter& __it) { __it.operator->(); }) + struct __ptr<_Iter> + { using type = decltype(std::declval<_Iter&>().operator->()); }; + + template + struct __ref + { using type = iter_reference_t<_Iter>; }; + + template requires requires { typename _Iter::reference; } + struct __ref<_Iter> + { using type = typename _Iter::reference; }; + + public: + using iterator_category = typename __cat<_Iterator>::type; + using value_type + = typename indirectly_readable_traits<_Iterator>::value_type; + using difference_type + = typename incrementable_traits<_Iterator>::difference_type; + using pointer = typename __ptr<_Iterator>::type; + using reference = typename __ref<_Iterator>::type; + }; + + template + requires __detail::__iter_without_nested_types<_Iterator> + && __detail::__cpp17_iterator<_Iterator> + struct __iterator_traits<_Iterator, void> + { + private: + template + struct __diff + { using type = void; }; + + template + requires requires + { typename incrementable_traits<_Iter>::difference_type; } + struct __diff<_Iter> + { + using type = typename incrementable_traits<_Iter>::difference_type; + }; + + public: + using iterator_category = output_iterator_tag; + using value_type = void; + using difference_type = typename __diff<_Iterator>::type; + using pointer = void; + using reference = void; + }; + + namespace __detail + { + template + struct __iter_concept_impl; + + + template + requires requires { typename __iter_traits<_Iter>::iterator_concept; } + struct __iter_concept_impl<_Iter> + { using type = typename __iter_traits<_Iter>::iterator_concept; }; + + + template + requires (!requires { typename __iter_traits<_Iter>::iterator_concept; } + && requires { typename __iter_traits<_Iter>::iterator_category; }) + struct __iter_concept_impl<_Iter> + { using type = typename __iter_traits<_Iter>::iterator_category; }; + + + template + requires (!requires { typename __iter_traits<_Iter>::iterator_concept; } + && !requires { typename __iter_traits<_Iter>::iterator_category; } + && __primary_traits_iter<_Iter>) + struct __iter_concept_impl<_Iter> + { using type = random_access_iterator_tag; }; + + + template + struct __iter_concept_impl + { }; + + + template + using __iter_concept = typename __iter_concept_impl<_Iter>::type; + + template + concept __indirectly_readable_impl = requires + { + typename iter_value_t<_In>; + typename iter_reference_t<_In>; + typename iter_rvalue_reference_t<_In>; + requires same_as, + iter_reference_t<_In>>; + requires same_as, + iter_rvalue_reference_t<_In>>; + } + && common_reference_with&&, iter_value_t<_In>&> + && common_reference_with&&, + iter_rvalue_reference_t<_In>&&> + && common_reference_with&&, + const iter_value_t<_In>&>; + + } + + + template + concept indirectly_readable + = __detail::__indirectly_readable_impl>; + + template + using iter_common_reference_t + = common_reference_t, iter_value_t<_Tp>&>; + + + template + concept indirectly_writable = requires(_Out&& __o, _Tp&& __t) + { + *__o = std::forward<_Tp>(__t); + *std::forward<_Out>(__o) = std::forward<_Tp>(__t); + const_cast&&>(*__o) + = std::forward<_Tp>(__t); + const_cast&&>(*std::forward<_Out>(__o)) + = std::forward<_Tp>(__t); + }; + + namespace ranges::__detail + { + class __max_diff_type; + class __max_size_type; + + template + concept __is_signed_int128 + + = same_as<_Tp, __int128>; + + + + + template + concept __is_unsigned_int128 + + = same_as<_Tp, unsigned __int128>; + + + + + template + concept __cv_bool = same_as; + + template + concept __integral_nonbool = integral<_Tp> && !__cv_bool<_Tp>; + + template + concept __is_int128 = __is_signed_int128<_Tp> || __is_unsigned_int128<_Tp>; + + template + concept __is_integer_like = __integral_nonbool<_Tp> + || __is_int128<_Tp> + || same_as<_Tp, __max_diff_type> || same_as<_Tp, __max_size_type>; + + template + concept __is_signed_integer_like = signed_integral<_Tp> + || __is_signed_int128<_Tp> + || same_as<_Tp, __max_diff_type>; + + } + + namespace __detail { using ranges::__detail::__is_signed_integer_like; } + + + template + concept weakly_incrementable = default_initializable<_Iter> + && movable<_Iter> + && requires(_Iter __i) + { + typename iter_difference_t<_Iter>; + requires __detail::__is_signed_integer_like>; + { ++__i } -> same_as<_Iter&>; + __i++; + }; + + template + concept incrementable = regular<_Iter> && weakly_incrementable<_Iter> + && requires(_Iter __i) { { __i++ } -> same_as<_Iter>; }; + + template + concept input_or_output_iterator + = requires(_Iter __i) { { *__i } -> __detail::__can_reference; } + && weakly_incrementable<_Iter>; + + template + concept sentinel_for = semiregular<_Sent> + && input_or_output_iterator<_Iter> + && __detail::__weakly_eq_cmp_with<_Sent, _Iter>; + + template + inline constexpr bool disable_sized_sentinel_for = false; + + template + concept sized_sentinel_for = sentinel_for<_Sent, _Iter> + && !disable_sized_sentinel_for, remove_cv_t<_Iter>> + && requires(const _Iter& __i, const _Sent& __s) + { + { __s - __i } -> same_as>; + { __i - __s } -> same_as>; + }; + + template + concept input_iterator = input_or_output_iterator<_Iter> + && indirectly_readable<_Iter> + && requires { typename __detail::__iter_concept<_Iter>; } + && derived_from<__detail::__iter_concept<_Iter>, input_iterator_tag>; + + template + concept output_iterator = input_or_output_iterator<_Iter> + && indirectly_writable<_Iter, _Tp> + && requires(_Iter __i, _Tp&& __t) { *__i++ = std::forward<_Tp>(__t); }; + + template + concept forward_iterator = input_iterator<_Iter> + && derived_from<__detail::__iter_concept<_Iter>, forward_iterator_tag> + && incrementable<_Iter> && sentinel_for<_Iter, _Iter>; + + template + concept bidirectional_iterator = forward_iterator<_Iter> + && derived_from<__detail::__iter_concept<_Iter>, + bidirectional_iterator_tag> + && requires(_Iter __i) + { + { --__i } -> same_as<_Iter&>; + { __i-- } -> same_as<_Iter>; + }; + + template + concept random_access_iterator = bidirectional_iterator<_Iter> + && derived_from<__detail::__iter_concept<_Iter>, + random_access_iterator_tag> + && totally_ordered<_Iter> && sized_sentinel_for<_Iter, _Iter> + && requires(_Iter __i, const _Iter __j, + const iter_difference_t<_Iter> __n) + { + { __i += __n } -> same_as<_Iter&>; + { __j + __n } -> same_as<_Iter>; + { __n + __j } -> same_as<_Iter>; + { __i -= __n } -> same_as<_Iter&>; + { __j - __n } -> same_as<_Iter>; + { __j[__n] } -> same_as>; + }; + + template + concept contiguous_iterator = random_access_iterator<_Iter> + && derived_from<__detail::__iter_concept<_Iter>, contiguous_iterator_tag> + && is_lvalue_reference_v> + && same_as, remove_cvref_t>> + && requires(const _Iter& __i) + { + { std::to_address(__i) } + -> same_as>>; + }; + + + + + + template + concept indirectly_unary_invocable = indirectly_readable<_Iter> + && copy_constructible<_Fn> && invocable<_Fn&, iter_value_t<_Iter>&> + && invocable<_Fn&, iter_reference_t<_Iter>> + && invocable<_Fn&, iter_common_reference_t<_Iter>> + && common_reference_with&>, + invoke_result_t<_Fn&, iter_reference_t<_Iter>>>; + + template + concept indirectly_regular_unary_invocable = indirectly_readable<_Iter> + && copy_constructible<_Fn> + && regular_invocable<_Fn&, iter_value_t<_Iter>&> + && regular_invocable<_Fn&, iter_reference_t<_Iter>> + && regular_invocable<_Fn&, iter_common_reference_t<_Iter>> + && common_reference_with&>, + invoke_result_t<_Fn&, iter_reference_t<_Iter>>>; + + template + concept indirect_unary_predicate = indirectly_readable<_Iter> + && copy_constructible<_Fn> && predicate<_Fn&, iter_value_t<_Iter>&> + && predicate<_Fn&, iter_reference_t<_Iter>> + && predicate<_Fn&, iter_common_reference_t<_Iter>>; + + template + concept indirect_binary_predicate + = indirectly_readable<_I1> && indirectly_readable<_I2> + && copy_constructible<_Fn> + && predicate<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> + && predicate<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> + && predicate<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> + && predicate<_Fn&, iter_reference_t<_I1>, iter_reference_t<_I2>> + && predicate<_Fn&, iter_common_reference_t<_I1>, + iter_common_reference_t<_I2>>; + + template + concept indirect_equivalence_relation + = indirectly_readable<_I1> && indirectly_readable<_I2> + && copy_constructible<_Fn> + && equivalence_relation<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> + && equivalence_relation<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> + && equivalence_relation<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> + && equivalence_relation<_Fn&, iter_reference_t<_I1>, + iter_reference_t<_I2>> + && equivalence_relation<_Fn&, iter_common_reference_t<_I1>, + iter_common_reference_t<_I2>>; + + template + concept indirect_strict_weak_order + = indirectly_readable<_I1> && indirectly_readable<_I2> + && copy_constructible<_Fn> + && strict_weak_order<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> + && strict_weak_order<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> + && strict_weak_order<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> + && strict_weak_order<_Fn&, iter_reference_t<_I1>, iter_reference_t<_I2>> + && strict_weak_order<_Fn&, iter_common_reference_t<_I1>, + iter_common_reference_t<_I2>>; + + template + requires (indirectly_readable<_Is> && ...) + && invocable<_Fn, iter_reference_t<_Is>...> + using indirect_result_t = invoke_result_t<_Fn, iter_reference_t<_Is>...>; + + + template _Proj> + struct projected + { + using value_type = remove_cvref_t>; + + indirect_result_t<_Proj&, _Iter> operator*() const; + }; + + template + struct incrementable_traits> + { using difference_type = iter_difference_t<_Iter>; }; + + + + + + template + concept indirectly_movable = indirectly_readable<_In> + && indirectly_writable<_Out, iter_rvalue_reference_t<_In>>; + + template + concept indirectly_movable_storable = indirectly_movable<_In, _Out> + && indirectly_writable<_Out, iter_value_t<_In>> + && movable> + && constructible_from, iter_rvalue_reference_t<_In>> + && assignable_from&, iter_rvalue_reference_t<_In>>; + + + template + concept indirectly_copyable = indirectly_readable<_In> + && indirectly_writable<_Out, iter_reference_t<_In>>; + + template + concept indirectly_copyable_storable = indirectly_copyable<_In, _Out> + && indirectly_writable<_Out, iter_value_t<_In>&> + && indirectly_writable<_Out, const iter_value_t<_In>&> + && indirectly_writable<_Out, iter_value_t<_In>&&> + && indirectly_writable<_Out, const iter_value_t<_In>&&> + && copyable> + && constructible_from, iter_reference_t<_In>> + && assignable_from&, iter_reference_t<_In>>; + +namespace ranges +{ + namespace __cust_iswap + { + template + void iter_swap(_It1, _It2) = delete; + + template + concept __adl_iswap + = (std::__detail::__class_or_enum> + || std::__detail::__class_or_enum>) + && requires(_Tp&& __t, _Up&& __u) { + iter_swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); + }; + + template + constexpr iter_value_t<_Xp> + __iter_exchange_move(_Xp&& __x, _Yp&& __y) + noexcept(noexcept(iter_value_t<_Xp>(iter_move(__x))) + && noexcept(*__x = iter_move(__y))) + { + iter_value_t<_Xp> __old_value(iter_move(__x)); + *__x = iter_move(__y); + return __old_value; + } + + struct _IterSwap + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__adl_iswap<_Tp, _Up>) + return noexcept(iter_swap(std::declval<_Tp>(), + std::declval<_Up>())); + else if constexpr (indirectly_readable<_Tp> + && indirectly_readable<_Up> + && swappable_with, iter_reference_t<_Up>>) + return noexcept(ranges::swap(*std::declval<_Tp>(), + *std::declval<_Up>())); + else + return noexcept(*std::declval<_Tp>() + = __iter_exchange_move(std::declval<_Up>(), + std::declval<_Tp>())); + } + + public: + template + requires __adl_iswap<_Tp, _Up> + || (indirectly_readable> + && indirectly_readable> + && swappable_with, iter_reference_t<_Up>>) + || (indirectly_movable_storable<_Tp, _Up> + && indirectly_movable_storable<_Up, _Tp>) + constexpr void + operator()(_Tp&& __e1, _Up&& __e2) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + if constexpr (__adl_iswap<_Tp, _Up>) + iter_swap(static_cast<_Tp&&>(__e1), static_cast<_Up&&>(__e2)); + else if constexpr (indirectly_readable<_Tp> + && indirectly_readable<_Up> + && swappable_with, iter_reference_t<_Up>>) + ranges::swap(*__e1, *__e2); + else + *__e1 = __iter_exchange_move(__e2, __e1); + } + }; + } + + inline namespace __cust + { + inline constexpr __cust_iswap::_IterSwap iter_swap{}; + } + +} + + + template + concept indirectly_swappable + = indirectly_readable<_I1> && indirectly_readable<_I2> + && requires(const _I1 __i1, const _I2 __i2) + { + ranges::iter_swap(__i1, __i1); + ranges::iter_swap(__i2, __i2); + ranges::iter_swap(__i1, __i2); + ranges::iter_swap(__i2, __i1); + }; + + + template + concept indirectly_comparable + = indirect_binary_predicate<_Rel, projected<_I1, _P1>, + projected<_I2, _P2>>; + + + template + concept permutable = forward_iterator<_Iter> + && indirectly_movable_storable<_Iter, _Iter> + && indirectly_swappable<_Iter, _Iter>; + + + template + concept mergeable = input_iterator<_I1> && input_iterator<_I2> + && weakly_incrementable<_Out> && indirectly_copyable<_I1, _Out> + && indirectly_copyable<_I2, _Out> + && indirect_strict_weak_order<_Rel, projected<_I1, _P1>, + projected<_I2, _P2>>; + + + template + concept sortable = permutable<_Iter> + && indirect_strict_weak_order<_Rel, projected<_Iter, _Proj>>; + + struct unreachable_sentinel_t + { + template + friend constexpr bool + operator==(unreachable_sentinel_t, const _It&) noexcept + { return false; } + }; + + inline constexpr unreachable_sentinel_t unreachable_sentinel{}; + + struct default_sentinel_t { }; + inline constexpr default_sentinel_t default_sentinel{}; + + + namespace ranges::__cust_access + { + using std::__detail::__class_or_enum; + + struct _Decay_copy final + { + template + constexpr decay_t<_Tp> + operator()(_Tp&& __t) const + noexcept(is_nothrow_convertible_v<_Tp, decay_t<_Tp>>) + { return std::forward<_Tp>(__t); } + } inline constexpr __decay_copy{}; + + template + concept __member_begin = requires(_Tp& __t) + { + { __decay_copy(__t.begin()) } -> input_or_output_iterator; + }; + + + void begin(auto&) = delete; + void begin(const auto&) = delete; + + template + concept __adl_begin = __class_or_enum> + && requires(_Tp& __t) + { + { __decay_copy(begin(__t)) } -> input_or_output_iterator; + }; + + + + template + requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&> + auto + __begin(_Tp& __t) + { + if constexpr (is_array_v<_Tp>) + return __t + 0; + else if constexpr (__member_begin<_Tp&>) + return __t.begin(); + else + return begin(__t); + } + } + + namespace __detail + { + + template + using __range_iter_t + = decltype(ranges::__cust_access::__begin(std::declval<_Tp&>())); + + } + + +} +# 72 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 2 3 + + +namespace std +{ + +# 93 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + struct input_iterator_tag { }; + + + struct output_iterator_tag { }; + + + struct forward_iterator_tag : public input_iterator_tag { }; + + + + struct bidirectional_iterator_tag : public forward_iterator_tag { }; + + + + struct random_access_iterator_tag : public bidirectional_iterator_tag { }; + + + + struct contiguous_iterator_tag : public random_access_iterator_tag { }; +# 125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + struct iterator + { + + typedef _Category iterator_category; + + typedef _Tp value_type; + + typedef _Distance difference_type; + + typedef _Pointer pointer; + + typedef _Reference reference; + }; +# 149 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + struct iterator_traits; + + + + + template> + struct __iterator_traits { }; +# 176 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + struct iterator_traits + : public __iterator_traits<_Iterator> { }; +# 194 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + + requires is_object_v<_Tp> + + struct iterator_traits<_Tp*> + { + using iterator_concept = contiguous_iterator_tag; + using iterator_category = random_access_iterator_tag; + using value_type = remove_cv_t<_Tp>; + using difference_type = ptrdiff_t; + using pointer = _Tp*; + using reference = _Tp&; + }; +# 235 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + inline constexpr + typename iterator_traits<_Iter>::iterator_category + __iterator_category(const _Iter&) + { return typename iterator_traits<_Iter>::iterator_category(); } + + + + + template + using __iterator_category_t + = typename iterator_traits<_Iter>::iterator_category; + + template + using _RequireInputIter = + __enable_if_t, + input_iterator_tag>::value>; + + template> + struct __is_random_access_iter + : is_base_of + { + typedef is_base_of _Base; + enum { __value = _Base::value }; + }; + + + + + + + + +} +# 66 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 3 + +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/concept_check.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/concept_check.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/concept_check.h" 3 +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/debug/assertions.h" 1 3 +# 66 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 2 3 + +namespace std +{ + + + + + template struct _List_iterator; + template struct _List_const_iterator; + + + template + inline constexpr + typename iterator_traits<_InputIterator>::difference_type + __distance(_InputIterator __first, _InputIterator __last, + input_iterator_tag) + { + + + + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + + template + inline constexpr + typename iterator_traits<_RandomAccessIterator>::difference_type + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + return __last - __first; + } + + + + template + ptrdiff_t + __distance(std::_List_iterator<_Tp>, + std::_List_iterator<_Tp>, + input_iterator_tag); + + template + ptrdiff_t + __distance(std::_List_const_iterator<_Tp>, + std::_List_const_iterator<_Tp>, + input_iterator_tag); +# 135 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 3 + template + inline constexpr + typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + + return std::__distance(__first, __last, + std::__iterator_category(__first)); + } + + template + inline constexpr void + __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) + { + + + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + while (__n--) + ++__i; + } + + template + inline constexpr void + __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) + { + + + + if (__n > 0) + while (__n--) + ++__i; + else + while (__n++) + --__i; + } + + template + inline constexpr void + __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) + { + + + + if (__builtin_constant_p(__n) && __n == 1) + ++__i; + else if (__builtin_constant_p(__n) && __n == -1) + --__i; + else + __i += __n; + } +# 200 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 3 + template + inline constexpr void + advance(_InputIterator& __i, _Distance __n) + { + + typename iterator_traits<_InputIterator>::difference_type __d = __n; + std::__advance(__i, __d, std::__iterator_category(__i)); + } + + + + template + inline constexpr _InputIterator + next(_InputIterator __x, typename + iterator_traits<_InputIterator>::difference_type __n = 1) + { + + + std::advance(__x, __n); + return __x; + } + + template + inline constexpr _BidirectionalIterator + prev(_BidirectionalIterator __x, typename + iterator_traits<_BidirectionalIterator>::difference_type __n = 1) + { + + + + std::advance(__x, -__n); + return __x; + } + + + + +} +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 1 3 +# 82 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 1 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 3 + +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception.h" 3 + +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception.h" 3 + +#pragma GCC visibility push(default) + + + +extern "C++" { + +namespace std +{ +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception.h" 3 + class exception + { + public: + exception() noexcept { } + virtual ~exception() noexcept; + + exception(const exception&) = default; + exception& operator=(const exception&) = default; + exception(exception&&) = default; + exception& operator=(exception&&) = default; + + + + + virtual const char* + what() const noexcept; + }; + + + +} + +} + +#pragma GCC visibility pop +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 2 3 + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace std +{ + + + + + + + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + + + bad_alloc(const bad_alloc&) = default; + bad_alloc& operator=(const bad_alloc&) = default; + + + + + virtual ~bad_alloc() throw(); + + + virtual const char* what() const throw(); + }; + + + class bad_array_new_length : public bad_alloc + { + public: + bad_array_new_length() throw() { } + + + + virtual ~bad_array_new_length() throw(); + + + virtual const char* what() const throw(); + }; + + + + enum class align_val_t: size_t {}; + + + struct nothrow_t + { + + explicit nothrow_t() = default; + + }; + + extern const nothrow_t nothrow; + + + + typedef void (*new_handler)(); + + + + new_handler set_new_handler(new_handler) throw(); + + + + new_handler get_new_handler() noexcept; + +} +# 126 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 3 +[[__nodiscard__]] void* operator new(std::size_t) + __attribute__((__externally_visible__)); +[[__nodiscard__]] void* operator new[](std::size_t) + __attribute__((__externally_visible__)); +void operator delete(void*) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*) noexcept + __attribute__((__externally_visible__)); + +void operator delete(void*, std::size_t) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*, std::size_t) noexcept + __attribute__((__externally_visible__)); + +[[__nodiscard__]] void* operator new(std::size_t, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +[[__nodiscard__]] void* operator new[](std::size_t, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +void operator delete(void*, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__)); + +[[__nodiscard__]] void* operator new(std::size_t, std::align_val_t) + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +[[__nodiscard__]] void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) + noexcept __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +void operator delete(void*, std::align_val_t) + noexcept __attribute__((__externally_visible__)); +void operator delete(void*, std::align_val_t, const std::nothrow_t&) + noexcept __attribute__((__externally_visible__)); +[[__nodiscard__]] void* operator new[](std::size_t, std::align_val_t) + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +[[__nodiscard__]] void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) + noexcept __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +void operator delete[](void*, std::align_val_t) + noexcept __attribute__((__externally_visible__)); +void operator delete[](void*, std::align_val_t, const std::nothrow_t&) + noexcept __attribute__((__externally_visible__)); + +void operator delete(void*, std::size_t, std::align_val_t) + noexcept __attribute__((__externally_visible__)); +void operator delete[](void*, std::size_t, std::align_val_t) + noexcept __attribute__((__externally_visible__)); + + + + +[[__nodiscard__]] inline void* operator new(std::size_t, void* __p) noexcept +{ return __p; } +[[__nodiscard__]] inline void* operator new[](std::size_t, void* __p) noexcept +{ return __p; } + + +inline void operator delete (void*, void*) noexcept { } +inline void operator delete[](void*, void*) noexcept { } + +} + + + +namespace std +{ + + + template + [[nodiscard]] constexpr _Tp* + launder(_Tp* __p) noexcept + { return __builtin_launder(__p); } + + + + + template + void launder(_Ret (*)(_Args...) noexcept (_NE)) = delete; + template + void launder(_Ret (*)(_Args......) noexcept (_NE)) = delete; + + void launder(void*) = delete; + void launder(const void*) = delete; + void launder(volatile void*) = delete; + void launder(const volatile void*) = delete; +} + + + + +namespace std +{ + + + struct destroying_delete_t + { + explicit destroying_delete_t() = default; + }; + + inline constexpr destroying_delete_t destroying_delete{}; +} + + + + + + +#pragma GCC visibility pop +# 83 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 2 3 + + + + +namespace std +{ + + + + + + + + + namespace __detail + { + + + template + using __clamp_iter_cat + = conditional_t, _Limit, _Otherwise>; + } +# 126 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class reverse_iterator + : public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> + { + template + friend class reverse_iterator; + + + + + template + static constexpr bool __convertible = !is_same_v<_Iter, _Iterator> + && convertible_to; + + + protected: + _Iterator current; + + typedef iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::pointer pointer; + + + + + using iterator_concept + = conditional_t, + random_access_iterator_tag, + bidirectional_iterator_tag>; + using iterator_category + = __detail::__clamp_iter_cat; + using value_type = iter_value_t<_Iterator>; + using difference_type = iter_difference_t<_Iterator>; + using reference = iter_reference_t<_Iterator>; +# 176 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + reverse_iterator() : current() { } + + + + + explicit constexpr + reverse_iterator(iterator_type __x) : current(__x) { } + + + + + constexpr + reverse_iterator(const reverse_iterator& __x) + : current(__x.current) { } + + + reverse_iterator& operator=(const reverse_iterator&) = default; + + + + + + + template + + requires __convertible<_Iter> + + constexpr + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.current) { } + + + template + + requires __convertible<_Iter> + && assignable_from<_Iterator&, const _Iter&> + + constexpr + reverse_iterator& + operator=(const reverse_iterator<_Iter>& __x) + { + current = __x.current; + return *this; + } + + + + + + constexpr iterator_type + base() const + { return current; } +# 240 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr reference + operator*() const + { + _Iterator __tmp = current; + return *--__tmp; + } + + + + + + + constexpr pointer + operator->() const + + requires is_pointer_v<_Iterator> + || requires(const _Iterator __i) { __i.operator->(); } + + { + + + _Iterator __tmp = current; + --__tmp; + return _S_to_pointer(__tmp); + } + + + + + + + constexpr reverse_iterator& + operator++() + { + --current; + return *this; + } + + + + + + + constexpr reverse_iterator + operator++(int) + { + reverse_iterator __tmp = *this; + --current; + return __tmp; + } + + + + + + + constexpr reverse_iterator& + operator--() + { + ++current; + return *this; + } + + + + + + + constexpr reverse_iterator + operator--(int) + { + reverse_iterator __tmp = *this; + ++current; + return __tmp; + } + + + + + + + constexpr reverse_iterator + operator+(difference_type __n) const + { return reverse_iterator(current - __n); } + + + + + + + + constexpr reverse_iterator& + operator+=(difference_type __n) + { + current -= __n; + return *this; + } + + + + + + + constexpr reverse_iterator + operator-(difference_type __n) const + { return reverse_iterator(current + __n); } + + + + + + + + constexpr reverse_iterator& + operator-=(difference_type __n) + { + current += __n; + return *this; + } + + + + + + + constexpr reference + operator[](difference_type __n) const + { return *(*this + __n); } + + + friend constexpr iter_rvalue_reference_t<_Iterator> + iter_move(const reverse_iterator& __i) + noexcept(is_nothrow_copy_constructible_v<_Iterator> + && noexcept(ranges::iter_move(--std::declval<_Iterator&>()))) + { + auto __tmp = __i.base(); + return ranges::iter_move(--__tmp); + } + + template _Iter2> + friend constexpr void + iter_swap(const reverse_iterator& __x, + const reverse_iterator<_Iter2>& __y) + noexcept(is_nothrow_copy_constructible_v<_Iterator> + && is_nothrow_copy_constructible_v<_Iter2> + && noexcept(ranges::iter_swap(--std::declval<_Iterator&>(), + --std::declval<_Iter2&>()))) + { + auto __xtmp = __x.base(); + auto __ytmp = __y.base(); + ranges::iter_swap(--__xtmp, --__ytmp); + } + + + private: + template + static constexpr _Tp* + _S_to_pointer(_Tp* __p) + { return __p; } + + template + static constexpr pointer + _S_to_pointer(_Tp __t) + { return __t.operator->(); } + }; +# 492 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + constexpr bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() == __y.base() } -> convertible_to; } + { return __x.base() == __y.base(); } + + template + constexpr bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() != __y.base() } -> convertible_to; } + { return __x.base() != __y.base(); } + + template + constexpr bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() > __y.base() } -> convertible_to; } + { return __x.base() > __y.base(); } + + template + constexpr bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() < __y.base() } -> convertible_to; } + { return __x.base() < __y.base(); } + + template + constexpr bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() >= __y.base() } -> convertible_to; } + { return __x.base() >= __y.base(); } + + template + constexpr bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() <= __y.base() } -> convertible_to; } + { return __x.base() <= __y.base(); } + + template _IteratorR> + constexpr compare_three_way_result_t<_IteratorL, _IteratorR> + operator<=>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() <=> __x.base(); } +# 558 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + inline constexpr auto + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + -> decltype(__y.base() - __x.base()) + { return __y.base() - __x.base(); } + + + template + inline constexpr reverse_iterator<_Iterator> + operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) + { return reverse_iterator<_Iterator>(__x.base() - __n); } + + + + template + inline constexpr reverse_iterator<_Iterator> + __make_reverse_iterator(_Iterator __i) + { return reverse_iterator<_Iterator>(__i); } + + + + + + + + template + inline constexpr reverse_iterator<_Iterator> + make_reverse_iterator(_Iterator __i) + { return reverse_iterator<_Iterator>(__i); } + + + template + requires (!sized_sentinel_for<_Iterator1, _Iterator2>) + inline constexpr bool + disable_sized_sentinel_for, + reverse_iterator<_Iterator2>> = true; + + + + template + constexpr + auto + __niter_base(reverse_iterator<_Iterator> __it) + -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) + { return __make_reverse_iterator(__niter_base(__it.base())); } + + template + struct __is_move_iterator > + : __is_move_iterator<_Iterator> + { }; + + template + constexpr + auto + __miter_base(reverse_iterator<_Iterator> __it) + -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) + { return __make_reverse_iterator(__miter_base(__it.base())); } +# 630 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class back_insert_iterator + : public iterator + { + protected: + _Container* container; + + public: + + typedef _Container container_type; + + using difference_type = ptrdiff_t; + + constexpr back_insert_iterator() noexcept : container(nullptr) { } + + + + explicit constexpr + back_insert_iterator(_Container& __x) + : container(std::__addressof(__x)) { } +# 670 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + back_insert_iterator& + operator=(const typename _Container::value_type& __value) + { + container->push_back(__value); + return *this; + } + + constexpr + back_insert_iterator& + operator=(typename _Container::value_type&& __value) + { + container->push_back(std::move(__value)); + return *this; + } + + + + constexpr + back_insert_iterator& + operator*() + { return *this; } + + + constexpr + back_insert_iterator& + operator++() + { return *this; } + + + constexpr + back_insert_iterator + operator++(int) + { return *this; } + }; +# 717 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + constexpr + inline back_insert_iterator<_Container> + back_inserter(_Container& __x) + { return back_insert_iterator<_Container>(__x); } +# 733 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class front_insert_iterator + : public iterator + { + protected: + _Container* container; + + public: + + typedef _Container container_type; + + using difference_type = ptrdiff_t; + + constexpr front_insert_iterator() noexcept : container(nullptr) { } + + + + explicit constexpr + front_insert_iterator(_Container& __x) + : container(std::__addressof(__x)) { } +# 773 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + front_insert_iterator& + operator=(const typename _Container::value_type& __value) + { + container->push_front(__value); + return *this; + } + + constexpr + front_insert_iterator& + operator=(typename _Container::value_type&& __value) + { + container->push_front(std::move(__value)); + return *this; + } + + + + constexpr + front_insert_iterator& + operator*() + { return *this; } + + + constexpr + front_insert_iterator& + operator++() + { return *this; } + + + constexpr + front_insert_iterator + operator++(int) + { return *this; } + }; +# 820 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + constexpr + inline front_insert_iterator<_Container> + front_inserter(_Container& __x) + { return front_insert_iterator<_Container>(__x); } +# 840 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class insert_iterator + : public iterator + { + + using _Iter = std::__detail::__range_iter_t<_Container>; + + protected: + _Container* container = nullptr; + _Iter iter = _Iter(); +# 858 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + public: + + typedef _Container container_type; + + + using difference_type = ptrdiff_t; + + insert_iterator() = default; + + + + + + + constexpr + insert_iterator(_Container& __x, _Iter __i) + : container(std::__addressof(__x)), iter(__i) {} +# 908 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + insert_iterator& + operator=(const typename _Container::value_type& __value) + { + iter = container->insert(iter, __value); + ++iter; + return *this; + } + + constexpr + insert_iterator& + operator=(typename _Container::value_type&& __value) + { + iter = container->insert(iter, std::move(__value)); + ++iter; + return *this; + } + + + + constexpr + insert_iterator& + operator*() + { return *this; } + + + constexpr + insert_iterator& + operator++() + { return *this; } + + + constexpr + insert_iterator& + operator++(int) + { return *this; } + }; +# 959 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + constexpr insert_iterator<_Container> + inserter(_Container& __x, std::__detail::__range_iter_t<_Container> __i) + { return insert_iterator<_Container>(__x, __i); } +# 972 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + +} + +namespace __gnu_cxx +{ + +# 986 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class __normal_iterator + { + protected: + _Iterator _M_current; + + typedef std::iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::iterator_category iterator_category; + typedef typename __traits_type::value_type value_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::reference reference; + typedef typename __traits_type::pointer pointer; + + + using iterator_concept = std::__detail::__iter_concept<_Iterator>; + + + constexpr __normal_iterator() noexcept + : _M_current(_Iterator()) { } + + explicit constexpr + __normal_iterator(const _Iterator& __i) noexcept + : _M_current(__i) { } + + + template + constexpr + __normal_iterator(const __normal_iterator<_Iter, + typename __enable_if< + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) noexcept + : _M_current(__i.base()) { } + + + constexpr + reference + operator*() const noexcept + { return *_M_current; } + + constexpr + pointer + operator->() const noexcept + { return _M_current; } + + constexpr + __normal_iterator& + operator++() noexcept + { + ++_M_current; + return *this; + } + + constexpr + __normal_iterator + operator++(int) noexcept + { return __normal_iterator(_M_current++); } + + + constexpr + __normal_iterator& + operator--() noexcept + { + --_M_current; + return *this; + } + + constexpr + __normal_iterator + operator--(int) noexcept + { return __normal_iterator(_M_current--); } + + + constexpr + reference + operator[](difference_type __n) const noexcept + { return _M_current[__n]; } + + constexpr + __normal_iterator& + operator+=(difference_type __n) noexcept + { _M_current += __n; return *this; } + + constexpr + __normal_iterator + operator+(difference_type __n) const noexcept + { return __normal_iterator(_M_current + __n); } + + constexpr + __normal_iterator& + operator-=(difference_type __n) noexcept + { _M_current -= __n; return *this; } + + constexpr + __normal_iterator + operator-(difference_type __n) const noexcept + { return __normal_iterator(_M_current - __n); } + + constexpr + const _Iterator& + base() const noexcept + { return _M_current; } + }; +# 1101 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + requires requires (_IteratorL __lhs, _IteratorR __rhs) + { { __lhs == __rhs } -> std::convertible_to; } + constexpr bool + operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + noexcept(noexcept(__lhs.base() == __rhs.base())) + { return __lhs.base() == __rhs.base(); } + + template + constexpr std::__detail::__synth3way_t<_IteratorR, _IteratorL> + operator<=>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + noexcept(noexcept(std::__detail::__synth3way(__lhs.base(), __rhs.base()))) + { return std::__detail::__synth3way(__lhs.base(), __rhs.base()); } +# 1216 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + + + constexpr + inline auto + operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept + -> decltype(__lhs.base() - __rhs.base()) + + + + + + { return __lhs.base() - __rhs.base(); } + + template + constexpr + inline typename __normal_iterator<_Iterator, _Container>::difference_type + operator-(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + noexcept + { return __lhs.base() - __rhs.base(); } + + template + constexpr + inline __normal_iterator<_Iterator, _Container> + operator+(typename __normal_iterator<_Iterator, _Container>::difference_type + __n, const __normal_iterator<_Iterator, _Container>& __i) + noexcept + { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } + + +} + +namespace std +{ + + + template + constexpr + _Iterator + __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) + noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) + { return __it.base(); } +# 1268 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class move_sentinel + { + public: + constexpr + move_sentinel() + noexcept(is_nothrow_default_constructible_v<_Sent>) + : _M_last() { } + + constexpr explicit + move_sentinel(_Sent __s) + noexcept(is_nothrow_move_constructible_v<_Sent>) + : _M_last(std::move(__s)) { } + + template requires convertible_to + constexpr + move_sentinel(const move_sentinel<_S2>& __s) + noexcept(is_nothrow_constructible_v<_Sent, const _S2&>) + : _M_last(__s.base()) + { } + + template requires assignable_from<_Sent&, const _S2&> + constexpr move_sentinel& + operator=(const move_sentinel<_S2>& __s) + noexcept(is_nothrow_assignable_v<_Sent, const _S2&>) + { + _M_last = __s.base(); + return *this; + } + + constexpr _Sent + base() const + noexcept(is_nothrow_copy_constructible_v<_Sent>) + { return _M_last; } + + private: + _Sent _M_last; + }; + + + namespace __detail + { + + template + struct __move_iter_cat + { }; + + template + requires requires { typename iterator_traits<_Iterator>::iterator_category; } + struct __move_iter_cat<_Iterator> + { + using iterator_category + = __clamp_iter_cat::iterator_category, + random_access_iterator_tag>; + }; + + } +# 1335 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class move_iterator + + : public __detail::__move_iter_cat<_Iterator> + + { + _Iterator _M_current; + + using __traits_type = iterator_traits<_Iterator>; + + + + + template + friend class move_iterator; + + + + + template + static constexpr bool __convertible = !is_same_v<_Iter2, _Iterator> + && convertible_to; + + + public: + using iterator_type = _Iterator; + + + using iterator_concept = input_iterator_tag; + + using value_type = iter_value_t<_Iterator>; + using difference_type = iter_difference_t<_Iterator>; + using pointer = _Iterator; + using reference = iter_rvalue_reference_t<_Iterator>; +# 1382 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + move_iterator() + : _M_current() { } + + explicit constexpr + move_iterator(iterator_type __i) + : _M_current(std::move(__i)) { } + + template + + requires __convertible<_Iter> + + constexpr + move_iterator(const move_iterator<_Iter>& __i) + : _M_current(__i._M_current) { } + + template + + requires __convertible<_Iter> + && assignable_from<_Iterator&, const _Iter&> + + constexpr + move_iterator& operator=(const move_iterator<_Iter>& __i) + { + _M_current = __i._M_current; + return *this; + } + + + + + + + constexpr const iterator_type& + base() const & noexcept + { return _M_current; } + + constexpr iterator_type + base() && + { return std::move(_M_current); } + + + constexpr reference + operator*() const + + { return ranges::iter_move(_M_current); } + + + + + constexpr pointer + operator->() const + { return _M_current; } + + constexpr move_iterator& + operator++() + { + ++_M_current; + return *this; + } + + constexpr move_iterator + operator++(int) + { + move_iterator __tmp = *this; + ++_M_current; + return __tmp; + } + + + constexpr void + operator++(int) requires (!forward_iterator<_Iterator>) + { ++_M_current; } + + + constexpr move_iterator& + operator--() + { + --_M_current; + return *this; + } + + constexpr move_iterator + operator--(int) + { + move_iterator __tmp = *this; + --_M_current; + return __tmp; + } + + constexpr move_iterator + operator+(difference_type __n) const + { return move_iterator(_M_current + __n); } + + constexpr move_iterator& + operator+=(difference_type __n) + { + _M_current += __n; + return *this; + } + + constexpr move_iterator + operator-(difference_type __n) const + { return move_iterator(_M_current - __n); } + + constexpr move_iterator& + operator-=(difference_type __n) + { + _M_current -= __n; + return *this; + } + + constexpr reference + operator[](difference_type __n) const + + { return ranges::iter_move(_M_current + __n); } + + + + + + template _Sent> + friend constexpr bool + operator==(const move_iterator& __x, const move_sentinel<_Sent>& __y) + { return __x.base() == __y.base(); } + + template _Sent> + friend constexpr iter_difference_t<_Iterator> + operator-(const move_sentinel<_Sent>& __x, const move_iterator& __y) + { return __x.base() - __y.base(); } + + template _Sent> + friend constexpr iter_difference_t<_Iterator> + operator-(const move_iterator& __x, const move_sentinel<_Sent>& __y) + { return __x.base() - __y.base(); } + + friend constexpr iter_rvalue_reference_t<_Iterator> + iter_move(const move_iterator& __i) + noexcept(noexcept(ranges::iter_move(__i._M_current))) + { return ranges::iter_move(__i._M_current); } + + template _Iter2> + friend constexpr void + iter_swap(const move_iterator& __x, const move_iterator<_Iter2>& __y) + noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current))) + { return ranges::iter_swap(__x._M_current, __y._M_current); } + + }; + + template + inline constexpr bool + operator==(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __x.base() == __y.base() } -> convertible_to; } + + { return __x.base() == __y.base(); } + + + template _IteratorR> + constexpr compare_three_way_result_t<_IteratorL, _IteratorR> + operator<=>(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + { return __x.base() <=> __y.base(); } +# 1555 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + inline constexpr bool + operator<(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __x.base() < __y.base() } -> convertible_to; } + + { return __x.base() < __y.base(); } + + template + inline constexpr bool + operator<=(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __y.base() < __x.base() } -> convertible_to; } + + { return !(__y < __x); } + + template + inline constexpr bool + operator>(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __y.base() < __x.base() } -> convertible_to; } + + { return __y < __x; } + + template + inline constexpr bool + operator>=(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __x.base() < __y.base() } -> convertible_to; } + + { return !(__x < __y); } +# 1637 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + inline constexpr auto + operator-(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + -> decltype(__x.base() - __y.base()) + { return __x.base() - __y.base(); } + + template + inline constexpr move_iterator<_Iterator> + operator+(typename move_iterator<_Iterator>::difference_type __n, + const move_iterator<_Iterator>& __x) + { return __x + __n; } + + template + inline constexpr move_iterator<_Iterator> + make_move_iterator(_Iterator __i) + { return move_iterator<_Iterator>(std::move(__i)); } + + template::value_type>::value, + _Iterator, move_iterator<_Iterator>>::type> + inline constexpr _ReturnType + __make_move_if_noexcept_iterator(_Iterator __i) + { return _ReturnType(__i); } + + + + template::value, + const _Tp*, move_iterator<_Tp*>>::type> + inline constexpr _ReturnType + __make_move_if_noexcept_iterator(_Tp* __i) + { return _ReturnType(__i); } + + + + + namespace __detail + { + template + concept __common_iter_has_arrow = indirectly_readable + && (requires(const _It& __it) { __it.operator->(); } + || is_reference_v> + || constructible_from, iter_reference_t<_It>>); + + template + concept __common_iter_use_postfix_proxy + = (!requires (_It& __i) { { *__i++ } -> __can_reference; }) + && constructible_from, iter_reference_t<_It>>; + } + + + template _Sent> + requires (!same_as<_It, _Sent>) && copyable<_It> + class common_iterator + { + template + static constexpr bool + _S_noexcept1() + { + if constexpr (is_trivially_default_constructible_v<_Tp>) + return is_nothrow_assignable_v<_Tp, _Up>; + else + return is_nothrow_constructible_v<_Tp, _Up>; + } + + template + static constexpr bool + _S_noexcept() + { return _S_noexcept1<_It, _It2>() && _S_noexcept1<_Sent, _Sent2>(); } + + class __arrow_proxy + { + iter_value_t<_It> _M_keep; + + __arrow_proxy(iter_reference_t<_It>&& __x) + : _M_keep(std::move(__x)) { } + + friend class common_iterator; + + public: + const iter_value_t<_It>* + operator->() const + { return std::__addressof(_M_keep); } + }; + + class __postfix_proxy + { + iter_value_t<_It> _M_keep; + + __postfix_proxy(iter_reference_t<_It>&& __x) + : _M_keep(std::move(__x)) { } + + friend class common_iterator; + + public: + const iter_value_t<_It>& + operator*() const + { return _M_keep; } + }; + + public: + constexpr + common_iterator() + noexcept(is_nothrow_default_constructible_v<_It>) + : _M_it(), _M_index(0) + { } + + constexpr + common_iterator(_It __i) + noexcept(is_nothrow_move_constructible_v<_It>) + : _M_it(std::move(__i)), _M_index(0) + { } + + constexpr + common_iterator(_Sent __s) + noexcept(is_nothrow_move_constructible_v<_Sent>) + : _M_sent(std::move(__s)), _M_index(1) + { } + + template + requires convertible_to + && convertible_to + constexpr + common_iterator(const common_iterator<_It2, _Sent2>& __x) + noexcept(_S_noexcept()) + : _M_valueless(), _M_index(__x._M_index) + { + if (_M_index == 0) + { + if constexpr (is_trivially_default_constructible_v<_It>) + _M_it = std::move(__x._M_it); + else + ::new((void*)std::__addressof(_M_it)) _It(__x._M_it); + } + else if (_M_index == 1) + { + if constexpr (is_trivially_default_constructible_v<_Sent>) + _M_sent = std::move(__x._M_sent); + else + ::new((void*)std::__addressof(_M_sent)) _Sent(__x._M_sent); + } + } + + constexpr + common_iterator(const common_iterator& __x) + noexcept(_S_noexcept()) + : _M_valueless(), _M_index(__x._M_index) + { + if (_M_index == 0) + { + if constexpr (is_trivially_default_constructible_v<_It>) + _M_it = std::move(__x._M_it); + else + ::new((void*)std::__addressof(_M_it)) _It(__x._M_it); + } + else if (_M_index == 1) + { + if constexpr (is_trivially_default_constructible_v<_Sent>) + _M_sent = std::move(__x._M_sent); + else + ::new((void*)std::__addressof(_M_sent)) _Sent(__x._M_sent); + } + } + + common_iterator& + operator=(const common_iterator& __x) + noexcept(is_nothrow_copy_assignable_v<_It> + && is_nothrow_copy_assignable_v<_Sent> + && is_nothrow_copy_constructible_v<_It> + && is_nothrow_copy_constructible_v<_Sent>) + { + return this->operator=<_It, _Sent>(__x); + } + + template + requires convertible_to + && convertible_to + && assignable_from<_It&, const _It2&> + && assignable_from<_Sent&, const _Sent2&> + common_iterator& + operator=(const common_iterator<_It2, _Sent2>& __x) + noexcept(is_nothrow_constructible_v<_It, const _It2&> + && is_nothrow_constructible_v<_Sent, const _Sent2&> + && is_nothrow_assignable_v<_It, const _It2&> + && is_nothrow_assignable_v<_Sent, const _Sent2&>) + { + switch(_M_index << 2 | __x._M_index) + { + case 0b0000: + _M_it = __x._M_it; + break; + case 0b0101: + _M_sent = __x._M_sent; + break; + case 0b0001: + _M_it.~_It(); + _M_index = -1; + [[fallthrough]]; + case 0b1001: + ::new((void*)std::__addressof(_M_sent)) _Sent(__x._M_sent); + _M_index = 1; + break; + case 0b0100: + _M_sent.~_Sent(); + _M_index = -1; + [[fallthrough]]; + case 0b1000: + ::new((void*)std::__addressof(_M_it)) _It(__x._M_it); + _M_index = 0; + break; + default: + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); + __builtin_unreachable(); + } + return *this; + } + + ~common_iterator() + { + switch (_M_index) + { + case 0: + _M_it.~_It(); + break; + case 1: + _M_sent.~_Sent(); + break; + } + } + + decltype(auto) + operator*() + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + return *_M_it; + } + + decltype(auto) + operator*() const requires __detail::__dereferenceable + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + return *_M_it; + } + + decltype(auto) + operator->() const requires __detail::__common_iter_has_arrow<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + if constexpr (is_pointer_v<_It> || requires { _M_it.operator->(); }) + return _M_it; + else if constexpr (is_reference_v>) + { + auto&& __tmp = *_M_it; + return std::__addressof(__tmp); + } + else + return __arrow_proxy{*_M_it}; + } + + common_iterator& + operator++() + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + ++_M_it; + return *this; + } + + decltype(auto) + operator++(int) + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + if constexpr (forward_iterator<_It>) + { + common_iterator __tmp = *this; + ++*this; + return __tmp; + } + else if constexpr (!__detail::__common_iter_use_postfix_proxy<_It>) + return _M_it++; + else + { + __postfix_proxy __p(**this); + ++*this; + return __p; + } + } + + template _Sent2> + requires sentinel_for<_Sent, _It2> + friend bool + operator==(const common_iterator& __x, + const common_iterator<_It2, _Sent2>& __y) + { + switch(__x._M_index << 2 | __y._M_index) + { + case 0b0000: + case 0b0101: + return true; + case 0b0001: + return __x._M_it == __y._M_sent; + case 0b0100: + return __x._M_sent == __y._M_it; + default: + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); + __builtin_unreachable(); + } + } + + template _Sent2> + requires sentinel_for<_Sent, _It2> && equality_comparable_with<_It, _It2> + friend bool + operator==(const common_iterator& __x, + const common_iterator<_It2, _Sent2>& __y) + { + switch(__x._M_index << 2 | __y._M_index) + { + case 0b0101: + return true; + case 0b0000: + return __x._M_it == __y._M_it; + case 0b0001: + return __x._M_it == __y._M_sent; + case 0b0100: + return __x._M_sent == __y._M_it; + default: + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); + __builtin_unreachable(); + } + } + + template _It2, sized_sentinel_for<_It> _Sent2> + requires sized_sentinel_for<_Sent, _It2> + friend iter_difference_t<_It2> + operator-(const common_iterator& __x, + const common_iterator<_It2, _Sent2>& __y) + { + switch(__x._M_index << 2 | __y._M_index) + { + case 0b0101: + return 0; + case 0b0000: + return __x._M_it - __y._M_it; + case 0b0001: + return __x._M_it - __y._M_sent; + case 0b0100: + return __x._M_sent - __y._M_it; + default: + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); + __builtin_unreachable(); + } + } + + friend iter_rvalue_reference_t<_It> + iter_move(const common_iterator& __i) + noexcept(noexcept(ranges::iter_move(std::declval()))) + requires input_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(__i._M_index == 0)) __builtin_unreachable(); } while (false); + return ranges::iter_move(__i._M_it); + } + + template _It2, typename _Sent2> + friend void + iter_swap(const common_iterator& __x, + const common_iterator<_It2, _Sent2>& __y) + noexcept(noexcept(ranges::iter_swap(std::declval(), + std::declval()))) + { + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_index == 0)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__y._M_index == 0)) __builtin_unreachable(); } while (false); + return ranges::iter_swap(__x._M_it, __y._M_it); + } + + private: + template _Sent2> + friend class common_iterator; + + bool _M_has_value() const noexcept { return _M_index < 2; } + + union + { + _It _M_it; + _Sent _M_sent; + unsigned char _M_valueless; + }; + unsigned char _M_index; + }; + + template + struct incrementable_traits> + { + using difference_type = iter_difference_t<_It>; + }; + + template + struct iterator_traits> + { + private: + template + struct __ptr + { + using type = void; + }; + + template + requires __detail::__common_iter_has_arrow<_Iter> + struct __ptr<_Iter> + { + using _CIter = common_iterator<_Iter, _Sent>; + using type = decltype(std::declval().operator->()); + }; + + static auto + _S_iter_cat() + { + using _Traits = iterator_traits<_It>; + if constexpr (requires { requires derived_from; }) + return forward_iterator_tag{}; + else + return input_iterator_tag{}; + } + + public: + using iterator_concept = conditional_t, + forward_iterator_tag, input_iterator_tag>; + using iterator_category = decltype(_S_iter_cat()); + using value_type = iter_value_t<_It>; + using difference_type = iter_difference_t<_It>; + using pointer = typename __ptr<_It>::type; + using reference = iter_reference_t<_It>; + }; + + + + namespace __detail + { + template + struct __counted_iter_value_type + { }; + + template + struct __counted_iter_value_type<_It> + { using value_type = iter_value_t<_It>; }; + + template + struct __counted_iter_concept + { }; + + template + requires requires { typename _It::iterator_concept; } + struct __counted_iter_concept<_It> + { using iterator_concept = typename _It::iterator_concept; }; + + template + struct __counted_iter_cat + { }; + + template + requires requires { typename _It::iterator_category; } + struct __counted_iter_cat<_It> + { using iterator_category = typename _It::iterator_category; }; + } + + + template + class counted_iterator + : public __detail::__counted_iter_value_type<_It>, + public __detail::__counted_iter_concept<_It>, + public __detail::__counted_iter_cat<_It> + { + public: + using iterator_type = _It; + + using difference_type = iter_difference_t<_It>; + + + + constexpr counted_iterator() = default; + + constexpr + counted_iterator(_It __i, iter_difference_t<_It> __n) + : _M_current(std::move(__i)), _M_length(__n) + { do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); } + + template + requires convertible_to + constexpr + counted_iterator(const counted_iterator<_It2>& __x) + : _M_current(__x._M_current), _M_length(__x._M_length) + { } + + template + requires assignable_from<_It&, const _It2&> + constexpr counted_iterator& + operator=(const counted_iterator<_It2>& __x) + { + _M_current = __x._M_current; + _M_length = __x._M_length; + return *this; + } + + constexpr const _It& + base() const & noexcept + { return _M_current; } + + constexpr _It + base() && + noexcept(is_nothrow_move_constructible_v<_It>) + { return std::move(_M_current); } + + constexpr iter_difference_t<_It> + count() const noexcept { return _M_length; } + + constexpr decltype(auto) + operator*() + noexcept(noexcept(*_M_current)) + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_length > 0)) __builtin_unreachable(); } while (false); + return *_M_current; + } + + constexpr decltype(auto) + operator*() const + noexcept(noexcept(*_M_current)) + requires __detail::__dereferenceable + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_length > 0)) __builtin_unreachable(); } while (false); + return *_M_current; + } + + constexpr auto + operator->() const noexcept + requires contiguous_iterator<_It> + { return std::to_address(_M_current); } + + constexpr counted_iterator& + operator++() + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_length > 0)) __builtin_unreachable(); } while (false); + ++_M_current; + --_M_length; + return *this; + } + + decltype(auto) + operator++(int) + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_length > 0)) __builtin_unreachable(); } while (false); + --_M_length; + try + { + return _M_current++; + } catch(...) { + ++_M_length; + throw; + } + + } + + constexpr counted_iterator + operator++(int) requires forward_iterator<_It> + { + auto __tmp = *this; + ++*this; + return __tmp; + } + + constexpr counted_iterator& + operator--() requires bidirectional_iterator<_It> + { + --_M_current; + ++_M_length; + return *this; + } + + constexpr counted_iterator + operator--(int) requires bidirectional_iterator<_It> + { + auto __tmp = *this; + --*this; + return __tmp; + } + + constexpr counted_iterator + operator+(iter_difference_t<_It> __n) const + requires random_access_iterator<_It> + { return counted_iterator(_M_current + __n, _M_length - __n); } + + friend constexpr counted_iterator + operator+(iter_difference_t<_It> __n, const counted_iterator& __x) + requires random_access_iterator<_It> + { return __x + __n; } + + constexpr counted_iterator& + operator+=(iter_difference_t<_It> __n) + requires random_access_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(__n <= _M_length)) __builtin_unreachable(); } while (false); + _M_current += __n; + _M_length -= __n; + return *this; + } + + constexpr counted_iterator + operator-(iter_difference_t<_It> __n) const + requires random_access_iterator<_It> + { return counted_iterator(_M_current - __n, _M_length + __n); } + + template _It2> + friend constexpr iter_difference_t<_It2> + operator-(const counted_iterator& __x, + const counted_iterator<_It2>& __y) + { return __y._M_length - __x._M_length; } + + friend constexpr iter_difference_t<_It> + operator-(const counted_iterator& __x, default_sentinel_t) + { return -__x._M_length; } + + friend constexpr iter_difference_t<_It> + operator-(default_sentinel_t, const counted_iterator& __y) + { return __y._M_length; } + + constexpr counted_iterator& + operator-=(iter_difference_t<_It> __n) + requires random_access_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(-__n <= _M_length)) __builtin_unreachable(); } while (false); + _M_current -= __n; + _M_length += __n; + return *this; + } + + constexpr decltype(auto) + operator[](iter_difference_t<_It> __n) const + noexcept(noexcept(_M_current[__n])) + requires random_access_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(__n < _M_length)) __builtin_unreachable(); } while (false); + return _M_current[__n]; + } + + template _It2> + friend constexpr bool + operator==(const counted_iterator& __x, + const counted_iterator<_It2>& __y) + { return __x._M_length == __y._M_length; } + + friend constexpr bool + operator==(const counted_iterator& __x, default_sentinel_t) + { return __x._M_length == 0; } + + template _It2> + friend constexpr strong_ordering + operator<=>(const counted_iterator& __x, + const counted_iterator<_It2>& __y) + { return __y._M_length <=> __x._M_length; } + + friend constexpr iter_rvalue_reference_t<_It> + iter_move(const counted_iterator& __i) + noexcept(noexcept(ranges::iter_move(__i._M_current))) + requires input_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(__i._M_length > 0)) __builtin_unreachable(); } while (false); + return ranges::iter_move(__i._M_current); + } + + template _It2> + friend constexpr void + iter_swap(const counted_iterator& __x, + const counted_iterator<_It2>& __y) + noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current))) + { + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_length > 0 && __y._M_length > 0)) __builtin_unreachable(); } while (false); + ranges::iter_swap(__x._M_current, __y._M_current); + } + + private: + template friend class counted_iterator; + + _It _M_current = _It(); + iter_difference_t<_It> _M_length = 0; + }; + + template + requires same_as<__detail::__iter_traits<_It>, iterator_traits<_It>> + struct iterator_traits> : iterator_traits<_It> + { + using pointer = conditional_t, + add_pointer_t>, + void>; + }; + + + + + template + auto + __niter_base(move_iterator<_Iterator> __it) + -> decltype(make_move_iterator(__niter_base(__it.base()))) + { return make_move_iterator(__niter_base(__it.base())); } + + template + struct __is_move_iterator > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template + auto + __miter_base(move_iterator<_Iterator> __it) + -> decltype(__miter_base(__it.base())) + { return __miter_base(__it.base()); } +# 2368 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + using __iter_key_t = remove_const_t< + typename iterator_traits<_InputIterator>::value_type::first_type>; + + template + using __iter_val_t = + typename iterator_traits<_InputIterator>::value_type::second_type; + + template + struct pair; + + template + using __iter_to_alloc_t = + pair>, + __iter_val_t<_InputIterator>>; + + + +} +# 68 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/debug/debug.h" 1 3 +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/debug/debug.h" 3 +namespace std +{ + namespace __debug { } +} + + + + +namespace __gnu_debug +{ + using namespace std::__debug; + + template + struct _Safe_iterator; +} +# 70 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/predefined_ops.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/predefined_ops.h" 3 +namespace __gnu_cxx +{ +namespace __ops +{ + struct _Iter_less_iter + { + template + constexpr + bool + operator()(_Iterator1 __it1, _Iterator2 __it2) const + { return *__it1 < *__it2; } + }; + + constexpr + inline _Iter_less_iter + __iter_less_iter() + { return _Iter_less_iter(); } + + struct _Iter_less_val + { + + constexpr _Iter_less_val() = default; + + + + + constexpr + explicit + _Iter_less_val(_Iter_less_iter) { } + + template + constexpr + bool + operator()(_Iterator __it, _Value& __val) const + { return *__it < __val; } + }; + + constexpr + inline _Iter_less_val + __iter_less_val() + { return _Iter_less_val(); } + + constexpr + inline _Iter_less_val + __iter_comp_val(_Iter_less_iter) + { return _Iter_less_val(); } + + struct _Val_less_iter + { + + constexpr _Val_less_iter() = default; + + + + + constexpr + explicit + _Val_less_iter(_Iter_less_iter) { } + + template + constexpr + bool + operator()(_Value& __val, _Iterator __it) const + { return __val < *__it; } + }; + + constexpr + inline _Val_less_iter + __val_less_iter() + { return _Val_less_iter(); } + + constexpr + inline _Val_less_iter + __val_comp_iter(_Iter_less_iter) + { return _Val_less_iter(); } + + struct _Iter_equal_to_iter + { + template + constexpr + bool + operator()(_Iterator1 __it1, _Iterator2 __it2) const + { return *__it1 == *__it2; } + }; + + constexpr + inline _Iter_equal_to_iter + __iter_equal_to_iter() + { return _Iter_equal_to_iter(); } + + struct _Iter_equal_to_val + { + template + constexpr + bool + operator()(_Iterator __it, _Value& __val) const + { return *__it == __val; } + }; + + constexpr + inline _Iter_equal_to_val + __iter_equal_to_val() + { return _Iter_equal_to_val(); } + + constexpr + inline _Iter_equal_to_val + __iter_comp_val(_Iter_equal_to_iter) + { return _Iter_equal_to_val(); } + + template + struct _Iter_comp_iter + { + _Compare _M_comp; + + explicit constexpr + _Iter_comp_iter(_Compare __comp) + : _M_comp(std::move(__comp)) + { } + + template + constexpr + bool + operator()(_Iterator1 __it1, _Iterator2 __it2) + { return bool(_M_comp(*__it1, *__it2)); } + }; + + template + constexpr + inline _Iter_comp_iter<_Compare> + __iter_comp_iter(_Compare __comp) + { return _Iter_comp_iter<_Compare>(std::move(__comp)); } + + template + struct _Iter_comp_val + { + _Compare _M_comp; + + constexpr + explicit + _Iter_comp_val(_Compare __comp) + : _M_comp(std::move(__comp)) + { } + + constexpr + explicit + _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) + : _M_comp(__comp._M_comp) + { } + + + constexpr + explicit + _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) + : _M_comp(std::move(__comp._M_comp)) + { } + + + template + constexpr + bool + operator()(_Iterator __it, _Value& __val) + { return bool(_M_comp(*__it, __val)); } + }; + + template + constexpr + inline _Iter_comp_val<_Compare> + __iter_comp_val(_Compare __comp) + { return _Iter_comp_val<_Compare>(std::move(__comp)); } + + template + constexpr + inline _Iter_comp_val<_Compare> + __iter_comp_val(_Iter_comp_iter<_Compare> __comp) + { return _Iter_comp_val<_Compare>(std::move(__comp)); } + + template + struct _Val_comp_iter + { + _Compare _M_comp; + + constexpr + explicit + _Val_comp_iter(_Compare __comp) + : _M_comp(std::move(__comp)) + { } + + constexpr + explicit + _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) + : _M_comp(__comp._M_comp) + { } + + + constexpr + explicit + _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) + : _M_comp(std::move(__comp._M_comp)) + { } + + + template + constexpr + bool + operator()(_Value& __val, _Iterator __it) + { return bool(_M_comp(__val, *__it)); } + }; + + template + constexpr + inline _Val_comp_iter<_Compare> + __val_comp_iter(_Compare __comp) + { return _Val_comp_iter<_Compare>(std::move(__comp)); } + + template + constexpr + inline _Val_comp_iter<_Compare> + __val_comp_iter(_Iter_comp_iter<_Compare> __comp) + { return _Val_comp_iter<_Compare>(std::move(__comp)); } + + template + struct _Iter_equals_val + { + _Value& _M_value; + + constexpr + explicit + _Iter_equals_val(_Value& __value) + : _M_value(__value) + { } + + template + constexpr + bool + operator()(_Iterator __it) + { return *__it == _M_value; } + }; + + template + constexpr + inline _Iter_equals_val<_Value> + __iter_equals_val(_Value& __val) + { return _Iter_equals_val<_Value>(__val); } + + template + struct _Iter_equals_iter + { + _Iterator1 _M_it1; + + constexpr + explicit + _Iter_equals_iter(_Iterator1 __it1) + : _M_it1(__it1) + { } + + template + constexpr + bool + operator()(_Iterator2 __it2) + { return *__it2 == *_M_it1; } + }; + + template + constexpr + inline _Iter_equals_iter<_Iterator> + __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) + { return _Iter_equals_iter<_Iterator>(__it); } + + template + struct _Iter_pred + { + _Predicate _M_pred; + + constexpr + explicit + _Iter_pred(_Predicate __pred) + : _M_pred(std::move(__pred)) + { } + + template + constexpr + bool + operator()(_Iterator __it) + { return bool(_M_pred(*__it)); } + }; + + template + constexpr + inline _Iter_pred<_Predicate> + __pred_iter(_Predicate __pred) + { return _Iter_pred<_Predicate>(std::move(__pred)); } + + template + struct _Iter_comp_to_val + { + _Compare _M_comp; + _Value& _M_value; + + constexpr + _Iter_comp_to_val(_Compare __comp, _Value& __value) + : _M_comp(std::move(__comp)), _M_value(__value) + { } + + template + constexpr + bool + operator()(_Iterator __it) + { return bool(_M_comp(*__it, _M_value)); } + }; + + template + _Iter_comp_to_val<_Compare, _Value> + constexpr + __iter_comp_val(_Compare __comp, _Value &__val) + { + return _Iter_comp_to_val<_Compare, _Value>(std::move(__comp), __val); + } + + template + struct _Iter_comp_to_iter + { + _Compare _M_comp; + _Iterator1 _M_it1; + + constexpr + _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) + : _M_comp(std::move(__comp)), _M_it1(__it1) + { } + + template + constexpr + bool + operator()(_Iterator2 __it2) + { return bool(_M_comp(*__it2, *_M_it1)); } + }; + + template + constexpr + inline _Iter_comp_to_iter<_Compare, _Iterator> + __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) + { + return _Iter_comp_to_iter<_Compare, _Iterator>( + std::move(__comp._M_comp), __it); + } + + template + struct _Iter_negate + { + _Predicate _M_pred; + + constexpr + explicit + _Iter_negate(_Predicate __pred) + : _M_pred(std::move(__pred)) + { } + + template + constexpr + bool + operator()(_Iterator __it) + { return !bool(_M_pred(*__it)); } + }; + + template + constexpr + inline _Iter_negate<_Predicate> + __negate(_Iter_pred<_Predicate> __pred) + { return _Iter_negate<_Predicate>(std::move(__pred._M_pred)); } + +} +} +# 72 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 + + + + + + + +namespace std +{ + + + + + + + template + constexpr + inline int + __memcmp(const _Tp* __first1, const _Up* __first2, size_t __num) + { + + static_assert(sizeof(_Tp) == sizeof(_Up), "can be compared with memcmp"); + + + if (std::is_constant_evaluated()) + { + for(; __num > 0; ++__first1, ++__first2, --__num) + if (*__first1 != *__first2) + return *__first1 < *__first2 ? -1 : 1; + return 0; + } + else + + return __builtin_memcmp(__first1, __first2, sizeof(_Tp) * __num); + } +# 149 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + + + + +# 182 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + swap(*__a, *__b); + + } +# 198 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + _ForwardIterator2 + swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + + + + ; + + for (; __first1 != __last1; ++__first1, (void)++__first2) + std::iter_swap(__first1, __first2); + return __first2; + } +# 227 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline const _Tp& + min(const _Tp& __a, const _Tp& __b) + { + + + + if (__b < __a) + return __b; + return __a; + } +# 251 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline const _Tp& + max(const _Tp& __a, const _Tp& __b) + { + + + + if (__a < __b) + return __b; + return __a; + } +# 275 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline const _Tp& + min(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__b, __a)) + return __b; + return __a; + } +# 297 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline const _Tp& + max(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__a, __b)) + return __b; + return __a; + } + + + + template + constexpr + inline _Iterator + __niter_base(_Iterator __it) + noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) + { return __it; } + + template + _Ite + __niter_base(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, + std::random_access_iterator_tag>&); + + + + + template + constexpr + inline _From + __niter_wrap(_From __from, _To __res) + { return __from + (__res - std::__niter_base(__from)); } + + + template + constexpr + inline _Iterator + __niter_wrap(const _Iterator&, _Iterator __res) + { return __res; } + + + + + + + + template + struct __copy_move + { + template + constexpr + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, (void)++__first) + *__result = *__first; + return __result; + } + }; + + + template + struct __copy_move + { + template + constexpr + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, (void)++__first) + *__result = std::move(*__first); + return __result; + } + }; + + + template<> + struct __copy_move + { + template + constexpr + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = *__first; + ++__first; + ++__result; + } + return __result; + } + }; + + + template<> + struct __copy_move + { + template + constexpr + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = std::move(*__first); + ++__first; + ++__result; + } + return __result; + } + }; + + + template + struct __copy_move<_IsMove, true, random_access_iterator_tag> + { + template + constexpr + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + + using __assignable = conditional<_IsMove, + is_move_assignable<_Tp>, + is_copy_assignable<_Tp>>; + + static_assert( __assignable::type::value, "type is not assignable" ); + + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); + return __result + _Num; + } + }; + + + + template + struct _Deque_iterator; + + struct _Bit_iterator; + + + + + + template + struct char_traits; + + template + class istreambuf_iterator; + + template + class ostreambuf_iterator; + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); + + template + typename __gnu_cxx::__enable_if< + __is_char<_CharT>::__value, + std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type + __copy_move_a2( + istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, + std::_Deque_iterator<_CharT, _CharT&, _CharT*>); + + template + constexpr + inline _OI + __copy_move_a2(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::iterator_category _Category; + + if (std::is_constant_evaluated()) + return std::__copy_move<_IsMove, false, _Category>:: + __copy_m(__first, __last, __result); + + return std::__copy_move<_IsMove, __memcpyable<_OI, _II>::__value, + _Category>::__copy_m(__first, __last, __result); + } + + template + _OI + __copy_move_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, + std::_Deque_iterator<_Tp, _Ref, _Ptr>, + _OI); + + template + std::_Deque_iterator<_OTp, _OTp&, _OTp*> + __copy_move_a1(std::_Deque_iterator<_ITp, _IRef, _IPtr>, + std::_Deque_iterator<_ITp, _IRef, _IPtr>, + std::_Deque_iterator<_OTp, _OTp&, _OTp*>); + + template + typename __gnu_cxx::__enable_if< + __is_random_access_iter<_II>::__value, + std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type + __copy_move_a1(_II, _II, std::_Deque_iterator<_Tp, _Tp&, _Tp*>); + + template + constexpr + inline _OI + __copy_move_a1(_II __first, _II __last, _OI __result) + { return std::__copy_move_a2<_IsMove>(__first, __last, __result); } + + template + constexpr + inline _OI + __copy_move_a(_II __first, _II __last, _OI __result) + { + return std::__niter_wrap(__result, + std::__copy_move_a1<_IsMove>(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result))); + } + + template + _OI + __copy_move_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + _OI); + + template + __gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> + __copy_move_a(_II, _II, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&); + + template + ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat> + __copy_move_a(const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, + const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, + const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); + + template + constexpr + _OutputIterator + __copy_n_a(_InputIterator __first, _Size __n, _OutputIterator __result, + bool) + { + if (__n > 0) + { + while (true) + { + *__result = *__first; + ++__result; + if (--__n > 0) + ++__first; + else + break; + } + } + return __result; + } + + template + typename __gnu_cxx::__enable_if< + __is_char<_CharT>::__value, _CharT*>::__type + __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT> >, + _Size, _CharT*, bool); + + template + typename __gnu_cxx::__enable_if< + __is_char<_CharT>::__value, + std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type + __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT> >, _Size, + std::_Deque_iterator<_CharT, _CharT&, _CharT*>, + bool); +# 608 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _OI + copy(_II __first, _II __last, _OI __result) + { + + + + + ; + + return std::__copy_move_a<__is_move_iterator<_II>::__value> + (std::__miter_base(__first), std::__miter_base(__last), __result); + } +# 641 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _OI + move(_II __first, _II __last, _OI __result) + { + + + + + ; + + return std::__copy_move_a(std::__miter_base(__first), + std::__miter_base(__last), __result); + } + + + + + + + template + struct __copy_move_backward + { + template + constexpr + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = *--__last; + return __result; + } + }; + + + template + struct __copy_move_backward + { + template + constexpr + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = std::move(*--__last); + return __result; + } + }; + + + template<> + struct __copy_move_backward + { + template + constexpr + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type + __n = __last - __first; + for (; __n > 0; --__n) + *--__result = *--__last; + return __result; + } + }; + + + template<> + struct __copy_move_backward + { + template + constexpr + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type + __n = __last - __first; + for (; __n > 0; --__n) + *--__result = std::move(*--__last); + return __result; + } + }; + + + template + struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> + { + template + constexpr + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + + using __assignable = conditional<_IsMove, + is_move_assignable<_Tp>, + is_copy_assignable<_Tp>>; + + static_assert( __assignable::type::value, "type is not assignable" ); + + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } + }; + + template + constexpr + inline _BI2 + __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) + { + typedef typename iterator_traits<_BI1>::iterator_category _Category; + + if (std::is_constant_evaluated()) + return std::__copy_move_backward<_IsMove, false, _Category>:: + __copy_move_b(__first, __last, __result); + + return std::__copy_move_backward<_IsMove, + __memcpyable<_BI2, _BI1>::__value, + _Category>::__copy_move_b(__first, + __last, + __result); + } + + template + constexpr + inline _BI2 + __copy_move_backward_a1(_BI1 __first, _BI1 __last, _BI2 __result) + { return std::__copy_move_backward_a2<_IsMove>(__first, __last, __result); } + + template + _OI + __copy_move_backward_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, + std::_Deque_iterator<_Tp, _Ref, _Ptr>, + _OI); + + template + std::_Deque_iterator<_OTp, _OTp&, _OTp*> + __copy_move_backward_a1( + std::_Deque_iterator<_ITp, _IRef, _IPtr>, + std::_Deque_iterator<_ITp, _IRef, _IPtr>, + std::_Deque_iterator<_OTp, _OTp&, _OTp*>); + + template + typename __gnu_cxx::__enable_if< + __is_random_access_iter<_II>::__value, + std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type + __copy_move_backward_a1(_II, _II, + std::_Deque_iterator<_Tp, _Tp&, _Tp*>); + + template + constexpr + inline _OI + __copy_move_backward_a(_II __first, _II __last, _OI __result) + { + return std::__niter_wrap(__result, + std::__copy_move_backward_a1<_IsMove> + (std::__niter_base(__first), std::__niter_base(__last), + std::__niter_base(__result))); + } + + template + _OI + __copy_move_backward_a( + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + _OI); + + template + __gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> + __copy_move_backward_a(_II, _II, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&); + + template + ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat> + __copy_move_backward_a( + const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, + const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, + const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); +# 845 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _BI2 + copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + + + + ; + + return std::__copy_move_backward_a<__is_move_iterator<_BI1>::__value> + (std::__miter_base(__first), std::__miter_base(__last), __result); + } +# 881 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _BI2 + move_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + + + + ; + + return std::__copy_move_backward_a(std::__miter_base(__first), + std::__miter_base(__last), + __result); + } + + + + + + + template + constexpr + inline typename + __gnu_cxx::__enable_if::__value, void>::__type + __fill_a1(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + for (; __first != __last; ++__first) + *__first = __value; + } + + template + constexpr + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type + __fill_a1(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + } + + + template + constexpr + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type + __fill_a1(_Tp* __first, _Tp* __last, const _Tp& __c) + { + const _Tp __tmp = __c; + + if (std::is_constant_evaluated()) + { + for (; __first != __last; ++__first) + *__first = __tmp; + return; + } + + if (const size_t __len = __last - __first) + __builtin_memset(__first, static_cast(__tmp), __len); + } + + template + constexpr + inline void + __fill_a1(::__gnu_cxx::__normal_iterator<_Ite, _Cont> __first, + ::__gnu_cxx::__normal_iterator<_Ite, _Cont> __last, + const _Tp& __value) + { std::__fill_a1(__first.base(), __last.base(), __value); } + + template + void + __fill_a1(const std::_Deque_iterator<_Tp, _Tp&, _Tp*>&, + const std::_Deque_iterator<_Tp, _Tp&, _Tp*>&, + const _VTp&); + + void + __fill_a1(std::_Bit_iterator, std::_Bit_iterator, + const bool&); + + template + constexpr + inline void + __fill_a(_FIte __first, _FIte __last, const _Tp& __value) + { std::__fill_a1(__first, __last, __value); } + + template + void + __fill_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + const _Tp&); +# 989 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline void + fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) + { + + + + ; + + std::__fill_a(__first, __last, __value); + } + + + inline constexpr int + __size_to_integer(int __n) { return __n; } + inline constexpr unsigned + __size_to_integer(unsigned __n) { return __n; } + inline constexpr long + __size_to_integer(long __n) { return __n; } + inline constexpr unsigned long + __size_to_integer(unsigned long __n) { return __n; } + inline constexpr long long + __size_to_integer(long long __n) { return __n; } + inline constexpr unsigned long long + __size_to_integer(unsigned long long __n) { return __n; } +# 1041 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + inline constexpr long long + __size_to_integer(float __n) { return (long long)__n; } + inline constexpr long long + __size_to_integer(double __n) { return (long long)__n; } + inline constexpr long long + __size_to_integer(long double __n) { return (long long)__n; } + + + + + + template + constexpr + inline typename + __gnu_cxx::__enable_if::__value, _OutputIterator>::__type + __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) + { + for (; __n > 0; --__n, (void) ++__first) + *__first = __value; + return __first; + } + + template + constexpr + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type + __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __n > 0; --__n, (void) ++__first) + *__first = __tmp; + return __first; + } + + template + ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> + __fill_n_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>& __first, + _Size __n, const _Tp& __value, + std::input_iterator_tag); + + template + constexpr + inline _OutputIterator + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, + std::output_iterator_tag) + { + + static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); + + return __fill_n_a1(__first, __n, __value); + } + + template + constexpr + inline _OutputIterator + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, + std::input_iterator_tag) + { + + static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); + + return __fill_n_a1(__first, __n, __value); + } + + template + constexpr + inline _OutputIterator + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, + std::random_access_iterator_tag) + { + + static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); + + if (__n <= 0) + return __first; + + ; + + std::__fill_a(__first, __first + __n, __value); + return __first + __n; + } +# 1141 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _OI + fill_n(_OI __first, _Size __n, const _Tp& __value) + { + + + + return std::__fill_n_a(__first, std::__size_to_integer(__n), __value, + std::__iterator_category(__first)); + } + + template + struct __equal + { + template + constexpr + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + for (; __first1 != __last1; ++__first1, (void) ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; + } + }; + + template<> + struct __equal + { + template + constexpr + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { + if (const size_t __len = (__last1 - __first1)) + return !std::__memcmp(__first1, __first2, __len); + return true; + } + }; + + template + typename __gnu_cxx::__enable_if< + __is_random_access_iter<_II>::__value, bool>::__type + __equal_aux1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, + std::_Deque_iterator<_Tp, _Ref, _Ptr>, + _II); + + template + bool + __equal_aux1(std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); + + template + typename __gnu_cxx::__enable_if< + __is_random_access_iter<_II>::__value, bool>::__type + __equal_aux1(_II, _II, + std::_Deque_iterator<_Tp, _Ref, _Ptr>); + + template + constexpr + inline bool + __equal_aux1(_II1 __first1, _II1 __last1, _II2 __first2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + const bool __simple = ((__is_integer<_ValueType1>::__value + || __is_pointer<_ValueType1>::__value) + && __memcmpable<_II1, _II2>::__value); + return std::__equal<__simple>::equal(__first1, __last1, __first2); + } + + template + constexpr + inline bool + __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) + { + return std::__equal_aux1(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2)); + } + + template + bool + __equal_aux(const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, + _II2); + + template + bool + __equal_aux(_II1, _II1, + const ::__gnu_debug::_Safe_iterator<_II2, _Seq2, _Cat2>&); + + template + bool + __equal_aux(const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_II2, _Seq2, _Cat2>&); + + template + struct __lc_rai + { + template + constexpr + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } + + template + constexpr + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } + }; + + template<> + struct __lc_rai + { + template + constexpr + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, + _RAI2 __first2, _RAI2 __last2) + { + const typename iterator_traits<_RAI1>::difference_type + __diff1 = __last1 - __first1; + const typename iterator_traits<_RAI2>::difference_type + __diff2 = __last2 - __first2; + return __diff2 < __diff1 ? __first1 + __diff2 : __last1; + } + + template + static constexpr bool + __cnd2(_RAI, _RAI) + { return true; } + }; + + template + constexpr + bool + __lexicographical_compare_impl(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, + _Compare __comp) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, (void)++__first2) + { + if (__comp(__first1, __first2)) + return true; + if (__comp(__first2, __first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + + template + struct __lexicographical_compare + { + template + constexpr + static bool + __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + using __gnu_cxx::__ops::__iter_less_iter; + return std::__lexicographical_compare_impl(__first1, __last1, + __first2, __last2, + __iter_less_iter()); + } + + template + constexpr + static int + __3way(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + while (__first1 != __last1) + { + if (__first2 == __last2) + return +1; + if (*__first1 < *__first2) + return -1; + if (*__first2 < *__first1) + return +1; + ++__first1; + ++__first2; + } + return int(__first2 == __last2) - 1; + } + }; + + template<> + struct __lexicographical_compare + { + template + constexpr + static bool + __lc(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { return __3way(__first1, __last1, __first2, __last2) < 0; } + + template + constexpr + static ptrdiff_t + __3way(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + if (const size_t __len = std::min(__len1, __len2)) + if (int __result = std::__memcmp(__first1, __first2, __len)) + return __result; + return ptrdiff_t(__len1 - __len2); + } + }; + + template + constexpr + inline bool + __lexicographical_compare_aux1(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = + (__is_memcmp_ordered_with<_ValueType1, _ValueType2>::__value + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + + + + + && !is_volatile_v>> + && !is_volatile_v>> + + ); + + return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, + __first2, __last2); + } + + template + bool + __lexicographical_compare_aux1( + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + _Tp2*, _Tp2*); + + template + bool + __lexicographical_compare_aux1(_Tp1*, _Tp1*, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); + + template + bool + __lexicographical_compare_aux1( + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); + + template + constexpr + inline bool + __lexicographical_compare_aux(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + return std::__lexicographical_compare_aux1(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2), + std::__niter_base(__last2)); + } + + template + bool + __lexicographical_compare_aux( + const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, + _II2, _II2); + + template + bool + __lexicographical_compare_aux( + _II1, _II1, + const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&, + const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&); + + template + bool + __lexicographical_compare_aux( + const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&, + const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&); + + template + constexpr + _ForwardIterator + __lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } +# 1487 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + + + + + ; + + return std::__lower_bound(__first, __last, __val, + __gnu_cxx::__ops::__iter_less_val()); + } + + + + inline constexpr int + __lg(int __n) + { return (int)sizeof(int) * 8 - 1 - __builtin_clz(__n); } + + inline constexpr unsigned + __lg(unsigned __n) + { return (int)sizeof(int) * 8 - 1 - __builtin_clz(__n); } + + inline constexpr long + __lg(long __n) + { return (int)sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + + inline constexpr unsigned long + __lg(unsigned long __n) + { return (int)sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + + inline constexpr long long + __lg(long long __n) + { return (int)sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + + inline constexpr unsigned long long + __lg(unsigned long long __n) + { return (int)sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + + +# 1543 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + + + + + + + ; + + return std::__equal_aux(__first1, __last1, __first2); + } +# 1574 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + for (; __first1 != __last1; ++__first1, (void)++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return true; + } + + + + template + constexpr + inline bool + __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + using _RATag = random_access_iterator_tag; + using _Cat1 = typename iterator_traits<_II1>::iterator_category; + using _Cat2 = typename iterator_traits<_II2>::iterator_category; + using _RAIters = __and_, is_same<_Cat2, _RATag>>; + if (_RAIters()) + { + auto __d1 = std::distance(__first1, __last1); + auto __d2 = std::distance(__first2, __last2); + if (__d1 != __d2) + return false; + return std::equal(__first1, __last1, __first2); + } + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!(*__first1 == *__first2)) + return false; + return __first1 == __last1 && __first2 == __last2; + } + + + template + constexpr + inline bool + __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, + _BinaryPredicate __binary_pred) + { + using _RATag = random_access_iterator_tag; + using _Cat1 = typename iterator_traits<_II1>::iterator_category; + using _Cat2 = typename iterator_traits<_II2>::iterator_category; + using _RAIters = __and_, is_same<_Cat2, _RATag>>; + if (_RAIters()) + { + auto __d1 = std::distance(__first1, __last1); + auto __d2 = std::distance(__first2, __last2); + if (__d1 != __d2) + return false; + return std::equal(__first1, __last1, __first2, + __binary_pred); + } + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return __first1 == __last1 && __first2 == __last2; + } +# 1664 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + + + + + + + ; + ; + + return std::__equal4(__first1, __last1, __first2, __last2); + } +# 1697 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred) + { + + + + ; + ; + + return std::__equal4(__first1, __last1, __first2, __last2, + __binary_pred); + } +# 1729 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + + + + + + + + + + ; + ; + + return std::__lexicographical_compare_aux(__first1, __last1, + __first2, __last2); + } +# 1764 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, _Compare __comp) + { + + + + ; + ; + + return std::__lexicographical_compare_impl + (__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + + + template + concept __is_byte_iter = contiguous_iterator<_Iter> + && __is_memcmp_ordered>::__value; + + + + template + constexpr auto + __min_cmp(_Tp __x, _Tp __y) + { + struct _Res { + _Tp _M_min; + decltype(__x <=> __y) _M_cmp; + }; + auto __c = __x <=> __y; + if (__c > 0) + return _Res{__y, __c}; + return _Res{__x, __c}; + } +# 1815 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr auto + lexicographical_compare_three_way(_InputIter1 __first1, + _InputIter1 __last1, + _InputIter2 __first2, + _InputIter2 __last2, + _Comp __comp) + -> decltype(__comp(*__first1, *__first2)) + { + + + + ; + ; + + + using _Cat = decltype(__comp(*__first1, *__first2)); + static_assert(same_as, _Cat>); + + if (!std::is_constant_evaluated()) + if constexpr (same_as<_Comp, __detail::_Synth3way> + || same_as<_Comp, compare_three_way>) + if constexpr (__is_byte_iter<_InputIter1>) + if constexpr (__is_byte_iter<_InputIter2>) + { + const auto [__len, __lencmp] = std:: + __min_cmp(__last1 - __first1, __last2 - __first2); + if (__len) + { + const auto __c + = __builtin_memcmp(&*__first1, &*__first2, __len) <=> 0; + if (__c != 0) + return __c; + } + return __lencmp; + } + + while (__first1 != __last1) + { + if (__first2 == __last2) + return strong_ordering::greater; + if (auto __cmp = __comp(*__first1, *__first2); __cmp != 0) + return __cmp; + ++__first1; + ++__first2; + } + return (__first2 == __last2) <=> true; + } + + template + constexpr auto + lexicographical_compare_three_way(_InputIter1 __first1, + _InputIter1 __last1, + _InputIter2 __first2, + _InputIter2 __last2) + { + return std:: + lexicographical_compare_three_way(__first1, __last1, __first2, __last2, + compare_three_way{}); + } + + + template + constexpr + pair<_InputIterator1, _InputIterator2> + __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + while (__first1 != __last1 && __binary_pred(__first1, __first2)) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +# 1905 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2) + { + + + + + + + ; + + return std::__mismatch(__first1, __last1, __first2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 1939 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + return std::__mismatch(__first1, __last1, __first2, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); + } + + + + template + constexpr + pair<_InputIterator1, _InputIterator2> + __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _BinaryPredicate __binary_pred) + { + while (__first1 != __last1 && __first2 != __last2 + && __binary_pred(__first1, __first2)) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +# 1988 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + + + + + + + ; + ; + + return std::__mismatch(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 2024 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _BinaryPredicate __binary_pred) + { + + + + ; + ; + + return std::__mismatch(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); + } + + + + + + template + constexpr + inline _InputIterator + __find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred, input_iterator_tag) + { + while (__first != __last && !__pred(__first)) + ++__first; + return __first; + } + + + template + constexpr + _RandomAccessIterator + __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Predicate __pred, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + + for (; __trip_count > 0; --__trip_count) + { + if (__pred(__first)) + return __first; + ++__first; + + if (__pred(__first)) + return __first; + ++__first; + + if (__pred(__first)) + return __first; + ++__first; + + if (__pred(__first)) + return __first; + ++__first; + } + + switch (__last - __first) + { + case 3: + if (__pred(__first)) + return __first; + ++__first; + + case 2: + if (__pred(__first)) + return __first; + ++__first; + + case 1: + if (__pred(__first)) + return __first; + ++__first; + + case 0: + default: + return __last; + } + } + + template + constexpr + inline _Iterator + __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) + { + return __find_if(__first, __last, __pred, + std::__iterator_category(__first)); + } + + template + constexpr + typename iterator_traits<_InputIterator>::difference_type + __count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (__pred(__first)) + ++__n; + return __n; + } + + + template + constexpr + bool + __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _BinaryPredicate __pred) + { + + + for (; __first1 != __last1; ++__first1, (void)++__first2) + if (!__pred(__first1, __first2)) + break; + + if (__first1 == __last1) + return true; + + + + _ForwardIterator2 __last2 = __first2; + std::advance(__last2, std::distance(__first1, __last1)); + for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) + { + if (__scan != std::__find_if(__first1, __scan, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) + continue; + + auto __matches + = std::__count_if(__first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); + if (0 == __matches || + std::__count_if(__scan, __last1, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) + != __matches) + return false; + } + return true; + } +# 2181 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + + + + + ; + + return std::__is_permutation(__first1, __last1, __first2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } + + + +} +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 1 3 +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 +# 158 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 +namespace std +{ + + + + + + + + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + + + + + + + enum float_denorm_style + { + + denorm_indeterminate = -1, + + denorm_absent = 0, + + denorm_present = 1 + }; +# 202 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + struct __numeric_limits_base + { + + + static constexpr bool is_specialized = false; + + + + + static constexpr int digits = 0; + + + static constexpr int digits10 = 0; + + + + + static constexpr int max_digits10 = 0; + + + + static constexpr bool is_signed = false; + + + static constexpr bool is_integer = false; + + + + + static constexpr bool is_exact = false; + + + + static constexpr int radix = 0; + + + + static constexpr int min_exponent = 0; + + + + static constexpr int min_exponent10 = 0; + + + + + static constexpr int max_exponent = 0; + + + + static constexpr int max_exponent10 = 0; + + + static constexpr bool has_infinity = false; + + + + static constexpr bool has_quiet_NaN = false; + + + + static constexpr bool has_signaling_NaN = false; + + + static constexpr float_denorm_style has_denorm = denorm_absent; + + + + static constexpr bool has_denorm_loss = false; + + + + static constexpr bool is_iec559 = false; + + + + + static constexpr bool is_bounded = false; +# 288 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + static constexpr bool is_modulo = false; + + + static constexpr bool traps = false; + + + static constexpr bool tinyness_before = false; + + + + + static constexpr float_round_style round_style = + round_toward_zero; + }; +# 311 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + template + struct numeric_limits : public __numeric_limits_base + { + + + static constexpr _Tp + min() noexcept { return _Tp(); } + + + static constexpr _Tp + max() noexcept { return _Tp(); } + + + + + static constexpr _Tp + lowest() noexcept { return _Tp(); } + + + + + static constexpr _Tp + epsilon() noexcept { return _Tp(); } + + + static constexpr _Tp + round_error() noexcept { return _Tp(); } + + + static constexpr _Tp + infinity() noexcept { return _Tp(); } + + + + static constexpr _Tp + quiet_NaN() noexcept { return _Tp(); } + + + + static constexpr _Tp + signaling_NaN() noexcept { return _Tp(); } + + + + + static constexpr _Tp + denorm_min() noexcept { return _Tp(); } + }; + + + + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; +# 383 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr bool + min() noexcept { return false; } + + static constexpr bool + max() noexcept { return true; } + + + static constexpr bool + lowest() noexcept { return min(); } + + static constexpr int digits = 1; + static constexpr int digits10 = 0; + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr bool + epsilon() noexcept { return false; } + + static constexpr bool + round_error() noexcept { return false; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr bool + infinity() noexcept { return false; } + + static constexpr bool + quiet_NaN() noexcept { return false; } + + static constexpr bool + signaling_NaN() noexcept { return false; } + + static constexpr bool + denorm_min() noexcept { return false; } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + + + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char + min() noexcept { return (((char)(-1) < 0) ? -(((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0) - 1 : (char)0); } + + static constexpr char + max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + + + static constexpr char + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = ((char)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char + epsilon() noexcept { return 0; } + + static constexpr char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr + char infinity() noexcept { return char(); } + + static constexpr char + quiet_NaN() noexcept { return char(); } + + static constexpr char + signaling_NaN() noexcept { return char(); } + + static constexpr char + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr signed char + min() noexcept { return -0x7f - 1; } + + static constexpr signed char + max() noexcept { return 0x7f; } + + + static constexpr signed char + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr signed char + epsilon() noexcept { return 0; } + + static constexpr signed char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr signed char + infinity() noexcept { return static_cast(0); } + + static constexpr signed char + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr signed char + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr signed char + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned char + min() noexcept { return 0; } + + static constexpr unsigned char + max() noexcept { return 0x7f * 2U + 1; } + + + static constexpr unsigned char + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned char + epsilon() noexcept { return 0; } + + static constexpr unsigned char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned char + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned char + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned char + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned char + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr wchar_t + min() noexcept { return (((wchar_t)(-1) < 0) ? -(((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0) - 1 : (wchar_t)0); } + + static constexpr wchar_t + max() noexcept { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + + + static constexpr wchar_t + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = ((wchar_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr wchar_t + epsilon() noexcept { return 0; } + + static constexpr wchar_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr wchar_t + infinity() noexcept { return wchar_t(); } + + static constexpr wchar_t + quiet_NaN() noexcept { return wchar_t(); } + + static constexpr wchar_t + signaling_NaN() noexcept { return wchar_t(); } + + static constexpr wchar_t + denorm_min() noexcept { return wchar_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char8_t + min() noexcept { return (((char8_t)(-1) < 0) ? -(((char8_t)(-1) < 0) ? (((((char8_t)1 << ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char8_t)0) - 1 : (char8_t)0); } + + static constexpr char8_t + max() noexcept { return (((char8_t)(-1) < 0) ? (((((char8_t)1 << ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char8_t)0); } + + static constexpr char8_t + lowest() noexcept { return min(); } + + static constexpr int digits = (sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) * 643L / 2136); + static constexpr int max_digits10 = 0; + static constexpr bool is_signed = ((char8_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char8_t + epsilon() noexcept { return 0; } + + static constexpr char8_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr char8_t + infinity() noexcept { return char8_t(); } + + static constexpr char8_t + quiet_NaN() noexcept { return char8_t(); } + + static constexpr char8_t + signaling_NaN() noexcept { return char8_t(); } + + static constexpr char8_t + denorm_min() noexcept { return char8_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char16_t + min() noexcept { return (((char16_t)(-1) < 0) ? -(((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0) - 1 : (char16_t)0); } + + static constexpr char16_t + max() noexcept { return (((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0); } + + static constexpr char16_t + lowest() noexcept { return min(); } + + static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); + static constexpr int max_digits10 = 0; + static constexpr bool is_signed = ((char16_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char16_t + epsilon() noexcept { return 0; } + + static constexpr char16_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr char16_t + infinity() noexcept { return char16_t(); } + + static constexpr char16_t + quiet_NaN() noexcept { return char16_t(); } + + static constexpr char16_t + signaling_NaN() noexcept { return char16_t(); } + + static constexpr char16_t + denorm_min() noexcept { return char16_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char32_t + min() noexcept { return (((char32_t)(-1) < 0) ? -(((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0) - 1 : (char32_t)0); } + + static constexpr char32_t + max() noexcept { return (((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0); } + + static constexpr char32_t + lowest() noexcept { return min(); } + + static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); + static constexpr int max_digits10 = 0; + static constexpr bool is_signed = ((char32_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char32_t + epsilon() noexcept { return 0; } + + static constexpr char32_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr char32_t + infinity() noexcept { return char32_t(); } + + static constexpr char32_t + quiet_NaN() noexcept { return char32_t(); } + + static constexpr char32_t + signaling_NaN() noexcept { return char32_t(); } + + static constexpr char32_t + denorm_min() noexcept { return char32_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style = round_toward_zero; + }; + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr short + min() noexcept { return -0x7fff - 1; } + + static constexpr short + max() noexcept { return 0x7fff; } + + + static constexpr short + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr short + epsilon() noexcept { return 0; } + + static constexpr short + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr short + infinity() noexcept { return short(); } + + static constexpr short + quiet_NaN() noexcept { return short(); } + + static constexpr short + signaling_NaN() noexcept { return short(); } + + static constexpr short + denorm_min() noexcept { return short(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned short + min() noexcept { return 0; } + + static constexpr unsigned short + max() noexcept { return 0x7fff * 2U + 1; } + + + static constexpr unsigned short + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned short + epsilon() noexcept { return 0; } + + static constexpr unsigned short + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned short + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned short + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned short + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned short + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr int + min() noexcept { return -0x7fffffff - 1; } + + static constexpr int + max() noexcept { return 0x7fffffff; } + + + static constexpr int + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr int + epsilon() noexcept { return 0; } + + static constexpr int + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr int + infinity() noexcept { return static_cast(0); } + + static constexpr int + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr int + signaling_NaN() noexcept { return static_cast(0); } + + static constexpr int + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned int + min() noexcept { return 0; } + + static constexpr unsigned int + max() noexcept { return 0x7fffffff * 2U + 1; } + + + static constexpr unsigned int + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned int + epsilon() noexcept { return 0; } + + static constexpr unsigned int + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned int + infinity() noexcept { return static_cast(0); } + + static constexpr unsigned int + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned int + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned int + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long + min() noexcept { return -0x7fffffffL - 1; } + + static constexpr long + max() noexcept { return 0x7fffffffL; } + + + static constexpr long + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr long + epsilon() noexcept { return 0; } + + static constexpr long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr long + infinity() noexcept { return static_cast(0); } + + static constexpr long + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr long + signaling_NaN() noexcept { return static_cast(0); } + + static constexpr long + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned long + min() noexcept { return 0; } + + static constexpr unsigned long + max() noexcept { return 0x7fffffffL * 2UL + 1; } + + + static constexpr unsigned long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned long + epsilon() noexcept { return 0; } + + static constexpr unsigned long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned long + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned long + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long long + min() noexcept { return -0x7fffffffffffffffLL - 1; } + + static constexpr long long + max() noexcept { return 0x7fffffffffffffffLL; } + + + static constexpr long long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr long long + epsilon() noexcept { return 0; } + + static constexpr long long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr long long + infinity() noexcept { return static_cast(0); } + + static constexpr long long + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr long long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr long long + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned long long + min() noexcept { return 0; } + + static constexpr unsigned long long + max() noexcept { return 0x7fffffffffffffffLL * 2ULL + 1; } + + + static constexpr unsigned long long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned long long + epsilon() noexcept { return 0; } + + static constexpr unsigned long long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned long long + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; +# 1656 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + template<> struct numeric_limits<__int128> { static constexpr bool is_specialized = true; static constexpr __int128 min() noexcept { return (((__int128)(-1) < 0) ? -(((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0) - 1 : (__int128)0); } static constexpr __int128 max() noexcept { return (((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0); } static constexpr int digits = 128 - 1; static constexpr int digits10 = (128 - 1) * 643L / 2136; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr __int128 epsilon() noexcept { return 0; } static constexpr __int128 round_error() noexcept { return 0; } static constexpr __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr __int128 infinity() noexcept { return static_cast<__int128>(0); } static constexpr __int128 quiet_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 signaling_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 denorm_min() noexcept { return static_cast<__int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned __int128 min() noexcept { return 0; } static constexpr unsigned __int128 max() noexcept { return (((unsigned __int128)(-1) < 0) ? (((((unsigned __int128)1 << ((128 - ((unsigned __int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(unsigned __int128)0); } static constexpr unsigned __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int digits = 128; static constexpr int digits10 = 128 * 643L / 2136; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned __int128 epsilon() noexcept { return 0; } static constexpr unsigned __int128 round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned __int128 infinity() noexcept { return static_cast(0); } static constexpr unsigned __int128 quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; +# 1667 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr float + min() noexcept { return 1.17549435082228750796873653722224568e-38F; } + + static constexpr float + max() noexcept { return 3.40282346638528859811704183484516925e+38F; } + + + static constexpr float + lowest() noexcept { return -3.40282346638528859811704183484516925e+38F; } + + + static constexpr int digits = 24; + static constexpr int digits10 = 6; + + static constexpr int max_digits10 + = (2 + (24) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr float + epsilon() noexcept { return 1.19209289550781250000000000000000000e-7F; } + + static constexpr float + round_error() noexcept { return 0.5F; } + + static constexpr int min_exponent = (-125); + static constexpr int min_exponent10 = (-37); + static constexpr int max_exponent = 128; + static constexpr int max_exponent10 = 38; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr float + infinity() noexcept { return __builtin_huge_valf(); } + + static constexpr float + quiet_NaN() noexcept { return __builtin_nanf(""); } + + static constexpr float + signaling_NaN() noexcept { return __builtin_nansf(""); } + + static constexpr float + denorm_min() noexcept { return 1.40129846432481707092372958328991613e-45F; } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before + = false; + static constexpr float_round_style round_style + = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr double + min() noexcept { return double(2.22507385850720138309023271733240406e-308L); } + + static constexpr double + max() noexcept { return double(1.79769313486231570814527423731704357e+308L); } + + + static constexpr double + lowest() noexcept { return -double(1.79769313486231570814527423731704357e+308L); } + + + static constexpr int digits = 53; + static constexpr int digits10 = 15; + + static constexpr int max_digits10 + = (2 + (53) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr double + epsilon() noexcept { return double(2.22044604925031308084726333618164062e-16L); } + + static constexpr double + round_error() noexcept { return 0.5; } + + static constexpr int min_exponent = (-1021); + static constexpr int min_exponent10 = (-307); + static constexpr int max_exponent = 1024; + static constexpr int max_exponent10 = 308; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr double + infinity() noexcept { return __builtin_huge_val(); } + + static constexpr double + quiet_NaN() noexcept { return __builtin_nan(""); } + + static constexpr double + signaling_NaN() noexcept { return __builtin_nans(""); } + + static constexpr double + denorm_min() noexcept { return double(4.94065645841246544176568792868221372e-324L); } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before + = false; + static constexpr float_round_style round_style + = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long double + min() noexcept { return 3.36210314311209350626267781732175260e-4932L; } + + static constexpr long double + max() noexcept { return 1.18973149535723176502126385303097021e+4932L; } + + + static constexpr long double + lowest() noexcept { return -1.18973149535723176502126385303097021e+4932L; } + + + static constexpr int digits = 64; + static constexpr int digits10 = 18; + + static constexpr int max_digits10 + = (2 + (64) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr long double + epsilon() noexcept { return 1.08420217248550443400745280086994171e-19L; } + + static constexpr long double + round_error() noexcept { return 0.5L; } + + static constexpr int min_exponent = (-16381); + static constexpr int min_exponent10 = (-4931); + static constexpr int max_exponent = 16384; + static constexpr int max_exponent10 = 4932; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr long double + infinity() noexcept { return __builtin_huge_vall(); } + + static constexpr long double + quiet_NaN() noexcept { return __builtin_nanl(""); } + + static constexpr long double + signaling_NaN() noexcept { return __builtin_nansl(""); } + + static constexpr long double + denorm_min() noexcept { return 3.64519953188247460252840593361941982e-4951L; } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before = + false; + static constexpr float_round_style round_style = + round_to_nearest; + }; + + + + + + +} +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 1 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 3 +namespace std +{ + +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 3 + namespace __detail + { + + + + template + struct __floating_point_constant + { + static const _Tp __value; + }; + + + + template + struct __numeric_constants + { + + static _Tp __pi() throw() + { return static_cast<_Tp>(3.1415926535897932384626433832795029L); } + + static _Tp __pi_2() throw() + { return static_cast<_Tp>(1.5707963267948966192313216916397514L); } + + static _Tp __pi_3() throw() + { return static_cast<_Tp>(1.0471975511965977461542144610931676L); } + + static _Tp __pi_4() throw() + { return static_cast<_Tp>(0.7853981633974483096156608458198757L); } + + static _Tp __1_pi() throw() + { return static_cast<_Tp>(0.3183098861837906715377675267450287L); } + + static _Tp __2_sqrtpi() throw() + { return static_cast<_Tp>(1.1283791670955125738961589031215452L); } + + static _Tp __sqrt2() throw() + { return static_cast<_Tp>(1.4142135623730950488016887242096981L); } + + static _Tp __sqrt3() throw() + { return static_cast<_Tp>(1.7320508075688772935274463415058723L); } + + static _Tp __sqrtpio2() throw() + { return static_cast<_Tp>(1.2533141373155002512078826424055226L); } + + static _Tp __sqrt1_2() throw() + { return static_cast<_Tp>(0.7071067811865475244008443621048490L); } + + static _Tp __lnpi() throw() + { return static_cast<_Tp>(1.1447298858494001741434273513530587L); } + + static _Tp __gamma_e() throw() + { return static_cast<_Tp>(0.5772156649015328606065120900824024L); } + + static _Tp __euler() throw() + { return static_cast<_Tp>(2.7182818284590452353602874713526625L); } + }; +# 114 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 3 + template + inline bool __isnan(_Tp __x) + { return std::isnan(__x); } +# 133 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 3 + } + + + + + +} +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 2 3 + +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + namespace __detail + { +# 76 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __bernoulli_series(unsigned int __n) + { + + static const _Tp __num[28] = { + _Tp(1UL), -_Tp(1UL) / _Tp(2UL), + _Tp(1UL) / _Tp(6UL), _Tp(0UL), + -_Tp(1UL) / _Tp(30UL), _Tp(0UL), + _Tp(1UL) / _Tp(42UL), _Tp(0UL), + -_Tp(1UL) / _Tp(30UL), _Tp(0UL), + _Tp(5UL) / _Tp(66UL), _Tp(0UL), + -_Tp(691UL) / _Tp(2730UL), _Tp(0UL), + _Tp(7UL) / _Tp(6UL), _Tp(0UL), + -_Tp(3617UL) / _Tp(510UL), _Tp(0UL), + _Tp(43867UL) / _Tp(798UL), _Tp(0UL), + -_Tp(174611) / _Tp(330UL), _Tp(0UL), + _Tp(854513UL) / _Tp(138UL), _Tp(0UL), + -_Tp(236364091UL) / _Tp(2730UL), _Tp(0UL), + _Tp(8553103UL) / _Tp(6UL), _Tp(0UL) + }; + + if (__n == 0) + return _Tp(1); + + if (__n == 1) + return -_Tp(1) / _Tp(2); + + + if (__n % 2 == 1) + return _Tp(0); + + + if (__n < 28) + return __num[__n]; + + + _Tp __fact = _Tp(1); + if ((__n / 2) % 2 == 0) + __fact *= _Tp(-1); + for (unsigned int __k = 1; __k <= __n; ++__k) + __fact *= __k / (_Tp(2) * __numeric_constants<_Tp>::__pi()); + __fact *= _Tp(2); + + _Tp __sum = _Tp(0); + for (unsigned int __i = 1; __i < 1000; ++__i) + { + _Tp __term = std::pow(_Tp(__i), -_Tp(__n)); + if (__term < std::numeric_limits<_Tp>::epsilon()) + break; + __sum += __term; + } + + return __fact * __sum; + } +# 139 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + inline _Tp + __bernoulli(int __n) + { return __bernoulli_series<_Tp>(__n); } +# 153 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_gamma_bernoulli(_Tp __x) + { + _Tp __lg = (__x - _Tp(0.5L)) * std::log(__x) - __x + + _Tp(0.5L) * std::log(_Tp(2) + * __numeric_constants<_Tp>::__pi()); + + const _Tp __xx = __x * __x; + _Tp __help = _Tp(1) / __x; + for ( unsigned int __i = 1; __i < 20; ++__i ) + { + const _Tp __2i = _Tp(2 * __i); + __help /= __2i * (__2i - _Tp(1)) * __xx; + __lg += __bernoulli<_Tp>(2 * __i) * __help; + } + + return __lg; + } +# 181 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_gamma_lanczos(_Tp __x) + { + const _Tp __xm1 = __x - _Tp(1); + + static const _Tp __lanczos_cheb_7[9] = { + _Tp( 0.99999999999980993227684700473478L), + _Tp( 676.520368121885098567009190444019L), + _Tp(-1259.13921672240287047156078755283L), + _Tp( 771.3234287776530788486528258894L), + _Tp(-176.61502916214059906584551354L), + _Tp( 12.507343278686904814458936853L), + _Tp(-0.13857109526572011689554707L), + _Tp( 9.984369578019570859563e-6L), + _Tp( 1.50563273514931155834e-7L) + }; + + static const _Tp __LOGROOT2PI + = _Tp(0.9189385332046727417803297364056176L); + + _Tp __sum = __lanczos_cheb_7[0]; + for(unsigned int __k = 1; __k < 9; ++__k) + __sum += __lanczos_cheb_7[__k] / (__xm1 + __k); + + const _Tp __term1 = (__xm1 + _Tp(0.5L)) + * std::log((__xm1 + _Tp(7.5L)) + / __numeric_constants<_Tp>::__euler()); + const _Tp __term2 = __LOGROOT2PI + std::log(__sum); + const _Tp __result = __term1 + (__term2 - _Tp(7)); + + return __result; + } +# 225 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_gamma(_Tp __x) + { + if (__x > _Tp(0.5L)) + return __log_gamma_lanczos(__x); + else + { + const _Tp __sin_fact + = std::abs(std::sin(__numeric_constants<_Tp>::__pi() * __x)); + if (__sin_fact == _Tp(0)) + std::__throw_domain_error(("Argument is nonpositive integer " "in __log_gamma") + ); + return __numeric_constants<_Tp>::__lnpi() + - std::log(__sin_fact) + - __log_gamma_lanczos(_Tp(1) - __x); + } + } +# 252 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_gamma_sign(_Tp __x) + { + if (__x > _Tp(0)) + return _Tp(1); + else + { + const _Tp __sin_fact + = std::sin(__numeric_constants<_Tp>::__pi() * __x); + if (__sin_fact > _Tp(0)) + return (1); + else if (__sin_fact < _Tp(0)) + return -_Tp(1); + else + return _Tp(0); + } + } +# 283 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_bincoef(unsigned int __n, unsigned int __k) + { + + static const _Tp __max_bincoeff + = std::numeric_limits<_Tp>::max_exponent10 + * std::log(_Tp(10)) - _Tp(1); + + _Tp __coeff = ::std::lgamma(_Tp(1 + __n)) + - ::std::lgamma(_Tp(1 + __k)) + - ::std::lgamma(_Tp(1 + __n - __k)); + + + + + + } +# 314 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __bincoef(unsigned int __n, unsigned int __k) + { + + static const _Tp __max_bincoeff + = std::numeric_limits<_Tp>::max_exponent10 + * std::log(_Tp(10)) - _Tp(1); + + const _Tp __log_coeff = __log_bincoef<_Tp>(__n, __k); + if (__log_coeff > __max_bincoeff) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return std::exp(__log_coeff); + } +# 337 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + inline _Tp + __gamma(_Tp __x) + { return std::exp(__log_gamma(__x)); } +# 356 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __psi_series(_Tp __x) + { + _Tp __sum = -__numeric_constants<_Tp>::__gamma_e() - _Tp(1) / __x; + const unsigned int __max_iter = 100000; + for (unsigned int __k = 1; __k < __max_iter; ++__k) + { + const _Tp __term = __x / (__k * (__k + __x)); + __sum += __term; + if (std::abs(__term / __sum) < std::numeric_limits<_Tp>::epsilon()) + break; + } + return __sum; + } +# 386 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __psi_asymp(_Tp __x) + { + _Tp __sum = std::log(__x) - _Tp(0.5L) / __x; + const _Tp __xx = __x * __x; + _Tp __xp = __xx; + const unsigned int __max_iter = 100; + for (unsigned int __k = 1; __k < __max_iter; ++__k) + { + const _Tp __term = __bernoulli<_Tp>(2 * __k) / (2 * __k * __xp); + __sum -= __term; + if (std::abs(__term / __sum) < std::numeric_limits<_Tp>::epsilon()) + break; + __xp *= __xx; + } + return __sum; + } +# 417 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __psi(_Tp __x) + { + const int __n = static_cast(__x + 0.5L); + const _Tp __eps = _Tp(4) * std::numeric_limits<_Tp>::epsilon(); + if (__n <= 0 && std::abs(__x - _Tp(__n)) < __eps) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x < _Tp(0)) + { + const _Tp __pi = __numeric_constants<_Tp>::__pi(); + return __psi(_Tp(1) - __x) + - __pi * std::cos(__pi * __x) / std::sin(__pi * __x); + } + else if (__x > _Tp(100)) + return __psi_asymp(__x); + else + return __psi_series(__x); + } +# 446 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __psi(unsigned int __n, _Tp __x) + { + if (__x <= _Tp(0)) + std::__throw_domain_error(("Argument out of range " "in __psi") + ); + else if (__n == 0) + return __psi(__x); + else + { + const _Tp __hzeta = __hurwitz_zeta(_Tp(__n + 1), __x); + + const _Tp __ln_nfact = ::std::lgamma(_Tp(__n + 1)); + + + + _Tp __result = std::exp(__ln_nfact) * __hzeta; + if (__n % 2 == 1) + __result = -__result; + return __result; + } + } + } + + + + + + +} +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 1 3 +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 +namespace std +{ + +# 71 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + namespace __detail + { +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + void + __gamma_temme(_Tp __mu, + _Tp & __gam1, _Tp & __gam2, _Tp & __gampl, _Tp & __gammi) + { + + __gampl = _Tp(1) / ::std::tgamma(_Tp(1) + __mu); + __gammi = _Tp(1) / ::std::tgamma(_Tp(1) - __mu); + + + + + + if (std::abs(__mu) < std::numeric_limits<_Tp>::epsilon()) + __gam1 = -_Tp(__numeric_constants<_Tp>::__gamma_e()); + else + __gam1 = (__gammi - __gampl) / (_Tp(2) * __mu); + + __gam2 = (__gammi + __gampl) / (_Tp(2)); + + return; + } +# 136 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + void + __bessel_jn(_Tp __nu, _Tp __x, + _Tp & __Jnu, _Tp & __Nnu, _Tp & __Jpnu, _Tp & __Npnu) + { + if (__x == _Tp(0)) + { + if (__nu == _Tp(0)) + { + __Jnu = _Tp(1); + __Jpnu = _Tp(0); + } + else if (__nu == _Tp(1)) + { + __Jnu = _Tp(0); + __Jpnu = _Tp(0.5L); + } + else + { + __Jnu = _Tp(0); + __Jpnu = _Tp(0); + } + __Nnu = -std::numeric_limits<_Tp>::infinity(); + __Npnu = std::numeric_limits<_Tp>::infinity(); + return; + } + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + + + + const _Tp __fp_min = std::sqrt(std::numeric_limits<_Tp>::min()); + const int __max_iter = 15000; + const _Tp __x_min = _Tp(2); + + const int __nl = (__x < __x_min + ? static_cast(__nu + _Tp(0.5L)) + : std::max(0, static_cast(__nu - __x + _Tp(1.5L)))); + + const _Tp __mu = __nu - __nl; + const _Tp __mu2 = __mu * __mu; + const _Tp __xi = _Tp(1) / __x; + const _Tp __xi2 = _Tp(2) * __xi; + _Tp __w = __xi2 / __numeric_constants<_Tp>::__pi(); + int __isign = 1; + _Tp __h = __nu * __xi; + if (__h < __fp_min) + __h = __fp_min; + _Tp __b = __xi2 * __nu; + _Tp __d = _Tp(0); + _Tp __c = __h; + int __i; + for (__i = 1; __i <= __max_iter; ++__i) + { + __b += __xi2; + __d = __b - __d; + if (std::abs(__d) < __fp_min) + __d = __fp_min; + __c = __b - _Tp(1) / __c; + if (std::abs(__c) < __fp_min) + __c = __fp_min; + __d = _Tp(1) / __d; + const _Tp __del = __c * __d; + __h *= __del; + if (__d < _Tp(0)) + __isign = -__isign; + if (std::abs(__del - _Tp(1)) < __eps) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Argument x too large in __bessel_jn; " "try asymptotic expansion.") + ); + _Tp __Jnul = __isign * __fp_min; + _Tp __Jpnul = __h * __Jnul; + _Tp __Jnul1 = __Jnul; + _Tp __Jpnu1 = __Jpnul; + _Tp __fact = __nu * __xi; + for ( int __l = __nl; __l >= 1; --__l ) + { + const _Tp __Jnutemp = __fact * __Jnul + __Jpnul; + __fact -= __xi; + __Jpnul = __fact * __Jnutemp - __Jnul; + __Jnul = __Jnutemp; + } + if (__Jnul == _Tp(0)) + __Jnul = __eps; + _Tp __f= __Jpnul / __Jnul; + _Tp __Nmu, __Nnu1, __Npmu, __Jmu; + if (__x < __x_min) + { + const _Tp __x2 = __x / _Tp(2); + const _Tp __pimu = __numeric_constants<_Tp>::__pi() * __mu; + _Tp __fact = (std::abs(__pimu) < __eps + ? _Tp(1) : __pimu / std::sin(__pimu)); + _Tp __d = -std::log(__x2); + _Tp __e = __mu * __d; + _Tp __fact2 = (std::abs(__e) < __eps + ? _Tp(1) : std::sinh(__e) / __e); + _Tp __gam1, __gam2, __gampl, __gammi; + __gamma_temme(__mu, __gam1, __gam2, __gampl, __gammi); + _Tp __ff = (_Tp(2) / __numeric_constants<_Tp>::__pi()) + * __fact * (__gam1 * std::cosh(__e) + __gam2 * __fact2 * __d); + __e = std::exp(__e); + _Tp __p = __e / (__numeric_constants<_Tp>::__pi() * __gampl); + _Tp __q = _Tp(1) / (__e * __numeric_constants<_Tp>::__pi() * __gammi); + const _Tp __pimu2 = __pimu / _Tp(2); + _Tp __fact3 = (std::abs(__pimu2) < __eps + ? _Tp(1) : std::sin(__pimu2) / __pimu2 ); + _Tp __r = __numeric_constants<_Tp>::__pi() * __pimu2 * __fact3 * __fact3; + _Tp __c = _Tp(1); + __d = -__x2 * __x2; + _Tp __sum = __ff + __r * __q; + _Tp __sum1 = __p; + for (__i = 1; __i <= __max_iter; ++__i) + { + __ff = (__i * __ff + __p + __q) / (__i * __i - __mu2); + __c *= __d / _Tp(__i); + __p /= _Tp(__i) - __mu; + __q /= _Tp(__i) + __mu; + const _Tp __del = __c * (__ff + __r * __q); + __sum += __del; + const _Tp __del1 = __c * __p - __i * __del; + __sum1 += __del1; + if ( std::abs(__del) < __eps * (_Tp(1) + std::abs(__sum)) ) + break; + } + if ( __i > __max_iter ) + std::__throw_runtime_error(("Bessel y series failed to converge " "in __bessel_jn.") + ); + __Nmu = -__sum; + __Nnu1 = -__sum1 * __xi2; + __Npmu = __mu * __xi * __Nmu - __Nnu1; + __Jmu = __w / (__Npmu - __f * __Nmu); + } + else + { + _Tp __a = _Tp(0.25L) - __mu2; + _Tp __q = _Tp(1); + _Tp __p = -__xi / _Tp(2); + _Tp __br = _Tp(2) * __x; + _Tp __bi = _Tp(2); + _Tp __fact = __a * __xi / (__p * __p + __q * __q); + _Tp __cr = __br + __q * __fact; + _Tp __ci = __bi + __p * __fact; + _Tp __den = __br * __br + __bi * __bi; + _Tp __dr = __br / __den; + _Tp __di = -__bi / __den; + _Tp __dlr = __cr * __dr - __ci * __di; + _Tp __dli = __cr * __di + __ci * __dr; + _Tp __temp = __p * __dlr - __q * __dli; + __q = __p * __dli + __q * __dlr; + __p = __temp; + int __i; + for (__i = 2; __i <= __max_iter; ++__i) + { + __a += _Tp(2 * (__i - 1)); + __bi += _Tp(2); + __dr = __a * __dr + __br; + __di = __a * __di + __bi; + if (std::abs(__dr) + std::abs(__di) < __fp_min) + __dr = __fp_min; + __fact = __a / (__cr * __cr + __ci * __ci); + __cr = __br + __cr * __fact; + __ci = __bi - __ci * __fact; + if (std::abs(__cr) + std::abs(__ci) < __fp_min) + __cr = __fp_min; + __den = __dr * __dr + __di * __di; + __dr /= __den; + __di /= -__den; + __dlr = __cr * __dr - __ci * __di; + __dli = __cr * __di + __ci * __dr; + __temp = __p * __dlr - __q * __dli; + __q = __p * __dli + __q * __dlr; + __p = __temp; + if (std::abs(__dlr - _Tp(1)) + std::abs(__dli) < __eps) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Lentz's method failed " "in __bessel_jn.") + ); + const _Tp __gam = (__p - __f) / __q; + __Jmu = std::sqrt(__w / ((__p - __f) * __gam + __q)); + + __Jmu = ::std::copysign(__Jmu, __Jnul); + + + + + __Nmu = __gam * __Jmu; + __Npmu = (__p + __q / __gam) * __Nmu; + __Nnu1 = __mu * __xi * __Nmu - __Npmu; + } + __fact = __Jmu / __Jnul; + __Jnu = __fact * __Jnul1; + __Jpnu = __fact * __Jpnu1; + for (__i = 1; __i <= __nl; ++__i) + { + const _Tp __Nnutemp = (__mu + __i) * __xi2 * __Nnu1 - __Nmu; + __Nmu = __Nnu1; + __Nnu1 = __Nnutemp; + } + __Nnu = __Nmu; + __Npnu = __nu * __xi * __Nmu - __Nnu1; + + return; + } +# 361 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + void + __cyl_bessel_jn_asymp(_Tp __nu, _Tp __x, _Tp & __Jnu, _Tp & __Nnu) + { + const _Tp __mu = _Tp(4) * __nu * __nu; + const _Tp __8x = _Tp(8) * __x; + + _Tp __P = _Tp(0); + _Tp __Q = _Tp(0); + + _Tp __k = _Tp(0); + _Tp __term = _Tp(1); + + int __epsP = 0; + int __epsQ = 0; + + _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + do + { + __term *= (__k == 0 + ? _Tp(1) + : -(__mu - (2 * __k - 1) * (2 * __k - 1)) / (__k * __8x)); + + __epsP = std::abs(__term) < __eps * std::abs(__P); + __P += __term; + + __k++; + + __term *= (__mu - (2 * __k - 1) * (2 * __k - 1)) / (__k * __8x); + __epsQ = std::abs(__term) < __eps * std::abs(__Q); + __Q += __term; + + if (__epsP && __epsQ && __k > (__nu / 2.)) + break; + + __k++; + } + while (__k < 1000); + + const _Tp __chi = __x - (__nu + _Tp(0.5L)) + * __numeric_constants<_Tp>::__pi_2(); + + const _Tp __c = std::cos(__chi); + const _Tp __s = std::sin(__chi); + + const _Tp __coef = std::sqrt(_Tp(2) + / (__numeric_constants<_Tp>::__pi() * __x)); + + __Jnu = __coef * (__c * __P - __s * __Q); + __Nnu = __coef * (__s * __P + __c * __Q); + + return; + } +# 444 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __cyl_bessel_ij_series(_Tp __nu, _Tp __x, _Tp __sgn, + unsigned int __max_iter) + { + if (__x == _Tp(0)) + return __nu == _Tp(0) ? _Tp(1) : _Tp(0); + + const _Tp __x2 = __x / _Tp(2); + _Tp __fact = __nu * std::log(__x2); + + __fact -= ::std::lgamma(__nu + _Tp(1)); + + + + __fact = std::exp(__fact); + const _Tp __xx4 = __sgn * __x2 * __x2; + _Tp __Jn = _Tp(1); + _Tp __term = _Tp(1); + + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + __term *= __xx4 / (_Tp(__i) * (__nu + _Tp(__i))); + __Jn += __term; + if (std::abs(__term / __Jn) < std::numeric_limits<_Tp>::epsilon()) + break; + } + + return __fact * __Jn; + } +# 490 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __cyl_bessel_j(_Tp __nu, _Tp __x) + { + if (__nu < _Tp(0) || __x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __cyl_bessel_j.") + ); + else if (__isnan(__nu) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x * __x < _Tp(10) * (__nu + _Tp(1))) + return __cyl_bessel_ij_series(__nu, __x, -_Tp(1), 200); + else if (__x > _Tp(1000)) + { + _Tp __J_nu, __N_nu; + __cyl_bessel_jn_asymp(__nu, __x, __J_nu, __N_nu); + return __J_nu; + } + else + { + _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; + __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); + return __J_nu; + } + } +# 532 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __cyl_neumann_n(_Tp __nu, _Tp __x) + { + if (__nu < _Tp(0) || __x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __cyl_neumann_n.") + ); + else if (__isnan(__nu) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x > _Tp(1000)) + { + _Tp __J_nu, __N_nu; + __cyl_bessel_jn_asymp(__nu, __x, __J_nu, __N_nu); + return __N_nu; + } + else + { + _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; + __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); + return __N_nu; + } + } +# 569 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + void + __sph_bessel_jn(unsigned int __n, _Tp __x, + _Tp & __j_n, _Tp & __n_n, _Tp & __jp_n, _Tp & __np_n) + { + const _Tp __nu = _Tp(__n) + _Tp(0.5L); + + _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; + __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); + + const _Tp __factor = __numeric_constants<_Tp>::__sqrtpio2() + / std::sqrt(__x); + + __j_n = __factor * __J_nu; + __n_n = __factor * __N_nu; + __jp_n = __factor * __Jp_nu - __j_n / (_Tp(2) * __x); + __np_n = __factor * __Np_nu - __n_n / (_Tp(2) * __x); + + return; + } +# 604 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __sph_bessel(unsigned int __n, _Tp __x) + { + if (__x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __sph_bessel.") + ); + else if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x == _Tp(0)) + { + if (__n == 0) + return _Tp(1); + else + return _Tp(0); + } + else + { + _Tp __j_n, __n_n, __jp_n, __np_n; + __sph_bessel_jn(__n, __x, __j_n, __n_n, __jp_n, __np_n); + return __j_n; + } + } +# 642 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __sph_neumann(unsigned int __n, _Tp __x) + { + if (__x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __sph_neumann.") + ); + else if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x == _Tp(0)) + return -std::numeric_limits<_Tp>::infinity(); + else + { + _Tp __j_n, __n_n, __jp_n, __np_n; + __sph_bessel_jn(__n, __x, __j_n, __n_n, __jp_n, __np_n); + return __n_n; + } + } + } + + + + + + +} +# 51 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 1 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + namespace __detail + { +# 79 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + template + _Tp + __beta_gamma(_Tp __x, _Tp __y) + { + + _Tp __bet; + + if (__x > __y) + { + __bet = ::std::tgamma(__x) + / ::std::tgamma(__x + __y); + __bet *= ::std::tgamma(__y); + } + else + { + __bet = ::std::tgamma(__y) + / ::std::tgamma(__x + __y); + __bet *= ::std::tgamma(__x); + } +# 111 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + return __bet; + } +# 127 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + template + _Tp + __beta_lgamma(_Tp __x, _Tp __y) + { + + _Tp __bet = ::std::lgamma(__x) + + ::std::lgamma(__y) + - ::std::lgamma(__x + __y); + + + + + + __bet = std::exp(__bet); + return __bet; + } +# 158 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + template + _Tp + __beta_product(_Tp __x, _Tp __y) + { + + _Tp __bet = (__x + __y) / (__x * __y); + + unsigned int __max_iter = 1000000; + for (unsigned int __k = 1; __k < __max_iter; ++__k) + { + _Tp __term = (_Tp(1) + (__x + __y) / __k) + / ((_Tp(1) + __x / __k) * (_Tp(1) + __y / __k)); + __bet *= __term; + } + + return __bet; + } +# 189 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + template + inline _Tp + __beta(_Tp __x, _Tp __y) + { + if (__isnan(__x) || __isnan(__y)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return __beta_lgamma(__x, __y); + } + } + + + + + + +} +# 52 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 1 3 +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 +namespace std +{ + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + namespace __detail + { +# 76 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_rf(_Tp __x, _Tp __y, _Tp __z) + { + const _Tp __min = std::numeric_limits<_Tp>::min(); + const _Tp __lolim = _Tp(5) * __min; + + if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0)) + std::__throw_domain_error(("Argument less than zero " "in __ellint_rf.") + ); + else if (__x + __y < __lolim || __x + __z < __lolim + || __y + __z < __lolim) + std::__throw_domain_error(("Argument too small in __ellint_rf")); + else + { + const _Tp __c0 = _Tp(1) / _Tp(4); + const _Tp __c1 = _Tp(1) / _Tp(24); + const _Tp __c2 = _Tp(1) / _Tp(10); + const _Tp __c3 = _Tp(3) / _Tp(44); + const _Tp __c4 = _Tp(1) / _Tp(14); + + _Tp __xn = __x; + _Tp __yn = __y; + _Tp __zn = __z; + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __errtol = std::pow(__eps, _Tp(1) / _Tp(6)); + _Tp __mu; + _Tp __xndev, __yndev, __zndev; + + const unsigned int __max_iter = 100; + for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) + { + __mu = (__xn + __yn + __zn) / _Tp(3); + __xndev = 2 - (__mu + __xn) / __mu; + __yndev = 2 - (__mu + __yn) / __mu; + __zndev = 2 - (__mu + __zn) / __mu; + _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); + __epsilon = std::max(__epsilon, std::abs(__zndev)); + if (__epsilon < __errtol) + break; + const _Tp __xnroot = std::sqrt(__xn); + const _Tp __ynroot = std::sqrt(__yn); + const _Tp __znroot = std::sqrt(__zn); + const _Tp __lambda = __xnroot * (__ynroot + __znroot) + + __ynroot * __znroot; + __xn = __c0 * (__xn + __lambda); + __yn = __c0 * (__yn + __lambda); + __zn = __c0 * (__zn + __lambda); + } + + const _Tp __e2 = __xndev * __yndev - __zndev * __zndev; + const _Tp __e3 = __xndev * __yndev * __zndev; + const _Tp __s = _Tp(1) + (__c1 * __e2 - __c2 - __c3 * __e3) * __e2 + + __c4 * __e3; + + return __s / std::sqrt(__mu); + } + } +# 153 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_1_series(_Tp __k) + { + + const _Tp __kk = __k * __k; + + _Tp __term = __kk / _Tp(4); + _Tp __sum = _Tp(1) + __term; + + const unsigned int __max_iter = 1000; + for (unsigned int __i = 2; __i < __max_iter; ++__i) + { + __term *= (2 * __i - 1) * __kk / (2 * __i); + if (__term < std::numeric_limits<_Tp>::epsilon()) + break; + __sum += __term; + } + + return __numeric_constants<_Tp>::__pi_2() * __sum; + } +# 191 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_1(_Tp __k) + { + + if (__isnan(__k)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) >= _Tp(1)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return __ellint_rf(_Tp(0), _Tp(1) - __k * __k, _Tp(1)); + } +# 219 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_1(_Tp __k, _Tp __phi) + { + + if (__isnan(__k) || __isnan(__phi)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __ellint_1.")); + else + { + + const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() + + _Tp(0.5L)); + const _Tp __phi_red = __phi + - __n * __numeric_constants<_Tp>::__pi(); + + const _Tp __s = std::sin(__phi_red); + const _Tp __c = std::cos(__phi_red); + + const _Tp __F = __s + * __ellint_rf(__c * __c, + _Tp(1) - __k * __k * __s * __s, _Tp(1)); + + if (__n == 0) + return __F; + else + return __F + _Tp(2) * __n * __comp_ellint_1(__k); + } + } +# 266 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_2_series(_Tp __k) + { + + const _Tp __kk = __k * __k; + + _Tp __term = __kk; + _Tp __sum = __term; + + const unsigned int __max_iter = 1000; + for (unsigned int __i = 2; __i < __max_iter; ++__i) + { + const _Tp __i2m = 2 * __i - 1; + const _Tp __i2 = 2 * __i; + __term *= __i2m * __i2m * __kk / (__i2 * __i2); + if (__term < std::numeric_limits<_Tp>::epsilon()) + break; + __sum += __term / __i2m; + } + + return __numeric_constants<_Tp>::__pi_2() * (_Tp(1) - __sum); + } +# 314 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_rd(_Tp __x, _Tp __y, _Tp __z) + { + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __errtol = std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6)); + const _Tp __max = std::numeric_limits<_Tp>::max(); + const _Tp __lolim = _Tp(2) / std::pow(__max, _Tp(2) / _Tp(3)); + + if (__x < _Tp(0) || __y < _Tp(0)) + std::__throw_domain_error(("Argument less than zero " "in __ellint_rd.") + ); + else if (__x + __y < __lolim || __z < __lolim) + std::__throw_domain_error(("Argument too small " "in __ellint_rd.") + ); + else + { + const _Tp __c0 = _Tp(1) / _Tp(4); + const _Tp __c1 = _Tp(3) / _Tp(14); + const _Tp __c2 = _Tp(1) / _Tp(6); + const _Tp __c3 = _Tp(9) / _Tp(22); + const _Tp __c4 = _Tp(3) / _Tp(26); + + _Tp __xn = __x; + _Tp __yn = __y; + _Tp __zn = __z; + _Tp __sigma = _Tp(0); + _Tp __power4 = _Tp(1); + + _Tp __mu; + _Tp __xndev, __yndev, __zndev; + + const unsigned int __max_iter = 100; + for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) + { + __mu = (__xn + __yn + _Tp(3) * __zn) / _Tp(5); + __xndev = (__mu - __xn) / __mu; + __yndev = (__mu - __yn) / __mu; + __zndev = (__mu - __zn) / __mu; + _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); + __epsilon = std::max(__epsilon, std::abs(__zndev)); + if (__epsilon < __errtol) + break; + _Tp __xnroot = std::sqrt(__xn); + _Tp __ynroot = std::sqrt(__yn); + _Tp __znroot = std::sqrt(__zn); + _Tp __lambda = __xnroot * (__ynroot + __znroot) + + __ynroot * __znroot; + __sigma += __power4 / (__znroot * (__zn + __lambda)); + __power4 *= __c0; + __xn = __c0 * (__xn + __lambda); + __yn = __c0 * (__yn + __lambda); + __zn = __c0 * (__zn + __lambda); + } + + _Tp __ea = __xndev * __yndev; + _Tp __eb = __zndev * __zndev; + _Tp __ec = __ea - __eb; + _Tp __ed = __ea - _Tp(6) * __eb; + _Tp __ef = __ed + __ec + __ec; + _Tp __s1 = __ed * (-__c1 + __c3 * __ed + / _Tp(3) - _Tp(3) * __c4 * __zndev * __ef + / _Tp(2)); + _Tp __s2 = __zndev + * (__c2 * __ef + + __zndev * (-__c3 * __ec - __zndev * __c4 - __ea)); + + return _Tp(3) * __sigma + __power4 * (_Tp(1) + __s1 + __s2) + / (__mu * std::sqrt(__mu)); + } + } +# 399 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_2(_Tp __k) + { + + if (__isnan(__k)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) == 1) + return _Tp(1); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __comp_ellint_2.")); + else + { + const _Tp __kk = __k * __k; + + return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1)) + - __kk * __ellint_rd(_Tp(0), _Tp(1) - __kk, _Tp(1)) / _Tp(3); + } + } +# 433 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_2(_Tp __k, _Tp __phi) + { + + if (__isnan(__k) || __isnan(__phi)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __ellint_2.")); + else + { + + const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() + + _Tp(0.5L)); + const _Tp __phi_red = __phi + - __n * __numeric_constants<_Tp>::__pi(); + + const _Tp __kk = __k * __k; + const _Tp __s = std::sin(__phi_red); + const _Tp __ss = __s * __s; + const _Tp __sss = __ss * __s; + const _Tp __c = std::cos(__phi_red); + const _Tp __cc = __c * __c; + + const _Tp __E = __s + * __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1)) + - __kk * __sss + * __ellint_rd(__cc, _Tp(1) - __kk * __ss, _Tp(1)) + / _Tp(3); + + if (__n == 0) + return __E; + else + return __E + _Tp(2) * __n * __comp_ellint_2(__k); + } + } +# 492 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_rc(_Tp __x, _Tp __y) + { + const _Tp __min = std::numeric_limits<_Tp>::min(); + const _Tp __lolim = _Tp(5) * __min; + + if (__x < _Tp(0) || __y < _Tp(0) || __x + __y < __lolim) + std::__throw_domain_error(("Argument less than zero " "in __ellint_rc.") + ); + else + { + const _Tp __c0 = _Tp(1) / _Tp(4); + const _Tp __c1 = _Tp(1) / _Tp(7); + const _Tp __c2 = _Tp(9) / _Tp(22); + const _Tp __c3 = _Tp(3) / _Tp(10); + const _Tp __c4 = _Tp(3) / _Tp(8); + + _Tp __xn = __x; + _Tp __yn = __y; + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __errtol = std::pow(__eps / _Tp(30), _Tp(1) / _Tp(6)); + _Tp __mu; + _Tp __sn; + + const unsigned int __max_iter = 100; + for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) + { + __mu = (__xn + _Tp(2) * __yn) / _Tp(3); + __sn = (__yn + __mu) / __mu - _Tp(2); + if (std::abs(__sn) < __errtol) + break; + const _Tp __lambda = _Tp(2) * std::sqrt(__xn) * std::sqrt(__yn) + + __yn; + __xn = __c0 * (__xn + __lambda); + __yn = __c0 * (__yn + __lambda); + } + + _Tp __s = __sn * __sn + * (__c3 + __sn*(__c1 + __sn * (__c4 + __sn * __c2))); + + return (_Tp(1) + __s) / std::sqrt(__mu); + } + } +# 561 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_rj(_Tp __x, _Tp __y, _Tp __z, _Tp __p) + { + const _Tp __min = std::numeric_limits<_Tp>::min(); + const _Tp __lolim = std::pow(_Tp(5) * __min, _Tp(1)/_Tp(3)); + + if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0)) + std::__throw_domain_error(("Argument less than zero " "in __ellint_rj.") + ); + else if (__x + __y < __lolim || __x + __z < __lolim + || __y + __z < __lolim || __p < __lolim) + std::__throw_domain_error(("Argument too small " "in __ellint_rj") + ); + else + { + const _Tp __c0 = _Tp(1) / _Tp(4); + const _Tp __c1 = _Tp(3) / _Tp(14); + const _Tp __c2 = _Tp(1) / _Tp(3); + const _Tp __c3 = _Tp(3) / _Tp(22); + const _Tp __c4 = _Tp(3) / _Tp(26); + + _Tp __xn = __x; + _Tp __yn = __y; + _Tp __zn = __z; + _Tp __pn = __p; + _Tp __sigma = _Tp(0); + _Tp __power4 = _Tp(1); + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __errtol = std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6)); + + _Tp __mu; + _Tp __xndev, __yndev, __zndev, __pndev; + + const unsigned int __max_iter = 100; + for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) + { + __mu = (__xn + __yn + __zn + _Tp(2) * __pn) / _Tp(5); + __xndev = (__mu - __xn) / __mu; + __yndev = (__mu - __yn) / __mu; + __zndev = (__mu - __zn) / __mu; + __pndev = (__mu - __pn) / __mu; + _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); + __epsilon = std::max(__epsilon, std::abs(__zndev)); + __epsilon = std::max(__epsilon, std::abs(__pndev)); + if (__epsilon < __errtol) + break; + const _Tp __xnroot = std::sqrt(__xn); + const _Tp __ynroot = std::sqrt(__yn); + const _Tp __znroot = std::sqrt(__zn); + const _Tp __lambda = __xnroot * (__ynroot + __znroot) + + __ynroot * __znroot; + const _Tp __alpha1 = __pn * (__xnroot + __ynroot + __znroot) + + __xnroot * __ynroot * __znroot; + const _Tp __alpha2 = __alpha1 * __alpha1; + const _Tp __beta = __pn * (__pn + __lambda) + * (__pn + __lambda); + __sigma += __power4 * __ellint_rc(__alpha2, __beta); + __power4 *= __c0; + __xn = __c0 * (__xn + __lambda); + __yn = __c0 * (__yn + __lambda); + __zn = __c0 * (__zn + __lambda); + __pn = __c0 * (__pn + __lambda); + } + + _Tp __ea = __xndev * (__yndev + __zndev) + __yndev * __zndev; + _Tp __eb = __xndev * __yndev * __zndev; + _Tp __ec = __pndev * __pndev; + _Tp __e2 = __ea - _Tp(3) * __ec; + _Tp __e3 = __eb + _Tp(2) * __pndev * (__ea - __ec); + _Tp __s1 = _Tp(1) + __e2 * (-__c1 + _Tp(3) * __c3 * __e2 / _Tp(4) + - _Tp(3) * __c4 * __e3 / _Tp(2)); + _Tp __s2 = __eb * (__c2 / _Tp(2) + + __pndev * (-__c3 - __c3 + __pndev * __c4)); + _Tp __s3 = __pndev * __ea * (__c2 - __pndev * __c3) + - __c2 * __pndev * __ec; + + return _Tp(3) * __sigma + __power4 * (__s1 + __s2 + __s3) + / (__mu * std::sqrt(__mu)); + } + } +# 661 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_3(_Tp __k, _Tp __nu) + { + + if (__isnan(__k) || __isnan(__nu)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__nu == _Tp(1)) + return std::numeric_limits<_Tp>::infinity(); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __comp_ellint_3.")); + else + { + const _Tp __kk = __k * __k; + + return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1)) + + __nu + * __ellint_rj(_Tp(0), _Tp(1) - __kk, _Tp(1), _Tp(1) - __nu) + / _Tp(3); + } + } +# 701 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_3(_Tp __k, _Tp __nu, _Tp __phi) + { + + if (__isnan(__k) || __isnan(__nu) || __isnan(__phi)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __ellint_3.")); + else + { + + const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() + + _Tp(0.5L)); + const _Tp __phi_red = __phi + - __n * __numeric_constants<_Tp>::__pi(); + + const _Tp __kk = __k * __k; + const _Tp __s = std::sin(__phi_red); + const _Tp __ss = __s * __s; + const _Tp __sss = __ss * __s; + const _Tp __c = std::cos(__phi_red); + const _Tp __cc = __c * __c; + + const _Tp __Pi = __s + * __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1)) + + __nu * __sss + * __ellint_rj(__cc, _Tp(1) - __kk * __ss, _Tp(1), + _Tp(1) - __nu * __ss) / _Tp(3); + + if (__n == 0) + return __Pi; + else + return __Pi + _Tp(2) * __n * __comp_ellint_3(__k, __nu); + } + } + } + + + + + +} +# 53 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 1 3 +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 +namespace std +{ + +# 64 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + namespace __detail + { + template _Tp __expint_E1(_Tp); +# 81 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_E1_series(_Tp __x) + { + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + _Tp __term = _Tp(1); + _Tp __esum = _Tp(0); + _Tp __osum = _Tp(0); + const unsigned int __max_iter = 1000; + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + __term *= - __x / __i; + if (std::abs(__term) < __eps) + break; + if (__term >= _Tp(0)) + __esum += __term / __i; + else + __osum += __term / __i; + } + + return - __esum - __osum + - __numeric_constants<_Tp>::__gamma_e() - std::log(__x); + } +# 118 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_E1_asymp(_Tp __x) + { + _Tp __term = _Tp(1); + _Tp __esum = _Tp(1); + _Tp __osum = _Tp(0); + const unsigned int __max_iter = 1000; + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + _Tp __prev = __term; + __term *= - __i / __x; + if (std::abs(__term) > std::abs(__prev)) + break; + if (__term >= _Tp(0)) + __esum += __term; + else + __osum += __term; + } + + return std::exp(- __x) * (__esum + __osum) / __x; + } +# 155 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_En_series(unsigned int __n, _Tp __x) + { + const unsigned int __max_iter = 1000; + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const int __nm1 = __n - 1; + _Tp __ans = (__nm1 != 0 + ? _Tp(1) / __nm1 : -std::log(__x) + - __numeric_constants<_Tp>::__gamma_e()); + _Tp __fact = _Tp(1); + for (int __i = 1; __i <= __max_iter; ++__i) + { + __fact *= -__x / _Tp(__i); + _Tp __del; + if ( __i != __nm1 ) + __del = -__fact / _Tp(__i - __nm1); + else + { + _Tp __psi = -__numeric_constants<_Tp>::gamma_e(); + for (int __ii = 1; __ii <= __nm1; ++__ii) + __psi += _Tp(1) / _Tp(__ii); + __del = __fact * (__psi - std::log(__x)); + } + __ans += __del; + if (std::abs(__del) < __eps * std::abs(__ans)) + return __ans; + } + std::__throw_runtime_error(("Series summation failed " "in __expint_En_series.") + ); + } +# 201 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_En_cont_frac(unsigned int __n, _Tp __x) + { + const unsigned int __max_iter = 1000; + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __fp_min = std::numeric_limits<_Tp>::min(); + const int __nm1 = __n - 1; + _Tp __b = __x + _Tp(__n); + _Tp __c = _Tp(1) / __fp_min; + _Tp __d = _Tp(1) / __b; + _Tp __h = __d; + for ( unsigned int __i = 1; __i <= __max_iter; ++__i ) + { + _Tp __a = -_Tp(__i * (__nm1 + __i)); + __b += _Tp(2); + __d = _Tp(1) / (__a * __d + __b); + __c = __b + __a / __c; + const _Tp __del = __c * __d; + __h *= __del; + if (std::abs(__del - _Tp(1)) < __eps) + { + const _Tp __ans = __h * std::exp(-__x); + return __ans; + } + } + std::__throw_runtime_error(("Continued fraction failed " "in __expint_En_cont_frac.") + ); + } +# 246 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_En_recursion(unsigned int __n, _Tp __x) + { + _Tp __En; + _Tp __E1 = __expint_E1(__x); + if (__x < _Tp(__n)) + { + + __En = __E1; + for (unsigned int __j = 2; __j < __n; ++__j) + __En = (std::exp(-__x) - __x * __En) / _Tp(__j - 1); + } + else + { + + __En = _Tp(1); + const int __N = __n + 20; + _Tp __save = _Tp(0); + for (int __j = __N; __j > 0; --__j) + { + __En = (std::exp(-__x) - __j * __En) / __x; + if (__j == __n) + __save = __En; + } + _Tp __norm = __En / __E1; + __En /= __norm; + } + + return __En; + } +# 290 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_Ei_series(_Tp __x) + { + _Tp __term = _Tp(1); + _Tp __sum = _Tp(0); + const unsigned int __max_iter = 1000; + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + __term *= __x / __i; + __sum += __term / __i; + if (__term < std::numeric_limits<_Tp>::epsilon() * __sum) + break; + } + + return __numeric_constants<_Tp>::__gamma_e() + __sum + std::log(__x); + } +# 321 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_Ei_asymp(_Tp __x) + { + _Tp __term = _Tp(1); + _Tp __sum = _Tp(1); + const unsigned int __max_iter = 1000; + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + _Tp __prev = __term; + __term *= __i / __x; + if (__term < std::numeric_limits<_Tp>::epsilon()) + break; + if (__term >= __prev) + break; + __sum += __term; + } + + return std::exp(__x) * __sum / __x; + } +# 354 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_Ei(_Tp __x) + { + if (__x < _Tp(0)) + return -__expint_E1(-__x); + else if (__x < -std::log(std::numeric_limits<_Tp>::epsilon())) + return __expint_Ei_series(__x); + else + return __expint_Ei_asymp(__x); + } +# 378 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_E1(_Tp __x) + { + if (__x < _Tp(0)) + return -__expint_Ei(-__x); + else if (__x < _Tp(1)) + return __expint_E1_series(__x); + else if (__x < _Tp(100)) + return __expint_En_cont_frac(1, __x); + else + return __expint_E1_asymp(__x); + } +# 408 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_asymp(unsigned int __n, _Tp __x) + { + _Tp __term = _Tp(1); + _Tp __sum = _Tp(1); + for (unsigned int __i = 1; __i <= __n; ++__i) + { + _Tp __prev = __term; + __term *= -(__n - __i + 1) / __x; + if (std::abs(__term) > std::abs(__prev)) + break; + __sum += __term; + } + + return std::exp(-__x) * __sum / __x; + } +# 442 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_large_n(unsigned int __n, _Tp __x) + { + const _Tp __xpn = __x + __n; + const _Tp __xpn2 = __xpn * __xpn; + _Tp __term = _Tp(1); + _Tp __sum = _Tp(1); + for (unsigned int __i = 1; __i <= __n; ++__i) + { + _Tp __prev = __term; + __term *= (__n - 2 * (__i - 1) * __x) / __xpn2; + if (std::abs(__term) < std::numeric_limits<_Tp>::epsilon()) + break; + __sum += __term; + } + + return std::exp(-__x) * __sum / __xpn; + } +# 476 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint(unsigned int __n, _Tp __x) + { + + if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__n <= 1 && __x == _Tp(0)) + return std::numeric_limits<_Tp>::infinity(); + else + { + _Tp __E0 = std::exp(__x) / __x; + if (__n == 0) + return __E0; + + _Tp __E1 = __expint_E1(__x); + if (__n == 1) + return __E1; + + if (__x == _Tp(0)) + return _Tp(1) / static_cast<_Tp>(__n - 1); + + _Tp __En = __expint_En_recursion(__n, __x); + + return __En; + } + } +# 516 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + inline _Tp + __expint(_Tp __x) + { + if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return __expint_Ei(__x); + } + } + + + + + +} +# 54 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 1 3 +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 +namespace std +{ + +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + namespace __detail + { +# 83 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __conf_hyperg_series(_Tp __a, _Tp __c, _Tp __x) + { + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + _Tp __term = _Tp(1); + _Tp __Fac = _Tp(1); + const unsigned int __max_iter = 100000; + unsigned int __i; + for (__i = 0; __i < __max_iter; ++__i) + { + __term *= (__a + _Tp(__i)) * __x + / ((__c + _Tp(__i)) * _Tp(1 + __i)); + if (std::abs(__term) < __eps) + { + break; + } + __Fac += __term; + } + if (__i == __max_iter) + std::__throw_runtime_error(("Series failed to converge " "in __conf_hyperg_series.") + ); + + return __Fac; + } +# 120 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __conf_hyperg_luke(_Tp __a, _Tp __c, _Tp __xin) + { + const _Tp __big = std::pow(std::numeric_limits<_Tp>::max(), _Tp(0.16L)); + const int __nmax = 20000; + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __x = -__xin; + const _Tp __x3 = __x * __x * __x; + const _Tp __t0 = __a / __c; + const _Tp __t1 = (__a + _Tp(1)) / (_Tp(2) * __c); + const _Tp __t2 = (__a + _Tp(2)) / (_Tp(2) * (__c + _Tp(1))); + _Tp __F = _Tp(1); + _Tp __prec; + + _Tp __Bnm3 = _Tp(1); + _Tp __Bnm2 = _Tp(1) + __t1 * __x; + _Tp __Bnm1 = _Tp(1) + __t2 * __x * (_Tp(1) + __t1 / _Tp(3) * __x); + + _Tp __Anm3 = _Tp(1); + _Tp __Anm2 = __Bnm2 - __t0 * __x; + _Tp __Anm1 = __Bnm1 - __t0 * (_Tp(1) + __t2 * __x) * __x + + __t0 * __t1 * (__c / (__c + _Tp(1))) * __x * __x; + + int __n = 3; + while(1) + { + _Tp __npam1 = _Tp(__n - 1) + __a; + _Tp __npcm1 = _Tp(__n - 1) + __c; + _Tp __npam2 = _Tp(__n - 2) + __a; + _Tp __npcm2 = _Tp(__n - 2) + __c; + _Tp __tnm1 = _Tp(2 * __n - 1); + _Tp __tnm3 = _Tp(2 * __n - 3); + _Tp __tnm5 = _Tp(2 * __n - 5); + _Tp __F1 = (_Tp(__n - 2) - __a) / (_Tp(2) * __tnm3 * __npcm1); + _Tp __F2 = (_Tp(__n) + __a) * __npam1 + / (_Tp(4) * __tnm1 * __tnm3 * __npcm2 * __npcm1); + _Tp __F3 = -__npam2 * __npam1 * (_Tp(__n - 2) - __a) + / (_Tp(8) * __tnm3 * __tnm3 * __tnm5 + * (_Tp(__n - 3) + __c) * __npcm2 * __npcm1); + _Tp __E = -__npam1 * (_Tp(__n - 1) - __c) + / (_Tp(2) * __tnm3 * __npcm2 * __npcm1); + + _Tp __An = (_Tp(1) + __F1 * __x) * __Anm1 + + (__E + __F2 * __x) * __x * __Anm2 + __F3 * __x3 * __Anm3; + _Tp __Bn = (_Tp(1) + __F1 * __x) * __Bnm1 + + (__E + __F2 * __x) * __x * __Bnm2 + __F3 * __x3 * __Bnm3; + _Tp __r = __An / __Bn; + + __prec = std::abs((__F - __r) / __F); + __F = __r; + + if (__prec < __eps || __n > __nmax) + break; + + if (std::abs(__An) > __big || std::abs(__Bn) > __big) + { + __An /= __big; + __Bn /= __big; + __Anm1 /= __big; + __Bnm1 /= __big; + __Anm2 /= __big; + __Bnm2 /= __big; + __Anm3 /= __big; + __Bnm3 /= __big; + } + else if (std::abs(__An) < _Tp(1) / __big + || std::abs(__Bn) < _Tp(1) / __big) + { + __An *= __big; + __Bn *= __big; + __Anm1 *= __big; + __Bnm1 *= __big; + __Anm2 *= __big; + __Bnm2 *= __big; + __Anm3 *= __big; + __Bnm3 *= __big; + } + + ++__n; + __Bnm3 = __Bnm2; + __Bnm2 = __Bnm1; + __Bnm1 = __Bn; + __Anm3 = __Anm2; + __Anm2 = __Anm1; + __Anm1 = __An; + } + + if (__n >= __nmax) + std::__throw_runtime_error(("Iteration failed to converge " "in __conf_hyperg_luke.") + ); + + return __F; + } +# 227 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __conf_hyperg(_Tp __a, _Tp __c, _Tp __x) + { + + const _Tp __c_nint = ::std::nearbyint(__c); + + + + if (__isnan(__a) || __isnan(__c) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__c_nint == __c && __c_nint <= 0) + return std::numeric_limits<_Tp>::infinity(); + else if (__a == _Tp(0)) + return _Tp(1); + else if (__c == __a) + return std::exp(__x); + else if (__x < _Tp(0)) + return __conf_hyperg_luke(__a, __c, __x); + else + return __conf_hyperg_series(__a, __c, __x); + } +# 271 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __hyperg_series(_Tp __a, _Tp __b, _Tp __c, _Tp __x) + { + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + _Tp __term = _Tp(1); + _Tp __Fabc = _Tp(1); + const unsigned int __max_iter = 100000; + unsigned int __i; + for (__i = 0; __i < __max_iter; ++__i) + { + __term *= (__a + _Tp(__i)) * (__b + _Tp(__i)) * __x + / ((__c + _Tp(__i)) * _Tp(1 + __i)); + if (std::abs(__term) < __eps) + { + break; + } + __Fabc += __term; + } + if (__i == __max_iter) + std::__throw_runtime_error(("Series failed to converge " "in __hyperg_series.") + ); + + return __Fabc; + } + + + + + + + + template + _Tp + __hyperg_luke(_Tp __a, _Tp __b, _Tp __c, _Tp __xin) + { + const _Tp __big = std::pow(std::numeric_limits<_Tp>::max(), _Tp(0.16L)); + const int __nmax = 20000; + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __x = -__xin; + const _Tp __x3 = __x * __x * __x; + const _Tp __t0 = __a * __b / __c; + const _Tp __t1 = (__a + _Tp(1)) * (__b + _Tp(1)) / (_Tp(2) * __c); + const _Tp __t2 = (__a + _Tp(2)) * (__b + _Tp(2)) + / (_Tp(2) * (__c + _Tp(1))); + + _Tp __F = _Tp(1); + + _Tp __Bnm3 = _Tp(1); + _Tp __Bnm2 = _Tp(1) + __t1 * __x; + _Tp __Bnm1 = _Tp(1) + __t2 * __x * (_Tp(1) + __t1 / _Tp(3) * __x); + + _Tp __Anm3 = _Tp(1); + _Tp __Anm2 = __Bnm2 - __t0 * __x; + _Tp __Anm1 = __Bnm1 - __t0 * (_Tp(1) + __t2 * __x) * __x + + __t0 * __t1 * (__c / (__c + _Tp(1))) * __x * __x; + + int __n = 3; + while (1) + { + const _Tp __npam1 = _Tp(__n - 1) + __a; + const _Tp __npbm1 = _Tp(__n - 1) + __b; + const _Tp __npcm1 = _Tp(__n - 1) + __c; + const _Tp __npam2 = _Tp(__n - 2) + __a; + const _Tp __npbm2 = _Tp(__n - 2) + __b; + const _Tp __npcm2 = _Tp(__n - 2) + __c; + const _Tp __tnm1 = _Tp(2 * __n - 1); + const _Tp __tnm3 = _Tp(2 * __n - 3); + const _Tp __tnm5 = _Tp(2 * __n - 5); + const _Tp __n2 = __n * __n; + const _Tp __F1 = (_Tp(3) * __n2 + (__a + __b - _Tp(6)) * __n + + _Tp(2) - __a * __b - _Tp(2) * (__a + __b)) + / (_Tp(2) * __tnm3 * __npcm1); + const _Tp __F2 = -(_Tp(3) * __n2 - (__a + __b + _Tp(6)) * __n + + _Tp(2) - __a * __b) * __npam1 * __npbm1 + / (_Tp(4) * __tnm1 * __tnm3 * __npcm2 * __npcm1); + const _Tp __F3 = (__npam2 * __npam1 * __npbm2 * __npbm1 + * (_Tp(__n - 2) - __a) * (_Tp(__n - 2) - __b)) + / (_Tp(8) * __tnm3 * __tnm3 * __tnm5 + * (_Tp(__n - 3) + __c) * __npcm2 * __npcm1); + const _Tp __E = -__npam1 * __npbm1 * (_Tp(__n - 1) - __c) + / (_Tp(2) * __tnm3 * __npcm2 * __npcm1); + + _Tp __An = (_Tp(1) + __F1 * __x) * __Anm1 + + (__E + __F2 * __x) * __x * __Anm2 + __F3 * __x3 * __Anm3; + _Tp __Bn = (_Tp(1) + __F1 * __x) * __Bnm1 + + (__E + __F2 * __x) * __x * __Bnm2 + __F3 * __x3 * __Bnm3; + const _Tp __r = __An / __Bn; + + const _Tp __prec = std::abs((__F - __r) / __F); + __F = __r; + + if (__prec < __eps || __n > __nmax) + break; + + if (std::abs(__An) > __big || std::abs(__Bn) > __big) + { + __An /= __big; + __Bn /= __big; + __Anm1 /= __big; + __Bnm1 /= __big; + __Anm2 /= __big; + __Bnm2 /= __big; + __Anm3 /= __big; + __Bnm3 /= __big; + } + else if (std::abs(__An) < _Tp(1) / __big + || std::abs(__Bn) < _Tp(1) / __big) + { + __An *= __big; + __Bn *= __big; + __Anm1 *= __big; + __Bnm1 *= __big; + __Anm2 *= __big; + __Bnm2 *= __big; + __Anm3 *= __big; + __Bnm3 *= __big; + } + + ++__n; + __Bnm3 = __Bnm2; + __Bnm2 = __Bnm1; + __Bnm1 = __Bn; + __Anm3 = __Anm2; + __Anm2 = __Anm1; + __Anm1 = __An; + } + + if (__n >= __nmax) + std::__throw_runtime_error(("Iteration failed to converge " "in __hyperg_luke.") + ); + + return __F; + } +# 438 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __hyperg_reflect(_Tp __a, _Tp __b, _Tp __c, _Tp __x) + { + const _Tp __d = __c - __a - __b; + const int __intd = std::floor(__d + _Tp(0.5L)); + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __toler = _Tp(1000) * __eps; + const _Tp __log_max = std::log(std::numeric_limits<_Tp>::max()); + const bool __d_integer = (std::abs(__d - __intd) < __toler); + + if (__d_integer) + { + const _Tp __ln_omx = std::log(_Tp(1) - __x); + const _Tp __ad = std::abs(__d); + _Tp __F1, __F2; + + _Tp __d1, __d2; + if (__d >= _Tp(0)) + { + __d1 = __d; + __d2 = _Tp(0); + } + else + { + __d1 = _Tp(0); + __d2 = __d; + } + + const _Tp __lng_c = __log_gamma(__c); + + + if (__ad < __eps) + { + + __F1 = _Tp(0); + } + else + { + + bool __ok_d1 = true; + _Tp __lng_ad, __lng_ad1, __lng_bd1; + try + { + __lng_ad = __log_gamma(__ad); + __lng_ad1 = __log_gamma(__a + __d1); + __lng_bd1 = __log_gamma(__b + __d1); + } + catch(...) + { + __ok_d1 = false; + } + + if (__ok_d1) + { + + + + _Tp __sum1 = _Tp(1); + _Tp __term = _Tp(1); + _Tp __ln_pre1 = __lng_ad + __lng_c + __d2 * __ln_omx + - __lng_ad1 - __lng_bd1; + + + + for (int __i = 1; __i < __ad; ++__i) + { + const int __j = __i - 1; + __term *= (__a + __d2 + __j) * (__b + __d2 + __j) + / (_Tp(1) + __d2 + __j) / __i * (_Tp(1) - __x); + __sum1 += __term; + } + + if (__ln_pre1 > __log_max) + std::__throw_runtime_error(("Overflow of gamma functions" " in __hyperg_luke.") + ); + else + __F1 = std::exp(__ln_pre1) * __sum1; + } + else + { + + + __F1 = _Tp(0); + } + } + + + bool __ok_d2 = true; + _Tp __lng_ad2, __lng_bd2; + try + { + __lng_ad2 = __log_gamma(__a + __d2); + __lng_bd2 = __log_gamma(__b + __d2); + } + catch(...) + { + __ok_d2 = false; + } + + if (__ok_d2) + { + + + const int __maxiter = 2000; + const _Tp __psi_1 = -__numeric_constants<_Tp>::__gamma_e(); + const _Tp __psi_1pd = __psi(_Tp(1) + __ad); + const _Tp __psi_apd1 = __psi(__a + __d1); + const _Tp __psi_bpd1 = __psi(__b + __d1); + + _Tp __psi_term = __psi_1 + __psi_1pd - __psi_apd1 + - __psi_bpd1 - __ln_omx; + _Tp __fact = _Tp(1); + _Tp __sum2 = __psi_term; + _Tp __ln_pre2 = __lng_c + __d1 * __ln_omx + - __lng_ad2 - __lng_bd2; + + + int __j; + for (__j = 1; __j < __maxiter; ++__j) + { + + + const _Tp __term1 = _Tp(1) / _Tp(__j) + + _Tp(1) / (__ad + __j); + const _Tp __term2 = _Tp(1) / (__a + __d1 + _Tp(__j - 1)) + + _Tp(1) / (__b + __d1 + _Tp(__j - 1)); + __psi_term += __term1 - __term2; + __fact *= (__a + __d1 + _Tp(__j - 1)) + * (__b + __d1 + _Tp(__j - 1)) + / ((__ad + __j) * __j) * (_Tp(1) - __x); + const _Tp __delta = __fact * __psi_term; + __sum2 += __delta; + if (std::abs(__delta) < __eps * std::abs(__sum2)) + break; + } + if (__j == __maxiter) + std::__throw_runtime_error(("Sum F2 failed to converge " "in __hyperg_reflect") + ); + + if (__sum2 == _Tp(0)) + __F2 = _Tp(0); + else + __F2 = std::exp(__ln_pre2) * __sum2; + } + else + { + + + __F2 = _Tp(0); + } + + const _Tp __sgn_2 = (__intd % 2 == 1 ? -_Tp(1) : _Tp(1)); + const _Tp __F = __F1 + __sgn_2 * __F2; + + return __F; + } + else + { + + + + + bool __ok1 = true; + _Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0); + _Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0); + try + { + __sgn_g1ca = __log_gamma_sign(__c - __a); + __ln_g1ca = __log_gamma(__c - __a); + __sgn_g1cb = __log_gamma_sign(__c - __b); + __ln_g1cb = __log_gamma(__c - __b); + } + catch(...) + { + __ok1 = false; + } + + bool __ok2 = true; + _Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0); + _Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0); + try + { + __sgn_g2a = __log_gamma_sign(__a); + __ln_g2a = __log_gamma(__a); + __sgn_g2b = __log_gamma_sign(__b); + __ln_g2b = __log_gamma(__b); + } + catch(...) + { + __ok2 = false; + } + + const _Tp __sgn_gc = __log_gamma_sign(__c); + const _Tp __ln_gc = __log_gamma(__c); + const _Tp __sgn_gd = __log_gamma_sign(__d); + const _Tp __ln_gd = __log_gamma(__d); + const _Tp __sgn_gmd = __log_gamma_sign(-__d); + const _Tp __ln_gmd = __log_gamma(-__d); + + const _Tp __sgn1 = __sgn_gc * __sgn_gd * __sgn_g1ca * __sgn_g1cb; + const _Tp __sgn2 = __sgn_gc * __sgn_gmd * __sgn_g2a * __sgn_g2b; + + _Tp __pre1, __pre2; + if (__ok1 && __ok2) + { + _Tp __ln_pre1 = __ln_gc + __ln_gd - __ln_g1ca - __ln_g1cb; + _Tp __ln_pre2 = __ln_gc + __ln_gmd - __ln_g2a - __ln_g2b + + __d * std::log(_Tp(1) - __x); + if (__ln_pre1 < __log_max && __ln_pre2 < __log_max) + { + __pre1 = std::exp(__ln_pre1); + __pre2 = std::exp(__ln_pre2); + __pre1 *= __sgn1; + __pre2 *= __sgn2; + } + else + { + std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") + ); + } + } + else if (__ok1 && !__ok2) + { + _Tp __ln_pre1 = __ln_gc + __ln_gd - __ln_g1ca - __ln_g1cb; + if (__ln_pre1 < __log_max) + { + __pre1 = std::exp(__ln_pre1); + __pre1 *= __sgn1; + __pre2 = _Tp(0); + } + else + { + std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") + ); + } + } + else if (!__ok1 && __ok2) + { + _Tp __ln_pre2 = __ln_gc + __ln_gmd - __ln_g2a - __ln_g2b + + __d * std::log(_Tp(1) - __x); + if (__ln_pre2 < __log_max) + { + __pre1 = _Tp(0); + __pre2 = std::exp(__ln_pre2); + __pre2 *= __sgn2; + } + else + { + std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") + ); + } + } + else + { + __pre1 = _Tp(0); + __pre2 = _Tp(0); + std::__throw_runtime_error(("Underflow of gamma functions " "in __hyperg_reflect") + ); + } + + const _Tp __F1 = __hyperg_series(__a, __b, _Tp(1) - __d, + _Tp(1) - __x); + const _Tp __F2 = __hyperg_series(__c - __a, __c - __b, _Tp(1) + __d, + _Tp(1) - __x); + + const _Tp __F = __pre1 * __F1 + __pre2 * __F2; + + return __F; + } + } +# 728 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __hyperg(_Tp __a, _Tp __b, _Tp __c, _Tp __x) + { + + const _Tp __a_nint = ::std::nearbyint(__a); + const _Tp __b_nint = ::std::nearbyint(__b); + const _Tp __c_nint = ::std::nearbyint(__c); + + + + + + const _Tp __toler = _Tp(1000) * std::numeric_limits<_Tp>::epsilon(); + if (std::abs(__x) >= _Tp(1)) + std::__throw_domain_error(("Argument outside unit circle " "in __hyperg.") + ); + else if (__isnan(__a) || __isnan(__b) + || __isnan(__c) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__c_nint == __c && __c_nint <= _Tp(0)) + return std::numeric_limits<_Tp>::infinity(); + else if (std::abs(__c - __b) < __toler || std::abs(__c - __a) < __toler) + return std::pow(_Tp(1) - __x, __c - __a - __b); + else if (__a >= _Tp(0) && __b >= _Tp(0) && __c >= _Tp(0) + && __x >= _Tp(0) && __x < _Tp(0.995L)) + return __hyperg_series(__a, __b, __c, __x); + else if (std::abs(__a) < _Tp(10) && std::abs(__b) < _Tp(10)) + { + + + if (__a < _Tp(0) && std::abs(__a - __a_nint) < __toler) + return __hyperg_series(__a_nint, __b, __c, __x); + else if (__b < _Tp(0) && std::abs(__b - __b_nint) < __toler) + return __hyperg_series(__a, __b_nint, __c, __x); + else if (__x < -_Tp(0.25L)) + return __hyperg_luke(__a, __b, __c, __x); + else if (__x < _Tp(0.5L)) + return __hyperg_series(__a, __b, __c, __x); + else + if (std::abs(__c) > _Tp(10)) + return __hyperg_series(__a, __b, __c, __x); + else + return __hyperg_reflect(__a, __b, __c, __x); + } + else + return __hyperg_luke(__a, __b, __c, __x); + } + } + + + + + + +} +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 1 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 + namespace __detail + { +# 80 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 + template + _Tp + __poly_legendre_p(unsigned int __l, _Tp __x) + { + + if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x == +_Tp(1)) + return +_Tp(1); + else if (__x == -_Tp(1)) + return (__l % 2 == 1 ? -_Tp(1) : +_Tp(1)); + else + { + _Tp __p_lm2 = _Tp(1); + if (__l == 0) + return __p_lm2; + + _Tp __p_lm1 = __x; + if (__l == 1) + return __p_lm1; + + _Tp __p_l = 0; + for (unsigned int __ll = 2; __ll <= __l; ++__ll) + { + + + __p_l = _Tp(2) * __x * __p_lm1 - __p_lm2 + - (__x * __p_lm1 - __p_lm2) / _Tp(__ll); + __p_lm2 = __p_lm1; + __p_lm1 = __p_l; + } + + return __p_l; + } + } +# 136 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 + template + _Tp + __assoc_legendre_p(unsigned int __l, unsigned int __m, _Tp __x, + _Tp __phase = _Tp(+1)) + { + + if (__m > __l) + return _Tp(0); + else if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__m == 0) + return __poly_legendre_p(__l, __x); + else + { + _Tp __p_mm = _Tp(1); + if (__m > 0) + { + + + _Tp __root = std::sqrt(_Tp(1) - __x) * std::sqrt(_Tp(1) + __x); + _Tp __fact = _Tp(1); + for (unsigned int __i = 1; __i <= __m; ++__i) + { + __p_mm *= __phase * __fact * __root; + __fact += _Tp(2); + } + } + if (__l == __m) + return __p_mm; + + _Tp __p_mp1m = _Tp(2 * __m + 1) * __x * __p_mm; + if (__l == __m + 1) + return __p_mp1m; + + _Tp __p_lm2m = __p_mm; + _Tp __P_lm1m = __p_mp1m; + _Tp __p_lm = _Tp(0); + for (unsigned int __j = __m + 2; __j <= __l; ++__j) + { + __p_lm = (_Tp(2 * __j - 1) * __x * __P_lm1m + - _Tp(__j + __m - 1) * __p_lm2m) / _Tp(__j - __m); + __p_lm2m = __P_lm1m; + __P_lm1m = __p_lm; + } + + return __p_lm; + } + } +# 214 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 + template + _Tp + __sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta) + { + if (__isnan(__theta)) + return std::numeric_limits<_Tp>::quiet_NaN(); + + const _Tp __x = std::cos(__theta); + + if (__m > __l) + return _Tp(0); + else if (__m == 0) + { + _Tp __P = __poly_legendre_p(__l, __x); + _Tp __fact = std::sqrt(_Tp(2 * __l + 1) + / (_Tp(4) * __numeric_constants<_Tp>::__pi())); + __P *= __fact; + return __P; + } + else if (__x == _Tp(1) || __x == -_Tp(1)) + { + + return _Tp(0); + } + else + { + + + + + + const _Tp __sgn = ( __m % 2 == 1 ? -_Tp(1) : _Tp(1)); + const _Tp __y_mp1m_factor = __x * std::sqrt(_Tp(2 * __m + 3)); + + const _Tp __lncirc = ::std::log1p(-__x * __x); + + + + + + const _Tp __lnpoch = ::std::lgamma(_Tp(__m + _Tp(0.5L))) + - ::std::lgamma(_Tp(__m)); + + + + + const _Tp __lnpre_val = + -_Tp(0.25L) * __numeric_constants<_Tp>::__lnpi() + + _Tp(0.5L) * (__lnpoch + __m * __lncirc); + const _Tp __sr = std::sqrt((_Tp(2) + _Tp(1) / __m) + / (_Tp(4) * __numeric_constants<_Tp>::__pi())); + _Tp __y_mm = __sgn * __sr * std::exp(__lnpre_val); + _Tp __y_mp1m = __y_mp1m_factor * __y_mm; + + if (__l == __m) + return __y_mm; + else if (__l == __m + 1) + return __y_mp1m; + else + { + _Tp __y_lm = _Tp(0); + + + for (unsigned int __ll = __m + 2; __ll <= __l; ++__ll) + { + const _Tp __rat1 = _Tp(__ll - __m) / _Tp(__ll + __m); + const _Tp __rat2 = _Tp(__ll - __m - 1) / _Tp(__ll + __m - 1); + const _Tp __fact1 = std::sqrt(__rat1 * _Tp(2 * __ll + 1) + * _Tp(2 * __ll - 1)); + const _Tp __fact2 = std::sqrt(__rat1 * __rat2 * _Tp(2 * __ll + 1) + / _Tp(2 * __ll - 3)); + __y_lm = (__x * __y_mp1m * __fact1 + - (__ll + __m - 1) * __y_mm * __fact2) / _Tp(__ll - __m); + __y_mm = __y_mp1m; + __y_mp1m = __y_lm; + } + + return __y_lm; + } + } + } + } + + + + + + +} +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 1 3 +# 51 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + namespace __detail + { +# 83 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + void + __bessel_ik(_Tp __nu, _Tp __x, + _Tp & __Inu, _Tp & __Knu, _Tp & __Ipnu, _Tp & __Kpnu) + { + if (__x == _Tp(0)) + { + if (__nu == _Tp(0)) + { + __Inu = _Tp(1); + __Ipnu = _Tp(0); + } + else if (__nu == _Tp(1)) + { + __Inu = _Tp(0); + __Ipnu = _Tp(0.5L); + } + else + { + __Inu = _Tp(0); + __Ipnu = _Tp(0); + } + __Knu = std::numeric_limits<_Tp>::infinity(); + __Kpnu = -std::numeric_limits<_Tp>::infinity(); + return; + } + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __fp_min = _Tp(10) * std::numeric_limits<_Tp>::epsilon(); + const int __max_iter = 15000; + const _Tp __x_min = _Tp(2); + + const int __nl = static_cast(__nu + _Tp(0.5L)); + + const _Tp __mu = __nu - __nl; + const _Tp __mu2 = __mu * __mu; + const _Tp __xi = _Tp(1) / __x; + const _Tp __xi2 = _Tp(2) * __xi; + _Tp __h = __nu * __xi; + if ( __h < __fp_min ) + __h = __fp_min; + _Tp __b = __xi2 * __nu; + _Tp __d = _Tp(0); + _Tp __c = __h; + int __i; + for ( __i = 1; __i <= __max_iter; ++__i ) + { + __b += __xi2; + __d = _Tp(1) / (__b + __d); + __c = __b + _Tp(1) / __c; + const _Tp __del = __c * __d; + __h *= __del; + if (std::abs(__del - _Tp(1)) < __eps) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Argument x too large " "in __bessel_ik; " "try asymptotic expansion.") + + ); + _Tp __Inul = __fp_min; + _Tp __Ipnul = __h * __Inul; + _Tp __Inul1 = __Inul; + _Tp __Ipnu1 = __Ipnul; + _Tp __fact = __nu * __xi; + for (int __l = __nl; __l >= 1; --__l) + { + const _Tp __Inutemp = __fact * __Inul + __Ipnul; + __fact -= __xi; + __Ipnul = __fact * __Inutemp + __Inul; + __Inul = __Inutemp; + } + _Tp __f = __Ipnul / __Inul; + _Tp __Kmu, __Knu1; + if (__x < __x_min) + { + const _Tp __x2 = __x / _Tp(2); + const _Tp __pimu = __numeric_constants<_Tp>::__pi() * __mu; + const _Tp __fact = (std::abs(__pimu) < __eps + ? _Tp(1) : __pimu / std::sin(__pimu)); + _Tp __d = -std::log(__x2); + _Tp __e = __mu * __d; + const _Tp __fact2 = (std::abs(__e) < __eps + ? _Tp(1) : std::sinh(__e) / __e); + _Tp __gam1, __gam2, __gampl, __gammi; + __gamma_temme(__mu, __gam1, __gam2, __gampl, __gammi); + _Tp __ff = __fact + * (__gam1 * std::cosh(__e) + __gam2 * __fact2 * __d); + _Tp __sum = __ff; + __e = std::exp(__e); + _Tp __p = __e / (_Tp(2) * __gampl); + _Tp __q = _Tp(1) / (_Tp(2) * __e * __gammi); + _Tp __c = _Tp(1); + __d = __x2 * __x2; + _Tp __sum1 = __p; + int __i; + for (__i = 1; __i <= __max_iter; ++__i) + { + __ff = (__i * __ff + __p + __q) / (__i * __i - __mu2); + __c *= __d / __i; + __p /= __i - __mu; + __q /= __i + __mu; + const _Tp __del = __c * __ff; + __sum += __del; + const _Tp __del1 = __c * (__p - __i * __ff); + __sum1 += __del1; + if (std::abs(__del) < __eps * std::abs(__sum)) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Bessel k series failed to converge " "in __bessel_ik.") + ); + __Kmu = __sum; + __Knu1 = __sum1 * __xi2; + } + else + { + _Tp __b = _Tp(2) * (_Tp(1) + __x); + _Tp __d = _Tp(1) / __b; + _Tp __delh = __d; + _Tp __h = __delh; + _Tp __q1 = _Tp(0); + _Tp __q2 = _Tp(1); + _Tp __a1 = _Tp(0.25L) - __mu2; + _Tp __q = __c = __a1; + _Tp __a = -__a1; + _Tp __s = _Tp(1) + __q * __delh; + int __i; + for (__i = 2; __i <= __max_iter; ++__i) + { + __a -= 2 * (__i - 1); + __c = -__a * __c / __i; + const _Tp __qnew = (__q1 - __b * __q2) / __a; + __q1 = __q2; + __q2 = __qnew; + __q += __c * __qnew; + __b += _Tp(2); + __d = _Tp(1) / (__b + __a * __d); + __delh = (__b * __d - _Tp(1)) * __delh; + __h += __delh; + const _Tp __dels = __q * __delh; + __s += __dels; + if ( std::abs(__dels / __s) < __eps ) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Steed's method failed " "in __bessel_ik.") + ); + __h = __a1 * __h; + __Kmu = std::sqrt(__numeric_constants<_Tp>::__pi() / (_Tp(2) * __x)) + * std::exp(-__x) / __s; + __Knu1 = __Kmu * (__mu + __x + _Tp(0.5L) - __h) * __xi; + } + + _Tp __Kpmu = __mu * __xi * __Kmu - __Knu1; + _Tp __Inumu = __xi / (__f * __Kmu - __Kpmu); + __Inu = __Inumu * __Inul1 / __Inul; + __Ipnu = __Inumu * __Ipnu1 / __Inul; + for ( __i = 1; __i <= __nl; ++__i ) + { + const _Tp __Knutemp = (__mu + __i) * __xi2 * __Knu1 + __Kmu; + __Kmu = __Knu1; + __Knu1 = __Knutemp; + } + __Knu = __Kmu; + __Kpnu = __nu * __xi * __Kmu - __Knu1; + + return; + } +# 267 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + _Tp + __cyl_bessel_i(_Tp __nu, _Tp __x) + { + if (__nu < _Tp(0) || __x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __cyl_bessel_i.") + ); + else if (__isnan(__nu) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x * __x < _Tp(10) * (__nu + _Tp(1))) + return __cyl_bessel_ij_series(__nu, __x, +_Tp(1), 200); + else + { + _Tp __I_nu, __K_nu, __Ip_nu, __Kp_nu; + __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + return __I_nu; + } + } +# 303 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + _Tp + __cyl_bessel_k(_Tp __nu, _Tp __x) + { + if (__nu < _Tp(0) || __x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __cyl_bessel_k.") + ); + else if (__isnan(__nu) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + { + _Tp __I_nu, __K_nu, __Ip_nu, __Kp_nu; + __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + return __K_nu; + } + } +# 337 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + void + __sph_bessel_ik(unsigned int __n, _Tp __x, + _Tp & __i_n, _Tp & __k_n, _Tp & __ip_n, _Tp & __kp_n) + { + const _Tp __nu = _Tp(__n) + _Tp(0.5L); + + _Tp __I_nu, __Ip_nu, __K_nu, __Kp_nu; + __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + + const _Tp __factor = __numeric_constants<_Tp>::__sqrtpio2() + / std::sqrt(__x); + + __i_n = __factor * __I_nu; + __k_n = __factor * __K_nu; + __ip_n = __factor * __Ip_nu - __i_n / (_Tp(2) * __x); + __kp_n = __factor * __Kp_nu - __k_n / (_Tp(2) * __x); + + return; + } +# 373 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + void + __airy(_Tp __x, _Tp & __Ai, _Tp & __Bi, _Tp & __Aip, _Tp & __Bip) + { + const _Tp __absx = std::abs(__x); + const _Tp __rootx = std::sqrt(__absx); + const _Tp __z = _Tp(2) * __absx * __rootx / _Tp(3); + const _Tp _S_inf = std::numeric_limits<_Tp>::infinity(); + + if (__isnan(__x)) + __Bip = __Aip = __Bi = __Ai = std::numeric_limits<_Tp>::quiet_NaN(); + else if (__z == _S_inf) + { + __Aip = __Ai = _Tp(0); + __Bip = __Bi = _S_inf; + } + else if (__z == -_S_inf) + __Bip = __Aip = __Bi = __Ai = _Tp(0); + else if (__x > _Tp(0)) + { + _Tp __I_nu, __Ip_nu, __K_nu, __Kp_nu; + + __bessel_ik(_Tp(1) / _Tp(3), __z, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + __Ai = __rootx * __K_nu + / (__numeric_constants<_Tp>::__sqrt3() + * __numeric_constants<_Tp>::__pi()); + __Bi = __rootx * (__K_nu / __numeric_constants<_Tp>::__pi() + + _Tp(2) * __I_nu / __numeric_constants<_Tp>::__sqrt3()); + + __bessel_ik(_Tp(2) / _Tp(3), __z, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + __Aip = -__x * __K_nu + / (__numeric_constants<_Tp>::__sqrt3() + * __numeric_constants<_Tp>::__pi()); + __Bip = __x * (__K_nu / __numeric_constants<_Tp>::__pi() + + _Tp(2) * __I_nu + / __numeric_constants<_Tp>::__sqrt3()); + } + else if (__x < _Tp(0)) + { + _Tp __J_nu, __Jp_nu, __N_nu, __Np_nu; + + __bessel_jn(_Tp(1) / _Tp(3), __z, __J_nu, __N_nu, __Jp_nu, __Np_nu); + __Ai = __rootx * (__J_nu + - __N_nu / __numeric_constants<_Tp>::__sqrt3()) / _Tp(2); + __Bi = -__rootx * (__N_nu + + __J_nu / __numeric_constants<_Tp>::__sqrt3()) / _Tp(2); + + __bessel_jn(_Tp(2) / _Tp(3), __z, __J_nu, __N_nu, __Jp_nu, __Np_nu); + __Aip = __absx * (__N_nu / __numeric_constants<_Tp>::__sqrt3() + + __J_nu) / _Tp(2); + __Bip = __absx * (__J_nu / __numeric_constants<_Tp>::__sqrt3() + - __N_nu) / _Tp(2); + } + else + { + + + + __Ai = _Tp(0.35502805388781723926L); + __Bi = __Ai * __numeric_constants<_Tp>::__sqrt3(); + + + + + __Aip = -_Tp(0.25881940379280679840L); + __Bip = -__Aip * __numeric_constants<_Tp>::__sqrt3(); + } + + return; + } + } + + + + + +} +# 57 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 1 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 3 +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 3 + namespace __detail + { +# 72 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 3 + template + _Tp + __poly_hermite_recursion(unsigned int __n, _Tp __x) + { + + _Tp __H_0 = 1; + if (__n == 0) + return __H_0; + + + _Tp __H_1 = 2 * __x; + if (__n == 1) + return __H_1; + + + _Tp __H_n, __H_nm1, __H_nm2; + unsigned int __i; + for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i) + { + __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2); + __H_nm2 = __H_nm1; + __H_nm1 = __H_n; + } + + return __H_n; + } +# 114 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 3 + template + inline _Tp + __poly_hermite(unsigned int __n, _Tp __x) + { + if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return __poly_hermite_recursion(__n, __x); + } + } + + + + + +} +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 1 3 +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 +namespace std +{ + +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + namespace __detail + { +# 75 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + _Tp + __poly_laguerre_large_n(unsigned __n, _Tpa __alpha1, _Tp __x) + { + const _Tp __a = -_Tp(__n); + const _Tp __b = _Tp(__alpha1) + _Tp(1); + const _Tp __eta = _Tp(2) * __b - _Tp(4) * __a; + const _Tp __cos2th = __x / __eta; + const _Tp __sin2th = _Tp(1) - __cos2th; + const _Tp __th = std::acos(std::sqrt(__cos2th)); + const _Tp __pre_h = __numeric_constants<_Tp>::__pi_2() + * __numeric_constants<_Tp>::__pi_2() + * __eta * __eta * __cos2th * __sin2th; + + + const _Tp __lg_b = ::std::lgamma(_Tp(__n) + __b); + const _Tp __lnfact = ::std::lgamma(_Tp(__n + 1)); + + + + + + _Tp __pre_term1 = _Tp(0.5L) * (_Tp(1) - __b) + * std::log(_Tp(0.25L) * __x * __eta); + _Tp __pre_term2 = _Tp(0.25L) * std::log(__pre_h); + _Tp __lnpre = __lg_b - __lnfact + _Tp(0.5L) * __x + + __pre_term1 - __pre_term2; + _Tp __ser_term1 = std::sin(__a * __numeric_constants<_Tp>::__pi()); + _Tp __ser_term2 = std::sin(_Tp(0.25L) * __eta + * (_Tp(2) * __th + - std::sin(_Tp(2) * __th)) + + __numeric_constants<_Tp>::__pi_4()); + _Tp __ser = __ser_term1 + __ser_term2; + + return std::exp(__lnpre) * __ser; + } +# 129 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + _Tp + __poly_laguerre_hyperg(unsigned int __n, _Tpa __alpha1, _Tp __x) + { + const _Tp __b = _Tp(__alpha1) + _Tp(1); + const _Tp __mx = -__x; + const _Tp __tc_sgn = (__x < _Tp(0) ? _Tp(1) + : ((__n % 2 == 1) ? -_Tp(1) : _Tp(1))); + + _Tp __tc = _Tp(1); + const _Tp __ax = std::abs(__x); + for (unsigned int __k = 1; __k <= __n; ++__k) + __tc *= (__ax / __k); + + _Tp __term = __tc * __tc_sgn; + _Tp __sum = __term; + for (int __k = int(__n) - 1; __k >= 0; --__k) + { + __term *= ((__b + _Tp(__k)) / _Tp(int(__n) - __k)) + * _Tp(__k + 1) / __mx; + __sum += __term; + } + + return __sum; + } +# 185 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + _Tp + __poly_laguerre_recursion(unsigned int __n, _Tpa __alpha1, _Tp __x) + { + + _Tp __l_0 = _Tp(1); + if (__n == 0) + return __l_0; + + + _Tp __l_1 = -__x + _Tp(1) + _Tp(__alpha1); + if (__n == 1) + return __l_1; + + + _Tp __l_n2 = __l_0; + _Tp __l_n1 = __l_1; + _Tp __l_n = _Tp(0); + for (unsigned int __nn = 2; __nn <= __n; ++__nn) + { + __l_n = (_Tp(2 * __nn - 1) + _Tp(__alpha1) - __x) + * __l_n1 / _Tp(__nn) + - (_Tp(__nn - 1) + _Tp(__alpha1)) * __l_n2 / _Tp(__nn); + __l_n2 = __l_n1; + __l_n1 = __l_n; + } + + return __l_n; + } +# 244 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + _Tp + __poly_laguerre(unsigned int __n, _Tpa __alpha1, _Tp __x) + { + if (__x < _Tp(0)) + std::__throw_domain_error(("Negative argument " "in __poly_laguerre.") + ); + + else if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__n == 0) + return _Tp(1); + else if (__n == 1) + return _Tp(1) + _Tp(__alpha1) - __x; + else if (__x == _Tp(0)) + { + _Tp __prod = _Tp(__alpha1) + _Tp(1); + for (unsigned int __k = 2; __k <= __n; ++__k) + __prod *= (_Tp(__alpha1) + _Tp(__k)) / _Tp(__k); + return __prod; + } + else if (__n > 10000000 && _Tp(__alpha1) > -_Tp(1) + && __x < _Tp(2) * (_Tp(__alpha1) + _Tp(1)) + _Tp(4 * __n)) + return __poly_laguerre_large_n(__n, __alpha1, __x); + else if (_Tp(__alpha1) >= _Tp(0) + || (__x > _Tp(0) && _Tp(__alpha1) < -_Tp(__n + 1))) + return __poly_laguerre_recursion(__n, __alpha1, __x); + else + return __poly_laguerre_hyperg(__n, __alpha1, __x); + } +# 296 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + inline _Tp + __assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x) + { return __poly_laguerre(__n, __m, __x); } +# 316 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + inline _Tp + __laguerre(unsigned int __n, _Tp __x) + { return __poly_laguerre(__n, 0, __x); } + } + + + + + + +} +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 1 3 +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 +namespace std +{ + +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + namespace __detail + { +# 78 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta_sum(_Tp __s) + { + + if (__s < _Tp(1)) + std::__throw_domain_error(("Bad argument in zeta sum.")); + + const unsigned int max_iter = 10000; + _Tp __zeta = _Tp(0); + for (unsigned int __k = 1; __k < max_iter; ++__k) + { + _Tp __term = std::pow(static_cast<_Tp>(__k), -__s); + if (__term < std::numeric_limits<_Tp>::epsilon()) + { + break; + } + __zeta += __term; + } + + return __zeta; + } +# 115 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta_alt(_Tp __s) + { + _Tp __sgn = _Tp(1); + _Tp __zeta = _Tp(0); + for (unsigned int __i = 1; __i < 10000000; ++__i) + { + _Tp __term = __sgn / std::pow(__i, __s); + if (std::abs(__term) < std::numeric_limits<_Tp>::epsilon()) + break; + __zeta += __term; + __sgn *= _Tp(-1); + } + __zeta /= _Tp(1) - std::pow(_Tp(2), _Tp(1) - __s); + + return __zeta; + } +# 157 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta_glob(_Tp __s) + { + _Tp __zeta = _Tp(0); + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + const _Tp __max_bincoeff = std::numeric_limits<_Tp>::max_exponent10 + * std::log(_Tp(10)) - _Tp(1); + + + + if (__s < _Tp(0)) + { + + if (::std::fmod(__s,_Tp(2)) == _Tp(0)) + return _Tp(0); + else + + { + _Tp __zeta = __riemann_zeta_glob(_Tp(1) - __s); + __zeta *= std::pow(_Tp(2) + * __numeric_constants<_Tp>::__pi(), __s) + * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) + + * std::exp(::std::lgamma(_Tp(1) - __s)) + + + + / __numeric_constants<_Tp>::__pi(); + return __zeta; + } + } + + _Tp __num = _Tp(0.5L); + const unsigned int __maxit = 10000; + for (unsigned int __i = 0; __i < __maxit; ++__i) + { + bool __punt = false; + _Tp __sgn = _Tp(1); + _Tp __term = _Tp(0); + for (unsigned int __j = 0; __j <= __i; ++__j) + { + + _Tp __bincoeff = ::std::lgamma(_Tp(1 + __i)) + - ::std::lgamma(_Tp(1 + __j)) + - ::std::lgamma(_Tp(1 + __i - __j)); + + + + + + if (__bincoeff > __max_bincoeff) + { + + __punt = true; + break; + } + __bincoeff = std::exp(__bincoeff); + __term += __sgn * __bincoeff * std::pow(_Tp(1 + __j), -__s); + __sgn *= _Tp(-1); + } + if (__punt) + break; + __term *= __num; + __zeta += __term; + if (std::abs(__term/__zeta) < __eps) + break; + __num *= _Tp(0.5L); + } + + __zeta /= _Tp(1) - std::pow(_Tp(2), _Tp(1) - __s); + + return __zeta; + } +# 252 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta_product(_Tp __s) + { + static const _Tp __prime[] = { + _Tp(2), _Tp(3), _Tp(5), _Tp(7), _Tp(11), _Tp(13), _Tp(17), _Tp(19), + _Tp(23), _Tp(29), _Tp(31), _Tp(37), _Tp(41), _Tp(43), _Tp(47), + _Tp(53), _Tp(59), _Tp(61), _Tp(67), _Tp(71), _Tp(73), _Tp(79), + _Tp(83), _Tp(89), _Tp(97), _Tp(101), _Tp(103), _Tp(107), _Tp(109) + }; + static const unsigned int __num_primes = sizeof(__prime) / sizeof(_Tp); + + _Tp __zeta = _Tp(1); + for (unsigned int __i = 0; __i < __num_primes; ++__i) + { + const _Tp __fact = _Tp(1) - std::pow(__prime[__i], -__s); + __zeta *= __fact; + if (_Tp(1) - __fact < std::numeric_limits<_Tp>::epsilon()) + break; + } + + __zeta = _Tp(1) / __zeta; + + return __zeta; + } +# 293 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta(_Tp __s) + { + if (__isnan(__s)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__s == _Tp(1)) + return std::numeric_limits<_Tp>::infinity(); + else if (__s < -_Tp(19)) + { + _Tp __zeta = __riemann_zeta_product(_Tp(1) - __s); + __zeta *= std::pow(_Tp(2) * __numeric_constants<_Tp>::__pi(), __s) + * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) + + * std::exp(::std::lgamma(_Tp(1) - __s)) + + + + / __numeric_constants<_Tp>::__pi(); + return __zeta; + } + else if (__s < _Tp(20)) + { + + bool __glob = true; + if (__glob) + return __riemann_zeta_glob(__s); + else + { + if (__s > _Tp(1)) + return __riemann_zeta_sum(__s); + else + { + _Tp __zeta = std::pow(_Tp(2) + * __numeric_constants<_Tp>::__pi(), __s) + * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) + + * ::std::tgamma(_Tp(1) - __s) + + + + * __riemann_zeta_sum(_Tp(1) - __s); + return __zeta; + } + } + } + else + return __riemann_zeta_product(__s); + } +# 365 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __hurwitz_zeta_glob(_Tp __a, _Tp __s) + { + _Tp __zeta = _Tp(0); + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + const _Tp __max_bincoeff = std::numeric_limits<_Tp>::max_exponent10 + * std::log(_Tp(10)) - _Tp(1); + + const unsigned int __maxit = 10000; + for (unsigned int __i = 0; __i < __maxit; ++__i) + { + bool __punt = false; + _Tp __sgn = _Tp(1); + _Tp __term = _Tp(0); + for (unsigned int __j = 0; __j <= __i; ++__j) + { + + _Tp __bincoeff = ::std::lgamma(_Tp(1 + __i)) + - ::std::lgamma(_Tp(1 + __j)) + - ::std::lgamma(_Tp(1 + __i - __j)); + + + + + + if (__bincoeff > __max_bincoeff) + { + + __punt = true; + break; + } + __bincoeff = std::exp(__bincoeff); + __term += __sgn * __bincoeff * std::pow(_Tp(__a + __j), -__s); + __sgn *= _Tp(-1); + } + if (__punt) + break; + __term /= _Tp(__i + 1); + if (std::abs(__term / __zeta) < __eps) + break; + __zeta += __term; + } + + __zeta /= __s - _Tp(1); + + return __zeta; + } +# 430 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + inline _Tp + __hurwitz_zeta(_Tp __a, _Tp __s) + { return __hurwitz_zeta_glob(__a, __s); } + } + + + + + + +} +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 + +namespace std +{ + +# 205 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + assoc_laguerref(unsigned int __n, unsigned int __m, float __x) + { return __detail::__assoc_laguerre(__n, __m, __x); } + + + + + + + + inline long double + assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x) + { return __detail::__assoc_laguerre(__n, __m, __x); } +# 250 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__assoc_laguerre<__type>(__n, __m, __x); + } +# 266 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + assoc_legendref(unsigned int __l, unsigned int __m, float __x) + { return __detail::__assoc_legendre_p(__l, __m, __x); } + + + + + + + inline long double + assoc_legendrel(unsigned int __l, unsigned int __m, long double __x) + { return __detail::__assoc_legendre_p(__l, __m, __x); } +# 296 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__assoc_legendre_p<__type>(__l, __m, __x); + } +# 311 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + betaf(float __a, float __b) + { return __detail::__beta(__a, __b); } + + + + + + + + inline long double + betal(long double __a, long double __b) + { return __detail::__beta(__a, __b); } +# 341 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type + beta(_Tpa __a, _Tpb __b) + { + typedef typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type __type; + return __detail::__beta<__type>(__a, __b); + } +# 357 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + comp_ellint_1f(float __k) + { return __detail::__comp_ellint_1(__k); } + + + + + + + + inline long double + comp_ellint_1l(long double __k) + { return __detail::__comp_ellint_1(__k); } +# 389 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + comp_ellint_1(_Tp __k) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__comp_ellint_1<__type>(__k); + } +# 405 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + comp_ellint_2f(float __k) + { return __detail::__comp_ellint_2(__k); } + + + + + + + + inline long double + comp_ellint_2l(long double __k) + { return __detail::__comp_ellint_2(__k); } +# 436 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + comp_ellint_2(_Tp __k) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__comp_ellint_2<__type>(__k); + } +# 452 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + comp_ellint_3f(float __k, float __nu) + { return __detail::__comp_ellint_3(__k, __nu); } + + + + + + + + inline long double + comp_ellint_3l(long double __k, long double __nu) + { return __detail::__comp_ellint_3(__k, __nu); } +# 487 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type + comp_ellint_3(_Tp __k, _Tpn __nu) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type; + return __detail::__comp_ellint_3<__type>(__k, __nu); + } +# 503 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + cyl_bessel_if(float __nu, float __x) + { return __detail::__cyl_bessel_i(__nu, __x); } + + + + + + + + inline long double + cyl_bessel_il(long double __nu, long double __x) + { return __detail::__cyl_bessel_i(__nu, __x); } +# 533 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type + cyl_bessel_i(_Tpnu __nu, _Tp __x) + { + typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; + return __detail::__cyl_bessel_i<__type>(__nu, __x); + } +# 549 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + cyl_bessel_jf(float __nu, float __x) + { return __detail::__cyl_bessel_j(__nu, __x); } + + + + + + + + inline long double + cyl_bessel_jl(long double __nu, long double __x) + { return __detail::__cyl_bessel_j(__nu, __x); } +# 579 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type + cyl_bessel_j(_Tpnu __nu, _Tp __x) + { + typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; + return __detail::__cyl_bessel_j<__type>(__nu, __x); + } +# 595 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + cyl_bessel_kf(float __nu, float __x) + { return __detail::__cyl_bessel_k(__nu, __x); } + + + + + + + + inline long double + cyl_bessel_kl(long double __nu, long double __x) + { return __detail::__cyl_bessel_k(__nu, __x); } +# 631 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type + cyl_bessel_k(_Tpnu __nu, _Tp __x) + { + typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; + return __detail::__cyl_bessel_k<__type>(__nu, __x); + } +# 647 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + cyl_neumannf(float __nu, float __x) + { return __detail::__cyl_neumann_n(__nu, __x); } + + + + + + + + inline long double + cyl_neumannl(long double __nu, long double __x) + { return __detail::__cyl_neumann_n(__nu, __x); } +# 679 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type + cyl_neumann(_Tpnu __nu, _Tp __x) + { + typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; + return __detail::__cyl_neumann_n<__type>(__nu, __x); + } +# 695 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + ellint_1f(float __k, float __phi) + { return __detail::__ellint_1(__k, __phi); } + + + + + + + + inline long double + ellint_1l(long double __k, long double __phi) + { return __detail::__ellint_1(__k, __phi); } +# 727 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type + ellint_1(_Tp __k, _Tpp __phi) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type; + return __detail::__ellint_1<__type>(__k, __phi); + } +# 743 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + ellint_2f(float __k, float __phi) + { return __detail::__ellint_2(__k, __phi); } + + + + + + + + inline long double + ellint_2l(long double __k, long double __phi) + { return __detail::__ellint_2(__k, __phi); } +# 775 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type + ellint_2(_Tp __k, _Tpp __phi) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type; + return __detail::__ellint_2<__type>(__k, __phi); + } +# 791 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + ellint_3f(float __k, float __nu, float __phi) + { return __detail::__ellint_3(__k, __nu, __phi); } + + + + + + + + inline long double + ellint_3l(long double __k, long double __nu, long double __phi) + { return __detail::__ellint_3(__k, __nu, __phi); } +# 828 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type + ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi) + { + typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type; + return __detail::__ellint_3<__type>(__k, __nu, __phi); + } +# 843 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + expintf(float __x) + { return __detail::__expint(__x); } + + + + + + + + inline long double + expintl(long double __x) + { return __detail::__expint(__x); } +# 868 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + expint(_Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__expint<__type>(__x); + } +# 884 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + hermitef(unsigned int __n, float __x) + { return __detail::__poly_hermite(__n, __x); } + + + + + + + + inline long double + hermitel(unsigned int __n, long double __x) + { return __detail::__poly_hermite(__n, __x); } +# 916 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + hermite(unsigned int __n, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__poly_hermite<__type>(__n, __x); + } +# 932 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + laguerref(unsigned int __n, float __x) + { return __detail::__laguerre(__n, __x); } + + + + + + + + inline long double + laguerrel(unsigned int __n, long double __x) + { return __detail::__laguerre(__n, __x); } +# 960 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + laguerre(unsigned int __n, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__laguerre<__type>(__n, __x); + } +# 976 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + legendref(unsigned int __l, float __x) + { return __detail::__poly_legendre_p(__l, __x); } + + + + + + + + inline long double + legendrel(unsigned int __l, long double __x) + { return __detail::__poly_legendre_p(__l, __x); } +# 1005 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + legendre(unsigned int __l, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__poly_legendre_p<__type>(__l, __x); + } +# 1021 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + riemann_zetaf(float __s) + { return __detail::__riemann_zeta(__s); } + + + + + + + + inline long double + riemann_zetal(long double __s) + { return __detail::__riemann_zeta(__s); } +# 1056 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + riemann_zeta(_Tp __s) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__riemann_zeta<__type>(__s); + } +# 1072 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + sph_besself(unsigned int __n, float __x) + { return __detail::__sph_bessel(__n, __x); } + + + + + + + + inline long double + sph_bessell(unsigned int __n, long double __x) + { return __detail::__sph_bessel(__n, __x); } +# 1100 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + sph_bessel(unsigned int __n, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__sph_bessel<__type>(__n, __x); + } +# 1116 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + sph_legendref(unsigned int __l, unsigned int __m, float __theta) + { return __detail::__sph_legendre(__l, __m, __theta); } +# 1127 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline long double + sph_legendrel(unsigned int __l, unsigned int __m, long double __theta) + { return __detail::__sph_legendre(__l, __m, __theta); } +# 1147 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__sph_legendre<__type>(__l, __m, __theta); + } +# 1163 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + sph_neumannf(unsigned int __n, float __x) + { return __detail::__sph_neumann(__n, __x); } + + + + + + + + inline long double + sph_neumannl(unsigned int __n, long double __x) + { return __detail::__sph_neumann(__n, __x); } +# 1191 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + sph_neumann(unsigned int __n, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__sph_neumann<__type>(__n, __x); + } + + + + +} +# 1388 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 +#pragma GCC visibility pop +# 1928 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 + + +} +# 13 "../../module/sf.cxx" 2 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 1 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 3 + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 1 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 +# 69 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 1 3 +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 +namespace std +{ + + + namespace rel_ops + { +# 85 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 + template + inline bool + operator!=(const _Tp& __x, const _Tp& __y) + { return !(__x == __y); } +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 + template + inline bool + operator>(const _Tp& __x, const _Tp& __y) + { return __y < __x; } +# 111 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 + template + inline bool + operator<=(const _Tp& __x, const _Tp& __y) + { return !(__y < __x); } +# 124 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 + template + inline bool + operator>=(const _Tp& __x, const _Tp& __y) + { return !(__x < __y); } + } + + +} +# 70 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 2 3 + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/initializer_list" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/initializer_list" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/initializer_list" 3 + + + + + +#pragma GCC visibility push(default) + + + +namespace std +{ + + template + class initializer_list + { + public: + typedef _E value_type; + typedef const _E& reference; + typedef const _E& const_reference; + typedef size_t size_type; + typedef const _E* iterator; + typedef const _E* const_iterator; + + private: + iterator _M_array; + size_type _M_len; + + + constexpr initializer_list(const_iterator __a, size_type __l) + : _M_array(__a), _M_len(__l) { } + + public: + constexpr initializer_list() noexcept + : _M_array(0), _M_len(0) { } + + + constexpr size_type + size() const noexcept { return _M_len; } + + + constexpr const_iterator + begin() const noexcept { return _M_array; } + + + constexpr const_iterator + end() const noexcept { return begin() + size(); } + }; + + + + + + + + template + constexpr const _Tp* + begin(initializer_list<_Tp> __ils) noexcept + { return __ils.begin(); } + + + + + + + + template + constexpr const _Tp* + end(initializer_list<_Tp> __ils) noexcept + { return __ils.end(); } +} + +#pragma GCC visibility pop +# 77 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 2 3 + + + + + +namespace std +{ + + + + template + struct tuple_size; + + + + + + template::type, + typename = typename enable_if::value>::type, + size_t = tuple_size<_Tp>::value> + using __enable_if_has_tuple_size = _Tp; + + template + struct tuple_size> + : public tuple_size<_Tp> { }; + + template + struct tuple_size> + : public tuple_size<_Tp> { }; + + template + struct tuple_size> + : public tuple_size<_Tp> { }; + + + template + struct tuple_element; + + + template + using __tuple_element_t = typename tuple_element<__i, _Tp>::type; + + template + struct tuple_element<__i, const _Tp> + { + typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; + }; + + template + struct tuple_element<__i, volatile _Tp> + { + typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; + }; + + template + struct tuple_element<__i, const volatile _Tp> + { + typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; + }; + + + + + + + + template + using tuple_element_t = typename tuple_element<__i, _Tp>::type; + + + + + + template + struct __is_tuple_like_impl> : true_type + { }; + + + template + struct tuple_size> + : public integral_constant { }; + + + template + struct tuple_element<0, pair<_Tp1, _Tp2>> + { typedef _Tp1 type; }; + + + template + struct tuple_element<1, pair<_Tp1, _Tp2>> + { typedef _Tp2 type; }; + + template + struct __pair_get; + + template<> + struct __pair_get<0> + { + template + static constexpr _Tp1& + __get(pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.first; } + + template + static constexpr _Tp1&& + __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward<_Tp1>(__pair.first); } + + template + static constexpr const _Tp1& + __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.first; } + + template + static constexpr const _Tp1&& + __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward(__pair.first); } + }; + + template<> + struct __pair_get<1> + { + template + static constexpr _Tp2& + __get(pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.second; } + + template + static constexpr _Tp2&& + __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward<_Tp2>(__pair.second); } + + template + static constexpr const _Tp2& + __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.second; } + + template + static constexpr const _Tp2&& + __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward(__pair.second); } + }; + + template + constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& + get(pair<_Tp1, _Tp2>& __in) noexcept + { return __pair_get<_Int>::__get(__in); } + + template + constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& + get(pair<_Tp1, _Tp2>&& __in) noexcept + { return __pair_get<_Int>::__move_get(std::move(__in)); } + + template + constexpr const typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& + get(const pair<_Tp1, _Tp2>& __in) noexcept + { return __pair_get<_Int>::__const_get(__in); } + + template + constexpr const typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& + get(const pair<_Tp1, _Tp2>&& __in) noexcept + { return __pair_get<_Int>::__const_move_get(std::move(__in)); } + + + + + + template + constexpr _Tp& + get(pair<_Tp, _Up>& __p) noexcept + { return __p.first; } + + template + constexpr const _Tp& + get(const pair<_Tp, _Up>& __p) noexcept + { return __p.first; } + + template + constexpr _Tp&& + get(pair<_Tp, _Up>&& __p) noexcept + { return std::move(__p.first); } + + template + constexpr const _Tp&& + get(const pair<_Tp, _Up>&& __p) noexcept + { return std::move(__p.first); } + + template + constexpr _Tp& + get(pair<_Up, _Tp>& __p) noexcept + { return __p.second; } + + template + constexpr const _Tp& + get(const pair<_Up, _Tp>& __p) noexcept + { return __p.second; } + + template + constexpr _Tp&& + get(pair<_Up, _Tp>&& __p) noexcept + { return std::move(__p.second); } + + template + constexpr const _Tp&& + get(const pair<_Up, _Tp>&& __p) noexcept + { return std::move(__p.second); } + + + + + template + constexpr + inline _Tp + exchange(_Tp& __obj, _Up&& __new_val) + { return std::__exchange(__obj, std::forward<_Up>(__new_val)); } + + + + + + template struct _Index_tuple { }; + + + template + struct _Build_index_tuple + { +# 312 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 + using __type = _Index_tuple<__integer_pack(_Num)...>; + + }; + + + + + + + template + struct integer_sequence + { + typedef _Tp value_type; + static constexpr size_t size() noexcept { return sizeof...(_Idx); } + }; + + + template + using make_integer_sequence + + + + = integer_sequence<_Tp, __integer_pack(_Num)...>; + + + + template + using index_sequence = integer_sequence; + + + template + using make_index_sequence = make_integer_sequence; + + + template + using index_sequence_for = make_index_sequence; + + + + + struct in_place_t { + explicit in_place_t() = default; + }; + + inline constexpr in_place_t in_place{}; + + template struct in_place_type_t + { + explicit in_place_type_t() = default; + }; + + template + inline constexpr in_place_type_t<_Tp> in_place_type{}; + + template struct in_place_index_t + { + explicit in_place_index_t() = default; + }; + + template + inline constexpr in_place_index_t<_Idx> in_place_index{}; + + template + struct __is_in_place_type_impl : false_type + { }; + + template + struct __is_in_place_type_impl> : true_type + { }; + + template + struct __is_in_place_type + : public __is_in_place_type_impl<_Tp> + { }; + + + template + [[nodiscard]] + constexpr add_const_t<_Tp>& + as_const(_Tp& __t) noexcept + { return __t; } + + template + void as_const(const _Tp&&) = delete; + + + + + template + constexpr bool + cmp_equal(_Tp __t, _Up __u) noexcept + { + static_assert(__is_standard_integer<_Tp>::value); + static_assert(__is_standard_integer<_Up>::value); + + if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>) + return __t == __u; + else if constexpr (is_signed_v<_Tp>) + return __t >= 0 && make_unsigned_t<_Tp>(__t) == __u; + else + return __u >= 0 && __t == make_unsigned_t<_Up>(__u); + } + + template + constexpr bool + cmp_not_equal(_Tp __t, _Up __u) noexcept + { return !std::cmp_equal(__t, __u); } + + template + constexpr bool + cmp_less(_Tp __t, _Up __u) noexcept + { + static_assert(__is_standard_integer<_Tp>::value); + static_assert(__is_standard_integer<_Up>::value); + + if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>) + return __t < __u; + else if constexpr (is_signed_v<_Tp>) + return __t < 0 || make_unsigned_t<_Tp>(__t) < __u; + else + return __u >= 0 && __t < make_unsigned_t<_Up>(__u); + } + + template + constexpr bool + cmp_greater(_Tp __t, _Up __u) noexcept + { return std::cmp_less(__u, __t); } + + template + constexpr bool + cmp_less_equal(_Tp __t, _Up __u) noexcept + { return !std::cmp_less(__u, __t); } + + template + constexpr bool + cmp_greater_equal(_Tp __t, _Up __u) noexcept + { return !std::cmp_less(__t, __u); } + + template + constexpr bool + in_range(_Tp __t) noexcept + { + static_assert(__is_standard_integer<_Up>::value); + static_assert(__is_standard_integer<_Tp>::value); + using __gnu_cxx::__int_traits; + + if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>) + return __int_traits<_Up>::__min <= __t + && __t <= __int_traits<_Up>::__max; + else if constexpr (is_signed_v<_Tp>) + return __t >= 0 + && make_unsigned_t<_Tp>(__t) <= __int_traits<_Up>::__max; + else + return __t <= make_unsigned_t<_Up>(__int_traits<_Up>::__max); + } +# 480 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 + +} +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 1 3 +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +# 121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +extern "C++" +{ +namespace std +{ + + + using ::div_t; + using ::ldiv_t; + + using ::abort; + + + + using ::atexit; + + + + + + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + + using ::qsort; + + + + + + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + + using ::wcstombs; + using ::wctomb; + + + + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } + + + + +} +# 195 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +namespace __gnu_cxx +{ + + + + using ::lldiv_t; + + + + + + using ::_Exit; + + + + using ::llabs; + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + using ::lldiv; +# 227 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 + using ::atoll; + using ::strtoll; + using ::strtoull; + + using ::strtof; + using ::strtold; + + +} + +namespace std +{ + + using ::__gnu_cxx::lldiv_t; + + using ::__gnu_cxx::_Exit; + + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; +} + + + +} +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 +namespace std +{ + +# 199 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 + template + constexpr + bool + all_of(_IIter, _IIter, _Predicate); + + template + constexpr + bool + any_of(_IIter, _IIter, _Predicate); + + + template + constexpr + bool + binary_search(_FIter, _FIter, const _Tp&); + + template + constexpr + bool + binary_search(_FIter, _FIter, const _Tp&, _Compare); + + + template + constexpr + const _Tp& + clamp(const _Tp&, const _Tp&, const _Tp&); + + template + constexpr + const _Tp& + clamp(const _Tp&, const _Tp&, const _Tp&, _Compare); + + + template + constexpr + _OIter + copy(_IIter, _IIter, _OIter); + + template + constexpr + _BIter2 + copy_backward(_BIter1, _BIter1, _BIter2); + + + template + constexpr + _OIter + copy_if(_IIter, _IIter, _OIter, _Predicate); + + template + constexpr + _OIter + copy_n(_IIter, _Size, _OIter); + + + + + + template + constexpr + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&); + + template + constexpr + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&, _Compare); + + template + constexpr + void + fill(_FIter, _FIter, const _Tp&); + + template + constexpr + _OIter + fill_n(_OIter, _Size, const _Tp&); + + + + template + constexpr + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2); + + template + constexpr + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + + + + + template + constexpr + _IIter + find_if_not(_IIter, _IIter, _Predicate); + + + + + + + template + constexpr + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2); + + template + constexpr + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + + template + void + inplace_merge(_BIter, _BIter, _BIter); + + template + void + inplace_merge(_BIter, _BIter, _BIter, _Compare); + + + template + constexpr + bool + is_heap(_RAIter, _RAIter); + + template + constexpr + bool + is_heap(_RAIter, _RAIter, _Compare); + + template + constexpr + _RAIter + is_heap_until(_RAIter, _RAIter); + + template + constexpr + _RAIter + is_heap_until(_RAIter, _RAIter, _Compare); + + template + constexpr + bool + is_partitioned(_IIter, _IIter, _Predicate); + + template + constexpr + bool + is_permutation(_FIter1, _FIter1, _FIter2); + + template + constexpr + bool + is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); + + template + constexpr + bool + is_sorted(_FIter, _FIter); + + template + constexpr + bool + is_sorted(_FIter, _FIter, _Compare); + + template + constexpr + _FIter + is_sorted_until(_FIter, _FIter); + + template + constexpr + _FIter + is_sorted_until(_FIter, _FIter, _Compare); + + + template + constexpr + void + iter_swap(_FIter1, _FIter2); + + template + constexpr + _FIter + lower_bound(_FIter, _FIter, const _Tp&); + + template + constexpr + _FIter + lower_bound(_FIter, _FIter, const _Tp&, _Compare); + + template + constexpr + void + make_heap(_RAIter, _RAIter); + + template + constexpr + void + make_heap(_RAIter, _RAIter, _Compare); + + template + constexpr + const _Tp& + max(const _Tp&, const _Tp&); + + template + constexpr + const _Tp& + max(const _Tp&, const _Tp&, _Compare); + + + + + template + constexpr + const _Tp& + min(const _Tp&, const _Tp&); + + template + constexpr + const _Tp& + min(const _Tp&, const _Tp&, _Compare); + + + + + template + constexpr + pair + minmax(const _Tp&, const _Tp&); + + template + constexpr + pair + minmax(const _Tp&, const _Tp&, _Compare); + + template + constexpr + pair<_FIter, _FIter> + minmax_element(_FIter, _FIter); + + template + constexpr + pair<_FIter, _FIter> + minmax_element(_FIter, _FIter, _Compare); + + template + constexpr + _Tp + min(initializer_list<_Tp>); + + template + constexpr + _Tp + min(initializer_list<_Tp>, _Compare); + + template + constexpr + _Tp + max(initializer_list<_Tp>); + + template + constexpr + _Tp + max(initializer_list<_Tp>, _Compare); + + template + constexpr + pair<_Tp, _Tp> + minmax(initializer_list<_Tp>); + + template + constexpr + pair<_Tp, _Tp> + minmax(initializer_list<_Tp>, _Compare); + + + + + template + constexpr + bool + next_permutation(_BIter, _BIter); + + template + constexpr + bool + next_permutation(_BIter, _BIter, _Compare); + + + template + constexpr + bool + none_of(_IIter, _IIter, _Predicate); + + + + + + template + constexpr + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); + + template + constexpr + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); + + + + + template + constexpr + pair<_OIter1, _OIter2> + partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); + + template + constexpr + _FIter + partition_point(_FIter, _FIter, _Predicate); + + + template + constexpr + void + pop_heap(_RAIter, _RAIter); + + template + constexpr + void + pop_heap(_RAIter, _RAIter, _Compare); + + template + constexpr + bool + prev_permutation(_BIter, _BIter); + + template + constexpr + bool + prev_permutation(_BIter, _BIter, _Compare); + + template + constexpr + void + push_heap(_RAIter, _RAIter); + + template + constexpr + void + push_heap(_RAIter, _RAIter, _Compare); + + + + template + constexpr + _FIter + remove(_FIter, _FIter, const _Tp&); + + template + constexpr + _FIter + remove_if(_FIter, _FIter, _Predicate); + + template + constexpr + _OIter + remove_copy(_IIter, _IIter, _OIter, const _Tp&); + + template + constexpr + _OIter + remove_copy_if(_IIter, _IIter, _OIter, _Predicate); + + + + template + constexpr + _OIter + replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); + + template + constexpr + _OIter + replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); + + + + template + constexpr + void + reverse(_BIter, _BIter); + + template + constexpr + _OIter + reverse_copy(_BIter, _BIter, _OIter); + + inline namespace _V2 + { + template + constexpr + _FIter + rotate(_FIter, _FIter, _FIter); + } + + template + constexpr + _OIter + rotate_copy(_FIter, _FIter, _FIter, _OIter); +# 625 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 + template + void + shuffle(_RAIter, _RAIter, _UGenerator&&); + + + template + constexpr + void + sort_heap(_RAIter, _RAIter); + + template + constexpr + void + sort_heap(_RAIter, _RAIter, _Compare); + + template + _BIter + stable_partition(_BIter, _BIter, _Predicate); +# 658 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 + template + constexpr + _FIter2 + swap_ranges(_FIter1, _FIter1, _FIter2); + + + + template + constexpr + _FIter + unique(_FIter, _FIter); + + template + constexpr + _FIter + unique(_FIter, _FIter, _BinaryPredicate); + + + + template + constexpr + _FIter + upper_bound(_FIter, _FIter, const _Tp&); + + template + constexpr + _FIter + upper_bound(_FIter, _FIter, const _Tp&, _Compare); + + + + template + constexpr + _FIter + adjacent_find(_FIter, _FIter); + + template + constexpr + _FIter + adjacent_find(_FIter, _FIter, _BinaryPredicate); + + template + constexpr + typename iterator_traits<_IIter>::difference_type + count(_IIter, _IIter, const _Tp&); + + template + constexpr + typename iterator_traits<_IIter>::difference_type + count_if(_IIter, _IIter, _Predicate); + + template + constexpr + bool + equal(_IIter1, _IIter1, _IIter2); + + template + constexpr + bool + equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + + template + constexpr + _IIter + find(_IIter, _IIter, const _Tp&); + + template + constexpr + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); + + template + constexpr + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + template + constexpr + _IIter + find_if(_IIter, _IIter, _Predicate); + + template + constexpr + _Funct + for_each(_IIter, _IIter, _Funct); + + template + constexpr + void + generate(_FIter, _FIter, _Generator); + + template + constexpr + _OIter + generate_n(_OIter, _Size, _Generator); + + template + constexpr + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); + + template + constexpr + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + + template + constexpr + _FIter + max_element(_FIter, _FIter); + + template + constexpr + _FIter + max_element(_FIter, _FIter, _Compare); + + template + constexpr + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + constexpr + _FIter + min_element(_FIter, _FIter); + + template + constexpr + _FIter + min_element(_FIter, _FIter, _Compare); + + template + constexpr + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2); + + template + constexpr + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + + template + constexpr + void + nth_element(_RAIter, _RAIter, _RAIter); + + template + constexpr + void + nth_element(_RAIter, _RAIter, _RAIter, _Compare); + + template + constexpr + void + partial_sort(_RAIter, _RAIter, _RAIter); + + template + constexpr + void + partial_sort(_RAIter, _RAIter, _RAIter, _Compare); + + template + constexpr + _BIter + partition(_BIter, _BIter, _Predicate); + + template + void + random_shuffle(_RAIter, _RAIter); + + template + void + random_shuffle(_RAIter, _RAIter, + + _Generator&&); + + + + + template + constexpr + void + replace(_FIter, _FIter, const _Tp&, const _Tp&); + + template + constexpr + void + replace_if(_FIter, _FIter, _Predicate, const _Tp&); + + template + constexpr + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2); + + template + constexpr + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + template + constexpr + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&); + + template + constexpr + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); + + template + constexpr + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + constexpr + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + constexpr + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + _OIter, _Compare); + + template + constexpr + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + constexpr + void + sort(_RAIter, _RAIter); + + template + constexpr + void + sort(_RAIter, _RAIter, _Compare); + + template + void + stable_sort(_RAIter, _RAIter); + + template + void + stable_sort(_RAIter, _RAIter, _Compare); + + template + constexpr + _OIter + transform(_IIter, _IIter, _OIter, _UnaryOperation); + + template + constexpr + _OIter + transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); + + template + constexpr + _OIter + unique_copy(_IIter, _IIter, _OIter); + + template + constexpr + _OIter + unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); + + + +} +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 +namespace std +{ + + + + + + + + template + constexpr + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n, + _Compare& __comp) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__comp(__first + __parent, __first + __child)) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + + + + template + constexpr + inline bool + __is_heap(_RandomAccessIterator __first, _Distance __n) + { + __gnu_cxx::__ops::_Iter_less_iter __comp; + return std::__is_heap_until(__first, __n, __comp) == __n; + } + + template + constexpr + inline bool + __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) + { + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + return std::__is_heap_until(__first, __n, __cmp) == __n; + } + + template + constexpr + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::__is_heap(__first, std::distance(__first, __last)); } + + template + constexpr + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + return std::__is_heap(__first, std::move(__comp), + std::distance(__first, __last)); + } + + + + + template + constexpr + void + __push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value, + _Compare& __comp) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) + { + *(__first + __holeIndex) = std::move(*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = std::move(__value); + } +# 158 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + ; + ; + + __gnu_cxx::__ops::_Iter_less_val __comp; + _ValueType __value = std::move(*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), std::move(__value), __comp); + } +# 194 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + ; + ; + + __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) + __cmp(std::move(__comp)); + _ValueType __value = std::move(*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), std::move(__value), __cmp); + } + + template + constexpr + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (__comp(__first + __secondChild, + __first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = std::move(*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) + __cmp(std::move(__comp)); + std::__push_heap(__first, __holeIndex, __topIndex, + std::move(__value), __cmp); + } + + template + constexpr + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Compare& __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + _ValueType __value = std::move(*__result); + *__result = std::move(*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + std::move(__value), __comp); + } +# 279 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + ; + ; + + if (__last - __first > 1) + { + --__last; + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__pop_heap(__first, __last, __last, __comp); + } + } +# 313 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + + + + ; + ; + ; + ; + + if (__last - __first > 1) + { + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + --__last; + std::__pop_heap(__first, __last, __last, __cmp); + } + } + + template + constexpr + void + __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare& __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + if (__last - __first < 2) + return; + + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = std::move(*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, std::move(__value), + __comp); + if (__parent == 0) + return; + __parent--; + } + } +# 371 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__make_heap(__first, __last, __comp); + } +# 398 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + std::__make_heap(__first, __last, __cmp); + } + + template + constexpr + void + __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare& __comp) + { + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + } +# 436 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + ; + + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__sort_heap(__first, __last, __comp); + } +# 464 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + ; + + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + std::__sort_heap(__first, __last, __cmp); + } +# 493 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline _RandomAccessIterator + is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + __gnu_cxx::__ops::_Iter_less_iter __comp; + return __first + + std::__is_heap_until(__first, std::distance(__first, __last), __comp); + } +# 522 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline _RandomAccessIterator + is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + return __first + + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); + } +# 547 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline bool + is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::is_heap_until(__first, __last) == __last; } +# 561 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline bool + is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + const auto __dist = std::distance(__first, __last); + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + return std::__is_heap_until(__first, __dist, __cmp) == __dist; + } + + + +} +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 1 3 +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_construct.h" 1 3 +# 73 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_construct.h" 3 +namespace std +{ + + + + template + constexpr inline void + destroy_at(_Tp* __location) + { + if constexpr (202002L > 201703L && is_array_v<_Tp>) + { + for (auto& __x : *__location) + std::destroy_at(std::__addressof(__x)); + } + else + __location->~_Tp(); + } + + + template + constexpr auto + construct_at(_Tp* __location, _Args&&... __args) + noexcept(noexcept(::new((void*)0) _Tp(std::declval<_Args>()...))) + -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...)) + { return ::new((void*)__location) _Tp(std::forward<_Args>(__args)...); } +# 106 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_construct.h" 3 + template + inline void + _Construct(_Tp* __p, _Args&&... __args) + { ::new(static_cast(__p)) _Tp(std::forward<_Args>(__args)...); } +# 121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_construct.h" 3 + template + inline void + _Construct_novalue(_T1* __p) + { ::new(static_cast(__p)) _T1; } + + template + constexpr void + _Destroy(_ForwardIterator __first, _ForwardIterator __last); + + + + + template + constexpr inline void + _Destroy(_Tp* __pointer) + { + + std::destroy_at(__pointer); + + + + } + + template + struct _Destroy_aux + { + template + static constexpr void + __destroy(_ForwardIterator __first, _ForwardIterator __last) + { + for (; __first != __last; ++__first) + std::_Destroy(std::__addressof(*__first)); + } + }; + + template<> + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator, _ForwardIterator) { } + }; + + + + + + + template + constexpr inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + + + static_assert(is_destructible<_Value_type>::value, + "value type is destructible"); + + + if (std::is_constant_evaluated()) + return _Destroy_aux::__destroy(__first, __last); + + std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: + __destroy(__first, __last); + } + + template + struct _Destroy_n_aux + { + template + static constexpr _ForwardIterator + __destroy_n(_ForwardIterator __first, _Size __count) + { + for (; __count > 0; (void)++__first, --__count) + std::_Destroy(std::__addressof(*__first)); + return __first; + } + }; + + template<> + struct _Destroy_n_aux + { + template + static _ForwardIterator + __destroy_n(_ForwardIterator __first, _Size __count) + { + std::advance(__first, __count); + return __first; + } + }; + + + + + + + template + constexpr inline _ForwardIterator + _Destroy_n(_ForwardIterator __first, _Size __count) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + + + static_assert(is_destructible<_Value_type>::value, + "value type is destructible"); + + + if (std::is_constant_evaluated()) + return _Destroy_n_aux::__destroy_n(__first, __count); + + return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: + __destroy_n(__first, __count); + } + + + template + constexpr inline void + destroy(_ForwardIterator __first, _ForwardIterator __last) + { + std::_Destroy(__first, __last); + } + + template + constexpr inline _ForwardIterator + destroy_n(_ForwardIterator __first, _Size __count) + { + return std::_Destroy_n(__first, __count); + } + + + +} +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 2 3 + +namespace std +{ + + + namespace __detail + { + template + inline void + __return_temporary_buffer(_Tp* __p, + size_t __len __attribute__((__unused__))) + { + + ::operator delete(__p, __len * sizeof(_Tp)); + + + + } + } +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 3 + template + pair<_Tp*, ptrdiff_t> + get_temporary_buffer(ptrdiff_t __len) noexcept + { + const ptrdiff_t __max = + __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + if (__len > __max) + __len = __max; + + while (__len > 0) + { + _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), + std::nothrow)); + if (__tmp != 0) + return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len = __len == 1 ? 0 : ((__len + 1) / 2); + } + return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); + } +# 125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 3 + template + inline void + return_temporary_buffer(_Tp* __p) + { ::operator delete(__p); } + + + + + + + template + class _Temporary_buffer + { + + + + public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef pointer iterator; + typedef ptrdiff_t size_type; + + protected: + size_type _M_original_len; + size_type _M_len; + pointer _M_buffer; + + public: + + size_type + size() const + { return _M_len; } + + + size_type + requested_size() const + { return _M_original_len; } + + + iterator + begin() + { return _M_buffer; } + + + iterator + end() + { return _M_buffer + _M_len; } + + + + + + _Temporary_buffer(_ForwardIterator __seed, size_type __original_len); + + ~_Temporary_buffer() + { + std::_Destroy(_M_buffer, _M_buffer + _M_len); + std::__detail::__return_temporary_buffer(_M_buffer, _M_len); + } + + private: + + _Temporary_buffer(const _Temporary_buffer&); + + void + operator=(const _Temporary_buffer&); + }; + + + template + struct __uninitialized_construct_buf_dispatch + { + template + static void + __ucr(_Pointer __first, _Pointer __last, + _ForwardIterator __seed) + { + if (__first == __last) + return; + + _Pointer __cur = __first; + try + { + std::_Construct(std::__addressof(*__first), + std::move(*__seed)); + _Pointer __prev = __cur; + ++__cur; + for(; __cur != __last; ++__cur, ++__prev) + std::_Construct(std::__addressof(*__cur), + std::move(*__prev)); + *__seed = std::move(*__prev); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_construct_buf_dispatch + { + template + static void + __ucr(_Pointer, _Pointer, _ForwardIterator) { } + }; +# 243 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 3 + template + inline void + __uninitialized_construct_buf(_Pointer __first, _Pointer __last, + _ForwardIterator __seed) + { + typedef typename std::iterator_traits<_Pointer>::value_type + _ValueType; + + std::__uninitialized_construct_buf_dispatch< + __has_trivial_constructor(_ValueType)>:: + __ucr(__first, __last, __seed); + } + + template + _Temporary_buffer<_ForwardIterator, _Tp>:: + _Temporary_buffer(_ForwardIterator __seed, size_type __original_len) + : _M_original_len(__original_len), _M_len(0), _M_buffer(0) + { + std::pair __p( + std::get_temporary_buffer(_M_original_len)); + + if (__p.first) + { + try + { + std::__uninitialized_construct_buf(__p.first, __p.first + __p.second, + __seed); + _M_buffer = __p.first; + _M_len = __p.second; + } + catch(...) + { + std::__detail::__return_temporary_buffer(__p.first, __p.second); + throw; + } + } + } + + +} +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uniform_int_dist.h" 1 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uniform_int_dist.h" 3 +namespace std +{ + + + + + template + concept uniform_random_bit_generator + = invocable<_Gen&> && unsigned_integral> + && requires + { + { _Gen::min() } -> same_as>; + { _Gen::max() } -> same_as>; + requires bool_constant<(_Gen::min() < _Gen::max())>::value; + }; + + + namespace __detail + { + + + + template + constexpr bool + _Power_of_2(_Tp __x) + { + return ((__x - 1) & __x) == 0; + } + } + + + + + + + template + class uniform_int_distribution + { + static_assert(std::is_integral<_IntType>::value, + "template argument must be an integral type"); + + public: + + typedef _IntType result_type; + + struct param_type + { + typedef uniform_int_distribution<_IntType> distribution_type; + + param_type() : param_type(0) { } + + explicit + param_type(_IntType __a, + _IntType __b = __gnu_cxx::__int_traits<_IntType>::__max) + : _M_a(__a), _M_b(__b) + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_a <= _M_b)) __builtin_unreachable(); } while (false); + } + + result_type + a() const + { return _M_a; } + + result_type + b() const + { return _M_b; } + + friend bool + operator==(const param_type& __p1, const param_type& __p2) + { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + + private: + _IntType _M_a; + _IntType _M_b; + }; + + public: + + + + uniform_int_distribution() : uniform_int_distribution(0) { } + + + + + explicit + uniform_int_distribution(_IntType __a, + _IntType __b + = __gnu_cxx::__int_traits<_IntType>::__max) + : _M_param(__a, __b) + { } + + explicit + uniform_int_distribution(const param_type& __p) + : _M_param(__p) + { } + + + + + + + void + reset() { } + + result_type + a() const + { return _M_param.a(); } + + result_type + b() const + { return _M_param.b(); } + + + + + param_type + param() const + { return _M_param; } + + + + + + void + param(const param_type& __param) + { _M_param = __param; } + + + + + result_type + min() const + { return this->a(); } + + + + + result_type + max() const + { return this->b(); } + + + + + template + result_type + operator()(_UniformRandomBitGenerator& __urng) + { return this->operator()(__urng, _M_param); } + + template + result_type + operator()(_UniformRandomBitGenerator& __urng, + const param_type& __p); + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomBitGenerator& __urng) + { this->__generate(__f, __t, __urng, _M_param); } + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomBitGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + template + void + __generate(result_type* __f, result_type* __t, + _UniformRandomBitGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + + + + + friend bool + operator==(const uniform_int_distribution& __d1, + const uniform_int_distribution& __d2) + { return __d1._M_param == __d2._M_param; } + + private: + template + void + __generate_impl(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomBitGenerator& __urng, + const param_type& __p); + + param_type _M_param; + + + + + template + static _Up + _S_nd(_Urbg& __g, _Up __range) + { + using _Up_traits = __gnu_cxx::__int_traits<_Up>; + using _Wp_traits = __gnu_cxx::__int_traits<_Wp>; + static_assert(!_Up_traits::__is_signed, "U must be unsigned"); + static_assert(!_Wp_traits::__is_signed, "W must be unsigned"); + static_assert(_Wp_traits::__digits == (2 * _Up_traits::__digits), + "W must be twice as wide as U"); + + + + + _Wp __product = _Wp(__g()) * _Wp(__range); + _Up __low = _Up(__product); + if (__low < __range) + { + _Up __threshold = -__range % __range; + while (__low < __threshold) + { + __product = _Wp(__g()) * _Wp(__range); + __low = _Up(__product); + } + } + return __product >> _Up_traits::__digits; + } + }; + + template + template + typename uniform_int_distribution<_IntType>::result_type + uniform_int_distribution<_IntType>:: + operator()(_UniformRandomBitGenerator& __urng, + const param_type& __param) + { + typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; + typedef typename make_unsigned::type __utype; + typedef typename common_type<_Gresult_type, __utype>::type __uctype; + + constexpr __uctype __urngmin = _UniformRandomBitGenerator::min(); + constexpr __uctype __urngmax = _UniformRandomBitGenerator::max(); + static_assert( __urngmin < __urngmax, + "Uniform random bit generator must define min() < max()"); + constexpr __uctype __urngrange = __urngmax - __urngmin; + + const __uctype __urange + = __uctype(__param.b()) - __uctype(__param.a()); + + __uctype __ret; + if (__urngrange > __urange) + { + + + const __uctype __uerange = __urange + 1; + + + + if constexpr (__urngrange == 0xffffffffffffffffULL) + { + + + long long unsigned int __u64erange = __uerange; + __ret = _S_nd(__urng, __u64erange); + } + else + + if constexpr (__urngrange == 0xffffffffU) + { + + + unsigned int __u32erange = __uerange; + __ret = _S_nd(__urng, __u32erange); + } + else + + { + + const __uctype __scaling = __urngrange / __uerange; + const __uctype __past = __uerange * __scaling; + do + __ret = __uctype(__urng()) - __urngmin; + while (__ret >= __past); + __ret /= __scaling; + } + } + else if (__urngrange < __urange) + { +# 347 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uniform_int_dist.h" 3 + __uctype __tmp; + do + { + const __uctype __uerngrange = __urngrange + 1; + __tmp = (__uerngrange * operator() + (__urng, param_type(0, __urange / __uerngrange))); + __ret = __tmp + (__uctype(__urng()) - __urngmin); + } + while (__ret > __urange || __ret < __tmp); + } + else + __ret = __uctype(__urng()) - __urngmin; + + return __ret + __param.a(); + } + + + template + template + void + uniform_int_distribution<_IntType>:: + __generate_impl(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomBitGenerator& __urng, + const param_type& __param) + { + + typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; + typedef typename make_unsigned::type __utype; + typedef typename common_type<_Gresult_type, __utype>::type __uctype; + + static_assert( __urng.min() < __urng.max(), + "Uniform random bit generator must define min() < max()"); + + constexpr __uctype __urngmin = __urng.min(); + constexpr __uctype __urngmax = __urng.max(); + constexpr __uctype __urngrange = __urngmax - __urngmin; + const __uctype __urange + = __uctype(__param.b()) - __uctype(__param.a()); + + __uctype __ret; + + if (__urngrange > __urange) + { + if (__detail::_Power_of_2(__urngrange + 1) + && __detail::_Power_of_2(__urange + 1)) + { + while (__f != __t) + { + __ret = __uctype(__urng()) - __urngmin; + *__f++ = (__ret & __urange) + __param.a(); + } + } + else + { + + const __uctype __uerange = __urange + 1; + const __uctype __scaling = __urngrange / __uerange; + const __uctype __past = __uerange * __scaling; + while (__f != __t) + { + do + __ret = __uctype(__urng()) - __urngmin; + while (__ret >= __past); + *__f++ = __ret / __scaling + __param.a(); + } + } + } + else if (__urngrange < __urange) + { +# 432 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uniform_int_dist.h" 3 + __uctype __tmp; + while (__f != __t) + { + do + { + constexpr __uctype __uerngrange = __urngrange + 1; + __tmp = (__uerngrange * operator() + (__urng, param_type(0, __urange / __uerngrange))); + __ret = __tmp + (__uctype(__urng()) - __urngmin); + } + while (__ret > __urange || __ret < __tmp); + *__f++ = __ret; + } + } + else + while (__f != __t) + *__f++ = __uctype(__urng()) - __urngmin + __param.a(); + } + + + + +} +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 + + + + +namespace std +{ + + + + template + constexpr + void + __move_median_to_first(_Iterator __result,_Iterator __a, _Iterator __b, + _Iterator __c, _Compare __comp) + { + if (__comp(__a, __b)) + { + if (__comp(__b, __c)) + std::iter_swap(__result, __b); + else if (__comp(__a, __c)) + std::iter_swap(__result, __c); + else + std::iter_swap(__result, __a); + } + else if (__comp(__a, __c)) + std::iter_swap(__result, __a); + else if (__comp(__b, __c)) + std::iter_swap(__result, __c); + else + std::iter_swap(__result, __b); + } + + + template + constexpr + inline _InputIterator + __find_if_not(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + return std::__find_if(__first, __last, + __gnu_cxx::__ops::__negate(__pred), + std::__iterator_category(__first)); + } + + + + + template + constexpr + _InputIterator + __find_if_not_n(_InputIterator __first, _Distance& __len, _Predicate __pred) + { + for (; __len; --__len, (void) ++__first) + if (!__pred(__first)) + break; + return __first; + } +# 138 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _ForwardIterator1 + __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + return std::__find_if(__first1, __last1, + __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); + + + _ForwardIterator1 __current = __first1; + + for (;;) + { + __first1 = + std::__find_if(__first1, __last1, + __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); + + if (__first1 == __last1) + return __last1; + + _ForwardIterator2 __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + + while (__predicate(__current, __p)) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } + + + + + + + template + constexpr + _ForwardIterator + __search_n_aux(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, _UnaryPredicate __unary_pred, + std::forward_iterator_tag) + { + __first = std::__find_if(__first, __last, __unary_pred); + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && __unary_pred(__i)) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = std::__find_if(++__i, __last, __unary_pred); + } + return __last; + } + + + + + + template + constexpr + _RandomAccessIter + __search_n_aux(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, _UnaryPredicate __unary_pred, + std::random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + + _DistanceType __tailSize = __last - __first; + _DistanceType __remainder = __count; + + while (__remainder <= __tailSize) + { + __first += __remainder; + __tailSize -= __remainder; + + + _RandomAccessIter __backTrack = __first; + while (__unary_pred(--__backTrack)) + { + if (--__remainder == 0) + return (__first - __count); + } + __remainder = __count + 1 - (__first - __backTrack); + } + return __last; + } + + template + constexpr + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, + _UnaryPredicate __unary_pred) + { + if (__count <= 0) + return __first; + + if (__count == 1) + return std::__find_if(__first, __last, __unary_pred); + + return std::__search_n_aux(__first, __last, __count, __unary_pred, + std::__iterator_category(__first)); + } + + + template + constexpr + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag, + _BinaryPredicate __comp) + { + if (__first2 == __last2) + return __last1; + + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::__search(__first1, __last1, __first2, __last2, __comp); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + + + template + constexpr + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag, + _BinaryPredicate __comp) + { + + + + + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::__search(_RevIterator1(__last1), __rlast1, + _RevIterator2(__last2), __rlast2, + __comp); + + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } +# 364 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + + + + ; + ; + + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 413 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __comp) + { + + + + + + + ; + ; + + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 449 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { return __last == std::find_if_not(__first, __last, __pred); } +# 467 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { return __last == std::find_if(__first, __last, __pred); } +# 486 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { return !std::none_of(__first, __last, __pred); } +# 502 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _InputIterator + find_if_not(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + + + + + ; + return std::__find_if_not(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } +# 527 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_partitioned(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + __first = std::find_if_not(__first, __last, __pred); + if (__first == __last) + return true; + ++__first; + return std::none_of(__first, __last, __pred); + } +# 549 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _ForwardIterator + partition_point(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + + ; + + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__pred(*__middle)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + + template + constexpr + _OutputIterator + __remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + for (; __first != __last; ++__first) + if (!__pred(__first)) + { + *__result = *__first; + ++__result; + } + return __result; + } +# 616 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + remove_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, const _Tp& __value) + { + + + + + + + ; + + return std::__remove_copy_if(__first, __last, __result, + __gnu_cxx::__ops::__iter_equals_val(__value)); + } +# 649 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + + + + + + + ; + + return std::__remove_copy_if(__first, __last, __result, + __gnu_cxx::__ops::__pred_iter(__pred)); + } +# 684 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + + + + + + + ; + + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__result = *__first; + ++__result; + } + return __result; + } + + template + constexpr + _OutputIterator + __copy_n(_InputIterator __first, _Size __n, + _OutputIterator __result, input_iterator_tag) + { + return std::__niter_wrap(__result, + __copy_n_a(__first, __n, + std::__niter_base(__result), true)); + } + + template + constexpr + inline _OutputIterator + __copy_n(_RandomAccessIterator __first, _Size __n, + _OutputIterator __result, random_access_iterator_tag) + { return std::copy(__first, __first + __n, __result); } +# 740 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) + { + + + + + + const auto __n2 = std::__size_to_integer(__n); + if (__n2 <= 0) + return __result; + + ; + ; + + return std::__copy_n(__first, __n2, __result, + std::__iterator_category(__first)); + } +# 776 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + pair<_OutputIterator1, _OutputIterator2> + partition_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator1 __out_true, _OutputIterator2 __out_false, + _Predicate __pred) + { + + + + + + + + + ; + + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__out_true = *__first; + ++__out_true; + } + else + { + *__out_false = *__first; + ++__out_false; + } + + return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); + } + + + template + constexpr + _ForwardIterator + __remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + __first = std::__find_if(__first, __last, __pred); + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for (; __first != __last; ++__first) + if (!__pred(__first)) + { + *__result = std::move(*__first); + ++__result; + } + return __result; + } +# 847 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + remove(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + + + + + + ; + + return std::__remove_if(__first, __last, + __gnu_cxx::__ops::__iter_equals_val(__value)); + } +# 881 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + return std::__remove_if(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } + + template + constexpr + _ForwardIterator + __adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while (++__next != __last) + { + if (__binary_pred(__first, __next)) + return __first; + __first = __next; + } + return __last; + } + + template + constexpr + _ForwardIterator + __unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + __first = std::__adjacent_find(__first, __last, __binary_pred); + if (__first == __last) + return __last; + + + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!__binary_pred(__dest, __first)) + *++__dest = std::move(*__first); + return ++__dest; + } +# 950 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + + ; + + return std::__unique(__first, __last, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 981 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + + + + + ; + + return std::__unique(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); + } + + + + + + + + template + constexpr + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + forward_iterator_tag, output_iterator_tag) + { + + + + + + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!__binary_pred(__first, __next)) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + + + + + + + + template + constexpr + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, output_iterator_tag) + { + + + + + + typename iterator_traits<_InputIterator>::value_type __value = *__first; + __decltype(__gnu_cxx::__ops::__iter_comp_val(__binary_pred)) + __rebound_pred + = __gnu_cxx::__ops::__iter_comp_val(__binary_pred); + *__result = __value; + while (++__first != __last) + if (!__rebound_pred(__first, __value)) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + + + + + + + + template + constexpr + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, forward_iterator_tag) + { + + + + + *__result = *__first; + while (++__first != __last) + if (!__binary_pred(__result, __first)) + *++__result = *__first; + return ++__result; + } + + + + + + + template + constexpr + void + __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + while (true) + if (__first == __last || __first == --__last) + return; + else + { + std::iter_swap(__first, __last); + ++__first; + } + } + + + + + + + template + constexpr + void + __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + if (__first == __last) + return; + --__last; + while (__first < __last) + { + std::iter_swap(__first, __last); + ++__first; + --__last; + } + } +# 1142 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) + { + + + + ; + std::__reverse(__first, __last, std::__iterator_category(__first)); + } +# 1170 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, + _OutputIterator __result) + { + + + + + + ; + + while (__first != __last) + { + --__last; + *__result = *__last; + ++__result; + } + return __result; + } + + + + + + template + constexpr + _EuclideanRingElement + __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) + { + while (__n != 0) + { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; + } + + inline namespace _V2 + { + + + template + constexpr + _ForwardIterator + __rotate(_ForwardIterator __first, + _ForwardIterator __middle, + _ForwardIterator __last, + forward_iterator_tag) + { + if (__first == __middle) + return __last; + else if (__last == __middle) + return __first; + + _ForwardIterator __first2 = __middle; + do + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } + while (__first2 != __last); + + _ForwardIterator __ret = __first; + + __first2 = __middle; + + while (__first2 != __last) + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + return __ret; + } + + + template + constexpr + _BidirectionalIterator + __rotate(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + + + + + if (__first == __middle) + return __last; + else if (__last == __middle) + return __first; + + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + + while (__first != __middle && __middle != __last) + { + std::iter_swap(__first, --__last); + ++__first; + } + + if (__first == __middle) + { + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + return __last; + } + else + { + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + return __first; + } + } + + + template + constexpr + _RandomAccessIterator + __rotate(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + + if (__first == __middle) + return __last; + else if (__last == __middle) + return __first; + + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + _Distance __n = __last - __first; + _Distance __k = __middle - __first; + + if (__k == __n - __k) + { + std::swap_ranges(__first, __middle, __middle); + return __middle; + } + + _RandomAccessIterator __p = __first; + _RandomAccessIterator __ret = __first + (__last - __middle); + + for (;;) + { + if (__k < __n - __k) + { + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = std::move(*__p); + std::move(__p + 1, __p + __n, __p); + *(__p + __n - 1) = std::move(__t); + return __ret; + } + _RandomAccessIterator __q = __p + __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + std::iter_swap(__p, __q); + ++__p; + ++__q; + } + __n %= __k; + if (__n == 0) + return __ret; + std::swap(__n, __k); + __k = __n - __k; + } + else + { + __k = __n - __k; + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = std::move(*(__p + __n - 1)); + std::move_backward(__p, __p + __n - 1, __p + __n); + *__p = std::move(__t); + return __ret; + } + _RandomAccessIterator __q = __p + __n; + __p = __q - __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + --__p; + --__q; + std::iter_swap(__p, __q); + } + __n %= __k; + if (__n == 0) + return __ret; + std::swap(__n, __k); + } + } + } +# 1402 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + rotate(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last) + { + + + + ; + ; + + return std::__rotate(__first, __middle, __last, + std::__iterator_category(__first)); + } + + } +# 1440 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last, _OutputIterator __result) + { + + + + + ; + ; + + return std::copy(__first, __middle, + std::copy(__middle, __last, __result)); + } + + + template + constexpr + _ForwardIterator + __partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, forward_iterator_tag) + { + if (__first == __last) + return __first; + + while (__pred(*__first)) + if (++__first == __last) + return __first; + + _ForwardIterator __next = __first; + + while (++__next != __last) + if (__pred(*__next)) + { + std::iter_swap(__first, __next); + ++__first; + } + + return __first; + } + + + template + constexpr + _BidirectionalIterator + __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, + _Predicate __pred, bidirectional_iterator_tag) + { + while (true) + { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!bool(__pred(*__last))) + --__last; + else + break; + std::iter_swap(__first, __last); + ++__first; + } + } +# 1520 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + _ForwardIterator + __stable_partition_adaptive(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) + { + if (__len == 1) + return __first; + + if (__len <= __buffer_size) + { + _ForwardIterator __result1 = __first; + _Pointer __result2 = __buffer; + + + + + *__result2 = std::move(*__first); + ++__result2; + ++__first; + for (; __first != __last; ++__first) + if (__pred(__first)) + { + *__result1 = std::move(*__first); + ++__result1; + } + else + { + *__result2 = std::move(*__first); + ++__result2; + } + + std::move(__buffer, __result2, __result1); + return __result1; + } + + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __left_split = + std::__stable_partition_adaptive(__first, __middle, __pred, + __len / 2, __buffer, + __buffer_size); + + + + _Distance __right_len = __len - __len / 2; + _ForwardIterator __right_split = + std::__find_if_not_n(__middle, __right_len, __pred); + + if (__right_len) + __right_split = + std::__stable_partition_adaptive(__right_split, __last, __pred, + __right_len, + __buffer, __buffer_size); + + return std::rotate(__left_split, __middle, __right_split); + } + + template + _ForwardIterator + __stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + __first = std::__find_if_not(__first, __last, __pred); + + if (__first == __last) + return __first; + + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _Temporary_buffer<_ForwardIterator, _ValueType> + __buf(__first, std::distance(__first, __last)); + return + std::__stable_partition_adaptive(__first, __last, __pred, + _DistanceType(__buf.requested_size()), + __buf.begin(), + _DistanceType(__buf.size())); + } +# 1622 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline _ForwardIterator + stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + return std::__stable_partition(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } + + + template + constexpr + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp) + { + std::__make_heap(__first, __middle, __comp); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (__comp(__i, __first)) + std::__pop_heap(__first, __middle, __i, __comp); + } + + + + template + constexpr + _RandomAccessIterator + __partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef iterator_traits<_RandomAccessIterator> _RItTraits; + typedef typename _RItTraits::difference_type _DistanceType; + + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while (__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + + std::__make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) + { + if (__comp(__first, __result_first)) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first), __comp); + ++__first; + } + std::__sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; + } +# 1710 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last) + { +# 1725 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + + + + + + + ; + ; + ; + + return std::__partial_sort_copy(__first, __last, + __result_first, __result_last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 1760 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { +# 1777 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + + + + + + + + + + ; + ; + ; + + return std::__partial_sort_copy(__first, __last, + __result_first, __result_last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + template + constexpr + void + __unguarded_linear_insert(_RandomAccessIterator __last, + _Compare __comp) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = std::move(*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__comp(__val, __next)) + { + *__last = std::move(*__next); + __last = __next; + --__next; + } + *__last = std::move(__val); + } + + + template + constexpr + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__first == __last) return; + + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (__comp(__i, __first)) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = std::move(*__i); + std::move_backward(__first, __i, __i + 1); + *__first = std::move(__val); + } + else + std::__unguarded_linear_insert(__i, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + } + } + + + template + constexpr + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + } + + + + + + enum { _S_threshold = 16 }; + + + template + constexpr + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold), __comp); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, + __comp); + } + else + std::__insertion_sort(__first, __last, __comp); + } + + + template + constexpr + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _RandomAccessIterator __pivot, _Compare __comp) + { + while (true) + { + while (__comp(__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, __last)) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + + + template + constexpr + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_to_first(__first, __first + 1, __mid, __last - 1, + __comp); + return std::__unguarded_partition(__first + 1, __last, __first, __comp); + } + + template + constexpr + inline void + __partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + std::__heap_select(__first, __middle, __last, __comp); + std::__sort_heap(__first, __middle, __comp); + } + + + template + constexpr + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit, _Compare __comp) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::__partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + std::__introsort_loop(__cut, __last, __depth_limit, __comp); + __last = __cut; + } + } + + + + template + constexpr + inline void + __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2, + __comp); + std::__final_insertion_sort(__first, __last, __comp); + } + } + + template + constexpr + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit, + _Compare __comp) + { + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last, __comp); + + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last, __comp); + } +# 2008 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + + + + + + ; + + return std::__lower_bound(__first, __last, __val, + __gnu_cxx::__ops::__iter_comp_val(__comp)); + } + + template + constexpr + _ForwardIterator + __upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(__val, __middle)) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } +# 2064 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + + + + + ; + + return std::__upper_bound(__first, __last, __val, + __gnu_cxx::__ops::__val_less_iter()); + } +# 2095 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + + + + + + ; + + return std::__upper_bound(__first, __last, __val, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + } + + template + constexpr + pair<_ForwardIterator, _ForwardIterator> + __equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, + _CompareItTp __comp_it_val, _CompareTpIt __comp_val_it) + { + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp_it_val(__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp_val_it(__val, __middle)) + __len = __half; + else + { + _ForwardIterator __left + = std::__lower_bound(__first, __middle, __val, __comp_it_val); + std::advance(__first, __len); + _ForwardIterator __right + = std::__upper_bound(++__middle, __first, __val, __comp_val_it); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } +# 2168 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + + + + + + + ; + ; + + return std::__equal_range(__first, __last, __val, + __gnu_cxx::__ops::__iter_less_val(), + __gnu_cxx::__ops::__val_less_iter()); + } +# 2205 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + + + + + + + + ; + + ; + + return std::__equal_range(__first, __last, __val, + __gnu_cxx::__ops::__iter_comp_val(__comp), + __gnu_cxx::__ops::__val_comp_iter(__comp)); + } +# 2239 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + + + + + ; + ; + + _ForwardIterator __i + = std::__lower_bound(__first, __last, __val, + __gnu_cxx::__ops::__iter_less_val()); + return __i != __last && !(__val < *__i); + } +# 2273 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + + + + + + ; + + ; + + _ForwardIterator __i + = std::__lower_bound(__first, __last, __val, + __gnu_cxx::__ops::__iter_comp_val(__comp)); + return __i != __last && !bool(__comp(__val, *__i)); + } + + + + + template + void + __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first2, __first1)) + { + *__result = std::move(*__first2); + ++__first2; + } + else + { + *__result = std::move(*__first1); + ++__first1; + } + ++__result; + } + if (__first1 != __last1) + std::move(__first1, __last1, __result); + } + + + template + void + __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result, + _Compare __comp) + { + if (__first1 == __last1) + { + std::move_backward(__first2, __last2, __result); + return; + } + else if (__first2 == __last2) + return; + + --__last1; + --__last2; + while (true) + { + if (__comp(__last2, __last1)) + { + *--__result = std::move(*__last1); + if (__first1 == __last1) + { + std::move_backward(__first2, ++__last2, __result); + return; + } + --__last1; + } + else + { + *--__result = std::move(*__last2); + if (__first2 == __last2) + return; + --__last2; + } + } + } + + + template + _BidirectionalIterator1 + __rotate_adaptive(_BidirectionalIterator1 __first, + _BidirectionalIterator1 __middle, + _BidirectionalIterator1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIterator2 __buffer, + _Distance __buffer_size) + { + _BidirectionalIterator2 __buffer_end; + if (__len1 > __len2 && __len2 <= __buffer_size) + { + if (__len2) + { + __buffer_end = std::move(__middle, __last, __buffer); + std::move_backward(__first, __middle, __last); + return std::move(__buffer, __buffer_end, __first); + } + else + return __first; + } + else if (__len1 <= __buffer_size) + { + if (__len1) + { + __buffer_end = std::move(__first, __middle, __buffer); + std::move(__middle, __last, __first); + return std::move_backward(__buffer, __buffer_end, __last); + } + else + return __last; + } + else + return std::rotate(__first, __middle, __last); + } + + + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::move(__first, __middle, __buffer); + std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, + __first, __comp); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::move(__middle, __last, __buffer); + std::__move_merge_adaptive_backward(__first, __middle, __buffer, + __buffer_end, __last, __comp); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut + = std::__lower_bound(__middle, __last, *__first_cut, + __gnu_cxx::__ops::__iter_comp_val(__comp)); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut + = std::__upper_bound(__first, __middle, *__second_cut, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + __len11 = std::distance(__first, __first_cut); + } + + _BidirectionalIterator __new_middle + = std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, + __buffer_size, __comp); + } + } + + + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Compare __comp) + { + if (__len1 == 0 || __len2 == 0) + return; + + if (__len1 + __len2 == 2) + { + if (__comp(__middle, __first)) + std::iter_swap(__first, __middle); + return; + } + + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut + = std::__lower_bound(__middle, __last, *__first_cut, + __gnu_cxx::__ops::__iter_comp_val(__comp)); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut + = std::__upper_bound(__first, __middle, *__second_cut, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + __len11 = std::distance(__first, __first_cut); + } + + _BidirectionalIterator __new_middle + = std::rotate(__first_cut, __middle, __second_cut); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22, __comp); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22, __comp); + } + + template + void + __inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + typedef _Temporary_buffer<_BidirectionalIterator, _ValueType> _TmpBuf; + + if (__first == __middle || __middle == __last) + return; + + const _DistanceType __len1 = std::distance(__first, __middle); + const _DistanceType __len2 = std::distance(__middle, __last); + + + + _TmpBuf __buf(__first, std::min(__len1, __len2)); + + if (__buf.begin() == 0) + std::__merge_without_buffer + (__first, __middle, __last, __len1, __len2, __comp); + else + std::__merge_adaptive + (__first, __middle, __last, __len1, __len2, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } +# 2565 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last) + { + + + + + + ; + ; + ; + + std::__inplace_merge(__first, __middle, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 2606 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + + + + + + + ; + ; + ; + + std::__inplace_merge(__first, __middle, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + + template + _OutputIterator + __move_merge(_InputIterator __first1, _InputIterator __last1, + _InputIterator __first2, _InputIterator __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first2, __first1)) + { + *__result = std::move(*__first2); + ++__first2; + } + else + { + *__result = std::move(*__first1); + ++__first1; + } + ++__result; + } + return std::move(__first2, __last2, std::move(__first1, __last1, __result)) + + ; + } + + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, _Distance __step_size, + _Compare __comp) + { + const _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) + { + __result = std::__move_merge(__first, __first + __step_size, + __first + __step_size, + __first + __two_step, + __result, __comp); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + + std::__move_merge(__first, __first + __step_size, + __first + __step_size, __last, __result, __comp); + } + + template + constexpr + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size, _Compare __comp) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last, __comp); + } + + enum { _S_chunk_size = 7 }; + + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size, __comp); + + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, + __step_size, __comp); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, + __step_size, __comp); + __step_size *= 2; + } + } + + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, __buffer, + __buffer_size, __comp); + std::__stable_sort_adaptive(__middle, __last, __buffer, + __buffer_size, __comp); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); + std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); + } + + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size, + __comp); + } + + + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle, __comp); + std::__inplace_stable_sort(__middle, __last, __comp); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); + } +# 2780 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + bool + __includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first2, __first1)) + return false; + if (!__comp(__first1, __first2)) + ++__first2; + ++__first1; + } + + return __first2 == __last2; + } +# 2818 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + + + + + + + + + + ; + ; + ; + ; + + return std::__includes(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 2863 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + + + + + + + + + + ; + ; + ; + ; + + return std::__includes(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 2899 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + bool + __next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(__i, __ii)) + { + _BidirectionalIterator __j = __last; + while (!__comp(__i, --__j)) + {} + std::iter_swap(__i, __j); + std::__reverse(__ii, __last, + std::__iterator_category(__first)); + return true; + } + if (__i == __first) + { + std::__reverse(__first, __last, + std::__iterator_category(__first)); + return false; + } + } + } +# 2949 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + + + + ; + ; + + return std::__next_permutation + (__first, __last, __gnu_cxx::__ops::__iter_less_iter()); + } +# 2982 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + + + + + ; + ; + + return std::__next_permutation + (__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + bool + __prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(__ii, __i)) + { + _BidirectionalIterator __j = __last; + while (!__comp(--__j, __i)) + {} + std::iter_swap(__i, __j); + std::__reverse(__ii, __last, + std::__iterator_category(__first)); + return true; + } + if (__i == __first) + { + std::__reverse(__first, __last, + std::__iterator_category(__first)); + return false; + } + } + } +# 3052 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + + + + ; + ; + + return std::__prev_permutation(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 3085 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + + + + + ; + ; + + return std::__prev_permutation(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + + + template + constexpr + _OutputIterator + __replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + for (; __first != __last; ++__first, (void)++__result) + if (__pred(__first)) + *__result = __new_value; + else + *__result = *__first; + return __result; + } +# 3137 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + replace_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + + + + ; + + return std::__replace_copy_if(__first, __last, __result, + __gnu_cxx::__ops::__iter_equals_val(__old_value), + __new_value); + } +# 3172 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + + + + + + + ; + + return std::__replace_copy_if(__first, __last, __result, + __gnu_cxx::__ops::__pred_iter(__pred), + __new_value); + } +# 3201 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_sorted(_ForwardIterator __first, _ForwardIterator __last) + { return std::is_sorted_until(__first, __last) == __last; } +# 3216 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_sorted(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { return std::is_sorted_until(__first, __last, __comp) == __last; } + + template + constexpr + _ForwardIterator + __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + if (__first == __last) + return __last; + + _ForwardIterator __next = __first; + for (++__next; __next != __last; __first = __next, (void)++__next) + if (__comp(__next, __first)) + return __next; + return __next; + } +# 3247 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + ; + + return std::__is_sorted_until(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 3272 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + ; + + return std::__is_sorted_until(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 3298 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair + minmax(const _Tp& __a, const _Tp& __b) + { + + + + return __b < __a ? pair(__b, __a) + : pair(__a, __b); + } +# 3319 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair + minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + return __comp(__b, __a) ? pair(__b, __a) + : pair(__a, __b); + } + + template + constexpr + pair<_ForwardIterator, _ForwardIterator> + __minmax_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + _ForwardIterator __next = __first; + if (__first == __last + || ++__next == __last) + return std::make_pair(__first, __first); + + _ForwardIterator __min{}, __max{}; + if (__comp(__next, __first)) + { + __min = __next; + __max = __first; + } + else + { + __min = __first; + __max = __next; + } + + __first = __next; + ++__first; + + while (__first != __last) + { + __next = __first; + if (++__next == __last) + { + if (__comp(__first, __min)) + __min = __first; + else if (!__comp(__first, __max)) + __max = __first; + break; + } + + if (__comp(__next, __first)) + { + if (__comp(__next, __min)) + __min = __next; + if (!__comp(__first, __max)) + __max = __first; + } + else + { + if (__comp(__first, __min)) + __min = __first; + if (!__comp(__next, __max)) + __max = __next; + } + + __first = __next; + ++__first; + } + + return std::make_pair(__min, __max); + } +# 3399 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair<_ForwardIterator, _ForwardIterator> + minmax_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + ; + + return std::__minmax_element(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 3427 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair<_ForwardIterator, _ForwardIterator> + minmax_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + ; + + return std::__minmax_element(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + template + constexpr + inline _Tp + min(initializer_list<_Tp> __l) + { return *std::min_element(__l.begin(), __l.end()); } + + template + constexpr + inline _Tp + min(initializer_list<_Tp> __l, _Compare __comp) + { return *std::min_element(__l.begin(), __l.end(), __comp); } + + template + constexpr + inline _Tp + max(initializer_list<_Tp> __l) + { return *std::max_element(__l.begin(), __l.end()); } + + template + constexpr + inline _Tp + max(initializer_list<_Tp> __l, _Compare __comp) + { return *std::max_element(__l.begin(), __l.end(), __comp); } + + template + constexpr + inline pair<_Tp, _Tp> + minmax(initializer_list<_Tp> __l) + { + pair __p = + std::minmax_element(__l.begin(), __l.end()); + return std::make_pair(*__p.first, *__p.second); + } + + template + constexpr + inline pair<_Tp, _Tp> + minmax(initializer_list<_Tp> __l, _Compare __comp) + { + pair __p = + std::minmax_element(__l.begin(), __l.end(), __comp); + return std::make_pair(*__p.first, *__p.second); + } +# 3504 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _BinaryPredicate __pred) + { + + + + + + + ; + + return std::__is_permutation(__first1, __last1, __first2, + __gnu_cxx::__ops::__iter_comp_iter(__pred)); + } + + + template + constexpr + bool + __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __pred) + { + using _Cat1 + = typename iterator_traits<_ForwardIterator1>::iterator_category; + using _Cat2 + = typename iterator_traits<_ForwardIterator2>::iterator_category; + using _It1_is_RA = is_same<_Cat1, random_access_iterator_tag>; + using _It2_is_RA = is_same<_Cat2, random_access_iterator_tag>; + constexpr bool __ra_iters = _It1_is_RA() && _It2_is_RA(); + if (__ra_iters) + { + auto __d1 = std::distance(__first1, __last1); + auto __d2 = std::distance(__first2, __last2); + if (__d1 != __d2) + return false; + } + + + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!__pred(__first1, __first2)) + break; + + if (__ra_iters) + { + if (__first1 == __last1) + return true; + } + else + { + auto __d1 = std::distance(__first1, __last1); + auto __d2 = std::distance(__first2, __last2); + if (__d1 == 0 && __d2 == 0) + return true; + if (__d1 != __d2) + return false; + } + + for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) + { + if (__scan != std::__find_if(__first1, __scan, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) + continue; + + auto __matches = std::__count_if(__first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); + if (0 == __matches + || std::__count_if(__scan, __last1, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) + != __matches) + return false; + } + return true; + } +# 3599 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + ; + ; + + return + std::__is_permutation(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 3627 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __pred) + { + ; + ; + + return std::__is_permutation(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__pred)); + } +# 3654 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr const _Tp& + clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi) + { + do { if (__builtin_is_constant_evaluated() && !bool(!(__hi < __lo))) __builtin_unreachable(); } while (false); + return (__val < __lo) ? __lo : (__hi < __val) ? __hi : __val; + } +# 3672 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr const _Tp& + clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, _Compare __comp) + { + do { if (__builtin_is_constant_evaluated() && !bool(!__comp(__hi, __lo))) __builtin_unreachable(); } while (false); + return __comp(__val, __lo) ? __lo : __comp(__hi, __val) ? __hi : __val; + } +# 3704 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + pair<_IntType, _IntType> + __gen_two_uniform_ints(_IntType __b0, _IntType __b1, + _UniformRandomBitGenerator&& __g) + { + _IntType __x + = uniform_int_distribution<_IntType>{0, (__b0 * __b1) - 1}(__g); + return std::make_pair(__x / __b1, __x % __b1); + } +# 3726 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + void + shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + _UniformRandomNumberGenerator&& __g) + { + + + + ; + + if (__first == __last) + return; + + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + typedef typename std::make_unsigned<_DistanceType>::type __ud_type; + typedef typename std::uniform_int_distribution<__ud_type> __distr_type; + typedef typename __distr_type::param_type __p_type; + + typedef typename remove_reference<_UniformRandomNumberGenerator>::type + _Gen; + typedef typename common_type::type + __uc_type; + + const __uc_type __urngrange = __g.max() - __g.min(); + const __uc_type __urange = __uc_type(__last - __first); + + if (__urngrange / __urange >= __urange) + + { + _RandomAccessIterator __i = __first + 1; + + + + + + if ((__urange % 2) == 0) + { + __distr_type __d{0, 1}; + std::iter_swap(__i++, __first + __d(__g)); + } + + + + + + while (__i != __last) + { + const __uc_type __swap_range = __uc_type(__i - __first) + 1; + + const pair<__uc_type, __uc_type> __pospos = + __gen_two_uniform_ints(__swap_range, __swap_range + 1, __g); + + std::iter_swap(__i++, __first + __pospos.first); + std::iter_swap(__i++, __first + __pospos.second); + } + + return; + } + + __distr_type __d; + + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); + } + + + + + +# 3811 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _Function + for_each(_InputIterator __first, _InputIterator __last, _Function __f) + { + + + ; + for (; __first != __last; ++__first) + __f(*__first); + return __f; + } +# 3837 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _InputIterator + for_each_n(_InputIterator __first, _Size __n, _Function __f) + { + auto __n2 = std::__size_to_integer(__n); + using _Cat = typename iterator_traits<_InputIterator>::iterator_category; + if constexpr (is_base_of_v) + { + if (__n2 <= 0) + return __first; + auto __last = __first + __n2; + std::for_each(__first, __last, std::move(__f)); + return __last; + } + else + { + while (__n2-->0) + { + __f(*__first); + ++__first; + } + return __first; + } + } +# 3873 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _InputIterator + find(_InputIterator __first, _InputIterator __last, + const _Tp& __val) + { + + + + + ; + return std::__find_if(__first, __last, + __gnu_cxx::__ops::__iter_equals_val(__val)); + } +# 3898 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _InputIterator + find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + + + + + ; + + return std::__find_if(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } +# 3930 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2) + { + + + + + + + ; + ; + + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (*__first1 == *__iter) + return __first1; + return __last1; + } +# 3971 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2, + _BinaryPredicate __comp) + { + + + + + + + ; + ; + + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; + } +# 4004 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + + return std::__adjacent_find(__first, __last, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 4030 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + + + + ; + + return std::__adjacent_find(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); + } +# 4056 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline typename iterator_traits<_InputIterator>::difference_type + count(_InputIterator __first, _InputIterator __last, const _Tp& __value) + { + + + + + ; + + return std::__count_if(__first, __last, + __gnu_cxx::__ops::__iter_equals_val(__value)); + } +# 4080 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline typename iterator_traits<_InputIterator>::difference_type + count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + + + + + ; + + return std::__count_if(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } +# 4121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + + + + ; + ; + + return std::__search(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 4161 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + + + + + + + ; + ; + + return std::__search(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__predicate)); + } +# 4197 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val) + { + + + + + ; + + return std::__search_n(__first, __last, __count, + __gnu_cxx::__ops::__iter_equals_val(__val)); + } +# 4231 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred) + { + + + + + ; + + return std::__search_n(__first, __last, __count, + __gnu_cxx::__ops::__iter_comp_val(__binary_pred, __val)); + } +# 4257 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + search(_ForwardIterator __first, _ForwardIterator __last, + const _Searcher& __searcher) + { return __searcher(__first, __last).first; } +# 4281 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + transform(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _UnaryOperation __unary_op) + { + + + + + + ; + + for (; __first != __last; ++__first, (void)++__result) + *__result = __unary_op(*__first); + return __result; + } +# 4319 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + transform(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _OutputIterator __result, + _BinaryOperation __binary_op) + { + + + + + + + ; + + for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; + } +# 4353 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + void + replace(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + + + + + ; + + for (; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; + } +# 4386 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + void + replace_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, const _Tp& __new_value) + { + + + + + + + + ; + + for (; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; + } +# 4419 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + void + generate(_ForwardIterator __first, _ForwardIterator __last, + _Generator __gen) + { + + + + + ; + + for (; __first != __last; ++__first) + *__first = __gen(); + } +# 4453 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + generate_n(_OutputIterator __first, _Size __n, _Generator __gen) + { + + + + + + typedef __decltype(std::__size_to_integer(__n)) _IntSize; + for (_IntSize __niter = std::__size_to_integer(__n); + __niter > 0; --__niter, (void) ++__first) + *__first = __gen(); + return __first; + } +# 4491 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) + { + + + + + + + ; + + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + __gnu_cxx::__ops::__iter_equal_to_iter(), + std::__iterator_category(__first), + std::__iterator_category(__result)); + } +# 4532 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _BinaryPredicate __binary_pred) + { + + + + + ; + + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred), + std::__iterator_category(__first), + std::__iterator_category(__result)); + } +# 4566 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + ; + + if (__first != __last) + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + + _RandomAccessIterator __j = __first + + std::rand() % ((__i - __first) + 1); + if (__i != __j) + std::iter_swap(__i, __j); + } + } +# 4601 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + + _RandomNumberGenerator&& __rand) + + + + { + + + + ; + + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + _RandomAccessIterator __j = __first + __rand((__i - __first) + 1); + if (__i != __j) + std::iter_swap(__i, __j); + } + } +# 4641 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + return std::__partition(__first, __last, __pred, + std::__iterator_category(__first)); + } +# 4675 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + + + + + + ; + ; + ; + + std::__partial_sort(__first, __middle, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 4714 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + + + + + + + ; + ; + ; + + std::__partial_sort(__first, __middle, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 4751 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last) + { + + + + + + ; + ; + ; + + if (__first == __last || __nth == __last) + return; + + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 4791 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp) + { + + + + + + + ; + ; + ; + + if (__first == __last || __nth == __last) + return; + + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 4829 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); + } +# 4860 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + + + + ; + ; + + std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first2, __first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } +# 4923 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + ; + ; + ; + ; + + return std::__merge(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 4974 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + + + + + + + + + + + ; + ; + ; + ; + + return std::__merge(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + inline void + __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + typedef _Temporary_buffer<_RandomAccessIterator, _ValueType> _TmpBuf; + + if (__first == __last) + return; + + + + _TmpBuf __buf(__first, (__last - __first + 1) / 2); + + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last, __comp); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } +# 5044 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + std::__stable_sort(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5078 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + + + + ; + ; + + std::__stable_sort(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first1, __first2)) + { + *__result = *__first1; + ++__first1; + } + else if (__comp(__first2, __first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } +# 5148 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_union(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5199 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + + + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_union(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + if (__comp(__first1, __first2)) + ++__first1; + else if (__comp(__first2, __first1)) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } +# 5272 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_intersection(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5322 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_intersection(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + if (__comp(__first1, __first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(__first2, __first1)) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } +# 5397 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_difference(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5449 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_difference(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __set_symmetric_difference(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + if (__comp(__first1, __first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(__first2, __first1)) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } +# 5530 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_symmetric_difference(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5582 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + + + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_symmetric_difference(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _ForwardIterator + __min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(__first, __result)) + __result = __first; + return __result; + } +# 5636 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _ForwardIterator + inline min_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + ; + + return std::__min_element(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5661 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + ; + + return std::__min_element(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _ForwardIterator + __max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + if (__first == __last) return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(__result, __first)) + __result = __first; + return __result; + } +# 5700 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + ; + + return std::__max_element(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5725 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + ; + + return std::__max_element(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + + template + _RandomAccessIterator + __sample(_InputIterator __first, _InputIterator __last, input_iterator_tag, + _RandomAccessIterator __out, random_access_iterator_tag, + _Size __n, _UniformRandomBitGenerator&& __g) + { + using __distrib_type = uniform_int_distribution<_Size>; + using __param_type = typename __distrib_type::param_type; + __distrib_type __d{}; + _Size __sample_sz = 0; + while (__first != __last && __sample_sz != __n) + { + __out[__sample_sz++] = *__first; + ++__first; + } + for (auto __pop_sz = __sample_sz; __first != __last; + ++__first, (void) ++__pop_sz) + { + const auto __k = __d(__g, __param_type{0, __pop_sz}); + if (__k < __n) + __out[__k] = *__first; + } + return __out + __sample_sz; + } + + + template + _OutputIterator + __sample(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag, + _OutputIterator __out, _Cat, + _Size __n, _UniformRandomBitGenerator&& __g) + { + using __distrib_type = uniform_int_distribution<_Size>; + using __param_type = typename __distrib_type::param_type; + using _USize = make_unsigned_t<_Size>; + using _Gen = remove_reference_t<_UniformRandomBitGenerator>; + using __uc_type = common_type_t; + + if (__first == __last) + return __out; + + __distrib_type __d{}; + _Size __unsampled_sz = std::distance(__first, __last); + __n = std::min(__n, __unsampled_sz); + + + + + const __uc_type __urngrange = __g.max() - __g.min(); + if (__urngrange / __uc_type(__unsampled_sz) >= __uc_type(__unsampled_sz)) + + + { + while (__n != 0 && __unsampled_sz >= 2) + { + const pair<_Size, _Size> __p = + __gen_two_uniform_ints(__unsampled_sz, __unsampled_sz - 1, __g); + + --__unsampled_sz; + if (__p.first < __n) + { + *__out++ = *__first; + --__n; + } + + ++__first; + + if (__n == 0) break; + + --__unsampled_sz; + if (__p.second < __n) + { + *__out++ = *__first; + --__n; + } + + ++__first; + } + } + + + + for (; __n != 0; ++__first) + if (__d(__g, __param_type{0, --__unsampled_sz}) < __n) + { + *__out++ = *__first; + --__n; + } + return __out; + } + + + + + template + _SampleIterator + sample(_PopulationIterator __first, _PopulationIterator __last, + _SampleIterator __out, _Distance __n, + _UniformRandomBitGenerator&& __g) + { + using __pop_cat = typename + std::iterator_traits<_PopulationIterator>::iterator_category; + using __samp_cat = typename + std::iterator_traits<_SampleIterator>::iterator_category; + + static_assert( + __or_, + is_convertible<__samp_cat, random_access_iterator_tag>>::value, + "output range must use a RandomAccessIterator when input range" + " does not meet the ForwardIterator requirements"); + + static_assert(is_integral<_Distance>::value, + "sample size must be an integer type"); + + typename iterator_traits<_PopulationIterator>::difference_type __d = __n; + return std:: + __sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, __d, + std::forward<_UniformRandomBitGenerator>(__g)); + } + + + + + +} +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algobase.h" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algobase.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 1 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 3 + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/memoryfwd.h" 1 3 +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/memoryfwd.h" 3 + +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/memoryfwd.h" 3 + + + +namespace std +{ + +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/memoryfwd.h" 3 + template + class allocator; + + template<> + class allocator; + + + + template + struct uses_allocator; + + template + struct allocator_traits; + + + + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h" 2 3 + +namespace std +{ + + + + + + + + + template + struct char_traits; + + template<> struct char_traits; + + + template<> struct char_traits; + + + + template<> struct char_traits; + + + + template<> struct char_traits; + template<> struct char_traits; + + +namespace __cxx11 { + + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + +} + + + typedef basic_string string; + + + + typedef basic_string wstring; + + + + + typedef basic_string u8string; + + + + + typedef basic_string u16string; + + + typedef basic_string u32string; + + + + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 1 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_stdio_config.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 42 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + int _flag; + int _file; + int _charbuf; + int _bufsiz; + char *_tmpfname; + }; + typedef struct _iobuf FILE; + + + +__attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __acrt_iob_func(unsigned index); + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __iob_func(void); +# 82 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + typedef unsigned long _fsize_t; + + + + + struct _wfinddata32_t { + unsigned attrib; + __time32_t time_create; + __time32_t time_access; + __time32_t time_write; + _fsize_t size; + wchar_t name[260]; + }; + + struct _wfinddata32i64_t { + unsigned attrib; + __time32_t time_create; + __time32_t time_access; + __time32_t time_write; + __extension__ long long size; + wchar_t name[260]; + }; + + struct _wfinddata64i32_t { + unsigned attrib; + __time64_t time_create; + __time64_t time_access; + __time64_t time_write; + _fsize_t size; + wchar_t name[260]; + }; + + struct _wfinddata64_t { + unsigned attrib; + __time64_t time_create; + __time64_t time_access; + __time64_t time_write; + __extension__ long long size; + wchar_t name[260]; + }; +# 187 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + extern unsigned short ** __imp__pctype; +# 202 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + extern unsigned short ** __imp__wctype; +# 217 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + extern unsigned short ** __imp__pwctype; +# 241 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + int __attribute__((__cdecl__)) iswalpha(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswalpha_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswupper(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswupper_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswlower(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswlower_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswdigit(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswdigit_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswxdigit(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswxdigit_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswspace(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswspace_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswpunct(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswpunct_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswalnum(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswalnum_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswprint(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswprint_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswgraph(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswgraph_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswcntrl(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswcntrl_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswascii(wint_t _C); + + int __attribute__((__cdecl__)) isleadbyte(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isleadbyte_l(int _C,_locale_t _Locale); + + wint_t __attribute__((__cdecl__)) towupper(wint_t _C); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _towupper_l(wint_t _C,_locale_t _Locale); + wint_t __attribute__((__cdecl__)) towlower(wint_t _C); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _towlower_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswctype(wint_t _C,wctype_t _Type); +# 281 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + int __attribute__((__cdecl__)) is_wctype(wint_t _C,wctype_t _Type); + + + + int __attribute__((__cdecl__)) iswblank(wint_t _C); + + + + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wgetcwd(wchar_t *_DstBuf,int _SizeInWords); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords); + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wchdir(const wchar_t *_Path); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wmkdir(const wchar_t *_Path); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wrmdir(const wchar_t *_Path); + + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _waccess(const wchar_t *_Filename,int _AccessMode); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wchmod(const wchar_t *_Filename,int _Mode); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcreat(const wchar_t *_Filename,int _PermissionMode) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wunlink(const wchar_t *_Filename); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wrename(const wchar_t *_OldFilename,const wchar_t *_NewFilename); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wmktemp(wchar_t *_TemplateName) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData); + intptr_t __attribute__((__cdecl__)) _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData); + int __attribute__((__cdecl__)) _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wopen(const wchar_t *_Filename,int _OpenFlag,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...) ; + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wsetlocale(int _Category,const wchar_t *_Locale); + + + + + + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); + + + + + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); +# 398 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + typedef unsigned short _ino_t; + + typedef unsigned short ino_t; + + + + + + typedef unsigned int _dev_t; + + typedef unsigned int dev_t; + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_off_t.h" 1 3 + + + + + typedef long _off_t; + + typedef long off32_t; + + + + + + __extension__ typedef long long _off64_t; + + __extension__ typedef long long off64_t; +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_off_t.h" 3 +typedef off32_t off_t; +# 413 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_stat64.h" 1 3 +# 25 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_stat64.h" 3 + struct _stat32 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + __time32_t st_atime; + __time32_t st_mtime; + __time32_t st_ctime; + }; + + + struct stat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; + + + struct _stat32i64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __extension__ long long st_size; + __time32_t st_atime; + __time32_t st_mtime; + __time32_t st_ctime; + }; + + struct _stat64i32 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + __time64_t st_atime; + __time64_t st_mtime; + __time64_t st_ctime; + }; + + struct _stat64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __extension__ long long st_size; + __time64_t st_atime; + __time64_t st_mtime; + __time64_t st_ctime; + }; +# 414 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wstat32(const wchar_t *_Name,struct _stat32 *_Stat); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat); + int __attribute__((__cdecl__)) _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wstat64(const wchar_t *_Name,struct _stat64 *_Stat); +# 432 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) wchar_t *_cgetws(wchar_t *_Buffer) ; + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _getwch(void); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _getwche(void); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _putwch(wchar_t _WCh); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _ungetwch(wint_t _WCh); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cputws(const wchar_t *_String); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwscanf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwscanf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vcwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwprintf_p(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vcwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vcwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vcwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); +# 465 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vswscanf (const wchar_t * __restrict__ _Str,const wchar_t * __restrict__ Format,va_list argp); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_wscanf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list argp); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * __restrict__ Format,va_list argp); + + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_wprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); + __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_wscanf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_wprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); +# 541 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int swscanf(const wchar_t *__source, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vswscanf( __source, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) +int wscanf(const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfwscanf( (__acrt_iob_func(0)), __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int fwscanf(FILE *__stream, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfwscanf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int vswscanf (const wchar_t *__source, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vswscanf( __source, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) +int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfwscanf( (__acrt_iob_func(0)), __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfwscanf( __stream, __format, __local_argv ); +} + + + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int fwprintf (FILE *__stream, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfwprintf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) +int wprintf (const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfwprintf( (__acrt_iob_func(1)), __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int vfwprintf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfwprintf( __stream, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) +int vwprintf (const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfwprintf( (__acrt_iob_func(1)), __format, __local_argv ); +} + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); +} +# 784 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag); + + + wint_t __attribute__((__cdecl__)) fgetwc(FILE *_File); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fgetwchar(void); + wint_t __attribute__((__cdecl__)) fputwc(wchar_t _Ch,FILE *_File); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fputwchar(wchar_t _Ch); + wint_t __attribute__((__cdecl__)) getwc(FILE *_File); + wint_t __attribute__((__cdecl__)) getwchar(void); + wint_t __attribute__((__cdecl__)) putwc(wchar_t _Ch,FILE *_File); + wint_t __attribute__((__cdecl__)) putwchar(wchar_t _Ch); + wint_t __attribute__((__cdecl__)) ungetwc(wint_t _Ch,FILE *_File); + wchar_t *__attribute__((__cdecl__)) fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File); + int __attribute__((__cdecl__)) fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _getws(wchar_t *_String) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putws(const wchar_t *_Str); +# 848 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_l(wchar_t * __restrict__ ,size_t _SizeInWords,const wchar_t * __restrict__ _Format,_locale_t _Locale,... ) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) ; +# 1159 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_p(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vswprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_p(const wchar_t * __restrict__ _Format,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vscwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __swprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_l(wchar_t * __restrict__ _Dest,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __vswprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,va_list _Args) ; + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/swprintf.inl" 1 3 +# 25 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/swprintf.inl" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int vswprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return vsnwprintf( __stream, __count, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int swprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; + + __builtin_va_start( __local_argv, __format ); + __retval = vswprintf( __stream, __count, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + + +extern "C++" { + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int vswprintf (wchar_t *__stream, const wchar_t *__format, __builtin_va_list __local_argv) +{ + + return __mingw_vswprintf( __stream, __format, __local_argv ); + + + +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int swprintf (wchar_t *__stream, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; + + __builtin_va_start( __local_argv, __format ); + __retval = vswprintf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +} +# 1193 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 +# 1202 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwscanf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swscanf_l(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_l(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wscanf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ; + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfdopen(int _FileHandle ,const wchar_t *_Mode); + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode) ; + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) ; + + + + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wpopen(const wchar_t *_Command,const wchar_t *_Mode); + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wremove(const wchar_t *_Filename); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wtmpnam(wchar_t *_Buffer); +# 1322 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsdup(const wchar_t *_Str); + wchar_t *__attribute__((__cdecl__)) wcscat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) ; + wchar_t *__attribute__((__cdecl__)) wcschr(const wchar_t *_Str,wchar_t _Ch); + int __attribute__((__cdecl__)) wcscmp(const wchar_t *_Str1,const wchar_t *_Str2); + wchar_t *__attribute__((__cdecl__)) wcscpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) ; + size_t __attribute__((__cdecl__)) wcscspn(const wchar_t *_Str,const wchar_t *_Control); + size_t __attribute__((__cdecl__)) wcslen(const wchar_t *_Str); + size_t __attribute__((__cdecl__)) wcsnlen(const wchar_t *_Src,size_t _MaxCount); + wchar_t *__attribute__((__cdecl__)) wcsncat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) ; + int __attribute__((__cdecl__)) wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); + wchar_t *__attribute__((__cdecl__)) wcsncpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) ; + wchar_t *__attribute__((__cdecl__)) _wcsncpy_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count,_locale_t _Locale) ; + wchar_t *__attribute__((__cdecl__)) wcspbrk(const wchar_t *_Str,const wchar_t *_Control); + wchar_t *__attribute__((__cdecl__)) wcsrchr(const wchar_t *_Str,wchar_t _Ch); + size_t __attribute__((__cdecl__)) wcsspn(const wchar_t *_Str,const wchar_t *_Control); + wchar_t *__attribute__((__cdecl__)) wcsstr(const wchar_t *_Str,const wchar_t *_SubStr); + + + + wchar_t *__attribute__((__cdecl__)) wcstok(wchar_t * __restrict__ _Str,const wchar_t * __restrict__ _Delim) ; + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcserror(int _ErrNum) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) __wcserror(const wchar_t *_Str) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsrev(wchar_t *_Str); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsset(wchar_t *_Str,wchar_t _Val) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcslwr(wchar_t *_String) ; + __attribute__ ((__dllimport__)) wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsupr(wchar_t *_String) ; + __attribute__ ((__dllimport__)) wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale) ; + size_t __attribute__((__cdecl__)) wcsxfrm(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _wcsxfrm_l(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount,_locale_t _Locale); + int __attribute__((__cdecl__)) wcscoll(const wchar_t *_Str1,const wchar_t *_Str2); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); + + + wchar_t *__attribute__((__cdecl__)) wcsdup(const wchar_t *_Str) ; + + int __attribute__((__cdecl__)) wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2) ; + int __attribute__((__cdecl__)) wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount) ; + wchar_t *__attribute__((__cdecl__)) wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) ; + wchar_t *__attribute__((__cdecl__)) wcsrev(wchar_t *_Str) ; + wchar_t *__attribute__((__cdecl__)) wcsset(wchar_t *_Str,wchar_t _Val) ; + wchar_t *__attribute__((__cdecl__)) wcslwr(wchar_t *_Str) ; + wchar_t *__attribute__((__cdecl__)) wcsupr(wchar_t *_Str) ; + int __attribute__((__cdecl__)) wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2) ; + + + + + + struct tm { + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + }; + + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wasctime(const struct tm *_Tm); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); + wchar_t *__attribute__((__cdecl__)) _wctime32(const __time32_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); + size_t __attribute__((__cdecl__)) wcsftime(wchar_t * __restrict__ _Buf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,const struct tm * __restrict__ _Tm); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _wcsftime_l(wchar_t * __restrict__ _Buf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,const struct tm * __restrict__ _Tm,_locale_t _Locale); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wstrdate(wchar_t *_Buffer) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wstrtime(wchar_t *_Buffer) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wctime64(const __time64_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); + + + + wchar_t *__attribute__((__cdecl__)) _wctime(const time_t *_Time) ; +# 1426 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + errno_t __attribute__((__cdecl__)) _wctime_s(wchar_t *, size_t, const time_t *); +# 1445 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + typedef int mbstate_t; + + typedef wchar_t _Wint_t; + + wint_t __attribute__((__cdecl__)) btowc(int); + size_t __attribute__((__cdecl__)) mbrlen(const char * __restrict__ _Ch,size_t _SizeInBytes,mbstate_t * __restrict__ _State); + size_t __attribute__((__cdecl__)) mbrtowc(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SizeInBytes,mbstate_t * __restrict__ _State); + size_t __attribute__((__cdecl__)) mbsrtowcs(wchar_t * __restrict__ _Dest,const char ** __restrict__ _PSrc,size_t _Count,mbstate_t * __restrict__ _State) ; + size_t __attribute__((__cdecl__)) wcrtomb(char * __restrict__ _Dest,wchar_t _Source,mbstate_t * __restrict__ _State) ; + size_t __attribute__((__cdecl__)) wcsrtombs(char * __restrict__ _Dest,const wchar_t ** __restrict__ _PSource,size_t _Count,mbstate_t * __restrict__ _State) ; + int __attribute__((__cdecl__)) wctob(wint_t _WCh); + + + wchar_t *__attribute__((__cdecl__)) wmemset(wchar_t *s, wchar_t c, size_t n); + wchar_t *__attribute__((__cdecl__)) wmemchr(const wchar_t *s, wchar_t c, size_t n); + int __attribute__((__cdecl__)) wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n); + wchar_t *__attribute__((__cdecl__)) wmemcpy(wchar_t * __restrict__ s1,const wchar_t * __restrict__ s2,size_t n) ; + wchar_t * __attribute__((__cdecl__)) wmempcpy (wchar_t *_Dst, const wchar_t *_Src, size_t _Size); + wchar_t *__attribute__((__cdecl__)) wmemmove(wchar_t *s1, const wchar_t *s2, size_t n) ; + int __attribute__((__cdecl__)) fwide(FILE *stream,int mode); + + + + + int __attribute__((__cdecl__)) mbsinit(const mbstate_t *ps); + + __extension__ long long __attribute__((__cdecl__)) wcstoll(const wchar_t * __restrict__ nptr,wchar_t ** __restrict__ endptr, int base); + __extension__ unsigned long long __attribute__((__cdecl__)) wcstoull(const wchar_t * __restrict__ nptr,wchar_t ** __restrict__ endptr, int base); + + + void *__attribute__((__cdecl__)) memmove(void *_Dst,const void *_Src,size_t _MaxCount); + void *__attribute__((__cdecl__)) memcpy(void * __restrict__ _Dst,const void * __restrict__ _Src,size_t _MaxCount) ; +# 1528 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +int __attribute__((__cdecl__)) __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen); +# 1542 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +int __attribute__((__cdecl__)) __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen); +# 1551 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +void __attribute__((__cdecl__)) __mingw_str_free(void *ptr); + + + + +} + + +#pragma pack(pop) + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 1 3 +# 9 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 2 3 +# 21 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 3 +extern "C" { + + + + + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _waccess_s (const wchar_t *_Filename,int _AccessMode); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wmktemp_s (wchar_t *_TemplateName,size_t _SizeInWords); + + + + + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _cgetws_s (wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _cwprintf_s (const wchar_t *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwscanf_s(const wchar_t *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vcwprintf_s (const wchar_t *_Format,va_list _ArgList); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _cwprintf_s_l (const wchar_t *_Format,_locale_t _Locale,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vcwprintf_s_l (const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _getws_s(wchar_t *_Str,size_t _SizeInWords); + extern "C++" { template inline wchar_t* __attribute__((__cdecl__)) _getws_s(wchar_t (&_DstBuf)[__size]) { return _getws_s(_DstBuf,__size); } } +# 249 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 3 + int __attribute__((__cdecl__)) fwprintf_s(FILE *_File,const wchar_t *_Format,...); + int __attribute__((__cdecl__)) wprintf_s(const wchar_t *_Format,...); + int __attribute__((__cdecl__)) vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList); + int __attribute__((__cdecl__)) vwprintf_s(const wchar_t *_Format,va_list _ArgList); + + int __attribute__((__cdecl__)) vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); + + int __attribute__((__cdecl__)) swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...); + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) fwscanf_s(FILE *_File, const wchar_t *_Format, ...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) swscanf_s(const wchar_t *_Src,const wchar_t *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) wscanf_s(const wchar_t *_Format, ...); + + + extern "C++" { template inline int __attribute__((__cdecl__)) vswprintf_s(wchar_t (&_Dst)[__size], const wchar_t* _Format, va_list _ArgList) { return vswprintf_s(_Dst,__size,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) swprintf_s(wchar_t (&_Dst)[__size], const wchar_t* _Format, ...) { va_list __vaargs; __builtin_va_start(__vaargs,_Format); int __retval = vswprintf_s(_Dst,__size,_Format,__vaargs); __builtin_va_end(__vaargs); return __retval; } } + extern "C++" { template inline int __attribute__((__cdecl__)) _vsnwprintf_s(wchar_t (&_DstBuf)[__size], size_t _MaxCount, const wchar_t* _Format, va_list _ArgList) { return _vsnwprintf_s(_DstBuf,__size,_MaxCount,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) _snwprintf_s(wchar_t (&_DstBuf)[__size], size_t _MaxCount, const wchar_t* _Format, ...) { va_list __vaargs; __builtin_va_start(__vaargs,_Format); int __retval = _vsnwprintf_s(_DstBuf,__size,_MaxCount,_Format,__vaargs); __builtin_va_end(__vaargs); return __retval; } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wtmpnam_s(wchar_t (&_DstBuf)[__size]) { return _wtmpnam_s(_DstBuf,__size); } } + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcslwr_s(wchar_t *_Str,size_t _SizeInWords); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcslwr_s(wchar_t (&_Str)[__size]) { return _wcslwr_s(_Str,__size); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcslwr_s_l(wchar_t (&_Str)[__size], _locale_t _Locale) { return _wcslwr_s_l(_Str,__size,_Locale); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsupr_s(wchar_t *_Str,size_t _Size); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcsupr_s(wchar_t (&_Str)[__size]) { return _wcsupr_s(_Str,__size); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcsupr_s_l(wchar_t (&_Str)[__size], _locale_t _Locale) { return _wcsupr_s_l(_Str,__size,_Locale); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcscat_s(wchar_t *_Dst, rsize_t _DstSize, const wchar_t *_Src); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcscat_s(wchar_t (&_Dest)[__size], const wchar_t * _Source) { return wcscat_s(_Dest,__size,_Source); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcscpy_s(wchar_t *_Dst, rsize_t _DstSize, const wchar_t *_Src); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcscpy_s(wchar_t (&_Dest)[__size], const wchar_t * _Source) { return wcscpy_s(_Dest,__size,_Source); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsncat_s(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsncat_s_l(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsncpy_s(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsncpy_s_l(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcstok_s_l(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context,_locale_t _Locale); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val,_locale_t _Locale); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsnset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val, size_t _Count,_locale_t _Locale); + + inline __attribute__((__always_inline__)) size_t __attribute__((__cdecl__)) wcsnlen_s(const wchar_t * _src, size_t _count) { + return _src ? wcsnlen(_src, _count) : 0; + } + + + + + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); +# 344 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 3 + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) mbsrtowcs_s(size_t *_Retval,wchar_t *_Dst,size_t _SizeInWords,const char **_PSrc,size_t _N,mbstate_t *_State); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) mbsrtowcs_s(size_t* _Retval, wchar_t (&_Dst)[__size], const char** _PSrc, size_t _N, mbstate_t _State) { return mbsrtowcs_s(_Retval, _Dst, __size, _PSrc, _N, _State); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcrtomb_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,wchar_t _Ch,mbstate_t *_State); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcrtomb_s(size_t* _Retval, char (&_Dst)[__size], wchar_t _Ch, mbstate_t _State) { return wcrtomb_s(_Retval, _Dst, __size, _Ch, _State); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsrtombs_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,const wchar_t **_Src,size_t _Size,mbstate_t *_State); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcsrtombs_s(size_t _Retval, char (&_Dst)[__size], const wchar_t** _Src, size_t _Size, mbstate_t _State) { return wcsrtombs_s(_Retval, _Dst, __size, _Src, _Size, _State); } } + + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) wmemcpy_s (wchar_t *_dest,size_t _numberOfElements,const wchar_t *_src,size_t _count); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) wmemmove_s(wchar_t *_dest,size_t _numberOfElements,const wchar_t *_src,size_t _count); + + + +} +# 1562 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 2 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +namespace std +{ + using ::mbstate_t; +} +# 135 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +extern "C++" +{ +namespace std +{ + + + using ::wint_t; + + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + + using ::swprintf; + + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + + using ::vfwscanf; + + + using ::vswprintf; + + + using ::vswscanf; + + using ::vwprintf; + + using ::vwscanf; + + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + + using ::wcstof; + + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; + + + inline wchar_t* + wcschr(wchar_t* __p, wchar_t __c) + { return wcschr(const_cast(__p), __c); } + + inline wchar_t* + wcspbrk(wchar_t* __s1, const wchar_t* __s2) + { return wcspbrk(const_cast(__s1), __s2); } + + inline wchar_t* + wcsrchr(wchar_t* __p, wchar_t __c) + { return wcsrchr(const_cast(__p), __c); } + + inline wchar_t* + wcsstr(wchar_t* __s1, const wchar_t* __s2) + { return wcsstr(const_cast(__s1), __s2); } + + inline wchar_t* + wmemchr(wchar_t* __p, wchar_t __c, size_t __n) + { return wmemchr(const_cast(__p), __c, __n); } + + + +} +} + + + + + + + +namespace __gnu_cxx +{ + + + + + + using ::wcstold; +# 260 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + using ::wcstoll; + using ::wcstoull; + +} + +namespace std +{ + using ::__gnu_cxx::wcstold; + using ::__gnu_cxx::wcstoll; + using ::__gnu_cxx::wcstoull; +} +# 280 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +namespace std +{ + + using std::wcstof; + + + using std::vfwscanf; + + + using std::vswscanf; + + + using std::vwscanf; + + + + using std::wcstold; + using std::wcstoll; + using std::wcstoull; + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 2 3 +# 68 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 +namespace std +{ + +# 90 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + typedef long long streamoff; + + + + + + + + typedef ptrdiff_t streamsize; +# 111 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + template + class fpos + { + private: + streamoff _M_off; + _StateT _M_state; + + public: + + + + + fpos() + : _M_off(0), _M_state() { } +# 133 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + fpos(streamoff __off) + : _M_off(__off), _M_state() { } + + + fpos(const fpos&) = default; + fpos& operator=(const fpos&) = default; + ~fpos() = default; + + + + operator streamoff() const { return _M_off; } + + + void + state(_StateT __st) + { _M_state = __st; } + + + _StateT + state() const + { return _M_state; } + + + + + + fpos& + operator+=(streamoff __off) + { + _M_off += __off; + return *this; + } + + + + + + fpos& + operator-=(streamoff __off) + { + _M_off -= __off; + return *this; + } + + + + + + + + fpos + operator+(streamoff __off) const + { + fpos __pos(*this); + __pos += __off; + return __pos; + } + + + + + + + + fpos + operator-(streamoff __off) const + { + fpos __pos(*this); + __pos -= __off; + return __pos; + } + + + + + + + streamoff + operator-(const fpos& __other) const + { return _M_off - __other._M_off; } + }; + + + + + + + template + inline bool + operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) == streamoff(__rhs); } + + template + inline bool + operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) != streamoff(__rhs); } + + + + + + typedef fpos streampos; + + typedef fpos wstreampos; + + + + typedef fpos u8streampos; + + + + + typedef fpos u16streampos; + + typedef fpos u32streampos; + + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 2 3 + +namespace std +{ + +# 74 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 3 + class ios_base; + + template > + class basic_ios; + + template > + class basic_streambuf; + + template > + class basic_istream; + + template > + class basic_ostream; + + template > + class basic_iostream; + + +namespace __cxx11 { + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + +} + + template > + class basic_filebuf; + + template > + class basic_ifstream; + + template > + class basic_ofstream; + + template > + class basic_fstream; + + template > + class istreambuf_iterator; + + template > + class ostreambuf_iterator; + + + + typedef basic_ios ios; + + + typedef basic_streambuf streambuf; + + + typedef basic_istream istream; + + + typedef basic_ostream ostream; + + + typedef basic_iostream iostream; + + + typedef basic_stringbuf stringbuf; + + + typedef basic_istringstream istringstream; + + + typedef basic_ostringstream ostringstream; + + + typedef basic_stringstream stringstream; + + + typedef basic_filebuf filebuf; + + + typedef basic_ifstream ifstream; + + + typedef basic_ofstream ofstream; + + + typedef basic_fstream fstream; + + + + typedef basic_ios wios; + + + typedef basic_streambuf wstreambuf; + + + typedef basic_istream wistream; + + + typedef basic_ostream wostream; + + + typedef basic_iostream wiostream; + + + typedef basic_stringbuf wstringbuf; + + + typedef basic_istringstream wistringstream; + + + typedef basic_ostringstream wostringstream; + + + typedef basic_stringstream wstringstream; + + + typedef basic_filebuf wfilebuf; + + + typedef basic_ifstream wifstream; + + + typedef basic_ofstream wofstream; + + + typedef basic_fstream wfstream; + + + + +} +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 3 + + + +namespace std +{ + + + + + + + + + template, typename _Dist = ptrdiff_t> + class istream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + private: + istream_type* _M_stream; + _Tp _M_value; + + + + bool _M_ok; + + public: + + constexpr istream_iterator() + : _M_stream(0), _M_value(), _M_ok(false) {} + + + istream_iterator(istream_type& __s) + : _M_stream(std::__addressof(__s)), _M_ok(true) + { _M_read(); } + + istream_iterator(const istream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_value(__obj._M_value), + _M_ok(__obj._M_ok) + { } + + + constexpr + istream_iterator(default_sentinel_t) + noexcept(is_nothrow_default_constructible_v<_Tp>) + : istream_iterator() { } + + + + istream_iterator& operator=(const istream_iterator&) = default; + ~istream_iterator() = default; + + + const _Tp& + operator*() const + { + + + ; + return _M_value; + } + + const _Tp* + operator->() const { return std::__addressof((operator*())); } + + istream_iterator& + operator++() + { + + + ; + _M_read(); + return *this; + } + + istream_iterator + operator++(int) + { + + + ; + istream_iterator __tmp = *this; + _M_read(); + return __tmp; + } + + private: + bool + _M_equal(const istream_iterator& __x) const + { + + + return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); + } + + void + _M_read() + { + if (_M_stream && !(*_M_stream >> _M_value)) + { + _M_stream = 0; + _M_ok = false; + } + } + + + + friend bool + operator==(const istream_iterator& __x, const istream_iterator& __y) + { return __x._M_equal(__y); } + + + + friend bool + operator!=(const istream_iterator& __x, const istream_iterator& __y) + { return !__x._M_equal(__y); } + + + friend bool + operator==(const istream_iterator& __i, default_sentinel_t) + { return !__i._M_stream; } + + }; +# 174 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 3 + template > + class ostream_iterator + : public iterator + { + public: + + + + using difference_type = ptrdiff_t; + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + private: + ostream_type* _M_stream; + const _CharT* _M_string; + + public: + + constexpr ostream_iterator() noexcept + : _M_stream(nullptr), _M_string(nullptr) { } + + + + ostream_iterator(ostream_type& __s) + : _M_stream(std::__addressof(__s)), _M_string(0) {} +# 214 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 3 + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(std::__addressof(__s)), _M_string(__c) { } + + + ostream_iterator(const ostream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } + + + ostream_iterator& operator=(const ostream_iterator&) = default; + + + + + ostream_iterator& + operator=(const _Tp& __value) + { + + + ; + *_M_stream << __value; + if (_M_string) + *_M_stream << _M_string; + return *this; + } + + ostream_iterator& + operator*() + { return *this; } + + ostream_iterator& + operator++() + { return *this; } + + ostream_iterator& + operator++(int) + { return *this; } + }; + + + + +} +# 66 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++locale.h" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++locale.h" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++locale.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 3 + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 1 3 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +#pragma pack(push,_CRT_PACKING) + + + + + + + + + + + +extern "C" { +# 93 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +__attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __acrt_iob_func(unsigned index); + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __iob_func(void); +# 115 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __extension__ typedef long long fpos_t; +# 156 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +extern + __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp); +extern + __attribute__((__format__ (gnu_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_scanf(const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vscanf(const char * __restrict__ Format, va_list argp); +extern + __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp); + +extern + __attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_vsnprintf(char * __restrict__ _DstBuf,size_t _MaxCount,const char * __restrict__ _Format, + va_list _ArgList); +extern + __attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_snprintf(char * __restrict__ s, size_t n, const char * __restrict__ format, ...); +extern + __attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__((nonnull (1,2))) + int __attribute__((__cdecl__)) __mingw_asprintf(char ** __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__((nonnull (1,2))) + int __attribute__((__cdecl__)) __mingw_vasprintf(char ** __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); + +extern + __attribute__((__format__ (ms_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (ms_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_scanf(const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (ms_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); + +extern + __attribute__((__format__ (ms_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +# 285 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +extern "C++" { + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) +int sscanf(const char *__source, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsscanf( __source, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) +int scanf(const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfscanf( (__acrt_iob_func(0)), __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) +int fscanf(FILE *__stream, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfscanf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) +int vsscanf (const char *__source, const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vsscanf( __source, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 1, 0))) __attribute__ ((__nonnull__ (1))) +int vscanf(const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfscanf( (__acrt_iob_func(0)), __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) +int vfscanf (FILE *__stream, const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfscanf( __stream, __format, __local_argv ); +} + + +#pragma GCC diagnostic pop + + + + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) +int fprintf (FILE *__stream, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfprintf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) +int printf (const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfprintf( (__acrt_iob_func(1)), __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} +# 394 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) +int sprintf (char *__stream, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsprintf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) +int vfprintf (FILE *__stream, const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfprintf( __stream, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) +int vprintf (const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfprintf( (__acrt_iob_func(1)), __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) +int vsprintf (char *__stream, const char *__format, __builtin_va_list __local_argv) +{ +# 433 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + return __mingw_vsprintf( __stream, __format, __local_argv ); +} +# 449 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) +int snprintf (char *__stream, size_t __n, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsnprintf( __stream, __n, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) +int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_list __local_argv) +{ + + + + return __mingw_vsnprintf( __stream, __n, __format, __local_argv ); +} +# 479 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +} +# 603 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _filbuf(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _flsbuf(int _Ch,FILE *_File); + + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fsopen(const char *_Filename,const char *_Mode,int _ShFlag); + + void __attribute__((__cdecl__)) clearerr(FILE *_File); + int __attribute__((__cdecl__)) fclose(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fcloseall(void); + + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fdopen(int _FileHandle,const char *_Mode); + + int __attribute__((__cdecl__)) feof(FILE *_File); + int __attribute__((__cdecl__)) ferror(FILE *_File); + int __attribute__((__cdecl__)) fflush(FILE *_File); + int __attribute__((__cdecl__)) fgetc(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fgetchar(void); + int __attribute__((__cdecl__)) fgetpos(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); + int __attribute__((__cdecl__)) fgetpos64(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); + char *__attribute__((__cdecl__)) fgets(char * __restrict__ _Buf,int _MaxCount,FILE * __restrict__ _File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fileno(FILE *_File); + + + + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _tempnam(const char *_DirName,const char *_FilePrefix); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _flushall(void); + FILE *__attribute__((__cdecl__)) fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) ; + FILE *fopen64(const char * __restrict__ filename,const char * __restrict__ mode); + int __attribute__((__cdecl__)) fputc(int _Ch,FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fputchar(int _Ch); + int __attribute__((__cdecl__)) fputs(const char * __restrict__ _Str,FILE * __restrict__ _File); + size_t __attribute__((__cdecl__)) fread(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File); + FILE *__attribute__((__cdecl__)) freopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode,FILE * __restrict__ _File) ; + int __attribute__((__cdecl__)) fsetpos(FILE *_File,const fpos_t *_Pos); + int __attribute__((__cdecl__)) fsetpos64(FILE *_File,const fpos_t *_Pos); + int __attribute__((__cdecl__)) fseek(FILE *_File,long _Offset,int _Origin); + long __attribute__((__cdecl__)) ftell(FILE *_File); + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fseeki64(FILE *_File,long long _Offset,int _Origin); + __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _ftelli64(FILE *_File); +# 662 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + int fseeko64(FILE* stream, _off64_t offset, int whence); + int fseeko(FILE* stream, _off_t offset, int whence); + + _off_t ftello(FILE * stream); + _off64_t ftello64(FILE * stream); +# 683 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + size_t __attribute__((__cdecl__)) fwrite(const void * __restrict__ _Str,size_t _Size,size_t _Count,FILE * __restrict__ _File); + int __attribute__((__cdecl__)) getc(FILE *_File); + int __attribute__((__cdecl__)) getchar(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _getmaxstdio(void); + char *__attribute__((__cdecl__)) gets(char *_Buffer) ; + int __attribute__((__cdecl__)) _getw(FILE *_File); + + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _pclose(FILE *_File); + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _popen(const char *_Command,const char *_Mode); + + + + + + int __attribute__((__cdecl__)) putc(int _Ch,FILE *_File); + int __attribute__((__cdecl__)) putchar(int _Ch); + int __attribute__((__cdecl__)) puts(const char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putw(int _Word,FILE *_File); + + + int __attribute__((__cdecl__)) remove(const char *_Filename); + int __attribute__((__cdecl__)) rename(const char *_OldFilename,const char *_NewFilename); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _unlink(const char *_Filename); + + int __attribute__((__cdecl__)) unlink(const char *_Filename) ; + + + void __attribute__((__cdecl__)) rewind(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _rmtmp(void); + void __attribute__((__cdecl__)) setbuf(FILE * __restrict__ _File,char * __restrict__ _Buffer) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _setmaxstdio(int _Max); + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _set_output_format(unsigned int _Format); + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _get_output_format(void); + int __attribute__((__cdecl__)) setvbuf(FILE * __restrict__ _File,char * __restrict__ _Buf,int _Mode,size_t _Size); +# 743 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf(const char * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const char * __restrict__ _Format,...) ; + + FILE *__attribute__((__cdecl__)) tmpfile(void) ; + char *__attribute__((__cdecl__)) tmpnam(char *_Buffer); + int __attribute__((__cdecl__)) ungetc(int _Ch,FILE *_File); +# 765 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__((__format__ (ms_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...) ; + __attribute__((__format__ (ms_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) ; +# 924 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf(const char * __restrict__ _Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_printf_count_output(int _Value); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _get_printf_count_output(void); +# 1442 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _lock_file(FILE *_File); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _unlock_file(FILE *_File); +# 1460 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + char *__attribute__((__cdecl__)) tempnam(const char *_Directory,const char *_FilePrefix) ; + int __attribute__((__cdecl__)) fcloseall(void) ; + FILE *__attribute__((__cdecl__)) fdopen(int _FileHandle,const char *_Format) ; + int __attribute__((__cdecl__)) fgetchar(void) ; + int __attribute__((__cdecl__)) fileno(FILE *_File) ; + int __attribute__((__cdecl__)) flushall(void) ; + int __attribute__((__cdecl__)) fputchar(int _Ch) ; + int __attribute__((__cdecl__)) getw(FILE *_File) ; + int __attribute__((__cdecl__)) putw(int _Ch,FILE *_File) ; + int __attribute__((__cdecl__)) rmtmp(void) ; +# 1540 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); + + + + +} + + + + + + + +#pragma pack(pop) + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 1 3 +# 9 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 2 3 +# 21 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 3 +extern "C" { + + + + + + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) clearerr_s(FILE *_File); + + size_t __attribute__((__cdecl__)) fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); +# 494 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 3 + int __attribute__((__cdecl__)) fprintf_s(FILE *_File,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fscanf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) fscanf_s(FILE *_File, const char *_Format, ...); + int __attribute__((__cdecl__)) printf_s(const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scanf_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scanf_s_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) scanf_s(const char *_Format, ...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fscanf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sscanf_l(const char *_Src,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sscanf_s_l(const char *_Src,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) sscanf_s(const char *_Src,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_s(const char *_Src,size_t _MaxCount,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_s_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + int __attribute__((__cdecl__)) vfprintf_s(FILE *_File,const char *_Format,va_list _ArgList); + int __attribute__((__cdecl__)) vprintf_s(const char *_Format,va_list _ArgList); + + int __attribute__((__cdecl__)) vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); + + __attribute__((dllimport)) int __attribute__((__cdecl__)) vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList); + + __attribute__((dllimport)) int __attribute__((__cdecl__)) sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,...); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_p(FILE *_File,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_p(const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_p(FILE *_File,const char *_Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_p(const char *_Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_p(const char *_Format,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vscprintf_p(const char *_Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_p_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_l(char *_DstBuf,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_l(char *_DstBuf,const char *_Format,_locale_t,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_p_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_s_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *,_locale_t _Locale,va_list _ArgList); + + + extern "C++" { template inline int __attribute__((__cdecl__)) vsnprintf_s(char (&_DstBuf)[__size], size_t _MaxCount, const char* _Format, va_list _ArgList) { return vsnprintf_s(_DstBuf,__size,_MaxCount,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) _vsnprintf_s(char (&_DstBuf)[__size], size_t _MaxCount, const char* _Format, va_list _ArgList) { return _vsnprintf_s(_DstBuf,__size,_MaxCount,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) vsprintf_s(char (&_DstBuf)[__size], const char* _Format, va_list _ArgList) { return vsprintf_s(_DstBuf,__size,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) sprintf_s(char (&_DstBuf)[__size], const char* _Format, ...) { va_list __vaargs; __builtin_va_start(__vaargs,_Format); int __retval = vsprintf_s(_DstBuf,__size,_Format,__vaargs); __builtin_va_end(__vaargs); return __retval; } } + extern "C++" { template inline int __attribute__((__cdecl__)) _snprintf_s(char (&_DstBuf)[__size], size_t _MaxCount, const char* _Format, ...) { va_list __vaargs; __builtin_va_start(__vaargs,_Format); int __retval = _vsnprintf_s(_DstBuf,__size,_MaxCount,_Format,__vaargs); __builtin_va_end(__vaargs); return __retval; } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) fopen_s(FILE **_File,const char *_Filename,const char *_Mode); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) freopen_s(FILE** _File, const char *_Filename, const char *_Mode, FILE *_Stream); + + __attribute__ ((__dllimport__)) char* __attribute__((__cdecl__)) gets_s(char*,rsize_t); + extern "C++" { template inline char* __attribute__((__cdecl__)) get_s(char (&_DstBuf)[__size]) { return get_s(_DstBuf,__size); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) tmpnam_s(char*,rsize_t); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) tmpnam_s(char (&_DstBuf)[__size]) { return tmpnam_s(_DstBuf,__size); } } +# 872 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 3 +} +# 1559 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 2 3 +# 13 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 2 3 + + +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 45 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 3 + struct lconv { + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + + wchar_t* _W_decimal_point; + wchar_t* _W_thousands_sep; + wchar_t* _W_int_curr_symbol; + wchar_t* _W_currency_symbol; + wchar_t* _W_mon_decimal_point; + wchar_t* _W_mon_thousands_sep; + wchar_t* _W_positive_sign; + wchar_t* _W_negative_sign; + + }; +# 89 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 3 + int __attribute__((__cdecl__)) _configthreadlocale(int _Flag); + char *__attribute__((__cdecl__)) setlocale(int _Category,const char *_Locale); + __attribute__ ((__dllimport__)) struct lconv *__attribute__((__cdecl__)) localeconv(void); + __attribute__ ((__dllimport__)) _locale_t __attribute__((__cdecl__)) _get_current_locale(void); + __attribute__ ((__dllimport__)) _locale_t __attribute__((__cdecl__)) _create_locale(int _Category,const char *_Locale); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _free_locale(_locale_t _Locale); + _locale_t __attribute__((__cdecl__)) __get_current_locale(void); + _locale_t __attribute__((__cdecl__)) __create_locale(int _Category,const char *_Locale); + void __attribute__((__cdecl__)) __free_locale(_locale_t _Locale); + + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) ___lc_codepage_func(void); +# 113 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 3 +} + + +#pragma pack(pop) +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 2 3 +# 51 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 3 +namespace std +{ + using ::lconv; + using ::setlocale; + using ::localeconv; +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++locale.h" 2 3 + + + +namespace std +{ + + + typedef int* __c_locale; + + + + + + inline int + __convert_from_v(const __c_locale&, char* __out, + const int __size __attribute__((__unused__)), + const char* __fmt, ...) + { + char* __old = std::setlocale(4, 0); + char* __sav = 0; + if (__builtin_strcmp(__old, "C")) + { + const size_t __len = __builtin_strlen(__old) + 1; + __sav = new char[__len]; + __builtin_memcpy(__sav, __old, __len); + std::setlocale(4, "C"); + } + + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + + + const int __ret = __mingw_vsnprintf(__out, __size, __fmt, __args); + + + + + __builtin_va_end(__args); + + if (__sav) + { + std::setlocale(4, __sav); + delete [] __sav; + } + return __ret; + } + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 3 + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 1 3 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 3 +extern "C" { +# 80 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 3 + extern const unsigned char __newclmap[]; + extern const unsigned char __newcumap[]; + extern pthreadlocinfo __ptlocinfo; + extern pthreadmbcinfo __ptmbcinfo; + extern int __globallocalestatus; + extern int __locale_changed; + extern struct threadlocaleinfostruct __initiallocinfo; + extern _locale_tstruct __initiallocalestructinfo; + pthreadlocinfo __attribute__((__cdecl__)) __updatetlocinfo(void); + pthreadmbcinfo __attribute__((__cdecl__)) __updatetmbcinfo(void); +# 108 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isctype(int _C,int _Type); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isctype_l(int _C,int _Type,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isalpha(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isalpha_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isupper(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isupper_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) islower(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _islower_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isdigit(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isdigit_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isxdigit(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isxdigit_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isspace(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isspace_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) ispunct(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _ispunct_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isalnum(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isalnum_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isprint(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isprint_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isgraph(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isgraph_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) iscntrl(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iscntrl_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) toupper(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) tolower(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _tolower(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _tolower_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _toupper(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _toupper_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __isascii(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __toascii(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __iscsymf(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __iscsym(int _C); + + +int __attribute__((__cdecl__)) isblank(int _C); +# 297 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 3 +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 2 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 3 +namespace std +{ + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; +} + + + + + + + +namespace std +{ + using ::isblank; +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 2 3 + +namespace std +{ + +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 3 + class locale; + + template + bool + has_facet(const locale&) throw(); + + template + const _Facet& + use_facet(const locale&); + + + template + bool + isspace(_CharT, const locale&); + + template + bool + isprint(_CharT, const locale&); + + template + bool + iscntrl(_CharT, const locale&); + + template + bool + isupper(_CharT, const locale&); + + template + bool + islower(_CharT, const locale&); + + template + bool + isalpha(_CharT, const locale&); + + template + bool + isdigit(_CharT, const locale&); + + template + bool + ispunct(_CharT, const locale&); + + template + bool + isxdigit(_CharT, const locale&); + + template + bool + isalnum(_CharT, const locale&); + + template + bool + isgraph(_CharT, const locale&); + + + template + bool + isblank(_CharT, const locale&); + + + template + _CharT + toupper(_CharT, const locale&); + + template + _CharT + tolower(_CharT, const locale&); + + + struct ctype_base; + template + class ctype; + template<> class ctype; + + template<> class ctype; + + template + class ctype_byname; + + + class codecvt_base; + template + class codecvt; + template<> class codecvt; + + template<> class codecvt; + + + template<> class codecvt; + template<> class codecvt; + + template<> class codecvt; + template<> class codecvt; + + + template + class codecvt_byname; + + + + template > + class num_get; + template > + class num_put; + +namespace __cxx11 { + template class numpunct; + template class numpunct_byname; +} + +namespace __cxx11 { + + template + class collate; + template + class collate_byname; +} + + + class time_base; +namespace __cxx11 { + template > + class time_get; + template > + class time_get_byname; +} + template > + class time_put; + template > + class time_put_byname; + + + class money_base; +namespace __cxx11 { + template > + class money_get; + template > + class money_put; +} +namespace __cxx11 { + template + class moneypunct; + template + class moneypunct_byname; +} + + + struct messages_base; +namespace __cxx11 { + template + class messages; + template + class messages_byname; +} + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr.h" 1 3 +# 30 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr.h" 3 +#pragma GCC visibility push(default) +# 148 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 1 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 1 3 4 +# 13 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 3 4 +extern "C" { +# 24 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 3 4 + __attribute__ ((__dllimport__)) extern unsigned long __attribute__((__cdecl__)) __threadid(void); + + __attribute__ ((__dllimport__)) extern uintptr_t __attribute__((__cdecl__)) __threadhandle(void); + + +} +# 424 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 3 4 +typedef struct { + long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); + long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); +} max_align_t; +# 2 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 2 3 4 +# 63 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/types.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/types.h" 3 +__extension__ +typedef long long _pid_t; + + + + +typedef _pid_t pid_t; + + + + + +typedef unsigned short _mode_t; + + +typedef _mode_t mode_t; + + + + + + +typedef unsigned int useconds_t; + + + + +struct timespec { + time_t tv_sec; + long tv_nsec; +}; + +struct itimerspec { + struct timespec it_interval; + struct timespec it_value; +}; + + + + + +__extension__ +typedef unsigned long long _sigset_t; +# 65 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_startup.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_startup.h" 3 +extern "C" { + + +__attribute__ ((__dllimport__)) char **__attribute__((__cdecl__)) __p__acmdln(void); + + +__attribute__ ((__dllimport__)) wchar_t **__attribute__((__cdecl__)) __p__wcmdln(void); + + +typedef void (__attribute__((__cdecl__)) *_PVFV)(void); +typedef int (__attribute__((__cdecl__)) *_PIFV)(void); +typedef void (__attribute__((__cdecl__)) *_PVFI)(int); + +typedef struct _onexit_table_t { + _PVFV* _first; + _PVFV* _last; + _PVFV* _end; +} _onexit_table_t; + +typedef int (__attribute__((__cdecl__)) *_onexit_t)(void); + +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _initialize_onexit_table(_onexit_table_t*); +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _register_onexit_function(_onexit_table_t*,_onexit_t); +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _execute_onexit_table(_onexit_table_t*); +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _crt_atexit(_PVFV func); +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _crt_at_quick_exit(_PVFV func); + + +} +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 2 3 + + + + + + +extern "C" { +# 32 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 + typedef void (__attribute__((__cdecl__)) *_beginthread_proc_type)(void *); + typedef unsigned ( *_beginthreadex_proc_type)(void *); + + __attribute__ ((__dllimport__)) uintptr_t __attribute__((__cdecl__)) _beginthread(_beginthread_proc_type _StartAddress,unsigned _StackSize,void *_ArgList); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _endthread(void) __attribute__ ((__noreturn__)); + __attribute__ ((__dllimport__)) uintptr_t __attribute__((__cdecl__)) _beginthreadex(void *_Security,unsigned _StackSize,_beginthreadex_proc_type _StartAddress,void *_ArgList,unsigned _InitFlag,unsigned *_ThrdAddr); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _endthreadex(unsigned _Retval) __attribute__ ((__noreturn__)); +# 64 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 + typedef void ( *_tls_callback_type)(void*,unsigned long,void*); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _register_thread_local_exe_atexit_callback(_tls_callback_type callback); + + void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _cexit(void); + void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _c_exit(void); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _getpid(void); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _cwait(int *_TermStat,intptr_t _ProcHandle,int _Action); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execl(const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execle(const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execlp(const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execlpe(const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execv(const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execve(const char *_Filename,const char *const *_ArgList,const char *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execvp(const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execvpe(const char *_Filename,const char *const *_ArgList,const char *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnl(int _Mode,const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnle(int _Mode,const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnlp(int _Mode,const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnlpe(int _Mode,const char *_Filename,const char *_ArgList,...); +# 129 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 + intptr_t __attribute__((__cdecl__)) _loaddll(char *_Filename); + int __attribute__((__cdecl__)) _unloaddll(intptr_t _Handle); + int (__attribute__((__cdecl__)) *__attribute__((__cdecl__)) _getdllprocaddr(intptr_t _Handle,char *_ProcedureName,intptr_t _Ordinal))(void); +# 161 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 + int __attribute__((__cdecl__)) getpid(void) ; + + + + intptr_t __attribute__((__cdecl__)) cwait(int *_TermStat,intptr_t _ProcHandle,int _Action) ; + + int __attribute__((__cdecl__)) execl(const char *_Filename,const char *_ArgList,...) ; + int __attribute__((__cdecl__)) execle(const char *_Filename,const char *_ArgList,...) ; + int __attribute__((__cdecl__)) execlp(const char *_Filename,const char *_ArgList,...) ; + int __attribute__((__cdecl__)) execlpe(const char *_Filename,const char *_ArgList,...) ; + + + + + + + intptr_t __attribute__((__cdecl__)) spawnl(int,const char *_Filename,const char *_ArgList,...) ; + intptr_t __attribute__((__cdecl__)) spawnle(int,const char *_Filename,const char *_ArgList,...) ; + intptr_t __attribute__((__cdecl__)) spawnlp(int,const char *_Filename,const char *_ArgList,...) ; + intptr_t __attribute__((__cdecl__)) spawnlpe(int,const char *_Filename,const char *_ArgList,...) ; + + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) execv(const char *_Filename,char *const _ArgList[]) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) execve(const char *_Filename,char *const _ArgList[],char *const _Env[]) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) execvp(const char *_Filename,char *const _ArgList[]) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) execvpe(const char *_Filename,char *const _ArgList[],char *const _Env[]) ; + + + + + + + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) spawnv(int,const char *_Filename,char *const _ArgList[]) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) spawnve(int,const char *_Filename,char *const _ArgList[],char *const _Env[]) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) spawnvp(int,const char *_Filename,char *const _ArgList[]) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) spawnvpe(int,const char *_Filename,char *const _ArgList[],char *const _Env[]) ; + + + + +} +# 67 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 1 3 4 +# 68 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_signal.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 2 3 + + +extern "C" { + + + + + typedef int sig_atomic_t; +# 48 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 3 + typedef void (*__p_sig_fn_t)(int); +# 57 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 3 + extern void **__attribute__((__cdecl__)) __pxcptinfoptrs(void); + + + __p_sig_fn_t __attribute__((__cdecl__)) signal(int _SigNum,__p_sig_fn_t _Func); + int __attribute__((__cdecl__)) raise(int _SigNum); + + +} +# 69 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 1 3 +# 25 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 1 3 +# 15 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 53 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 + struct __timeb32 { + __time32_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + + + struct timeb { + time_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + + + struct __timeb64 { + __time64_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _ftime64(struct __timeb64 *_Time); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _ftime32(struct __timeb32 *_Time); +# 89 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 +struct _timespec32 { + __time32_t tv_sec; + long tv_nsec; +}; + +struct _timespec64 { + __time64_t tv_sec; + long tv_nsec; +}; +# 113 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 + void __attribute__((__cdecl__)) ftime (struct timeb *); +# 130 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 +} + + +#pragma pack(pop) + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h" 2 3 + + +extern "C" { + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ftime32_s(struct __timeb32 *_Time); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ftime64_s(struct __timeb64 *_Time); +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h" 3 +} +# 136 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 2 3 +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 2 3 + +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 63 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 + typedef long clock_t; +# 129 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 + extern __attribute__ ((__dllimport__)) int _daylight; + extern __attribute__ ((__dllimport__)) long _dstbias; + extern __attribute__ ((__dllimport__)) long _timezone; + extern __attribute__ ((__dllimport__)) char * _tzname[2]; + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_daylight(int *_Daylight); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_dstbias(long *_Daylight_savings_bias); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_timezone(long *_Timezone); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_tzname(size_t *_ReturnValue,char *_Buffer,size_t _SizeInBytes,int _Index); + char *__attribute__((__cdecl__)) asctime(const struct tm *_Tm) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) asctime_s (char *_Buf,size_t _SizeInWords,const struct tm *_Tm); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ctime32(const __time32_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _ctime32_s (char *_Buf,size_t _SizeInBytes,const __time32_t *_Time); + clock_t __attribute__((__cdecl__)) clock(void); + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _difftime32(__time32_t _Time1,__time32_t _Time2); + __attribute__ ((__dllimport__)) struct tm *__attribute__((__cdecl__)) _gmtime32(const __time32_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _gmtime32_s (struct tm *_Tm,const __time32_t *_Time); + __attribute__ ((__dllimport__)) struct tm *__attribute__((__cdecl__)) _localtime32(const __time32_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _localtime32_s (struct tm *_Tm,const __time32_t *_Time); + size_t __attribute__((__cdecl__)) strftime(char * __restrict__ _Buf,size_t _SizeInBytes,const char * __restrict__ _Format,const struct tm * __restrict__ _Tm); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _strftime_l(char * __restrict__ _Buf,size_t _Max_size,const char * __restrict__ _Format,const struct tm * __restrict__ _Tm,_locale_t _Locale); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strdate(char *_Buffer) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _strdate_s (char *_Buf,size_t _SizeInBytes); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strtime(char *_Buffer) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _strtime_s (char *_Buf ,size_t _SizeInBytes); + __attribute__ ((__dllimport__)) __time32_t __attribute__((__cdecl__)) _time32(__time32_t *_Time); + + + + __attribute__ ((__dllimport__)) __time32_t __attribute__((__cdecl__)) _mktime32(struct tm *_Tm); + __attribute__ ((__dllimport__)) __time32_t __attribute__((__cdecl__)) _mkgmtime32(struct tm *_Tm); + + + void __attribute__((__cdecl__)) tzset(void) ; + + + + __attribute__ ((__dllimport__)) + + void __attribute__((__cdecl__)) _tzset(void); + + + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _difftime64(__time64_t _Time1,__time64_t _Time2); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ctime64(const __time64_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _ctime64_s (char *_Buf,size_t _SizeInBytes,const __time64_t *_Time); + __attribute__ ((__dllimport__)) struct tm *__attribute__((__cdecl__)) _gmtime64(const __time64_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _gmtime64_s (struct tm *_Tm,const __time64_t *_Time); + __attribute__ ((__dllimport__)) struct tm *__attribute__((__cdecl__)) _localtime64(const __time64_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _localtime64_s (struct tm *_Tm,const __time64_t *_Time); + __attribute__ ((__dllimport__)) __time64_t __attribute__((__cdecl__)) _mktime64(struct tm *_Tm); + __attribute__ ((__dllimport__)) __time64_t __attribute__((__cdecl__)) _mkgmtime64(struct tm *_Tm); + __attribute__ ((__dllimport__)) __time64_t __attribute__((__cdecl__)) _time64(__time64_t *_Time); + + + + unsigned __attribute__((__cdecl__)) _getsystime(struct tm *_Tm); + unsigned __attribute__((__cdecl__)) _setsystime(struct tm *_Tm,unsigned _MilliSec); +# 246 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 +static __inline time_t __attribute__((__cdecl__)) time(time_t *_Time) { return _time64(_Time); } + + + +static __inline double __attribute__((__cdecl__)) difftime(time_t _Time1,time_t _Time2) { return _difftime64(_Time1,_Time2); } +static __inline struct tm *__attribute__((__cdecl__)) localtime(const time_t *_Time) { return _localtime64(_Time); } +static __inline errno_t __attribute__((__cdecl__)) localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime64_s(_Tm,_Time); } +static __inline struct tm *__attribute__((__cdecl__)) gmtime(const time_t *_Time) { return _gmtime64(_Time); } +static __inline errno_t __attribute__((__cdecl__)) gmtime_s(struct tm *_Tm, const time_t *_Time) { return _gmtime64_s(_Tm, _Time); } +static __inline char *__attribute__((__cdecl__)) ctime(const time_t *_Time) { return _ctime64(_Time); } +static __inline errno_t __attribute__((__cdecl__)) ctime_s(char *_Buf,size_t _SizeInBytes,const time_t *_Time) { return _ctime64_s(_Buf,_SizeInBytes,_Time); } +static __inline time_t __attribute__((__cdecl__)) mktime(struct tm *_Tm) { return _mktime64(_Tm); } +static __inline time_t __attribute__((__cdecl__)) _mkgmtime(struct tm *_Tm) { return _mkgmtime64(_Tm); } +# 275 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 + __attribute__ ((__dllimport__)) extern int daylight ; + __attribute__ ((__dllimport__)) extern long timezone ; + __attribute__ ((__dllimport__)) extern char *tzname[2] ; + void __attribute__((__cdecl__)) tzset(void) ; + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_timeval.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_timeval.h" 3 +struct timeval +{ + long tv_sec; + long tv_usec; +}; +# 282 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 2 3 + + + +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; + + extern int __attribute__((__cdecl__)) mingw_gettimeofday (struct timeval *p, struct timezone *z); + + +#pragma pack(pop) +# 315 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 +} +# 324 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_time.h" 1 3 +# 49 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_time.h" 3 +typedef int clockid_t; +# 78 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_time.h" 3 +extern "C" { + + + + + + + + + +int __attribute__((__cdecl__)) nanosleep(const struct timespec *request, struct timespec *remain); + +int __attribute__((__cdecl__)) clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *request, struct timespec *remain); +int __attribute__((__cdecl__)) clock_getres(clockid_t clock_id, struct timespec *res); +int __attribute__((__cdecl__)) clock_gettime(clockid_t clock_id, struct timespec *tp); +int __attribute__((__cdecl__)) clock_settime(clockid_t clock_id, const struct timespec *tp); + + + + +} +# 325 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 2 3 +# 70 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_compat.h" 1 3 +# 74 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 + + +extern "C" { +# 161 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +void * pthread_timechange_handler_np(void * dummy); +int pthread_delay_np (const struct timespec *interval); +int pthread_num_processors_np(void); +int pthread_set_num_processors_np(int n); +# 181 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +typedef long pthread_once_t; +typedef unsigned pthread_mutexattr_t; +typedef unsigned pthread_key_t; +typedef void *pthread_barrierattr_t; +typedef int pthread_condattr_t; +typedef int pthread_rwlockattr_t; +# 197 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +typedef uintptr_t pthread_t; + +typedef struct _pthread_cleanup _pthread_cleanup; +struct _pthread_cleanup +{ + void (*func)(void *); + void *arg; + _pthread_cleanup *next; +}; +# 226 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +struct sched_param { + int sched_priority; +}; + +int sched_yield(void); +int sched_get_priority_min(int pol); +int sched_get_priority_max(int pol); +int sched_getscheduler(pid_t pid); +int sched_setscheduler(pid_t pid, int pol, const struct sched_param *param); + + + +typedef struct pthread_attr_t pthread_attr_t; +struct pthread_attr_t +{ + unsigned p_state; + void *stack; + size_t s_size; + struct sched_param param; +}; + +int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param); +int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param); +int pthread_getschedparam(pthread_t thread, int *pol, struct sched_param *param); +int pthread_setschedparam(pthread_t thread, int pol, const struct sched_param *param); +int pthread_attr_setschedpolicy (pthread_attr_t *attr, int pol); +int pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *pol); + + +typedef intptr_t pthread_spinlock_t; +typedef intptr_t pthread_mutex_t; +typedef intptr_t pthread_cond_t; +typedef intptr_t pthread_rwlock_t; +typedef void *pthread_barrier_t; +# 278 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +extern void (**_pthread_key_dest)(void *); +int pthread_key_create(pthread_key_t *key, void (* dest)(void *)); +int pthread_key_delete(pthread_key_t key); +void * pthread_getspecific(pthread_key_t key); +int pthread_setspecific(pthread_key_t key, const void *value); + +pthread_t pthread_self(void); +int pthread_once(pthread_once_t *o, void (*func)(void)); +void pthread_testcancel(void); +int pthread_equal(pthread_t t1, pthread_t t2); +void pthread_tls_init(void); +void _pthread_cleanup_dest(pthread_t t); +int pthread_get_concurrency(int *val); +int pthread_set_concurrency(int val); +void pthread_exit(void *res); +void _pthread_invoke_cancel(void); +int pthread_cancel(pthread_t t); +int pthread_kill(pthread_t t, int sig); +unsigned _pthread_get_state(const pthread_attr_t *attr, unsigned flag); +int _pthread_set_state(pthread_attr_t *attr, unsigned flag, unsigned val); +int pthread_setcancelstate(int state, int *oldstate); +int pthread_setcanceltype(int type, int *oldtype); +int pthread_create_wrapper(void *args); +int pthread_create(pthread_t *th, const pthread_attr_t *attr, void *(* func)(void *), void *arg); +int pthread_join(pthread_t t, void **res); +int pthread_detach(pthread_t t); +int pthread_setname_np(pthread_t thread, const char *name); +int pthread_getname_np(pthread_t thread, char *name, size_t len); + + +int pthread_rwlock_init(pthread_rwlock_t *rwlock_, const pthread_rwlockattr_t *attr); +int pthread_rwlock_wrlock(pthread_rwlock_t *l); +int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, const struct timespec *ts); +int pthread_rwlock_rdlock(pthread_rwlock_t *l); +int pthread_rwlock_timedrdlock(pthread_rwlock_t *l, const struct timespec *ts); +int pthread_rwlock_unlock(pthread_rwlock_t *l); +int pthread_rwlock_tryrdlock(pthread_rwlock_t *l); +int pthread_rwlock_trywrlock(pthread_rwlock_t *l); +int pthread_rwlock_destroy (pthread_rwlock_t *l); + +int pthread_cond_init(pthread_cond_t *cv, const pthread_condattr_t *a); +int pthread_cond_destroy(pthread_cond_t *cv); +int pthread_cond_signal (pthread_cond_t *cv); +int pthread_cond_broadcast (pthread_cond_t *cv); +int pthread_cond_wait (pthread_cond_t *cv, pthread_mutex_t *external_mutex); +int pthread_cond_timedwait(pthread_cond_t *cv, pthread_mutex_t *external_mutex, const struct timespec *t); +int pthread_cond_timedwait_relative_np(pthread_cond_t *cv, pthread_mutex_t *external_mutex, const struct timespec *t); + +int pthread_mutex_lock(pthread_mutex_t *m); +int pthread_mutex_timedlock(pthread_mutex_t *m, const struct timespec *ts); +int pthread_mutex_unlock(pthread_mutex_t *m); +int pthread_mutex_trylock(pthread_mutex_t *m); +int pthread_mutex_init(pthread_mutex_t *m, const pthread_mutexattr_t *a); +int pthread_mutex_destroy(pthread_mutex_t *m); + +int pthread_barrier_destroy(pthread_barrier_t *b); +int pthread_barrier_init(pthread_barrier_t *b, const void *attr, unsigned int count); +int pthread_barrier_wait(pthread_barrier_t *b); + +int pthread_spin_init(pthread_spinlock_t *l, int pshared); +int pthread_spin_destroy(pthread_spinlock_t *l); + +int pthread_spin_lock(pthread_spinlock_t *l); +int pthread_spin_trylock(pthread_spinlock_t *l); +int pthread_spin_unlock(pthread_spinlock_t *l); + +int pthread_attr_init(pthread_attr_t *attr); +int pthread_attr_destroy(pthread_attr_t *attr); +int pthread_attr_setdetachstate(pthread_attr_t *a, int flag); +int pthread_attr_getdetachstate(const pthread_attr_t *a, int *flag); +int pthread_attr_setinheritsched(pthread_attr_t *a, int flag); +int pthread_attr_getinheritsched(const pthread_attr_t *a, int *flag); +int pthread_attr_setscope(pthread_attr_t *a, int flag); +int pthread_attr_getscope(const pthread_attr_t *a, int *flag); +int pthread_attr_getstack(const pthread_attr_t *attr, void **stack, size_t *size); +int pthread_attr_setstack(pthread_attr_t *attr, void *stack, size_t size); +int pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stack); +int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stack); +int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *size); +int pthread_attr_setstacksize(pthread_attr_t *attr, size_t size); + +int pthread_mutexattr_init(pthread_mutexattr_t *a); +int pthread_mutexattr_destroy(pthread_mutexattr_t *a); +int pthread_mutexattr_gettype(const pthread_mutexattr_t *a, int *type); +int pthread_mutexattr_settype(pthread_mutexattr_t *a, int type); +int pthread_mutexattr_getpshared(const pthread_mutexattr_t *a, int *type); +int pthread_mutexattr_setpshared(pthread_mutexattr_t * a, int type); +int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *a, int *type); +int pthread_mutexattr_setprotocol(pthread_mutexattr_t *a, int type); +int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *a, int * prio); +int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *a, int prio); +int pthread_getconcurrency(void); +int pthread_setconcurrency(int new_level); + +int pthread_condattr_destroy(pthread_condattr_t *a); +int pthread_condattr_init(pthread_condattr_t *a); +int pthread_condattr_getpshared(const pthread_condattr_t *a, int *s); +int pthread_condattr_setpshared(pthread_condattr_t *a, int s); + + + + + + +int pthread_condattr_getclock (const pthread_condattr_t *attr, + clockid_t *clock_id); +int pthread_condattr_setclock(pthread_condattr_t *attr, + clockid_t clock_id); +int __pthread_clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); + +int pthread_barrierattr_init(void **attr); +int pthread_barrierattr_destroy(void **attr); +int pthread_barrierattr_setpshared(void **attr, int s); +int pthread_barrierattr_getpshared(void **attr, int *s); + + +struct _pthread_cleanup ** pthread_getclean (void); +void * pthread_gethandle (pthread_t t); +void * pthread_getevent (); + +unsigned long long _pthread_rel_time_in_ms(const struct timespec *ts); +unsigned long long _pthread_time_in_ms(void); +unsigned long long _pthread_time_in_ms_from_timespec(const struct timespec *ts); +int _pthread_tryjoin (pthread_t t, void **res); +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *a); +int pthread_rwlockattr_getpshared(pthread_rwlockattr_t *a, int *s); +int pthread_rwlockattr_init(pthread_rwlockattr_t *a); +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *a, int s); +# 417 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_unistd.h" 1 3 +# 418 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 +# 678 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +} +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 2 3 +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; +# 102 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# 299 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +static inline int +__gthread_active_p (void) +{ + return 1; +} +# 659 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return pthread_create (__threadid, __null, __func, __args); +} + +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return pthread_join (__threadid, __value_ptr); +} + +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return pthread_detach (__threadid); +} + +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return pthread_equal (__t1, __t2); +} + +static inline __gthread_t +__gthread_self (void) +{ + return pthread_self (); +} + +static inline int +__gthread_yield (void) +{ + return sched_yield (); +} + +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return pthread_once (__once, __func); + else + return -1; +} + +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return pthread_key_create (__key, __dtor); +} + +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return pthread_key_delete (__key); +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return pthread_getspecific (__key); +} + +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return pthread_setspecific (__key, __ptr); +} + +static inline void +__gthread_mutex_init_function (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + pthread_mutex_init (__mutex, __null); +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return pthread_mutex_destroy (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return pthread_mutex_lock (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return pthread_mutex_trylock (__mutex); + else + return 0; +} + + +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return pthread_mutex_timedlock (__mutex, __abs_timeout); + else + return 0; +} + + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return pthread_mutex_unlock (__mutex); + else + return 0; +} + + + +static inline int +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + { + pthread_mutexattr_t __attr; + int __r; + + __r = pthread_mutexattr_init (&__attr); + if (!__r) + __r = pthread_mutexattr_settype (&__attr, + 2); + if (!__r) + __r = pthread_mutex_init (__mutex, &__attr); + if (!__r) + __r = pthread_mutexattr_destroy (&__attr); + return __r; + } + return 0; +} + + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + + +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} + + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} +# 850 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return pthread_cond_broadcast (__cond); +} + +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return pthread_cond_signal (__cond); +} + +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return pthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return pthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return pthread_cond_destroy (__cond); +} +# 149 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr.h" 2 3 + + +#pragma GCC visibility pop +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/atomic_word.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/atomic_word.h" 3 +typedef int _Atomic_word; +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 2 3 + + + + +namespace __gnu_cxx +{ + + + __attribute__((__always_inline__)) + inline bool + __is_single_threaded() noexcept + { + + + + + + return !__gthread_active_p(); + + } + + + + + + + inline _Atomic_word + __attribute__((__always_inline__)) + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __atomic_fetch_add(__mem, __val, 4); } + + inline void + __attribute__((__always_inline__)) + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __atomic_fetch_add(__mem, __val, 4); } +# 80 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 3 + inline _Atomic_word + __attribute__((__always_inline__)) + __exchange_and_add_single(_Atomic_word* __mem, int __val) + { + _Atomic_word __result = *__mem; + *__mem += __val; + return __result; + } + + inline void + __attribute__((__always_inline__)) + __atomic_add_single(_Atomic_word* __mem, int __val) + { *__mem += __val; } + + inline _Atomic_word + __attribute__ ((__always_inline__)) + __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__is_single_threaded()) + return __exchange_and_add_single(__mem, __val); + else + return __exchange_and_add(__mem, __val); + } + + inline void + __attribute__ ((__always_inline__)) + __atomic_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__is_single_threaded()) + __atomic_add_single(__mem, __val); + else + __atomic_add(__mem, __val); + } + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 2 3 +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 +namespace __gnu_cxx +{ + +# 64 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + struct _Char_types + { + typedef unsigned long int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + typedef std::mbstate_t state_type; + }; +# 89 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + struct char_traits + { + typedef _CharT char_type; + typedef typename _Char_types<_CharT>::int_type int_type; + typedef typename _Char_types<_CharT>::pos_type pos_type; + typedef typename _Char_types<_CharT>::off_type off_type; + typedef typename _Char_types<_CharT>::state_type state_type; + + using comparison_category = std::strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + + static constexpr std::size_t + length(const char_type* __s); + + static constexpr const char_type* + find(const char_type* __s, std::size_t __n, const char_type& __a); + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, std::size_t __n); + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, std::size_t __n); + + static constexpr char_type* + assign(char_type* __s, std::size_t __n, char_type __a); + + static constexpr char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) + { return static_cast(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static constexpr int_type + eof() + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) + { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } + }; + + template + constexpr int + char_traits<_CharT>:: + compare(const char_type* __s1, const char_type* __s2, std::size_t __n) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + template + constexpr std::size_t + char_traits<_CharT>:: + length(const char_type* __p) + { + std::size_t __i = 0; + while (!eq(__p[__i], char_type())) + ++__i; + return __i; + } + + template + constexpr const typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + find(const char_type* __s, std::size_t __n, const char_type& __a) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + template + constexpr + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + move(char_type* __s1, const char_type* __s2, std::size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + { + if (__s1 > __s2 && __s1 < __s2 + __n) + std::copy_backward(__s2, __s2 + __n, __s1 + __n); + else + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + + return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, + __n * sizeof(char_type))); + } + + template + constexpr + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + copy(char_type* __s1, const char_type* __s2, std::size_t __n) + { + + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + + template + constexpr + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + assign(char_type* __s, std::size_t __n, char_type __a) + { + + std::fill_n(__s, __n, __a); + return __s; + } + + +} + +namespace std +{ + +# 255 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + inline __attribute__((__always_inline__)) constexpr bool + __constant_string_p(const _CharT* __s) + { + + (void) __s; + + return __builtin_is_constant_evaluated(); + + + + + + } +# 278 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + inline __attribute__((__always_inline__)) constexpr bool + __constant_char_array_p(const _CharT* __a, size_t __n) + { + + (void) __a; + (void) __n; + + return __builtin_is_constant_evaluated(); + + + + + + + } +# 309 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + struct char_traits : public __gnu_cxx::char_traits<_CharT> + { }; + + + + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { + + return (static_cast(__c1) + < static_cast(__c2)); + } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __constant_char_array_p(__s1, __n) + && __constant_char_array_p(__s2, __n)) + { + for (size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + return __builtin_memcmp(__s1, __s2, __n); + } + + static constexpr size_t + length(const char_type* __s) + { + + if (__constant_string_p(__s)) + return __gnu_cxx::char_traits::length(__s); + + return __builtin_strlen(__s); + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __builtin_constant_p(__a) + && __constant_char_array_p(__s, __n)) + return __gnu_cxx::char_traits::find(__s, __n, __a); + + return static_cast(__builtin_memchr(__s, __a, __n)); + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return static_cast(__builtin_memmove(__s1, __s2, __n)); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return static_cast(__builtin_memcpy(__s1, __s2, __n)); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + if (__n == 0) + return __s; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::assign(__s, __n, __a); + + return static_cast(__builtin_memset(__s, __a, __n)); + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return static_cast(__c); } + + + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return static_cast(static_cast(__c)); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return (__c == eof()) ? 0 : __c; } + }; + + + + + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __constant_char_array_p(__s1, __n) + && __constant_char_array_p(__s2, __n)) + return __gnu_cxx::char_traits::compare(__s1, __s2, __n); + + return wmemcmp(__s1, __s2, __n); + } + + static constexpr size_t + length(const char_type* __s) + { + + if (__constant_string_p(__s)) + return __gnu_cxx::char_traits::length(__s); + + return wcslen(__s); + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __builtin_constant_p(__a) + && __constant_char_array_p(__s, __n)) + return __gnu_cxx::char_traits::find(__s, __n, __a); + + return wmemchr(__s, __a, __n); + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return wmemmove(__s1, __s2, __n); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return wmemcpy(__s1, __s2, __n); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + if (__n == 0) + return __s; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::assign(__s, __n, __a); + + return wmemset(__s, __a, __n); + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return char_type(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return int_type(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast((wint_t)(0xFFFF)); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + + + template<> + struct char_traits + { + typedef char8_t char_type; + typedef unsigned int int_type; + typedef u8streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __constant_char_array_p(__s1, __n) + && __constant_char_array_p(__s2, __n)) + return __gnu_cxx::char_traits::compare(__s1, __s2, __n); + + return __builtin_memcmp(__s1, __s2, __n); + } + + static constexpr size_t + length(const char_type* __s) + { + + if (__constant_string_p(__s)) + return __gnu_cxx::char_traits::length(__s); + + size_t __i = 0; + while (!eq(__s[__i], char_type())) + ++__i; + return __i; + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __builtin_constant_p(__a) + && __constant_char_array_p(__s, __n)) + return __gnu_cxx::char_traits::find(__s, __n, __a); + + return static_cast(__builtin_memchr(__s, __a, __n)); + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return static_cast(__builtin_memmove(__s1, __s2, __n)); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return static_cast(__builtin_memcpy(__s1, __s2, __n)); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + if (__n == 0) + return __s; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::assign(__s, __n, __a); + + return static_cast(__builtin_memset(__s, __a, __n)); + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return char_type(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return int_type(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + + +} + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 3 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stdint.h" 1 3 4 +# 9 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stdint.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdint.h" 1 3 4 +# 32 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdint.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 1 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 1 3 4 +# 2 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 2 3 4 +# 33 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdint.h" 2 3 4 + + +typedef signed char int8_t; +typedef unsigned char uint8_t; +typedef short int16_t; +typedef unsigned short uint16_t; +typedef int int32_t; +typedef unsigned uint32_t; +__extension__ typedef long long int64_t; +__extension__ typedef unsigned long long uint64_t; + + +typedef signed char int_least8_t; +typedef unsigned char uint_least8_t; +typedef short int_least16_t; +typedef unsigned short uint_least16_t; +typedef int int_least32_t; +typedef unsigned uint_least32_t; +__extension__ typedef long long int_least64_t; +__extension__ typedef unsigned long long uint_least64_t; + + + + + +typedef signed char int_fast8_t; +typedef unsigned char uint_fast8_t; +typedef short int_fast16_t; +typedef unsigned short uint_fast16_t; +typedef int int_fast32_t; +typedef unsigned int uint_fast32_t; +__extension__ typedef long long int_fast64_t; +__extension__ typedef unsigned long long uint_fast64_t; + + +__extension__ typedef long long intmax_t; +__extension__ typedef unsigned long long uintmax_t; +# 10 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stdint.h" 2 3 4 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 2 3 + + +namespace std +{ + + using ::int8_t; + using ::int16_t; + using ::int32_t; + using ::int64_t; + + using ::int_fast8_t; + using ::int_fast16_t; + using ::int_fast32_t; + using ::int_fast64_t; + + using ::int_least8_t; + using ::int_least16_t; + using ::int_least32_t; + using ::int_least64_t; + + using ::intmax_t; + using ::intptr_t; + + using ::uint8_t; + using ::uint16_t; + using ::uint32_t; + using ::uint64_t; + + using ::uint_fast8_t; + using ::uint_fast16_t; + using ::uint_fast32_t; + using ::uint_fast64_t; + + using ::uint_least8_t; + using ::uint_least16_t; + using ::uint_least32_t; + using ::uint_least64_t; + + using ::uintmax_t; + using ::uintptr_t; + + + + + +} +# 700 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 2 3 + +namespace std +{ + + + template<> + struct char_traits + { + typedef char16_t char_type; + + typedef uint_least16_t int_type; + + + + + + typedef streamoff off_type; + typedef u16streampos pos_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + for (size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + static constexpr size_t + length(const char_type* __s) + { + size_t __i = 0; + while (!eq(__s[__i], char_type())) + ++__i; + return __i; + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + for (size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return (static_cast + (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return (static_cast + (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + for (size_t __i = 0; __i < __n; ++__i) + assign(__s[__i], __a); + return __s; + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return char_type(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return __c == eof() ? int_type(0xfffd) : int_type(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + template<> + struct char_traits + { + typedef char32_t char_type; + + typedef uint_least32_t int_type; + + + + + + typedef streamoff off_type; + typedef u32streampos pos_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + for (size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + static constexpr size_t + length(const char_type* __s) + { + size_t __i = 0; + while (!eq(__s[__i], char_type())) + ++__i; + return __i; + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + for (size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return (static_cast + (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return (static_cast + (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + for (size_t __i = 0; __i < __n; ++__i) + assign(__s[__i], __a); + return __s; + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return char_type(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return int_type(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + + namespace __detail + { + template + constexpr auto + __char_traits_cmp_cat(int __cmp) noexcept + { + if constexpr (requires { typename _ChTraits::comparison_category; }) + { + using _Cat = typename _ChTraits::comparison_category; + static_assert( !is_void_v> ); + return static_cast<_Cat>(__cmp <=> 0); + } + else + return static_cast(__cmp <=> 0); + } + } + + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 1 3 +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++allocator.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++allocator.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 1 3 +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 +namespace __gnu_cxx +{ + +# 54 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + template + class new_allocator + { + public: + typedef _Tp value_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; +# 75 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + typedef std::true_type propagate_on_container_move_assignment; + + + constexpr + new_allocator() noexcept { } + + constexpr + new_allocator(const new_allocator&) noexcept { } + + template + constexpr + new_allocator(const new_allocator<_Tp1>&) noexcept { } +# 102 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + [[__nodiscard__]] _Tp* + allocate(size_type __n, const void* = static_cast(0)) + { + + + + static_assert(sizeof(_Tp) != 0, "cannot allocate incomplete types"); + + + if (__builtin_expect(__n > this->_M_max_size(), false)) + { + + + if (__n > (std::size_t(-1) / sizeof(_Tp))) + std::__throw_bad_array_new_length(); + std::__throw_bad_alloc(); + } + + + if (alignof(_Tp) > 16) + { + std::align_val_t __al = std::align_val_t(alignof(_Tp)); + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), __al)); + } + + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + } + + + void + deallocate(_Tp* __p, size_type __t __attribute__ ((__unused__))) + { + + if (alignof(_Tp) > 16) + { + ::operator delete(__p, + + __t * sizeof(_Tp), + + std::align_val_t(alignof(_Tp))); + return; + } + + ::operator delete(__p + + , __t * sizeof(_Tp) + + ); + } +# 181 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + template + friend constexpr bool + operator==(const new_allocator&, const new_allocator<_Up>&) + noexcept + { return true; } +# 195 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + private: + constexpr size_type + _M_max_size() const noexcept + { + + return std::size_t(0x7fffffffffffffffLL) / sizeof(_Tp); + + + + } + }; + + +} +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++allocator.h" 2 3 + + +namespace std +{ +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++allocator.h" 3 + template + using __allocator_base = __gnu_cxx::new_allocator<_Tp>; +} +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 2 3 + + + + + + + +namespace std +{ + +# 71 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + template<> + class allocator + { + public: + typedef void value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; +# 92 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + typedef true_type propagate_on_container_move_assignment; + + typedef true_type is_always_equal; + + + allocator() = default; + + template + constexpr + allocator(const allocator<_Up>&) noexcept { } +# 126 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + }; +# 137 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + template + class allocator : public __allocator_base<_Tp> + { + public: + typedef _Tp value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; +# 160 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + typedef true_type propagate_on_container_move_assignment; + + typedef true_type is_always_equal; + + + + + constexpr + allocator() noexcept { } + + constexpr + allocator(const allocator& __a) noexcept + : __allocator_base<_Tp>(__a) { } + + + + allocator& operator=(const allocator&) = default; + + + template + constexpr + allocator(const allocator<_Tp1>&) noexcept { } + + + constexpr + + ~allocator() noexcept { } + + + [[nodiscard,__gnu__::__always_inline__]] + constexpr _Tp* + allocate(size_t __n) + { + + if (std::is_constant_evaluated()) + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + + return __allocator_base<_Tp>::allocate(__n, 0); + } + + [[__gnu__::__always_inline__]] + constexpr void + deallocate(_Tp* __p, size_t __n) + { + + if (std::is_constant_evaluated()) + { + ::operator delete(__p); + return; + } + + __allocator_base<_Tp>::deallocate(__p, __n); + } + + + friend constexpr bool + operator==(const allocator&, const allocator&) noexcept + { return true; } +# 226 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + }; + + template + inline constexpr bool + operator==(const allocator<_T1>&, const allocator<_T2>&) + noexcept + { return true; } +# 244 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + template + class allocator + { + public: + typedef _Tp value_type; + template allocator(const allocator<_Up>&) { } + }; + + template + class allocator + { + public: + typedef _Tp value_type; + template allocator(const allocator<_Up>&) { } + }; + + template + class allocator + { + public: + typedef _Tp value_type; + template allocator(const allocator<_Up>&) { } + }; + + + + + + + extern template class allocator; + extern template class allocator; + + + + + + + template + struct __alloc_swap + { static void _S_do_it(_Alloc&, _Alloc&) noexcept { } }; + + template + struct __alloc_swap<_Alloc, false> + { + static void + _S_do_it(_Alloc& __one, _Alloc& __two) noexcept + { + + if (__one != __two) + swap(__one, __two); + } + }; + + + template + struct __alloc_neq + { + static bool + _S_do_it(const _Alloc&, const _Alloc&) + { return false; } + }; + + template + struct __alloc_neq<_Alloc, false> + { + static bool + _S_do_it(const _Alloc& __one, const _Alloc& __two) + { return __one != __two; } + }; + + + template, + is_nothrow_move_constructible>::value> + struct __shrink_to_fit_aux + { static bool _S_do_it(_Tp&) noexcept { return false; } }; + + template + struct __shrink_to_fit_aux<_Tp, true> + { + static bool + _S_do_it(_Tp& __c) noexcept + { + + try + { + _Tp(__make_move_if_noexcept_iterator(__c.begin()), + __make_move_if_noexcept_iterator(__c.end()), + __c.get_allocator()).swap(__c); + return true; + } + catch(...) + { return false; } + + + + } + }; + + + +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ostream_insert.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ostream_insert.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ostream_insert.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_forced.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_forced.h" 3 + +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_forced.h" 3 + +#pragma GCC visibility push(default) + + +namespace __cxxabiv1 +{ + + + + + + + + class __forced_unwind + { + virtual ~__forced_unwind() throw(); + + + virtual void __pure_dummy() = 0; + }; +} + + +#pragma GCC visibility pop +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ostream_insert.h" 2 3 + + +namespace std +{ + + + template + inline void + __ostream_write(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const streamsize __put = __out.rdbuf()->sputn(__s, __n); + if (__put != __n) + __out.setstate(__ios_base::badbit); + } + + template + inline void + __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const _CharT __c = __out.fill(); + for (; __n > 0; --__n) + { + const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); + if (_Traits::eq_int_type(__put, _Traits::eof())) + { + __out.setstate(__ios_base::badbit); + break; + } + } + } + + template + basic_ostream<_CharT, _Traits>& + __ostream_insert(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + const streamsize __w = __out.width(); + if (__w > __n) + { + const bool __left = ((__out.flags() + & __ios_base::adjustfield) + == __ios_base::left); + if (!__left) + __ostream_fill(__out, __w - __n); + if (__out.good()) + __ostream_write(__out, __s, __n); + if (__left && __out.good()) + __ostream_fill(__out, __w - __n); + } + else + __ostream_write(__out, __s, __n); + __out.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(__ios_base::badbit); } + } + return __out; + } + + + + + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + + + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); + + + + +} +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 1 3 +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 +namespace std +{ + +# 104 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + struct unary_function + { + + typedef _Arg argument_type; + + + typedef _Result result_type; + }; + + + + + template + struct binary_function + { + + typedef _Arg1 first_argument_type; + + + typedef _Arg2 second_argument_type; + + + typedef _Result result_type; + }; +# 144 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + struct __is_transparent; + + template + struct plus; + + template + struct minus; + + template + struct multiplies; + + template + struct divides; + + template + struct modulus; + + template + struct negate; + + + + template + struct plus : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x + __y; } + }; + + + template + struct minus : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x - __y; } + }; + + + template + struct multiplies : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x * __y; } + }; + + + template + struct divides : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x / __y; } + }; + + + template + struct modulus : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x % __y; } + }; + + + template + struct negate : public unary_function<_Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x) const + { return -__x; } + }; + + + + + + template<> + struct plus + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) + std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) + std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) + std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct minus + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) - std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) - std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) - std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct multiplies + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) * std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) * std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) * std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct divides + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) / std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) / std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) / std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct modulus + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) % std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) % std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) % std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct negate + { + template + constexpr + auto + operator()(_Tp&& __t) const + noexcept(noexcept(-std::forward<_Tp>(__t))) + -> decltype(-std::forward<_Tp>(__t)) + { return -std::forward<_Tp>(__t); } + + typedef __is_transparent is_transparent; + }; +# 330 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + struct equal_to; + + template + struct not_equal_to; + + template + struct greater; + + template + struct less; + + template + struct greater_equal; + + template + struct less_equal; + + + + template + struct equal_to : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x == __y; } + }; + + + template + struct not_equal_to : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x != __y; } + }; + + + template + struct greater : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x > __y; } + }; + + + template + struct less : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x < __y; } + }; + + + template + struct greater_equal : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x >= __y; } + }; + + + template + struct less_equal : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x <= __y; } + }; + + + template + struct greater<_Tp*> : public binary_function<_Tp*, _Tp*, bool> + { + constexpr bool + operator()(_Tp* __x, _Tp* __y) const noexcept + { + + + if (__builtin_is_constant_evaluated()) + + + + return __x > __y; + + return (long long unsigned int)__x > (long long unsigned int)__y; + } + }; + + + template + struct less<_Tp*> : public binary_function<_Tp*, _Tp*, bool> + { + constexpr bool + operator()(_Tp* __x, _Tp* __y) const noexcept + { + + + if (__builtin_is_constant_evaluated()) + + + + return __x < __y; + + return (long long unsigned int)__x < (long long unsigned int)__y; + } + }; + + + template + struct greater_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> + { + constexpr bool + operator()(_Tp* __x, _Tp* __y) const noexcept + { + + + if (__builtin_is_constant_evaluated()) + + + + return __x >= __y; + + return (long long unsigned int)__x >= (long long unsigned int)__y; + } + }; + + + template + struct less_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> + { + constexpr bool + operator()(_Tp* __x, _Tp* __y) const noexcept + { + + + if (__builtin_is_constant_evaluated()) + + + + return __x <= __y; + + return (long long unsigned int)__x <= (long long unsigned int)__y; + } + }; + + + + template<> + struct equal_to + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) == std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct not_equal_to + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) != std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) != std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) != std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct greater + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u)) + { + return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), + __ptr_cmp<_Tp, _Up>{}); + } + + template + constexpr bool + operator()(_Tp* __t, _Up* __u) const noexcept + { return greater>{}(__t, __u); } + + typedef __is_transparent is_transparent; + + private: + template + static constexpr decltype(auto) + _S_cmp(_Tp&& __t, _Up&& __u, false_type) + { return std::forward<_Tp>(__t) > std::forward<_Up>(__u); } + + template + static constexpr bool + _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept + { + return greater{}( + static_cast(std::forward<_Tp>(__t)), + static_cast(std::forward<_Up>(__u))); + } + + + template + struct __not_overloaded2 : true_type { }; + + + template + struct __not_overloaded2<_Tp, _Up, __void_t< + decltype(std::declval<_Tp>().operator>(std::declval<_Up>()))>> + : false_type { }; + + + template + struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; + + + template + struct __not_overloaded<_Tp, _Up, __void_t< + decltype(operator>(std::declval<_Tp>(), std::declval<_Up>()))>> + : false_type { }; + + template + using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, + is_convertible<_Tp, const volatile void*>, + is_convertible<_Up, const volatile void*>>; + }; + + + template<> + struct less + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u)) + { + return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), + __ptr_cmp<_Tp, _Up>{}); + } + + template + constexpr bool + operator()(_Tp* __t, _Up* __u) const noexcept + { return less>{}(__t, __u); } + + typedef __is_transparent is_transparent; + + private: + template + static constexpr decltype(auto) + _S_cmp(_Tp&& __t, _Up&& __u, false_type) + { return std::forward<_Tp>(__t) < std::forward<_Up>(__u); } + + template + static constexpr bool + _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept + { + return less{}( + static_cast(std::forward<_Tp>(__t)), + static_cast(std::forward<_Up>(__u))); + } + + + template + struct __not_overloaded2 : true_type { }; + + + template + struct __not_overloaded2<_Tp, _Up, __void_t< + decltype(std::declval<_Tp>().operator<(std::declval<_Up>()))>> + : false_type { }; + + + template + struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; + + + template + struct __not_overloaded<_Tp, _Up, __void_t< + decltype(operator<(std::declval<_Tp>(), std::declval<_Up>()))>> + : false_type { }; + + template + using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, + is_convertible<_Tp, const volatile void*>, + is_convertible<_Up, const volatile void*>>; + }; + + + template<> + struct greater_equal + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)) + { + return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), + __ptr_cmp<_Tp, _Up>{}); + } + + template + constexpr bool + operator()(_Tp* __t, _Up* __u) const noexcept + { return greater_equal>{}(__t, __u); } + + typedef __is_transparent is_transparent; + + private: + template + static constexpr decltype(auto) + _S_cmp(_Tp&& __t, _Up&& __u, false_type) + { return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); } + + template + static constexpr bool + _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept + { + return greater_equal{}( + static_cast(std::forward<_Tp>(__t)), + static_cast(std::forward<_Up>(__u))); + } + + + template + struct __not_overloaded2 : true_type { }; + + + template + struct __not_overloaded2<_Tp, _Up, __void_t< + decltype(std::declval<_Tp>().operator>=(std::declval<_Up>()))>> + : false_type { }; + + + template + struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; + + + template + struct __not_overloaded<_Tp, _Up, __void_t< + decltype(operator>=(std::declval<_Tp>(), std::declval<_Up>()))>> + : false_type { }; + + template + using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, + is_convertible<_Tp, const volatile void*>, + is_convertible<_Up, const volatile void*>>; + }; + + + template<> + struct less_equal + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)) + { + return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), + __ptr_cmp<_Tp, _Up>{}); + } + + template + constexpr bool + operator()(_Tp* __t, _Up* __u) const noexcept + { return less_equal>{}(__t, __u); } + + typedef __is_transparent is_transparent; + + private: + template + static constexpr decltype(auto) + _S_cmp(_Tp&& __t, _Up&& __u, false_type) + { return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); } + + template + static constexpr bool + _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept + { + return less_equal{}( + static_cast(std::forward<_Tp>(__t)), + static_cast(std::forward<_Up>(__u))); + } + + + template + struct __not_overloaded2 : true_type { }; + + + template + struct __not_overloaded2<_Tp, _Up, __void_t< + decltype(std::declval<_Tp>().operator<=(std::declval<_Up>()))>> + : false_type { }; + + + template + struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; + + + template + struct __not_overloaded<_Tp, _Up, __void_t< + decltype(operator<=(std::declval<_Tp>(), std::declval<_Up>()))>> + : false_type { }; + + template + using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, + is_convertible<_Tp, const volatile void*>, + is_convertible<_Up, const volatile void*>>; + }; +# 774 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + struct logical_and; + + template + struct logical_or; + + template + struct logical_not; + + + + template + struct logical_and : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x && __y; } + }; + + + template + struct logical_or : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x || __y; } + }; + + + template + struct logical_not : public unary_function<_Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x) const + { return !__x; } + }; + + + + template<> + struct logical_and + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) && std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct logical_or + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) || std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct logical_not + { + template + constexpr + auto + operator()(_Tp&& __t) const + noexcept(noexcept(!std::forward<_Tp>(__t))) + -> decltype(!std::forward<_Tp>(__t)) + { return !std::forward<_Tp>(__t); } + + typedef __is_transparent is_transparent; + }; + + + + + template + struct bit_and; + + template + struct bit_or; + + template + struct bit_xor; + + template + struct bit_not; + + + + + template + struct bit_and : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x & __y; } + }; + + template + struct bit_or : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x | __y; } + }; + + template + struct bit_xor : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x ^ __y; } + }; + + template + struct bit_not : public unary_function<_Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x) const + { return ~__x; } + }; + + + template <> + struct bit_and + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) & std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) & std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) & std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + template <> + struct bit_or + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) | std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) | std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) | std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + template <> + struct bit_xor + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + template <> + struct bit_not + { + template + constexpr + auto + operator()(_Tp&& __t) const + noexcept(noexcept(~std::forward<_Tp>(__t))) + -> decltype(~std::forward<_Tp>(__t)) + { return ~std::forward<_Tp>(__t); } + + typedef __is_transparent is_transparent; + }; +# 1002 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + class unary_negate + : public unary_function + { + protected: + _Predicate _M_pred; + + public: + constexpr + explicit + unary_negate(const _Predicate& __x) : _M_pred(__x) { } + + constexpr + bool + operator()(const typename _Predicate::argument_type& __x) const + { return !_M_pred(__x); } + }; + + + template + constexpr + inline unary_negate<_Predicate> + not1(const _Predicate& __pred) + { return unary_negate<_Predicate>(__pred); } + + + template + class binary_negate + : public binary_function + { + protected: + _Predicate _M_pred; + + public: + constexpr + explicit + binary_negate(const _Predicate& __x) : _M_pred(__x) { } + + constexpr + bool + operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { return !_M_pred(__x, __y); } + }; + + + template + constexpr + inline binary_negate<_Predicate> + not2(const _Predicate& __pred) + { return binary_negate<_Predicate>(__pred); } +# 1079 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + class pointer_to_unary_function : public unary_function<_Arg, _Result> + { + protected: + _Result (*_M_ptr)(_Arg); + + public: + pointer_to_unary_function() { } + + explicit + pointer_to_unary_function(_Result (*__x)(_Arg)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg __x) const + { return _M_ptr(__x); } + }; + + + template + inline pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (*__x)(_Arg)) + { return pointer_to_unary_function<_Arg, _Result>(__x); } + + + template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { + protected: + _Result (*_M_ptr)(_Arg1, _Arg2); + + public: + pointer_to_binary_function() { } + + explicit + pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg1 __x, _Arg2 __y) const + { return _M_ptr(__x, __y); } + }; + + + template + inline pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (*__x)(_Arg1, _Arg2)) + { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } + + + template + struct _Identity + : public unary_function<_Tp, _Tp> + { + _Tp& + operator()(_Tp& __x) const + { return __x; } + + const _Tp& + operator()(const _Tp& __x) const + { return __x; } + }; + + + template struct _Identity : _Identity<_Tp> { }; + + template + struct _Select1st + : public unary_function<_Pair, typename _Pair::first_type> + { + typename _Pair::first_type& + operator()(_Pair& __x) const + { return __x.first; } + + const typename _Pair::first_type& + operator()(const _Pair& __x) const + { return __x.first; } + + + template + typename _Pair2::first_type& + operator()(_Pair2& __x) const + { return __x.first; } + + template + const typename _Pair2::first_type& + operator()(const _Pair2& __x) const + { return __x.first; } + + }; + + template + struct _Select2nd + : public unary_function<_Pair, typename _Pair::second_type> + { + typename _Pair::second_type& + operator()(_Pair& __x) const + { return __x.second; } + + const typename _Pair::second_type& + operator()(const _Pair& __x) const + { return __x.second; } + }; +# 1202 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + class mem_fun_t : public unary_function<_Tp*, _Ret> + { + public: + explicit + mem_fun_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_t : public unary_function + { + public: + explicit + const_mem_fun_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + mem_fun_ref_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> + { + public: + explicit + mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_t : public binary_function + { + public: + explicit + const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + inline mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret, _Tp>(__f); } + + template + inline mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + + + + template> + struct __has_is_transparent + { }; + + template + struct __has_is_transparent<_Func, _SfinaeType, + __void_t> + { typedef void type; }; + + template + using __has_is_transparent_t + = typename __has_is_transparent<_Func, _SfinaeType>::type; + + + +} + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/backward/binders.h" 1 3 +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/backward/binders.h" 3 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +namespace std +{ + +# 107 "D:/compilers/msys64/mingw64/include/c++/11.2.0/backward/binders.h" 3 + template + class binder1st + : public unary_function + { + protected: + _Operation op; + typename _Operation::first_argument_type value; + + public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + + + + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + } __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))); + + + template + inline binder1st<_Operation> + bind1st(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); + } + + + template + class binder2nd + : public unary_function + { + protected: + _Operation op; + typename _Operation::second_argument_type value; + + public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + + + + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + } __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))); + + + template + inline binder2nd<_Operation> + bind2nd(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); + } + + + +} + +#pragma GCC diagnostic pop +# 1408 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 2 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/range_access.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/range_access.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/range_access.h" 3 + + + + + + +namespace std +{ + + + + + + + + template + inline constexpr auto + begin(_Container& __cont) -> decltype(__cont.begin()) + { return __cont.begin(); } + + + + + + + template + inline constexpr auto + begin(const _Container& __cont) -> decltype(__cont.begin()) + { return __cont.begin(); } + + + + + + + template + inline constexpr auto + end(_Container& __cont) -> decltype(__cont.end()) + { return __cont.end(); } + + + + + + + template + inline constexpr auto + end(const _Container& __cont) -> decltype(__cont.end()) + { return __cont.end(); } + + + + + + template + inline constexpr _Tp* + begin(_Tp (&__arr)[_Nm]) noexcept + { return __arr; } + + + + + + + template + inline constexpr _Tp* + end(_Tp (&__arr)[_Nm]) noexcept + { return __arr + _Nm; } + + + + template class valarray; + + template _Tp* begin(valarray<_Tp>&); + template const _Tp* begin(const valarray<_Tp>&); + template _Tp* end(valarray<_Tp>&); + template const _Tp* end(const valarray<_Tp>&); + + + + + + + template + inline constexpr auto + cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont))) + -> decltype(std::begin(__cont)) + { return std::begin(__cont); } + + + + + + + template + inline constexpr auto + cend(const _Container& __cont) noexcept(noexcept(std::end(__cont))) + -> decltype(std::end(__cont)) + { return std::end(__cont); } + + + + + + + template + inline constexpr auto + rbegin(_Container& __cont) -> decltype(__cont.rbegin()) + { return __cont.rbegin(); } + + + + + + + template + inline constexpr auto + rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) + { return __cont.rbegin(); } + + + + + + + template + inline constexpr auto + rend(_Container& __cont) -> decltype(__cont.rend()) + { return __cont.rend(); } + + + + + + + template + inline constexpr auto + rend(const _Container& __cont) -> decltype(__cont.rend()) + { return __cont.rend(); } + + + + + + + template + inline constexpr reverse_iterator<_Tp*> + rbegin(_Tp (&__arr)[_Nm]) noexcept + { return reverse_iterator<_Tp*>(__arr + _Nm); } + + + + + + + template + inline constexpr reverse_iterator<_Tp*> + rend(_Tp (&__arr)[_Nm]) noexcept + { return reverse_iterator<_Tp*>(__arr); } + + + + + + + template + inline constexpr reverse_iterator + rbegin(initializer_list<_Tp> __il) noexcept + { return reverse_iterator(__il.end()); } + + + + + + + template + inline constexpr reverse_iterator + rend(initializer_list<_Tp> __il) noexcept + { return reverse_iterator(__il.begin()); } + + + + + + + template + inline constexpr auto + crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) + { return std::rbegin(__cont); } + + + + + + + template + inline constexpr auto + crend(const _Container& __cont) -> decltype(std::rend(__cont)) + { return std::rend(__cont); } +# 243 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/range_access.h" 3 + template + constexpr auto + size(const _Container& __cont) noexcept(noexcept(__cont.size())) + -> decltype(__cont.size()) + { return __cont.size(); } + + + + + template + constexpr size_t + size(const _Tp (&)[_Nm]) noexcept + { return _Nm; } + + + + + + template + [[nodiscard]] constexpr auto + empty(const _Container& __cont) noexcept(noexcept(__cont.empty())) + -> decltype(__cont.empty()) + { return __cont.empty(); } + + + + + template + [[nodiscard]] constexpr bool + empty(const _Tp (&)[_Nm]) noexcept + { return false; } + + + + + + template + [[nodiscard]] constexpr bool + empty(initializer_list<_Tp> __il) noexcept + { return __il.size() == 0;} + + + + + + template + constexpr auto + data(_Container& __cont) noexcept(noexcept(__cont.data())) + -> decltype(__cont.data()) + { return __cont.data(); } + + + + + + template + constexpr auto + data(const _Container& __cont) noexcept(noexcept(__cont.data())) + -> decltype(__cont.data()) + { return __cont.data(); } + + + + + + template + constexpr _Tp* + data(_Tp (&__array)[_Nm]) noexcept + { return __array; } + + + + + + template + constexpr const _Tp* + data(initializer_list<_Tp> __il) noexcept + { return __il.begin(); } + + + + template + constexpr auto + ssize(const _Container& __cont) + noexcept(noexcept(__cont.size())) + -> common_type_t> + { + using type = make_signed_t; + return static_cast>(__cont.size()); + } + + template + constexpr ptrdiff_t + ssize(const _Tp (&)[_Num]) noexcept + { return _Num; } + + + + +} +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 1 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 +namespace std +{ + + + + + + struct __allocator_traits_base + { + template + struct __rebind : __replace_first_arg<_Tp, _Up> { }; + + template + struct __rebind<_Tp, _Up, + __void_t::other>> + { using type = typename _Tp::template rebind<_Up>::other; }; + + protected: + template + using __pointer = typename _Tp::pointer; + template + using __c_pointer = typename _Tp::const_pointer; + template + using __v_pointer = typename _Tp::void_pointer; + template + using __cv_pointer = typename _Tp::const_void_pointer; + template + using __pocca = typename _Tp::propagate_on_container_copy_assignment; + template + using __pocma = typename _Tp::propagate_on_container_move_assignment; + template + using __pocs = typename _Tp::propagate_on_container_swap; + template + using __equal = typename _Tp::is_always_equal; + }; + + template + using __alloc_rebind + = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; + + + + + + template + struct allocator_traits : __allocator_traits_base + { + + typedef _Alloc allocator_type; + + typedef typename _Alloc::value_type value_type; + + + + + + + using pointer = __detected_or_t; + + private: + + template class _Func, typename _Tp, typename = void> + struct _Ptr + { + using type = typename pointer_traits::template rebind<_Tp>; + }; + + template class _Func, typename _Tp> + struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>> + { + using type = _Func<_Alloc>; + }; + + + template + struct _Diff + { using type = typename pointer_traits<_PtrT>::difference_type; }; + + template + struct _Diff<_A2, _PtrT, __void_t> + { using type = typename _A2::difference_type; }; + + + template + struct _Size : make_unsigned<_DiffT> { }; + + template + struct _Size<_A2, _DiffT, __void_t> + { using type = typename _A2::size_type; }; + + public: + + + + + + + using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; + + + + + + + + using void_pointer = typename _Ptr<__v_pointer, void>::type; + + + + + + + + using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; + + + + + + + + using difference_type = typename _Diff<_Alloc, pointer>::type; + + + + + + + + using size_type = typename _Size<_Alloc, difference_type>::type; + + + + + + + + using propagate_on_container_copy_assignment + = __detected_or_t; + + + + + + + + using propagate_on_container_move_assignment + = __detected_or_t; + + + + + + + + using propagate_on_container_swap + = __detected_or_t; + + + + + + + + using is_always_equal + = __detected_or_t::type, __equal, _Alloc>; + + template + using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; + template + using rebind_traits = allocator_traits>; + + private: + template + static constexpr auto + _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) + -> decltype(__a.allocate(__n, __hint)) + { return __a.allocate(__n, __hint); } + + template + static constexpr pointer + _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) + { return __a.allocate(__n); } + + template + struct __construct_helper + { + template()->construct( + std::declval<_Tp*>(), std::declval<_Args>()...))> + static true_type __test(int); + + template + static false_type __test(...); + + using type = decltype(__test<_Alloc>(0)); + }; + + template + using __has_construct + = typename __construct_helper<_Tp, _Args...>::type; + + template + static constexpr _Require<__has_construct<_Tp, _Args...>> + _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) + noexcept(noexcept(__a.construct(__p, std::forward<_Args>(__args)...))) + { __a.construct(__p, std::forward<_Args>(__args)...); } + + template + static constexpr + _Require<__and_<__not_<__has_construct<_Tp, _Args...>>, + is_constructible<_Tp, _Args...>>> + _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) + noexcept(std::is_nothrow_constructible<_Tp, _Args...>::value) + { + + + + std::construct_at(__p, std::forward<_Args>(__args)...); + + } + + template + static constexpr auto + _S_destroy(_Alloc2& __a, _Tp* __p, int) + noexcept(noexcept(__a.destroy(__p))) + -> decltype(__a.destroy(__p)) + { __a.destroy(__p); } + + template + static constexpr void + _S_destroy(_Alloc2&, _Tp* __p, ...) + noexcept(std::is_nothrow_destructible<_Tp>::value) + { std::_Destroy(__p); } + + template + static constexpr auto + _S_max_size(_Alloc2& __a, int) + -> decltype(__a.max_size()) + { return __a.max_size(); } + + template + static constexpr size_type + _S_max_size(_Alloc2&, ...) + { + + + return __gnu_cxx::__numeric_traits::__max + / sizeof(value_type); + } + + template + static constexpr auto + _S_select(_Alloc2& __a, int) + -> decltype(__a.select_on_container_copy_construction()) + { return __a.select_on_container_copy_construction(); } + + template + static constexpr _Alloc2 + _S_select(_Alloc2& __a, ...) + { return __a; } + + public: +# 312 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + [[__nodiscard__]] static constexpr pointer + allocate(_Alloc& __a, size_type __n) + { return __a.allocate(__n); } +# 327 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + [[__nodiscard__]] static constexpr pointer + allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) + { return _S_allocate(__a, __n, __hint, 0); } +# 339 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + static constexpr void + deallocate(_Alloc& __a, pointer __p, size_type __n) + { __a.deallocate(__p, __n); } +# 354 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + static constexpr auto + construct(_Alloc& __a, _Tp* __p, _Args&&... __args) + noexcept(noexcept(_S_construct(__a, __p, + std::forward<_Args>(__args)...))) + -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) + { _S_construct(__a, __p, std::forward<_Args>(__args)...); } +# 370 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + static constexpr void + destroy(_Alloc& __a, _Tp* __p) + noexcept(noexcept(_S_destroy(__a, __p, 0))) + { _S_destroy(__a, __p, 0); } +# 384 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + static constexpr size_type + max_size(const _Alloc& __a) noexcept + { return _S_max_size(__a, 0); } +# 396 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + static constexpr _Alloc + select_on_container_copy_construction(const _Alloc& __rhs) + { return _S_select(__rhs, 0); } + }; + + + + + + + template + struct allocator_traits> + { + + using allocator_type = allocator<_Tp>; + + + using value_type = _Tp; + + + using pointer = _Tp*; + + + using const_pointer = const _Tp*; + + + using void_pointer = void*; + + + using const_void_pointer = const void*; + + + using difference_type = std::ptrdiff_t; + + + using size_type = std::size_t; + + + using propagate_on_container_copy_assignment = false_type; + + + using propagate_on_container_move_assignment = true_type; + + + using propagate_on_container_swap = false_type; + + + using is_always_equal = true_type; + + template + using rebind_alloc = allocator<_Up>; + + template + using rebind_traits = allocator_traits>; +# 458 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + [[__nodiscard__]] static constexpr pointer + allocate(allocator_type& __a, size_type __n) + { return __a.allocate(__n); } +# 472 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + [[__nodiscard__]] static constexpr pointer + allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) + { + + + + return __a.allocate(__n); + + } +# 490 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + static constexpr void + deallocate(allocator_type& __a, pointer __p, size_type __n) + { __a.deallocate(__p, __n); } +# 505 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + static constexpr void + construct(allocator_type& __a __attribute__((__unused__)), _Up* __p, + _Args&&... __args) + noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) + { + + + + std::construct_at(__p, std::forward<_Args>(__args)...); + + } +# 525 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + static constexpr void + destroy(allocator_type& __a __attribute__((__unused__)), _Up* __p) + noexcept(is_nothrow_destructible<_Up>::value) + { + + + + std::destroy_at(__p); + + } + + + + + + + static constexpr size_type + max_size(const allocator_type& __a __attribute__((__unused__))) noexcept + { + + + + return size_t(-1) / sizeof(value_type); + + } + + + + + + + static constexpr allocator_type + select_on_container_copy_construction(const allocator_type& __rhs) + { return __rhs; } + }; +# 574 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + constexpr inline void + __alloc_on_copy(_Alloc& __one, const _Alloc& __two) + { + typedef allocator_traits<_Alloc> __traits; + typedef typename __traits::propagate_on_container_copy_assignment __pocca; + + if constexpr (__pocca::value) + __one = __two; + + + + } + + template + constexpr _Alloc + __alloc_on_copy(const _Alloc& __a) + { + typedef allocator_traits<_Alloc> __traits; + return __traits::select_on_container_copy_construction(__a); + } +# 606 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + constexpr inline void + __alloc_on_move(_Alloc& __one, _Alloc& __two) + { + typedef allocator_traits<_Alloc> __traits; + typedef typename __traits::propagate_on_container_move_assignment __pocma; + + if constexpr (__pocma::value) + __one = std::move(__two); + + + + } +# 633 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + constexpr inline void + __alloc_on_swap(_Alloc& __one, _Alloc& __two) + { + typedef allocator_traits<_Alloc> __traits; + typedef typename __traits::propagate_on_container_swap __pocs; + + if constexpr (__pocs::value) + { + using std::swap; + swap(__one, __two); + } + + + + } + + template, + typename = void> + struct __is_alloc_insertable_impl + : false_type + { }; + + template + struct __is_alloc_insertable_impl<_Alloc, _Tp, _ValueT, + __void_t::construct( + std::declval<_Alloc&>(), std::declval<_ValueT*>(), + std::declval<_Tp>()))>> + : true_type + { }; + + + + + template + struct __is_copy_insertable + : __is_alloc_insertable_impl<_Alloc, + typename _Alloc::value_type const&>::type + { }; + + + template + struct __is_copy_insertable> + : is_copy_constructible<_Tp> + { }; + + + + + template + struct __is_move_insertable + : __is_alloc_insertable_impl<_Alloc, typename _Alloc::value_type>::type + { }; + + + template + struct __is_move_insertable> + : is_move_constructible<_Tp> + { }; + + + template + struct __is_allocator : false_type { }; + + template + struct __is_allocator<_Alloc, + __void_t().allocate(size_t{}))>> + : true_type { }; + + template + using _RequireAllocator + = typename enable_if<__is_allocator<_Alloc>::value, _Alloc>::type; + + template + using _RequireNotAllocator + = typename enable_if::value, _Alloc>::type; + + + template + concept __allocator_like = requires (_Alloc& __a) { + typename _Alloc::value_type; + __a.deallocate(__a.allocate(1u), 1u); + }; +# 727 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + _Allocator& __alloc) + { + for (; __first != __last; ++__first) + + + + allocator_traits<_Allocator>::destroy(__alloc, + std::__addressof(*__first)); + + } + + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + allocator<_Tp>&) + { + _Destroy(__first, __last); + } + + +} +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 2 3 + + + + +namespace __gnu_cxx +{ + + + + + + +template + struct __alloc_traits + + : std::allocator_traits<_Alloc> + + { + typedef _Alloc allocator_type; + + typedef std::allocator_traits<_Alloc> _Base_type; + typedef typename _Base_type::value_type value_type; + typedef typename _Base_type::pointer pointer; + typedef typename _Base_type::const_pointer const_pointer; + typedef typename _Base_type::size_type size_type; + typedef typename _Base_type::difference_type difference_type; + + typedef value_type& reference; + typedef const value_type& const_reference; + using _Base_type::allocate; + using _Base_type::deallocate; + using _Base_type::construct; + using _Base_type::destroy; + using _Base_type::max_size; + + private: + template + using __is_custom_pointer + = std::__and_, + std::__not_>>; + + public: + + template + static constexpr + std::__enable_if_t<__is_custom_pointer<_Ptr>::value> + construct(_Alloc& __a, _Ptr __p, _Args&&... __args) + noexcept(noexcept(_Base_type::construct(__a, std::__to_address(__p), + std::forward<_Args>(__args)...))) + { + _Base_type::construct(__a, std::__to_address(__p), + std::forward<_Args>(__args)...); + } + + + template + static constexpr + std::__enable_if_t<__is_custom_pointer<_Ptr>::value> + destroy(_Alloc& __a, _Ptr __p) + noexcept(noexcept(_Base_type::destroy(__a, std::__to_address(__p)))) + { _Base_type::destroy(__a, std::__to_address(__p)); } + + static constexpr _Alloc _S_select_on_copy(const _Alloc& __a) + { return _Base_type::select_on_container_copy_construction(__a); } + + static constexpr void _S_on_swap(_Alloc& __a, _Alloc& __b) + { std::__alloc_on_swap(__a, __b); } + + static constexpr bool _S_propagate_on_copy_assign() + { return _Base_type::propagate_on_container_copy_assignment::value; } + + static constexpr bool _S_propagate_on_move_assign() + { return _Base_type::propagate_on_container_move_assignment::value; } + + static constexpr bool _S_propagate_on_swap() + { return _Base_type::propagate_on_container_swap::value; } + + static constexpr bool _S_always_equal() + { return _Base_type::is_always_equal::value; } + + static constexpr bool _S_nothrow_move() + { return _S_propagate_on_move_assign() || _S_always_equal(); } + + template + struct rebind + { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; +# 166 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 3 + }; + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 2 3 + + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hash_bytes.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hash_bytes.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hash_bytes.h" 3 + + + +namespace std +{ + + + + + + + + size_t + _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); + + + + + + size_t + _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); + + +} +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 2 3 + +namespace std +{ + +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + template + struct __hash_base + { + typedef _Result result_type [[__deprecated__]]; + typedef _Arg argument_type [[__deprecated__]]; + }; + + + template + struct hash; + + template + struct __poison_hash + { + static constexpr bool __enable_hash_call = false; + private: + + __poison_hash(__poison_hash&&); + ~__poison_hash(); + }; + + template + struct __poison_hash<_Tp, __void_t()(declval<_Tp>()))>> + { + static constexpr bool __enable_hash_call = true; + }; + + + template::value> + struct __hash_enum + { + private: + + __hash_enum(__hash_enum&&); + ~__hash_enum(); + }; + + + template + struct __hash_enum<_Tp, true> : public __hash_base + { + size_t + operator()(_Tp __val) const noexcept + { + using __type = typename underlying_type<_Tp>::type; + return hash<__type>{}(static_cast<__type>(__val)); + } + }; + + + + template + struct hash : __hash_enum<_Tp> + { }; + + + template + struct hash<_Tp*> : public __hash_base + { + size_t + operator()(_Tp* __p) const noexcept + { return reinterpret_cast(__p); } + }; +# 125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + template<> struct hash : public __hash_base { size_t operator()(bool __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(char __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(signed char __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned char __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(wchar_t __val) const noexcept { return static_cast(__val); } }; + + + + template<> struct hash : public __hash_base { size_t operator()(char8_t __val) const noexcept { return static_cast(__val); } }; + + + + template<> struct hash : public __hash_base { size_t operator()(char16_t __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(char32_t __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(short __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(int __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(long __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(long long __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned short __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned int __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned long __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned long long __val) const noexcept { return static_cast(__val); } }; +# 193 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + struct _Hash_impl + { + static size_t + hash(const void* __ptr, size_t __clength, + size_t __seed = static_cast(0xc70f6907UL)) + { return _Hash_bytes(__ptr, __clength, __seed); } + + template + static size_t + hash(const _Tp& __val) + { return hash(&__val, sizeof(__val)); } + + template + static size_t + __hash_combine(const _Tp& __val, size_t __hash) + { return hash(&__val, sizeof(__val), __hash); } + }; + + + struct _Fnv_hash_impl + { + static size_t + hash(const void* __ptr, size_t __clength, + size_t __seed = static_cast(2166136261UL)) + { return _Fnv_hash_bytes(__ptr, __clength, __seed); } + + template + static size_t + hash(const _Tp& __val) + { return hash(&__val, sizeof(__val)); } + + template + static size_t + __hash_combine(const _Tp& __val, size_t __hash) + { return hash(&__val, sizeof(__val), __hash); } + }; + + + template<> + struct hash : public __hash_base + { + size_t + operator()(float __val) const noexcept + { + + return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; + } + }; + + + template<> + struct hash : public __hash_base + { + size_t + operator()(double __val) const noexcept + { + + return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; + } + }; + + + template<> + struct hash + : public __hash_base + { + __attribute__ ((__pure__)) size_t + operator()(long double __val) const noexcept; + }; + + + template<> + struct hash : public __hash_base + { + size_t + operator()(nullptr_t) const noexcept + { return 0; } + }; +# 279 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + template + struct __is_fast_hash : public std::true_type + { }; + + template<> + struct __is_fast_hash> : public std::false_type + { }; + + +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 2 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_base.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_base.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_base.h" 3 + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/numbers" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/numbers" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/numbers" 3 + + + + + +namespace std +{ + + + + + + + + +namespace numbers +{ + + + + template + using _Enable_if_floating = enable_if_t, _Tp>; + + + + template + inline constexpr _Tp e_v + = _Enable_if_floating<_Tp>(2.718281828459045235360287471352662498L); + + + template + inline constexpr _Tp log2e_v + = _Enable_if_floating<_Tp>(1.442695040888963407359924681001892137L); + + + template + inline constexpr _Tp log10e_v + = _Enable_if_floating<_Tp>(0.434294481903251827651128918916605082L); + + + template + inline constexpr _Tp pi_v + = _Enable_if_floating<_Tp>(3.141592653589793238462643383279502884L); + + + template + inline constexpr _Tp inv_pi_v + = _Enable_if_floating<_Tp>(0.318309886183790671537767526745028724L); + + + template + inline constexpr _Tp inv_sqrtpi_v + = _Enable_if_floating<_Tp>(0.564189583547756286948079451560772586L); + + + template + inline constexpr _Tp ln2_v + = _Enable_if_floating<_Tp>(0.693147180559945309417232121458176568L); + + + template + inline constexpr _Tp ln10_v + = _Enable_if_floating<_Tp>(2.302585092994045684017991454684364208L); + + + template + inline constexpr _Tp sqrt2_v + = _Enable_if_floating<_Tp>(1.414213562373095048801688724209698079L); + + + template + inline constexpr _Tp sqrt3_v + = _Enable_if_floating<_Tp>(1.732050807568877293527446341505872367L); + + + template + inline constexpr _Tp inv_sqrt3_v + = _Enable_if_floating<_Tp>(0.577350269189625764509148780501957456L); + + + template + inline constexpr _Tp egamma_v + = _Enable_if_floating<_Tp>(0.577215664901532860606512090082402431L); + + + template + inline constexpr _Tp phi_v + = _Enable_if_floating<_Tp>(1.618033988749894848204586834365638118L); + + inline constexpr double e = e_v; + inline constexpr double log2e = log2e_v; + inline constexpr double log10e = log10e_v; + inline constexpr double pi = pi_v; + inline constexpr double inv_pi = inv_pi_v; + inline constexpr double inv_sqrtpi = inv_sqrtpi_v; + inline constexpr double ln2 = ln2_v; + inline constexpr double ln10 = ln10_v; + inline constexpr double sqrt2 = sqrt2_v; + inline constexpr double sqrt3 = sqrt3_v; + inline constexpr double inv_sqrt3 = inv_sqrt3_v; + inline constexpr double egamma = egamma_v; + inline constexpr double phi = phi_v; +# 202 "D:/compilers/msys64/mingw64/include/c++/11.2.0/numbers" 3 +} + + +} +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 2 3 +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 +namespace std +{ + + +template + struct numeric_limits; + +namespace ranges +{ + namespace __detail + { + class __max_size_type + { + public: + __max_size_type() = default; + + template requires integral<_Tp> || __is_int128<_Tp> + constexpr + __max_size_type(_Tp __i) noexcept + : _M_val(__i), _M_msb(__i < 0) + { } + + constexpr explicit + __max_size_type(const __max_diff_type& __d) noexcept; + + template requires integral<_Tp> || __is_int128<_Tp> + constexpr explicit + operator _Tp() const noexcept + { return _M_val; } + + constexpr explicit + operator bool() const noexcept + { return _M_val != 0 || _M_msb != 0; } + + constexpr __max_size_type + operator+() const noexcept + { return *this; } + + constexpr __max_size_type + operator~() const noexcept + { return __max_size_type{~_M_val, !_M_msb}; } + + constexpr __max_size_type + operator-() const noexcept + { return operator~() + 1; } + + constexpr __max_size_type& + operator++() noexcept + { return *this += 1; } + + constexpr __max_size_type + operator++(int) noexcept + { + auto __tmp = *this; + ++*this; + return __tmp; + } + + constexpr __max_size_type& + operator--() noexcept + { return *this -= 1; } + + constexpr __max_size_type + operator--(int) noexcept + { + auto __tmp = *this; + --*this; + return __tmp; + } + + constexpr __max_size_type& + operator+=(const __max_size_type& __r) noexcept + { + const auto __sum = _M_val + __r._M_val; + const bool __overflow = (__sum < _M_val); + _M_msb = _M_msb ^ __r._M_msb ^ __overflow; + _M_val = __sum; + return *this; + } + + constexpr __max_size_type& + operator-=(const __max_size_type& __r) noexcept + { return *this += -__r; } + + constexpr __max_size_type& + operator*=(__max_size_type __r) noexcept + { + constexpr __max_size_type __threshold + = __rep(1) << (_S_rep_bits / 2 - 1); + if (_M_val < __threshold && __r < __threshold) + + + _M_val = _M_val * __r._M_val; + else + { + + + + const bool __lsb = _M_val & 1; + const bool __rlsb = __r._M_val & 1; + *this >>= 1; + __r >>= 1; + _M_val = (2 * _M_val * __r._M_val + + _M_val * __rlsb + __r._M_val * __lsb); + *this <<= 1; + *this += __rlsb * __lsb; + } + + return *this; + } + + constexpr __max_size_type& + operator/=(const __max_size_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r != 0)) __builtin_unreachable(); } while (false); + + if (!_M_msb && !__r._M_msb) [[likely]] + _M_val /= __r._M_val; + else if (_M_msb && __r._M_msb) + { + _M_val = (_M_val >= __r._M_val); + _M_msb = 0; + } + else if (!_M_msb && __r._M_msb) + _M_val = 0; + else if (_M_msb && !__r._M_msb) + { + + + + + const auto __orig = *this; + *this >>= 1; + _M_val /= __r._M_val; + *this <<= 1; + if (__orig - *this * __r >= __r) + ++_M_val; + } + return *this; + } + + constexpr __max_size_type& + operator%=(const __max_size_type& __r) noexcept + { + if (!_M_msb && !__r._M_msb) [[likely]] + _M_val %= __r._M_val; + else + *this -= (*this / __r) * __r; + return *this; + } + + constexpr __max_size_type& + operator<<=(const __max_size_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r <= _S_rep_bits)) __builtin_unreachable(); } while (false); + if (__r != 0) + { + _M_msb = (_M_val >> (_S_rep_bits - __r._M_val)) & 1; + + if (__r._M_val == _S_rep_bits) [[unlikely]] + _M_val = 0; + else + _M_val <<= __r._M_val; + } + return *this; + } + + constexpr __max_size_type& + operator>>=(const __max_size_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r <= _S_rep_bits)) __builtin_unreachable(); } while (false); + if (__r != 0) + { + if (__r._M_val == _S_rep_bits) [[unlikely]] + _M_val = 0; + else + _M_val >>= __r._M_val; + + if (_M_msb) [[unlikely]] + { + _M_val |= __rep(1) << (_S_rep_bits - __r._M_val); + _M_msb = 0; + } + } + return *this; + } + + constexpr __max_size_type& + operator&=(const __max_size_type& __r) noexcept + { + _M_val &= __r._M_val; + _M_msb &= __r._M_msb; + return *this; + } + + constexpr __max_size_type& + operator|=(const __max_size_type& __r) noexcept + { + _M_val |= __r._M_val; + _M_msb |= __r._M_msb; + return *this; + } + + constexpr __max_size_type& + operator^=(const __max_size_type& __r) noexcept + { + _M_val ^= __r._M_val; + _M_msb ^= __r._M_msb; + return *this; + } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator+=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a + __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator-=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a - __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator*=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a * __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator/=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a / __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator%=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a % __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator&=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a & __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator|=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a | __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator^=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a ^ __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator<<=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a << __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator>>=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a >> __b)); } + + friend constexpr __max_size_type + operator+(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l += __r; + return __l; + } + + friend constexpr __max_size_type + operator-(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l -= __r; + return __l; + } + + friend constexpr __max_size_type + operator*(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l *= __r; + return __l; + } + + friend constexpr __max_size_type + operator/(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l /= __r; + return __l; + } + + friend constexpr __max_size_type + operator%(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l %= __r; + return __l; + } + + friend constexpr __max_size_type + operator<<(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l <<= __r; + return __l; + } + + friend constexpr __max_size_type + operator>>(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l >>= __r; + return __l; + } + + friend constexpr __max_size_type + operator&(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l &= __r; + return __l; + } + + friend constexpr __max_size_type + operator|(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l |= __r; + return __l; + } + + friend constexpr __max_size_type + operator^(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l ^= __r; + return __l; + } + + friend constexpr bool + operator==(const __max_size_type& __l, const __max_size_type& __r) noexcept + { return __l._M_val == __r._M_val && __l._M_msb == __r._M_msb; } + + + friend constexpr strong_ordering + operator<=>(const __max_size_type& __l, const __max_size_type& __r) noexcept + { + if (__l._M_msb ^ __r._M_msb) + return __l._M_msb ? strong_ordering::greater : strong_ordering::less; + else + return __l._M_val <=> __r._M_val; + } +# 420 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 + using __rep = unsigned __int128; + + + + static constexpr size_t _S_rep_bits = sizeof(__rep) * 8; + private: + __rep _M_val = 0; + unsigned _M_msb:1 = 0; + + constexpr explicit + __max_size_type(__rep __val, int __msb) noexcept + : _M_val(__val), _M_msb(__msb) + { } + + friend __max_diff_type; + friend std::numeric_limits<__max_size_type>; + friend std::numeric_limits<__max_diff_type>; + }; + + class __max_diff_type + { + public: + __max_diff_type() = default; + + template requires integral<_Tp> || __is_int128<_Tp> + constexpr + __max_diff_type(_Tp __i) noexcept + : _M_rep(__i) + { } + + constexpr explicit + __max_diff_type(const __max_size_type& __d) noexcept + : _M_rep(__d) + { } + + template requires integral<_Tp> || __is_int128<_Tp> + constexpr explicit + operator _Tp() const noexcept + { return static_cast<_Tp>(_M_rep); } + + constexpr explicit + operator bool() const noexcept + { return _M_rep != 0; } + + constexpr __max_diff_type + operator+() const noexcept + { return *this; } + + constexpr __max_diff_type + operator-() const noexcept + { return __max_diff_type(-_M_rep); } + + constexpr __max_diff_type + operator~() const noexcept + { return __max_diff_type(~_M_rep); } + + constexpr __max_diff_type& + operator++() noexcept + { return *this += 1; } + + constexpr __max_diff_type + operator++(int) noexcept + { + auto __tmp = *this; + ++*this; + return __tmp; + } + + constexpr __max_diff_type& + operator--() noexcept + { return *this -= 1; } + + constexpr __max_diff_type + operator--(int) noexcept + { + auto __tmp = *this; + --*this; + return __tmp; + } + + constexpr __max_diff_type& + operator+=(const __max_diff_type& __r) noexcept + { + _M_rep += __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator-=(const __max_diff_type& __r) noexcept + { + _M_rep -= __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator*=(const __max_diff_type& __r) noexcept + { + _M_rep *= __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator/=(const __max_diff_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r != 0)) __builtin_unreachable(); } while (false); + const bool __neg = *this < 0; + const bool __rneg = __r < 0; + if (!__neg && !__rneg) + _M_rep = _M_rep / __r._M_rep; + else if (__neg && __rneg) + _M_rep = -_M_rep / -__r._M_rep; + else if (__neg && !__rneg) + _M_rep = -(-_M_rep / __r._M_rep); + else + _M_rep = -(_M_rep / -__r._M_rep); + return *this ; + } + + constexpr __max_diff_type& + operator%=(const __max_diff_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r != 0)) __builtin_unreachable(); } while (false); + if (*this >= 0 && __r > 0) + _M_rep %= __r._M_rep; + else + *this -= (*this / __r) * __r; + return *this; + } + + constexpr __max_diff_type& + operator<<=(const __max_diff_type& __r) noexcept + { + _M_rep.operator<<=(__r._M_rep); + return *this; + } + + constexpr __max_diff_type& + operator>>=(const __max_diff_type& __r) noexcept + { + + const auto __msb = _M_rep._M_msb; + _M_rep >>= __r._M_rep; + _M_rep._M_msb |= __msb; + return *this; + } + + constexpr __max_diff_type& + operator&=(const __max_diff_type& __r) noexcept + { + _M_rep &= __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator|=(const __max_diff_type& __r) noexcept + { + _M_rep |= __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator^=(const __max_diff_type& __r) noexcept + { + _M_rep ^= __r._M_rep; + return *this; + } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator+=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a + __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator-=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a - __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator*=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a * __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator/=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a / __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator%=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a % __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator&=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a & __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator|=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a | __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator^=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a ^ __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator<<=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a << __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator>>=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a >> __b)); } + + friend constexpr __max_diff_type + operator+(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l += __r; + return __l; + } + + friend constexpr __max_diff_type + operator-(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l -= __r; + return __l; + } + + friend constexpr __max_diff_type + operator*(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l *= __r; + return __l; + } + + friend constexpr __max_diff_type + operator/(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l /= __r; + return __l; + } + + friend constexpr __max_diff_type + operator%(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l %= __r; + return __l; + } + + friend constexpr __max_diff_type + operator<<(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l <<= __r; + return __l; + } + + friend constexpr __max_diff_type + operator>>(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l >>= __r; + return __l; + } + + friend constexpr __max_diff_type + operator&(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l &= __r; + return __l; + } + + friend constexpr __max_diff_type + operator|(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l |= __r; + return __l; + } + + friend constexpr __max_diff_type + operator^(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l ^= __r; + return __l; + } + + friend constexpr bool + operator==(const __max_diff_type& __l, const __max_diff_type& __r) noexcept + { return __l._M_rep == __r._M_rep; } + + + constexpr strong_ordering + operator<=>(const __max_diff_type& __r) const noexcept + { + const auto __lsign = _M_rep._M_msb; + const auto __rsign = __r._M_rep._M_msb; + if (__lsign ^ __rsign) + return __lsign ? strong_ordering::less : strong_ordering::greater; + else + return _M_rep <=> __r._M_rep; + } +# 751 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 + private: + __max_size_type _M_rep = 0; + + friend class __max_size_type; + }; + + constexpr + __max_size_type::__max_size_type(const __max_diff_type& __d) noexcept + : __max_size_type(__d._M_rep) + { } + + } +} + + template<> + struct numeric_limits + { + using _Sp = ranges::__detail::__max_size_type; + static constexpr bool is_specialized = true; + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + + static_assert(same_as<_Sp::__rep, unsigned __int128>); + static constexpr int digits = 129; + + + + + + static constexpr int digits10 + = static_cast(digits * numbers::ln2 / numbers::ln10); + + static constexpr _Sp + min() noexcept + { return 0; } + + static constexpr _Sp + max() noexcept + { return _Sp(static_cast<_Sp::__rep>(-1), 1); } + + static constexpr _Sp + lowest() noexcept + { return min(); } + }; + + template<> + struct numeric_limits + { + using _Dp = ranges::__detail::__max_diff_type; + using _Sp = ranges::__detail::__max_size_type; + static constexpr bool is_specialized = true; + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int digits = numeric_limits<_Sp>::digits - 1; + static constexpr int digits10 + = static_cast(digits * numbers::ln2 / numbers::ln10); + + static constexpr _Dp + min() noexcept + { return _Dp(_Sp(0, 1)); } + + static constexpr _Dp + max() noexcept + { return _Dp(_Sp(static_cast<_Sp::__rep>(-1), 0)); } + + static constexpr _Dp + lowest() noexcept + { return min(); } + }; + + +} +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_base.h" 2 3 + + +namespace std +{ + +namespace ranges +{ + template + inline constexpr bool disable_sized_range = false; + + template + inline constexpr bool enable_borrowed_range = false; + + namespace __detail + { + constexpr __max_size_type + __to_unsigned_like(__max_size_type __t) noexcept + { return __t; } + + constexpr __max_size_type + __to_unsigned_like(__max_diff_type __t) noexcept + { return __max_size_type(__t); } + + template + constexpr auto + __to_unsigned_like(_Tp __t) noexcept + { return static_cast>(__t); } + + + constexpr unsigned __int128 + __to_unsigned_like(__int128 __t) noexcept + { return __t; } + + constexpr unsigned __int128 + __to_unsigned_like(unsigned __int128 __t) noexcept + { return __t; } + + + template + using __make_unsigned_like_t + = decltype(__detail::__to_unsigned_like(std::declval<_Tp>())); + + + template + concept __maybe_borrowed_range + = is_lvalue_reference_v<_Tp> + || enable_borrowed_range>; + + } + + namespace __cust_access + { + using std::ranges::__detail::__maybe_borrowed_range; + using std::__detail::__range_iter_t; + + struct _Begin + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (is_array_v>) + return true; + else if constexpr (__member_begin<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().begin())); + else + return noexcept(__decay_copy(begin(std::declval<_Tp&>()))); + } + + public: + template<__maybe_borrowed_range _Tp> + requires is_array_v> || __member_begin<_Tp> + || __adl_begin<_Tp> + constexpr auto + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (is_array_v>) + { + static_assert(is_lvalue_reference_v<_Tp>); + return __t + 0; + } + else if constexpr (__member_begin<_Tp>) + return __t.begin(); + else + return begin(__t); + } + }; + + template + concept __member_end = requires(_Tp& __t) + { + { __decay_copy(__t.end()) } -> sentinel_for<__range_iter_t<_Tp>>; + }; + + + void end(auto&) = delete; + void end(const auto&) = delete; + + template + concept __adl_end = __class_or_enum> + && requires(_Tp& __t) + { + { __decay_copy(end(__t)) } -> sentinel_for<__range_iter_t<_Tp>>; + }; + + struct _End + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (is_bounded_array_v>) + return true; + else if constexpr (__member_end<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().end())); + else + return noexcept(__decay_copy(end(std::declval<_Tp&>()))); + } + + public: + template<__maybe_borrowed_range _Tp> + requires is_bounded_array_v> + || __member_end<_Tp> || __adl_end<_Tp> + constexpr auto + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (is_bounded_array_v>) + { + static_assert(is_lvalue_reference_v<_Tp>); + return __t + extent_v>; + } + else if constexpr (__member_end<_Tp>) + return __t.end(); + else + return end(__t); + } + }; + + + template + constexpr decltype(auto) + __as_const(_Tp& __t) noexcept + { + static_assert(std::is_same_v<_To&, _Tp&>); + + if constexpr (is_lvalue_reference_v<_To>) + return const_cast(__t); + else + return static_cast(__t); + } + + struct _CBegin + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_Begin{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _Begin{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _Begin{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + struct _CEnd + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_End{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _End{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _End{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + template + concept __member_rbegin = requires(_Tp& __t) + { + { __decay_copy(__t.rbegin()) } -> input_or_output_iterator; + }; + + void rbegin(auto&) = delete; + void rbegin(const auto&) = delete; + + template + concept __adl_rbegin = __class_or_enum> + && requires(_Tp& __t) + { + { __decay_copy(rbegin(__t)) } -> input_or_output_iterator; + }; + + template + concept __reversable = requires(_Tp& __t) + { + { _Begin{}(__t) } -> bidirectional_iterator; + { _End{}(__t) } -> same_as; + }; + + struct _RBegin + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__member_rbegin<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().rbegin())); + else if constexpr (__adl_rbegin<_Tp>) + return noexcept(__decay_copy(rbegin(std::declval<_Tp&>()))); + else + { + if constexpr (noexcept(_End{}(std::declval<_Tp&>()))) + { + using _It = decltype(_End{}(std::declval<_Tp&>())); + + return is_nothrow_copy_constructible_v<_It>; + } + else + return false; + } + } + + public: + template<__maybe_borrowed_range _Tp> + requires __member_rbegin<_Tp> || __adl_rbegin<_Tp> || __reversable<_Tp> + constexpr auto + operator()(_Tp&& __t) const + noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (__member_rbegin<_Tp>) + return __t.rbegin(); + else if constexpr (__adl_rbegin<_Tp>) + return rbegin(__t); + else + return std::make_reverse_iterator(_End{}(__t)); + } + }; + + template + concept __member_rend = requires(_Tp& __t) + { + { __decay_copy(__t.rend()) } + -> sentinel_for(__t)))>; + }; + + void rend(auto&) = delete; + void rend(const auto&) = delete; + + template + concept __adl_rend = __class_or_enum> + && requires(_Tp& __t) + { + { __decay_copy(rend(__t)) } + -> sentinel_for(__t)))>; + }; + + struct _REnd + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__member_rend<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().rend())); + else if constexpr (__adl_rend<_Tp>) + return noexcept(__decay_copy(rend(std::declval<_Tp&>()))); + else + { + if constexpr (noexcept(_Begin{}(std::declval<_Tp&>()))) + { + using _It = decltype(_Begin{}(std::declval<_Tp&>())); + + return is_nothrow_copy_constructible_v<_It>; + } + else + return false; + } + } + + public: + template<__maybe_borrowed_range _Tp> + requires __member_rend<_Tp> || __adl_rend<_Tp> || __reversable<_Tp> + constexpr auto + operator()(_Tp&& __t) const + noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (__member_rend<_Tp>) + return __t.rend(); + else if constexpr (__adl_rend<_Tp>) + return rend(__t); + else + return std::make_reverse_iterator(_Begin{}(__t)); + } + }; + + struct _CRBegin + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_RBegin{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _RBegin{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _RBegin{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + struct _CREnd + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_REnd{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _REnd{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _REnd{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + template + concept __member_size = !disable_sized_range> + && requires(_Tp& __t) + { + { __decay_copy(__t.size()) } -> __detail::__is_integer_like; + }; + + void size(auto&) = delete; + void size(const auto&) = delete; + + template + concept __adl_size = __class_or_enum> + && !disable_sized_range> + && requires(_Tp& __t) + { + { __decay_copy(size(__t)) } -> __detail::__is_integer_like; + }; + + template + concept __sentinel_size = requires(_Tp& __t) + { + { _Begin{}(__t) } -> forward_iterator; + + { _End{}(__t) } -> sized_sentinel_for; + + __detail::__to_unsigned_like(_End{}(__t) - _Begin{}(__t)); + }; + + struct _Size + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (is_bounded_array_v>) + return true; + else if constexpr (__member_size<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().size())); + else if constexpr (__adl_size<_Tp>) + return noexcept(__decay_copy(size(std::declval<_Tp&>()))); + else if constexpr (__sentinel_size<_Tp>) + return noexcept(_End{}(std::declval<_Tp&>()) + - _Begin{}(std::declval<_Tp&>())); + } + + public: + template + requires is_bounded_array_v> + || __member_size<_Tp> || __adl_size<_Tp> || __sentinel_size<_Tp> + constexpr auto + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (is_bounded_array_v>) + return extent_v>; + else if constexpr (__member_size<_Tp>) + return __t.size(); + else if constexpr (__adl_size<_Tp>) + return size(__t); + else if constexpr (__sentinel_size<_Tp>) + return __detail::__to_unsigned_like(_End{}(__t) - _Begin{}(__t)); + } + }; + + struct _SSize + { + + + template + requires requires (_Tp& __t) { _Size{}(__t); } + constexpr auto + operator()(_Tp&& __t) const noexcept(noexcept(_Size{}(__t))) + { + auto __size = _Size{}(__t); + using __size_type = decltype(__size); + + if constexpr (integral<__size_type>) + { + using __gnu_cxx::__int_traits; + if constexpr (__int_traits<__size_type>::__digits + < __int_traits::__digits) + return static_cast(__size); + else + return static_cast>(__size); + } + + + else if constexpr (__detail::__is_int128<__size_type>) + return static_cast<__int128>(__size); + + else + return __detail::__max_diff_type(__size); + } + }; + + template + concept __member_empty = requires(_Tp& __t) { bool(__t.empty()); }; + + template + concept __size0_empty = requires(_Tp& __t) { _Size{}(__t) == 0; }; + + template + concept __eq_iter_empty = requires(_Tp& __t) + { + { _Begin{}(__t) } -> forward_iterator; + + bool(_Begin{}(__t) == _End{}(__t)); + }; + + struct _Empty + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__member_empty<_Tp>) + return noexcept(bool(std::declval<_Tp&>().empty())); + else if constexpr (__size0_empty<_Tp>) + return noexcept(_Size{}(std::declval<_Tp&>()) == 0); + else + return noexcept(bool(_Begin{}(std::declval<_Tp&>()) + == _End{}(std::declval<_Tp&>()))); + } + + public: + template + requires __member_empty<_Tp> || __size0_empty<_Tp> + || __eq_iter_empty<_Tp> + constexpr bool + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (__member_empty<_Tp>) + return bool(__t.empty()); + else if constexpr (__size0_empty<_Tp>) + return _Size{}(__t) == 0; + else + return bool(_Begin{}(__t) == _End{}(__t)); + } + }; + + template + concept __pointer_to_object = is_pointer_v<_Tp> + && is_object_v>; + + template + concept __member_data = requires(_Tp& __t) + { + { __decay_copy(__t.data()) } -> __pointer_to_object; + }; + + template + concept __begin_data = contiguous_iterator<__range_iter_t<_Tp>>; + + struct _Data + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__member_data<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().data())); + else + return noexcept(_Begin{}(std::declval<_Tp&>())); + } + + public: + template<__maybe_borrowed_range _Tp> + requires __member_data<_Tp> || __begin_data<_Tp> + constexpr auto + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp>()) + { + if constexpr (__member_data<_Tp>) + return __t.data(); + else + return std::to_address(_Begin{}(__t)); + } + }; + + struct _CData + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_Data{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _Data{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _Data{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + } + + inline namespace __cust + { + inline constexpr __cust_access::_Begin begin{}; + inline constexpr __cust_access::_End end{}; + inline constexpr __cust_access::_CBegin cbegin{}; + inline constexpr __cust_access::_CEnd cend{}; + inline constexpr __cust_access::_RBegin rbegin{}; + inline constexpr __cust_access::_REnd rend{}; + inline constexpr __cust_access::_CRBegin crbegin{}; + inline constexpr __cust_access::_CREnd crend{}; + inline constexpr __cust_access::_Size size{}; + inline constexpr __cust_access::_SSize ssize{}; + inline constexpr __cust_access::_Empty empty{}; + inline constexpr __cust_access::_Data data{}; + inline constexpr __cust_access::_CData cdata{}; + } + + + template + concept range = requires(_Tp& __t) + { + ranges::begin(__t); + ranges::end(__t); + }; + + + template + concept borrowed_range + = range<_Tp> && __detail::__maybe_borrowed_range<_Tp>; + + template + using iterator_t = std::__detail::__range_iter_t<_Tp>; + + template + using sentinel_t = decltype(ranges::end(std::declval<_Range&>())); + + template + using range_difference_t = iter_difference_t>; + + template + using range_value_t = iter_value_t>; + + template + using range_reference_t = iter_reference_t>; + + template + using range_rvalue_reference_t + = iter_rvalue_reference_t>; + + + template + concept sized_range = range<_Tp> + && requires(_Tp& __t) { ranges::size(__t); }; + + template + using range_size_t = decltype(ranges::size(std::declval<_Range&>())); + + + struct view_base { }; + + + template + inline constexpr bool enable_view = derived_from<_Tp, view_base>; + + + template + concept view + = range<_Tp> && movable<_Tp> && default_initializable<_Tp> + && enable_view<_Tp>; + + + + + template + concept output_range + = range<_Range> && output_iterator, _Tp>; + + + template + concept input_range = range<_Tp> && input_iterator>; + + + template + concept forward_range + = input_range<_Tp> && forward_iterator>; + + + template + concept bidirectional_range + = forward_range<_Tp> && bidirectional_iterator>; + + + template + concept random_access_range + = bidirectional_range<_Tp> && random_access_iterator>; + + + template + concept contiguous_range + = random_access_range<_Tp> && contiguous_iterator> + && requires(_Tp& __t) + { + { ranges::data(__t) } -> same_as>>; + }; + + + template + concept common_range + = range<_Tp> && same_as, sentinel_t<_Tp>>; + + + template + concept viewable_range = range<_Tp> + && (borrowed_range<_Tp> || view>); + + + + struct __advance_fn + { + template + constexpr void + operator()(_It& __it, iter_difference_t<_It> __n) const + { + if constexpr (random_access_iterator<_It>) + __it += __n; + else if constexpr (bidirectional_iterator<_It>) + { + if (__n > 0) + { + do + { + ++__it; + } + while (--__n); + } + else if (__n < 0) + { + do + { + --__it; + } + while (++__n); + } + } + else + { + + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + while (__n-- > 0) + ++__it; + } + } + + template _Sent> + constexpr void + operator()(_It& __it, _Sent __bound) const + { + if constexpr (assignable_from<_It&, _Sent>) + __it = std::move(__bound); + else if constexpr (sized_sentinel_for<_Sent, _It>) + (*this)(__it, __bound - __it); + else + { + while (__it != __bound) + ++__it; + } + } + + template _Sent> + constexpr iter_difference_t<_It> + operator()(_It& __it, iter_difference_t<_It> __n, _Sent __bound) const + { + if constexpr (sized_sentinel_for<_Sent, _It>) + { + const auto __diff = __bound - __it; + + + do { if (__builtin_is_constant_evaluated() && !bool(__n == 0 || __diff == 0 || (__n < 0 == __diff < 0))) __builtin_unreachable(); } while (false); + const auto __absdiff = __diff < 0 ? -__diff : __diff; + const auto __absn = __n < 0 ? -__n : __n;; + if (__absn >= __absdiff) + { + (*this)(__it, __bound); + return __n - __diff; + } + else + { + (*this)(__it, __n); + return 0; + } + } + else if (__it == __bound || __n == 0) + return __n; + else if (__n > 0) + { + iter_difference_t<_It> __m = 0; + do + { + ++__it; + ++__m; + } + while (__m != __n && __it != __bound); + return __n - __m; + } + else if constexpr (bidirectional_iterator<_It> && same_as<_It, _Sent>) + { + iter_difference_t<_It> __m = 0; + do + { + --__it; + --__m; + } + while (__m != __n && __it != __bound); + return __n - __m; + } + else + { + + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + return __n; + } + } + }; + + inline constexpr __advance_fn advance{}; + + struct __distance_fn + { + template _Sent> + constexpr iter_difference_t<_It> + operator()(_It __first, _Sent __last) const + { + if constexpr (sized_sentinel_for<_Sent, _It>) + return __last - __first; + else + { + iter_difference_t<_It> __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + } + + template + constexpr range_difference_t<_Range> + operator()(_Range&& __r) const + { + if constexpr (sized_range<_Range>) + return static_cast>(ranges::size(__r)); + else + return (*this)(ranges::begin(__r), ranges::end(__r)); + } + }; + + inline constexpr __distance_fn distance{}; + + struct __next_fn + { + template + constexpr _It + operator()(_It __x) const + { + ++__x; + return __x; + } + + template + constexpr _It + operator()(_It __x, iter_difference_t<_It> __n) const + { + ranges::advance(__x, __n); + return __x; + } + + template _Sent> + constexpr _It + operator()(_It __x, _Sent __bound) const + { + ranges::advance(__x, __bound); + return __x; + } + + template _Sent> + constexpr _It + operator()(_It __x, iter_difference_t<_It> __n, _Sent __bound) const + { + ranges::advance(__x, __n, __bound); + return __x; + } + }; + + inline constexpr __next_fn next{}; + + struct __prev_fn + { + template + constexpr _It + operator()(_It __x) const + { + --__x; + return __x; + } + + template + constexpr _It + operator()(_It __x, iter_difference_t<_It> __n) const + { + ranges::advance(__x, -__n); + return __x; + } + + template + constexpr _It + operator()(_It __x, iter_difference_t<_It> __n, _It __bound) const + { + ranges::advance(__x, -__n, __bound); + return __x; + } + }; + + inline constexpr __prev_fn prev{}; + + + struct dangling + { + constexpr dangling() noexcept = default; + template + constexpr dangling(_Args&&...) noexcept { } + }; + + template + using borrowed_iterator_t = conditional_t, + iterator_t<_Range>, + dangling>; + +} + +} +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 2 3 + + +namespace std +{ + + + + + + + + + constexpr size_t + __sv_check(size_t __size, size_t __pos, const char* __s) + { + if (__pos > __size) + __throw_out_of_range_fmt(("%s: __pos (which is %zu) > __size " "(which is %zu)") + , __s, __pos, __size); + return __pos; + } + + + + constexpr size_t + __sv_limit(size_t __size, size_t __pos, size_t __off) noexcept + { + const bool __testoff = __off < __size - __pos; + return __testoff ? __off : __size - __pos; + } +# 97 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + template> + class basic_string_view + { + static_assert(!is_array_v<_CharT>); + static_assert(is_trivial_v<_CharT> && is_standard_layout_v<_CharT>); + static_assert(is_same_v<_CharT, typename _Traits::char_type>); + + public: + + + using traits_type = _Traits; + using value_type = _CharT; + using pointer = value_type*; + using const_pointer = const value_type*; + using reference = value_type&; + using const_reference = const value_type&; + using const_iterator = const value_type*; + using iterator = const_iterator; + using const_reverse_iterator = std::reverse_iterator; + using reverse_iterator = const_reverse_iterator; + using size_type = size_t; + using difference_type = ptrdiff_t; + static constexpr size_type npos = size_type(-1); + + + + constexpr + basic_string_view() noexcept + : _M_len{0}, _M_str{nullptr} + { } + + constexpr basic_string_view(const basic_string_view&) noexcept = default; + + __attribute__((__nonnull__)) constexpr + basic_string_view(const _CharT* __str) noexcept + : _M_len{traits_type::length(__str)}, + _M_str{__str} + { } + + constexpr + basic_string_view(const _CharT* __str, size_type __len) noexcept + : _M_len{__len}, _M_str{__str} + { } + + + template _End> + requires same_as, _CharT> + && (!convertible_to<_End, size_type>) + constexpr + basic_string_view(_It __first, _End __last) + : _M_len(__last - __first), _M_str(std::to_address(__first)) + { } +# 170 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + constexpr basic_string_view& + operator=(const basic_string_view&) noexcept = default; + + + + constexpr const_iterator + begin() const noexcept + { return this->_M_str; } + + constexpr const_iterator + end() const noexcept + { return this->_M_str + this->_M_len; } + + constexpr const_iterator + cbegin() const noexcept + { return this->_M_str; } + + constexpr const_iterator + cend() const noexcept + { return this->_M_str + this->_M_len; } + + constexpr const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + constexpr const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(this->begin()); } + + constexpr const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + constexpr const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(this->begin()); } + + + + constexpr size_type + size() const noexcept + { return this->_M_len; } + + constexpr size_type + length() const noexcept + { return _M_len; } + + constexpr size_type + max_size() const noexcept + { + return (npos - sizeof(size_type) - sizeof(void*)) + / sizeof(value_type) / 4; + } + + [[nodiscard]] constexpr bool + empty() const noexcept + { return this->_M_len == 0; } + + + + constexpr const_reference + operator[](size_type __pos) const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__pos < this->_M_len)) __builtin_unreachable(); } while (false); + return *(this->_M_str + __pos); + } + + constexpr const_reference + at(size_type __pos) const + { + if (__pos >= _M_len) + __throw_out_of_range_fmt(("basic_string_view::at: __pos " "(which is %zu) >= this->size() " "(which is %zu)") + + , __pos, this->size()); + return *(this->_M_str + __pos); + } + + constexpr const_reference + front() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(this->_M_len > 0)) __builtin_unreachable(); } while (false); + return *this->_M_str; + } + + constexpr const_reference + back() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(this->_M_len > 0)) __builtin_unreachable(); } while (false); + return *(this->_M_str + this->_M_len - 1); + } + + constexpr const_pointer + data() const noexcept + { return this->_M_str; } + + + + constexpr void + remove_prefix(size_type __n) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(this->_M_len >= __n)) __builtin_unreachable(); } while (false); + this->_M_str += __n; + this->_M_len -= __n; + } + + constexpr void + remove_suffix(size_type __n) noexcept + { this->_M_len -= __n; } + + constexpr void + swap(basic_string_view& __sv) noexcept + { + auto __tmp = *this; + *this = __sv; + __sv = __tmp; + } + + + + constexpr + size_type + copy(_CharT* __str, size_type __n, size_type __pos = 0) const + { + ; + __pos = std::__sv_check(size(), __pos, "basic_string_view::copy"); + const size_type __rlen = std::min(__n, _M_len - __pos); + + + traits_type::copy(__str, data() + __pos, __rlen); + return __rlen; + } + + constexpr basic_string_view + substr(size_type __pos = 0, size_type __n = npos) const noexcept(false) + { + __pos = std::__sv_check(size(), __pos, "basic_string_view::substr"); + const size_type __rlen = std::min(__n, _M_len - __pos); + return basic_string_view{_M_str + __pos, __rlen}; + } + + constexpr int + compare(basic_string_view __str) const noexcept + { + const size_type __rlen = std::min(this->_M_len, __str._M_len); + int __ret = traits_type::compare(this->_M_str, __str._M_str, __rlen); + if (__ret == 0) + __ret = _S_compare(this->_M_len, __str._M_len); + return __ret; + } + + constexpr int + compare(size_type __pos1, size_type __n1, basic_string_view __str) const + { return this->substr(__pos1, __n1).compare(__str); } + + constexpr int + compare(size_type __pos1, size_type __n1, + basic_string_view __str, size_type __pos2, size_type __n2) const + { + return this->substr(__pos1, __n1).compare(__str.substr(__pos2, __n2)); + } + + __attribute__((__nonnull__)) constexpr int + compare(const _CharT* __str) const noexcept + { return this->compare(basic_string_view{__str}); } + + __attribute__((__nonnull__)) constexpr int + compare(size_type __pos1, size_type __n1, const _CharT* __str) const + { return this->substr(__pos1, __n1).compare(basic_string_view{__str}); } + + constexpr int + compare(size_type __pos1, size_type __n1, + const _CharT* __str, size_type __n2) const noexcept(false) + { + return this->substr(__pos1, __n1) + .compare(basic_string_view(__str, __n2)); + } + + + + constexpr bool + starts_with(basic_string_view __x) const noexcept + { return this->substr(0, __x.size()) == __x; } + + constexpr bool + starts_with(_CharT __x) const noexcept + { return !this->empty() && traits_type::eq(this->front(), __x); } + + constexpr bool + starts_with(const _CharT* __x) const noexcept + { return this->starts_with(basic_string_view(__x)); } + + constexpr bool + ends_with(basic_string_view __x) const noexcept + { + const auto __len = this->size(); + const auto __xlen = __x.size(); + return __len >= __xlen + && traits_type::compare(end() - __xlen, __x.data(), __xlen) == 0; + } + + constexpr bool + ends_with(_CharT __x) const noexcept + { return !this->empty() && traits_type::eq(this->back(), __x); } + + constexpr bool + ends_with(const _CharT* __x) const noexcept + { return this->ends_with(basic_string_view(__x)); } +# 396 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + constexpr size_type + find(basic_string_view __str, size_type __pos = 0) const noexcept + { return this->find(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find(_CharT __c, size_type __pos = 0) const noexcept; + + constexpr size_type + find(const _CharT* __str, size_type __pos, size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find(const _CharT* __str, size_type __pos = 0) const noexcept + { return this->find(__str, __pos, traits_type::length(__str)); } + + constexpr size_type + rfind(basic_string_view __str, size_type __pos = npos) const noexcept + { return this->rfind(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + rfind(_CharT __c, size_type __pos = npos) const noexcept; + + constexpr size_type + rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + rfind(const _CharT* __str, size_type __pos = npos) const noexcept + { return this->rfind(__str, __pos, traits_type::length(__str)); } + + constexpr size_type + find_first_of(basic_string_view __str, size_type __pos = 0) const noexcept + { return this->find_first_of(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find_first_of(_CharT __c, size_type __pos = 0) const noexcept + { return this->find(__c, __pos); } + + constexpr size_type + find_first_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find_first_of(const _CharT* __str, size_type __pos = 0) const noexcept + { return this->find_first_of(__str, __pos, traits_type::length(__str)); } + + constexpr size_type + find_last_of(basic_string_view __str, + size_type __pos = npos) const noexcept + { return this->find_last_of(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find_last_of(_CharT __c, size_type __pos=npos) const noexcept + { return this->rfind(__c, __pos); } + + constexpr size_type + find_last_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find_last_of(const _CharT* __str, size_type __pos = npos) const noexcept + { return this->find_last_of(__str, __pos, traits_type::length(__str)); } + + constexpr size_type + find_first_not_of(basic_string_view __str, + size_type __pos = 0) const noexcept + { return this->find_first_not_of(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const noexcept; + + constexpr size_type + find_first_not_of(const _CharT* __str, + size_type __pos, size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find_first_not_of(const _CharT* __str, size_type __pos = 0) const noexcept + { + return this->find_first_not_of(__str, __pos, + traits_type::length(__str)); + } + + constexpr size_type + find_last_not_of(basic_string_view __str, + size_type __pos = npos) const noexcept + { return this->find_last_not_of(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const noexcept; + + constexpr size_type + find_last_not_of(const _CharT* __str, + size_type __pos, size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find_last_not_of(const _CharT* __str, + size_type __pos = npos) const noexcept + { + return this->find_last_not_of(__str, __pos, + traits_type::length(__str)); + } + + private: + + static constexpr int + _S_compare(size_type __n1, size_type __n2) noexcept + { + using __limits = __gnu_cxx::__int_traits; + const difference_type __diff = __n1 - __n2; + if (__diff > __limits::__max) + return __limits::__max; + if (__diff < __limits::__min) + return __limits::__min; + return static_cast(__diff); + } + + size_t _M_len; + const _CharT* _M_str; + }; + + + template _End> + basic_string_view(_It, _End) -> basic_string_view>; +# 532 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + template + constexpr bool + operator==(basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.size() == __y.size() && __x.compare(__y) == 0; } + + template + constexpr bool + operator==(basic_string_view<_CharT, _Traits> __x, + __type_identity_t> __y) + noexcept + { return __x.size() == __y.size() && __x.compare(__y) == 0; } + + + template + constexpr auto + operator<=>(basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) + { return __detail::__char_traits_cmp_cat<_Traits>(__x.compare(__y)); } + + template + constexpr auto + operator<=>(basic_string_view<_CharT, _Traits> __x, + __type_identity_t> __y) + noexcept + -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) + { return __detail::__char_traits_cmp_cat<_Traits>(__x.compare(__y)); } +# 664 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + basic_string_view<_CharT,_Traits> __str) + { return __ostream_insert(__os, __str.data(), __str.size()); } + + + + + using string_view = basic_string_view; + + using wstring_view = basic_string_view; + + + using u8string_view = basic_string_view; + + using u16string_view = basic_string_view; + using u32string_view = basic_string_view; + + + + template + struct hash; + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const string_view& __str) const noexcept + { return std::_Hash_impl::hash(__str.data(), __str.length()); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const wstring_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(wchar_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u8string_view& __str) const noexcept + { return std::_Hash_impl::hash(__str.data(), __str.length()); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u16string_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char16_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u32string_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char32_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + inline namespace literals + { + inline namespace string_view_literals + { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wliteral-suffix" + inline constexpr basic_string_view + operator""sv(const char* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + + + inline constexpr basic_string_view + operator""sv(const wchar_t* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + + + + inline constexpr basic_string_view + operator""sv(const char8_t* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + + + inline constexpr basic_string_view + operator""sv(const char16_t* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + + inline constexpr basic_string_view + operator""sv(const char32_t* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + +#pragma GCC diagnostic pop + } + } + + + namespace ranges + { + + template + inline constexpr bool + enable_borrowed_range> = true; + + + template + inline constexpr bool + enable_view> = true; + } + + +} + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/string_view.tcc" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/string_view.tcc" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/string_view.tcc" 3 + + + +namespace std +{ + + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find(const _CharT* __str, size_type __pos, size_type __n) const noexcept + { + ; + + if (__n == 0) + return __pos <= _M_len ? __pos : npos; + if (__pos >= _M_len) + return npos; + + const _CharT __elem0 = __str[0]; + const _CharT* __first = _M_str + __pos; + const _CharT* const __last = _M_str + _M_len; + size_type __len = _M_len - __pos; + + while (__len >= __n) + { + + __first = traits_type::find(__first, __len - __n + 1, __elem0); + if (!__first) + return npos; + + + + if (traits_type::compare(__first, __str, __n) == 0) + return __first - _M_str; + __len = __last - ++__first; + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find(_CharT __c, size_type __pos) const noexcept + { + size_type __ret = npos; + if (__pos < this->_M_len) + { + const size_type __n = this->_M_len - __pos; + const _CharT* __p = traits_type::find(this->_M_str + __pos, __n, __c); + if (__p) + __ret = __p - this->_M_str; + } + return __ret; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept + { + ; + + if (__n <= this->_M_len) + { + __pos = std::min(size_type(this->_M_len - __n), __pos); + do + { + if (traits_type::compare(this->_M_str + __pos, __str, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + rfind(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->_M_len; + if (__size > 0) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(this->_M_str[__size], __c)) + return __size; + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept + { + ; + for (; __n && __pos < this->_M_len; ++__pos) + { + const _CharT* __p = traits_type::find(__str, __n, + this->_M_str[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__str, __n, this->_M_str[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_not_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept + { + ; + for (; __pos < this->_M_len; ++__pos) + if (!traits_type::find(__str, __n, this->_M_str[__pos])) + return __pos; + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_not_of(_CharT __c, size_type __pos) const noexcept + { + for (; __pos < this->_M_len; ++__pos) + if (!traits_type::eq(this->_M_str[__pos], __c)) + return __pos; + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_not_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept + { + ; + size_type __size = this->_M_len; + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__str, __n, this->_M_str[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_not_of(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->_M_len; + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(this->_M_str[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + + +} +# 812 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 2 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 2 3 + + +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 +namespace __cxx11 { +# 84 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + class basic_string + { + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_CharT>::other _Char_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; + + + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Char_alloc_type allocator_type; + typedef typename _Alloc_traits::size_type size_type; + typedef typename _Alloc_traits::difference_type difference_type; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; + typedef typename _Alloc_traits::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + + + static const size_type npos = static_cast(-1); + + protected: + + + + + typedef const_iterator __const_iterator; + + + private: + + + typedef basic_string_view<_CharT, _Traits> __sv_type; + + template + using _If_sv = enable_if_t< + __and_, + __not_>, + __not_>>::value, + _Res>; + + + static __sv_type + _S_to_string_view(__sv_type __svt) noexcept + { return __svt; } + + + + + + struct __sv_wrapper + { + explicit __sv_wrapper(__sv_type __sv) noexcept : _M_sv(__sv) { } + __sv_type _M_sv; + }; + + + + + + + + explicit + basic_string(__sv_wrapper __svw, const _Alloc& __a) + : basic_string(__svw._M_sv.data(), __svw._M_sv.size(), __a) { } + + + + struct _Alloc_hider : allocator_type + { + + + + + _Alloc_hider(pointer __dat, const _Alloc& __a) + : allocator_type(__a), _M_p(__dat) { } + + _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) + : allocator_type(std::move(__a)), _M_p(__dat) { } + + + pointer _M_p; + }; + + _Alloc_hider _M_dataplus; + size_type _M_string_length; + + enum { _S_local_capacity = 15 / sizeof(_CharT) }; + + union + { + _CharT _M_local_buf[_S_local_capacity + 1]; + size_type _M_allocated_capacity; + }; + + void + _M_data(pointer __p) + { _M_dataplus._M_p = __p; } + + void + _M_length(size_type __length) + { _M_string_length = __length; } + + pointer + _M_data() const + { return _M_dataplus._M_p; } + + pointer + _M_local_data() + { + + return std::pointer_traits::pointer_to(*_M_local_buf); + + + + } + + const_pointer + _M_local_data() const + { + + return std::pointer_traits::pointer_to(*_M_local_buf); + + + + } + + void + _M_capacity(size_type __capacity) + { _M_allocated_capacity = __capacity; } + + void + _M_set_length(size_type __n) + { + _M_length(__n); + traits_type::assign(_M_data()[__n], _CharT()); + } + + bool + _M_is_local() const + { return _M_data() == _M_local_data(); } + + + pointer + _M_create(size_type&, size_type); + + void + _M_dispose() + { + if (!_M_is_local()) + _M_destroy(_M_allocated_capacity); + } + + void + _M_destroy(size_type __size) throw() + { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); } + + + + template + void + _M_construct_aux(_InIterator __beg, _InIterator __end, + std::__false_type) + { + typedef typename iterator_traits<_InIterator>::iterator_category _Tag; + _M_construct(__beg, __end, _Tag()); + } + + + + template + void + _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type) + { _M_construct_aux_2(static_cast(__beg), __end); } + + void + _M_construct_aux_2(size_type __req, _CharT __c) + { _M_construct(__req, __c); } + + template + void + _M_construct(_InIterator __beg, _InIterator __end) + { + typedef typename std::__is_integer<_InIterator>::__type _Integral; + _M_construct_aux(__beg, __end, _Integral()); + } + + + template + void + _M_construct(_InIterator __beg, _InIterator __end, + std::input_iterator_tag); + + + + template + void + _M_construct(_FwdIterator __beg, _FwdIterator __end, + std::forward_iterator_tag); + + void + _M_construct(size_type __req, _CharT __c); + + allocator_type& + _M_get_allocator() + { return _M_dataplus; } + + const allocator_type& + _M_get_allocator() const + { return _M_dataplus; } + + private: +# 317 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range_fmt(("%s: __pos (which is %zu) > " "this->size() (which is %zu)") + , + __s, __pos, this->size()); + return __pos; + } + + void + _M_check_length(size_type __n1, size_type __n2, const char* __s) const + { + if (this->max_size() - (this->size() - __n1) < __n2) + __throw_length_error((__s)); + } + + + + size_type + _M_limit(size_type __pos, size_type __off) const noexcept + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + + + bool + _M_disjunct(const _CharT* __s) const noexcept + { + return (less()(__s, _M_data()) + || less()(_M_data() + this->size(), __s)); + } + + + + static void + _S_copy(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::copy(__d, __s, __n); + } + + static void + _S_move(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::move(__d, __s, __n); + } + + static void + _S_assign(_CharT* __d, size_type __n, _CharT __c) + { + if (__n == 1) + traits_type::assign(*__d, __c); + else + traits_type::assign(__d, __n, __c); + } + + + + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, (void)++__p) + traits_type::assign(*__p, *__k1); + } + + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) noexcept + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + noexcept + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) noexcept + { _S_copy(__p, __k1, __k2 - __k1); } + + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + noexcept + { _S_copy(__p, __k1, __k2 - __k1); } + + static int + _S_compare(size_type __n1, size_type __n2) noexcept + { + const difference_type __d = difference_type(__n1 - __n2); + + if (__d > __gnu_cxx::__numeric_traits::__max) + return __gnu_cxx::__numeric_traits::__max; + else if (__d < __gnu_cxx::__numeric_traits::__min) + return __gnu_cxx::__numeric_traits::__min; + else + return int(__d); + } + + void + _M_assign(const basic_string&); + + void + _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, + size_type __len2); + + void + _M_erase(size_type __pos, size_type __n); + + public: + + + + + + + + basic_string() + noexcept(is_nothrow_default_constructible<_Alloc>::value) + : _M_dataplus(_M_local_data()) + { _M_set_length(0); } + + + + + explicit + basic_string(const _Alloc& __a) noexcept + : _M_dataplus(_M_local_data(), __a) + { _M_set_length(0); } + + + + + + basic_string(const basic_string& __str) + : _M_dataplus(_M_local_data(), + _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) + { _M_construct(__str._M_data(), __str._M_data() + __str.length()); } +# 469 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string(const basic_string& __str, size_type __pos, + const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { + const _CharT* __start = __str._M_data() + + __str._M_check(__pos, "basic_string::basic_string"); + _M_construct(__start, __start + __str._M_limit(__pos, npos)); + } + + + + + + + + basic_string(const basic_string& __str, size_type __pos, + size_type __n) + : _M_dataplus(_M_local_data()) + { + const _CharT* __start = __str._M_data() + + __str._M_check(__pos, "basic_string::basic_string"); + _M_construct(__start, __start + __str._M_limit(__pos, __n)); + } +# 500 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_M_local_data(), __a) + { + const _CharT* __start + = __str._M_data() + __str._M_check(__pos, "string::string"); + _M_construct(__start, __start + __str._M_limit(__pos, __n)); + } +# 518 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__s, __s + __n); } +# 531 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { + const _CharT* __end = __s ? __s + traits_type::length(__s) + + : reinterpret_cast(__alignof__(_CharT)); + _M_construct(__s, __end, random_access_iterator_tag()); + } +# 551 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__n, __c); } +# 565 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string(basic_string&& __str) noexcept + : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator())) + { + if (__str._M_is_local()) + { + traits_type::copy(_M_local_buf, __str._M_local_buf, + _S_local_capacity + 1); + } + else + { + _M_data(__str._M_data()); + _M_capacity(__str._M_allocated_capacity); + } + + + + + _M_length(__str.length()); + __str._M_data(__str._M_local_data()); + __str._M_set_length(0); + } + + + + + + + basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__l.begin(), __l.end()); } + + basic_string(const basic_string& __str, const _Alloc& __a) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__str.begin(), __str.end()); } + + basic_string(basic_string&& __str, const _Alloc& __a) + noexcept(_Alloc_traits::_S_always_equal()) + : _M_dataplus(_M_local_data(), __a) + { + if (__str._M_is_local()) + { + traits_type::copy(_M_local_buf, __str._M_local_buf, + _S_local_capacity + 1); + _M_length(__str.length()); + __str._M_set_length(0); + } + else if (_Alloc_traits::_S_always_equal() + || __str.get_allocator() == __a) + { + _M_data(__str._M_data()); + _M_length(__str.length()); + _M_capacity(__str._M_allocated_capacity); + __str._M_data(__str._M_local_buf); + __str._M_set_length(0); + } + else + _M_construct(__str.begin(), __str.end()); + } +# 633 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + + + basic_string(_InputIterator __beg, _InputIterator __end, + const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__beg, __end); } +# 651 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + basic_string(const _Tp& __t, size_type __pos, size_type __n, + const _Alloc& __a = _Alloc()) + : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { } + + + + + + + template> + explicit + basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) + : basic_string(__sv_wrapper(_S_to_string_view(__t)), __a) { } + + + + + + ~basic_string() + { _M_dispose(); } + + + + + + basic_string& + operator=(const basic_string& __str) + { + return this->assign(__str); + } + + + + + + basic_string& + operator=(const _CharT* __s) + { return this->assign(__s); } +# 698 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + operator=(_CharT __c) + { + this->assign(1, __c); + return *this; + } +# 715 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + operator=(basic_string&& __str) + noexcept(_Alloc_traits::_S_nothrow_move()) + { + if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() + && !_Alloc_traits::_S_always_equal() + && _M_get_allocator() != __str._M_get_allocator()) + { + + _M_destroy(_M_allocated_capacity); + _M_data(_M_local_data()); + _M_set_length(0); + } + + std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); + + if (__str._M_is_local()) + { + + + + if (__builtin_expect(std::__addressof(__str) != this, true)) + { + if (__str.size()) + this->_S_copy(_M_data(), __str._M_data(), __str.size()); + _M_set_length(__str.size()); + } + } + else if (_Alloc_traits::_S_propagate_on_move_assign() + || _Alloc_traits::_S_always_equal() + || _M_get_allocator() == __str._M_get_allocator()) + { + + pointer __data = nullptr; + size_type __capacity; + if (!_M_is_local()) + { + if (_Alloc_traits::_S_always_equal()) + { + + __data = _M_data(); + __capacity = _M_allocated_capacity; + } + else + _M_destroy(_M_allocated_capacity); + } + + _M_data(__str._M_data()); + _M_length(__str.length()); + _M_capacity(__str._M_allocated_capacity); + if (__data) + { + __str._M_data(__data); + __str._M_capacity(__capacity); + } + else + __str._M_data(__str._M_local_buf); + } + else + assign(__str); + __str.clear(); + return *this; + } + + + + + + basic_string& + operator=(initializer_list<_CharT> __l) + { + this->assign(__l.begin(), __l.size()); + return *this; + } + + + + + + + + template + _If_sv<_Tp, basic_string&> + operator=(const _Tp& __svt) + { return this->assign(__svt); } + + + + + + operator __sv_type() const noexcept + { return __sv_type(data(), size()); } + + + + + + + + iterator + begin() noexcept + { return iterator(_M_data()); } + + + + + + const_iterator + begin() const noexcept + { return const_iterator(_M_data()); } + + + + + + iterator + end() noexcept + { return iterator(_M_data() + this->size()); } + + + + + + const_iterator + end() const noexcept + { return const_iterator(_M_data() + this->size()); } + + + + + + + reverse_iterator + rbegin() noexcept + { return reverse_iterator(this->end()); } + + + + + + + const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + + + + + + reverse_iterator + rend() noexcept + { return reverse_iterator(this->begin()); } + + + + + + + const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(this->begin()); } + + + + + + + const_iterator + cbegin() const noexcept + { return const_iterator(this->_M_data()); } + + + + + + const_iterator + cend() const noexcept + { return const_iterator(this->_M_data() + this->size()); } + + + + + + + const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + + + + + + const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(this->begin()); } + + + public: + + + + size_type + size() const noexcept + { return _M_string_length; } + + + + size_type + length() const noexcept + { return _M_string_length; } + + + size_type + max_size() const noexcept + { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } +# 943 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + void + resize(size_type __n, _CharT __c); +# 956 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + void + resize(size_type __n) + { this->resize(__n, _CharT()); } + + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + + void + shrink_to_fit() noexcept + { reserve(); } +#pragma GCC diagnostic pop + + + + + + + size_type + capacity() const noexcept + { + return _M_is_local() ? size_type(_S_local_capacity) + : _M_allocated_capacity; + } +# 998 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + void + reserve(size_type __res_arg); + + + + + + [[deprecated("use shrink_to_fit() instead")]] + + void + reserve(); + + + + + void + clear() noexcept + { _M_set_length(0); } + + + + + + [[__nodiscard__]] bool + empty() const noexcept + { return this->size() == 0; } +# 1036 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + const_reference + operator[] (size_type __pos) const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__pos <= size())) __builtin_unreachable(); } while (false); + return _M_data()[__pos]; + } +# 1053 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + reference + operator[](size_type __pos) + { + + + do { if (__builtin_is_constant_evaluated() && !bool(__pos <= size())) __builtin_unreachable(); } while (false); + + ; + return _M_data()[__pos]; + } +# 1074 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") + + , + __n, this->size()); + return _M_data()[__n]; + } +# 1095 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") + + , + __n, this->size()); + return _M_data()[__n]; + } + + + + + + + reference + front() noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return operator[](0); + } + + + + + + const_reference + front() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return operator[](0); + } + + + + + + reference + back() noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return operator[](this->size() - 1); + } + + + + + + const_reference + back() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return operator[](this->size() - 1); + } +# 1158 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + operator+=(const basic_string& __str) + { return this->append(__str); } + + + + + + + basic_string& + operator+=(const _CharT* __s) + { return this->append(__s); } + + + + + + + basic_string& + operator+=(_CharT __c) + { + this->push_back(__c); + return *this; + } + + + + + + + + basic_string& + operator+=(initializer_list<_CharT> __l) + { return this->append(__l.begin(), __l.size()); } +# 1200 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + operator+=(const _Tp& __svt) + { return this->append(__svt); } + + + + + + + + basic_string& + append(const basic_string& __str) + { return _M_append(__str._M_data(), __str.size()); } +# 1228 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n = npos) + { return _M_append(__str._M_data() + + __str._M_check(__pos, "basic_string::append"), + __str._M_limit(__pos, __n)); } + + + + + + + + basic_string& + append(const _CharT* __s, size_type __n) + { + ; + _M_check_length(size_type(0), __n, "basic_string::append"); + return _M_append(__s, __n); + } + + + + + + + basic_string& + append(const _CharT* __s) + { + ; + const size_type __n = traits_type::length(__s); + _M_check_length(size_type(0), __n, "basic_string::append"); + return _M_append(__s, __n); + } +# 1270 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + append(size_type __n, _CharT __c) + { return _M_replace_aux(this->size(), size_type(0), __n, __c); } + + + + + + + + basic_string& + append(initializer_list<_CharT> __l) + { return this->append(__l.begin(), __l.size()); } +# 1294 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + + + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(end(), end(), __first, __last); } + + + + + + + + template + _If_sv<_Tp, basic_string&> + append(const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->append(__sv.data(), __sv.size()); + } +# 1324 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + append(const _Tp& __svt, size_type __pos, size_type __n = npos) + { + __sv_type __sv = __svt; + return _M_append(__sv.data() + + std::__sv_check(__sv.size(), __pos, "basic_string::append"), + std::__sv_limit(__sv.size(), __pos, __n)); + } + + + + + + + void + push_back(_CharT __c) + { + const size_type __size = this->size(); + if (__size + 1 > this->capacity()) + this->_M_mutate(__size, size_type(0), 0, size_type(1)); + traits_type::assign(this->_M_data()[__size], __c); + this->_M_set_length(__size + 1); + } + + + + + + + basic_string& + assign(const basic_string& __str) + { + + if (_Alloc_traits::_S_propagate_on_copy_assign()) + { + if (!_Alloc_traits::_S_always_equal() && !_M_is_local() + && _M_get_allocator() != __str._M_get_allocator()) + { + + + if (__str.size() <= _S_local_capacity) + { + _M_destroy(_M_allocated_capacity); + _M_data(_M_local_data()); + _M_set_length(0); + } + else + { + const auto __len = __str.size(); + auto __alloc = __str._M_get_allocator(); + + auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); + _M_destroy(_M_allocated_capacity); + _M_data(__ptr); + _M_capacity(__len); + _M_set_length(__len); + } + } + std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); + } + + this->_M_assign(__str); + return *this; + } +# 1399 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(basic_string&& __str) + noexcept(_Alloc_traits::_S_nothrow_move()) + { + + + return *this = std::move(__str); + } +# 1422 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n = npos) + { return _M_replace(size_type(0), this->size(), __str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } +# 1438 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s, size_type __n) + { + ; + return _M_replace(size_type(0), this->size(), __s, __n); + } +# 1454 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s) + { + ; + return _M_replace(size_type(0), this->size(), __s, + traits_type::length(__s)); + } +# 1471 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(size_type __n, _CharT __c) + { return _M_replace_aux(size_type(0), this->size(), __n, __c); } +# 1484 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + + + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(begin(), end(), __first, __last); } + + + + + + + + basic_string& + assign(initializer_list<_CharT> __l) + { return this->assign(__l.begin(), __l.size()); } +# 1510 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + assign(const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->assign(__sv.data(), __sv.size()); + } +# 1525 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + assign(const _Tp& __svt, size_type __pos, size_type __n = npos) + { + __sv_type __sv = __svt; + return _M_replace(size_type(0), this->size(), + __sv.data() + + std::__sv_check(__sv.size(), __pos, "basic_string::assign"), + std::__sv_limit(__sv.size(), __pos, __n)); + } +# 1553 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + insert(const_iterator __p, size_type __n, _CharT __c) + { + ; + const size_type __pos = __p - begin(); + this->replace(__p, __p, __n, __c); + return iterator(this->_M_data() + __pos); + } +# 1595 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + iterator + insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) + { + ; + const size_type __pos = __p - begin(); + this->replace(__p, __p, __beg, __end); + return iterator(this->_M_data() + __pos); + } +# 1631 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + insert(const_iterator __p, initializer_list<_CharT> __l) + { return this->insert(__p, __l.begin(), __l.end()); } +# 1658 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str) + { return this->replace(__pos1, size_type(0), + __str._M_data(), __str.size()); } +# 1681 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n = npos) + { return this->replace(__pos1, size_type(0), __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } +# 1704 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n) + { return this->replace(__pos, size_type(0), __s, __n); } +# 1723 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s) + { + ; + return this->replace(__pos, size_type(0), __s, + traits_type::length(__s)); + } +# 1747 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), + size_type(0), __n, __c); } +# 1765 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + insert(__const_iterator __p, _CharT __c) + { + ; + const size_type __pos = __p - begin(); + _M_replace_aux(__pos, size_type(0), size_type(1), __c); + return iterator(_M_data() + __pos); + } +# 1781 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + insert(size_type __pos, const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->insert(__pos, __sv.data(), __sv.size()); + } +# 1797 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + insert(size_type __pos1, const _Tp& __svt, + size_type __pos2, size_type __n = npos) + { + __sv_type __sv = __svt; + return this->replace(__pos1, size_type(0), + __sv.data() + + std::__sv_check(__sv.size(), __pos2, "basic_string::insert"), + std::__sv_limit(__sv.size(), __pos2, __n)); + } +# 1825 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + _M_check(__pos, "basic_string::erase"); + if (__n == npos) + this->_M_set_length(__pos); + else if (__n != 0) + this->_M_erase(__pos, _M_limit(__pos, __n)); + return *this; + } +# 1844 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + erase(__const_iterator __position) + { + + ; + const size_type __pos = __position - begin(); + this->_M_erase(__pos, size_type(1)); + return iterator(_M_data() + __pos); + } +# 1863 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + erase(__const_iterator __first, __const_iterator __last) + { + + ; + const size_type __pos = __first - begin(); + if (__last == end()) + this->_M_set_length(__pos); + else + this->_M_erase(__pos, __last - __first); + return iterator(this->_M_data() + __pos); + } + + + + + + + + void + pop_back() noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + _M_erase(size() - 1, 1); + } +# 1907 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { return this->replace(__pos, __n, __str._M_data(), __str.size()); } +# 1929 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2 = npos) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } +# 1954 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + ; + return _M_replace(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __s, __n2); + } +# 1979 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + ; + return this->replace(__pos, __n1, __s, traits_type::length(__s)); + } +# 2003 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __n2, __c); } +# 2021 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + const basic_string& __str) + { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } +# 2041 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + const _CharT* __s, size_type __n) + { + + ; + return this->replace(__i1 - begin(), __i2 - __i1, __s, __n); + } +# 2063 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) + { + ; + return this->replace(__i1, __i2, __s, traits_type::length(__s)); + } +# 2084 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, size_type __n, + _CharT __c) + { + + ; + return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c); + } +# 2109 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + basic_string& + replace(const_iterator __i1, const_iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { + + ; + ; + return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, + std::__false_type()); + } +# 2141 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + _CharT* __k1, _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - begin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + const _CharT* __k1, const _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - begin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + iterator __k1, iterator __k2) + { + + ; + ; + return this->replace(__i1 - begin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + const_iterator __k1, const_iterator __k2) + { + + ; + ; + return this->replace(__i1 - begin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } +# 2200 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& replace(const_iterator __i1, const_iterator __i2, + initializer_list<_CharT> __l) + { return this->replace(__i1, __i2, __l.begin(), __l.size()); } +# 2213 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + replace(size_type __pos, size_type __n, const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->replace(__pos, __n, __sv.data(), __sv.size()); + } +# 2230 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + replace(size_type __pos1, size_type __n1, const _Tp& __svt, + size_type __pos2, size_type __n2 = npos) + { + __sv_type __sv = __svt; + return this->replace(__pos1, __n1, + __sv.data() + + std::__sv_check(__sv.size(), __pos2, "basic_string::replace"), + std::__sv_limit(__sv.size(), __pos2, __n2)); + } +# 2251 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->replace(__i1 - begin(), __i2 - __i1, __sv); + } + + + private: + template + basic_string& + _M_replace_dispatch(const_iterator __i1, const_iterator __i2, + _Integer __n, _Integer __val, __true_type) + { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } + + template + basic_string& + _M_replace_dispatch(const_iterator __i1, const_iterator __i2, + _InputIterator __k1, _InputIterator __k2, + __false_type); + + basic_string& + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c); + + basic_string& + _M_replace(size_type __pos, size_type __len1, const _CharT* __s, + const size_type __len2); + + basic_string& + _M_append(const _CharT* __s, size_type __n); + + public: +# 2298 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; +# 2308 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + void + swap(basic_string& __s) noexcept; +# 2318 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + const _CharT* + c_str() const noexcept + { return _M_data(); } +# 2330 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + const _CharT* + data() const noexcept + { return _M_data(); } +# 2341 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + _CharT* + data() noexcept + { return _M_data(); } + + + + + + allocator_type + get_allocator() const noexcept + { return _M_get_allocator(); } +# 2365 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const + noexcept; +# 2379 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find(const basic_string& __str, size_type __pos = 0) const + noexcept + { return this->find(__str.data(), __pos, __str.size()); } +# 2391 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find(const _Tp& __svt, size_type __pos = 0) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find(__sv.data(), __pos, __sv.size()); + } +# 2411 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos = 0) const noexcept + { + ; + return this->find(__s, __pos, traits_type::length(__s)); + } +# 2428 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find(_CharT __c, size_type __pos = 0) const noexcept; +# 2441 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + noexcept + { return this->rfind(__str.data(), __pos, __str.size()); } +# 2453 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + rfind(const _Tp& __svt, size_type __pos = npos) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->rfind(__sv.data(), __pos, __sv.size()); + } +# 2475 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const + noexcept; +# 2489 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->rfind(__s, __pos, traits_type::length(__s)); + } +# 2506 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + rfind(_CharT __c, size_type __pos = npos) const noexcept; +# 2520 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + noexcept + { return this->find_first_of(__str.data(), __pos, __str.size()); } +# 2533 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find_first_of(const _Tp& __svt, size_type __pos = 0) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find_first_of(__sv.data(), __pos, __sv.size()); + } +# 2555 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept; +# 2569 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + noexcept + { + ; + return this->find_first_of(__s, __pos, traits_type::length(__s)); + } +# 2589 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_of(_CharT __c, size_type __pos = 0) const noexcept + { return this->find(__c, __pos); } +# 2604 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + noexcept + { return this->find_last_of(__str.data(), __pos, __str.size()); } +# 2617 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find_last_of(const _Tp& __svt, size_type __pos = npos) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find_last_of(__sv.data(), __pos, __sv.size()); + } +# 2639 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept; +# 2653 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + noexcept + { + ; + return this->find_last_of(__s, __pos, traits_type::length(__s)); + } +# 2673 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_of(_CharT __c, size_type __pos = npos) const noexcept + { return this->rfind(__c, __pos); } +# 2687 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + noexcept + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } +# 2700 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find_first_not_of(const _Tp& __svt, size_type __pos = 0) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find_first_not_of(__sv.data(), __pos, __sv.size()); + } +# 2722 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const noexcept; +# 2736 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + noexcept + { + ; + return this->find_first_not_of(__s, __pos, traits_type::length(__s)); + } +# 2754 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const + noexcept; +# 2769 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + noexcept + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } +# 2782 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find_last_not_of(const _Tp& __svt, size_type __pos = npos) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find_last_not_of(__sv.data(), __pos, __sv.size()); + } +# 2804 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const noexcept; +# 2818 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + noexcept + { + ; + return this->find_last_not_of(__s, __pos, traits_type::length(__s)); + } +# 2836 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const + noexcept; +# 2852 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { return basic_string(*this, + _M_check(__pos, "basic_string::substr"), __n); } +# 2871 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(const basic_string& __str) const + { + const size_type __size = this->size(); + const size_type __osize = __str.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + + + + + + + template + _If_sv<_Tp, int> + compare(const _Tp& __svt) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + const size_type __size = this->size(); + const size_type __osize = __sv.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __sv.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } +# 2914 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, int> + compare(size_type __pos, size_type __n, const _Tp& __svt) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return __sv_type(*this).substr(__pos, __n).compare(__sv); + } +# 2933 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, int> + compare(size_type __pos1, size_type __n1, const _Tp& __svt, + size_type __pos2, size_type __n2 = npos) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return __sv_type(*this) + .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2)); + } +# 2964 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; +# 2990 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2 = npos) const; +# 3008 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(const _CharT* __s) const noexcept; +# 3032 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; +# 3059 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; + + + bool + starts_with(basic_string_view<_CharT, _Traits> __x) const noexcept + { return __sv_type(this->data(), this->size()).starts_with(__x); } + + bool + starts_with(_CharT __x) const noexcept + { return __sv_type(this->data(), this->size()).starts_with(__x); } + + bool + starts_with(const _CharT* __x) const noexcept + { return __sv_type(this->data(), this->size()).starts_with(__x); } + + bool + ends_with(basic_string_view<_CharT, _Traits> __x) const noexcept + { return __sv_type(this->data(), this->size()).ends_with(__x); } + + bool + ends_with(_CharT __x) const noexcept + { return __sv_type(this->data(), this->size()).ends_with(__x); } + + bool + ends_with(const _CharT* __x) const noexcept + { return __sv_type(this->data(), this->size()).ends_with(__x); } +# 3104 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template friend class basic_stringbuf; + }; +} +# 6057 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 +namespace __cxx11 { + template::value_type, + typename _Allocator = allocator<_CharT>, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireAllocator<_Allocator>> + basic_string(_InputIterator, _InputIterator, _Allocator = _Allocator()) + -> basic_string<_CharT, char_traits<_CharT>, _Allocator>; + + + + template, + typename = _RequireAllocator<_Allocator>> + basic_string(basic_string_view<_CharT, _Traits>, const _Allocator& = _Allocator()) + -> basic_string<_CharT, _Traits, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + basic_string(basic_string_view<_CharT, _Traits>, + typename basic_string<_CharT, _Traits, _Allocator>::size_type, + typename basic_string<_CharT, _Traits, _Allocator>::size_type, + const _Allocator& = _Allocator()) + -> basic_string<_CharT, _Traits, _Allocator>; +} +# 6092 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return std::move(__lhs.append(__rhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>&& __rhs) + { return std::move(__rhs.insert(0, __lhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, + basic_string<_CharT, _Traits, _Alloc>&& __rhs) + { + + using _Alloc_traits = allocator_traits<_Alloc>; + bool __use_rhs = false; + if constexpr (typename _Alloc_traits::is_always_equal{}) + __use_rhs = true; + else if (__lhs.get_allocator() == __rhs.get_allocator()) + __use_rhs = true; + if (__use_rhs) + + { + const auto __size = __lhs.size() + __rhs.size(); + if (__size > __lhs.capacity() && __size <= __rhs.capacity()) + return std::move(__rhs.insert(0, __lhs)); + } + return std::move(__lhs.append(__rhs)); + } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + basic_string<_CharT, _Traits, _Alloc>&& __rhs) + { return std::move(__rhs.insert(0, __lhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, + basic_string<_CharT, _Traits, _Alloc>&& __rhs) + { return std::move(__rhs.insert(0, 1, __lhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, + const _CharT* __rhs) + { return std::move(__lhs.append(__rhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, + _CharT __rhs) + { return std::move(__lhs.append(1, __rhs)); } +# 6223 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + noexcept + { return __lhs.compare(__rhs) == 0; } + + template + inline + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type + operator==(const basic_string<_CharT>& __lhs, + const basic_string<_CharT>& __rhs) noexcept + { return (__lhs.size() == __rhs.size() + && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), + __lhs.size())); } + + + + + + + + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } +# 6259 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline auto + operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept + -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) + { return __detail::__char_traits_cmp_cat<_Traits>(__lhs.compare(__rhs)); } +# 6273 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline auto + operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) noexcept + -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) + { return __detail::__char_traits_cmp_cat<_Traits>(__lhs.compare(__rhs)); } +# 6490 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + noexcept(noexcept(__lhs.swap(__rhs))) + { __lhs.swap(__rhs); } +# 6510 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + + template<> + basic_istream& + operator>>(basic_istream& __is, basic_string& __str); +# 6528 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + + + return __ostream_insert(__os, __str.data(), __str.size()); + } +# 6551 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); +# 6568 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return std::getline(__is, __str, __is.widen('\n')); } + + + + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>&& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { return std::getline(__is, __str, __delim); } + + + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>&& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return std::getline(__is, __str); } + + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + char __delim); + + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + wchar_t __delim); + + + +} + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 +# 96 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 +namespace std +{ + using ::FILE; + using ::fpos_t; + + using ::clearerr; + using ::fclose; + using ::feof; + using ::ferror; + using ::fflush; + using ::fgetc; + using ::fgetpos; + using ::fgets; + using ::fopen; + using ::fprintf; + using ::fputc; + using ::fputs; + using ::fread; + using ::freopen; + using ::fscanf; + using ::fseek; + using ::fsetpos; + using ::ftell; + using ::fwrite; + using ::getc; + using ::getchar; + + + + + using ::perror; + using ::printf; + using ::putc; + using ::putchar; + using ::puts; + using ::remove; + using ::rename; + using ::rewind; + using ::scanf; + using ::setbuf; + using ::setvbuf; + using ::sprintf; + using ::sscanf; + using ::tmpfile; + + using ::tmpnam; + + using ::ungetc; + using ::vfprintf; + using ::vprintf; + using ::vsprintf; +} +# 157 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 +namespace __gnu_cxx +{ +# 175 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 + using ::snprintf; + using ::vfscanf; + using ::vscanf; + using ::vsnprintf; + using ::vsscanf; + +} + +namespace std +{ + using ::__gnu_cxx::snprintf; + using ::__gnu_cxx::vfscanf; + using ::__gnu_cxx::vscanf; + using ::__gnu_cxx::vsnprintf; + using ::__gnu_cxx::vsscanf; +} +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 3 +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 2 3 + +namespace __gnu_cxx +{ + + + + template + _Ret + __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), + const char* __name, const _CharT* __str, std::size_t* __idx, + _Base... __base) + { + _Ret __ret; + + _CharT* __endptr; + + struct _Save_errno { + _Save_errno() : _M_errno((*_errno())) { (*_errno()) = 0; } + ~_Save_errno() { if ((*_errno()) == 0) (*_errno()) = _M_errno; } + int _M_errno; + } const __save_errno; + + struct _Range_chk { + static bool + _S_chk(_TRet, std::false_type) { return false; } + + static bool + _S_chk(_TRet __val, std::true_type) + { + return __val < _TRet(__numeric_traits::__min) + || __val > _TRet(__numeric_traits::__max); + } + }; + + const _TRet __tmp = __convf(__str, &__endptr, __base...); + + if (__endptr == __str) + std::__throw_invalid_argument(__name); + else if ((*_errno()) == 34 + || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) + std::__throw_out_of_range(__name); + else + __ret = __tmp; + + if (__idx) + *__idx = __endptr - __str; + + return __ret; + } + + + template + _String + __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, + __builtin_va_list), std::size_t __n, + const _CharT* __fmt, ...) + { + + + _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __n)); + + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + + const int __len = __convf(__s, __n, __fmt, __args); + + __builtin_va_end(__args); + + return _String(__s, __s + __len); + } + + +} +# 6608 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/charconv.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/charconv.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/charconv.h" 3 + + + + + +namespace std +{ + +namespace __detail +{ + + template + constexpr unsigned + __to_chars_len(_Tp __value, int __base = 10) noexcept + { + static_assert(is_integral<_Tp>::value, "implementation bug"); + static_assert(is_unsigned<_Tp>::value, "implementation bug"); + + unsigned __n = 1; + const unsigned __b2 = __base * __base; + const unsigned __b3 = __b2 * __base; + const unsigned long __b4 = __b3 * __base; + for (;;) + { + if (__value < (unsigned)__base) return __n; + if (__value < __b2) return __n + 1; + if (__value < __b3) return __n + 2; + if (__value < __b4) return __n + 3; + __value /= __b4; + __n += 4; + } + } + + + + + template + void + __to_chars_10_impl(char* __first, unsigned __len, _Tp __val) noexcept + { + static_assert(is_integral<_Tp>::value, "implementation bug"); + static_assert(is_unsigned<_Tp>::value, "implementation bug"); + + static constexpr char __digits[201] = + "0001020304050607080910111213141516171819" + "2021222324252627282930313233343536373839" + "4041424344454647484950515253545556575859" + "6061626364656667686970717273747576777879" + "8081828384858687888990919293949596979899"; + unsigned __pos = __len - 1; + while (__val >= 100) + { + auto const __num = (__val % 100) * 2; + __val /= 100; + __first[__pos] = __digits[__num + 1]; + __first[__pos - 1] = __digits[__num]; + __pos -= 2; + } + if (__val >= 10) + { + auto const __num = __val * 2; + __first[1] = __digits[__num + 1]; + __first[0] = __digits[__num]; + } + else + __first[0] = '0' + __val; + } + +} + +} +# 6609 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 2 3 + +namespace std +{ + +namespace __cxx11 { + + + + inline int + stoi(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtol, "stoi", __str.c_str(), + __idx, __base); } + + inline long + stol(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), + __idx, __base); } + + inline unsigned long + stoul(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), + __idx, __base); } + + inline long long + stoll(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), + __idx, __base); } + + inline unsigned long long + stoull(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), + __idx, __base); } + + + inline float + stof(const string& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } + + inline double + stod(const string& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } + + inline long double + stold(const string& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } + + + + + inline string + to_string(int __val) + { + const bool __neg = __val < 0; + const unsigned __uval = __neg ? (unsigned)~__val + 1u : __val; + const auto __len = __detail::__to_chars_len(__uval); + string __str(__neg + __len, '-'); + __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); + return __str; + } + + inline string + to_string(unsigned __val) + { + string __str(__detail::__to_chars_len(__val), '\0'); + __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); + return __str; + } + + inline string + to_string(long __val) + { + const bool __neg = __val < 0; + const unsigned long __uval = __neg ? (unsigned long)~__val + 1ul : __val; + const auto __len = __detail::__to_chars_len(__uval); + string __str(__neg + __len, '-'); + __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); + return __str; + } + + inline string + to_string(unsigned long __val) + { + string __str(__detail::__to_chars_len(__val), '\0'); + __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); + return __str; + } + + inline string + to_string(long long __val) + { + const bool __neg = __val < 0; + const unsigned long long __uval + = __neg ? (unsigned long long)~__val + 1ull : __val; + const auto __len = __detail::__to_chars_len(__uval); + string __str(__neg + __len, '-'); + __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); + return __str; + } + + inline string + to_string(unsigned long long __val) + { + string __str(__detail::__to_chars_len(__val), '\0'); + __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); + return __str; + } + + + + + inline string + to_string(float __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, + "%f", __val); + } + + inline string + to_string(double __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, + "%f", __val); + } + + inline string + to_string(long double __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, + "%Lf", __val); + } + + + + inline int + stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstol, "stoi", __str.c_str(), + __idx, __base); } + + inline long + stol(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), + __idx, __base); } + + inline unsigned long + stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), + __idx, __base); } + + inline long long + stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), + __idx, __base); } + + inline unsigned long long + stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), + __idx, __base); } + + + inline float + stof(const wstring& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } + + inline double + stod(const wstring& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } + + inline long double + stold(const wstring& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } + + + + inline wstring + to_wstring(int __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(int), + L"%d", __val); } + + inline wstring + to_wstring(unsigned __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, + 4 * sizeof(unsigned), + L"%u", __val); } + + inline wstring + to_wstring(long __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(long), + L"%ld", __val); } + + inline wstring + to_wstring(unsigned long __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, + 4 * sizeof(unsigned long), + L"%lu", __val); } + + inline wstring + to_wstring(long long __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, + 4 * sizeof(long long), + L"%lld", __val); } + + inline wstring + to_wstring(unsigned long long __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, + 4 * sizeof(unsigned long long), + L"%llu", __val); } + + inline wstring + to_wstring(float __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vswprintf, __n, + L"%f", __val); + } + + inline wstring + to_wstring(double __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vswprintf, __n, + L"%f", __val); + } + + inline wstring + to_wstring(long double __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vswprintf, __n, + L"%Lf", __val); + } + + + +} + +} + + + + + + + +namespace std +{ + + + + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const string& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), __s.length()); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const wstring& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(wchar_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u8string& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char8_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u16string& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char16_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u32string& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char32_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + + + inline namespace literals + { + inline namespace string_literals + { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wliteral-suffix" + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const char* __str, size_t __len) + { return basic_string{__str, __len}; } + + + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const wchar_t* __str, size_t __len) + { return basic_string{__str, __len}; } + + + + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const char8_t* __str, size_t __len) + { return basic_string{__str, __len}; } + + + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const char16_t* __str, size_t __len) + { return basic_string{__str, __len}; } + + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const char32_t* __str, size_t __len) + { return basic_string{__str, __len}; } + +#pragma GCC diagnostic pop + } + } + + + namespace __detail::__variant + { + template struct _Never_valueless_alt; + + + + template + struct _Never_valueless_alt> + : __and_< + is_nothrow_move_constructible>, + is_nothrow_move_assignable> + >::type + { }; + } + + + + +} +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 1 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + + + +namespace std +{ + + + + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + swap(basic_string& __s) noexcept + { + if (this == &__s) + return; + + _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); + + if (_M_is_local()) + if (__s._M_is_local()) + { + if (length() && __s.length()) + { + _CharT __tmp_data[_S_local_capacity + 1]; + traits_type::copy(__tmp_data, __s._M_local_buf, + _S_local_capacity + 1); + traits_type::copy(__s._M_local_buf, _M_local_buf, + _S_local_capacity + 1); + traits_type::copy(_M_local_buf, __tmp_data, + _S_local_capacity + 1); + } + else if (__s.length()) + { + traits_type::copy(_M_local_buf, __s._M_local_buf, + _S_local_capacity + 1); + _M_length(__s.length()); + __s._M_set_length(0); + return; + } + else if (length()) + { + traits_type::copy(__s._M_local_buf, _M_local_buf, + _S_local_capacity + 1); + __s._M_length(length()); + _M_set_length(0); + return; + } + } + else + { + const size_type __tmp_capacity = __s._M_allocated_capacity; + traits_type::copy(__s._M_local_buf, _M_local_buf, + _S_local_capacity + 1); + _M_data(__s._M_data()); + __s._M_data(__s._M_local_buf); + _M_capacity(__tmp_capacity); + } + else + { + const size_type __tmp_capacity = _M_allocated_capacity; + if (__s._M_is_local()) + { + traits_type::copy(_M_local_buf, __s._M_local_buf, + _S_local_capacity + 1); + __s._M_data(_M_data()); + _M_data(_M_local_buf); + } + else + { + pointer __tmp_ptr = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp_ptr); + _M_capacity(__s._M_allocated_capacity); + } + __s._M_capacity(__tmp_capacity); + } + + const size_type __tmp_length = length(); + _M_length(__s.length()); + __s._M_length(__tmp_length); + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::pointer + basic_string<_CharT, _Traits, _Alloc>:: + _M_create(size_type& __capacity, size_type __old_capacity) + { + + + if (__capacity > max_size()) + std::__throw_length_error(("basic_string::_M_create")); + + + + + if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) + { + __capacity = 2 * __old_capacity; + + if (__capacity > max_size()) + __capacity = max_size(); + } + + + + return _Alloc_traits::allocate(_M_get_allocator(), __capacity + 1); + } + + + + + + template + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_construct(_InIterator __beg, _InIterator __end, + std::input_iterator_tag) + { + size_type __len = 0; + size_type __capacity = size_type(_S_local_capacity); + + while (__beg != __end && __len < __capacity) + { + _M_data()[__len++] = *__beg; + ++__beg; + } + + try + { + while (__beg != __end) + { + if (__len == __capacity) + { + + __capacity = __len + 1; + pointer __another = _M_create(__capacity, __len); + this->_S_copy(__another, _M_data(), __len); + _M_dispose(); + _M_data(__another); + _M_capacity(__capacity); + } + _M_data()[__len++] = *__beg; + ++__beg; + } + } + catch(...) + { + _M_dispose(); + throw; + } + + _M_set_length(__len); + } + + template + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_construct(_InIterator __beg, _InIterator __end, + std::forward_iterator_tag) + { + + if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) + std::__throw_logic_error(("basic_string::" "_M_construct null not valid") + ); + + size_type __dnew = static_cast(std::distance(__beg, __end)); + + if (__dnew > size_type(_S_local_capacity)) + { + _M_data(_M_create(__dnew, size_type(0))); + _M_capacity(__dnew); + } + + + try + { this->_S_copy_chars(_M_data(), __beg, __end); } + catch(...) + { + _M_dispose(); + throw; + } + + _M_set_length(__dnew); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_construct(size_type __n, _CharT __c) + { + if (__n > size_type(_S_local_capacity)) + { + _M_data(_M_create(__n, size_type(0))); + _M_capacity(__n); + } + + if (__n) + this->_S_assign(_M_data(), __n, __c); + + _M_set_length(__n); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_assign(const basic_string& __str) + { + if (this != &__str) + { + const size_type __rsize = __str.length(); + const size_type __capacity = capacity(); + + if (__rsize > __capacity) + { + size_type __new_capacity = __rsize; + pointer __tmp = _M_create(__new_capacity, __capacity); + _M_dispose(); + _M_data(__tmp); + _M_capacity(__new_capacity); + } + + if (__rsize) + this->_S_copy(_M_data(), __str._M_data(), __rsize); + + _M_set_length(__rsize); + } + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve(size_type __res) + { + const size_type __capacity = capacity(); + + + + + if (__res <= __capacity) + return; + + pointer __tmp = _M_create(__res, __capacity); + this->_S_copy(__tmp, _M_data(), length() + 1); + _M_dispose(); + _M_data(__tmp); + _M_capacity(__res); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, + size_type __len2) + { + const size_type __how_much = length() - __pos - __len1; + + size_type __new_capacity = length() + __len2 - __len1; + pointer __r = _M_create(__new_capacity, capacity()); + + if (__pos) + this->_S_copy(__r, _M_data(), __pos); + if (__s && __len2) + this->_S_copy(__r + __pos, __s, __len2); + if (__how_much) + this->_S_copy(__r + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + + _M_dispose(); + _M_data(__r); + _M_capacity(__new_capacity); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_erase(size_type __pos, size_type __n) + { + const size_type __how_much = length() - __pos - __n; + + if (__how_much && __n) + this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); + + _M_set_length(length() - __n); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve() + { + if (_M_is_local()) + return; + + const size_type __length = length(); + const size_type __capacity = _M_allocated_capacity; + + if (__length <= size_type(_S_local_capacity)) + { + this->_S_copy(_M_local_data(), _M_data(), __length + 1); + _M_destroy(__capacity); + _M_data(_M_local_data()); + } + + else if (__length < __capacity) + try + { + pointer __tmp + = _Alloc_traits::allocate(_M_get_allocator(), __length + 1); + this->_S_copy(__tmp, _M_data(), __length + 1); + _M_dispose(); + _M_data(__tmp); + _M_capacity(__length); + } + catch (const __cxxabiv1::__forced_unwind&) + { throw; } + catch (...) + { } + + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + resize(size_type __n, _CharT __c) + { + const size_type __size = this->size(); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->_M_set_length(__n); + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_append(const _CharT* __s, size_type __n) + { + const size_type __len = __n + this->size(); + + if (__len <= this->capacity()) + { + if (__n) + this->_S_copy(this->_M_data() + this->size(), __s, __n); + } + else + this->_M_mutate(this->size(), size_type(0), __s, __n); + + this->_M_set_length(__len); + return *this; + } + + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_dispatch(const_iterator __i1, const_iterator __i2, + _InputIterator __k1, _InputIterator __k2, + std::__false_type) + { + + + const basic_string __s(__k1, __k2, this->get_allocator()); + const size_type __n1 = __i2 - __i1; + return _M_replace(__i1 - begin(), __n1, __s._M_data(), + __s.size()); + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c) + { + _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); + + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __n2 - __n1; + + if (__new_size <= this->capacity()) + { + pointer __p = this->_M_data() + __pos1; + + const size_type __how_much = __old_size - __pos1 - __n1; + if (__how_much && __n1 != __n2) + this->_S_move(__p + __n2, __p + __n1, __how_much); + } + else + this->_M_mutate(__pos1, __n1, 0, __n2); + + if (__n2) + this->_S_assign(this->_M_data() + __pos1, __n2, __c); + + this->_M_set_length(__new_size); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace(size_type __pos, size_type __len1, const _CharT* __s, + const size_type __len2) + { + _M_check_length(__len1, __len2, "basic_string::_M_replace"); + + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + + if (__new_size <= this->capacity()) + { + pointer __p = this->_M_data() + __pos; + + const size_type __how_much = __old_size - __pos - __len1; + if (_M_disjunct(__s)) + { + if (__how_much && __len1 != __len2) + this->_S_move(__p + __len2, __p + __len1, __how_much); + if (__len2) + this->_S_copy(__p, __s, __len2); + } + else + { + + if (__len2 && __len2 <= __len1) + this->_S_move(__p, __s, __len2); + if (__how_much && __len1 != __len2) + this->_S_move(__p + __len2, __p + __len1, __how_much); + if (__len2 > __len1) + { + if (__s + __len2 <= __p + __len1) + this->_S_move(__p, __s, __len2); + else if (__s >= __p + __len1) + { + + + const size_type __poff = (__s - __p) + (__len2 - __len1); + this->_S_copy(__p, __p + __poff, __len2); + } + else + { + const size_type __nleft = (__p + __len1) - __s; + this->_S_move(__p, __s, __nleft); + this->_S_copy(__p + __nleft, __p + __len2, + __len2 - __nleft); + } + } + } + } + else + this->_M_mutate(__pos, __len1, __s, __len2); + + this->_M_set_length(__new_size); + return *this; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + _M_check(__pos, "basic_string::copy"); + __n = _M_limit(__pos, __n); + ; + if (__n) + _S_copy(__s, _M_data() + __pos, __n); + + return __n; + } +# 1167 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + ; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_CharT>::other _Char_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; + const __size_type __len = _Traits::length(__lhs); + __string_type __str(_Alloc_traits::_S_select_on_copy( + __rhs.get_allocator())); + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __len); + __str.append(__rhs); + return __str; + } + + template + basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_CharT>::other _Char_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; + __string_type __str(_Alloc_traits::_S_select_on_copy( + __rhs.get_allocator())); + const __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + const size_type __size = this->size(); + + if (__n == 0) + return __pos <= __size ? __pos : npos; + if (__pos >= __size) + return npos; + + const _CharT __elem0 = __s[0]; + const _CharT* const __data = data(); + const _CharT* __first = __data + __pos; + const _CharT* const __last = __data + __size; + size_type __len = __size - __pos; + + while (__len >= __n) + { + + __first = traits_type::find(__first, __len - __n + 1, __elem0); + if (!__first) + return npos; + + + + if (traits_type::compare(__first, __s, __n) == 0) + return __first - __data; + __len = __last - ++__first; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const noexcept + { + size_type __ret = npos; + const size_type __size = this->size(); + if (__pos < __size) + { + const _CharT* __data = _M_data(); + const size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + const size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(size_type(__size - __n), __pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(_M_data()[__size], __c)) + return __size; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + for (; __pos < this->size(); ++__pos) + if (!traits_type::find(__s, __n, _M_data()[__pos])) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const noexcept + { + for (; __pos < this->size(); ++__pos) + if (!traits_type::eq(_M_data()[__pos], __c)) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + _M_check(__pos, "basic_string::compare"); + __n = _M_limit(__pos, __n); + const size_type __osize = __str.size(); + const size_type __len = std::min(__n, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = _S_compare(__n, __osize); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + _M_check(__pos1, "basic_string::compare"); + __str._M_check(__pos2, "basic_string::compare"); + __n1 = _M_limit(__pos1, __n1); + __n2 = __str._M_limit(__pos2, __n2); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const noexcept + { + ; + const size_type __size = this->size(); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __s, __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__n1, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + typedef ctype<_CharT> __ctype_type; + typedef typename __ctype_type::ctype_base __ctype_base; + + __size_type __extracted = 0; + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + + __str.erase(); + _CharT __buf[128]; + __size_type __len = 0; + const streamsize __w = __in.width(); + const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) + : __str.max_size(); + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(__ctype_base::space, + _Traits::to_char_type(__c))) + { + if (__len == sizeof(__buf) / sizeof(_CharT)) + { + __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); + __len = 0; + } + __buf[__len++] = _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + __str.append(__buf, __len); + + if (__extracted < __n && _Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + + __size_type __extracted = 0; + const __size_type __n = __str.max_size(); + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + try + { + __str.erase(); + const __int_type __idelim = _Traits::to_int_type(__delim); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !_Traits::eq_int_type(__c, __idelim)) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __in.rdbuf()->sbumpc(); + } + else + __err |= __ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } +# 1635 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + extern template + basic_istream& + operator>>(basic_istream&, string&); + extern template + basic_ostream& + operator<<(basic_ostream&, const string&); + extern template + basic_istream& + getline(basic_istream&, string&, char); + extern template + basic_istream& + getline(basic_istream&, string&); +# 1656 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + extern template + basic_istream& + operator>>(basic_istream&, wstring&); + extern template + basic_ostream& + operator<<(basic_ostream&, const wstring&); + extern template + basic_istream& + getline(basic_istream&, wstring&, wchar_t); + extern template + basic_istream& + getline(basic_istream&, wstring&); + + + + +} +# 57 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 + + +namespace std +{ + + namespace pmr { + template class polymorphic_allocator; + template> + using basic_string = std::basic_string<_CharT, _Traits, + polymorphic_allocator<_CharT>>; + using string = basic_string; + + using u8string = basic_string; + + using u16string = basic_string; + using u32string = basic_string; + + using wstring = basic_string; + + } + + template + struct __hash_string_base + : public __hash_base + { + size_t + operator()(const _Str& __s) const noexcept + { return hash>{}(__s); } + }; + + template<> + struct hash + : public __hash_string_base + { }; + + template<> + struct hash + : public __hash_string_base + { }; + + template<> + struct hash + : public __hash_string_base + { }; + template<> + struct hash + : public __hash_string_base + { }; + + template<> + struct hash + : public __hash_string_base + { }; + + + +} + + + +namespace std +{ + + + + + template + inline typename basic_string<_CharT, _Traits, _Alloc>::size_type + erase_if(basic_string<_CharT, _Traits, _Alloc>& __cont, _Predicate __pred) + { + const auto __osz = __cont.size(); + __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), + __cont.end()); + return __osz - __cont.size(); + } + + template + inline typename basic_string<_CharT, _Traits, _Alloc>::size_type + erase(basic_string<_CharT, _Traits, _Alloc>& __cont, const _Up& __value) + { + const auto __osz = __cont.size(); + __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), + __cont.end()); + return __osz - __cont.size(); + } + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 2 3 + + +namespace std +{ + +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + class locale + { + public: + + + typedef int category; + + + class facet; + class id; + class _Impl; + + friend class facet; + friend class _Impl; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (ctype | numeric | collate | + time | monetary | messages); +# 117 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale() throw(); +# 126 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale(const locale& __other) throw(); +# 136 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + locale(const char* __s); +# 151 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale(const locale& __base, const char* __s, category __cat); +# 162 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + locale(const std::string& __s) : locale(__s.c_str()) { } +# 177 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale(const locale& __base, const std::string& __s, category __cat) + : locale(__base, __s.c_str(), __cat) { } +# 192 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale(const locale& __base, const locale& __add, category __cat); +# 205 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + template + locale(const locale& __other, _Facet* __f); + + + ~locale() throw(); +# 219 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + const locale& + operator=(const locale& __other) throw(); +# 234 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + template + locale + combine(const locale& __other) const; + + + + + + + __attribute ((__abi_tag__ ("cxx11"))) + string + name() const; +# 254 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + bool + operator==(const locale& __other) const throw(); +# 284 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; +# 300 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + static locale + global(const locale& __loc); + + + + + static const locale& + classic(); + + private: + + _Impl* _M_impl; + + + static _Impl* _S_classic; + + + static _Impl* _S_global; + + + + + + static const char* const* const _S_categories; +# 335 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + enum { _S_categories_size = 6 + 0 }; + + + static __gthread_once_t _S_once; + + + explicit + locale(_Impl*) throw(); + + static void + _S_initialize(); + + static void + _S_initialize_once() throw(); + + static category + _S_normalize_category(category); + + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + + + static const id* const _S_twinned_facets[]; + + }; +# 373 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + class locale::facet + { + private: + friend class locale; + friend class locale::_Impl; + + mutable _Atomic_word _M_refcount; + + + static __c_locale _S_c_locale; + + + static const char _S_c_name[2]; + + + static __gthread_once_t _S_once; + + + static void + _S_initialize_once(); + + protected: +# 404 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) + { } + + + virtual + ~facet(); + + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old = 0); + + static __c_locale + _S_clone_c_locale(__c_locale& __cloc) throw(); + + static void + _S_destroy_c_locale(__c_locale& __cloc); + + static __c_locale + _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); + + + + static __c_locale + _S_get_c_locale(); + + __attribute__ ((__const__)) static const char* + _S_get_c_name() throw(); +# 440 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + facet(const facet&) = delete; + + facet& + operator=(const facet&) = delete; + + + private: + void + _M_add_reference() const throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() const throw() + { + + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + ; + try + { delete this; } + catch(...) + { } + } + } + + const facet* _M_sso_shim(const id*) const; + const facet* _M_cow_shim(const id*) const; + + protected: + class __shim; + }; +# 485 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + + template + friend const _Facet& + use_facet(const locale&); + + template + friend bool + has_facet(const locale&) throw(); + + + + + mutable size_t _M_index; + + + static _Atomic_word _S_refcount; + + void + operator=(const id&); + + id(const id&); + + public: + + + + id() { } + + size_t + _M_id() const throw(); + }; + + + + class locale::_Impl + { + public: + + friend class locale; + friend class locale::facet; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; + + private: + + _Atomic_word _M_refcount; + const facet** _M_facets; + size_t _M_facets_size; + const facet** _M_caches; + char** _M_names; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + + void + _M_add_reference() throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() throw() + { + + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + ; + try + { delete this; } + catch(...) + { } + } + } + + _Impl(const _Impl&, size_t); + _Impl(const char*, size_t); + _Impl(size_t) throw(); + + ~_Impl() throw(); + + _Impl(const _Impl&); + + void + operator=(const _Impl&); + + bool + _M_check_same_name() + { + bool __ret = true; + if (_M_names[1]) + + for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) + __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; + return __ret; + } + + void + _M_replace_categories(const _Impl*, category); + + void + _M_replace_category(const _Impl*, const locale::id* const*); + + void + _M_replace_facet(const _Impl*, const locale::id*); + + void + _M_install_facet(const locale::id*, const facet*); + + template + void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + + template + void + _M_init_facet_unchecked(_Facet* __facet) + { + __facet->_M_add_reference(); + _M_facets[_Facet::id._M_id()] = __facet; + } + + void + _M_install_cache(const facet*, size_t); + + void _M_init_extra(facet**); + void _M_init_extra(void*, void*, const char*, const char*); + + + + + }; +# 647 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + template + class __cxx11:: collate : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + protected: + + + __c_locale _M_c_locale_collate; + + public: + + static locale::id id; +# 674 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + collate(size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) + { } +# 688 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + collate(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) + { } +# 705 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } +# 724 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } +# 738 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + + + int + _M_compare(const _CharT*, const _CharT*) const throw(); + + size_t + _M_transform(_CharT*, const _CharT*, size_t) const throw(); + + protected: + + virtual + ~collate() + { _S_destroy_c_locale(_M_c_locale_collate); } +# 767 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; +# 781 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; +# 794 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + + template + locale::id collate<_CharT>::id; + + + template<> + int + collate::_M_compare(const char*, const char*) const throw(); + + template<> + size_t + collate::_M_transform(char*, const char*, size_t) const throw(); + + + template<> + int + collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); + + template<> + size_t + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); + + + + template + class __cxx11:: collate_byname : public collate<_CharT> + { + public: + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + explicit + collate_byname(const char* __s, size_t __refs = 0) + : collate<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_collate); + this->_S_create_c_locale(this->_M_c_locale_collate, __s); + } + } + + + explicit + collate_byname(const string& __s, size_t __refs = 0) + : collate_byname(__s.c_str(), __refs) { } + + + protected: + virtual + ~collate_byname() { } + }; + + +} + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 3 + +namespace std +{ + + + template + locale:: + locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + + try + { _M_impl->_M_install_facet(&_Facet::id, __f); } + catch(...) + { + _M_impl->_M_remove_reference(); + throw; + } + delete [] _M_impl->_M_names[0]; + _M_impl->_M_names[0] = 0; + } + + template + locale + locale:: + combine(const locale& __other) const + { + _Impl* __tmp = new _Impl(*_M_impl, 1); + try + { + __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); + } + catch(...) + { + __tmp->_M_remove_reference(); + throw; + } + return locale(__tmp); + } + + template + bool + locale:: + operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type& __collate = use_facet<__collate_type>(*this); + return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } +# 102 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 3 + template + bool + has_facet(const locale& __loc) throw() + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + return (__i < __loc._M_impl->_M_facets_size + + && dynamic_cast(__facets[__i])); + + + + } +# 130 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 3 + template + const _Facet& + use_facet(const locale& __loc) + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) + __throw_bad_cast(); + + return dynamic_cast(*__facets[__i]); + + + + } + + + + template + int + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () + { return 0; } + + + template + size_t + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () + { return 0; } + + template + int + collate<_CharT>:: + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { + + + const string_type __one(__lo1, __hi1); + const string_type __two(__lo2, __hi2); + + const _CharT* __p = __one.c_str(); + const _CharT* __pend = __one.data() + __one.length(); + const _CharT* __q = __two.c_str(); + const _CharT* __qend = __two.data() + __two.length(); + + + + + for (;;) + { + const int __res = _M_compare(__p, __q); + if (__res) + return __res; + + __p += char_traits<_CharT>::length(__p); + __q += char_traits<_CharT>::length(__q); + if (__p == __pend && __q == __qend) + return 0; + else if (__p == __pend) + return -1; + else if (__q == __qend) + return 1; + + __p++; + __q++; + } + } + + template + typename collate<_CharT>::string_type + collate<_CharT>:: + do_transform(const _CharT* __lo, const _CharT* __hi) const + { + string_type __ret; + + + const string_type __str(__lo, __hi); + + const _CharT* __p = __str.c_str(); + const _CharT* __pend = __str.data() + __str.length(); + + size_t __len = (__hi - __lo) * 2; + + _CharT* __c = new _CharT[__len]; + + try + { + + + + for (;;) + { + + size_t __res = _M_transform(__c, __p, __len); + + + if (__res >= __len) + { + __len = __res + 1; + delete [] __c, __c = 0; + __c = new _CharT[__len]; + __res = _M_transform(__c, __p, __len); + } + + __ret.append(__c, __res); + __p += char_traits<_CharT>::length(__p); + if (__p == __pend) + break; + + __p++; + __ret.push_back(_CharT()); + } + } + catch(...) + { + delete [] __c; + throw; + } + + delete [] __c; + + return __ret; + } + + template + long + collate<_CharT>:: + do_hash(const _CharT* __lo, const _CharT* __hi) const + { + unsigned long __val = 0; + for (; __lo < __hi; ++__lo) + __val = + *__lo + ((__val << 7) + | (__val >> (__gnu_cxx::__numeric_traits:: + __digits - 7))); + return static_cast(__val); + } + + + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + + +} +# 858 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 2 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 2 3 + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/error_constants.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/error_constants.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/error_constants.h" 2 3 + +namespace std +{ + + + + + enum class errc + { + address_family_not_supported = 102, + address_in_use = 100, + address_not_available = 101, + already_connected = 113, + argument_list_too_long = 7, + argument_out_of_domain = 33, + bad_address = 14, + bad_file_descriptor = 9, + + bad_message = 104, + + broken_pipe = 32, + connection_aborted = 106, + connection_already_in_progress = 103, + connection_refused = 107, + connection_reset = 108, + cross_device_link = 18, + destination_address_required = 109, + device_or_resource_busy = 16, + directory_not_empty = 41, + executable_format_error = 8, + file_exists = 17, + file_too_large = 27, + filename_too_long = 38, + function_not_supported = 40, + host_unreachable = 110, + + identifier_removed = 111, + + illegal_byte_sequence = 42, + inappropriate_io_control_operation = 25, + interrupted = 4, + invalid_argument = 22, + invalid_seek = 29, + io_error = 5, + is_a_directory = 21, + message_size = 115, + network_down = 116, + network_reset = 117, + network_unreachable = 118, + no_buffer_space = 119, + + no_child_process = 10, + + + no_link = 121, + + no_lock_available = 39, + + no_message_available = 120, + + + no_message = 122, + + no_protocol_option = 123, + + no_space_on_device = 28, + + + no_stream_resources = 124, + + no_such_device_or_address = 6, + no_such_device = 19, + no_such_file_or_directory = 2, + no_such_process = 3, + not_a_directory = 20, + not_a_socket = 128, + + not_a_stream = 125, + + not_connected = 126, + not_enough_memory = 12, + + not_supported = 129, + + operation_canceled = 105, + operation_in_progress = 112, + + operation_not_permitted = 1, + + operation_not_supported = 130, + + operation_would_block = 140, + + + owner_dead = 133, + + permission_denied = 13, + protocol_error = 134, + protocol_not_supported = 135, + read_only_file_system = 30, + resource_deadlock_would_occur = 36, + resource_unavailable_try_again = 11, + result_out_of_range = 34, + + state_not_recoverable = 127, + + + stream_timeout = 137, + + + text_file_busy = 139, + + + timed_out = 138, + + too_many_files_open_in_system = 23, + too_many_files_open = 24, + too_many_links = 31, + too_many_symbolic_link_levels = 114, + + value_too_large = 132, + + wrong_protocol_type = 136 + }; + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 3 + +#pragma GCC visibility push(default) + + + + +extern "C++" { + +namespace std +{ + + + + + + + class bad_exception : public exception + { + public: + bad_exception() noexcept { } + + + + virtual ~bad_exception() noexcept; + + + virtual const char* + what() const noexcept; + }; + + + typedef void (*terminate_handler) (); + + + typedef void (*unexpected_handler) (); + + + terminate_handler set_terminate(terminate_handler) noexcept; + + + + terminate_handler get_terminate() noexcept; + + + + + void terminate() noexcept __attribute__ ((__noreturn__)); + + + unexpected_handler set_unexpected(unexpected_handler) noexcept; + + + + unexpected_handler get_unexpected() noexcept; + + + + + void unexpected() __attribute__ ((__noreturn__)); +# 105 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 3 + [[__deprecated__]] + bool uncaught_exception() noexcept __attribute__ ((__pure__)); + + + + + int uncaught_exceptions() noexcept __attribute__ ((__pure__)); + + + +} + +namespace __gnu_cxx +{ + +# 137 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 3 + void __verbose_terminate_handler(); + + +} + +} + +#pragma GCC visibility pop + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 +#pragma GCC visibility push(default) + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 3 + +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 3 + +#pragma GCC visibility push(default) + +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 1 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 1 3 4 +# 2 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 2 3 4 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 2 3 +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 3 +namespace std +{ + class type_info; +} + +namespace __cxxabiv1 +{ + struct __cxa_refcounted_exception; + + extern "C" + { + + void* + __cxa_allocate_exception(size_t) noexcept; + + void + __cxa_free_exception(void*) noexcept; + + + __cxa_refcounted_exception* + __cxa_init_primary_exception(void *object, std::type_info *tinfo, + void ( *dest) (void *)) noexcept; + + } +} + + + +#pragma GCC visibility pop +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 3 + + + + + + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace __cxxabiv1 +{ + class __class_type_info; +} +# 80 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 3 +namespace std +{ + + + + + + + class type_info + { + public: + + + + + virtual ~type_info(); + + + + const char* name() const noexcept + { return __name[0] == '*' ? __name + 1 : __name; } + + + + + + bool before(const type_info& __arg) const noexcept; + bool operator==(const type_info& __arg) const noexcept; +# 143 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 3 + size_t hash_code() const noexcept + { + + return _Hash_bytes(name(), __builtin_strlen(name()), + static_cast(0xc70f6907UL)); + + + + } + + + + virtual bool __is_pointer_p() const; + + + virtual bool __is_function_p() const; + + + + + + + + virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, + unsigned __outer) const; + + + virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, + void **__obj_ptr) const; + + protected: + const char *__name; + + explicit type_info(const char *__n): __name(__n) { } + + private: + + type_info& operator=(const type_info&); + type_info(const type_info&); + }; + + + + + + + + class bad_cast : public exception + { + public: + bad_cast() noexcept { } + + + + virtual ~bad_cast() noexcept; + + + virtual const char* what() const noexcept; + }; + + + + + + class bad_typeid : public exception + { + public: + bad_typeid () noexcept { } + + + + virtual ~bad_typeid() noexcept; + + + virtual const char* what() const noexcept; + }; +} + +} + +#pragma GCC visibility pop +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 2 3 +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 +extern "C++" { + +namespace std +{ + class type_info; + + + + + + + namespace __exception_ptr + { + class exception_ptr; + } + + using __exception_ptr::exception_ptr; + + + + + + exception_ptr current_exception() noexcept; + + template + exception_ptr make_exception_ptr(_Ex) noexcept; + + + void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); + + namespace __exception_ptr + { + using std::rethrow_exception; + + + + + + class exception_ptr + { + void* _M_exception_object; + + explicit exception_ptr(void* __e) noexcept; + + void _M_addref() noexcept; + void _M_release() noexcept; + + void *_M_get() const noexcept __attribute__ ((__pure__)); + + friend exception_ptr std::current_exception() noexcept; + friend void std::rethrow_exception(exception_ptr); + template + friend exception_ptr std::make_exception_ptr(_Ex) noexcept; + + public: + exception_ptr() noexcept; + + exception_ptr(const exception_ptr&) noexcept; + + + exception_ptr(nullptr_t) noexcept + : _M_exception_object(nullptr) + { } + + exception_ptr(exception_ptr&& __o) noexcept + : _M_exception_object(__o._M_exception_object) + { __o._M_exception_object = nullptr; } +# 124 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 + exception_ptr& + operator=(const exception_ptr&) noexcept; + + + exception_ptr& + operator=(exception_ptr&& __o) noexcept + { + exception_ptr(static_cast(__o)).swap(*this); + return *this; + } + + + ~exception_ptr() noexcept; + + void + swap(exception_ptr&) noexcept; +# 151 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 + explicit operator bool() const noexcept + { return _M_exception_object; } + + + + + friend bool + operator==(const exception_ptr&, const exception_ptr&) noexcept = default; +# 171 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 + const class std::type_info* + __cxa_exception_type() const noexcept + __attribute__ ((__pure__)); + }; + + + inline + exception_ptr::exception_ptr() noexcept + : _M_exception_object(0) + { } + + + inline + exception_ptr::exception_ptr(const exception_ptr& __other) noexcept + : _M_exception_object(__other._M_exception_object) + { + if (_M_exception_object) + _M_addref(); + } + + + inline + exception_ptr::~exception_ptr() noexcept + { + if (_M_exception_object) + _M_release(); + } + + + inline exception_ptr& + exception_ptr::operator=(const exception_ptr& __other) noexcept + { + exception_ptr(__other).swap(*this); + return *this; + } + + + inline void + exception_ptr::swap(exception_ptr &__other) noexcept + { + void *__tmp = _M_exception_object; + _M_exception_object = __other._M_exception_object; + __other._M_exception_object = __tmp; + } + + + inline void + swap(exception_ptr& __lhs, exception_ptr& __rhs) + { __lhs.swap(__rhs); } + + + template + inline void + __dest_thunk(void* __x) + { static_cast<_Ex*>(__x)->~_Ex(); } + + + } + + + template + exception_ptr + make_exception_ptr(_Ex __ex) noexcept + { + + void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); + (void) __cxxabiv1::__cxa_init_primary_exception( + __e, const_cast(&typeid(__ex)), + __exception_ptr::__dest_thunk<_Ex>); + try + { + ::new (__e) _Ex(__ex); + return exception_ptr(__e); + } + catch(...) + { + __cxxabiv1::__cxa_free_exception(__e); + return current_exception(); + } +# 262 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 + } + + + + +} + +} + +#pragma GCC visibility pop +# 148 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/nested_exception.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/nested_exception.h" 3 +#pragma GCC visibility push(default) +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/nested_exception.h" 3 +extern "C++" { + +namespace std +{ + + + + + + + class nested_exception + { + exception_ptr _M_ptr; + + public: + nested_exception() noexcept : _M_ptr(current_exception()) { } + + nested_exception(const nested_exception&) noexcept = default; + + nested_exception& operator=(const nested_exception&) noexcept = default; + + virtual ~nested_exception() noexcept; + + [[noreturn]] + void + rethrow_nested() const + { + if (_M_ptr) + rethrow_exception(_M_ptr); + std::terminate(); + } + + exception_ptr + nested_ptr() const noexcept + { return _M_ptr; } + }; + + + + template + struct _Nested_exception : public _Except, public nested_exception + { + explicit _Nested_exception(const _Except& __ex) + : _Except(__ex) + { } + + explicit _Nested_exception(_Except&& __ex) + : _Except(static_cast<_Except&&>(__ex)) + { } + }; + + + + + template + [[noreturn]] + inline void + __throw_with_nested_impl(_Tp&& __t, true_type) + { + using _Up = typename remove_reference<_Tp>::type; + throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; + } + + template + [[noreturn]] + inline void + __throw_with_nested_impl(_Tp&& __t, false_type) + { throw std::forward<_Tp>(__t); } + + + + + + template + [[noreturn]] + inline void + throw_with_nested(_Tp&& __t) + { + using _Up = typename decay<_Tp>::type; + using _CopyConstructible + = __and_, is_move_constructible<_Up>>; + static_assert(_CopyConstructible::value, + "throw_with_nested argument must be CopyConstructible"); + using __nest = __and_, __bool_constant, + __not_>>; + std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); + } + + + + + template + using __rethrow_if_nested_cond = typename enable_if< + __and_, + __or_<__not_>, + is_convertible<_Tp*, nested_exception*>>>::value + >::type; + + + template + inline __rethrow_if_nested_cond<_Ex> + __rethrow_if_nested_impl(const _Ex* __ptr) + { + if (auto __ne_ptr = dynamic_cast(__ptr)) + __ne_ptr->rethrow_nested(); + } + + + inline void + __rethrow_if_nested_impl(const void*) + { } + + + + + template + inline void + rethrow_if_nested(const _Ex& __ex) + { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } + + +} + +} + + + +#pragma GCC visibility pop +# 149 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 2 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 2 3 + + +namespace std +{ + + + + + + struct __cow_string + { + union { + const char* _M_p; + char _M_bytes[sizeof(const char*)]; + }; + + __cow_string(); + __cow_string(const std::string&); + __cow_string(const char*, size_t); + __cow_string(const __cow_string&) noexcept; + __cow_string& operator=(const __cow_string&) noexcept; + ~__cow_string(); + + __cow_string(__cow_string&&) noexcept; + __cow_string& operator=(__cow_string&&) noexcept; + + }; + + typedef basic_string __sso_string; +# 113 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 3 + class logic_error : public exception + { + __cow_string _M_msg; + + public: + + explicit + logic_error(const string& __arg) ; + + + explicit + logic_error(const char*) ; + + logic_error(logic_error&&) noexcept; + logic_error& operator=(logic_error&&) noexcept; + + + + logic_error(const logic_error&) noexcept; + logic_error& operator=(const logic_error&) noexcept; + + + + + + virtual ~logic_error() noexcept; + + + + virtual const char* + what() const noexcept; + + + + + + }; + + + + class domain_error : public logic_error + { + public: + explicit domain_error(const string& __arg) ; + + explicit domain_error(const char*) ; + domain_error(const domain_error&) = default; + domain_error& operator=(const domain_error&) = default; + domain_error(domain_error&&) = default; + domain_error& operator=(domain_error&&) = default; + + virtual ~domain_error() noexcept; + }; + + + class invalid_argument : public logic_error + { + public: + explicit invalid_argument(const string& __arg) ; + + explicit invalid_argument(const char*) ; + invalid_argument(const invalid_argument&) = default; + invalid_argument& operator=(const invalid_argument&) = default; + invalid_argument(invalid_argument&&) = default; + invalid_argument& operator=(invalid_argument&&) = default; + + virtual ~invalid_argument() noexcept; + }; + + + + class length_error : public logic_error + { + public: + explicit length_error(const string& __arg) ; + + explicit length_error(const char*) ; + length_error(const length_error&) = default; + length_error& operator=(const length_error&) = default; + length_error(length_error&&) = default; + length_error& operator=(length_error&&) = default; + + virtual ~length_error() noexcept; + }; + + + + class out_of_range : public logic_error + { + public: + explicit out_of_range(const string& __arg) ; + + explicit out_of_range(const char*) ; + out_of_range(const out_of_range&) = default; + out_of_range& operator=(const out_of_range&) = default; + out_of_range(out_of_range&&) = default; + out_of_range& operator=(out_of_range&&) = default; + + virtual ~out_of_range() noexcept; + }; + + + + + + + class runtime_error : public exception + { + __cow_string _M_msg; + + public: + + explicit + runtime_error(const string& __arg) ; + + + explicit + runtime_error(const char*) ; + + runtime_error(runtime_error&&) noexcept; + runtime_error& operator=(runtime_error&&) noexcept; + + + + runtime_error(const runtime_error&) noexcept; + runtime_error& operator=(const runtime_error&) noexcept; + + + + + + virtual ~runtime_error() noexcept; + + + + virtual const char* + what() const noexcept; + + + + + + }; + + + class range_error : public runtime_error + { + public: + explicit range_error(const string& __arg) ; + + explicit range_error(const char*) ; + range_error(const range_error&) = default; + range_error& operator=(const range_error&) = default; + range_error(range_error&&) = default; + range_error& operator=(range_error&&) = default; + + virtual ~range_error() noexcept; + }; + + + class overflow_error : public runtime_error + { + public: + explicit overflow_error(const string& __arg) ; + + explicit overflow_error(const char*) ; + overflow_error(const overflow_error&) = default; + overflow_error& operator=(const overflow_error&) = default; + overflow_error(overflow_error&&) = default; + overflow_error& operator=(overflow_error&&) = default; + + virtual ~overflow_error() noexcept; + }; + + + class underflow_error : public runtime_error + { + public: + explicit underflow_error(const string& __arg) ; + + explicit underflow_error(const char*) ; + underflow_error(const underflow_error&) = default; + underflow_error& operator=(const underflow_error&) = default; + underflow_error(underflow_error&&) = default; + underflow_error& operator=(underflow_error&&) = default; + + virtual ~underflow_error() noexcept; + }; + + + + +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 2 3 + + + + +namespace std +{ + + + + + + + class error_code; + class error_condition; + class system_error; + + + template + struct is_error_code_enum : public false_type { }; + + + template + struct is_error_condition_enum : public false_type { }; + + template<> + struct is_error_condition_enum + : public true_type { }; + + + template + inline constexpr bool is_error_code_enum_v = + is_error_code_enum<_Tp>::value; + template + inline constexpr bool is_error_condition_enum_v = + is_error_condition_enum<_Tp>::value; + + inline namespace _V2 { +# 89 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + class error_category + { + public: + constexpr error_category() noexcept = default; + + virtual ~error_category(); + + error_category(const error_category&) = delete; + error_category& operator=(const error_category&) = delete; + + virtual const char* + name() const noexcept = 0; + + + + + + + private: + __attribute ((__abi_tag__ ("cxx11"))) + virtual __cow_string + _M_message(int) const; + + public: + __attribute ((__abi_tag__ ("cxx11"))) + virtual string + message(int) const = 0; +# 125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + public: + virtual error_condition + default_error_condition(int __i) const noexcept; + + virtual bool + equivalent(int __i, const error_condition& __cond) const noexcept; + + virtual bool + equivalent(const error_code& __code, int __i) const noexcept; + + bool + operator==(const error_category& __other) const noexcept + { return this == &__other; } + + + strong_ordering + operator<=>(const error_category& __rhs) const noexcept + { return std::compare_three_way()(this, &__rhs); } +# 152 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + }; + + + + + __attribute__ ((__const__)) const error_category& generic_category() noexcept; + + + __attribute__ ((__const__)) const error_category& system_category() noexcept; + + } + + error_code make_error_code(errc) noexcept; +# 180 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + class error_code + { + public: + error_code() noexcept + : _M_value(0), _M_cat(&system_category()) { } + + error_code(int __v, const error_category& __cat) noexcept + : _M_value(__v), _M_cat(&__cat) { } + + template::value>::type> + error_code(_ErrorCodeEnum __e) noexcept + { *this = make_error_code(__e); } + + void + assign(int __v, const error_category& __cat) noexcept + { + _M_value = __v; + _M_cat = &__cat; + } + + void + clear() noexcept + { assign(0, system_category()); } + + + template + typename enable_if::value, + error_code&>::type + operator=(_ErrorCodeEnum __e) noexcept + { return *this = make_error_code(__e); } + + int + value() const noexcept { return _M_value; } + + const error_category& + category() const noexcept { return *_M_cat; } + + error_condition + default_error_condition() const noexcept; + + __attribute ((__abi_tag__ ("cxx11"))) + string + message() const + { return category().message(value()); } + + explicit operator bool() const noexcept + { return _M_value != 0; } + + + private: + int _M_value; + const error_category* _M_cat; + }; + + + + + + inline error_code + make_error_code(errc __e) noexcept + { return error_code(static_cast(__e), generic_category()); } + + + inline strong_ordering + operator<=>(const error_code& __lhs, const error_code& __rhs) noexcept + { + if (auto __c = __lhs.category() <=> __rhs.category(); __c != 0) + return __c; + return __lhs.value() <=> __rhs.value(); + } +# 261 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) + { return (__os << __e.category().name() << ':' << __e.value()); } + + + + error_condition make_error_condition(errc) noexcept; +# 279 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + class error_condition + { + public: + error_condition() noexcept + : _M_value(0), _M_cat(&generic_category()) { } + + error_condition(int __v, const error_category& __cat) noexcept + : _M_value(__v), _M_cat(&__cat) { } + + template::value>::type> + error_condition(_ErrorConditionEnum __e) noexcept + { *this = make_error_condition(__e); } + + void + assign(int __v, const error_category& __cat) noexcept + { + _M_value = __v; + _M_cat = &__cat; + } + + + template + typename enable_if::value, error_condition&>::type + operator=(_ErrorConditionEnum __e) noexcept + { return *this = make_error_condition(__e); } + + void + clear() noexcept + { assign(0, generic_category()); } + + + int + value() const noexcept { return _M_value; } + + const error_category& + category() const noexcept { return *_M_cat; } + + __attribute ((__abi_tag__ ("cxx11"))) + string + message() const + { return category().message(value()); } + + explicit operator bool() const noexcept + { return _M_value != 0; } + + + private: + int _M_value; + const error_category* _M_cat; + }; + + + + + + inline error_condition + make_error_condition(errc __e) noexcept + { return error_condition(static_cast(__e), generic_category()); } + + + + + inline bool + operator==(const error_code& __lhs, const error_code& __rhs) noexcept + { return (__lhs.category() == __rhs.category() + && __lhs.value() == __rhs.value()); } + + + + inline bool + operator==(const error_code& __lhs, const error_condition& __rhs) noexcept + { + return (__lhs.category().equivalent(__lhs.value(), __rhs) + || __rhs.category().equivalent(__lhs, __rhs.value())); + } + + + inline bool + operator==(const error_condition& __lhs, + const error_condition& __rhs) noexcept + { + return (__lhs.category() == __rhs.category() + && __lhs.value() == __rhs.value()); + } + + + + + inline strong_ordering + operator<=>(const error_condition& __lhs, + const error_condition& __rhs) noexcept + { + if (auto __c = __lhs.category() <=> __rhs.category(); __c != 0) + return __c; + return __lhs.value() <=> __rhs.value(); + } +# 430 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + class system_error : public std::runtime_error + { + private: + error_code _M_code; + + public: + system_error(error_code __ec = error_code()) + : runtime_error(__ec.message()), _M_code(__ec) { } + + system_error(error_code __ec, const string& __what) + : runtime_error(__what + ": " + __ec.message()), _M_code(__ec) { } + + system_error(error_code __ec, const char* __what) + : runtime_error(__what + (": " + __ec.message())), _M_code(__ec) { } + + system_error(int __v, const error_category& __ecat, const char* __what) + : system_error(error_code(__v, __ecat), __what) { } + + system_error(int __v, const error_category& __ecat) + : runtime_error(error_code(__v, __ecat).message()), + _M_code(__v, __ecat) { } + + system_error(int __v, const error_category& __ecat, const string& __what) + : runtime_error(__what + ": " + error_code(__v, __ecat).message()), + _M_code(__v, __ecat) { } + + + system_error (const system_error &) = default; + system_error &operator= (const system_error &) = default; + + + virtual ~system_error() noexcept; + + const error_code& + code() const noexcept { return _M_code; } + }; + + +} + + + +namespace std +{ + + + + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const error_code& __e) const noexcept + { + const size_t __tmp = std::_Hash_impl::hash(__e.value()); + return std::_Hash_impl::__hash_combine(&__e.category(), __tmp); + } + }; + + + + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const error_condition& __e) const noexcept + { + const size_t __tmp = std::_Hash_impl::hash(__e.value()); + return std::_Hash_impl::__hash_combine(&__e.category(), __tmp); + } + }; + + + +} +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 2 3 + + +namespace std +{ + + + + + + + enum _Ios_Fmtflags + { + _S_boolalpha = 1L << 0, + _S_dec = 1L << 1, + _S_fixed = 1L << 2, + _S_hex = 1L << 3, + _S_internal = 1L << 4, + _S_left = 1L << 5, + _S_oct = 1L << 6, + _S_right = 1L << 7, + _S_scientific = 1L << 8, + _S_showbase = 1L << 9, + _S_showpoint = 1L << 10, + _S_showpos = 1L << 11, + _S_skipws = 1L << 12, + _S_unitbuf = 1L << 13, + _S_uppercase = 1L << 14, + _S_adjustfield = _S_left | _S_right | _S_internal, + _S_basefield = _S_dec | _S_oct | _S_hex, + _S_floatfield = _S_scientific | _S_fixed, + _S_ios_fmtflags_end = 1L << 16, + _S_ios_fmtflags_max = 0x7fffffff, + _S_ios_fmtflags_min = ~0x7fffffff + }; + + inline constexpr _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + + inline constexpr _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + + inline constexpr _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + + inline constexpr _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + + inline const _Ios_Fmtflags& + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + + inline const _Ios_Fmtflags& + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + + inline const _Ios_Fmtflags& + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + + + enum _Ios_Openmode + { + _S_app = 1L << 0, + _S_ate = 1L << 1, + _S_bin = 1L << 2, + _S_in = 1L << 3, + _S_out = 1L << 4, + _S_trunc = 1L << 5, + _S_ios_openmode_end = 1L << 16, + _S_ios_openmode_max = 0x7fffffff, + _S_ios_openmode_min = ~0x7fffffff + }; + + inline constexpr _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + + inline constexpr _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + + inline constexpr _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + + inline constexpr _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + + inline const _Ios_Openmode& + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + + inline const _Ios_Openmode& + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + + inline const _Ios_Openmode& + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + + + enum _Ios_Iostate + { + _S_goodbit = 0, + _S_badbit = 1L << 0, + _S_eofbit = 1L << 1, + _S_failbit = 1L << 2, + _S_ios_iostate_end = 1L << 16, + _S_ios_iostate_max = 0x7fffffff, + _S_ios_iostate_min = ~0x7fffffff + }; + + inline constexpr _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + + inline constexpr _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + + inline constexpr _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + + inline constexpr _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + + inline const _Ios_Iostate& + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + + inline const _Ios_Iostate& + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + + inline const _Ios_Iostate& + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + + + enum _Ios_Seekdir + { + _S_beg = 0, + _S_cur = 1, + _S_end = 2, + _S_ios_seekdir_end = 1L << 16 + }; + + + + enum class io_errc { stream = 1 }; + + template <> struct is_error_code_enum : public true_type { }; + + const error_category& iostream_category() noexcept; + + inline error_code + make_error_code(io_errc __e) noexcept + { return error_code(static_cast(__e), iostream_category()); } + + inline error_condition + make_error_condition(io_errc __e) noexcept + { return error_condition(static_cast(__e), iostream_category()); } +# 228 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + class ios_base + { +# 246 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + public: +# 255 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + class __attribute ((__abi_tag__ ("cxx11"))) failure : public system_error + { + public: + explicit + failure(const string& __str); + + + explicit + failure(const string&, const error_code&); + + explicit + failure(const char*, const error_code& = io_errc::stream); + + + virtual + ~failure() throw(); + + virtual const char* + what() const throw(); + }; +# 341 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef _Ios_Fmtflags fmtflags; + + + static const fmtflags boolalpha = _S_boolalpha; + + + static const fmtflags dec = _S_dec; + + + static const fmtflags fixed = _S_fixed; + + + static const fmtflags hex = _S_hex; + + + + + static const fmtflags internal = _S_internal; + + + + static const fmtflags left = _S_left; + + + static const fmtflags oct = _S_oct; + + + + static const fmtflags right = _S_right; + + + static const fmtflags scientific = _S_scientific; + + + + static const fmtflags showbase = _S_showbase; + + + + static const fmtflags showpoint = _S_showpoint; + + + static const fmtflags showpos = _S_showpos; + + + static const fmtflags skipws = _S_skipws; + + + static const fmtflags unitbuf = _S_unitbuf; + + + + static const fmtflags uppercase = _S_uppercase; + + + static const fmtflags adjustfield = _S_adjustfield; + + + static const fmtflags basefield = _S_basefield; + + + static const fmtflags floatfield = _S_floatfield; +# 416 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef _Ios_Iostate iostate; + + + + static const iostate badbit = _S_badbit; + + + static const iostate eofbit = _S_eofbit; + + + + + static const iostate failbit = _S_failbit; + + + static const iostate goodbit = _S_goodbit; +# 447 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef _Ios_Openmode openmode; + + + static const openmode app = _S_app; + + + static const openmode ate = _S_ate; + + + + + static const openmode binary = _S_bin; + + + static const openmode in = _S_in; + + + static const openmode out = _S_out; + + + static const openmode trunc = _S_trunc; +# 479 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef _Ios_Seekdir seekdir; + + + static const seekdir beg = _S_beg; + + + static const seekdir cur = _S_cur; + + + static const seekdir end = _S_end; +# 512 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; +# 529 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef void (*event_callback) (event __e, ios_base& __b, int __i); +# 541 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + void + register_callback(event_callback __fn, int __index); + + protected: + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + iostate _M_exception; + iostate _M_streambuf_state; + + + + struct _Callback_list + { + + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + _Atomic_word _M_refcount; + + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + + void + _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + + int + _M_remove_reference() + { + + ; + int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); + if (__res == 0) + { + ; + } + return __res; + } + }; + + _Callback_list* _M_callbacks; + + void + _M_call_callbacks(event __ev) throw(); + + void + _M_dispose_callbacks(void) throw(); + + + struct _Words + { + void* _M_pword; + long _M_iword; + _Words() : _M_pword(0), _M_iword(0) { } + }; + + + _Words _M_word_zero; + + + + enum { _S_local_word_size = 8 }; + _Words _M_local_word[_S_local_word_size]; + + + int _M_word_size; + _Words* _M_word; + + _Words& + _M_grow_words(int __index, bool __iword); + + + locale _M_ios_locale; + + void + _M_init() throw(); + + public: + + + + + + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + + + Init(const Init&) = default; + Init& operator=(const Init&) = default; + + + private: + static _Atomic_word _S_refcount; + static bool _S_synced_with_stdio; + }; + + + + + + + fmtflags + flags() const + { return _M_flags; } +# 659 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } +# 675 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } +# 692 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + + + + + + + + void + unsetf(fmtflags __mask) + { _M_flags &= ~__mask; } +# 718 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + streamsize + precision() const + { return _M_precision; } + + + + + + + streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + + + + + + + + streamsize + width() const + { return _M_width; } + + + + + + + streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } +# 769 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + static bool + sync_with_stdio(bool __sync = true); +# 781 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + locale + imbue(const locale& __loc) throw(); +# 792 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + locale + getloc() const + { return _M_ios_locale; } +# 803 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + const locale& + _M_getloc() const + { return _M_ios_locale; } +# 822 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + static int + xalloc() throw(); +# 838 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + long& + iword(int __ix) + { + _Words& __word = ((unsigned)__ix < (unsigned)_M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, true); + return __word._M_iword; + } +# 859 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + void*& + pword(int __ix) + { + _Words& __word = ((unsigned)__ix < (unsigned)_M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, false); + return __word._M_pword; + } +# 876 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + virtual ~ios_base(); + + protected: + ios_base() throw (); +# 890 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + public: + ios_base(const ios_base&) = delete; + + ios_base& + operator=(const ios_base&) = delete; + + protected: + void + _M_move(ios_base&) noexcept; + + void + _M_swap(ios_base& __rhs) noexcept; + + }; + + + + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + + + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + + + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + + + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + + + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + + + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + + + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + + + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + + + + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + + + + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + + + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + + + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + + + + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + + + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } + + + + + + + inline ios_base& + hexfloat(ios_base& __base) + { + __base.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield); + return __base; + } + + + inline ios_base& + defaultfloat(ios_base& __base) + { + __base.unsetf(ios_base::floatfield); + return __base; + } + + + +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 2 3 + + + +namespace std +{ + + + + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, + basic_streambuf<_CharT, _Traits>*, bool&); +# 121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + template + class basic_streambuf + { + public: + + + + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + + + typedef basic_streambuf __streambuf_type; + + + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + + friend streamsize + __copy_streambufs_eof<>(basic_streambuf*, basic_streambuf*, bool&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + void>::__type + advance(istreambuf_iterator<_CharT2>&, _Distance); + + friend void __istream_extract(istream&, char*, streamsize); + + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&); + + template + friend basic_istream<_CharT2, _Traits2>& + getline(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); + + protected: + + + + + + + + char_type* _M_in_beg; + char_type* _M_in_cur; + char_type* _M_in_end; + char_type* _M_out_beg; + char_type* _M_out_cur; + char_type* _M_out_end; + + + locale _M_buf_locale; + + public: + + virtual + ~basic_streambuf() + { } +# 213 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + locale + pubimbue(const locale& __loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + _M_buf_locale = __loc; + return __tmp; + } +# 230 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + locale + getloc() const + { return _M_buf_locale; } +# 243 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + basic_streambuf* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } +# 255 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } +# 267 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + + + + + int + pubsync() { return this->sync(); } +# 288 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + streamsize + in_avail() + { + const streamsize __ret = this->egptr() - this->gptr(); + return __ret ? __ret : this->showmanyc(); + } +# 302 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + snextc() + { + int_type __ret = traits_type::eof(); + if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), + __ret), true)) + __ret = this->sgetc(); + return __ret; + } +# 320 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sbumpc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + else + __ret = this->uflow(); + return __ret; + } +# 342 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sgetc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + __ret = traits_type::to_int_type(*this->gptr()); + else + __ret = this->underflow(); + return __ret; + } +# 361 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } +# 376 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sputbackc(char_type __c) + { + int_type __ret; + const bool __testpos = this->eback() < this->gptr(); + if (__builtin_expect(!__testpos || + !traits_type::eq(__c, this->gptr()[-1]), false)) + __ret = this->pbackfail(traits_type::to_int_type(__c)); + else + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } +# 401 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sungetc() + { + int_type __ret; + if (__builtin_expect(this->eback() < this->gptr(), true)) + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + else + __ret = this->pbackfail(); + return __ret; + } +# 428 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sputc(char_type __c) + { + int_type __ret; + if (__builtin_expect(this->pptr() < this->epptr(), true)) + { + *this->pptr() = __c; + this->pbump(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } +# 454 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + + protected: +# 468 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + basic_streambuf() + : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), + _M_out_beg(0), _M_out_cur(0), _M_out_end(0), + _M_buf_locale(locale()) + { } +# 486 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + char_type* + eback() const { return _M_in_beg; } + + char_type* + gptr() const { return _M_in_cur; } + + char_type* + egptr() const { return _M_in_end; } +# 502 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + gbump(int __n) { _M_in_cur += __n; } +# 513 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + } +# 533 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + char_type* + pbase() const { return _M_out_beg; } + + char_type* + pptr() const { return _M_out_cur; } + + char_type* + epptr() const { return _M_out_end; } +# 549 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + pbump(int __n) { _M_out_cur += __n; } +# 559 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + } +# 580 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual void + imbue(const locale& __loc __attribute__ ((__unused__))) + { } +# 595 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } +# 606 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 618 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual pos_type + seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 631 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int + sync() { return 0; } +# 653 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual streamsize + showmanyc() { return 0; } +# 669 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual streamsize + xsgetn(char_type* __s, streamsize __n); +# 691 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int_type + underflow() + { return traits_type::eof(); } +# 704 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(this->underflow(), + __ret); + if (!__testeof) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + return __ret; + } +# 728 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int_type + pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) + { return traits_type::eof(); } +# 746 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual streamsize + xsputn(const char_type* __s, streamsize __n); +# 772 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int_type + overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) + { return traits_type::eof(); } +# 799 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + __safe_gbump(streamsize __n) { _M_in_cur += __n; } + + void + __safe_pbump(streamsize __n) { _M_out_cur += __n; } + + + + + protected: + + basic_streambuf(const basic_streambuf&); + + basic_streambuf& + operator=(const basic_streambuf&); + + + void + swap(basic_streambuf& __sb) + { + std::swap(_M_in_beg, __sb._M_in_beg); + std::swap(_M_in_cur, __sb._M_in_cur); + std::swap(_M_in_end, __sb._M_in_end); + std::swap(_M_out_beg, __sb._M_out_beg); + std::swap(_M_out_cur, __sb._M_out_cur); + std::swap(_M_out_end, __sb._M_out_end); + std::swap(_M_buf_locale, __sb._M_buf_locale); + } + + }; + + + template + std::basic_streambuf<_CharT, _Traits>:: + basic_streambuf(const basic_streambuf&) = default; + + template + std::basic_streambuf<_CharT, _Traits>& + std::basic_streambuf<_CharT, _Traits>:: + operator=(const basic_streambuf&) = default; + + + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + + + + +} + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf.tcc" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf.tcc" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf.tcc" 3 + +namespace std +{ + + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->egptr() - this->gptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(__s, this->gptr(), __len); + __ret += __len; + __s += __len; + this->__safe_gbump(__len); + } + + if (__ret < __n) + { + const int_type __c = this->uflow(); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->epptr() - this->pptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(this->pptr(), __s, __len); + __ret += __len; + __s += __len; + this->__safe_pbump(__len); + } + + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + + + + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout, + bool& __ineof) + { + streamsize __ret = 0; + __ineof = true; + typename _Traits::int_type __c = __sbin->sgetc(); + while (!_Traits::eq_int_type(__c, _Traits::eof())) + { + __c = __sbout->sputc(_Traits::to_char_type(__c)); + if (_Traits::eq_int_type(__c, _Traits::eof())) + { + __ineof = false; + break; + } + ++__ret; + __c = __sbin->snextc(); + } + return __ret; + } + + template + inline streamsize + __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + bool __ineof; + return __copy_streambufs_eof(__sbin, __sbout, __ineof); + } + + + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + + +} +# 859 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 2 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 2 3 + + +namespace std +{ + +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + template + class istreambuf_iterator + : public iterator + { + public: +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + using pointer = void; + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*, bool); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + void>::__type + advance(istreambuf_iterator<_CharT2>&, _Distance); + + private: + + + + + + + + mutable streambuf_type* _M_sbuf; + int_type _M_c; + + public: + + constexpr istreambuf_iterator() noexcept + : _M_sbuf(0), _M_c(traits_type::eof()) { } + + + constexpr istreambuf_iterator(default_sentinel_t) noexcept + : istreambuf_iterator() { } + + + + istreambuf_iterator(const istreambuf_iterator&) noexcept = default; + + ~istreambuf_iterator() = default; + + + + istreambuf_iterator(istream_type& __s) noexcept + : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } + + + istreambuf_iterator(streambuf_type* __s) noexcept + : _M_sbuf(__s), _M_c(traits_type::eof()) { } + + + istreambuf_iterator& + operator=(const istreambuf_iterator&) noexcept = default; + + + + + + char_type + operator*() const + { + int_type __c = _M_get(); +# 156 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + return traits_type::to_char_type(__c); + } + + + istreambuf_iterator& + operator++() + { + + + + ; + + _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + return *this; + } + + + istreambuf_iterator + operator++(int) + { + + + + ; + + istreambuf_iterator __old = *this; + __old._M_c = _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + return __old; + } + + + + + + bool + equal(const istreambuf_iterator& __b) const + { return _M_at_eof() == __b._M_at_eof(); } + + private: + int_type + _M_get() const + { + int_type __ret = _M_c; + if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc())) + _M_sbuf = 0; + return __ret; + } + + bool + _M_at_eof() const + { return _S_is_eof(_M_get()); } + + static bool + _S_is_eof(int_type __c) + { + const int_type __eof = traits_type::eof(); + return traits_type::eq_int_type(__c, __eof); + } + + + friend bool + operator==(const istreambuf_iterator& __i, default_sentinel_t __s) + { return __i._M_at_eof(); } + + }; + + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } + + + template + class ostreambuf_iterator + : public iterator + { + public: + + + + + using difference_type = ptrdiff_t; + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + private: + streambuf_type* _M_sbuf; + bool _M_failed; + + public: + + + constexpr + ostreambuf_iterator() noexcept + : _M_sbuf(nullptr), _M_failed(true) { } + + + + ostreambuf_iterator(ostream_type& __s) noexcept + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator(streambuf_type* __s) noexcept + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator& + operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) + _M_failed = true; + return *this; + } + + + ostreambuf_iterator& + operator*() + { return *this; } + + + ostreambuf_iterator& + operator++(int) + { return *this; } + + + ostreambuf_iterator& + operator++() + { return *this; } + + + bool + failed() const noexcept + { return _M_failed; } + + ostreambuf_iterator& + _M_put(const _CharT* __ws, streamsize __len) + { + if (__builtin_expect(!_M_failed, true) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) + _M_failed = true; + return *this; + } + }; + + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + copy(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, + ostreambuf_iterator<_CharT> __result) + { + if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) + { + bool __ineof; + __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); + if (!__ineof) + __result._M_failed = true; + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(_CharT* __first, _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(const _CharT* __first, const _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, _CharT* __result) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + + if (__first._M_sbuf && !__last._M_sbuf) + { + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof())) + { + const streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + traits_type::copy(__result, __sb->gptr(), __n); + __sb->__safe_gbump(__n); + __result += __n; + __c = __sb->underflow(); + } + else + { + *__result++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + } + } + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result, + bool __strict __attribute__((__unused__))) + { + if (__n == 0) + return __result; + + + + ; + _CharT* __beg = __result; + __result += __it._M_sbuf->sgetn(__beg, __n); + + + ; + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + istreambuf_iterator<_CharT> >::__type + find(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, const _CharT& __val) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + const int_type __eof = traits_type::eof(); + + if (__first._M_sbuf && !__last._M_sbuf) + { + const int_type __ival = traits_type::to_int_type(__val); + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __ival)) + { + streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + const _CharT* __p = traits_type::find(__sb->gptr(), + __n, __val); + if (__p) + __n = __p - __sb->gptr(); + __sb->__safe_gbump(__n); + __c = __sb->sgetc(); + } + else + __c = __sb->snextc(); + } + + __first._M_c = __eof; + } + + return __first; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + void>::__type + advance(istreambuf_iterator<_CharT>& __i, _Distance __n) + { + if (__n == 0) + return; + + do { if (__builtin_is_constant_evaluated() && !bool(__n > 0)) __builtin_unreachable(); } while (false); + + + ; + + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + const int_type __eof = traits_type::eof(); + + streambuf_type* __sb = __i._M_sbuf; + while (__n > 0) + { + streamsize __size = __sb->egptr() - __sb->gptr(); + if (__size > __n) + { + __sb->__safe_gbump(__n); + break; + } + + __sb->__safe_gbump(__size); + __n -= __size; + if (traits_type::eq_int_type(__sb->underflow(), __eof)) + { + + + ; + break; + } + } + + __i._M_c = __eof; + } + + + + +} +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 2 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algobase.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 +namespace std +{ + +# 53 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 + template::type> + constexpr _Up&& + __invfwd(typename remove_reference<_Tp>::type& __t) noexcept + { return static_cast<_Up&&>(__t); } + + template + constexpr _Res + __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) + { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } + + template + constexpr _Res + __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } + + template + constexpr _Res + __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + { + return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); + } + + template + constexpr _Res + __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) + { return __invfwd<_Tp>(__t).*__f; } + + template + constexpr _Res + __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) + { return (*std::forward<_Tp>(__t)).*__f; } + + + template + constexpr typename __invoke_result<_Callable, _Args...>::type + __invoke(_Callable&& __fn, _Args&&... __args) + noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) + { + using __result = __invoke_result<_Callable, _Args...>; + using __type = typename __result::type; + using __tag = typename __result::__invoke_type; + return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + } + + + + template + constexpr enable_if_t, _Res> + __invoke_r(_Callable&& __fn, _Args&&... __args) + noexcept(is_nothrow_invocable_r_v<_Res, _Callable, _Args...>) + { + using __result = __invoke_result<_Callable, _Args...>; + using __type = typename __result::type; + using __tag = typename __result::__invoke_type; + if constexpr (is_void_v<_Res>) + std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + else + return std::__invoke_impl<__type>(__tag{}, + std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + } +# 159 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 + +} +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algobase.h" 2 3 + + + +namespace std +{ + +namespace ranges +{ + namespace __detail + { + template + constexpr inline bool __is_normal_iterator = false; + + template + constexpr inline bool + __is_normal_iterator<__gnu_cxx::__normal_iterator<_Iterator, + _Container>> = true; + + template + constexpr inline bool __is_reverse_iterator = false; + + template + constexpr inline bool + __is_reverse_iterator> = true; + + template + constexpr inline bool __is_move_iterator = false; + + template + constexpr inline bool + __is_move_iterator> = true; + } + + struct __equal_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr bool + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + + + if constexpr (__detail::__is_normal_iterator<_Iter1> + && same_as<_Iter1, _Sent1>) + return (*this)(__first1.base(), __last1.base(), + std::move(__first2), std::move(__last2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + else if constexpr (__detail::__is_normal_iterator<_Iter2> + && same_as<_Iter2, _Sent2>) + return (*this)(std::move(__first1), std::move(__last1), + __first2.base(), __last2.base(), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + else if constexpr (sized_sentinel_for<_Sent1, _Iter1> + && sized_sentinel_for<_Sent2, _Iter2>) + { + auto __d1 = ranges::distance(__first1, __last1); + auto __d2 = ranges::distance(__first2, __last2); + if (__d1 != __d2) + return false; + + using _ValueType1 = iter_value_t<_Iter1>; + constexpr bool __use_memcmp + = ((is_integral_v<_ValueType1> || is_pointer_v<_ValueType1>) + && __memcmpable<_Iter1, _Iter2>::__value + && is_same_v<_Pred, ranges::equal_to> + && is_same_v<_Proj1, identity> + && is_same_v<_Proj2, identity>); + if constexpr (__use_memcmp) + { + if (const size_t __len = (__last1 - __first1)) + return !std::__memcmp(__first1, __first2, __len); + return true; + } + else + { + for (; __first1 != __last1; ++__first1, (void)++__first2) + if (!(bool)std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + return false; + return true; + } + } + else + { + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!(bool)std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + return false; + return __first1 == __last1 && __first2 == __last2; + } + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr bool + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __equal_fn equal{}; + + template + struct in_out_result + { + [[no_unique_address]] _Iter in; + [[no_unique_address]] _Out out; + + template + requires convertible_to + && convertible_to + constexpr + operator in_out_result<_Iter2, _Out2>() const & + { return {in, out}; } + + template + requires convertible_to<_Iter, _Iter2> + && convertible_to<_Out, _Out2> + constexpr + operator in_out_result<_Iter2, _Out2>() && + { return {std::move(in), std::move(out)}; } + }; + + template + using copy_result = in_out_result<_Iter, _Out>; + + template + using move_result = in_out_result<_Iter, _Out>; + + template + using move_backward_result = in_out_result<_Iter1, _Iter2>; + + template + using copy_backward_result = in_out_result<_Iter1, _Iter2>; + + template _Sent, + bidirectional_iterator _Out> + requires (_IsMove + ? indirectly_movable<_Iter, _Out> + : indirectly_copyable<_Iter, _Out>) + constexpr conditional_t<_IsMove, + move_backward_result<_Iter, _Out>, + copy_backward_result<_Iter, _Out>> + __copy_or_move_backward(_Iter __first, _Sent __last, _Out __result); + + template _Sent, + weakly_incrementable _Out> + requires (_IsMove + ? indirectly_movable<_Iter, _Out> + : indirectly_copyable<_Iter, _Out>) + constexpr conditional_t<_IsMove, + move_result<_Iter, _Out>, + copy_result<_Iter, _Out>> + __copy_or_move(_Iter __first, _Sent __last, _Out __result) + { + + + using __detail::__is_move_iterator; + using __detail::__is_reverse_iterator; + using __detail::__is_normal_iterator; + if constexpr (__is_move_iterator<_Iter> && same_as<_Iter, _Sent>) + { + auto [__in, __out] + = ranges::__copy_or_move(std::move(__first).base(), + std::move(__last).base(), + std::move(__result)); + return {move_iterator{std::move(__in)}, std::move(__out)}; + } + else if constexpr (__is_reverse_iterator<_Iter> && same_as<_Iter, _Sent> + && __is_reverse_iterator<_Out>) + { + auto [__in,__out] + = ranges::__copy_or_move_backward<_IsMove>(std::move(__last).base(), + std::move(__first).base(), + std::move(__result).base()); + return {reverse_iterator{std::move(__in)}, + reverse_iterator{std::move(__out)}}; + } + else if constexpr (__is_normal_iterator<_Iter> && same_as<_Iter, _Sent>) + { + auto [__in,__out] + = ranges::__copy_or_move<_IsMove>(__first.base(), __last.base(), + __result); + return {decltype(__first){__in}, std::move(__out)}; + } + else if constexpr (__is_normal_iterator<_Out>) + { + auto [__in,__out] + = ranges::__copy_or_move<_IsMove>(__first, __last, __result.base()); + return {std::move(__in), decltype(__result){__out}}; + } + else if constexpr (sized_sentinel_for<_Sent, _Iter>) + { + + if (!std::is_constant_evaluated()) + + { + if constexpr (__memcpyable<_Iter, _Out>::__value) + { + using _ValueTypeI = iter_value_t<_Iter>; + static_assert(_IsMove + ? is_move_assignable_v<_ValueTypeI> + : is_copy_assignable_v<_ValueTypeI>); + auto __num = __last - __first; + if (__num) + __builtin_memmove(__result, __first, + sizeof(_ValueTypeI) * __num); + return {__first + __num, __result + __num}; + } + } + + for (auto __n = __last - __first; __n > 0; --__n) + { + if constexpr (_IsMove) + *__result = std::move(*__first); + else + *__result = *__first; + ++__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + else + { + while (__first != __last) + { + if constexpr (_IsMove) + *__result = std::move(*__first); + else + *__result = *__first; + ++__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + } + + struct __copy_fn + { + template _Sent, + weakly_incrementable _Out> + requires indirectly_copyable<_Iter, _Out> + constexpr copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result) const + { + return ranges::__copy_or_move(std::move(__first), + std::move(__last), + std::move(__result)); + } + + template + requires indirectly_copyable, _Out> + constexpr copy_result, _Out> + operator()(_Range&& __r, _Out __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __copy_fn copy{}; + + struct __move_fn + { + template _Sent, + weakly_incrementable _Out> + requires indirectly_movable<_Iter, _Out> + constexpr move_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result) const + { + return ranges::__copy_or_move(std::move(__first), + std::move(__last), + std::move(__result)); + } + + template + requires indirectly_movable, _Out> + constexpr move_result, _Out> + operator()(_Range&& __r, _Out __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __move_fn move{}; + + template _Sent, + bidirectional_iterator _Out> + requires (_IsMove + ? indirectly_movable<_Iter, _Out> + : indirectly_copyable<_Iter, _Out>) + constexpr conditional_t<_IsMove, + move_backward_result<_Iter, _Out>, + copy_backward_result<_Iter, _Out>> + __copy_or_move_backward(_Iter __first, _Sent __last, _Out __result) + { + + + using __detail::__is_reverse_iterator; + using __detail::__is_normal_iterator; + if constexpr (__is_reverse_iterator<_Iter> && same_as<_Iter, _Sent> + && __is_reverse_iterator<_Out>) + { + auto [__in,__out] + = ranges::__copy_or_move<_IsMove>(std::move(__last).base(), + std::move(__first).base(), + std::move(__result).base()); + return {reverse_iterator{std::move(__in)}, + reverse_iterator{std::move(__out)}}; + } + else if constexpr (__is_normal_iterator<_Iter> && same_as<_Iter, _Sent>) + { + auto [__in,__out] + = ranges::__copy_or_move_backward<_IsMove>(__first.base(), + __last.base(), + std::move(__result)); + return {decltype(__first){__in}, std::move(__out)}; + } + else if constexpr (__is_normal_iterator<_Out>) + { + auto [__in,__out] + = ranges::__copy_or_move_backward<_IsMove>(std::move(__first), + std::move(__last), + __result.base()); + return {std::move(__in), decltype(__result){__out}}; + } + else if constexpr (sized_sentinel_for<_Sent, _Iter>) + { + + if (!std::is_constant_evaluated()) + + { + if constexpr (__memcpyable<_Out, _Iter>::__value) + { + using _ValueTypeI = iter_value_t<_Iter>; + static_assert(_IsMove + ? is_move_assignable_v<_ValueTypeI> + : is_copy_assignable_v<_ValueTypeI>); + auto __num = __last - __first; + if (__num) + __builtin_memmove(__result - __num, __first, + sizeof(_ValueTypeI) * __num); + return {__first + __num, __result - __num}; + } + } + + auto __lasti = ranges::next(__first, __last); + auto __tail = __lasti; + + for (auto __n = __last - __first; __n > 0; --__n) + { + --__tail; + --__result; + if constexpr (_IsMove) + *__result = std::move(*__tail); + else + *__result = *__tail; + } + return {std::move(__lasti), std::move(__result)}; + } + else + { + auto __lasti = ranges::next(__first, __last); + auto __tail = __lasti; + + while (__first != __tail) + { + --__tail; + --__result; + if constexpr (_IsMove) + *__result = std::move(*__tail); + else + *__result = *__tail; + } + return {std::move(__lasti), std::move(__result)}; + } + } + + struct __copy_backward_fn + { + template _Sent1, + bidirectional_iterator _Iter2> + requires indirectly_copyable<_Iter1, _Iter2> + constexpr copy_backward_result<_Iter1, _Iter2> + operator()(_Iter1 __first, _Sent1 __last, _Iter2 __result) const + { + return ranges::__copy_or_move_backward(std::move(__first), + std::move(__last), + std::move(__result)); + } + + template + requires indirectly_copyable, _Iter> + constexpr copy_backward_result, _Iter> + operator()(_Range&& __r, _Iter __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __copy_backward_fn copy_backward{}; + + struct __move_backward_fn + { + template _Sent1, + bidirectional_iterator _Iter2> + requires indirectly_movable<_Iter1, _Iter2> + constexpr move_backward_result<_Iter1, _Iter2> + operator()(_Iter1 __first, _Sent1 __last, _Iter2 __result) const + { + return ranges::__copy_or_move_backward(std::move(__first), + std::move(__last), + std::move(__result)); + } + + template + requires indirectly_movable, _Iter> + constexpr move_backward_result, _Iter> + operator()(_Range&& __r, _Iter __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __move_backward_fn move_backward{}; + + template + using copy_n_result = in_out_result<_Iter, _Out>; + + struct __copy_n_fn + { + template + requires indirectly_copyable<_Iter, _Out> + constexpr copy_n_result<_Iter, _Out> + operator()(_Iter __first, iter_difference_t<_Iter> __n, + _Out __result) const + { + if constexpr (random_access_iterator<_Iter>) + { + if (__n > 0) + return ranges::copy(__first, __first + __n, std::move(__result)); + } + else + { + for (; __n > 0; --__n, (void)++__result, (void)++__first) + *__result = *__first; + } + return {std::move(__first), std::move(__result)}; + } + }; + + inline constexpr __copy_n_fn copy_n{}; + + struct __fill_n_fn + { + template _Out> + constexpr _Out + operator()(_Out __first, iter_difference_t<_Out> __n, + const _Tp& __value) const + { + + + if (__n <= 0) + return __first; + + + if constexpr (is_pointer_v<_Out> + + && __is_byte>::__value + && integral<_Tp>) + { + __builtin_memset(__first, static_cast(__value), __n); + return __first + __n; + } + else if constexpr (is_scalar_v<_Tp>) + { + const auto __tmp = __value; + for (; __n > 0; --__n, (void)++__first) + *__first = __tmp; + return __first; + } + else + { + for (; __n > 0; --__n, (void)++__first) + *__first = __value; + return __first; + } + } + }; + + inline constexpr __fill_n_fn fill_n{}; + + struct __fill_fn + { + template _Out, sentinel_for<_Out> _Sent> + constexpr _Out + operator()(_Out __first, _Sent __last, const _Tp& __value) const + { + + + if constexpr (sized_sentinel_for<_Sent, _Out>) + { + const auto __len = __last - __first; + return ranges::fill_n(__first, __len, __value); + } + else if constexpr (is_scalar_v<_Tp>) + { + const auto __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + return __first; + } + else + { + for (; __first != __last; ++__first) + *__first = __value; + return __first; + } + } + + template _Range> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, const _Tp& __value) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), __value); + } + }; + + inline constexpr __fill_fn fill{}; +} + +} +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_util.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_util.h" 3 +namespace std +{ + +namespace ranges +{ + + + namespace __detail + { + template + concept __simple_view = view<_Range> && range + && same_as, iterator_t> + && same_as, sentinel_t>; + + template + concept __has_arrow = input_iterator<_It> + && (is_pointer_v<_It> || requires(_It __it) { __it.operator->(); }); + + template + concept __not_same_as + = !same_as, remove_cvref_t<_Up>>; + } + + + template + requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>> + class view_interface : public view_base + { + private: + constexpr _Derived& _M_derived() noexcept + { + static_assert(derived_from<_Derived, view_interface<_Derived>>); + static_assert(view<_Derived>); + return static_cast<_Derived&>(*this); + } + + constexpr const _Derived& _M_derived() const noexcept + { + static_assert(derived_from<_Derived, view_interface<_Derived>>); + static_assert(view<_Derived>); + return static_cast(*this); + } + + public: + constexpr bool + empty() requires forward_range<_Derived> + { return ranges::begin(_M_derived()) == ranges::end(_M_derived()); } + + constexpr bool + empty() const requires forward_range + { return ranges::begin(_M_derived()) == ranges::end(_M_derived()); } + + constexpr explicit + operator bool() requires requires { ranges::empty(_M_derived()); } + { return !ranges::empty(_M_derived()); } + + constexpr explicit + operator bool() const requires requires { ranges::empty(_M_derived()); } + { return !ranges::empty(_M_derived()); } + + constexpr auto + data() requires contiguous_iterator> + { return to_address(ranges::begin(_M_derived())); } + + constexpr auto + data() const + requires range + && contiguous_iterator> + { return to_address(ranges::begin(_M_derived())); } + + constexpr auto + size() + requires forward_range<_Derived> + && sized_sentinel_for, iterator_t<_Derived>> + { return ranges::end(_M_derived()) - ranges::begin(_M_derived()); } + + constexpr auto + size() const + requires forward_range + && sized_sentinel_for, + iterator_t> + { return ranges::end(_M_derived()) - ranges::begin(_M_derived()); } + + constexpr decltype(auto) + front() requires forward_range<_Derived> + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return *ranges::begin(_M_derived()); + } + + constexpr decltype(auto) + front() const requires forward_range + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return *ranges::begin(_M_derived()); + } + + constexpr decltype(auto) + back() + requires bidirectional_range<_Derived> && common_range<_Derived> + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return *ranges::prev(ranges::end(_M_derived())); + } + + constexpr decltype(auto) + back() const + requires bidirectional_range + && common_range + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return *ranges::prev(ranges::end(_M_derived())); + } + + template + constexpr decltype(auto) + operator[](range_difference_t<_Range> __n) + { return ranges::begin(_M_derived())[__n]; } + + template + constexpr decltype(auto) + operator[](range_difference_t<_Range> __n) const + { return ranges::begin(_M_derived())[__n]; } + }; + + namespace __detail + { + template + concept __convertible_to_non_slicing = convertible_to<_From, _To> + && !(is_pointer_v> && is_pointer_v> + && __not_same_as>, + remove_pointer_t>>); + + template + concept __pair_like + = !is_reference_v<_Tp> && requires(_Tp __t) + { + typename tuple_size<_Tp>::type; + requires derived_from, integral_constant>; + typename tuple_element_t<0, remove_const_t<_Tp>>; + typename tuple_element_t<1, remove_const_t<_Tp>>; + { get<0>(__t) } -> convertible_to&>; + { get<1>(__t) } -> convertible_to&>; + }; + + template + concept __pair_like_convertible_from + = !range<_Tp> && __pair_like<_Tp> + && constructible_from<_Tp, _Up, _Vp> + && __convertible_to_non_slicing<_Up, tuple_element_t<0, _Tp>> + && convertible_to<_Vp, tuple_element_t<1, _Tp>>; + + } + + enum class subrange_kind : bool { unsized, sized }; + + + template _Sent = _It, + subrange_kind _Kind = sized_sentinel_for<_Sent, _It> + ? subrange_kind::sized : subrange_kind::unsized> + requires (_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _It>) + class subrange : public view_interface> + { + private: + + static const bool _S_store_size + = _Kind == subrange_kind::sized && !sized_sentinel_for<_Sent, _It>; + + _It _M_begin = _It(); + [[no_unique_address]] _Sent _M_end = _Sent(); + + using __size_type + = __detail::__make_unsigned_like_t>; + + template + struct _Size + { }; + + template + struct _Size<_Tp, true> + { _Tp _M_size; }; + + [[no_unique_address]] _Size<__size_type> _M_size = {}; + + public: + subrange() = default; + + constexpr + subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s) + requires (!_S_store_size) + : _M_begin(std::move(__i)), _M_end(__s) + { } + + constexpr + subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s, + __size_type __n) + requires (_Kind == subrange_kind::sized) + : _M_begin(std::move(__i)), _M_end(__s) + { + if constexpr (_S_store_size) + _M_size._M_size = __n; + } + + template<__detail::__not_same_as _Rng> + requires borrowed_range<_Rng> + && __detail::__convertible_to_non_slicing, _It> + && convertible_to, _Sent> + constexpr + subrange(_Rng&& __r) requires _S_store_size && sized_range<_Rng> + : subrange(__r, ranges::size(__r)) + { } + + template<__detail::__not_same_as _Rng> + requires borrowed_range<_Rng> + && __detail::__convertible_to_non_slicing, _It> + && convertible_to, _Sent> + constexpr + subrange(_Rng&& __r) requires (!_S_store_size) + : subrange(ranges::begin(__r), ranges::end(__r)) + { } + + template + requires __detail::__convertible_to_non_slicing, _It> + && convertible_to, _Sent> + constexpr + subrange(_Rng&& __r, __size_type __n) + requires (_Kind == subrange_kind::sized) + : subrange{ranges::begin(__r), ranges::end(__r), __n} + { } + + template<__detail::__not_same_as _PairLike> + requires __detail::__pair_like_convertible_from<_PairLike, const _It&, + const _Sent&> + constexpr + operator _PairLike() const + { return _PairLike(_M_begin, _M_end); } + + constexpr _It + begin() const requires copyable<_It> + { return _M_begin; } + + [[nodiscard]] constexpr _It + begin() requires (!copyable<_It>) + { return std::move(_M_begin); } + + constexpr _Sent end() const { return _M_end; } + + constexpr bool empty() const { return _M_begin == _M_end; } + + constexpr __size_type + size() const requires (_Kind == subrange_kind::sized) + { + if constexpr (_S_store_size) + return _M_size._M_size; + else + return __detail::__to_unsigned_like(_M_end - _M_begin); + } + + [[nodiscard]] constexpr subrange + next(iter_difference_t<_It> __n = 1) const & + requires forward_iterator<_It> + { + auto __tmp = *this; + __tmp.advance(__n); + return __tmp; + } + + [[nodiscard]] constexpr subrange + next(iter_difference_t<_It> __n = 1) && + { + advance(__n); + return std::move(*this); + } + + [[nodiscard]] constexpr subrange + prev(iter_difference_t<_It> __n = 1) const + requires bidirectional_iterator<_It> + { + auto __tmp = *this; + __tmp.advance(-__n); + return __tmp; + } + + constexpr subrange& + advance(iter_difference_t<_It> __n) + { + + + if constexpr (bidirectional_iterator<_It>) + if (__n < 0) + { + ranges::advance(_M_begin, __n); + if constexpr (_S_store_size) + _M_size._M_size += __detail::__to_unsigned_like(-__n); + return *this; + } + + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + auto __d = __n - ranges::advance(_M_begin, __n, _M_end); + if constexpr (_S_store_size) + _M_size._M_size -= __detail::__to_unsigned_like(__d); + return *this; + } + }; + + template _Sent> + subrange(_It, _Sent) -> subrange<_It, _Sent>; + + template _Sent> + subrange(_It, _Sent, + __detail::__make_unsigned_like_t>) + -> subrange<_It, _Sent, subrange_kind::sized>; + + template + subrange(_Rng&&) + -> subrange, sentinel_t<_Rng>, + (sized_range<_Rng> + || sized_sentinel_for, iterator_t<_Rng>>) + ? subrange_kind::sized : subrange_kind::unsized>; + + template + subrange(_Rng&&, + __detail::__make_unsigned_like_t>) + -> subrange, sentinel_t<_Rng>, subrange_kind::sized>; + + template + requires (_Num < 2) + constexpr auto + get(const subrange<_It, _Sent, _Kind>& __r) + { + if constexpr (_Num == 0) + return __r.begin(); + else + return __r.end(); + } + + template + requires (_Num < 2) + constexpr auto + get(subrange<_It, _Sent, _Kind>&& __r) + { + if constexpr (_Num == 0) + return __r.begin(); + else + return __r.end(); + } + + template _Sent, + subrange_kind _Kind> + inline constexpr bool + enable_borrowed_range> = true; + + template + using borrowed_subrange_t = conditional_t, + subrange>, + dangling>; + +} + + using ranges::get; + + template + struct tuple_size> + : integral_constant + { }; + + template + struct tuple_element<0, ranges::subrange<_Iter, _Sent, _Kind>> + { using type = _Iter; }; + + template + struct tuple_element<1, ranges::subrange<_Iter, _Sent, _Kind>> + { using type = _Sent; }; + + template + struct tuple_element<0, const ranges::subrange<_Iter, _Sent, _Kind>> + { using type = _Iter; }; + + template + struct tuple_element<1, const ranges::subrange<_Iter, _Sent, _Kind>> + { using type = _Sent; }; + + +} +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 2 3 + + + +namespace std +{ + +namespace ranges +{ + namespace __detail + { + template + constexpr auto + __make_comp_proj(_Comp& __comp, _Proj& __proj) + { + return [&] (auto&& __lhs, auto&& __rhs) -> bool { + using _TL = decltype(__lhs); + using _TR = decltype(__rhs); + return std::__invoke(__comp, + std::__invoke(__proj, std::forward<_TL>(__lhs)), + std::__invoke(__proj, std::forward<_TR>(__rhs))); + }; + } + + template + constexpr auto + __make_pred_proj(_Pred& __pred, _Proj& __proj) + { + return [&] (_Tp&& __arg) -> bool { + return std::__invoke(__pred, + std::__invoke(__proj, std::forward<_Tp>(__arg))); + }; + } + } + + struct __all_of_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (!(bool)std::__invoke(__pred, std::__invoke(__proj, *__first))) + return false; + return true; + } + + template, _Proj>> + _Pred> + constexpr bool + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __all_of_fn all_of{}; + + struct __any_of_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + return true; + return false; + } + + template, _Proj>> + _Pred> + constexpr bool + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __any_of_fn any_of{}; + + struct __none_of_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + return false; + return true; + } + + template, _Proj>> + _Pred> + constexpr bool + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __none_of_fn none_of{}; + + template + struct in_fun_result + { + [[no_unique_address]] _Iter in; + [[no_unique_address]] _Fp fun; + + template + requires convertible_to + && convertible_to + constexpr + operator in_fun_result<_Iter2, _F2p>() const & + { return {in, fun}; } + + template + requires convertible_to<_Iter, _Iter2> && convertible_to<_Fp, _F2p> + constexpr + operator in_fun_result<_Iter2, _F2p>() && + { return {std::move(in), std::move(fun)}; } + }; + + template + using for_each_result = in_fun_result<_Iter, _Fp>; + + struct __for_each_fn + { + template _Sent, + typename _Proj = identity, + indirectly_unary_invocable> _Fun> + constexpr for_each_result<_Iter, _Fun> + operator()(_Iter __first, _Sent __last, _Fun __f, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + std::__invoke(__f, std::__invoke(__proj, *__first)); + return { std::move(__first), std::move(__f) }; + } + + template, _Proj>> + _Fun> + constexpr for_each_result, _Fun> + operator()(_Range&& __r, _Fun __f, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__f), std::move(__proj)); + } + }; + + inline constexpr __for_each_fn for_each{}; + + template + using for_each_n_result = in_fun_result<_Iter, _Fp>; + + struct __for_each_n_fn + { + template> _Fun> + constexpr for_each_n_result<_Iter, _Fun> + operator()(_Iter __first, iter_difference_t<_Iter> __n, + _Fun __f, _Proj __proj = {}) const + { + if constexpr (random_access_iterator<_Iter>) + { + if (__n <= 0) + return {std::move(__first), std::move(__f)}; + auto __last = __first + __n; + return ranges::for_each(std::move(__first), std::move(__last), + std::move(__f), std::move(__proj)); + } + else + { + while (__n-- > 0) + { + std::__invoke(__f, std::__invoke(__proj, *__first)); + ++__first; + } + return {std::move(__first), std::move(__f)}; + } + } + }; + + inline constexpr __for_each_n_fn for_each_n{}; + + struct __find_fn + { + template _Sent, typename _Tp, + typename _Proj = identity> + requires indirect_binary_predicate, const _Tp*> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Proj __proj = {}) const + { + while (__first != __last + && !(std::__invoke(__proj, *__first) == __value)) + ++__first; + return __first; + } + + template + requires indirect_binary_predicate, _Proj>, + const _Tp*> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, const _Tp& __value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__proj)); + } + }; + + inline constexpr __find_fn find{}; + + struct __find_if_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + while (__first != __last + && !(bool)std::__invoke(__pred, std::__invoke(__proj, *__first))) + ++__first; + return __first; + } + + template, _Proj>> + _Pred> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __find_if_fn find_if{}; + + struct __find_if_not_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + while (__first != __last + && (bool)std::__invoke(__pred, std::__invoke(__proj, *__first))) + ++__first; + return __first; + } + + template, _Proj>> + _Pred> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __find_if_not_fn find_if_not{}; + + struct __find_first_of_fn + { + template _Sent1, + forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr _Iter1 + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + for (; __first1 != __last1; ++__first1) + for (auto __iter = __first2; __iter != __last2; ++__iter) + if (std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__iter))) + return __first1; + return __first1; + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr borrowed_iterator_t<_Range1> + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __find_first_of_fn find_first_of{}; + + struct __count_fn + { + template _Sent, + typename _Tp, typename _Proj = identity> + requires indirect_binary_predicate, + const _Tp*> + constexpr iter_difference_t<_Iter> + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Proj __proj = {}) const + { + iter_difference_t<_Iter> __n = 0; + for (; __first != __last; ++__first) + if (std::__invoke(__proj, *__first) == __value) + ++__n; + return __n; + } + + template + requires indirect_binary_predicate, _Proj>, + const _Tp*> + constexpr range_difference_t<_Range> + operator()(_Range&& __r, const _Tp& __value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__proj)); + } + }; + + inline constexpr __count_fn count{}; + + struct __count_if_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr iter_difference_t<_Iter> + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + iter_difference_t<_Iter> __n = 0; + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + ++__n; + return __n; + } + + template, _Proj>> + _Pred> + constexpr range_difference_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __count_if_fn count_if{}; + + template + struct in_in_result + { + [[no_unique_address]] _Iter1 in1; + [[no_unique_address]] _Iter2 in2; + + template + requires convertible_to + && convertible_to + constexpr + operator in_in_result<_IIter1, _IIter2>() const & + { return {in1, in2}; } + + template + requires convertible_to<_Iter1, _IIter1> + && convertible_to<_Iter2, _IIter2> + constexpr + operator in_in_result<_IIter1, _IIter2>() && + { return {std::move(in1), std::move(in2)}; } + }; + + template + using mismatch_result = in_in_result<_Iter1, _Iter2>; + + struct __mismatch_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr mismatch_result<_Iter1, _Iter2> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2 + && (bool)std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + { + ++__first1; + ++__first2; + } + return { std::move(__first1), std::move(__first2) }; + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr mismatch_result, iterator_t<_Range2>> + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __mismatch_fn mismatch{}; + + struct __search_fn + { + template _Sent1, + forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr subrange<_Iter1> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + if (__first1 == __last1 || __first2 == __last2) + return {__first1, __first1}; + + for (;;) + { + for (;;) + { + if (__first1 == __last1) + return {__first1, __first1}; + if (std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + break; + ++__first1; + } + auto __cur1 = __first1; + auto __cur2 = __first2; + for (;;) + { + if (++__cur2 == __last2) + return {__first1, ++__cur1}; + if (++__cur1 == __last1) + return {__cur1, __cur1}; + if (!(bool)std::__invoke(__pred, + std::__invoke(__proj1, *__cur1), + std::__invoke(__proj2, *__cur2))) + { + ++__first1; + break; + } + } + } + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr borrowed_subrange_t<_Range1> + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __search_fn search{}; + + struct __search_n_fn + { + template _Sent, typename _Tp, + typename _Pred = ranges::equal_to, typename _Proj = identity> + requires indirectly_comparable<_Iter, const _Tp*, _Pred, _Proj> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, iter_difference_t<_Iter> __count, + const _Tp& __value, _Pred __pred = {}, _Proj __proj = {}) const + { + if (__count <= 0) + return {__first, __first}; + + auto __value_comp = [&] (_Rp&& __arg) { + return std::__invoke(__pred, std::forward<_Rp>(__arg), __value); + }; + if (__count == 1) + { + __first = ranges::find_if(std::move(__first), __last, + std::move(__value_comp), + std::move(__proj)); + if (__first == __last) + return {__first, __first}; + else + { + auto __end = __first; + return {__first, ++__end}; + } + } + + if constexpr (sized_sentinel_for<_Sent, _Iter> + && random_access_iterator<_Iter>) + { + auto __tail_size = __last - __first; + auto __remainder = __count; + + while (__remainder <= __tail_size) + { + __first += __remainder; + __tail_size -= __remainder; + auto __backtrack = __first; + while (__value_comp(std::__invoke(__proj, *--__backtrack))) + { + if (--__remainder == 0) + return {__first - __count, __first}; + } + __remainder = __count + 1 - (__first - __backtrack); + } + auto __i = __first + __tail_size; + return {__i, __i}; + } + else + { + __first = ranges::find_if(__first, __last, __value_comp, __proj); + while (__first != __last) + { + auto __n = __count; + auto __i = __first; + ++__i; + while (__i != __last && __n != 1 + && __value_comp(std::__invoke(__proj, *__i))) + { + ++__i; + --__n; + } + if (__n == 1) + return {__first, __i}; + if (__i == __last) + return {__i, __i}; + __first = ranges::find_if(++__i, __last, __value_comp, __proj); + } + return {__first, __first}; + } + } + + template + requires indirectly_comparable, const _Tp*, + _Pred, _Proj> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, range_difference_t<_Range> __count, + const _Tp& __value, _Pred __pred = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__count), __value, + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __search_n_fn search_n{}; + + struct __find_end_fn + { + template _Sent1, + forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr subrange<_Iter1> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + if constexpr (bidirectional_iterator<_Iter1> + && bidirectional_iterator<_Iter2>) + { + auto __i1 = ranges::next(__first1, __last1); + auto __i2 = ranges::next(__first2, __last2); + auto __rresult + = ranges::search(reverse_iterator<_Iter1>{__i1}, + reverse_iterator<_Iter1>{__first1}, + reverse_iterator<_Iter2>{__i2}, + reverse_iterator<_Iter2>{__first2}, + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + auto __result_first = ranges::end(__rresult).base(); + auto __result_last = ranges::begin(__rresult).base(); + if (__result_last == __first1) + return {__i1, __i1}; + else + return {__result_first, __result_last}; + } + else + { + auto __i = ranges::next(__first1, __last1); + if (__first2 == __last2) + return {__i, __i}; + + auto __result_begin = __i; + auto __result_end = __i; + for (;;) + { + auto __new_range = ranges::search(__first1, __last1, + __first2, __last2, + __pred, __proj1, __proj2); + auto __new_result_begin = ranges::begin(__new_range); + auto __new_result_end = ranges::end(__new_range); + if (__new_result_begin == __last1) + return {__result_begin, __result_end}; + else + { + __result_begin = __new_result_begin; + __result_end = __new_result_end; + __first1 = __result_begin; + ++__first1; + } + } + } + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr borrowed_subrange_t<_Range1> + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __find_end_fn find_end{}; + + struct __adjacent_find_fn + { + template _Sent, + typename _Proj = identity, + indirect_binary_predicate, + projected<_Iter, _Proj>> _Pred + = ranges::equal_to> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred = {}, _Proj __proj = {}) const + { + if (__first == __last) + return __first; + auto __next = __first; + for (; ++__next != __last; __first = __next) + { + if (std::__invoke(__pred, + std::__invoke(__proj, *__first), + std::__invoke(__proj, *__next))) + return __first; + } + return __next; + } + + template, _Proj>, + projected, _Proj>> _Pred = ranges::equal_to> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Pred __pred = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __adjacent_find_fn adjacent_find{}; + + struct __is_permutation_fn + { + template _Sent1, + forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Proj1 = identity, typename _Proj2 = identity, + indirect_equivalence_relation, + projected<_Iter2, _Proj2>> _Pred + = ranges::equal_to> + constexpr bool + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + constexpr bool __sized_iters + = (sized_sentinel_for<_Sent1, _Iter1> + && sized_sentinel_for<_Sent2, _Iter2>); + if constexpr (__sized_iters) + { + auto __d1 = ranges::distance(__first1, __last1); + auto __d2 = ranges::distance(__first2, __last2); + if (__d1 != __d2) + return false; + } + + + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!(bool)std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + break; + + if constexpr (__sized_iters) + { + if (__first1 == __last1) + return true; + } + else + { + auto __d1 = ranges::distance(__first1, __last1); + auto __d2 = ranges::distance(__first2, __last2); + if (__d1 == 0 && __d2 == 0) + return true; + if (__d1 != __d2) + return false; + } + + for (auto __scan = __first1; __scan != __last1; ++__scan) + { + auto __proj_scan = std::__invoke(__proj1, *__scan); + auto __comp_scan = [&] (_Tp&& __arg) { + return std::__invoke(__pred, __proj_scan, + std::forward<_Tp>(__arg)); + }; + if (__scan != ranges::find_if(__first1, __scan, + __comp_scan, __proj1)) + continue; + + auto __matches = ranges::count_if(__first2, __last2, + __comp_scan, __proj2); + if (__matches == 0 + || ranges::count_if(__scan, __last1, + __comp_scan, __proj1) != __matches) + return false; + } + return true; + } + + template, _Proj1>, + projected, _Proj2>> _Pred = ranges::equal_to> + constexpr bool + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __is_permutation_fn is_permutation{}; + + template + using copy_if_result = in_out_result<_Iter, _Out>; + + struct __copy_if_fn + { + template _Sent, + weakly_incrementable _Out, typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_copyable<_Iter, _Out> + constexpr copy_if_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + { + *__result = *__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + + template, _Proj>> + _Pred> + requires indirectly_copyable, _Out> + constexpr copy_if_result, _Out> + operator()(_Range&& __r, _Out __result, + _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __copy_if_fn copy_if{}; + + template + using swap_ranges_result = in_in_result<_Iter1, _Iter2>; + + struct __swap_ranges_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2> + requires indirectly_swappable<_Iter1, _Iter2> + constexpr swap_ranges_result<_Iter1, _Iter2> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2) const + { + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + ranges::iter_swap(__first1, __first2); + return {std::move(__first1), std::move(__first2)}; + } + + template + requires indirectly_swappable, iterator_t<_Range2>> + constexpr swap_ranges_result, + borrowed_iterator_t<_Range2>> + operator()(_Range1&& __r1, _Range2&& __r2) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2)); + } + }; + + inline constexpr __swap_ranges_fn swap_ranges{}; + + template + using unary_transform_result = in_out_result<_Iter, _Out>; + + template + struct in_in_out_result + { + [[no_unique_address]] _Iter1 in1; + [[no_unique_address]] _Iter2 in2; + [[no_unique_address]] _Out out; + + template + requires convertible_to + && convertible_to + && convertible_to + constexpr + operator in_in_out_result<_IIter1, _IIter2, _OOut>() const & + { return {in1, in2, out}; } + + template + requires convertible_to<_Iter1, _IIter1> + && convertible_to<_Iter2, _IIter2> + && convertible_to<_Out, _OOut> + constexpr + operator in_in_out_result<_IIter1, _IIter2, _OOut>() && + { return {std::move(in1), std::move(in2), std::move(out)}; } + }; + + template + using binary_transform_result = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __transform_fn + { + template _Sent, + weakly_incrementable _Out, + copy_constructible _Fp, typename _Proj = identity> + requires indirectly_writable<_Out, + indirect_result_t<_Fp&, + projected<_Iter, _Proj>>> + constexpr unary_transform_result<_Iter, _Out> + operator()(_Iter __first1, _Sent __last1, _Out __result, + _Fp __op, _Proj __proj = {}) const + { + for (; __first1 != __last1; ++__first1, (void)++__result) + *__result = std::__invoke(__op, std::__invoke(__proj, *__first1)); + return {std::move(__first1), std::move(__result)}; + } + + template + requires indirectly_writable<_Out, + indirect_result_t<_Fp&, + projected, _Proj>>> + constexpr unary_transform_result, _Out> + operator()(_Range&& __r, _Out __result, _Fp __op, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), + std::move(__op), std::move(__proj)); + } + + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, copy_constructible _Fp, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_writable<_Out, + indirect_result_t<_Fp&, + projected<_Iter1, _Proj1>, + projected<_Iter2, _Proj2>>> + constexpr binary_transform_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Out __result, _Fp __binary_op, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2, ++__result) + *__result = std::__invoke(__binary_op, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2)); + return {std::move(__first1), std::move(__first2), std::move(__result)}; + } + + template + requires indirectly_writable<_Out, + indirect_result_t<_Fp&, + projected, _Proj1>, + projected, _Proj2>>> + constexpr binary_transform_result, + borrowed_iterator_t<_Range2>, _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, _Fp __binary_op, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__binary_op), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __transform_fn transform{}; + + struct __replace_fn + { + template _Sent, + typename _Tp1, typename _Tp2, typename _Proj = identity> + requires indirectly_writable<_Iter, const _Tp2&> + && indirect_binary_predicate, + const _Tp1*> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + const _Tp1& __old_value, const _Tp2& __new_value, + _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__proj, *__first) == __old_value) + *__first = __new_value; + return __first; + } + + template + requires indirectly_writable, const _Tp2&> + && indirect_binary_predicate, _Proj>, + const _Tp1*> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, + const _Tp1& __old_value, const _Tp2& __new_value, + _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __old_value, __new_value, std::move(__proj)); + } + }; + + inline constexpr __replace_fn replace{}; + + struct __replace_if_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_writable<_Iter, const _Tp&> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred, const _Tp& __new_value, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + *__first = __new_value; + return std::move(__first); + } + + template, _Proj>> + _Pred> + requires indirectly_writable, const _Tp&> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, + _Pred __pred, const _Tp& __new_value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), __new_value, std::move(__proj)); + } + }; + + inline constexpr __replace_if_fn replace_if{}; + + template + using replace_copy_result = in_out_result<_Iter, _Out>; + + struct __replace_copy_fn + { + template _Sent, + typename _Tp1, typename _Tp2, output_iterator _Out, + typename _Proj = identity> + requires indirectly_copyable<_Iter, _Out> + && indirect_binary_predicate, const _Tp1*> + constexpr replace_copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + const _Tp1& __old_value, const _Tp2& __new_value, + _Proj __proj = {}) const + { + for (; __first != __last; ++__first, (void)++__result) + if (std::__invoke(__proj, *__first) == __old_value) + *__result = __new_value; + else + *__result = *__first; + return {std::move(__first), std::move(__result)}; + } + + template _Out, typename _Proj = identity> + requires indirectly_copyable, _Out> + && indirect_binary_predicate, _Proj>, + const _Tp1*> + constexpr replace_copy_result, _Out> + operator()(_Range&& __r, _Out __result, + const _Tp1& __old_value, const _Tp2& __new_value, + _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), __old_value, + __new_value, std::move(__proj)); + } + }; + + inline constexpr __replace_copy_fn replace_copy{}; + + template + using replace_copy_if_result = in_out_result<_Iter, _Out>; + + struct __replace_copy_if_fn + { + template _Sent, + typename _Tp, output_iterator _Out, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_copyable<_Iter, _Out> + constexpr replace_copy_if_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + _Pred __pred, const _Tp& __new_value, _Proj __proj = {}) const + { + for (; __first != __last; ++__first, (void)++__result) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + *__result = __new_value; + else + *__result = *__first; + return {std::move(__first), std::move(__result)}; + } + + template _Out, + typename _Proj = identity, + indirect_unary_predicate, _Proj>> + _Pred> + requires indirectly_copyable, _Out> + constexpr replace_copy_if_result, _Out> + operator()(_Range&& __r, _Out __result, + _Pred __pred, const _Tp& __new_value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), std::move(__pred), + __new_value, std::move(__proj)); + } + }; + + inline constexpr __replace_copy_if_fn replace_copy_if{}; + + struct __generate_n_fn + { + template + requires invocable<_Fp&> + && indirectly_writable<_Out, invoke_result_t<_Fp&>> + constexpr _Out + operator()(_Out __first, iter_difference_t<_Out> __n, _Fp __gen) const + { + for (; __n > 0; --__n, (void)++__first) + *__first = std::__invoke(__gen); + return __first; + } + }; + + inline constexpr __generate_n_fn generate_n{}; + + struct __generate_fn + { + template _Sent, + copy_constructible _Fp> + requires invocable<_Fp&> + && indirectly_writable<_Out, invoke_result_t<_Fp&>> + constexpr _Out + operator()(_Out __first, _Sent __last, _Fp __gen) const + { + for (; __first != __last; ++__first) + *__first = std::__invoke(__gen); + return __first; + } + + template + requires invocable<_Fp&> && output_range<_Range, invoke_result_t<_Fp&>> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Fp __gen) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), std::move(__gen)); + } + }; + + inline constexpr __generate_fn generate{}; + + struct __remove_if_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + __first = ranges::find_if(__first, __last, __pred, __proj); + if (__first == __last) + return {__first, __first}; + + auto __result = __first; + ++__first; + for (; __first != __last; ++__first) + if (!std::__invoke(__pred, std::__invoke(__proj, *__first))) + { + *__result = std::move(*__first); + ++__result; + } + + return {__result, __first}; + } + + template, _Proj>> + _Pred> + requires permutable> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __remove_if_fn remove_if{}; + + struct __remove_fn + { + template _Sent, + typename _Tp, typename _Proj = identity> + requires indirect_binary_predicate, + const _Tp*> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Proj __proj = {}) const + { + auto __pred = [&] (auto&& __arg) { + return std::forward(__arg) == __value; + }; + return ranges::remove_if(__first, __last, + std::move(__pred), std::move(__proj)); + } + + template + requires permutable> + && indirect_binary_predicate, _Proj>, + const _Tp*> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, const _Tp& __value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__proj)); + } + }; + + inline constexpr __remove_fn remove{}; + + template + using remove_copy_if_result = in_out_result<_Iter, _Out>; + + struct __remove_copy_if_fn + { + template _Sent, + weakly_incrementable _Out, typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_copyable<_Iter, _Out> + constexpr remove_copy_if_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (!std::__invoke(__pred, std::__invoke(__proj, *__first))) + { + *__result = *__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + + template, _Proj>> + _Pred> + requires indirectly_copyable, _Out> + constexpr remove_copy_if_result, _Out> + operator()(_Range&& __r, _Out __result, + _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __remove_copy_if_fn remove_copy_if{}; + + template + using remove_copy_result = in_out_result<_Iter, _Out>; + + struct __remove_copy_fn + { + template _Sent, + weakly_incrementable _Out, typename _Tp, typename _Proj = identity> + requires indirectly_copyable<_Iter, _Out> + && indirect_binary_predicate, + const _Tp*> + constexpr remove_copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + const _Tp& __value, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (!(std::__invoke(__proj, *__first) == __value)) + { + *__result = *__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + + template + requires indirectly_copyable, _Out> + && indirect_binary_predicate, _Proj>, + const _Tp*> + constexpr remove_copy_result, _Out> + operator()(_Range&& __r, _Out __result, + const _Tp& __value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), __value, std::move(__proj)); + } + }; + + inline constexpr __remove_copy_fn remove_copy{}; + + struct __unique_fn + { + template _Sent, + typename _Proj = identity, + indirect_equivalence_relation< + projected<_Iter, _Proj>> _Comp = ranges::equal_to> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + __first = ranges::adjacent_find(__first, __last, __comp, __proj); + if (__first == __last) + return {__first, __first}; + + auto __dest = __first; + ++__first; + while (++__first != __last) + if (!std::__invoke(__comp, + std::__invoke(__proj, *__dest), + std::__invoke(__proj, *__first))) + *++__dest = std::move(*__first); + return {++__dest, __first}; + } + + template, _Proj>> _Comp = ranges::equal_to> + requires permutable> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __unique_fn unique{}; + + namespace __detail + { + template + concept __can_reread_output = input_iterator<_Out> + && same_as<_Tp, iter_value_t<_Out>>; + } + + template + using unique_copy_result = in_out_result<_Iter, _Out>; + + struct __unique_copy_fn + { + template _Sent, + weakly_incrementable _Out, typename _Proj = identity, + indirect_equivalence_relation< + projected<_Iter, _Proj>> _Comp = ranges::equal_to> + requires indirectly_copyable<_Iter, _Out> + && (forward_iterator<_Iter> + || __detail::__can_reread_output<_Out, iter_value_t<_Iter>> + || indirectly_copyable_storable<_Iter, _Out>) + constexpr unique_copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return {std::move(__first), std::move(__result)}; + + + if constexpr (forward_iterator<_Iter>) + { + auto __next = __first; + *__result = *__next; + while (++__next != __last) + if (!std::__invoke(__comp, + std::__invoke(__proj, *__first), + std::__invoke(__proj, *__next))) + { + __first = __next; + *++__result = *__first; + } + return {__next, std::move(++__result)}; + } + else if constexpr (__detail::__can_reread_output<_Out, iter_value_t<_Iter>>) + { + *__result = *__first; + while (++__first != __last) + if (!std::__invoke(__comp, + std::__invoke(__proj, *__result), + std::__invoke(__proj, *__first))) + *++__result = *__first; + return {std::move(__first), std::move(++__result)}; + } + else + { + auto __value = *__first; + *__result = __value; + while (++__first != __last) + { + if (!(bool)std::__invoke(__comp, + std::__invoke(__proj, *__first), + std::__invoke(__proj, __value))) + { + __value = *__first; + *++__result = __value; + } + } + return {std::move(__first), std::move(++__result)}; + } + } + + template, _Proj>> _Comp = ranges::equal_to> + requires indirectly_copyable, _Out> + && (forward_iterator> + || __detail::__can_reread_output<_Out, range_value_t<_Range>> + || indirectly_copyable_storable, _Out>) + constexpr unique_copy_result, _Out> + operator()(_Range&& __r, _Out __result, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __unique_copy_fn unique_copy{}; + + struct __reverse_fn + { + template _Sent> + requires permutable<_Iter> + constexpr _Iter + operator()(_Iter __first, _Sent __last) const + { + auto __i = ranges::next(__first, __last); + auto __tail = __i; + + if constexpr (random_access_iterator<_Iter>) + { + if (__first != __last) + { + --__tail; + while (__first < __tail) + { + ranges::iter_swap(__first, __tail); + ++__first; + --__tail; + } + } + return __i; + } + else + { + for (;;) + if (__first == __tail || __first == --__tail) + break; + else + { + ranges::iter_swap(__first, __tail); + ++__first; + } + return __i; + } + } + + template + requires permutable> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r) const + { + return (*this)(ranges::begin(__r), ranges::end(__r)); + } + }; + + inline constexpr __reverse_fn reverse{}; + + template + using reverse_copy_result = in_out_result<_Iter, _Out>; + + struct __reverse_copy_fn + { + template _Sent, + weakly_incrementable _Out> + requires indirectly_copyable<_Iter, _Out> + constexpr reverse_copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result) const + { + auto __i = ranges::next(__first, __last); + auto __tail = __i; + while (__first != __tail) + { + --__tail; + *__result = *__tail; + ++__result; + } + return {__i, __result}; + } + + template + requires indirectly_copyable, _Out> + constexpr reverse_copy_result, _Out> + operator()(_Range&& __r, _Out __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __reverse_copy_fn reverse_copy{}; + + struct __rotate_fn + { + template _Sent> + constexpr subrange<_Iter> + operator()(_Iter __first, _Iter __middle, _Sent __last) const + { + auto __lasti = ranges::next(__first, __last); + if (__first == __middle) + return {__lasti, __lasti}; + if (__last == __middle) + return {std::move(__first), std::move(__lasti)}; + + if constexpr (random_access_iterator<_Iter>) + { + auto __n = __lasti - __first; + auto __k = __middle - __first; + + if (__k == __n - __k) + { + ranges::swap_ranges(__first, __middle, __middle, __middle + __k); + return {std::move(__middle), std::move(__lasti)}; + } + + auto __p = __first; + auto __ret = __first + (__lasti - __middle); + + for (;;) + { + if (__k < __n - __k) + { + + + if constexpr (__is_pod(iter_value_t<_Iter>)) + if (__k == 1) + { + auto __t = std::move(*__p); + ranges::move(__p + 1, __p + __n, __p); + *(__p + __n - 1) = std::move(__t); + return {std::move(__ret), std::move(__lasti)}; + } + auto __q = __p + __k; + for (decltype(__n) __i = 0; __i < __n - __k; ++ __i) + { + ranges::iter_swap(__p, __q); + ++__p; + ++__q; + } + __n %= __k; + if (__n == 0) + return {std::move(__ret), std::move(__lasti)}; + ranges::swap(__n, __k); + __k = __n - __k; + } + else + { + __k = __n - __k; + + + if constexpr (__is_pod(iter_value_t<_Iter>)) + if (__k == 1) + { + auto __t = std::move(*(__p + __n - 1)); + ranges::move_backward(__p, __p + __n - 1, __p + __n); + *__p = std::move(__t); + return {std::move(__ret), std::move(__lasti)}; + } + auto __q = __p + __n; + __p = __q - __k; + for (decltype(__n) __i = 0; __i < __n - __k; ++ __i) + { + --__p; + --__q; + ranges::iter_swap(__p, __q); + } + __n %= __k; + if (__n == 0) + return {std::move(__ret), std::move(__lasti)}; + std::swap(__n, __k); + } + } + } + else if constexpr (bidirectional_iterator<_Iter>) + { + auto __tail = __lasti; + + ranges::reverse(__first, __middle); + ranges::reverse(__middle, __tail); + + while (__first != __middle && __middle != __tail) + { + ranges::iter_swap(__first, --__tail); + ++__first; + } + + if (__first == __middle) + { + ranges::reverse(__middle, __tail); + return {std::move(__tail), std::move(__lasti)}; + } + else + { + ranges::reverse(__first, __middle); + return {std::move(__first), std::move(__lasti)}; + } + } + else + { + auto __first2 = __middle; + do + { + ranges::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } while (__first2 != __last); + + auto __ret = __first; + + __first2 = __middle; + + while (__first2 != __last) + { + ranges::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + return {std::move(__ret), std::move(__lasti)}; + } + } + + template + requires permutable> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, iterator_t<_Range> __middle) const + { + return (*this)(ranges::begin(__r), std::move(__middle), + ranges::end(__r)); + } + }; + + inline constexpr __rotate_fn rotate{}; + + template + using rotate_copy_result = in_out_result<_Iter, _Out>; + + struct __rotate_copy_fn + { + template _Sent, + weakly_incrementable _Out> + requires indirectly_copyable<_Iter, _Out> + constexpr rotate_copy_result<_Iter, _Out> + operator()(_Iter __first, _Iter __middle, _Sent __last, + _Out __result) const + { + auto __copy1 = ranges::copy(__middle, + std::move(__last), + std::move(__result)); + auto __copy2 = ranges::copy(std::move(__first), + std::move(__middle), + std::move(__copy1.out)); + return { std::move(__copy1.in), std::move(__copy2.out) }; + } + + template + requires indirectly_copyable, _Out> + constexpr rotate_copy_result, _Out> + operator()(_Range&& __r, iterator_t<_Range> __middle, _Out __result) const + { + return (*this)(ranges::begin(__r), std::move(__middle), + ranges::end(__r), std::move(__result)); + } + }; + + inline constexpr __rotate_copy_fn rotate_copy{}; + + struct __sample_fn + { + template _Sent, + weakly_incrementable _Out, typename _Gen> + requires (forward_iterator<_Iter> || random_access_iterator<_Out>) + && indirectly_copyable<_Iter, _Out> + && uniform_random_bit_generator> + _Out + operator()(_Iter __first, _Sent __last, _Out __out, + iter_difference_t<_Iter> __n, _Gen&& __g) const + { + if constexpr (forward_iterator<_Iter>) + { + + + auto __lasti = ranges::next(__first, __last); + return std:: + sample(std::move(__first), std::move(__lasti), std::move(__out), + __n, std::forward<_Gen>(__g)); + } + else + { + using __distrib_type + = uniform_int_distribution>; + using __param_type = typename __distrib_type::param_type; + __distrib_type __d{}; + iter_difference_t<_Iter> __sample_sz = 0; + while (__first != __last && __sample_sz != __n) + { + __out[__sample_sz++] = *__first; + ++__first; + } + for (auto __pop_sz = __sample_sz; __first != __last; + ++__first, (void) ++__pop_sz) + { + const auto __k = __d(__g, __param_type{0, __pop_sz}); + if (__k < __n) + __out[__k] = *__first; + } + return __out + __sample_sz; + } + } + + template + requires (forward_range<_Range> || random_access_iterator<_Out>) + && indirectly_copyable, _Out> + && uniform_random_bit_generator> + _Out + operator()(_Range&& __r, _Out __out, + range_difference_t<_Range> __n, _Gen&& __g) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__out), __n, + std::forward<_Gen>(__g)); + } + }; + + inline constexpr __sample_fn sample{}; + + + struct __shuffle_fn + { + template _Sent, + typename _Gen> + requires permutable<_Iter> + && uniform_random_bit_generator> + _Iter + operator()(_Iter __first, _Sent __last, _Gen&& __g) const + { + auto __lasti = ranges::next(__first, __last); + std::shuffle(std::move(__first), __lasti, std::forward<_Gen>(__g)); + return __lasti; + } + + template + requires permutable> + && uniform_random_bit_generator> + borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Gen&& __g) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::forward<_Gen>(__g)); + } + }; + + inline constexpr __shuffle_fn shuffle{}; + + + struct __push_heap_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::push_heap(__first, __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __push_heap_fn push_heap{}; + + struct __pop_heap_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::pop_heap(__first, __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __pop_heap_fn pop_heap{}; + + struct __make_heap_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::make_heap(__first, __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __make_heap_fn make_heap{}; + + struct __sort_heap_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::sort_heap(__first, __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __sort_heap_fn sort_heap{}; + + struct __is_heap_until_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + iter_difference_t<_Iter> __n = ranges::distance(__first, __last); + iter_difference_t<_Iter> __parent = 0, __child = 1; + for (; __child < __n; ++__child) + if (std::__invoke(__comp, + std::__invoke(__proj, *(__first + __parent)), + std::__invoke(__proj, *(__first + __child)))) + return __first + __child; + else if ((__child & 1) == 0) + ++__parent; + + return __first + __n; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __is_heap_until_fn is_heap_until{}; + + struct __is_heap_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (__last + == ranges::is_heap_until(__first, __last, + std::move(__comp), + std::move(__proj))); + } + + template, _Proj>> + _Comp = ranges::less> + constexpr bool + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __is_heap_fn is_heap{}; + + struct __sort_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::sort(std::move(__first), __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __sort_fn sort{}; + + struct __stable_sort_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::stable_sort(std::move(__first), __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __stable_sort_fn stable_sort{}; + + struct __partial_sort_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Iter __middle, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __middle) + return ranges::next(__first, __last); + + ranges::make_heap(__first, __middle, __comp, __proj); + auto __i = __middle; + for (; __i != __last; ++__i) + if (std::__invoke(__comp, + std::__invoke(__proj, *__i), + std::__invoke(__proj, *__first))) + { + ranges::pop_heap(__first, __middle, __comp, __proj); + ranges::iter_swap(__middle-1, __i); + ranges::push_heap(__first, __middle, __comp, __proj); + } + ranges::sort_heap(__first, __middle, __comp, __proj); + + return __i; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, iterator_t<_Range> __middle, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), std::move(__middle), + ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __partial_sort_fn partial_sort{}; + + template + using partial_sort_copy_result = in_out_result<_Iter, _Out>; + + struct __partial_sort_copy_fn + { + template _Sent1, + random_access_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_copyable<_Iter1, _Iter2> + && sortable<_Iter2, _Comp, _Proj2> + && indirect_strict_weak_order<_Comp, + projected<_Iter1, _Proj1>, + projected<_Iter2, _Proj2>> + constexpr partial_sort_copy_result<_Iter1, _Iter2> + operator()(_Iter1 __first, _Sent1 __last, + _Iter2 __result_first, _Sent2 __result_last, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + if (__result_first == __result_last) + { + + auto __lasti = ranges::next(std::move(__first), + std::move(__last)); + return {std::move(__lasti), std::move(__result_first)}; + } + + auto __result_real_last = __result_first; + while (__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + + ranges::make_heap(__result_first, __result_real_last, __comp, __proj2); + for (; __first != __last; ++__first) + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first), + std::__invoke(__proj2, *__result_first))) + { + ranges::pop_heap(__result_first, __result_real_last, + __comp, __proj2); + *(__result_real_last-1) = *__first; + ranges::push_heap(__result_first, __result_real_last, + __comp, __proj2); + } + ranges::sort_heap(__result_first, __result_real_last, __comp, __proj2); + + return {std::move(__first), std::move(__result_real_last)}; + } + + template + requires indirectly_copyable, iterator_t<_Range2>> + && sortable, _Comp, _Proj2> + && indirect_strict_weak_order<_Comp, + projected, _Proj1>, + projected, _Proj2>> + constexpr partial_sort_copy_result, + borrowed_iterator_t<_Range2>> + operator()(_Range1&& __r, _Range2&& __out, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + ranges::begin(__out), ranges::end(__out), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __partial_sort_copy_fn partial_sort_copy{}; + + struct __is_sorted_until_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return __first; + + auto __next = __first; + for (++__next; __next != __last; __first = __next, (void)++__next) + if (std::__invoke(__comp, + std::__invoke(__proj, *__next), + std::__invoke(__proj, *__first))) + return __next; + return __next; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __is_sorted_until_fn is_sorted_until{}; + + struct __is_sorted_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return true; + + auto __next = __first; + for (++__next; __next != __last; __first = __next, (void)++__next) + if (std::__invoke(__comp, + std::__invoke(__proj, *__next), + std::__invoke(__proj, *__first))) + return false; + return true; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr bool + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __is_sorted_fn is_sorted{}; + + struct __nth_element_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Iter __nth, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::nth_element(std::move(__first), std::move(__nth), + __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, iterator_t<_Range> __nth, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), std::move(__nth), + ranges::end(__r), std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __nth_element_fn nth_element{}; + + struct __lower_bound_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __len = ranges::distance(__first, __last); + + while (__len > 0) + { + auto __half = __len / 2; + auto __middle = __first; + ranges::advance(__middle, __half); + if (std::__invoke(__comp, std::__invoke(__proj, *__middle), __value)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __lower_bound_fn lower_bound{}; + + struct __upper_bound_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __len = ranges::distance(__first, __last); + + while (__len > 0) + { + auto __half = __len / 2; + auto __middle = __first; + ranges::advance(__middle, __half); + if (std::__invoke(__comp, __value, std::__invoke(__proj, *__middle))) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __upper_bound_fn upper_bound{}; + + struct __equal_range_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __len = ranges::distance(__first, __last); + + while (__len > 0) + { + auto __half = __len / 2; + auto __middle = __first; + ranges::advance(__middle, __half); + if (std::__invoke(__comp, + std::__invoke(__proj, *__middle), + __value)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (std::__invoke(__comp, + __value, + std::__invoke(__proj, *__middle))) + __len = __half; + else + { + auto __left + = ranges::lower_bound(__first, __middle, + __value, __comp, __proj); + ranges::advance(__first, __len); + auto __right + = ranges::upper_bound(++__middle, __first, + __value, __comp, __proj); + return {__left, __right}; + } + } + return {__first, __first}; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, const _Tp& __value, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __equal_range_fn equal_range{}; + + struct __binary_search_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr bool + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __i = ranges::lower_bound(__first, __last, __value, __comp, __proj); + if (__i == __last) + return false; + return !(bool)std::__invoke(__comp, __value, + std::__invoke(__proj, *__i)); + } + + template, _Proj>> + _Comp = ranges::less> + constexpr bool + operator()(_Range&& __r, const _Tp& __value, _Comp __comp = {}, + _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __binary_search_fn binary_search{}; + + struct __is_partitioned_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + __first = ranges::find_if_not(std::move(__first), __last, + __pred, __proj); + if (__first == __last) + return true; + ++__first; + return ranges::none_of(std::move(__first), std::move(__last), + std::move(__pred), std::move(__proj)); + } + + template, _Proj>> + _Pred> + constexpr bool + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __is_partitioned_fn is_partitioned{}; + + struct __partition_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + if constexpr (bidirectional_iterator<_Iter>) + { + auto __lasti = ranges::next(__first, __last); + auto __tail = __lasti; + for (;;) + { + for (;;) + if (__first == __tail) + return {std::move(__first), std::move(__lasti)}; + else if (std::__invoke(__pred, + std::__invoke(__proj, *__first))) + ++__first; + else + break; + --__tail; + for (;;) + if (__first == __tail) + return {std::move(__first), std::move(__lasti)}; + else if (!(bool)std::__invoke(__pred, + std::__invoke(__proj, *__tail))) + --__tail; + else + break; + ranges::iter_swap(__first, __tail); + ++__first; + } + } + else + { + if (__first == __last) + return {std::move(__first), std::move(__first)}; + + while (std::__invoke(__pred, std::__invoke(__proj, *__first))) + if (++__first == __last) + return {std::move(__first), std::move(__first)}; + + auto __next = __first; + while (++__next != __last) + if (std::__invoke(__pred, std::__invoke(__proj, *__next))) + { + ranges::iter_swap(__first, __next); + ++__first; + } + + return {std::move(__first), std::move(__next)}; + } + } + + template, _Proj>> + _Pred> + requires permutable> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __partition_fn partition{}; + + struct __stable_partition_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires permutable<_Iter> + subrange<_Iter> + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + auto __middle + = std::stable_partition(std::move(__first), __lasti, + __detail::__make_pred_proj(__pred, __proj)); + return {std::move(__middle), std::move(__lasti)}; + } + + template, _Proj>> + _Pred> + requires permutable> + borrowed_subrange_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __stable_partition_fn stable_partition{}; + + template + struct in_out_out_result + { + [[no_unique_address]] _Iter in; + [[no_unique_address]] _Out1 out1; + [[no_unique_address]] _Out2 out2; + + template + requires convertible_to + && convertible_to + && convertible_to + constexpr + operator in_out_out_result<_IIter, _OOut1, _OOut2>() const & + { return {in, out1, out2}; } + + template + requires convertible_to<_Iter, _IIter> + && convertible_to<_Out1, _OOut1> + && convertible_to<_Out2, _OOut2> + constexpr + operator in_out_out_result<_IIter, _OOut1, _OOut2>() && + { return {std::move(in), std::move(out1), std::move(out2)}; } + }; + + template + using partition_copy_result = in_out_out_result<_Iter, _Out1, _Out2>; + + struct __partition_copy_fn + { + template _Sent, + weakly_incrementable _Out1, weakly_incrementable _O2, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_copyable<_Iter, _Out1> + && indirectly_copyable<_Iter, _O2> + constexpr partition_copy_result<_Iter, _Out1, _O2> + operator()(_Iter __first, _Sent __last, + _Out1 __out_true, _O2 __out_false, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + { + *__out_true = *__first; + ++__out_true; + } + else + { + *__out_false = *__first; + ++__out_false; + } + + return {std::move(__first), + std::move(__out_true), std::move(__out_false)}; + } + + template, _Proj>> + _Pred> + requires indirectly_copyable, _Out1> + && indirectly_copyable, _O2> + constexpr partition_copy_result, _Out1, _O2> + operator()(_Range&& __r, _Out1 out_true, _O2 out_false, + _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(out_true), std::move(out_false), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __partition_copy_fn partition_copy{}; + + struct __partition_point_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + auto __len = ranges::distance(__first, __last); + + while (__len > 0) + { + auto __half = __len / 2; + auto __middle = __first; + ranges::advance(__middle, __half); + if (std::__invoke(__pred, std::__invoke(__proj, *__middle))) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + template, _Proj>> + _Pred> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __partition_point_fn partition_point{}; + + template + using merge_result = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __merge_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr merge_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + { + if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + auto __copy1 = ranges::copy(std::move(__first1), std::move(__last1), + std::move(__result)); + auto __copy2 = ranges::copy(std::move(__first2), std::move(__last2), + std::move(__copy1.out)); + return { std::move(__copy1.in), std::move(__copy2.in), + std::move(__copy2.out) }; + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr merge_result, + borrowed_iterator_t<_Range2>, + _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __merge_fn merge{}; + + struct __inplace_merge_fn + { + template _Sent, + typename _Comp = ranges::less, + typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + _Iter + operator()(_Iter __first, _Iter __middle, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::inplace_merge(std::move(__first), std::move(__middle), __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + borrowed_iterator_t<_Range> + operator()(_Range&& __r, iterator_t<_Range> __middle, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), std::move(__middle), + ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __inplace_merge_fn inplace_merge{}; + + struct __includes_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Proj1 = identity, typename _Proj2 = identity, + indirect_strict_weak_order, + projected<_Iter2, _Proj2>> + _Comp = ranges::less> + constexpr bool + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + return false; + else if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + ++__first1; + else + { + ++__first1; + ++__first2; + } + + return __first2 == __last2; + } + + template, _Proj1>, + projected, _Proj2>> + _Comp = ranges::less> + constexpr bool + operator()(_Range1&& __r1, _Range2&& __r2, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __includes_fn includes{}; + + template + using set_union_result = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __set_union_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr set_union_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Out __result, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + { + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + { + *__result = *__first1; + ++__first1; + } + else if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + auto __copy1 = ranges::copy(std::move(__first1), std::move(__last1), + std::move(__result)); + auto __copy2 = ranges::copy(std::move(__first2), std::move(__last2), + std::move(__copy1.out)); + return {std::move(__copy1.in), std::move(__copy2.in), + std::move(__copy2.out)}; + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr set_union_result, + borrowed_iterator_t<_Range2>, _Out> + operator()(_Range1&& __r1, _Range2&& __r2, + _Out __result, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __set_union_fn set_union{}; + + template + using set_intersection_result = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __set_intersection_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr set_intersection_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + ++__first1; + else if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + + auto __last1i = ranges::next(std::move(__first1), std::move(__last1)); + auto __last2i = ranges::next(std::move(__first2), std::move(__last2)); + return {std::move(__last1i), std::move(__last2i), std::move(__result)}; + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr set_intersection_result, + borrowed_iterator_t<_Range2>, _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __set_intersection_fn set_intersection{}; + + template + using set_difference_result = in_out_result<_Iter, _Out>; + + struct __set_difference_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr set_difference_result<_Iter1, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return ranges::copy(std::move(__first1), std::move(__last1), + std::move(__result)); + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr set_difference_result, _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __set_difference_fn set_difference{}; + + template + using set_symmetric_difference_result + = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __set_symmetric_difference_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr set_symmetric_difference_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Out __result, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + auto __copy1 = ranges::copy(std::move(__first1), std::move(__last1), + std::move(__result)); + auto __copy2 = ranges::copy(std::move(__first2), std::move(__last2), + std::move(__copy1.out)); + return {std::move(__copy1.in), std::move(__copy2.in), + std::move(__copy2.out)}; + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr set_symmetric_difference_result, + borrowed_iterator_t<_Range2>, + _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __set_symmetric_difference_fn set_symmetric_difference{}; + + struct __min_fn + { + template> + _Comp = ranges::less> + constexpr const _Tp& + operator()(const _Tp& __a, const _Tp& __b, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (std::__invoke(std::move(__comp), + std::__invoke(__proj, __b), + std::__invoke(__proj, __a))) + return __b; + else + return __a; + } + + template, _Proj>> + _Comp = ranges::less> + requires indirectly_copyable_storable, + range_value_t<_Range>*> + constexpr range_value_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __first = ranges::begin(__r); + auto __last = ranges::end(__r); + do { if (__builtin_is_constant_evaluated() && !bool(__first != __last)) __builtin_unreachable(); } while (false); + auto __result = *__first; + while (++__first != __last) + { + auto __tmp = *__first; + if (std::__invoke(__comp, + std::__invoke(__proj, __tmp), + std::__invoke(__proj, __result))) + __result = std::move(__tmp); + } + return __result; + } + + template> + _Comp = ranges::less> + constexpr _Tp + operator()(initializer_list<_Tp> __r, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::subrange(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __min_fn min{}; + + struct __max_fn + { + template> + _Comp = ranges::less> + constexpr const _Tp& + operator()(const _Tp& __a, const _Tp& __b, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (std::__invoke(std::move(__comp), + std::__invoke(__proj, __a), + std::__invoke(__proj, __b))) + return __b; + else + return __a; + } + + template, _Proj>> + _Comp = ranges::less> + requires indirectly_copyable_storable, + range_value_t<_Range>*> + constexpr range_value_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __first = ranges::begin(__r); + auto __last = ranges::end(__r); + do { if (__builtin_is_constant_evaluated() && !bool(__first != __last)) __builtin_unreachable(); } while (false); + auto __result = *__first; + while (++__first != __last) + { + auto __tmp = *__first; + if (std::__invoke(__comp, + std::__invoke(__proj, __result), + std::__invoke(__proj, __tmp))) + __result = std::move(__tmp); + } + return __result; + } + + template> + _Comp = ranges::less> + constexpr _Tp + operator()(initializer_list<_Tp> __r, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::subrange(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __max_fn max{}; + + struct __clamp_fn + { + template> _Comp + = ranges::less> + constexpr const _Tp& + operator()(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, + _Comp __comp = {}, _Proj __proj = {}) const + { + do { if (__builtin_is_constant_evaluated() && !bool(!(std::__invoke(__comp, std::__invoke(__proj, __hi), std::__invoke(__proj, __lo))))) __builtin_unreachable(); } while (false) + + ; + auto&& __proj_val = std::__invoke(__proj, __val); + if (std::__invoke(__comp, __proj_val, std::__invoke(__proj, __lo))) + return __lo; + else if (std::__invoke(__comp, std::__invoke(__proj, __hi), __proj_val)) + return __hi; + else + return __val; + } + }; + + inline constexpr __clamp_fn clamp{}; + + template + struct min_max_result + { + [[no_unique_address]] _Tp min; + [[no_unique_address]] _Tp max; + + template + requires convertible_to + constexpr + operator min_max_result<_Tp2>() const & + { return {min, max}; } + + template + requires convertible_to<_Tp, _Tp2> + constexpr + operator min_max_result<_Tp2>() && + { return {std::move(min), std::move(max)}; } + }; + + template + using minmax_result = min_max_result<_Tp>; + + struct __minmax_fn + { + template> + _Comp = ranges::less> + constexpr minmax_result + operator()(const _Tp& __a, const _Tp& __b, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (std::__invoke(std::move(__comp), + std::__invoke(__proj, __b), + std::__invoke(__proj, __a))) + return {__b, __a}; + else + return {__a, __b}; + } + + template, _Proj>> + _Comp = ranges::less> + requires indirectly_copyable_storable, range_value_t<_Range>*> + constexpr minmax_result> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __first = ranges::begin(__r); + auto __last = ranges::end(__r); + do { if (__builtin_is_constant_evaluated() && !bool(__first != __last)) __builtin_unreachable(); } while (false); + auto __comp_proj = __detail::__make_comp_proj(__comp, __proj); + minmax_result> __result = {*__first, *__first}; + if (++__first == __last) + return __result; + else + { + + + auto&& __val = *__first; + if (__comp_proj(__val, __result.min)) + __result.min = std::forward(__val); + else + __result.max = std::forward(__val); + } + while (++__first != __last) + { + + + + range_value_t<_Range> __val1 = *__first; + if (++__first == __last) + { + + + + if (__comp_proj(__val1, __result.min)) + __result.min = std::move(__val1); + else if (!__comp_proj(__val1, __result.max)) + __result.max = std::move(__val1); + break; + } + auto&& __val2 = *__first; + if (!__comp_proj(__val2, __val1)) + { + if (__comp_proj(__val1, __result.min)) + __result.min = std::move(__val1); + if (!__comp_proj(__val2, __result.max)) + __result.max = std::forward(__val2); + } + else + { + if (__comp_proj(__val2, __result.min)) + __result.min = std::forward(__val2); + if (!__comp_proj(__val1, __result.max)) + __result.max = std::move(__val1); + } + } + return __result; + } + + template> + _Comp = ranges::less> + constexpr minmax_result<_Tp> + operator()(initializer_list<_Tp> __r, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::subrange(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __minmax_fn minmax{}; + + struct __min_element_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return __first; + + auto __i = __first; + while (++__i != __last) + { + if (std::__invoke(__comp, + std::__invoke(__proj, *__i), + std::__invoke(__proj, *__first))) + __first = __i; + } + return __first; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __min_element_fn min_element{}; + + struct __max_element_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return __first; + + auto __i = __first; + while (++__i != __last) + { + if (std::__invoke(__comp, + std::__invoke(__proj, *__first), + std::__invoke(__proj, *__i))) + __first = __i; + } + return __first; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __max_element_fn max_element{}; + + template + using minmax_element_result = min_max_result<_Iter>; + + struct __minmax_element_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr minmax_element_result<_Iter> + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __comp_proj = __detail::__make_comp_proj(__comp, __proj); + minmax_element_result<_Iter> __result = {__first, __first}; + if (__first == __last || ++__first == __last) + return __result; + else + { + + + if (__comp_proj(*__first, *__result.min)) + __result.min = __first; + else + __result.max = __first; + } + while (++__first != __last) + { + + + + auto __prev = __first; + if (++__first == __last) + { + + + + if (__comp_proj(*__prev, *__result.min)) + __result.min = __prev; + else if (!__comp_proj(*__prev, *__result.max)) + __result.max = __prev; + break; + } + if (!__comp_proj(*__first, *__prev)) + { + if (__comp_proj(*__prev, *__result.min)) + __result.min = __prev; + if (!__comp_proj(*__first, *__result.max)) + __result.max = __first; + } + else + { + if (__comp_proj(*__first, *__result.min)) + __result.min = __first; + if (!__comp_proj(*__prev, *__result.max)) + __result.max = __prev; + } + } + return __result; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr minmax_element_result> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __minmax_element_fn minmax_element{}; + + struct __lexicographical_compare_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Proj1 = identity, typename _Proj2 = identity, + indirect_strict_weak_order, + projected<_Iter2, _Proj2>> + _Comp = ranges::less> + constexpr bool + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + if constexpr (__detail::__is_normal_iterator<_Iter1> + && same_as<_Iter1, _Sent1>) + return (*this)(__first1.base(), __last1.base(), + std::move(__first2), std::move(__last2), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + else if constexpr (__detail::__is_normal_iterator<_Iter2> + && same_as<_Iter2, _Sent2>) + return (*this)(std::move(__first1), std::move(__last1), + __first2.base(), __last2.base(), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + else + { + constexpr bool __sized_iters + = (sized_sentinel_for<_Sent1, _Iter1> + && sized_sentinel_for<_Sent2, _Iter2>); + if constexpr (__sized_iters) + { + using _ValueType1 = iter_value_t<_Iter1>; + using _ValueType2 = iter_value_t<_Iter2>; + + + constexpr bool __use_memcmp + = (__is_memcmp_ordered_with<_ValueType1, _ValueType2>::__value + && __ptr_to_nonvolatile<_Iter1> + && __ptr_to_nonvolatile<_Iter2> + && (is_same_v<_Comp, ranges::less> + || is_same_v<_Comp, ranges::greater>) + && is_same_v<_Proj1, identity> + && is_same_v<_Proj2, identity>); + if constexpr (__use_memcmp) + { + const auto __d1 = __last1 - __first1; + const auto __d2 = __last2 - __first2; + + if (const auto __len = std::min(__d1, __d2)) + { + const auto __c + = std::__memcmp(__first1, __first2, __len); + if constexpr (is_same_v<_Comp, ranges::less>) + { + if (__c < 0) + return true; + if (__c > 0) + return false; + } + else if constexpr (is_same_v<_Comp, ranges::greater>) + { + if (__c > 0) + return true; + if (__c < 0) + return false; + } + } + return __d1 < __d2; + } + } + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void) ++__first2) + { + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + return true; + if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + } + + template, _Proj1>, + projected, _Proj2>> + _Comp = ranges::less> + constexpr bool + operator()(_Range1&& __r1, _Range2&& __r2, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + + private: + template> + static constexpr bool __ptr_to_nonvolatile + = is_pointer_v<_Iter> && !is_volatile_v>; + }; + + inline constexpr __lexicographical_compare_fn lexicographical_compare; + + template + struct in_found_result + { + [[no_unique_address]] _Iter in; + bool found; + + template + requires convertible_to + constexpr + operator in_found_result<_Iter2>() const & + { return {in, found}; } + + template + requires convertible_to<_Iter, _Iter2> + constexpr + operator in_found_result<_Iter2>() && + { return {std::move(in), found}; } + }; + + template + using next_permutation_result = in_found_result<_Iter>; + + struct __next_permutation_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr next_permutation_result<_Iter> + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return {std::move(__first), false}; + + auto __i = __first; + ++__i; + if (__i == __last) + return {std::move(__i), false}; + + auto __lasti = ranges::next(__first, __last); + __i = __lasti; + --__i; + + for (;;) + { + auto __ii = __i; + --__i; + if (std::__invoke(__comp, + std::__invoke(__proj, *__i), + std::__invoke(__proj, *__ii))) + { + auto __j = __lasti; + while (!(bool)std::__invoke(__comp, + std::__invoke(__proj, *__i), + std::__invoke(__proj, *--__j))) + ; + ranges::iter_swap(__i, __j); + ranges::reverse(__ii, __last); + return {std::move(__lasti), true}; + } + if (__i == __first) + { + ranges::reverse(__first, __last); + return {std::move(__lasti), false}; + } + } + } + + template + requires sortable, _Comp, _Proj> + constexpr next_permutation_result> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __next_permutation_fn next_permutation{}; + + template + using prev_permutation_result = in_found_result<_Iter>; + + struct __prev_permutation_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr prev_permutation_result<_Iter> + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return {std::move(__first), false}; + + auto __i = __first; + ++__i; + if (__i == __last) + return {std::move(__i), false}; + + auto __lasti = ranges::next(__first, __last); + __i = __lasti; + --__i; + + for (;;) + { + auto __ii = __i; + --__i; + if (std::__invoke(__comp, + std::__invoke(__proj, *__ii), + std::__invoke(__proj, *__i))) + { + auto __j = __lasti; + while (!(bool)std::__invoke(__comp, + std::__invoke(__proj, *--__j), + std::__invoke(__proj, *__i))) + ; + ranges::iter_swap(__i, __j); + ranges::reverse(__ii, __last); + return {std::move(__lasti), true}; + } + if (__i == __first) + { + ranges::reverse(__first, __last); + return {std::move(__lasti), false}; + } + } + } + + template + requires sortable, _Comp, _Proj> + constexpr prev_permutation_result> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __prev_permutation_fn prev_permutation{}; + +} + + + template + constexpr _ForwardIterator + shift_left(_ForwardIterator __first, _ForwardIterator __last, + typename iterator_traits<_ForwardIterator>::difference_type __n) + { + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + if (__n == 0) + return __last; + + auto __mid = ranges::next(__first, __n, __last); + if (__mid == __last) + return __first; + return std::move(std::move(__mid), std::move(__last), std::move(__first)); + } + + template + constexpr _ForwardIterator + shift_right(_ForwardIterator __first, _ForwardIterator __last, + typename iterator_traits<_ForwardIterator>::difference_type __n) + { + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + if (__n == 0) + return __first; + + using _Cat + = typename iterator_traits<_ForwardIterator>::iterator_category; + if constexpr (derived_from<_Cat, bidirectional_iterator_tag>) + { + auto __mid = ranges::next(__last, -__n, __first); + if (__mid == __first) + return __last; + + return std::move_backward(std::move(__first), std::move(__mid), + std::move(__last)); + } + else + { + auto __result = ranges::next(__first, __n, __last); + if (__result == __last) + return __last; + + auto __dest_head = __first, __dest_tail = __result; + while (__dest_head != __result) + { + if (__dest_tail == __last) + { + + + + + + std::move(std::move(__first), std::move(__dest_head), __result); + return __result; + } + ++__dest_head; + ++__dest_tail; + } + + for (;;) + { +# 3835 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 3 + auto __cursor = __first; + while (__cursor != __result) + { + if (__dest_tail == __last) + { + + + + __dest_head = std::move(__cursor, __result, + std::move(__dest_head)); + std::move(std::move(__first), std::move(__cursor), + std::move(__dest_head)); + return __result; + } + std::iter_swap(__cursor, __dest_head); + ++__dest_head; + ++__dest_tail; + ++__cursor; + } + } + } + } + + +} +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 2 3 +# 74 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/glue_algorithm_defs.h" 1 3 +# 13 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/glue_algorithm_defs.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 1 3 +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 +namespace std +{ + + + template + struct __array_traits + { + typedef _Tp _Type[_Nm]; + typedef __is_swappable<_Tp> _Is_swappable; + typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; + + static constexpr _Tp& + _S_ref(const _Type& __t, std::size_t __n) noexcept + { return const_cast<_Tp&>(__t[__n]); } + + static constexpr _Tp* + _S_ptr(const _Type& __t) noexcept + { return const_cast<_Tp*>(__t); } + }; + + template + struct __array_traits<_Tp, 0> + { + struct _Type { }; + typedef true_type _Is_swappable; + typedef true_type _Is_nothrow_swappable; + + static constexpr _Tp& + _S_ref(const _Type&, std::size_t) noexcept + { return *static_cast<_Tp*>(nullptr); } + + static constexpr _Tp* + _S_ptr(const _Type&) noexcept + { return nullptr; } + }; +# 94 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 + template + struct array + { + typedef _Tp value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* iterator; + typedef const value_type* const_iterator; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + + typedef __array_traits<_Tp, _Nm> _AT_Type; + typename _AT_Type::_Type _M_elems; + + + + + constexpr void + fill(const value_type& __u) + { std::fill_n(begin(), size(), __u); } + + constexpr void + swap(array& __other) + noexcept(_AT_Type::_Is_nothrow_swappable::value) + { std::swap_ranges(begin(), end(), __other.begin()); } + + + constexpr iterator + begin() noexcept + { return iterator(data()); } + + constexpr const_iterator + begin() const noexcept + { return const_iterator(data()); } + + constexpr iterator + end() noexcept + { return iterator(data() + _Nm); } + + constexpr const_iterator + end() const noexcept + { return const_iterator(data() + _Nm); } + + constexpr reverse_iterator + rbegin() noexcept + { return reverse_iterator(end()); } + + constexpr const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(end()); } + + constexpr reverse_iterator + rend() noexcept + { return reverse_iterator(begin()); } + + constexpr const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(begin()); } + + constexpr const_iterator + cbegin() const noexcept + { return const_iterator(data()); } + + constexpr const_iterator + cend() const noexcept + { return const_iterator(data() + _Nm); } + + constexpr const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(end()); } + + constexpr const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(begin()); } + + + constexpr size_type + size() const noexcept { return _Nm; } + + constexpr size_type + max_size() const noexcept { return _Nm; } + + [[__nodiscard__]] constexpr bool + empty() const noexcept { return size() == 0; } + + + constexpr reference + operator[](size_type __n) noexcept + { + ; + return _AT_Type::_S_ref(_M_elems, __n); + } + + constexpr const_reference + operator[](size_type __n) const noexcept + { + + ; + + return _AT_Type::_S_ref(_M_elems, __n); + } + + constexpr reference + at(size_type __n) + { + if (__n >= _Nm) + std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") + , + __n, _Nm); + return _AT_Type::_S_ref(_M_elems, __n); + } + + constexpr const_reference + at(size_type __n) const + { + + + return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) + : (std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") + , + __n, _Nm), + _AT_Type::_S_ref(_M_elems, 0)); + } + + constexpr reference + front() noexcept + { + ; + return *begin(); + } + + constexpr const_reference + front() const noexcept + { + + ; + + return _AT_Type::_S_ref(_M_elems, 0); + } + + constexpr reference + back() noexcept + { + ; + return _Nm ? *(end() - 1) : *end(); + } + + constexpr const_reference + back() const noexcept + { + + ; + + return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) + : _AT_Type::_S_ref(_M_elems, 0); + } + + constexpr pointer + data() noexcept + { return _AT_Type::_S_ptr(_M_elems); } + + constexpr const_pointer + data() const noexcept + { return _AT_Type::_S_ptr(_M_elems); } + }; + + + template + array(_Tp, _Up...) + -> array && ...), _Tp>, + 1 + sizeof...(_Up)>; + + + + template + constexpr + inline bool + operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) + { return std::equal(__one.begin(), __one.end(), __two.begin()); } + + + template + constexpr __detail::__synth3way_t<_Tp> + operator<=>(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) + { + + if constexpr (_Nm && __is_memcmp_ordered<_Tp>::__value) + if (!std::is_constant_evaluated()) + { + constexpr size_t __n = _Nm * sizeof(_Tp); + return __builtin_memcmp(__a.data(), __b.data(), __n) <=> 0; + } + + + for (size_t __i = 0; __i < _Nm; ++__i) + { + auto __c = __detail::__synth3way(__a[__i], __b[__i]); + if (__c != 0) + return __c; + } + return strong_ordering::equal; + } +# 337 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 + template + constexpr + inline + + + typename enable_if< + __array_traits<_Tp, _Nm>::_Is_swappable::value + >::type + + + + swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) + noexcept(noexcept(__one.swap(__two))) + { __one.swap(__two); } + + + template + typename enable_if< + !__array_traits<_Tp, _Nm>::_Is_swappable::value>::type + swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; + + + template + constexpr _Tp& + get(array<_Tp, _Nm>& __arr) noexcept + { + static_assert(_Int < _Nm, "array index is within bounds"); + return __array_traits<_Tp, _Nm>::_S_ref(__arr._M_elems, _Int); + } + + template + constexpr _Tp&& + get(array<_Tp, _Nm>&& __arr) noexcept + { + static_assert(_Int < _Nm, "array index is within bounds"); + return std::move(std::get<_Int>(__arr)); + } + + template + constexpr const _Tp& + get(const array<_Tp, _Nm>& __arr) noexcept + { + static_assert(_Int < _Nm, "array index is within bounds"); + return __array_traits<_Tp, _Nm>::_S_ref(__arr._M_elems, _Int); + } + + template + constexpr const _Tp&& + get(const array<_Tp, _Nm>&& __arr) noexcept + { + static_assert(_Int < _Nm, "array index is within bounds"); + return std::move(std::get<_Int>(__arr)); + } + + + + + template + constexpr array, sizeof...(_Idx)> + __to_array(_Tp (&__a)[sizeof...(_Idx)], index_sequence<_Idx...>) + { + if constexpr (_Move) + return {{std::move(__a[_Idx])...}}; + else + return {{__a[_Idx]...}}; + } + + template + constexpr array, _Nm> + to_array(_Tp (&__a)[_Nm]) + noexcept(is_nothrow_constructible_v<_Tp, _Tp&>) + { + static_assert(!is_array_v<_Tp>); + static_assert(is_constructible_v<_Tp, _Tp&>); + if constexpr (is_constructible_v<_Tp, _Tp&>) + return __to_array(__a, make_index_sequence<_Nm>{}); + __builtin_unreachable(); + } + + template + constexpr array, _Nm> + to_array(_Tp (&&__a)[_Nm]) + noexcept(is_nothrow_move_constructible_v<_Tp>) + { + static_assert(!is_array_v<_Tp>); + static_assert(is_move_constructible_v<_Tp>); + if constexpr (is_move_constructible_v<_Tp>) + return __to_array<1>(__a, make_index_sequence<_Nm>{}); + __builtin_unreachable(); + } + + + + + + template + struct tuple_size; + + + template + struct tuple_size> + : public integral_constant { }; + + + template + struct tuple_element; + + + template + struct tuple_element<_Int, array<_Tp, _Nm>> + { + static_assert(_Int < _Nm, "index is out of bounds"); + typedef _Tp type; + }; + + template + struct __is_tuple_like_impl> : true_type + { }; + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uses_allocator.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uses_allocator.h" 3 +namespace std +{ + + + + struct __erased_type { }; + + + + + template + using __is_erased_or_convertible + = __or_, is_same<_Tp, __erased_type>>; + + + struct allocator_arg_t { explicit allocator_arg_t() = default; }; + + inline constexpr allocator_arg_t allocator_arg = + allocator_arg_t(); + + template> + struct __uses_allocator_helper + : false_type { }; + + template + struct __uses_allocator_helper<_Tp, _Alloc, + __void_t> + : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type + { }; + + + template + struct uses_allocator + : __uses_allocator_helper<_Tp, _Alloc>::type + { }; + + struct __uses_alloc_base { }; + + struct __uses_alloc0 : __uses_alloc_base + { + struct _Sink { void constexpr operator=(const void*) { } } _M_a; + }; + + template + struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; + + template + struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; + + template + struct __uses_alloc; + + template + struct __uses_alloc + : conditional< + is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value, + __uses_alloc1<_Alloc>, + __uses_alloc2<_Alloc>>::type + { + + + static_assert(__or_< + is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>, + is_constructible<_Tp, _Args..., const _Alloc&>>::value, + "construction with an allocator must be possible" + " if uses_allocator is true"); + }; + + template + struct __uses_alloc + : __uses_alloc0 { }; + + template + using __uses_alloc_t = + __uses_alloc::value, _Tp, _Alloc, _Args...>; + + template + constexpr + inline __uses_alloc_t<_Tp, _Alloc, _Args...> + __use_alloc(const _Alloc& __a) + { + __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; + __ret._M_a = std::__addressof(__a); + return __ret; + } + + template + void + __use_alloc(const _Alloc&&) = delete; + + + template + inline constexpr bool uses_allocator_v = + uses_allocator<_Tp, _Alloc>::value; + + + template class _Predicate, + typename _Tp, typename _Alloc, typename... _Args> + struct __is_uses_allocator_predicate + : conditional::value, + __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, + _Predicate<_Tp, _Args..., _Alloc>>, + _Predicate<_Tp, _Args...>>::type { }; + + template + struct __is_uses_allocator_constructible + : __is_uses_allocator_predicate + { }; + + + template + inline constexpr bool __is_uses_allocator_constructible_v = + __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; + + + template + struct __is_nothrow_uses_allocator_constructible + : __is_uses_allocator_predicate + { }; + + + + template + inline constexpr bool + __is_nothrow_uses_allocator_constructible_v = + __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; + + + template + void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, + _Args&&... __args) + { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } + + template + void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, + _Args&&... __args) + { + ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, + std::forward<_Args>(__args)...); + } + + template + void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, + _Args&&... __args) + { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } + + template + void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, + _Args&&... __args) + { + std::__uses_allocator_construct_impl( + std::__use_alloc<_Tp, _Alloc, _Args...>(__a), __ptr, + std::forward<_Args>(__args)...); + } + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 2 3 + + + + + + +namespace std +{ + + + + + + + + template + class tuple; + + template + struct __is_empty_non_tuple : is_empty<_Tp> { }; + + + template + struct __is_empty_non_tuple> : false_type { }; + + + template + using __empty_not_final + = typename conditional<__is_final(_Tp), false_type, + __is_empty_non_tuple<_Tp>>::type; + + template::value> + struct _Head_base; + + + template + struct _Head_base<_Idx, _Head, true> + { + constexpr _Head_base() + : _M_head_impl() { } + + constexpr _Head_base(const _Head& __h) + : _M_head_impl(__h) { } + + constexpr _Head_base(const _Head_base&) = default; + constexpr _Head_base(_Head_base&&) = default; + + template + constexpr _Head_base(_UHead&& __h) + : _M_head_impl(std::forward<_UHead>(__h)) { } + + constexpr + _Head_base(allocator_arg_t, __uses_alloc0) + : _M_head_impl() { } + + template + _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) + : _M_head_impl(allocator_arg, *__a._M_a) { } + + template + _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) + : _M_head_impl(*__a._M_a) { } + + template + constexpr + _Head_base(__uses_alloc0, _UHead&& __uhead) + : _M_head_impl(std::forward<_UHead>(__uhead)) { } + + template + _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) + : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) + { } + + template + _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) + : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } + + static constexpr _Head& + _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } + + static constexpr const _Head& + _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } + + [[__no_unique_address__]] _Head _M_head_impl; + }; +# 176 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + struct _Head_base<_Idx, _Head, false> + { + constexpr _Head_base() + : _M_head_impl() { } + + constexpr _Head_base(const _Head& __h) + : _M_head_impl(__h) { } + + constexpr _Head_base(const _Head_base&) = default; + constexpr _Head_base(_Head_base&&) = default; + + template + constexpr _Head_base(_UHead&& __h) + : _M_head_impl(std::forward<_UHead>(__h)) { } + + constexpr + _Head_base(allocator_arg_t, __uses_alloc0) + : _M_head_impl() { } + + template + _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) + : _M_head_impl(allocator_arg, *__a._M_a) { } + + template + _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) + : _M_head_impl(*__a._M_a) { } + + template + constexpr + _Head_base(__uses_alloc0, _UHead&& __uhead) + : _M_head_impl(std::forward<_UHead>(__uhead)) { } + + template + _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) + : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) + { } + + template + _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) + : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } + + static constexpr _Head& + _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } + + static constexpr const _Head& + _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } + + _Head _M_head_impl; + }; +# 235 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + struct _Tuple_impl; + + + + + + + template + struct _Tuple_impl<_Idx, _Head, _Tail...> + : public _Tuple_impl<_Idx + 1, _Tail...>, + private _Head_base<_Idx, _Head> + { + template friend struct _Tuple_impl; + + typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; + typedef _Head_base<_Idx, _Head> _Base; + + static constexpr _Head& + _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } + + static constexpr const _Head& + _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } + + static constexpr _Inherited& + _M_tail(_Tuple_impl& __t) noexcept { return __t; } + + static constexpr const _Inherited& + _M_tail(const _Tuple_impl& __t) noexcept { return __t; } + + constexpr _Tuple_impl() + : _Inherited(), _Base() { } + + explicit constexpr + _Tuple_impl(const _Head& __head, const _Tail&... __tail) + : _Inherited(__tail...), _Base(__head) + { } + + template> + explicit constexpr + _Tuple_impl(_UHead&& __head, _UTail&&... __tail) + : _Inherited(std::forward<_UTail>(__tail)...), + _Base(std::forward<_UHead>(__head)) + { } + + constexpr _Tuple_impl(const _Tuple_impl&) = default; + + + + _Tuple_impl& operator=(const _Tuple_impl&) = delete; + + constexpr + _Tuple_impl(_Tuple_impl&& __in) + noexcept(__and_, + is_nothrow_move_constructible<_Inherited>>::value) + : _Inherited(std::move(_M_tail(__in))), + _Base(std::forward<_Head>(_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) + : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), + _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) + { } + + template + constexpr + _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + : _Inherited(std::move + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), + _Base(std::forward<_UHead> + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) + : _Inherited(__tag, __a), + _Base(__tag, __use_alloc<_Head>(__a)) + { } + + template + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Head& __head, const _Tail&... __tail) + : _Inherited(__tag, __a, __tail...), + _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) + { } + + template> + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _UHead&& __head, _UTail&&... __tail) + : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), + _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead>(__head)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl& __in) + : _Inherited(__tag, __a, _M_tail(__in)), + _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _Tuple_impl&& __in) + : _Inherited(__tag, __a, std::move(_M_tail(__in))), + _Base(__use_alloc<_Head, _Alloc, _Head>(__a), + std::forward<_Head>(_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl<_Idx, _UHead, _UTails...>& __in) + : _Inherited(__tag, __a, + _Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)), + _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), + _Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + : _Inherited(__tag, __a, std::move + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), + _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead> + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) + { } + + template + constexpr + void + _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) + { + _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); + _M_tail(*this)._M_assign( + _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)); + } + + template + constexpr + void + _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + { + _M_head(*this) = std::forward<_UHead> + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); + _M_tail(*this)._M_assign( + std::move(_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))); + } + + protected: + constexpr + void + _M_swap(_Tuple_impl& __in) + { + using std::swap; + swap(_M_head(*this), _M_head(__in)); + _Inherited::_M_swap(_M_tail(__in)); + } + }; + + + template + struct _Tuple_impl<_Idx, _Head> + : private _Head_base<_Idx, _Head> + { + template friend struct _Tuple_impl; + + typedef _Head_base<_Idx, _Head> _Base; + + static constexpr _Head& + _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } + + static constexpr const _Head& + _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } + + constexpr + _Tuple_impl() + : _Base() { } + + explicit constexpr + _Tuple_impl(const _Head& __head) + : _Base(__head) + { } + + template + explicit constexpr + _Tuple_impl(_UHead&& __head) + : _Base(std::forward<_UHead>(__head)) + { } + + constexpr _Tuple_impl(const _Tuple_impl&) = default; + + + + _Tuple_impl& operator=(const _Tuple_impl&) = delete; + + constexpr + _Tuple_impl(_Tuple_impl&& __in) + noexcept(is_nothrow_move_constructible<_Head>::value) + : _Base(std::forward<_Head>(_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) + : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) + { } + + template + constexpr + _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) + : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) + : _Base(__tag, __use_alloc<_Head>(__a)) + { } + + template + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Head& __head) + : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), __head) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _UHead&& __head) + : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead>(__head)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl& __in) + : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), _M_head(__in)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _Tuple_impl&& __in) + : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), + std::forward<_Head>(_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl<_Idx, _UHead>& __in) + : _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), + _Tuple_impl<_Idx, _UHead>::_M_head(__in)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _Tuple_impl<_Idx, _UHead>&& __in) + : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) + { } + + template + constexpr + void + _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) + { + _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); + } + + template + constexpr + void + _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) + { + _M_head(*this) + = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); + } + + protected: + constexpr + void + _M_swap(_Tuple_impl& __in) + { + using std::swap; + swap(_M_head(*this), _M_head(__in)); + } + }; + + + + template + struct _TupleConstraints + { + template + using is_constructible + = __bool_constant<__is_constructible(_Tp, _Up)>; + + + + + template + static constexpr bool __is_implicitly_constructible() + { + return __and_..., + is_convertible<_UTypes, _Types>... + >::value; + } + + + + + template + static constexpr bool __is_explicitly_constructible() + { + return __and_..., + __not_<__and_...>> + >::value; + } + + static constexpr bool __is_implicitly_default_constructible() + { + return __and_... + >::value; + } + + static constexpr bool __is_explicitly_default_constructible() + { + return __and_..., + __not_<__and_< + std::__is_implicitly_default_constructible<_Types>...> + >>::value; + } + }; + + + + template + struct _TupleConstraints + { + template + static constexpr bool __is_implicitly_constructible() + { return false; } + + template + static constexpr bool __is_explicitly_constructible() + { return false; } + }; + + + template + class tuple : public _Tuple_impl<0, _Elements...> + { + typedef _Tuple_impl<0, _Elements...> _Inherited; + + template + using _TCC = _TupleConstraints<_Cond, _Elements...>; + + + template + using _ImplicitDefaultCtor = __enable_if_t< + _TCC<_Dummy>::__is_implicitly_default_constructible(), + bool>; + + + template + using _ExplicitDefaultCtor = __enable_if_t< + _TCC<_Dummy>::__is_explicitly_default_constructible(), + bool>; + + + template + using _ImplicitCtor = __enable_if_t< + _TCC<_Cond>::template __is_implicitly_constructible<_Args...>(), + bool>; + + + template + using _ExplicitCtor = __enable_if_t< + _TCC<_Cond>::template __is_explicitly_constructible<_Args...>(), + bool>; + + template + static constexpr + __enable_if_t + __assignable() + { return __and_...>::value; } + + + template + static constexpr bool __nothrow_assignable() + { + return + __and_...>::value; + } + + + template + static constexpr bool __nothrow_constructible() + { + return + __and_...>::value; + } + + + template + static constexpr bool __valid_args() + { + return sizeof...(_Elements) == 1 + && !is_same>::value; + } + + + template + static constexpr bool __valid_args() + { return (sizeof...(_Tail) + 2) == sizeof...(_Elements); } +# 674 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template> + struct _UseOtherCtor + : false_type + { }; + + + template + struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Up>> + : __or_, is_constructible<_Tp, _Tuple>> + { }; + + + template + struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Tp>> + : true_type + { }; + + + + + template + static constexpr bool __use_other_ctor() + { return _UseOtherCtor<_Tuple>::value; } + + public: + template::value> = true> + constexpr + tuple() + noexcept(__and_...>::value) + : _Inherited() { } + + template::value> = false> + explicit constexpr + tuple() + noexcept(__and_...>::value) + : _Inherited() { } + + template= 1), + _ImplicitCtor<_NotEmpty, const _Elements&...> = true> + constexpr + tuple(const _Elements&... __elements) + noexcept(__nothrow_constructible()) + : _Inherited(__elements...) { } + + template= 1), + _ExplicitCtor<_NotEmpty, const _Elements&...> = false> + explicit constexpr + tuple(const _Elements&... __elements) + noexcept(__nothrow_constructible()) + : _Inherited(__elements...) { } + + template(), + _ImplicitCtor<_Valid, _UElements...> = true> + constexpr + tuple(_UElements&&... __elements) + noexcept(__nothrow_constructible<_UElements...>()) + : _Inherited(std::forward<_UElements>(__elements)...) { } + + template(), + _ExplicitCtor<_Valid, _UElements...> = false> + explicit constexpr + tuple(_UElements&&... __elements) + noexcept(__nothrow_constructible<_UElements...>()) + : _Inherited(std::forward<_UElements>(__elements)...) { } + + constexpr tuple(const tuple&) = default; + + constexpr tuple(tuple&&) = default; + + template&>(), + _ImplicitCtor<_Valid, const _UElements&...> = true> + constexpr + tuple(const tuple<_UElements...>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(static_cast&>(__in)) + { } + + template&>(), + _ExplicitCtor<_Valid, const _UElements&...> = false> + explicit constexpr + tuple(const tuple<_UElements...>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(static_cast&>(__in)) + { } + + template&&>(), + _ImplicitCtor<_Valid, _UElements...> = true> + constexpr + tuple(tuple<_UElements...>&& __in) + noexcept(__nothrow_constructible<_UElements...>()) + : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } + + template&&>(), + _ExplicitCtor<_Valid, _UElements...> = false> + explicit constexpr + tuple(tuple<_UElements...>&& __in) + noexcept(__nothrow_constructible<_UElements...>()) + : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } + + + + template::value> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a) + : _Inherited(__tag, __a) { } + + template= 1), + _ImplicitCtor<_NotEmpty, const _Elements&...> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const _Elements&... __elements) + : _Inherited(__tag, __a, __elements...) { } + + template= 1), + _ExplicitCtor<_NotEmpty, const _Elements&...> = false> + constexpr + explicit + tuple(allocator_arg_t __tag, const _Alloc& __a, + const _Elements&... __elements) + : _Inherited(__tag, __a, __elements...) { } + + template(), + _ImplicitCtor<_Valid, _UElements...> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + _UElements&&... __elements) + : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) + { } + + template(), + _ExplicitCtor<_Valid, _UElements...> = false> + constexpr + explicit + tuple(allocator_arg_t __tag, const _Alloc& __a, + _UElements&&... __elements) + : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) + { } + + template + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) + : _Inherited(__tag, __a, static_cast(__in)) { } + + template + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) + : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } + + template&>(), + _ImplicitCtor<_Valid, const _UElements&...> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_UElements...>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template&>(), + _ExplicitCtor<_Valid, const _UElements&...> = false> + constexpr + explicit + tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_UElements...>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template&&>(), + _ImplicitCtor<_Valid, _UElements...> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + tuple<_UElements...>&& __in) + : _Inherited(__tag, __a, + static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) + { } + + template&&>(), + _ExplicitCtor<_Valid, _UElements...> = false> + constexpr + explicit + tuple(allocator_arg_t __tag, const _Alloc& __a, + tuple<_UElements...>&& __in) + : _Inherited(__tag, __a, + static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) + { } + + + + constexpr + tuple& + operator=(typename conditional<__assignable(), + const tuple&, + const __nonesuch&>::type __in) + noexcept(__nothrow_assignable()) + { + this->_M_assign(__in); + return *this; + } + + constexpr + tuple& + operator=(typename conditional<__assignable<_Elements...>(), + tuple&&, + __nonesuch&&>::type __in) + noexcept(__nothrow_assignable<_Elements...>()) + { + this->_M_assign(std::move(__in)); + return *this; + } + + template + constexpr + __enable_if_t<__assignable(), tuple&> + operator=(const tuple<_UElements...>& __in) + noexcept(__nothrow_assignable()) + { + this->_M_assign(__in); + return *this; + } + + template + constexpr + __enable_if_t<__assignable<_UElements...>(), tuple&> + operator=(tuple<_UElements...>&& __in) + noexcept(__nothrow_assignable<_UElements...>()) + { + this->_M_assign(std::move(__in)); + return *this; + } + + + constexpr + void + swap(tuple& __in) + noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value) + { _Inherited::_M_swap(__in); } + }; + + + template + tuple(_UTypes...) -> tuple<_UTypes...>; + template + tuple(pair<_T1, _T2>) -> tuple<_T1, _T2>; + template + tuple(allocator_arg_t, _Alloc, _UTypes...) -> tuple<_UTypes...>; + template + tuple(allocator_arg_t, _Alloc, pair<_T1, _T2>) -> tuple<_T1, _T2>; + template + tuple(allocator_arg_t, _Alloc, tuple<_UTypes...>) -> tuple<_UTypes...>; + + + + template<> + class tuple<> + { + public: + void swap(tuple&) noexcept { } + + + tuple() = default; + + template + constexpr + tuple(allocator_arg_t, const _Alloc&) noexcept { } + template + constexpr + tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept { } + }; + + + + template + class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> + { + typedef _Tuple_impl<0, _T1, _T2> _Inherited; + + + template + using _ImplicitDefaultCtor = __enable_if_t< + _TupleConstraints<_Dummy, _U1, _U2>:: + __is_implicitly_default_constructible(), + bool>; + + + template + using _ExplicitDefaultCtor = __enable_if_t< + _TupleConstraints<_Dummy, _U1, _U2>:: + __is_explicitly_default_constructible(), + bool>; + + template + using _TCC = _TupleConstraints<_Dummy, _T1, _T2>; + + + template + using _ImplicitCtor = __enable_if_t< + _TCC<_Cond>::template __is_implicitly_constructible<_U1, _U2>(), + bool>; + + + template + using _ExplicitCtor = __enable_if_t< + _TCC<_Cond>::template __is_explicitly_constructible<_U1, _U2>(), + bool>; + + template + static constexpr bool __assignable() + { + return __and_, + is_assignable<_T2&, _U2>>::value; + } + + template + static constexpr bool __nothrow_assignable() + { + return __and_, + is_nothrow_assignable<_T2&, _U2>>::value; + } + + template + static constexpr bool __nothrow_constructible() + { + return __and_, + is_nothrow_constructible<_T2, _U2>>::value; + } + + static constexpr bool __nothrow_default_constructible() + { + return __and_, + is_nothrow_default_constructible<_T2>>::value; + } + + template + static constexpr bool __is_alloc_arg() + { return is_same<__remove_cvref_t<_U1>, allocator_arg_t>::value; } + + public: + template = true> + constexpr + tuple() + noexcept(__nothrow_default_constructible()) + : _Inherited() { } + + template = false> + explicit constexpr + tuple() + noexcept(__nothrow_default_constructible()) + : _Inherited() { } + + template = true> + constexpr + tuple(const _T1& __a1, const _T2& __a2) + noexcept(__nothrow_constructible()) + : _Inherited(__a1, __a2) { } + + template = false> + explicit constexpr + tuple(const _T1& __a1, const _T2& __a2) + noexcept(__nothrow_constructible()) + : _Inherited(__a1, __a2) { } + + template(), _U1, _U2> = true> + constexpr + tuple(_U1&& __a1, _U2&& __a2) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } + + template(), _U1, _U2> = false> + explicit constexpr + tuple(_U1&& __a1, _U2&& __a2) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } + + constexpr tuple(const tuple&) = default; + + constexpr tuple(tuple&&) = default; + + template = true> + constexpr + tuple(const tuple<_U1, _U2>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(static_cast&>(__in)) { } + + template = false> + explicit constexpr + tuple(const tuple<_U1, _U2>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(static_cast&>(__in)) { } + + template = true> + constexpr + tuple(tuple<_U1, _U2>&& __in) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } + + template = false> + explicit constexpr + tuple(tuple<_U1, _U2>&& __in) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } + + template = true> + constexpr + tuple(const pair<_U1, _U2>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(__in.first, __in.second) { } + + template = false> + explicit constexpr + tuple(const pair<_U1, _U2>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(__in.first, __in.second) { } + + template = true> + constexpr + tuple(pair<_U1, _U2>&& __in) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + + template = false> + explicit constexpr + tuple(pair<_U1, _U2>&& __in) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + + + + template::value, _T1, _T2> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a) + : _Inherited(__tag, __a) { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const _T1& __a1, const _T2& __a2) + : _Inherited(__tag, __a, __a1, __a2) { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const _T1& __a1, const _T2& __a2) + : _Inherited(__tag, __a, __a1, __a2) { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) + : _Inherited(__tag, __a, std::forward<_U1>(__a1), + std::forward<_U2>(__a2)) { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + _U1&& __a1, _U2&& __a2) + : _Inherited(__tag, __a, std::forward<_U1>(__a1), + std::forward<_U2>(__a2)) { } + + template + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) + : _Inherited(__tag, __a, static_cast(__in)) { } + + template + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) + : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_U1, _U2>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_U1, _U2>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) + : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) + { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) + : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) + { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const pair<_U1, _U2>& __in) + : _Inherited(__tag, __a, __in.first, __in.second) { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const pair<_U1, _U2>& __in) + : _Inherited(__tag, __a, __in.first, __in.second) { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) + : _Inherited(__tag, __a, std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) + : _Inherited(__tag, __a, std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + + + + constexpr + tuple& + operator=(typename conditional<__assignable(), + const tuple&, + const __nonesuch&>::type __in) + noexcept(__nothrow_assignable()) + { + this->_M_assign(__in); + return *this; + } + + constexpr + tuple& + operator=(typename conditional<__assignable<_T1, _T2>(), + tuple&&, + __nonesuch&&>::type __in) + noexcept(__nothrow_assignable<_T1, _T2>()) + { + this->_M_assign(std::move(__in)); + return *this; + } + + template + constexpr + __enable_if_t<__assignable(), tuple&> + operator=(const tuple<_U1, _U2>& __in) + noexcept(__nothrow_assignable()) + { + this->_M_assign(__in); + return *this; + } + + template + constexpr + __enable_if_t<__assignable<_U1, _U2>(), tuple&> + operator=(tuple<_U1, _U2>&& __in) + noexcept(__nothrow_assignable<_U1, _U2>()) + { + this->_M_assign(std::move(__in)); + return *this; + } + + template + constexpr + __enable_if_t<__assignable(), tuple&> + operator=(const pair<_U1, _U2>& __in) + noexcept(__nothrow_assignable()) + { + this->_M_head(*this) = __in.first; + this->_M_tail(*this)._M_head(*this) = __in.second; + return *this; + } + + template + constexpr + __enable_if_t<__assignable<_U1, _U2>(), tuple&> + operator=(pair<_U1, _U2>&& __in) + noexcept(__nothrow_assignable<_U1, _U2>()) + { + this->_M_head(*this) = std::forward<_U1>(__in.first); + this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); + return *this; + } + + constexpr + void + swap(tuple& __in) + noexcept(__and_<__is_nothrow_swappable<_T1>, + __is_nothrow_swappable<_T2>>::value) + { _Inherited::_M_swap(__in); } + }; + + + + template + struct tuple_size> + : public integral_constant { }; + + + template + inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; + + + + + + + template + struct tuple_element<__i, tuple<_Head, _Tail...> > + : tuple_element<__i - 1, tuple<_Tail...> > { }; + + + + + template + struct tuple_element<0, tuple<_Head, _Tail...> > + { + typedef _Head type; + }; + + + + + template + struct tuple_element<__i, tuple<>> + { + static_assert(__i < tuple_size>::value, + "tuple index must be in range"); + }; + + template + constexpr _Head& + __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept + { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } + + template + constexpr const _Head& + __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept + { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } + + + template + __enable_if_t<(__i >= sizeof...(_Types))> + __get_helper(const tuple<_Types...>&) = delete; + + + template + constexpr __tuple_element_t<__i, tuple<_Elements...>>& + get(tuple<_Elements...>& __t) noexcept + { return std::__get_helper<__i>(__t); } + + + template + constexpr const __tuple_element_t<__i, tuple<_Elements...>>& + get(const tuple<_Elements...>& __t) noexcept + { return std::__get_helper<__i>(__t); } + + + template + constexpr __tuple_element_t<__i, tuple<_Elements...>>&& + get(tuple<_Elements...>&& __t) noexcept + { + typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; + return std::forward<__element_type>(std::__get_helper<__i>(__t)); + } + + + template + constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& + get(const tuple<_Elements...>&& __t) noexcept + { + typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; + return std::forward(std::__get_helper<__i>(__t)); + } +# 1416 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + constexpr size_t + __find_uniq_type_in_pack() + { + constexpr size_t __sz = sizeof...(_Types); + constexpr bool __found[__sz] = { __is_same(_Tp, _Types) ... }; + size_t __n = __sz; + for (size_t __i = 0; __i < __sz; ++__i) + { + if (__found[__i]) + { + if (__n < __sz) + return __sz; + __n = __i; + } + } + return __n; + } + + + template + constexpr _Tp& + get(tuple<_Types...>& __t) noexcept + { + constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); + static_assert(__idx < sizeof...(_Types), + "the type T in std::get must occur exactly once in the tuple"); + return std::__get_helper<__idx>(__t); + } + + + template + constexpr _Tp&& + get(tuple<_Types...>&& __t) noexcept + { + constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); + static_assert(__idx < sizeof...(_Types), + "the type T in std::get must occur exactly once in the tuple"); + return std::forward<_Tp>(std::__get_helper<__idx>(__t)); + } + + + template + constexpr const _Tp& + get(const tuple<_Types...>& __t) noexcept + { + constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); + static_assert(__idx < sizeof...(_Types), + "the type T in std::get must occur exactly once in the tuple"); + return std::__get_helper<__idx>(__t); + } + + + + template + constexpr const _Tp&& + get(const tuple<_Types...>&& __t) noexcept + { + constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); + static_assert(__idx < sizeof...(_Types), + "the type T in std::get must occur exactly once in the tuple"); + return std::forward(std::__get_helper<__idx>(__t)); + } + + + + template + struct __tuple_compare + { + static constexpr bool + __eq(const _Tp& __t, const _Up& __u) + { + return bool(std::get<__i>(__t) == std::get<__i>(__u)) + && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); + } + + static constexpr bool + __less(const _Tp& __t, const _Up& __u) + { + return bool(std::get<__i>(__t) < std::get<__i>(__u)) + || (!bool(std::get<__i>(__u) < std::get<__i>(__t)) + && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u)); + } + }; + + template + struct __tuple_compare<_Tp, _Up, __size, __size> + { + static constexpr bool + __eq(const _Tp&, const _Up&) { return true; } + + static constexpr bool + __less(const _Tp&, const _Up&) { return false; } + }; + + template + constexpr bool + operator==(const tuple<_TElements...>& __t, + const tuple<_UElements...>& __u) + { + static_assert(sizeof...(_TElements) == sizeof...(_UElements), + "tuple objects can only be compared if they have equal sizes."); + using __compare = __tuple_compare, + tuple<_UElements...>, + 0, sizeof...(_TElements)>; + return __compare::__eq(__t, __u); + } + + + template + constexpr _Cat + __tuple_cmp(const _Tp&, const _Up&, index_sequence<>) + { return _Cat::equivalent; } + + template + constexpr _Cat + __tuple_cmp(const _Tp& __t, const _Up& __u, + index_sequence<_Idx0, _Idxs...>) + { + auto __c + = __detail::__synth3way(std::get<_Idx0>(__t), std::get<_Idx0>(__u)); + if (__c != 0) + return __c; + return std::__tuple_cmp<_Cat>(__t, __u, index_sequence<_Idxs...>()); + } + + template + constexpr + common_comparison_category_t<__detail::__synth3way_t<_Tps, _Ups>...> + operator<=>(const tuple<_Tps...>& __t, const tuple<_Ups...>& __u) + { + using _Cat + = common_comparison_category_t<__detail::__synth3way_t<_Tps, _Ups>...>; + return std::__tuple_cmp<_Cat>(__t, __u, index_sequence_for<_Tps...>()); + } +# 1592 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + constexpr tuple::__type...> + make_tuple(_Elements&&... __args) + { + typedef tuple::__type...> + __result_type; + return __result_type(std::forward<_Elements>(__args)...); + } + + + + + template + constexpr tuple<_Elements&&...> + forward_as_tuple(_Elements&&... __args) noexcept + { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } + + template + struct __make_tuple_impl; + + template + struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> + : __make_tuple_impl<_Idx + 1, + tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>, + _Tuple, _Nm> + { }; + + template + struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> + { + typedef tuple<_Tp...> __type; + }; + + template + struct __do_make_tuple + : __make_tuple_impl<0, tuple<>, _Tuple, tuple_size<_Tuple>::value> + { }; + + + template + struct __make_tuple + : public __do_make_tuple<__remove_cvref_t<_Tuple>> + { }; + + + template + struct __combine_tuples; + + template<> + struct __combine_tuples<> + { + typedef tuple<> __type; + }; + + template + struct __combine_tuples> + { + typedef tuple<_Ts...> __type; + }; + + template + struct __combine_tuples, tuple<_T2s...>, _Rem...> + { + typedef typename __combine_tuples, + _Rem...>::__type __type; + }; + + + template + struct __tuple_cat_result + { + typedef typename __combine_tuples + ::__type...>::__type __type; + }; + + + + template + struct __make_1st_indices; + + template<> + struct __make_1st_indices<> + { + typedef _Index_tuple<> __type; + }; + + template + struct __make_1st_indices<_Tp, _Tpls...> + { + typedef typename _Build_index_tuple::type>::value>::__type __type; + }; + + + + + template + struct __tuple_concater; + + template + struct __tuple_concater<_Ret, _Index_tuple<_Is...>, _Tp, _Tpls...> + { + template + static constexpr _Ret + _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) + { + typedef typename __make_1st_indices<_Tpls...>::__type __idx; + typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; + return __next::_S_do(std::forward<_Tpls>(__tps)..., + std::forward<_Us>(__us)..., + std::get<_Is>(std::forward<_Tp>(__tp))...); + } + }; + + template + struct __tuple_concater<_Ret, _Index_tuple<>> + { + template + static constexpr _Ret + _S_do(_Us&&... __us) + { + return _Ret(std::forward<_Us>(__us)...); + } + }; + + + template...>::value>::type> + constexpr auto + tuple_cat(_Tpls&&... __tpls) + -> typename __tuple_cat_result<_Tpls...>::__type + { + typedef typename __tuple_cat_result<_Tpls...>::__type __ret; + typedef typename __make_1st_indices<_Tpls...>::__type __idx; + typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; + return __concater::_S_do(std::forward<_Tpls>(__tpls)...); + } + + + + + template + constexpr tuple<_Elements&...> + tie(_Elements&... __args) noexcept + { return tuple<_Elements&...>(__args...); } + + + template + constexpr + inline + + + typename enable_if<__and_<__is_swappable<_Elements>...>::value + >::type + + + + swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + + template + constexpr + typename enable_if...>::value>::type + swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; + + + + + + + struct _Swallow_assign + { + template + constexpr const _Swallow_assign& + operator=(const _Tp&) const + { return *this; } + }; + + + + inline constexpr _Swallow_assign ignore{}; + + + template + struct uses_allocator, _Alloc> : true_type { }; +# 1789 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + template + constexpr + inline + pair<_T1, _T2>:: + pair(piecewise_construct_t, + tuple<_Args1...> __first, tuple<_Args2...> __second) + : pair(__first, __second, + typename _Build_index_tuple::__type(), + typename _Build_index_tuple::__type()) + { } + + template + template + constexpr inline + pair<_T1, _T2>:: + pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, + _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) + : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), + second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) + { } + + + + + + + + template class _Trait, typename _Tp, typename _Tuple> + inline constexpr bool __unpack_std_tuple = false; + + template class _Trait, typename _Tp, typename... _Up> + inline constexpr bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>> + = _Trait<_Tp, _Up...>::value; + + template class _Trait, typename _Tp, typename... _Up> + inline constexpr bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>&> + = _Trait<_Tp, _Up&...>::value; + + template class _Trait, typename _Tp, typename... _Up> + inline constexpr bool __unpack_std_tuple<_Trait, _Tp, const tuple<_Up...>> + = _Trait<_Tp, const _Up...>::value; + + template class _Trait, typename _Tp, typename... _Up> + inline constexpr bool __unpack_std_tuple<_Trait, _Tp, const tuple<_Up...>&> + = _Trait<_Tp, const _Up&...>::value; + + + + template + constexpr decltype(auto) + __apply_impl(_Fn&& __f, _Tuple&& __t, index_sequence<_Idx...>) + { + return std::__invoke(std::forward<_Fn>(__f), + std::get<_Idx>(std::forward<_Tuple>(__t))...); + } + + template + constexpr decltype(auto) + apply(_Fn&& __f, _Tuple&& __t) + noexcept(__unpack_std_tuple) + { + using _Indices + = make_index_sequence>>; + return std::__apply_impl(std::forward<_Fn>(__f), + std::forward<_Tuple>(__t), + _Indices{}); + } + + + + template + constexpr _Tp + __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>) + { return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); } + + template + constexpr _Tp + make_from_tuple(_Tuple&& __t) + noexcept(__unpack_std_tuple) + { + return __make_from_tuple_impl<_Tp>( + std::forward<_Tuple>(__t), + make_index_sequence>>{}); + } + + + + + +} +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 +namespace std +{ + +# 54 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 + template + struct _Maybe_unary_or_binary_function { }; + + + template + struct _Maybe_unary_or_binary_function<_Res, _T1> + : std::unary_function<_T1, _Res> { }; + + + template + struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> + : std::binary_function<_T1, _T2, _Res> { }; + + template + struct _Mem_fn_traits; + + template + struct _Mem_fn_traits_base + { + using __result_type = _Res; + using __maybe_type + = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; + using __arity = integral_constant; + }; +# 99 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; + + +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) & noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) & noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const & noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const & noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile & noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile & noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile & noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile & noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) && noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) && noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const && noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const && noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile && noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile && noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile && noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile && noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; + + + + + + + template> + struct _Maybe_get_result_type + { }; + + template + struct _Maybe_get_result_type<_Functor, + __void_t> + { typedef typename _Functor::result_type result_type; }; + + + + + + template + struct _Weak_result_type_impl + : _Maybe_get_result_type<_Functor> + { }; + + + template + struct _Weak_result_type_impl<_Res(_ArgTypes...) noexcept (_NE)> + { typedef _Res result_type; }; + + + template + struct _Weak_result_type_impl<_Res(_ArgTypes......) noexcept (_NE)> + { typedef _Res result_type; }; + + + template + struct _Weak_result_type_impl<_Res(*)(_ArgTypes...) noexcept (_NE)> + { typedef _Res result_type; }; + + + template + struct + _Weak_result_type_impl<_Res(*)(_ArgTypes......) noexcept (_NE)> + { typedef _Res result_type; }; + + + template::value> + struct _Weak_result_type_memfun + : _Weak_result_type_impl<_Functor> + { }; + + + template + struct _Weak_result_type_memfun<_MemFunPtr, true> + { + using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; + }; + + + template + struct _Weak_result_type_memfun<_Func _Class::*, false> + { }; + + + + + + template + struct _Weak_result_type + : _Weak_result_type_memfun::type> + { }; +# 293 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 + template + class reference_wrapper + + + + + + { + _Tp* _M_data; + + constexpr + static _Tp* _S_fun(_Tp& __r) noexcept { return std::__addressof(__r); } + + static void _S_fun(_Tp&&) = delete; + + template> + using __not_same + = typename enable_if::value>::type; + + public: + typedef _Tp type; + + + + + template, typename + = decltype(reference_wrapper::_S_fun(std::declval<_Up>()))> + constexpr + reference_wrapper(_Up&& __uref) + noexcept(noexcept(reference_wrapper::_S_fun(std::declval<_Up>()))) + : _M_data(reference_wrapper::_S_fun(std::forward<_Up>(__uref))) + { } + + reference_wrapper(const reference_wrapper&) = default; + + reference_wrapper& + operator=(const reference_wrapper&) = default; + + constexpr + operator _Tp&() const noexcept + { return this->get(); } + + constexpr + _Tp& + get() const noexcept + { return *_M_data; } + + template + constexpr + typename result_of<_Tp&(_Args&&...)>::type + operator()(_Args&&... __args) const + { + + if constexpr (is_object_v) + static_assert(sizeof(type), "type must be complete"); + + return std::__invoke(get(), std::forward<_Args>(__args)...); + } + }; + + + template + reference_wrapper(_Tp&) -> reference_wrapper<_Tp>; + + + + + + template + constexpr + inline reference_wrapper<_Tp> + ref(_Tp& __t) noexcept + { return reference_wrapper<_Tp>(__t); } + + + template + constexpr + inline reference_wrapper + cref(const _Tp& __t) noexcept + { return reference_wrapper(__t); } + + template + void ref(const _Tp&&) = delete; + + template + void cref(const _Tp&&) = delete; + + + template + constexpr + inline reference_wrapper<_Tp> + ref(reference_wrapper<_Tp> __t) noexcept + { return __t; } + + + template + constexpr + inline reference_wrapper + cref(reference_wrapper<_Tp> __t) noexcept + { return { __t.get() }; } + + + + +} +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 +namespace std +{ + + + + + + + + class bad_function_call : public std::exception + { + public: + virtual ~bad_function_call() noexcept; + + const char* what() const noexcept; + }; + + + + + + + + template + struct __is_location_invariant + : is_trivially_copyable<_Tp>::type + { }; + + class _Undefined_class; + + union _Nocopy_types + { + void* _M_object; + const void* _M_const_object; + void (*_M_function_pointer)(); + void (_Undefined_class::*_M_member_pointer)(); + }; + + union [[gnu::may_alias]] _Any_data + { + void* _M_access() { return &_M_pod_data[0]; } + const void* _M_access() const { return &_M_pod_data[0]; } + + template + _Tp& + _M_access() + { return *static_cast<_Tp*>(_M_access()); } + + template + const _Tp& + _M_access() const + { return *static_cast(_M_access()); } + + _Nocopy_types _M_unused; + char _M_pod_data[sizeof(_Nocopy_types)]; + }; + + enum _Manager_operation + { + __get_type_info, + __get_functor_ptr, + __clone_functor, + __destroy_functor + }; + + template + class function; + + + class _Function_base + { + public: + static const size_t _M_max_size = sizeof(_Nocopy_types); + static const size_t _M_max_align = __alignof__(_Nocopy_types); + + template + class _Base_manager + { + protected: + static const bool __stored_locally = + (__is_location_invariant<_Functor>::value + && sizeof(_Functor) <= _M_max_size + && __alignof__(_Functor) <= _M_max_align + && (_M_max_align % __alignof__(_Functor) == 0)); + + typedef integral_constant _Local_storage; + + + static _Functor* + _M_get_pointer(const _Any_data& __source) + { + if constexpr (__stored_locally) + { + const _Functor& __f = __source._M_access<_Functor>(); + return const_cast<_Functor*>(std::__addressof(__f)); + } + else + return __source._M_access<_Functor*>(); + } + + + + static void + _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) + { + ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); + } + + + + static void + _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) + { + __dest._M_access<_Functor*>() = + new _Functor(*__source._M_access()); + } + + + + static void + _M_destroy(_Any_data& __victim, true_type) + { + __victim._M_access<_Functor>().~_Functor(); + } + + + static void + _M_destroy(_Any_data& __victim, false_type) + { + delete __victim._M_access<_Functor*>(); + } + + public: + static bool + _M_manager(_Any_data& __dest, const _Any_data& __source, + _Manager_operation __op) + { + switch (__op) + { + case __get_type_info: + + __dest._M_access() = &typeid(_Functor); + + + + break; + case __get_functor_ptr: + __dest._M_access<_Functor*>() = _M_get_pointer(__source); + break; + + case __clone_functor: + _M_clone(__dest, __source, _Local_storage()); + break; + + case __destroy_functor: + _M_destroy(__dest, _Local_storage()); + break; + } + return false; + } + + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f) + { _M_init_functor(__functor, std::move(__f), _Local_storage()); } + + template + static bool + _M_not_empty_function(const function<_Signature>& __f) + { return static_cast(__f); } + + template + static bool + _M_not_empty_function(_Tp* __fp) + { return __fp != nullptr; } + + template + static bool + _M_not_empty_function(_Tp _Class::* __mp) + { return __mp != nullptr; } + + template + static bool + _M_not_empty_function(const _Tp&) + { return true; } + + private: + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) + { ::new (__functor._M_access()) _Functor(std::move(__f)); } + + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) + { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } + }; + + _Function_base() : _M_manager(nullptr) { } + + ~_Function_base() + { + if (_M_manager) + _M_manager(_M_functor, _M_functor, __destroy_functor); + } + + bool _M_empty() const { return !_M_manager; } + + typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, + _Manager_operation); + + _Any_data _M_functor; + _Manager_type _M_manager; + }; + + template + class _Function_handler; + + template + class _Function_handler<_Res(_ArgTypes...), _Functor> + : public _Function_base::_Base_manager<_Functor> + { + typedef _Function_base::_Base_manager<_Functor> _Base; + + public: + static bool + _M_manager(_Any_data& __dest, const _Any_data& __source, + _Manager_operation __op) + { + switch (__op) + { + + case __get_type_info: + __dest._M_access() = &typeid(_Functor); + break; + + case __get_functor_ptr: + __dest._M_access<_Functor*>() = _Base::_M_get_pointer(__source); + break; + + default: + _Base::_M_manager(__dest, __source, __op); + } + return false; + } + + static _Res + _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) + { + return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), + std::forward<_ArgTypes>(__args)...); + } + }; + + + template<> + class _Function_handler + { + public: + static bool + _M_manager(_Any_data&, const _Any_data&, _Manager_operation) + { return false; } + }; + + + + + + template::value> + struct _Target_handler + : _Function_handler<_Signature, typename remove_cv<_Functor>::type> + { }; + + template + struct _Target_handler<_Signature, _Functor, false> + : _Function_handler + { }; + + + + + + + + template + class function<_Res(_ArgTypes...)> + : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, + private _Function_base + { + template> + struct _Callable + : __is_invocable_impl<_Res2, _Res>::type + { }; + + + + template + struct _Callable : false_type { }; + + template + using _Requires = typename enable_if<_Cond::value, _Tp>::type; + + public: + typedef _Res result_type; + + + + + + + + function() noexcept + : _Function_base() { } + + + + + + function(nullptr_t) noexcept + : _Function_base() { } +# 373 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function(const function& __x) + : _Function_base() + { + if (static_cast(__x)) + { + __x._M_manager(_M_functor, __x._M_functor, __clone_functor); + _M_invoker = __x._M_invoker; + _M_manager = __x._M_manager; + } + } +# 391 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function(function&& __x) noexcept + : _Function_base() + { __x.swap(*this); } +# 411 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template>, void>, + typename = _Requires<_Callable<_Functor>, void>> + function(_Functor __f) + : _Function_base() + { + typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler; + + if (_My_handler::_M_not_empty_function(__f)) + { + _My_handler::_M_init_functor(_M_functor, std::move(__f)); + _M_invoker = &_My_handler::_M_invoke; + _M_manager = &_My_handler::_M_manager; + } + } +# 439 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function& + operator=(const function& __x) + { + function(__x).swap(*this); + return *this; + } +# 457 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function& + operator=(function&& __x) noexcept + { + function(std::move(__x)).swap(*this); + return *this; + } +# 471 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function& + operator=(nullptr_t) noexcept + { + if (_M_manager) + { + _M_manager(_M_functor, _M_functor, __destroy_functor); + _M_manager = nullptr; + _M_invoker = nullptr; + } + return *this; + } +# 499 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template + _Requires<_Callable::type>, function&> + operator=(_Functor&& __f) + { + function(std::forward<_Functor>(__f)).swap(*this); + return *this; + } + + + template + function& + operator=(reference_wrapper<_Functor> __f) noexcept + { + function(__f).swap(*this); + return *this; + } +# 525 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + void swap(function& __x) noexcept + { + std::swap(_M_functor, __x._M_functor); + std::swap(_M_manager, __x._M_manager); + std::swap(_M_invoker, __x._M_invoker); + } +# 542 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + explicit operator bool() const noexcept + { return !_M_empty(); } +# 555 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + _Res + operator()(_ArgTypes... __args) const + { + if (_M_empty()) + __throw_bad_function_call(); + return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); + } +# 574 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + const type_info& + target_type() const noexcept + { + if (_M_manager) + { + _Any_data __typeinfo_result; + _M_manager(__typeinfo_result, _M_functor, __get_type_info); + if (auto __ti = __typeinfo_result._M_access()) + return *__ti; + } + return typeid(void); + } +# 599 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template + _Functor* + target() noexcept + { + const function* __const_this = this; + const _Functor* __func = __const_this->template target<_Functor>(); + + + return *const_cast<_Functor**>(&__func); + } + + template + const _Functor* + target() const noexcept + { + if constexpr (is_object<_Functor>::value) + { + + + using _Handler = _Target_handler<_Res(_ArgTypes...), _Functor>; + + if (_M_manager == &_Handler::_M_manager + + || (_M_manager && typeid(_Functor) == target_type()) + + ) + { + _Any_data __ptr; + _M_manager(__ptr, _M_functor, __get_functor_ptr); + return __ptr._M_access(); + } + } + return nullptr; + } + + + private: + using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); + _Invoker_type _M_invoker; + }; + + + template + struct __function_guide_helper + { }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) & noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) const noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) const & noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + function(_Res(*)(_ArgTypes...)) -> function<_Res(_ArgTypes...)>; + + template::type> + function(_Functor) -> function<_Signature>; +# 686 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template + inline bool + operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept + { return !static_cast(__f); } +# 726 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template + inline void + swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept + { __x.swap(__y); } + + + namespace __detail::__variant + { + template struct _Never_valueless_alt; + + + + template + struct _Never_valueless_alt> + : std::true_type + { }; + } + + + +} +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/aligned_buffer.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/aligned_buffer.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/aligned_buffer.h" 3 + + + + + + + +namespace __gnu_cxx +{ + + + + + template + struct __aligned_membuf + { + + + + + + struct _Tp2 { _Tp _M_t; }; + + alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)]; + + __aligned_membuf() = default; + + + __aligned_membuf(std::nullptr_t) { } + + void* + _M_addr() noexcept + { return static_cast(&_M_storage); } + + const void* + _M_addr() const noexcept + { return static_cast(&_M_storage); } + + _Tp* + _M_ptr() noexcept + { return static_cast<_Tp*>(_M_addr()); } + + const _Tp* + _M_ptr() const noexcept + { return static_cast(_M_addr()); } + }; +# 89 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/aligned_buffer.h" 3 + template + struct __aligned_buffer + : std::aligned_storage + { + typename + std::aligned_storage::type _M_storage; + + __aligned_buffer() = default; + + + __aligned_buffer(std::nullptr_t) { } + + void* + _M_addr() noexcept + { + return static_cast(&_M_storage); + } + + const void* + _M_addr() const noexcept + { + return static_cast(&_M_storage); + } + + _Tp* + _M_ptr() noexcept + { return static_cast<_Tp*>(_M_addr()); } + + const _Tp* + _M_ptr() const noexcept + { return static_cast(_M_addr()); } + }; + + +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 1 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 +namespace std +{ + + + template + class _Hashtable; + +namespace __detail +{ + + + + + + template + struct _Hashtable_base; + + + + template + inline typename std::iterator_traits<_Iterator>::difference_type + __distance_fw(_Iterator __first, _Iterator __last, + std::input_iterator_tag) + { return __first != __last ? 1 : 0; } + + template + inline typename std::iterator_traits<_Iterator>::difference_type + __distance_fw(_Iterator __first, _Iterator __last, + std::forward_iterator_tag) + { return std::distance(__first, __last); } + + template + inline typename std::iterator_traits<_Iterator>::difference_type + __distance_fw(_Iterator __first, _Iterator __last) + { return __distance_fw(__first, __last, + std::__iterator_category(__first)); } + + struct _Identity + { + template + _Tp&& + operator()(_Tp&& __x) const noexcept + { return std::forward<_Tp>(__x); } + }; + + struct _Select1st + { + template + auto + operator()(_Tp&& __x) const noexcept + -> decltype(std::get<0>(std::forward<_Tp>(__x))) + { return std::get<0>(std::forward<_Tp>(__x)); } + }; + + template + struct _Hashtable_alloc; + + + + template + struct _ReuseOrAllocNode + { + private: + using __node_alloc_type = _NodeAlloc; + using __hashtable_alloc = _Hashtable_alloc<__node_alloc_type>; + using __node_alloc_traits = + typename __hashtable_alloc::__node_alloc_traits; + using __node_type = typename __hashtable_alloc::__node_type; + + public: + _ReuseOrAllocNode(__node_type* __nodes, __hashtable_alloc& __h) + : _M_nodes(__nodes), _M_h(__h) { } + _ReuseOrAllocNode(const _ReuseOrAllocNode&) = delete; + + ~_ReuseOrAllocNode() + { _M_h._M_deallocate_nodes(_M_nodes); } + + template + __node_type* + operator()(_Arg&& __arg) const + { + if (_M_nodes) + { + __node_type* __node = _M_nodes; + _M_nodes = _M_nodes->_M_next(); + __node->_M_nxt = nullptr; + auto& __a = _M_h._M_node_allocator(); + __node_alloc_traits::destroy(__a, __node->_M_valptr()); + try + { + __node_alloc_traits::construct(__a, __node->_M_valptr(), + std::forward<_Arg>(__arg)); + } + catch(...) + { + _M_h._M_deallocate_node_ptr(__node); + throw; + } + return __node; + } + return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); + } + + private: + mutable __node_type* _M_nodes; + __hashtable_alloc& _M_h; + }; + + + + template + struct _AllocNode + { + private: + using __hashtable_alloc = _Hashtable_alloc<_NodeAlloc>; + using __node_type = typename __hashtable_alloc::__node_type; + + public: + _AllocNode(__hashtable_alloc& __h) + : _M_h(__h) { } + + template + __node_type* + operator()(_Arg&& __arg) const + { return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); } + + private: + __hashtable_alloc& _M_h; + }; +# 198 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Hashtable_traits + { + using __hash_cached = __bool_constant<_Cache_hash_code>; + using __constant_iterators = __bool_constant<_Constant_iterators>; + using __unique_keys = __bool_constant<_Unique_keys>; + }; +# 214 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + struct _Hash_node_base + { + _Hash_node_base* _M_nxt; + + _Hash_node_base() noexcept : _M_nxt() { } + + _Hash_node_base(_Hash_node_base* __next) noexcept : _M_nxt(__next) { } + }; + + + + + + + template + struct _Hash_node_value_base + { + typedef _Value value_type; + + __gnu_cxx::__aligned_buffer<_Value> _M_storage; + + _Value* + _M_valptr() noexcept + { return _M_storage._M_ptr(); } + + const _Value* + _M_valptr() const noexcept + { return _M_storage._M_ptr(); } + + _Value& + _M_v() noexcept + { return *_M_valptr(); } + + const _Value& + _M_v() const noexcept + { return *_M_valptr(); } + }; + + + + + template + struct _Hash_node_code_cache + { }; + + + + + template<> + struct _Hash_node_code_cache + { std::size_t _M_hash_code; }; + + template + struct _Hash_node_value + : _Hash_node_value_base<_Value> + , _Hash_node_code_cache<_Cache_hash_code> + { }; + + + + + template + struct _Hash_node + : _Hash_node_base + , _Hash_node_value<_Value, _Cache_hash_code> + { + _Hash_node* + _M_next() const noexcept + { return static_cast<_Hash_node*>(this->_M_nxt); } + }; + + + template + struct _Node_iterator_base + { + using __node_type = _Hash_node<_Value, _Cache_hash_code>; + + __node_type* _M_cur; + + _Node_iterator_base() : _M_cur(nullptr) { } + _Node_iterator_base(__node_type* __p) noexcept + : _M_cur(__p) { } + + void + _M_incr() noexcept + { _M_cur = _M_cur->_M_next(); } + + friend bool + operator==(const _Node_iterator_base& __x, const _Node_iterator_base& __y) + noexcept + { return __x._M_cur == __y._M_cur; } + + + + + + + + }; + + + template + struct _Node_iterator + : public _Node_iterator_base<_Value, __cache> + { + private: + using __base_type = _Node_iterator_base<_Value, __cache>; + using __node_type = typename __base_type::__node_type; + + public: + typedef _Value value_type; + typedef std::ptrdiff_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + using pointer = typename std::conditional<__constant_iterators, + const value_type*, value_type*>::type; + + using reference = typename std::conditional<__constant_iterators, + const value_type&, value_type&>::type; + + _Node_iterator() = default; + + explicit + _Node_iterator(__node_type* __p) noexcept + : __base_type(__p) { } + + reference + operator*() const noexcept + { return this->_M_cur->_M_v(); } + + pointer + operator->() const noexcept + { return this->_M_cur->_M_valptr(); } + + _Node_iterator& + operator++() noexcept + { + this->_M_incr(); + return *this; + } + + _Node_iterator + operator++(int) noexcept + { + _Node_iterator __tmp(*this); + this->_M_incr(); + return __tmp; + } + }; + + + template + struct _Node_const_iterator + : public _Node_iterator_base<_Value, __cache> + { + private: + using __base_type = _Node_iterator_base<_Value, __cache>; + using __node_type = typename __base_type::__node_type; + + public: + typedef _Value value_type; + typedef std::ptrdiff_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + typedef const value_type* pointer; + typedef const value_type& reference; + + _Node_const_iterator() = default; + + explicit + _Node_const_iterator(__node_type* __p) noexcept + : __base_type(__p) { } + + _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, + __cache>& __x) noexcept + : __base_type(__x._M_cur) { } + + reference + operator*() const noexcept + { return this->_M_cur->_M_v(); } + + pointer + operator->() const noexcept + { return this->_M_cur->_M_valptr(); } + + _Node_const_iterator& + operator++() noexcept + { + this->_M_incr(); + return *this; + } + + _Node_const_iterator + operator++(int) noexcept + { + _Node_const_iterator __tmp(*this); + this->_M_incr(); + return __tmp; + } + }; + + + + + + + struct _Mod_range_hashing + { + typedef std::size_t first_argument_type; + typedef std::size_t second_argument_type; + typedef std::size_t result_type; + + result_type + operator()(first_argument_type __num, + second_argument_type __den) const noexcept + { return __num % __den; } + }; + + + + + + + struct _Default_ranged_hash { }; + + + + struct _Prime_rehash_policy + { + using __has_load_factor = true_type; + + _Prime_rehash_policy(float __z = 1.0) noexcept + : _M_max_load_factor(__z), _M_next_resize(0) { } + + float + max_load_factor() const noexcept + { return _M_max_load_factor; } + + + std::size_t + _M_next_bkt(std::size_t __n) const; + + + std::size_t + _M_bkt_for_elements(std::size_t __n) const + { return __builtin_ceil(__n / (double)_M_max_load_factor); } + + + + + + std::pair + _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, + std::size_t __n_ins) const; + + typedef std::size_t _State; + + _State + _M_state() const + { return _M_next_resize; } + + void + _M_reset() noexcept + { _M_next_resize = 0; } + + void + _M_reset(_State __state) + { _M_next_resize = __state; } + + static const std::size_t _S_growth_factor = 2; + + float _M_max_load_factor; + mutable std::size_t _M_next_resize; + }; + + + struct _Mask_range_hashing + { + typedef std::size_t first_argument_type; + typedef std::size_t second_argument_type; + typedef std::size_t result_type; + + result_type + operator()(first_argument_type __num, + second_argument_type __den) const noexcept + { return __num & (__den - 1); } + }; + + + inline std::size_t + __clp2(std::size_t __n) noexcept + { + using __gnu_cxx::__int_traits; + + if (__n < 2) + return __n; + const unsigned __lz = sizeof(size_t) > sizeof(long) + ? __builtin_clzll(__n - 1ull) + : __builtin_clzl(__n - 1ul); + + return (size_t(1) << (__int_traits::__digits - __lz - 1)) << 1; + } + + + + struct _Power2_rehash_policy + { + using __has_load_factor = true_type; + + _Power2_rehash_policy(float __z = 1.0) noexcept + : _M_max_load_factor(__z), _M_next_resize(0) { } + + float + max_load_factor() const noexcept + { return _M_max_load_factor; } + + + + std::size_t + _M_next_bkt(std::size_t __n) noexcept + { + if (__n == 0) + + + + return 1; + + const auto __max_width = std::min(sizeof(size_t), 8); + const auto __max_bkt = size_t(1) << (__max_width * 8 - 1); + std::size_t __res = __clp2(__n); + + if (__res == 0) + __res = __max_bkt; + else if (__res == 1) + + + + __res = 2; + + if (__res == __max_bkt) + + + + _M_next_resize = size_t(-1); + else + _M_next_resize + = __builtin_floor(__res * (double)_M_max_load_factor); + + return __res; + } + + + std::size_t + _M_bkt_for_elements(std::size_t __n) const noexcept + { return __builtin_ceil(__n / (double)_M_max_load_factor); } + + + + + + std::pair + _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, + std::size_t __n_ins) noexcept + { + if (__n_elt + __n_ins > _M_next_resize) + { + + + + double __min_bkts + = std::max(__n_elt + __n_ins, _M_next_resize ? 0 : 11) + / (double)_M_max_load_factor; + if (__min_bkts >= __n_bkt) + return { true, + _M_next_bkt(std::max(__builtin_floor(__min_bkts) + 1, + __n_bkt * _S_growth_factor)) }; + + _M_next_resize + = __builtin_floor(__n_bkt * (double)_M_max_load_factor); + return { false, 0 }; + } + else + return { false, 0 }; + } + + typedef std::size_t _State; + + _State + _M_state() const noexcept + { return _M_next_resize; } + + void + _M_reset() noexcept + { _M_next_resize = 0; } + + void + _M_reset(_State __state) noexcept + { _M_next_resize = __state; } + + static const std::size_t _S_growth_factor = 2; + + float _M_max_load_factor; + std::size_t _M_next_resize; + }; +# 637 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Map_base { }; + + + template + struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> + { + using mapped_type = typename std::tuple_element<1, _Pair>::type; + }; + + + template + struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true> + { + private: + using __hashtable_base = _Hashtable_base<_Key, _Pair, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, + _Traits>; + + using __hashtable = _Hashtable<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, + _Unused, _RehashPolicy, _Traits>; + + using __hash_code = typename __hashtable_base::__hash_code; + + public: + using key_type = typename __hashtable_base::key_type; + using mapped_type = typename std::tuple_element<1, _Pair>::type; + + mapped_type& + operator[](const key_type& __k); + + mapped_type& + operator[](key_type&& __k); + + + + mapped_type& + at(const key_type& __k); + + const mapped_type& + at(const key_type& __k) const; + }; + + template + auto + _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + operator[](const key_type& __k) + -> mapped_type& + { + __hashtable* __h = static_cast<__hashtable*>(this); + __hash_code __code = __h->_M_hash_code(__k); + std::size_t __bkt = __h->_M_bucket_index(__code); + if (auto __node = __h->_M_find_node(__bkt, __k, __code)) + return __node->_M_v().second; + + typename __hashtable::_Scoped_node __node { + __h, + std::piecewise_construct, + std::tuple(__k), + std::tuple<>() + }; + auto __pos + = __h->_M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return __pos->second; + } + + template + auto + _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + operator[](key_type&& __k) + -> mapped_type& + { + __hashtable* __h = static_cast<__hashtable*>(this); + __hash_code __code = __h->_M_hash_code(__k); + std::size_t __bkt = __h->_M_bucket_index(__code); + if (auto __node = __h->_M_find_node(__bkt, __k, __code)) + return __node->_M_v().second; + + typename __hashtable::_Scoped_node __node { + __h, + std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::tuple<>() + }; + auto __pos + = __h->_M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return __pos->second; + } + + template + auto + _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + at(const key_type& __k) + -> mapped_type& + { + __hashtable* __h = static_cast<__hashtable*>(this); + auto __ite = __h->find(__k); + + if (!__ite._M_cur) + __throw_out_of_range(("_Map_base::at")); + return __ite->second; + } + + template + auto + _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + at(const key_type& __k) const + -> const mapped_type& + { + const __hashtable* __h = static_cast(this); + auto __ite = __h->find(__k); + + if (!__ite._M_cur) + __throw_out_of_range(("_Map_base::at")); + return __ite->second; + } + + + + + + + template + struct _Insert_base + { + protected: + using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, + _Equal, _Hash, _RangeHash, + _Unused, _Traits>; + + using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, + _Unused, _RehashPolicy, _Traits>; + + using __hash_cached = typename _Traits::__hash_cached; + using __constant_iterators = typename _Traits::__constant_iterators; + + using __hashtable_alloc = _Hashtable_alloc< + __alloc_rebind<_Alloc, _Hash_node<_Value, + __hash_cached::value>>>; + + using value_type = typename __hashtable_base::value_type; + using size_type = typename __hashtable_base::size_type; + + using __unique_keys = typename _Traits::__unique_keys; + using __node_alloc_type = typename __hashtable_alloc::__node_alloc_type; + using __node_gen_type = _AllocNode<__node_alloc_type>; + + __hashtable& + _M_conjure_hashtable() + { return *(static_cast<__hashtable*>(this)); } + + template + void + _M_insert_range(_InputIterator __first, _InputIterator __last, + const _NodeGetter&, true_type __uks); + + template + void + _M_insert_range(_InputIterator __first, _InputIterator __last, + const _NodeGetter&, false_type __uks); + + public: + using iterator = _Node_iterator<_Value, __constant_iterators::value, + __hash_cached::value>; + + using const_iterator = _Node_const_iterator<_Value, __constant_iterators::value, + __hash_cached::value>; + + using __ireturn_type = typename std::conditional<__unique_keys::value, + std::pair, + iterator>::type; + + __ireturn_type + insert(const value_type& __v) + { + __hashtable& __h = _M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return __h._M_insert(__v, __node_gen, __unique_keys{}); + } + + iterator + insert(const_iterator __hint, const value_type& __v) + { + __hashtable& __h = _M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return __h._M_insert(__hint, __v, __node_gen, __unique_keys{}); + } + + template + std::pair + try_emplace(const_iterator, _KType&& __k, _Args&&... __args) + { + __hashtable& __h = _M_conjure_hashtable(); + auto __code = __h._M_hash_code(__k); + std::size_t __bkt = __h._M_bucket_index(__code); + if (auto __node = __h._M_find_node(__bkt, __k, __code)) + return { iterator(__node), false }; + + typename __hashtable::_Scoped_node __node { + &__h, + std::piecewise_construct, + std::forward_as_tuple(std::forward<_KType>(__k)), + std::forward_as_tuple(std::forward<_Args>(__args)...) + }; + auto __it + = __h._M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return { __it, true }; + } + + void + insert(initializer_list __l) + { this->insert(__l.begin(), __l.end()); } + + template + void + insert(_InputIterator __first, _InputIterator __last) + { + __hashtable& __h = _M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return _M_insert_range(__first, __last, __node_gen, __unique_keys{}); + } + }; + + template + template + void + _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>:: + _M_insert_range(_InputIterator __first, _InputIterator __last, + const _NodeGetter& __node_gen, true_type __uks) + { + __hashtable& __h = _M_conjure_hashtable(); + for (; __first != __last; ++__first) + __h._M_insert(*__first, __node_gen, __uks); + } + + template + template + void + _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>:: + _M_insert_range(_InputIterator __first, _InputIterator __last, + const _NodeGetter& __node_gen, false_type __uks) + { + using __rehash_type = typename __hashtable::__rehash_type; + using __rehash_state = typename __hashtable::__rehash_state; + using pair_type = std::pair; + + size_type __n_elt = __detail::__distance_fw(__first, __last); + if (__n_elt == 0) + return; + + __hashtable& __h = _M_conjure_hashtable(); + __rehash_type& __rehash = __h._M_rehash_policy; + const __rehash_state& __saved_state = __rehash._M_state(); + pair_type __do_rehash = __rehash._M_need_rehash(__h._M_bucket_count, + __h._M_element_count, + __n_elt); + + if (__do_rehash.first) + __h._M_rehash(__do_rehash.second, __saved_state); + + for (; __first != __last; ++__first) + __h._M_insert(*__first, __node_gen, __uks); + } + + + + + + + + template + struct _Insert; + + + template + struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits, true> + : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits> + { + using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + using value_type = typename __base_type::value_type; + using iterator = typename __base_type::iterator; + using const_iterator = typename __base_type::const_iterator; + using __ireturn_type = typename __base_type::__ireturn_type; + + using __unique_keys = typename __base_type::__unique_keys; + using __hashtable = typename __base_type::__hashtable; + using __node_gen_type = typename __base_type::__node_gen_type; + + using __base_type::insert; + + __ireturn_type + insert(value_type&& __v) + { + __hashtable& __h = this->_M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return __h._M_insert(std::move(__v), __node_gen, __unique_keys{}); + } + + iterator + insert(const_iterator __hint, value_type&& __v) + { + __hashtable& __h = this->_M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return __h._M_insert(__hint, std::move(__v), __node_gen, + __unique_keys{}); + } + }; + + + template + struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> + : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits> + { + using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + using value_type = typename __base_type::value_type; + using iterator = typename __base_type::iterator; + using const_iterator = typename __base_type::const_iterator; + + using __unique_keys = typename __base_type::__unique_keys; + using __hashtable = typename __base_type::__hashtable; + using __ireturn_type = typename __base_type::__ireturn_type; + + using __base_type::insert; + + template + using __is_cons = std::is_constructible; + + template + using _IFcons = std::enable_if<__is_cons<_Pair>::value>; + + template + using _IFconsp = typename _IFcons<_Pair>::type; + + template> + __ireturn_type + insert(_Pair&& __v) + { + __hashtable& __h = this->_M_conjure_hashtable(); + return __h._M_emplace(__unique_keys{}, std::forward<_Pair>(__v)); + } + + template> + iterator + insert(const_iterator __hint, _Pair&& __v) + { + __hashtable& __h = this->_M_conjure_hashtable(); + return __h._M_emplace(__hint, __unique_keys{}, + std::forward<_Pair>(__v)); + } + }; + + template + using __has_load_factor = typename _Policy::__has_load_factor; + + + + + + + + template> + struct _Rehash_base; + + + template + struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, + false_type > + { + }; + + + template + struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, + true_type > + { + using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + float + max_load_factor() const noexcept + { + const __hashtable* __this = static_cast(this); + return __this->__rehash_policy().max_load_factor(); + } + + void + max_load_factor(float __z) + { + __hashtable* __this = static_cast<__hashtable*>(this); + __this->__rehash_policy(_RehashPolicy(__z)); + } + + void + reserve(std::size_t __n) + { + __hashtable* __this = static_cast<__hashtable*>(this); + __this->rehash(__this->__rehash_policy()._M_bkt_for_elements(__n)); + } + }; + + + + + + + + template + struct _Hashtable_ebo_helper; + + + template + struct _Hashtable_ebo_helper<_Nm, _Tp, true> + : private _Tp + { + _Hashtable_ebo_helper() = default; + + template + _Hashtable_ebo_helper(_OtherTp&& __tp) + : _Tp(std::forward<_OtherTp>(__tp)) + { } + + const _Tp& _M_cget() const { return static_cast(*this); } + _Tp& _M_get() { return static_cast<_Tp&>(*this); } + }; + + + template + struct _Hashtable_ebo_helper<_Nm, _Tp, false> + { + _Hashtable_ebo_helper() = default; + + template + _Hashtable_ebo_helper(_OtherTp&& __tp) + : _M_tp(std::forward<_OtherTp>(__tp)) + { } + + const _Tp& _M_cget() const { return _M_tp; } + _Tp& _M_get() { return _M_tp; } + + private: + _Tp _M_tp; + }; + + + + + + + + template + struct _Local_iterator_base; +# 1184 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Hash_code_base + : private _Hashtable_ebo_helper<1, _Hash> + { + private: + using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>; + + + friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, false>; + + public: + typedef _Hash hasher; + + hasher + hash_function() const + { return _M_hash(); } + + protected: + typedef std::size_t __hash_code; + + + + _Hash_code_base() = default; + _Hash_code_base(const _Hash& __hash) : __ebo_hash(__hash) { } + + __hash_code + _M_hash_code(const _Key& __k) const + { + static_assert(__is_invocable{}, + "hash function must be invocable with an argument of key type"); + return _M_hash()(__k); + } + + template + __hash_code + _M_hash_code_tr(const _Kt& __k) const + { + static_assert(__is_invocable{}, + "hash function must be invocable with an argument of key type"); + return _M_hash()(__k); + } + + std::size_t + _M_bucket_index(__hash_code __c, std::size_t __bkt_count) const + { return _RangeHash{}(__c, __bkt_count); } + + std::size_t + _M_bucket_index(const _Hash_node_value<_Value, false>& __n, + std::size_t __bkt_count) const + noexcept( noexcept(declval()(declval())) + && noexcept(declval()((__hash_code)0, + (std::size_t)0)) ) + { + return _RangeHash{}(_M_hash_code(_ExtractKey{}(__n._M_v())), + __bkt_count); + } + + std::size_t + _M_bucket_index(const _Hash_node_value<_Value, true>& __n, + std::size_t __bkt_count) const + noexcept( noexcept(declval()((__hash_code)0, + (std::size_t)0)) ) + { return _RangeHash{}(__n._M_hash_code, __bkt_count); } + + void + _M_store_code(_Hash_node_code_cache&, __hash_code) const + { } + + void + _M_copy_code(_Hash_node_code_cache&, + const _Hash_node_code_cache&) const + { } + + void + _M_store_code(_Hash_node_code_cache& __n, __hash_code __c) const + { __n._M_hash_code = __c; } + + void + _M_copy_code(_Hash_node_code_cache& __to, + const _Hash_node_code_cache& __from) const + { __to._M_hash_code = __from._M_hash_code; } + + void + _M_swap(_Hash_code_base& __x) + { std::swap(__ebo_hash::_M_get(), __x.__ebo_hash::_M_get()); } + + const _Hash& + _M_hash() const { return __ebo_hash::_M_cget(); } + }; + + + template + struct _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, true> + : public _Node_iterator_base<_Value, true> + { + protected: + using __base_node_iter = _Node_iterator_base<_Value, true>; + using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, true>; + + _Local_iterator_base() = default; + _Local_iterator_base(const __hash_code_base&, + _Hash_node<_Value, true>* __p, + std::size_t __bkt, std::size_t __bkt_count) + : __base_node_iter(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) + { } + + void + _M_incr() + { + __base_node_iter::_M_incr(); + if (this->_M_cur) + { + std::size_t __bkt + = _RangeHash{}(this->_M_cur->_M_hash_code, _M_bucket_count); + if (__bkt != _M_bucket) + this->_M_cur = nullptr; + } + } + + std::size_t _M_bucket; + std::size_t _M_bucket_count; + + public: + std::size_t + _M_get_bucket() const { return _M_bucket; } + }; + + + + + + template::value> + struct _Hash_code_storage + { + __gnu_cxx::__aligned_buffer<_Tp> _M_storage; + + _Tp* + _M_h() { return _M_storage._M_ptr(); } + + const _Tp* + _M_h() const { return _M_storage._M_ptr(); } + }; + + + template + struct _Hash_code_storage<_Tp, true> + { + static_assert( std::is_empty<_Tp>::value, "Type must be empty" ); + + + + _Tp* + _M_h() { return reinterpret_cast<_Tp*>(this); } + + const _Tp* + _M_h() const { return reinterpret_cast(this); } + }; + + template + using __hash_code_for_local_iter + = _Hash_code_storage<_Hash_code_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, false>>; + + + template + struct _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, false> + : __hash_code_for_local_iter<_Key, _Value, _ExtractKey, _Hash, _RangeHash, + _Unused> + , _Node_iterator_base<_Value, false> + { + protected: + using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, false>; + using __node_iter_base = _Node_iterator_base<_Value, false>; + + _Local_iterator_base() : _M_bucket_count(-1) { } + + _Local_iterator_base(const __hash_code_base& __base, + _Hash_node<_Value, false>* __p, + std::size_t __bkt, std::size_t __bkt_count) + : __node_iter_base(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) + { _M_init(__base); } + + ~_Local_iterator_base() + { + if (_M_bucket_count != size_t(-1)) + _M_destroy(); + } + + _Local_iterator_base(const _Local_iterator_base& __iter) + : __node_iter_base(__iter._M_cur), _M_bucket(__iter._M_bucket) + , _M_bucket_count(__iter._M_bucket_count) + { + if (_M_bucket_count != size_t(-1)) + _M_init(*__iter._M_h()); + } + + _Local_iterator_base& + operator=(const _Local_iterator_base& __iter) + { + if (_M_bucket_count != -1) + _M_destroy(); + this->_M_cur = __iter._M_cur; + _M_bucket = __iter._M_bucket; + _M_bucket_count = __iter._M_bucket_count; + if (_M_bucket_count != -1) + _M_init(*__iter._M_h()); + return *this; + } + + void + _M_incr() + { + __node_iter_base::_M_incr(); + if (this->_M_cur) + { + std::size_t __bkt = this->_M_h()->_M_bucket_index(*this->_M_cur, + _M_bucket_count); + if (__bkt != _M_bucket) + this->_M_cur = nullptr; + } + } + + std::size_t _M_bucket; + std::size_t _M_bucket_count; + + void + _M_init(const __hash_code_base& __base) + { ::new(this->_M_h()) __hash_code_base(__base); } + + void + _M_destroy() { this->_M_h()->~__hash_code_base(); } + + public: + std::size_t + _M_get_bucket() const { return _M_bucket; } + }; + + + template + struct _Local_iterator + : public _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, __cache> + { + private: + using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, __cache>; + using __hash_code_base = typename __base_type::__hash_code_base; + + public: + typedef _Value value_type; + typedef typename std::conditional<__constant_iterators, + const value_type*, value_type*>::type + pointer; + typedef typename std::conditional<__constant_iterators, + const value_type&, value_type&>::type + reference; + typedef std::ptrdiff_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + _Local_iterator() = default; + + _Local_iterator(const __hash_code_base& __base, + _Hash_node<_Value, __cache>* __n, + std::size_t __bkt, std::size_t __bkt_count) + : __base_type(__base, __n, __bkt, __bkt_count) + { } + + reference + operator*() const + { return this->_M_cur->_M_v(); } + + pointer + operator->() const + { return this->_M_cur->_M_valptr(); } + + _Local_iterator& + operator++() + { + this->_M_incr(); + return *this; + } + + _Local_iterator + operator++(int) + { + _Local_iterator __tmp(*this); + this->_M_incr(); + return __tmp; + } + }; + + + template + struct _Local_const_iterator + : public _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, __cache> + { + private: + using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, __cache>; + using __hash_code_base = typename __base_type::__hash_code_base; + + public: + typedef _Value value_type; + typedef const value_type* pointer; + typedef const value_type& reference; + typedef std::ptrdiff_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + _Local_const_iterator() = default; + + _Local_const_iterator(const __hash_code_base& __base, + _Hash_node<_Value, __cache>* __n, + std::size_t __bkt, std::size_t __bkt_count) + : __base_type(__base, __n, __bkt, __bkt_count) + { } + + _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, + __constant_iterators, + __cache>& __x) + : __base_type(__x) + { } + + reference + operator*() const + { return this->_M_cur->_M_v(); } + + pointer + operator->() const + { return this->_M_cur->_M_valptr(); } + + _Local_const_iterator& + operator++() + { + this->_M_incr(); + return *this; + } + + _Local_const_iterator + operator++(int) + { + _Local_const_iterator __tmp(*this); + this->_M_incr(); + return __tmp; + } + }; +# 1556 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Hashtable_base + : public _Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, + _Unused, _Traits::__hash_cached::value>, + private _Hashtable_ebo_helper<0, _Equal> + { + public: + typedef _Key key_type; + typedef _Value value_type; + typedef _Equal key_equal; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + using __traits_type = _Traits; + using __hash_cached = typename __traits_type::__hash_cached; + + using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, + __hash_cached::value>; + + using __hash_code = typename __hash_code_base::__hash_code; + + private: + using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>; + + static bool + _S_equals(__hash_code, const _Hash_node_code_cache&) + { return true; } + + static bool + _S_node_equals(const _Hash_node_code_cache&, + const _Hash_node_code_cache&) + { return true; } + + static bool + _S_equals(__hash_code __c, const _Hash_node_code_cache& __n) + { return __c == __n._M_hash_code; } + + static bool + _S_node_equals(const _Hash_node_code_cache& __lhn, + const _Hash_node_code_cache& __rhn) + { return __lhn._M_hash_code == __rhn._M_hash_code; } + + protected: + _Hashtable_base() = default; + _Hashtable_base(const _Hash& __hash, const _Equal& __eq) + : __hash_code_base(__hash), _EqualEBO(__eq) + { } + + bool + _M_equals(const _Key& __k, __hash_code __c, + const _Hash_node_value<_Value, __hash_cached::value>& __n) const + { + static_assert(__is_invocable{}, + "key equality predicate must be invocable with two arguments of " + "key type"); + return _S_equals(__c, __n) && _M_eq()(__k, _ExtractKey{}(__n._M_v())); + } + + template + bool + _M_equals_tr(const _Kt& __k, __hash_code __c, + const _Hash_node_value<_Value, + __hash_cached::value>& __n) const + { + static_assert( + __is_invocable{}, + "key equality predicate must be invocable with two arguments of " + "key type"); + return _S_equals(__c, __n) && _M_eq()(__k, _ExtractKey{}(__n._M_v())); + } + + bool + _M_node_equals( + const _Hash_node_value<_Value, __hash_cached::value>& __lhn, + const _Hash_node_value<_Value, __hash_cached::value>& __rhn) const + { + return _S_node_equals(__lhn, __rhn) + && _M_eq()(_ExtractKey{}(__lhn._M_v()), _ExtractKey{}(__rhn._M_v())); + } + + void + _M_swap(_Hashtable_base& __x) + { + __hash_code_base::_M_swap(__x); + std::swap(_EqualEBO::_M_get(), __x._EqualEBO::_M_get()); + } + + const _Equal& + _M_eq() const { return _EqualEBO::_M_cget(); } + }; +# 1658 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Equality; + + + template + struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true> + { + using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + bool + _M_equal(const __hashtable&) const; + }; + + template + bool + _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + _M_equal(const __hashtable& __other) const + { + using __node_type = typename __hashtable::__node_type; + const __hashtable* __this = static_cast(this); + if (__this->size() != __other.size()) + return false; + + for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) + { + std::size_t __ybkt = __other._M_bucket_index(*__itx._M_cur); + auto __prev_n = __other._M_buckets[__ybkt]; + if (!__prev_n) + return false; + + for (__node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt);; + __n = __n->_M_next()) + { + if (__n->_M_v() == *__itx) + break; + + if (!__n->_M_nxt + || __other._M_bucket_index(*__n->_M_next()) != __ybkt) + return false; + } + } + + return true; + } + + + template + struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> + { + using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + bool + _M_equal(const __hashtable&) const; + }; + + template + bool + _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false>:: + _M_equal(const __hashtable& __other) const + { + using __node_type = typename __hashtable::__node_type; + const __hashtable* __this = static_cast(this); + if (__this->size() != __other.size()) + return false; + + for (auto __itx = __this->begin(); __itx != __this->end();) + { + std::size_t __x_count = 1; + auto __itx_end = __itx; + for (++__itx_end; __itx_end != __this->end() + && __this->key_eq()(_ExtractKey{}(*__itx), + _ExtractKey{}(*__itx_end)); + ++__itx_end) + ++__x_count; + + std::size_t __ybkt = __other._M_bucket_index(*__itx._M_cur); + auto __y_prev_n = __other._M_buckets[__ybkt]; + if (!__y_prev_n) + return false; + + __node_type* __y_n = static_cast<__node_type*>(__y_prev_n->_M_nxt); + for (;;) + { + if (__this->key_eq()(_ExtractKey{}(__y_n->_M_v()), + _ExtractKey{}(*__itx))) + break; + + auto __y_ref_n = __y_n; + for (__y_n = __y_n->_M_next(); __y_n; __y_n = __y_n->_M_next()) + if (!__other._M_node_equals(*__y_ref_n, *__y_n)) + break; + + if (!__y_n || __other._M_bucket_index(*__y_n) != __ybkt) + return false; + } + + typename __hashtable::const_iterator __ity(__y_n); + for (auto __ity_end = __ity; __ity_end != __other.end(); ++__ity_end) + if (--__x_count == 0) + break; + + if (__x_count != 0) + return false; + + if (!std::is_permutation(__itx, __itx_end, __ity)) + return false; + + __itx = __itx_end; + } + return true; + } + + + + + + template + struct _Hashtable_alloc : private _Hashtable_ebo_helper<0, _NodeAlloc> + { + private: + using __ebo_node_alloc = _Hashtable_ebo_helper<0, _NodeAlloc>; + public: + using __node_type = typename _NodeAlloc::value_type; + using __node_alloc_type = _NodeAlloc; + + using __node_alloc_traits = __gnu_cxx::__alloc_traits<__node_alloc_type>; + + using __value_alloc_traits = typename __node_alloc_traits::template + rebind_traits; + + using __node_ptr = __node_type*; + using __node_base = _Hash_node_base; + using __node_base_ptr = __node_base*; + using __buckets_alloc_type = + __alloc_rebind<__node_alloc_type, __node_base_ptr>; + using __buckets_alloc_traits = std::allocator_traits<__buckets_alloc_type>; + using __buckets_ptr = __node_base_ptr*; + + _Hashtable_alloc() = default; + _Hashtable_alloc(const _Hashtable_alloc&) = default; + _Hashtable_alloc(_Hashtable_alloc&&) = default; + + template + _Hashtable_alloc(_Alloc&& __a) + : __ebo_node_alloc(std::forward<_Alloc>(__a)) + { } + + __node_alloc_type& + _M_node_allocator() + { return __ebo_node_alloc::_M_get(); } + + const __node_alloc_type& + _M_node_allocator() const + { return __ebo_node_alloc::_M_cget(); } + + + template + __node_ptr + _M_allocate_node(_Args&&... __args); + + + void + _M_deallocate_node(__node_ptr __n); + + + void + _M_deallocate_node_ptr(__node_ptr __n); + + + + void + _M_deallocate_nodes(__node_ptr __n); + + __buckets_ptr + _M_allocate_buckets(std::size_t __bkt_count); + + void + _M_deallocate_buckets(__buckets_ptr, std::size_t __bkt_count); + }; + + + + template + template + auto + _Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args&&... __args) + -> __node_ptr + { + auto __nptr = __node_alloc_traits::allocate(_M_node_allocator(), 1); + __node_ptr __n = std::__to_address(__nptr); + try + { + ::new ((void*)__n) __node_type; + __node_alloc_traits::construct(_M_node_allocator(), + __n->_M_valptr(), + std::forward<_Args>(__args)...); + return __n; + } + catch(...) + { + __node_alloc_traits::deallocate(_M_node_allocator(), __nptr, 1); + throw; + } + } + + template + void + _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node(__node_ptr __n) + { + __node_alloc_traits::destroy(_M_node_allocator(), __n->_M_valptr()); + _M_deallocate_node_ptr(__n); + } + + template + void + _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node_ptr(__node_ptr __n) + { + typedef typename __node_alloc_traits::pointer _Ptr; + auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__n); + __n->~__node_type(); + __node_alloc_traits::deallocate(_M_node_allocator(), __ptr, 1); + } + + template + void + _Hashtable_alloc<_NodeAlloc>::_M_deallocate_nodes(__node_ptr __n) + { + while (__n) + { + __node_ptr __tmp = __n; + __n = __n->_M_next(); + _M_deallocate_node(__tmp); + } + } + + template + auto + _Hashtable_alloc<_NodeAlloc>::_M_allocate_buckets(std::size_t __bkt_count) + -> __buckets_ptr + { + __buckets_alloc_type __alloc(_M_node_allocator()); + + auto __ptr = __buckets_alloc_traits::allocate(__alloc, __bkt_count); + __buckets_ptr __p = std::__to_address(__ptr); + __builtin_memset(__p, 0, __bkt_count * sizeof(__node_base_ptr)); + return __p; + } + + template + void + _Hashtable_alloc<_NodeAlloc>:: + _M_deallocate_buckets(__buckets_ptr __bkts, + std::size_t __bkt_count) + { + typedef typename __buckets_alloc_traits::pointer _Ptr; + auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__bkts); + __buckets_alloc_type __alloc(_M_node_allocator()); + __buckets_alloc_traits::deallocate(__alloc, __ptr, __bkt_count); + } + + +} + +} +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/node_handle.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/node_handle.h" 3 + +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/node_handle.h" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/node_handle.h" 3 +namespace std +{ + + + + template + class _Node_handle_common + { + using _AllocTraits = allocator_traits<_NodeAlloc>; + + public: + using allocator_type = __alloc_rebind<_NodeAlloc, _Val>; + + allocator_type + get_allocator() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); + return allocator_type(_M_alloc._M_alloc); + } + + explicit operator bool() const noexcept { return _M_ptr != nullptr; } + + [[nodiscard]] bool empty() const noexcept { return _M_ptr == nullptr; } + + protected: + constexpr _Node_handle_common() noexcept : _M_ptr() { } + + ~_Node_handle_common() + { + if (!empty()) + _M_reset(); + } + + _Node_handle_common(_Node_handle_common&& __nh) noexcept + : _M_ptr(__nh._M_ptr) + { + if (_M_ptr) + _M_move(std::move(__nh)); + } + + _Node_handle_common& + operator=(_Node_handle_common&& __nh) noexcept + { + if (empty()) + { + if (!__nh.empty()) + _M_move(std::move(__nh)); + } + else if (__nh.empty()) + _M_reset(); + else + { + + _AllocTraits::destroy(*_M_alloc, _M_ptr->_M_valptr()); + _AllocTraits::deallocate(*_M_alloc, _M_ptr, 1); + + _M_alloc = __nh._M_alloc.release(); + _M_ptr = __nh._M_ptr; + __nh._M_ptr = nullptr; + } + return *this; + } + + _Node_handle_common(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _M_ptr(__ptr), _M_alloc(__alloc) + { + do { if (__builtin_is_constant_evaluated() && !bool(__ptr != nullptr)) __builtin_unreachable(); } while (false); + } + + void + _M_swap(_Node_handle_common& __nh) noexcept + { + if (empty()) + { + if (!__nh.empty()) + _M_move(std::move(__nh)); + } + else if (__nh.empty()) + __nh._M_move(std::move(*this)); + else + { + using std::swap; + swap(_M_ptr, __nh._M_ptr); + _M_alloc.swap(__nh._M_alloc); + } + } + + private: + + + + void + _M_move(_Node_handle_common&& __nh) noexcept + { + ::new (std::__addressof(_M_alloc)) _NodeAlloc(__nh._M_alloc.release()); + _M_ptr = __nh._M_ptr; + __nh._M_ptr = nullptr; + } + + + + + void + _M_reset() noexcept + { + _NodeAlloc __alloc = _M_alloc.release(); + _AllocTraits::destroy(__alloc, _M_ptr->_M_valptr()); + _AllocTraits::deallocate(__alloc, _M_ptr, 1); + _M_ptr = nullptr; + } + + protected: + typename _AllocTraits::pointer _M_ptr; + + private: + + + union _Optional_alloc + { + _Optional_alloc() { } + ~_Optional_alloc() { } + + _Optional_alloc(_Optional_alloc&&) = delete; + _Optional_alloc& operator=(_Optional_alloc&&) = delete; + + _Optional_alloc(const _NodeAlloc& __alloc) noexcept + : _M_alloc(__alloc) + { } + + + void + operator=(_NodeAlloc&& __alloc) noexcept + { + using _ATr = _AllocTraits; + if constexpr (_ATr::propagate_on_container_move_assignment::value) + _M_alloc = std::move(__alloc); + else if constexpr (!_AllocTraits::is_always_equal::value) + do { if (__builtin_is_constant_evaluated() && !bool(_M_alloc == __alloc)) __builtin_unreachable(); } while (false); + } + + + void + swap(_Optional_alloc& __other) noexcept + { + using std::swap; + if constexpr (_AllocTraits::propagate_on_container_swap::value) + swap(_M_alloc, __other._M_alloc); + else if constexpr (!_AllocTraits::is_always_equal::value) + do { if (__builtin_is_constant_evaluated() && !bool(_M_alloc == __other._M_alloc)) __builtin_unreachable(); } while (false); + } + + + _NodeAlloc& operator*() noexcept { return _M_alloc; } + + + _NodeAlloc release() noexcept + { + _NodeAlloc __tmp = std::move(_M_alloc); + _M_alloc.~_NodeAlloc(); + return __tmp; + } + + struct _Empty { }; + + [[__no_unique_address__]] _Empty _M_empty; + [[__no_unique_address__]] _NodeAlloc _M_alloc; + }; + + [[__no_unique_address__]] _Optional_alloc _M_alloc; + + template + friend class _Rb_tree; + }; + + + template + class _Node_handle : public _Node_handle_common<_Value, _NodeAlloc> + { + public: + constexpr _Node_handle() noexcept = default; + ~_Node_handle() = default; + _Node_handle(_Node_handle&&) noexcept = default; + + _Node_handle& + operator=(_Node_handle&&) noexcept = default; + + using key_type = _Key; + using mapped_type = typename _Value::second_type; + + key_type& + key() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); + return *_M_pkey; + } + + mapped_type& + mapped() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); + return *_M_pmapped; + } + + void + swap(_Node_handle& __nh) noexcept + { + this->_M_swap(__nh); + using std::swap; + swap(_M_pkey, __nh._M_pkey); + swap(_M_pmapped, __nh._M_pmapped); + } + + friend void + swap(_Node_handle& __x, _Node_handle& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + private: + using _AllocTraits = allocator_traits<_NodeAlloc>; + + _Node_handle(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _Node_handle_common<_Value, _NodeAlloc>(__ptr, __alloc) + { + if (__ptr) + { + auto& __key = const_cast<_Key&>(__ptr->_M_valptr()->first); + _M_pkey = _S_pointer_to(__key); + _M_pmapped = _S_pointer_to(__ptr->_M_valptr()->second); + } + else + { + _M_pkey = nullptr; + _M_pmapped = nullptr; + } + } + + template + using __pointer + = __ptr_rebind>; + + __pointer<_Key> _M_pkey = nullptr; + __pointer _M_pmapped = nullptr; + + template + __pointer<_Tp> + _S_pointer_to(_Tp& __obj) + { return pointer_traits<__pointer<_Tp>>::pointer_to(__obj); } + + const key_type& + _M_key() const noexcept { return key(); } + + template + friend class _Rb_tree; + + template + friend class _Hashtable; + }; + + + template + class _Node_handle<_Value, _Value, _NodeAlloc> + : public _Node_handle_common<_Value, _NodeAlloc> + { + public: + constexpr _Node_handle() noexcept = default; + ~_Node_handle() = default; + _Node_handle(_Node_handle&&) noexcept = default; + + _Node_handle& + operator=(_Node_handle&&) noexcept = default; + + using value_type = _Value; + + value_type& + value() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); + return *this->_M_ptr->_M_valptr(); + } + + void + swap(_Node_handle& __nh) noexcept + { this->_M_swap(__nh); } + + friend void + swap(_Node_handle& __x, _Node_handle& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + private: + using _AllocTraits = allocator_traits<_NodeAlloc>; + + _Node_handle(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _Node_handle_common<_Value, _NodeAlloc>(__ptr, __alloc) { } + + const value_type& + _M_key() const noexcept { return value(); } + + template + friend class _Rb_tree; + + template + friend class _Hashtable; + }; + + + template + struct _Node_insert_return + { + _Iterator position = _Iterator(); + bool inserted = false; + _NodeHandle node; + }; + + +} +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 2 3 + + +namespace std +{ + + + template + using __cache_default + = __not_<__and_< + __is_fast_hash<_Hash>, + + __is_nothrow_invocable>>; +# 164 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 3 + template + class _Hashtable + : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _Traits>, + public __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>, + public __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>, + public __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>, + public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>, + private __detail::_Hashtable_alloc< + __alloc_rebind<_Alloc, + __detail::_Hash_node<_Value, + _Traits::__hash_cached::value>>> + { + static_assert(is_same::type, _Value>::value, + "unordered container must have a non-const, non-volatile value_type"); + + static_assert(is_same{}, + "unordered container must have the same value_type as its allocator"); + + + using __traits_type = _Traits; + using __hash_cached = typename __traits_type::__hash_cached; + using __constant_iterators = typename __traits_type::__constant_iterators; + using __node_type = __detail::_Hash_node<_Value, __hash_cached::value>; + using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; + + using __hashtable_alloc = __detail::_Hashtable_alloc<__node_alloc_type>; + + using __node_value_type = + __detail::_Hash_node_value<_Value, __hash_cached::value>; + using __node_ptr = typename __hashtable_alloc::__node_ptr; + using __value_alloc_traits = + typename __hashtable_alloc::__value_alloc_traits; + using __node_alloc_traits = + typename __hashtable_alloc::__node_alloc_traits; + using __node_base = typename __hashtable_alloc::__node_base; + using __node_base_ptr = typename __hashtable_alloc::__node_base_ptr; + using __buckets_ptr = typename __hashtable_alloc::__buckets_ptr; + + using __insert_base = __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, + _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + public: + typedef _Key key_type; + typedef _Value value_type; + typedef _Alloc allocator_type; + typedef _Equal key_equal; + + + + typedef typename __value_alloc_traits::pointer pointer; + typedef typename __value_alloc_traits::const_pointer const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + + using iterator = typename __insert_base::iterator; + + using const_iterator = typename __insert_base::const_iterator; + + using local_iterator = __detail::_Local_iterator; + + using const_local_iterator = __detail::_Local_const_iterator< + key_type, _Value, + _ExtractKey, _Hash, _RangeHash, _Unused, + __constant_iterators::value, __hash_cached::value>; + + private: + using __rehash_type = _RehashPolicy; + using __rehash_state = typename __rehash_type::_State; + + using __unique_keys = typename __traits_type::__unique_keys; + + using __hashtable_base = __detail:: + _Hashtable_base<_Key, _Value, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, _Traits>; + + using __hash_code_base = typename __hashtable_base::__hash_code_base; + using __hash_code = typename __hashtable_base::__hash_code; + using __ireturn_type = typename __insert_base::__ireturn_type; + + using __map_base = __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + using __rehash_base = __detail::_Rehash_base<_Key, _Value, _Alloc, + _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + using __eq_base = __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + using __reuse_or_alloc_node_gen_t = + __detail::_ReuseOrAllocNode<__node_alloc_type>; + using __alloc_node_gen_t = + __detail::_AllocNode<__node_alloc_type>; + + + struct _Scoped_node + { + + _Scoped_node(__node_ptr __n, __hashtable_alloc* __h) + : _M_h(__h), _M_node(__n) { } + + + template + _Scoped_node(__hashtable_alloc* __h, _Args&&... __args) + : _M_h(__h), + _M_node(__h->_M_allocate_node(std::forward<_Args>(__args)...)) + { } + + + ~_Scoped_node() { if (_M_node) _M_h->_M_deallocate_node(_M_node); }; + + _Scoped_node(const _Scoped_node&) = delete; + _Scoped_node& operator=(const _Scoped_node&) = delete; + + __hashtable_alloc* _M_h; + __node_ptr _M_node; + }; + + template + static constexpr + typename conditional::value, + const value_type&, value_type&&>::type + __fwd_value_for(value_type& __val) noexcept + { return std::move(__val); } + + + + + + struct __hash_code_base_access : __hash_code_base + { using __hash_code_base::_M_bucket_index; }; + + + + static_assert(noexcept(declval() + ._M_bucket_index(declval(), + (std::size_t)0)), + "Cache the hash code or qualify your functors involved" + " in hash code and bucket index computation with noexcept"); + + + static_assert(is_nothrow_default_constructible<_RangeHash>::value, + "Functor used to map hash code to bucket index" + " must be nothrow default constructible"); + static_assert(noexcept( + std::declval()((std::size_t)0, (std::size_t)0)), + "Functor used to map hash code to bucket index must be" + " noexcept"); + + + static_assert(is_nothrow_default_constructible<_ExtractKey>::value, + "_ExtractKey must be nothrow default constructible"); + static_assert(noexcept( + std::declval()(std::declval<_Value>())), + "_ExtractKey functor must be noexcept invocable"); + + template + friend struct __detail::_Map_base; + + template + friend struct __detail::_Insert_base; + + template + friend struct __detail::_Insert; + + template + friend struct __detail::_Equality; + + public: + using size_type = typename __hashtable_base::size_type; + using difference_type = typename __hashtable_base::difference_type; + + + using node_type = _Node_handle<_Key, _Value, __node_alloc_type>; + using insert_return_type = _Node_insert_return; + + + private: + __buckets_ptr _M_buckets = &_M_single_bucket; + size_type _M_bucket_count = 1; + __node_base _M_before_begin; + size_type _M_element_count = 0; + _RehashPolicy _M_rehash_policy; + + + + + + + + __node_base_ptr _M_single_bucket = nullptr; + + void + _M_update_bbegin() + { + if (_M_begin()) + _M_buckets[_M_bucket_index(*_M_begin())] = &_M_before_begin; + } + + void + _M_update_bbegin(__node_ptr __n) + { + _M_before_begin._M_nxt = __n; + _M_update_bbegin(); + } + + bool + _M_uses_single_bucket(__buckets_ptr __bkts) const + { return __builtin_expect(__bkts == &_M_single_bucket, false); } + + bool + _M_uses_single_bucket() const + { return _M_uses_single_bucket(_M_buckets); } + + __hashtable_alloc& + _M_base_alloc() { return *this; } + + __buckets_ptr + _M_allocate_buckets(size_type __bkt_count) + { + if (__builtin_expect(__bkt_count == 1, false)) + { + _M_single_bucket = nullptr; + return &_M_single_bucket; + } + + return __hashtable_alloc::_M_allocate_buckets(__bkt_count); + } + + void + _M_deallocate_buckets(__buckets_ptr __bkts, size_type __bkt_count) + { + if (_M_uses_single_bucket(__bkts)) + return; + + __hashtable_alloc::_M_deallocate_buckets(__bkts, __bkt_count); + } + + void + _M_deallocate_buckets() + { _M_deallocate_buckets(_M_buckets, _M_bucket_count); } + + + + __node_ptr + _M_bucket_begin(size_type __bkt) const; + + __node_ptr + _M_begin() const + { return static_cast<__node_ptr>(_M_before_begin._M_nxt); } + + + + template + void + _M_assign_elements(_Ht&&); + + template + void + _M_assign(_Ht&&, const _NodeGenerator&); + + void + _M_move_assign(_Hashtable&&, true_type); + + void + _M_move_assign(_Hashtable&&, false_type); + + void + _M_reset() noexcept; + + _Hashtable(const _Hash& __h, const _Equal& __eq, + const allocator_type& __a) + : __hashtable_base(__h, __eq), + __hashtable_alloc(__node_alloc_type(__a)) + { } + + template + static constexpr bool + _S_nothrow_move() + { + + + + + + if constexpr (_No_realloc) + if constexpr (is_nothrow_copy_constructible<_Hash>()) + return is_nothrow_copy_constructible<_Equal>(); + return false; + + } + + _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, + true_type ) + noexcept(_S_nothrow_move()); + + _Hashtable(_Hashtable&&, __node_alloc_type&&, + false_type ); + + template + _Hashtable(_InputIterator __first, _InputIterator __last, + size_type __bkt_count_hint, + const _Hash&, const _Equal&, const allocator_type&, + true_type __uks); + + template + _Hashtable(_InputIterator __first, _InputIterator __last, + size_type __bkt_count_hint, + const _Hash&, const _Equal&, const allocator_type&, + false_type __uks); + + public: + + _Hashtable() = default; + + _Hashtable(const _Hashtable&); + + _Hashtable(const _Hashtable&, const allocator_type&); + + explicit + _Hashtable(size_type __bkt_count_hint, + const _Hash& __hf = _Hash(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()); + + + _Hashtable(_Hashtable&& __ht) + noexcept(_S_nothrow_move()) + : _Hashtable(std::move(__ht), std::move(__ht._M_node_allocator()), + true_type{}) + { } + + _Hashtable(_Hashtable&& __ht, const allocator_type& __a) + noexcept(_S_nothrow_move<__node_alloc_traits::_S_always_equal()>()) + : _Hashtable(std::move(__ht), __node_alloc_type(__a), + typename __node_alloc_traits::is_always_equal{}) + { } + + explicit + _Hashtable(const allocator_type& __a) + : __hashtable_alloc(__node_alloc_type(__a)) + { } + + template + _Hashtable(_InputIterator __f, _InputIterator __l, + size_type __bkt_count_hint = 0, + const _Hash& __hf = _Hash(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _Hashtable(__f, __l, __bkt_count_hint, __hf, __eql, __a, + __unique_keys{}) + { } + + _Hashtable(initializer_list __l, + size_type __bkt_count_hint = 0, + const _Hash& __hf = _Hash(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _Hashtable(__l.begin(), __l.end(), __bkt_count_hint, + __hf, __eql, __a, __unique_keys{}) + { } + + _Hashtable& + operator=(const _Hashtable& __ht); + + _Hashtable& + operator=(_Hashtable&& __ht) + noexcept(__node_alloc_traits::_S_nothrow_move() + && is_nothrow_move_assignable<_Hash>::value + && is_nothrow_move_assignable<_Equal>::value) + { + constexpr bool __move_storage = + __node_alloc_traits::_S_propagate_on_move_assign() + || __node_alloc_traits::_S_always_equal(); + _M_move_assign(std::move(__ht), __bool_constant<__move_storage>()); + return *this; + } + + _Hashtable& + operator=(initializer_list __l) + { + __reuse_or_alloc_node_gen_t __roan(_M_begin(), *this); + _M_before_begin._M_nxt = nullptr; + clear(); + + + auto __l_bkt_count = _M_rehash_policy._M_bkt_for_elements(__l.size()); + + + if (_M_bucket_count < __l_bkt_count) + rehash(__l_bkt_count); + + this->_M_insert_range(__l.begin(), __l.end(), __roan, __unique_keys{}); + return *this; + } + + ~_Hashtable() noexcept; + + void + swap(_Hashtable&) + noexcept(__and_<__is_nothrow_swappable<_Hash>, + __is_nothrow_swappable<_Equal>>::value); + + + iterator + begin() noexcept + { return iterator(_M_begin()); } + + const_iterator + begin() const noexcept + { return const_iterator(_M_begin()); } + + iterator + end() noexcept + { return iterator(nullptr); } + + const_iterator + end() const noexcept + { return const_iterator(nullptr); } + + const_iterator + cbegin() const noexcept + { return const_iterator(_M_begin()); } + + const_iterator + cend() const noexcept + { return const_iterator(nullptr); } + + size_type + size() const noexcept + { return _M_element_count; } + + [[__nodiscard__]] bool + empty() const noexcept + { return size() == 0; } + + allocator_type + get_allocator() const noexcept + { return allocator_type(this->_M_node_allocator()); } + + size_type + max_size() const noexcept + { return __node_alloc_traits::max_size(this->_M_node_allocator()); } + + + key_equal + key_eq() const + { return this->_M_eq(); } + + + + + size_type + bucket_count() const noexcept + { return _M_bucket_count; } + + size_type + max_bucket_count() const noexcept + { return max_size(); } + + size_type + bucket_size(size_type __bkt) const + { return std::distance(begin(__bkt), end(__bkt)); } + + size_type + bucket(const key_type& __k) const + { return _M_bucket_index(this->_M_hash_code(__k)); } + + local_iterator + begin(size_type __bkt) + { + return local_iterator(*this, _M_bucket_begin(__bkt), + __bkt, _M_bucket_count); + } + + local_iterator + end(size_type __bkt) + { return local_iterator(*this, nullptr, __bkt, _M_bucket_count); } + + const_local_iterator + begin(size_type __bkt) const + { + return const_local_iterator(*this, _M_bucket_begin(__bkt), + __bkt, _M_bucket_count); + } + + const_local_iterator + end(size_type __bkt) const + { return const_local_iterator(*this, nullptr, __bkt, _M_bucket_count); } + + + const_local_iterator + cbegin(size_type __bkt) const + { + return const_local_iterator(*this, _M_bucket_begin(__bkt), + __bkt, _M_bucket_count); + } + + const_local_iterator + cend(size_type __bkt) const + { return const_local_iterator(*this, nullptr, __bkt, _M_bucket_count); } + + float + load_factor() const noexcept + { + return static_cast(size()) / static_cast(bucket_count()); + } + + + + + + + const _RehashPolicy& + __rehash_policy() const + { return _M_rehash_policy; } + + void + __rehash_policy(const _RehashPolicy& __pol) + { _M_rehash_policy = __pol; } + + + iterator + find(const key_type& __k); + + const_iterator + find(const key_type& __k) const; + + size_type + count(const key_type& __k) const; + + std::pair + equal_range(const key_type& __k); + + std::pair + equal_range(const key_type& __k) const; + + + + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + iterator + _M_find_tr(const _Kt& __k); + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + const_iterator + _M_find_tr(const _Kt& __k) const; + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + size_type + _M_count_tr(const _Kt& __k) const; + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + pair + _M_equal_range_tr(const _Kt& __k); + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + pair + _M_equal_range_tr(const _Kt& __k) const; + + + private: + + size_type + _M_bucket_index(const __node_value_type& __n) const noexcept + { return __hash_code_base::_M_bucket_index(__n, _M_bucket_count); } + + size_type + _M_bucket_index(__hash_code __c) const + { return __hash_code_base::_M_bucket_index(__c, _M_bucket_count); } + + + + __node_base_ptr + _M_find_before_node(size_type, const key_type&, __hash_code) const; + + template + __node_base_ptr + _M_find_before_node_tr(size_type, const _Kt&, __hash_code) const; + + __node_ptr + _M_find_node(size_type __bkt, const key_type& __key, + __hash_code __c) const + { + __node_base_ptr __before_n = _M_find_before_node(__bkt, __key, __c); + if (__before_n) + return static_cast<__node_ptr>(__before_n->_M_nxt); + return nullptr; + } + + template + __node_ptr + _M_find_node_tr(size_type __bkt, const _Kt& __key, + __hash_code __c) const + { + auto __before_n = _M_find_before_node_tr(__bkt, __key, __c); + if (__before_n) + return static_cast<__node_ptr>(__before_n->_M_nxt); + return nullptr; + } + + + void + _M_insert_bucket_begin(size_type, __node_ptr); + + + void + _M_remove_bucket_begin(size_type __bkt, __node_ptr __next_n, + size_type __next_bkt); + + + __node_base_ptr + _M_get_previous_node(size_type __bkt, __node_ptr __n); + + + + + iterator + _M_insert_unique_node(size_type __bkt, __hash_code, + __node_ptr __n, size_type __n_elt = 1); + + + + iterator + _M_insert_multi_node(__node_ptr __hint, + __hash_code __code, __node_ptr __n); + + template + std::pair + _M_emplace(true_type __uks, _Args&&... __args); + + template + iterator + _M_emplace(false_type __uks, _Args&&... __args) + { return _M_emplace(cend(), __uks, std::forward<_Args>(__args)...); } + + + template + iterator + _M_emplace(const_iterator, true_type __uks, _Args&&... __args) + { return _M_emplace(__uks, std::forward<_Args>(__args)...).first; } + + template + iterator + _M_emplace(const_iterator, false_type __uks, _Args&&... __args); + + template + std::pair + _M_insert(_Arg&&, const _NodeGenerator&, true_type __uks); + + template + iterator + _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, + false_type __uks) + { + return _M_insert(cend(), std::forward<_Arg>(__arg), __node_gen, + __uks); + } + + + template + iterator + _M_insert(const_iterator, _Arg&& __arg, + const _NodeGenerator& __node_gen, true_type __uks) + { + return + _M_insert(std::forward<_Arg>(__arg), __node_gen, __uks).first; + } + + + template + iterator + _M_insert(const_iterator, _Arg&&, + const _NodeGenerator&, false_type __uks); + + size_type + _M_erase(true_type __uks, const key_type&); + + size_type + _M_erase(false_type __uks, const key_type&); + + iterator + _M_erase(size_type __bkt, __node_base_ptr __prev_n, __node_ptr __n); + + public: + + template + __ireturn_type + emplace(_Args&&... __args) + { return _M_emplace(__unique_keys{}, std::forward<_Args>(__args)...); } + + template + iterator + emplace_hint(const_iterator __hint, _Args&&... __args) + { + return _M_emplace(__hint, __unique_keys{}, + std::forward<_Args>(__args)...); + } + + + + + iterator + erase(const_iterator); + + + iterator + erase(iterator __it) + { return erase(const_iterator(__it)); } + + size_type + erase(const key_type& __k) + { return _M_erase(__unique_keys{}, __k); } + + iterator + erase(const_iterator, const_iterator); + + void + clear() noexcept; + + + + void rehash(size_type __bkt_count); + + + + + + + insert_return_type + _M_reinsert_node(node_type&& __nh) + { + insert_return_type __ret; + if (__nh.empty()) + __ret.position = end(); + else + { + do { if (__builtin_is_constant_evaluated() && !bool(get_allocator() == __nh.get_allocator())) __builtin_unreachable(); } while (false); + + const key_type& __k = __nh._M_key(); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__code); + if (__node_ptr __n = _M_find_node(__bkt, __k, __code)) + { + __ret.node = std::move(__nh); + __ret.position = iterator(__n); + __ret.inserted = false; + } + else + { + __ret.position + = _M_insert_unique_node(__bkt, __code, __nh._M_ptr); + __nh._M_ptr = nullptr; + __ret.inserted = true; + } + } + return __ret; + } + + + iterator + _M_reinsert_node_multi(const_iterator __hint, node_type&& __nh) + { + if (__nh.empty()) + return end(); + + do { if (__builtin_is_constant_evaluated() && !bool(get_allocator() == __nh.get_allocator())) __builtin_unreachable(); } while (false); + + const key_type& __k = __nh._M_key(); + auto __code = this->_M_hash_code(__k); + auto __ret + = _M_insert_multi_node(__hint._M_cur, __code, __nh._M_ptr); + __nh._M_ptr = nullptr; + return __ret; + } + + private: + node_type + _M_extract_node(size_t __bkt, __node_base_ptr __prev_n) + { + __node_ptr __n = static_cast<__node_ptr>(__prev_n->_M_nxt); + if (__prev_n == _M_buckets[__bkt]) + _M_remove_bucket_begin(__bkt, __n->_M_next(), + __n->_M_nxt ? _M_bucket_index(*__n->_M_next()) : 0); + else if (__n->_M_nxt) + { + size_type __next_bkt = _M_bucket_index(*__n->_M_next()); + if (__next_bkt != __bkt) + _M_buckets[__next_bkt] = __prev_n; + } + + __prev_n->_M_nxt = __n->_M_nxt; + __n->_M_nxt = nullptr; + --_M_element_count; + return { __n, this->_M_node_allocator() }; + } + + public: + + node_type + extract(const_iterator __pos) + { + size_t __bkt = _M_bucket_index(*__pos._M_cur); + return _M_extract_node(__bkt, + _M_get_previous_node(__bkt, __pos._M_cur)); + } + + + node_type + extract(const _Key& __k) + { + node_type __nh; + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + if (__node_base_ptr __prev_node = _M_find_before_node(__bkt, __k, __code)) + __nh = _M_extract_node(__bkt, __prev_node); + return __nh; + } + + + template + void + _M_merge_unique(_Compatible_Hashtable& __src) noexcept + { + static_assert(is_same_v, "Node types are compatible"); + do { if (__builtin_is_constant_evaluated() && !bool(get_allocator() == __src.get_allocator())) __builtin_unreachable(); } while (false); + + auto __n_elt = __src.size(); + for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) + { + auto __pos = __i++; + const key_type& __k = _ExtractKey{}(*__pos); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__code); + if (_M_find_node(__bkt, __k, __code) == nullptr) + { + auto __nh = __src.extract(__pos); + _M_insert_unique_node(__bkt, __code, __nh._M_ptr, __n_elt); + __nh._M_ptr = nullptr; + __n_elt = 1; + } + else if (__n_elt != 1) + --__n_elt; + } + } + + + template + void + _M_merge_multi(_Compatible_Hashtable& __src) noexcept + { + static_assert(is_same_v, "Node types are compatible"); + do { if (__builtin_is_constant_evaluated() && !bool(get_allocator() == __src.get_allocator())) __builtin_unreachable(); } while (false); + + this->reserve(size() + __src.size()); + for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) + _M_reinsert_node_multi(cend(), __src.extract(__i++)); + } + + + private: + + void _M_rehash_aux(size_type __bkt_count, true_type __uks); + + + void _M_rehash_aux(size_type __bkt_count, false_type __uks); + + + + void _M_rehash(size_type __bkt_count, const __rehash_state& __state); + }; + + + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_bucket_begin(size_type __bkt) const + -> __node_ptr + { + __node_base_ptr __n = _M_buckets[__bkt]; + return __n ? static_cast<__node_ptr>(__n->_M_nxt) : nullptr; + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(size_type __bkt_count_hint, + const _Hash& __h, const _Equal& __eq, const allocator_type& __a) + : _Hashtable(__h, __eq, __a) + { + auto __bkt_count = _M_rehash_policy._M_next_bkt(__bkt_count_hint); + if (__bkt_count > _M_bucket_count) + { + _M_buckets = _M_allocate_buckets(__bkt_count); + _M_bucket_count = __bkt_count; + } + } + + template + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(_InputIterator __f, _InputIterator __l, + size_type __bkt_count_hint, + const _Hash& __h, const _Equal& __eq, + const allocator_type& __a, true_type ) + : _Hashtable(__bkt_count_hint, __h, __eq, __a) + { + for (; __f != __l; ++__f) + this->insert(*__f); + } + + template + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(_InputIterator __f, _InputIterator __l, + size_type __bkt_count_hint, + const _Hash& __h, const _Equal& __eq, + const allocator_type& __a, false_type ) + : _Hashtable(__h, __eq, __a) + { + auto __nb_elems = __detail::__distance_fw(__f, __l); + auto __bkt_count = + _M_rehash_policy._M_next_bkt( + std::max(_M_rehash_policy._M_bkt_for_elements(__nb_elems), + __bkt_count_hint)); + + if (__bkt_count > _M_bucket_count) + { + _M_buckets = _M_allocate_buckets(__bkt_count); + _M_bucket_count = __bkt_count; + } + + for (; __f != __l; ++__f) + this->insert(*__f); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + operator=(const _Hashtable& __ht) + -> _Hashtable& + { + if (&__ht == this) + return *this; + + if (__node_alloc_traits::_S_propagate_on_copy_assign()) + { + auto& __this_alloc = this->_M_node_allocator(); + auto& __that_alloc = __ht._M_node_allocator(); + if (!__node_alloc_traits::_S_always_equal() + && __this_alloc != __that_alloc) + { + + this->_M_deallocate_nodes(_M_begin()); + _M_before_begin._M_nxt = nullptr; + _M_deallocate_buckets(); + _M_buckets = nullptr; + std::__alloc_on_copy(__this_alloc, __that_alloc); + __hashtable_base::operator=(__ht); + _M_bucket_count = __ht._M_bucket_count; + _M_element_count = __ht._M_element_count; + _M_rehash_policy = __ht._M_rehash_policy; + __alloc_node_gen_t __alloc_node_gen(*this); + try + { + _M_assign(__ht, __alloc_node_gen); + } + catch(...) + { + + + _M_reset(); + throw; + } + return *this; + } + std::__alloc_on_copy(__this_alloc, __that_alloc); + } + + + _M_assign_elements(__ht); + return *this; + } + + template + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_assign_elements(_Ht&& __ht) + { + __buckets_ptr __former_buckets = nullptr; + std::size_t __former_bucket_count = _M_bucket_count; + const __rehash_state& __former_state = _M_rehash_policy._M_state(); + + if (_M_bucket_count != __ht._M_bucket_count) + { + __former_buckets = _M_buckets; + _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); + _M_bucket_count = __ht._M_bucket_count; + } + else + __builtin_memset(_M_buckets, 0, + _M_bucket_count * sizeof(__node_base_ptr)); + + try + { + __hashtable_base::operator=(std::forward<_Ht>(__ht)); + _M_element_count = __ht._M_element_count; + _M_rehash_policy = __ht._M_rehash_policy; + __reuse_or_alloc_node_gen_t __roan(_M_begin(), *this); + _M_before_begin._M_nxt = nullptr; + _M_assign(std::forward<_Ht>(__ht), __roan); + if (__former_buckets) + _M_deallocate_buckets(__former_buckets, __former_bucket_count); + } + catch(...) + { + if (__former_buckets) + { + + _M_deallocate_buckets(); + _M_rehash_policy._M_reset(__former_state); + _M_buckets = __former_buckets; + _M_bucket_count = __former_bucket_count; + } + __builtin_memset(_M_buckets, 0, + _M_bucket_count * sizeof(__node_base_ptr)); + throw; + } + } + + template + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_assign(_Ht&& __ht, const _NodeGenerator& __node_gen) + { + __buckets_ptr __buckets = nullptr; + if (!_M_buckets) + _M_buckets = __buckets = _M_allocate_buckets(_M_bucket_count); + + try + { + if (!__ht._M_before_begin._M_nxt) + return; + + + + __node_ptr __ht_n = __ht._M_begin(); + __node_ptr __this_n + = __node_gen(__fwd_value_for<_Ht>(__ht_n->_M_v())); + this->_M_copy_code(*__this_n, *__ht_n); + _M_update_bbegin(__this_n); + + + __node_ptr __prev_n = __this_n; + for (__ht_n = __ht_n->_M_next(); __ht_n; __ht_n = __ht_n->_M_next()) + { + __this_n = __node_gen(__fwd_value_for<_Ht>(__ht_n->_M_v())); + __prev_n->_M_nxt = __this_n; + this->_M_copy_code(*__this_n, *__ht_n); + size_type __bkt = _M_bucket_index(*__this_n); + if (!_M_buckets[__bkt]) + _M_buckets[__bkt] = __prev_n; + __prev_n = __this_n; + } + } + catch(...) + { + clear(); + if (__buckets) + _M_deallocate_buckets(); + throw; + } + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_reset() noexcept + { + _M_rehash_policy._M_reset(); + _M_bucket_count = 1; + _M_single_bucket = nullptr; + _M_buckets = &_M_single_bucket; + _M_before_begin._M_nxt = nullptr; + _M_element_count = 0; + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_move_assign(_Hashtable&& __ht, true_type) + { + if (__builtin_expect(std::__addressof(__ht) == this, false)) + return; + + this->_M_deallocate_nodes(_M_begin()); + _M_deallocate_buckets(); + __hashtable_base::operator=(std::move(__ht)); + _M_rehash_policy = __ht._M_rehash_policy; + if (!__ht._M_uses_single_bucket()) + _M_buckets = __ht._M_buckets; + else + { + _M_buckets = &_M_single_bucket; + _M_single_bucket = __ht._M_single_bucket; + } + + _M_bucket_count = __ht._M_bucket_count; + _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; + _M_element_count = __ht._M_element_count; + std::__alloc_on_move(this->_M_node_allocator(), __ht._M_node_allocator()); + + + _M_update_bbegin(); + __ht._M_reset(); + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_move_assign(_Hashtable&& __ht, false_type) + { + if (__ht._M_node_allocator() == this->_M_node_allocator()) + _M_move_assign(std::move(__ht), true_type{}); + else + { + + _M_assign_elements(std::move(__ht)); + __ht.clear(); + } + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(const _Hashtable& __ht) + : __hashtable_base(__ht), + __map_base(__ht), + __rehash_base(__ht), + __hashtable_alloc( + __node_alloc_traits::_S_select_on_copy(__ht._M_node_allocator())), + _M_buckets(nullptr), + _M_bucket_count(__ht._M_bucket_count), + _M_element_count(__ht._M_element_count), + _M_rehash_policy(__ht._M_rehash_policy) + { + __alloc_node_gen_t __alloc_node_gen(*this); + _M_assign(__ht, __alloc_node_gen); + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, + true_type ) + noexcept(_S_nothrow_move()) + : __hashtable_base(__ht), + __map_base(__ht), + __rehash_base(__ht), + __hashtable_alloc(std::move(__a)), + _M_buckets(__ht._M_buckets), + _M_bucket_count(__ht._M_bucket_count), + _M_before_begin(__ht._M_before_begin._M_nxt), + _M_element_count(__ht._M_element_count), + _M_rehash_policy(__ht._M_rehash_policy) + { + + if (__ht._M_uses_single_bucket()) + { + _M_buckets = &_M_single_bucket; + _M_single_bucket = __ht._M_single_bucket; + } + + + _M_update_bbegin(); + + __ht._M_reset(); + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(const _Hashtable& __ht, const allocator_type& __a) + : __hashtable_base(__ht), + __map_base(__ht), + __rehash_base(__ht), + __hashtable_alloc(__node_alloc_type(__a)), + _M_buckets(), + _M_bucket_count(__ht._M_bucket_count), + _M_element_count(__ht._M_element_count), + _M_rehash_policy(__ht._M_rehash_policy) + { + __alloc_node_gen_t __alloc_node_gen(*this); + _M_assign(__ht, __alloc_node_gen); + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, + false_type ) + : __hashtable_base(__ht), + __map_base(__ht), + __rehash_base(__ht), + __hashtable_alloc(std::move(__a)), + _M_buckets(nullptr), + _M_bucket_count(__ht._M_bucket_count), + _M_element_count(__ht._M_element_count), + _M_rehash_policy(__ht._M_rehash_policy) + { + if (__ht._M_node_allocator() == this->_M_node_allocator()) + { + if (__ht._M_uses_single_bucket()) + { + _M_buckets = &_M_single_bucket; + _M_single_bucket = __ht._M_single_bucket; + } + else + _M_buckets = __ht._M_buckets; + + + + _M_update_bbegin(__ht._M_begin()); + + __ht._M_reset(); + } + else + { + __alloc_node_gen_t __alloc_gen(*this); + + using _Fwd_Ht = typename + conditional<__move_if_noexcept_cond::value, + const _Hashtable&, _Hashtable&&>::type; + _M_assign(std::forward<_Fwd_Ht>(__ht), __alloc_gen); + __ht.clear(); + } + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + ~_Hashtable() noexcept + { + clear(); + _M_deallocate_buckets(); + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + swap(_Hashtable& __x) + noexcept(__and_<__is_nothrow_swappable<_Hash>, + __is_nothrow_swappable<_Equal>>::value) + { + + + + this->_M_swap(__x); + + std::__alloc_on_swap(this->_M_node_allocator(), __x._M_node_allocator()); + std::swap(_M_rehash_policy, __x._M_rehash_policy); + + + if (this->_M_uses_single_bucket()) + { + if (!__x._M_uses_single_bucket()) + { + _M_buckets = __x._M_buckets; + __x._M_buckets = &__x._M_single_bucket; + } + } + else if (__x._M_uses_single_bucket()) + { + __x._M_buckets = _M_buckets; + _M_buckets = &_M_single_bucket; + } + else + std::swap(_M_buckets, __x._M_buckets); + + std::swap(_M_bucket_count, __x._M_bucket_count); + std::swap(_M_before_begin._M_nxt, __x._M_before_begin._M_nxt); + std::swap(_M_element_count, __x._M_element_count); + std::swap(_M_single_bucket, __x._M_single_bucket); + + + + _M_update_bbegin(); + __x._M_update_bbegin(); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + find(const key_type& __k) + -> iterator + { + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + return iterator(_M_find_node(__bkt, __k, __code)); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + find(const key_type& __k) const + -> const_iterator + { + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + return const_iterator(_M_find_node(__bkt, __k, __code)); + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_find_tr(const _Kt& __k) + -> iterator + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + return iterator(_M_find_node_tr(__bkt, __k, __code)); + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_find_tr(const _Kt& __k) const + -> const_iterator + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + return const_iterator(_M_find_node_tr(__bkt, __k, __code)); + } + + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + count(const key_type& __k) const + -> size_type + { + auto __it = find(__k); + if (!__it._M_cur) + return 0; + + if (__unique_keys::value) + return 1; + + + + + size_type __result = 1; + for (auto __ref = __it++; + __it._M_cur && this->_M_node_equals(*__ref._M_cur, *__it._M_cur); + ++__it) + ++__result; + + return __result; + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_count_tr(const _Kt& __k) const + -> size_type + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + auto __n = _M_find_node_tr(__bkt, __k, __code); + if (!__n) + return 0; + + + + + iterator __it(__n); + size_type __result = 1; + for (++__it; + __it._M_cur && this->_M_equals_tr(__k, __code, *__it._M_cur); + ++__it) + ++__result; + + return __result; + } + + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + equal_range(const key_type& __k) + -> pair + { + auto __ite = find(__k); + if (!__ite._M_cur) + return { __ite, __ite }; + + auto __beg = __ite++; + if (__unique_keys::value) + return { __beg, __ite }; + + + + + while (__ite._M_cur && this->_M_node_equals(*__beg._M_cur, *__ite._M_cur)) + ++__ite; + + return { __beg, __ite }; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + equal_range(const key_type& __k) const + -> pair + { + auto __ite = find(__k); + if (!__ite._M_cur) + return { __ite, __ite }; + + auto __beg = __ite++; + if (__unique_keys::value) + return { __beg, __ite }; + + + + + while (__ite._M_cur && this->_M_node_equals(*__beg._M_cur, *__ite._M_cur)) + ++__ite; + + return { __beg, __ite }; + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_equal_range_tr(const _Kt& __k) + -> pair + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + auto __n = _M_find_node_tr(__bkt, __k, __code); + iterator __ite(__n); + if (!__n) + return { __ite, __ite }; + + + + + auto __beg = __ite++; + while (__ite._M_cur && this->_M_equals_tr(__k, __code, *__ite._M_cur)) + ++__ite; + + return { __beg, __ite }; + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_equal_range_tr(const _Kt& __k) const + -> pair + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + auto __n = _M_find_node_tr(__bkt, __k, __code); + const_iterator __ite(__n); + if (!__n) + return { __ite, __ite }; + + + + + auto __beg = __ite++; + while (__ite._M_cur && this->_M_equals_tr(__k, __code, *__ite._M_cur)) + ++__ite; + + return { __beg, __ite }; + } + + + + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_find_before_node(size_type __bkt, const key_type& __k, + __hash_code __code) const + -> __node_base_ptr + { + __node_base_ptr __prev_p = _M_buckets[__bkt]; + if (!__prev_p) + return nullptr; + + for (__node_ptr __p = static_cast<__node_ptr>(__prev_p->_M_nxt);; + __p = __p->_M_next()) + { + if (this->_M_equals(__k, __code, *__p)) + return __prev_p; + + if (!__p->_M_nxt || _M_bucket_index(*__p->_M_next()) != __bkt) + break; + __prev_p = __p; + } + + return nullptr; + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_find_before_node_tr(size_type __bkt, const _Kt& __k, + __hash_code __code) const + -> __node_base_ptr + { + __node_base_ptr __prev_p = _M_buckets[__bkt]; + if (!__prev_p) + return nullptr; + + for (__node_ptr __p = static_cast<__node_ptr>(__prev_p->_M_nxt);; + __p = __p->_M_next()) + { + if (this->_M_equals_tr(__k, __code, *__p)) + return __prev_p; + + if (!__p->_M_nxt || _M_bucket_index(*__p->_M_next()) != __bkt) + break; + __prev_p = __p; + } + + return nullptr; + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert_bucket_begin(size_type __bkt, __node_ptr __node) + { + if (_M_buckets[__bkt]) + { + + + __node->_M_nxt = _M_buckets[__bkt]->_M_nxt; + _M_buckets[__bkt]->_M_nxt = __node; + } + else + { + + + + __node->_M_nxt = _M_before_begin._M_nxt; + _M_before_begin._M_nxt = __node; + + if (__node->_M_nxt) + + + _M_buckets[_M_bucket_index(*__node->_M_next())] = __node; + + _M_buckets[__bkt] = &_M_before_begin; + } + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_remove_bucket_begin(size_type __bkt, __node_ptr __next, + size_type __next_bkt) + { + if (!__next || __next_bkt != __bkt) + { + + + if (__next) + _M_buckets[__next_bkt] = _M_buckets[__bkt]; + + + if (&_M_before_begin == _M_buckets[__bkt]) + _M_before_begin._M_nxt = __next; + _M_buckets[__bkt] = nullptr; + } + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_get_previous_node(size_type __bkt, __node_ptr __n) + -> __node_base_ptr + { + __node_base_ptr __prev_n = _M_buckets[__bkt]; + while (__prev_n->_M_nxt != __n) + __prev_n = __prev_n->_M_nxt; + return __prev_n; + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_emplace(true_type , _Args&&... __args) + -> pair + { + + _Scoped_node __node { this, std::forward<_Args>(__args)... }; + const key_type& __k = _ExtractKey{}(__node._M_node->_M_v()); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__code); + if (__node_ptr __p = _M_find_node(__bkt, __k, __code)) + + return std::make_pair(iterator(__p), false); + + + auto __pos = _M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return { __pos, true }; + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_emplace(const_iterator __hint, false_type , + _Args&&... __args) + -> iterator + { + + _Scoped_node __node { this, std::forward<_Args>(__args)... }; + const key_type& __k = _ExtractKey{}(__node._M_node->_M_v()); + + __hash_code __code = this->_M_hash_code(__k); + auto __pos + = _M_insert_multi_node(__hint._M_cur, __code, __node._M_node); + __node._M_node = nullptr; + return __pos; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert_unique_node(size_type __bkt, __hash_code __code, + __node_ptr __node, size_type __n_elt) + -> iterator + { + const __rehash_state& __saved_state = _M_rehash_policy._M_state(); + std::pair __do_rehash + = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, + __n_elt); + + if (__do_rehash.first) + { + _M_rehash(__do_rehash.second, __saved_state); + __bkt = _M_bucket_index(__code); + } + + this->_M_store_code(*__node, __code); + + + _M_insert_bucket_begin(__bkt, __node); + ++_M_element_count; + return iterator(__node); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert_multi_node(__node_ptr __hint, + __hash_code __code, __node_ptr __node) + -> iterator + { + const __rehash_state& __saved_state = _M_rehash_policy._M_state(); + std::pair __do_rehash + = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); + + if (__do_rehash.first) + _M_rehash(__do_rehash.second, __saved_state); + + this->_M_store_code(*__node, __code); + const key_type& __k = _ExtractKey{}(__node->_M_v()); + size_type __bkt = _M_bucket_index(__code); + + + + __node_base_ptr __prev + = __builtin_expect(__hint != nullptr, false) + && this->_M_equals(__k, __code, *__hint) + ? __hint + : _M_find_before_node(__bkt, __k, __code); + + if (__prev) + { + + __node->_M_nxt = __prev->_M_nxt; + __prev->_M_nxt = __node; + if (__builtin_expect(__prev == __hint, false)) + + + if (__node->_M_nxt + && !this->_M_equals(__k, __code, *__node->_M_next())) + { + size_type __next_bkt = _M_bucket_index(*__node->_M_next()); + if (__next_bkt != __bkt) + _M_buckets[__next_bkt] = __node; + } + } + else + + + + _M_insert_bucket_begin(__bkt, __node); + ++_M_element_count; + return iterator(__node); + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert(_Arg&& __v, const _NodeGenerator& __node_gen, + true_type ) + -> pair + { + const key_type& __k = _ExtractKey{}(__v); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__code); + + if (__node_ptr __node = _M_find_node(__bkt, __k, __code)) + return { iterator(__node), false }; + + _Scoped_node __node{ __node_gen(std::forward<_Arg>(__v)), this }; + auto __pos + = _M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return { __pos, true }; + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert(const_iterator __hint, _Arg&& __v, + const _NodeGenerator& __node_gen, + false_type ) + -> iterator + { + + + __hash_code __code = this->_M_hash_code(_ExtractKey{}(__v)); + + + _Scoped_node __node{ __node_gen(std::forward<_Arg>(__v)), this }; + auto __pos + = _M_insert_multi_node(__hint._M_cur, __code, __node._M_node); + __node._M_node = nullptr; + return __pos; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + erase(const_iterator __it) + -> iterator + { + __node_ptr __n = __it._M_cur; + std::size_t __bkt = _M_bucket_index(*__n); + + + + + __node_base_ptr __prev_n = _M_get_previous_node(__bkt, __n); + return _M_erase(__bkt, __prev_n, __n); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_erase(size_type __bkt, __node_base_ptr __prev_n, __node_ptr __n) + -> iterator + { + if (__prev_n == _M_buckets[__bkt]) + _M_remove_bucket_begin(__bkt, __n->_M_next(), + __n->_M_nxt ? _M_bucket_index(*__n->_M_next()) : 0); + else if (__n->_M_nxt) + { + size_type __next_bkt = _M_bucket_index(*__n->_M_next()); + if (__next_bkt != __bkt) + _M_buckets[__next_bkt] = __prev_n; + } + + __prev_n->_M_nxt = __n->_M_nxt; + iterator __result(__n->_M_next()); + this->_M_deallocate_node(__n); + --_M_element_count; + + return __result; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_erase(true_type , const key_type& __k) + -> size_type + { + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + + + __node_base_ptr __prev_n = _M_find_before_node(__bkt, __k, __code); + if (!__prev_n) + return 0; + + + __node_ptr __n = static_cast<__node_ptr>(__prev_n->_M_nxt); + _M_erase(__bkt, __prev_n, __n); + return 1; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_erase(false_type , const key_type& __k) + -> size_type + { + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + + + __node_base_ptr __prev_n = _M_find_before_node(__bkt, __k, __code); + if (!__prev_n) + return 0; + + + + + + + + __node_ptr __n = static_cast<__node_ptr>(__prev_n->_M_nxt); + __node_ptr __n_last = __n->_M_next(); + while (__n_last && this->_M_node_equals(*__n, *__n_last)) + __n_last = __n_last->_M_next(); + + std::size_t __n_last_bkt = __n_last ? _M_bucket_index(*__n_last) : __bkt; + + + size_type __result = 0; + do + { + __node_ptr __p = __n->_M_next(); + this->_M_deallocate_node(__n); + __n = __p; + ++__result; + } + while (__n != __n_last); + + _M_element_count -= __result; + if (__prev_n == _M_buckets[__bkt]) + _M_remove_bucket_begin(__bkt, __n_last, __n_last_bkt); + else if (__n_last_bkt != __bkt) + _M_buckets[__n_last_bkt] = __prev_n; + __prev_n->_M_nxt = __n_last; + return __result; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + erase(const_iterator __first, const_iterator __last) + -> iterator + { + __node_ptr __n = __first._M_cur; + __node_ptr __last_n = __last._M_cur; + if (__n == __last_n) + return iterator(__n); + + std::size_t __bkt = _M_bucket_index(*__n); + + __node_base_ptr __prev_n = _M_get_previous_node(__bkt, __n); + bool __is_bucket_begin = __n == _M_bucket_begin(__bkt); + std::size_t __n_bkt = __bkt; + for (;;) + { + do + { + __node_ptr __tmp = __n; + __n = __n->_M_next(); + this->_M_deallocate_node(__tmp); + --_M_element_count; + if (!__n) + break; + __n_bkt = _M_bucket_index(*__n); + } + while (__n != __last_n && __n_bkt == __bkt); + if (__is_bucket_begin) + _M_remove_bucket_begin(__bkt, __n, __n_bkt); + if (__n == __last_n) + break; + __is_bucket_begin = true; + __bkt = __n_bkt; + } + + if (__n && (__n_bkt != __bkt || __is_bucket_begin)) + _M_buckets[__n_bkt] = __prev_n; + __prev_n->_M_nxt = __n; + return iterator(__n); + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + clear() noexcept + { + this->_M_deallocate_nodes(_M_begin()); + __builtin_memset(_M_buckets, 0, + _M_bucket_count * sizeof(__node_base_ptr)); + _M_element_count = 0; + _M_before_begin._M_nxt = nullptr; + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + rehash(size_type __bkt_count) + { + const __rehash_state& __saved_state = _M_rehash_policy._M_state(); + __bkt_count + = std::max(_M_rehash_policy._M_bkt_for_elements(_M_element_count + 1), + __bkt_count); + __bkt_count = _M_rehash_policy._M_next_bkt(__bkt_count); + + if (__bkt_count != _M_bucket_count) + _M_rehash(__bkt_count, __saved_state); + else + + + _M_rehash_policy._M_reset(__saved_state); + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_rehash(size_type __bkt_count, const __rehash_state& __state) + { + try + { + _M_rehash_aux(__bkt_count, __unique_keys{}); + } + catch(...) + { + + + _M_rehash_policy._M_reset(__state); + throw; + } + } + + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_rehash_aux(size_type __bkt_count, true_type ) + { + __buckets_ptr __new_buckets = _M_allocate_buckets(__bkt_count); + __node_ptr __p = _M_begin(); + _M_before_begin._M_nxt = nullptr; + std::size_t __bbegin_bkt = 0; + while (__p) + { + __node_ptr __next = __p->_M_next(); + std::size_t __bkt + = __hash_code_base::_M_bucket_index(*__p, __bkt_count); + if (!__new_buckets[__bkt]) + { + __p->_M_nxt = _M_before_begin._M_nxt; + _M_before_begin._M_nxt = __p; + __new_buckets[__bkt] = &_M_before_begin; + if (__p->_M_nxt) + __new_buckets[__bbegin_bkt] = __p; + __bbegin_bkt = __bkt; + } + else + { + __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; + __new_buckets[__bkt]->_M_nxt = __p; + } + + __p = __next; + } + + _M_deallocate_buckets(); + _M_bucket_count = __bkt_count; + _M_buckets = __new_buckets; + } + + + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_rehash_aux(size_type __bkt_count, false_type ) + { + __buckets_ptr __new_buckets = _M_allocate_buckets(__bkt_count); + __node_ptr __p = _M_begin(); + _M_before_begin._M_nxt = nullptr; + std::size_t __bbegin_bkt = 0; + std::size_t __prev_bkt = 0; + __node_ptr __prev_p = nullptr; + bool __check_bucket = false; + + while (__p) + { + __node_ptr __next = __p->_M_next(); + std::size_t __bkt + = __hash_code_base::_M_bucket_index(*__p, __bkt_count); + + if (__prev_p && __prev_bkt == __bkt) + { + + + + __p->_M_nxt = __prev_p->_M_nxt; + __prev_p->_M_nxt = __p; + + + + + + + __check_bucket = true; + } + else + { + if (__check_bucket) + { + + + if (__prev_p->_M_nxt) + { + std::size_t __next_bkt + = __hash_code_base::_M_bucket_index( + *__prev_p->_M_next(), __bkt_count); + if (__next_bkt != __prev_bkt) + __new_buckets[__next_bkt] = __prev_p; + } + __check_bucket = false; + } + + if (!__new_buckets[__bkt]) + { + __p->_M_nxt = _M_before_begin._M_nxt; + _M_before_begin._M_nxt = __p; + __new_buckets[__bkt] = &_M_before_begin; + if (__p->_M_nxt) + __new_buckets[__bbegin_bkt] = __p; + __bbegin_bkt = __bkt; + } + else + { + __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; + __new_buckets[__bkt]->_M_nxt = __p; + } + } + __prev_p = __p; + __prev_bkt = __bkt; + __p = __next; + } + + if (__check_bucket && __prev_p->_M_nxt) + { + std::size_t __next_bkt + = __hash_code_base::_M_bucket_index(*__prev_p->_M_next(), + __bkt_count); + if (__next_bkt != __prev_bkt) + __new_buckets[__next_bkt] = __prev_p; + } + + _M_deallocate_buckets(); + _M_bucket_count = __bkt_count; + _M_buckets = __new_buckets; + } + + + template class _Hash_merge_helper { }; + + + + + template + using _RequireNotAllocatorOrIntegral + = __enable_if_t, __is_allocator<_Hash>>::value>; + + + +} +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 +namespace std +{ + + + + + template + using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>; + + template, + typename _Pred = std::equal_to<_Key>, + typename _Alloc = std::allocator >, + typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>> + using __umap_hashtable = _Hashtable<_Key, std::pair, + _Alloc, __detail::_Select1st, + _Pred, _Hash, + __detail::_Mod_range_hashing, + __detail::_Default_ranged_hash, + __detail::_Prime_rehash_policy, _Tr>; + + + template + using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>; + + template, + typename _Pred = std::equal_to<_Key>, + typename _Alloc = std::allocator >, + typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>> + using __ummap_hashtable = _Hashtable<_Key, std::pair, + _Alloc, __detail::_Select1st, + _Pred, _Hash, + __detail::_Mod_range_hashing, + __detail::_Default_ranged_hash, + __detail::_Prime_rehash_policy, _Tr>; + + template + class unordered_multimap; +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template, + typename _Pred = equal_to<_Key>, + typename _Alloc = allocator>> + class unordered_map + { + typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; + _Hashtable _M_h; + + public: + + + + typedef typename _Hashtable::key_type key_type; + typedef typename _Hashtable::value_type value_type; + typedef typename _Hashtable::mapped_type mapped_type; + typedef typename _Hashtable::hasher hasher; + typedef typename _Hashtable::key_equal key_equal; + typedef typename _Hashtable::allocator_type allocator_type; + + + + + typedef typename _Hashtable::pointer pointer; + typedef typename _Hashtable::const_pointer const_pointer; + typedef typename _Hashtable::reference reference; + typedef typename _Hashtable::const_reference const_reference; + typedef typename _Hashtable::iterator iterator; + typedef typename _Hashtable::const_iterator const_iterator; + typedef typename _Hashtable::local_iterator local_iterator; + typedef typename _Hashtable::const_local_iterator const_local_iterator; + typedef typename _Hashtable::size_type size_type; + typedef typename _Hashtable::difference_type difference_type; + + + + using node_type = typename _Hashtable::node_type; + using insert_return_type = typename _Hashtable::insert_return_type; + + + + + + unordered_map() = default; +# 150 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + explicit + unordered_map(size_type __n, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__n, __hf, __eql, __a) + { } +# 171 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n = 0, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__first, __last, __n, __hf, __eql, __a) + { } + + + unordered_map(const unordered_map&) = default; + + + unordered_map(unordered_map&&) = default; + + + + + + explicit + unordered_map(const allocator_type& __a) + : _M_h(__a) + { } + + + + + + + unordered_map(const unordered_map& __umap, + const allocator_type& __a) + : _M_h(__umap._M_h, __a) + { } + + + + + + + unordered_map(unordered_map&& __umap, + const allocator_type& __a) + noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) ) + : _M_h(std::move(__umap._M_h), __a) + { } +# 227 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + unordered_map(initializer_list __l, + size_type __n = 0, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__l, __n, __hf, __eql, __a) + { } + + unordered_map(size_type __n, const allocator_type& __a) + : unordered_map(__n, hasher(), key_equal(), __a) + { } + + unordered_map(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__n, __hf, key_equal(), __a) + { } + + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_map(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__l, __n, __hf, key_equal(), __a) + { } + + + unordered_map& + operator=(const unordered_map&) = default; + + + unordered_map& + operator=(unordered_map&&) = default; +# 289 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + unordered_map& + operator=(initializer_list __l) + { + _M_h = __l; + return *this; + } + + + allocator_type + get_allocator() const noexcept + { return _M_h.get_allocator(); } + + + + + [[__nodiscard__]] bool + empty() const noexcept + { return _M_h.empty(); } + + + size_type + size() const noexcept + { return _M_h.size(); } + + + size_type + max_size() const noexcept + { return _M_h.max_size(); } + + + + + + + + iterator + begin() noexcept + { return _M_h.begin(); } + + + + + + + const_iterator + begin() const noexcept + { return _M_h.begin(); } + + const_iterator + cbegin() const noexcept + { return _M_h.begin(); } + + + + + + + iterator + end() noexcept + { return _M_h.end(); } + + + + + + + const_iterator + end() const noexcept + { return _M_h.end(); } + + const_iterator + cend() const noexcept + { return _M_h.end(); } +# 386 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + std::pair + emplace(_Args&&... __args) + { return _M_h.emplace(std::forward<_Args>(__args)...); } +# 417 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + emplace_hint(const_iterator __pos, _Args&&... __args) + { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } + + + + node_type + extract(const_iterator __pos) + { + do { if (__builtin_is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); + return _M_h.extract(__pos); + } + + + node_type + extract(const key_type& __key) + { return _M_h.extract(__key); } + + + insert_return_type + insert(node_type&& __nh) + { return _M_h._M_reinsert_node(std::move(__nh)); } + + + iterator + insert(const_iterator, node_type&& __nh) + { return _M_h._M_reinsert_node(std::move(__nh)).position; } +# 469 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + pair + try_emplace(const key_type& __k, _Args&&... __args) + { + return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...); + } + + + template + pair + try_emplace(key_type&& __k, _Args&&... __args) + { + return _M_h.try_emplace(cend(), std::move(__k), + std::forward<_Args>(__args)...); + } +# 513 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + try_emplace(const_iterator __hint, const key_type& __k, + _Args&&... __args) + { + return _M_h.try_emplace(__hint, __k, + std::forward<_Args>(__args)...).first; + } + + + template + iterator + try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) + { + return _M_h.try_emplace(__hint, std::move(__k), + std::forward<_Args>(__args)...).first; + } +# 550 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + std::pair + insert(const value_type& __x) + { return _M_h.insert(__x); } + + + + std::pair + insert(value_type&& __x) + { return _M_h.insert(std::move(__x)); } + + template + __enable_if_t::value, + pair> + insert(_Pair&& __x) + { return _M_h.emplace(std::forward<_Pair>(__x)); } +# 589 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + insert(const_iterator __hint, const value_type& __x) + { return _M_h.insert(__hint, __x); } + + + + iterator + insert(const_iterator __hint, value_type&& __x) + { return _M_h.insert(__hint, std::move(__x)); } + + template + __enable_if_t::value, iterator> + insert(const_iterator __hint, _Pair&& __x) + { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); } +# 614 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_h.insert(__first, __last); } +# 626 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + insert(initializer_list __l) + { _M_h.insert(__l); } +# 652 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + pair + insert_or_assign(const key_type& __k, _Obj&& __obj) + { + auto __ret = _M_h.try_emplace(cend(), __k, + std::forward<_Obj>(__obj)); + if (!__ret.second) + __ret.first->second = std::forward<_Obj>(__obj); + return __ret; + } + + + template + pair + insert_or_assign(key_type&& __k, _Obj&& __obj) + { + auto __ret = _M_h.try_emplace(cend(), std::move(__k), + std::forward<_Obj>(__obj)); + if (!__ret.second) + __ret.first->second = std::forward<_Obj>(__obj); + return __ret; + } +# 701 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + insert_or_assign(const_iterator __hint, const key_type& __k, + _Obj&& __obj) + { + auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj)); + if (!__ret.second) + __ret.first->second = std::forward<_Obj>(__obj); + return __ret.first; + } + + + template + iterator + insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) + { + auto __ret = _M_h.try_emplace(__hint, std::move(__k), + std::forward<_Obj>(__obj)); + if (!__ret.second) + __ret.first->second = std::forward<_Obj>(__obj); + return __ret.first; + } +# 739 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + erase(const_iterator __position) + { return _M_h.erase(__position); } + + + iterator + erase(iterator __position) + { return _M_h.erase(__position); } +# 761 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + size_type + erase(const key_type& __x) + { return _M_h.erase(__x); } +# 779 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + erase(const_iterator __first, const_iterator __last) + { return _M_h.erase(__first, __last); } + + + + + + + + void + clear() noexcept + { _M_h.clear(); } +# 803 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + swap(unordered_map& __x) + noexcept( noexcept(_M_h.swap(__x._M_h)) ) + { _M_h.swap(__x._M_h); } + + + template + friend class std::_Hash_merge_helper; + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper = _Hash_merge_helper; + _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper = _Hash_merge_helper; + _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + + + + + + hasher + hash_function() const + { return _M_h.hash_function(); } + + + + key_equal + key_eq() const + { return _M_h.key_eq(); } +# 867 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + find(const key_type& __x) + { return _M_h.find(__x); } + + + template + auto + find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) + { return _M_h._M_find_tr(__x); } + + + const_iterator + find(const key_type& __x) const + { return _M_h.find(__x); } + + + template + auto + find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) + { return _M_h._M_find_tr(__x); } +# 900 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + size_type + count(const key_type& __x) const + { return _M_h.count(__x); } + + + template + auto + count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) + { return _M_h._M_count_tr(__x); } +# 919 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + bool + contains(const key_type& __x) const + { return _M_h.find(__x) != _M_h.end(); } + + template + auto + contains(const _Kt& __x) const + -> decltype(_M_h._M_find_tr(__x), void(), true) + { return _M_h._M_find_tr(__x) != _M_h.end(); } +# 940 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_h.equal_range(__x); } + + + template + auto + equal_range(const _Kt& __x) + -> decltype(_M_h._M_equal_range_tr(__x)) + { return _M_h._M_equal_range_tr(__x); } + + + std::pair + equal_range(const key_type& __x) const + { return _M_h.equal_range(__x); } + + + template + auto + equal_range(const _Kt& __x) const + -> decltype(_M_h._M_equal_range_tr(__x)) + { return _M_h._M_equal_range_tr(__x); } +# 978 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + mapped_type& + operator[](const key_type& __k) + { return _M_h[__k]; } + + mapped_type& + operator[](key_type&& __k) + { return _M_h[std::move(__k)]; } +# 995 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + mapped_type& + at(const key_type& __k) + { return _M_h.at(__k); } + + const mapped_type& + at(const key_type& __k) const + { return _M_h.at(__k); } + + + + + + size_type + bucket_count() const noexcept + { return _M_h.bucket_count(); } + + + size_type + max_bucket_count() const noexcept + { return _M_h.max_bucket_count(); } + + + + + + + size_type + bucket_size(size_type __n) const + { return _M_h.bucket_size(__n); } + + + + + + + size_type + bucket(const key_type& __key) const + { return _M_h.bucket(__key); } + + + + + + + + local_iterator + begin(size_type __n) + { return _M_h.begin(__n); } +# 1051 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + const_local_iterator + begin(size_type __n) const + { return _M_h.begin(__n); } + + const_local_iterator + cbegin(size_type __n) const + { return _M_h.cbegin(__n); } +# 1066 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + local_iterator + end(size_type __n) + { return _M_h.end(__n); } +# 1077 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + const_local_iterator + end(size_type __n) const + { return _M_h.end(__n); } + + const_local_iterator + cend(size_type __n) const + { return _M_h.cend(__n); } + + + + + + float + load_factor() const noexcept + { return _M_h.load_factor(); } + + + + float + max_load_factor() const noexcept + { return _M_h.max_load_factor(); } + + + + + + void + max_load_factor(float __z) + { _M_h.max_load_factor(__z); } +# 1114 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + rehash(size_type __n) + { _M_h.rehash(__n); } +# 1125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + reserve(size_type __n) + { _M_h.reserve(__n); } + + template + friend bool + operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, + const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); + }; + + + + template>, + typename _Pred = equal_to<__iter_key_t<_InputIterator>>, + typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireNotAllocator<_Pred>, + typename = _RequireAllocator<_Allocator>> + unordered_map(_InputIterator, _InputIterator, + typename unordered_map::size_type = {}, + _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) + -> unordered_map<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + _Hash, _Pred, _Allocator>; + + template, + typename _Pred = equal_to<_Key>, + typename _Allocator = allocator>, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireNotAllocator<_Pred>, + typename = _RequireAllocator<_Allocator>> + unordered_map(initializer_list>, + typename unordered_map::size_type = {}, + _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) + -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_map(_InputIterator, _InputIterator, + typename unordered_map::size_type, _Allocator) + -> unordered_map<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + hash<__iter_key_t<_InputIterator>>, + equal_to<__iter_key_t<_InputIterator>>, + _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_map(_InputIterator, _InputIterator, _Allocator) + -> unordered_map<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + hash<__iter_key_t<_InputIterator>>, + equal_to<__iter_key_t<_InputIterator>>, + _Allocator>; + + template, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireAllocator<_Allocator>> + unordered_map(_InputIterator, _InputIterator, + typename unordered_map::size_type, + _Hash, _Allocator) + -> unordered_map<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, _Hash, + equal_to<__iter_key_t<_InputIterator>>, _Allocator>; + + template> + unordered_map(initializer_list>, + typename unordered_map::size_type, + _Allocator) + -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; + + template> + unordered_map(initializer_list>, _Allocator) + -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_map(initializer_list>, + typename unordered_map::size_type, + _Hash, _Allocator) + -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; +# 1241 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template, + typename _Pred = equal_to<_Key>, + typename _Alloc = allocator>> + class unordered_multimap + { + typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; + _Hashtable _M_h; + + public: + + + + typedef typename _Hashtable::key_type key_type; + typedef typename _Hashtable::value_type value_type; + typedef typename _Hashtable::mapped_type mapped_type; + typedef typename _Hashtable::hasher hasher; + typedef typename _Hashtable::key_equal key_equal; + typedef typename _Hashtable::allocator_type allocator_type; + + + + + typedef typename _Hashtable::pointer pointer; + typedef typename _Hashtable::const_pointer const_pointer; + typedef typename _Hashtable::reference reference; + typedef typename _Hashtable::const_reference const_reference; + typedef typename _Hashtable::iterator iterator; + typedef typename _Hashtable::const_iterator const_iterator; + typedef typename _Hashtable::local_iterator local_iterator; + typedef typename _Hashtable::const_local_iterator const_local_iterator; + typedef typename _Hashtable::size_type size_type; + typedef typename _Hashtable::difference_type difference_type; + + + + using node_type = typename _Hashtable::node_type; + + + + + + unordered_multimap() = default; +# 1292 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + explicit + unordered_multimap(size_type __n, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__n, __hf, __eql, __a) + { } +# 1313 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n = 0, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__first, __last, __n, __hf, __eql, __a) + { } + + + unordered_multimap(const unordered_multimap&) = default; + + + unordered_multimap(unordered_multimap&&) = default; + + + + + + explicit + unordered_multimap(const allocator_type& __a) + : _M_h(__a) + { } + + + + + + + unordered_multimap(const unordered_multimap& __ummap, + const allocator_type& __a) + : _M_h(__ummap._M_h, __a) + { } + + + + + + + unordered_multimap(unordered_multimap&& __ummap, + const allocator_type& __a) + noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) ) + : _M_h(std::move(__ummap._M_h), __a) + { } +# 1369 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + unordered_multimap(initializer_list __l, + size_type __n = 0, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__l, __n, __hf, __eql, __a) + { } + + unordered_multimap(size_type __n, const allocator_type& __a) + : unordered_multimap(__n, hasher(), key_equal(), __a) + { } + + unordered_multimap(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__n, __hf, key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__l, __n, __hf, key_equal(), __a) + { } + + + unordered_multimap& + operator=(const unordered_multimap&) = default; + + + unordered_multimap& + operator=(unordered_multimap&&) = default; +# 1431 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + unordered_multimap& + operator=(initializer_list __l) + { + _M_h = __l; + return *this; + } + + + allocator_type + get_allocator() const noexcept + { return _M_h.get_allocator(); } + + + + + [[__nodiscard__]] bool + empty() const noexcept + { return _M_h.empty(); } + + + size_type + size() const noexcept + { return _M_h.size(); } + + + size_type + max_size() const noexcept + { return _M_h.max_size(); } + + + + + + + + iterator + begin() noexcept + { return _M_h.begin(); } + + + + + + + const_iterator + begin() const noexcept + { return _M_h.begin(); } + + const_iterator + cbegin() const noexcept + { return _M_h.begin(); } + + + + + + + iterator + end() noexcept + { return _M_h.end(); } + + + + + + + const_iterator + end() const noexcept + { return _M_h.end(); } + + const_iterator + cend() const noexcept + { return _M_h.end(); } +# 1523 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + emplace(_Args&&... __args) + { return _M_h.emplace(std::forward<_Args>(__args)...); } +# 1550 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + emplace_hint(const_iterator __pos, _Args&&... __args) + { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } +# 1565 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + insert(const value_type& __x) + { return _M_h.insert(__x); } + + iterator + insert(value_type&& __x) + { return _M_h.insert(std::move(__x)); } + + template + __enable_if_t::value, iterator> + insert(_Pair&& __x) + { return _M_h.emplace(std::forward<_Pair>(__x)); } +# 1599 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + insert(const_iterator __hint, const value_type& __x) + { return _M_h.insert(__hint, __x); } + + + + iterator + insert(const_iterator __hint, value_type&& __x) + { return _M_h.insert(__hint, std::move(__x)); } + + template + __enable_if_t::value, iterator> + insert(const_iterator __hint, _Pair&& __x) + { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); } +# 1624 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_h.insert(__first, __last); } +# 1637 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + insert(initializer_list __l) + { _M_h.insert(__l); } + + + + node_type + extract(const_iterator __pos) + { + do { if (__builtin_is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); + return _M_h.extract(__pos); + } + + + node_type + extract(const key_type& __key) + { return _M_h.extract(__key); } + + + iterator + insert(node_type&& __nh) + { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); } + + + iterator + insert(const_iterator __hint, node_type&& __nh) + { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); } +# 1680 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + erase(const_iterator __position) + { return _M_h.erase(__position); } + + + iterator + erase(iterator __position) + { return _M_h.erase(__position); } +# 1701 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + size_type + erase(const key_type& __x) + { return _M_h.erase(__x); } +# 1720 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + erase(const_iterator __first, const_iterator __last) + { return _M_h.erase(__first, __last); } + + + + + + + + void + clear() noexcept + { _M_h.clear(); } +# 1744 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + swap(unordered_multimap& __x) + noexcept( noexcept(_M_h.swap(__x._M_h)) ) + { _M_h.swap(__x._M_h); } + + + template + friend class std::_Hash_merge_helper; + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper + = _Hash_merge_helper; + _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper + = _Hash_merge_helper; + _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + + + + + + hasher + hash_function() const + { return _M_h.hash_function(); } + + + + key_equal + key_eq() const + { return _M_h.key_eq(); } +# 1810 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + find(const key_type& __x) + { return _M_h.find(__x); } + + + template + auto + find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) + { return _M_h._M_find_tr(__x); } + + + const_iterator + find(const key_type& __x) const + { return _M_h.find(__x); } + + + template + auto + find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) + { return _M_h._M_find_tr(__x); } +# 1839 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + size_type + count(const key_type& __x) const + { return _M_h.count(__x); } + + + template + auto + count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) + { return _M_h._M_count_tr(__x); } +# 1858 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + bool + contains(const key_type& __x) const + { return _M_h.find(__x) != _M_h.end(); } + + template + auto + contains(const _Kt& __x) const + -> decltype(_M_h._M_find_tr(__x), void(), true) + { return _M_h._M_find_tr(__x) != _M_h.end(); } +# 1877 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_h.equal_range(__x); } + + + template + auto + equal_range(const _Kt& __x) + -> decltype(_M_h._M_equal_range_tr(__x)) + { return _M_h._M_equal_range_tr(__x); } + + + std::pair + equal_range(const key_type& __x) const + { return _M_h.equal_range(__x); } + + + template + auto + equal_range(const _Kt& __x) const + -> decltype(_M_h._M_equal_range_tr(__x)) + { return _M_h._M_equal_range_tr(__x); } + + + + + + + size_type + bucket_count() const noexcept + { return _M_h.bucket_count(); } + + + size_type + max_bucket_count() const noexcept + { return _M_h.max_bucket_count(); } + + + + + + + size_type + bucket_size(size_type __n) const + { return _M_h.bucket_size(__n); } + + + + + + + size_type + bucket(const key_type& __key) const + { return _M_h.bucket(__key); } + + + + + + + + local_iterator + begin(size_type __n) + { return _M_h.begin(__n); } +# 1949 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + const_local_iterator + begin(size_type __n) const + { return _M_h.begin(__n); } + + const_local_iterator + cbegin(size_type __n) const + { return _M_h.cbegin(__n); } +# 1964 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + local_iterator + end(size_type __n) + { return _M_h.end(__n); } +# 1975 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + const_local_iterator + end(size_type __n) const + { return _M_h.end(__n); } + + const_local_iterator + cend(size_type __n) const + { return _M_h.cend(__n); } + + + + + + float + load_factor() const noexcept + { return _M_h.load_factor(); } + + + + float + max_load_factor() const noexcept + { return _M_h.max_load_factor(); } + + + + + + void + max_load_factor(float __z) + { _M_h.max_load_factor(__z); } +# 2012 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + rehash(size_type __n) + { _M_h.rehash(__n); } +# 2023 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + reserve(size_type __n) + { _M_h.reserve(__n); } + + template + friend bool + operator==(const unordered_multimap<_Key1, _Tp1, + _Hash1, _Pred1, _Alloc1>&, + const unordered_multimap<_Key1, _Tp1, + _Hash1, _Pred1, _Alloc1>&); + }; + + + + template>, + typename _Pred = equal_to<__iter_key_t<_InputIterator>>, + typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireNotAllocator<_Pred>, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(_InputIterator, _InputIterator, + unordered_multimap::size_type = {}, + _Hash = _Hash(), _Pred = _Pred(), + _Allocator = _Allocator()) + -> unordered_multimap<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, _Hash, _Pred, + _Allocator>; + + template, + typename _Pred = equal_to<_Key>, + typename _Allocator = allocator>, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireNotAllocator<_Pred>, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(initializer_list>, + unordered_multimap::size_type = {}, + _Hash = _Hash(), _Pred = _Pred(), + _Allocator = _Allocator()) + -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(_InputIterator, _InputIterator, + unordered_multimap::size_type, _Allocator) + -> unordered_multimap<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + hash<__iter_key_t<_InputIterator>>, + equal_to<__iter_key_t<_InputIterator>>, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(_InputIterator, _InputIterator, _Allocator) + -> unordered_multimap<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + hash<__iter_key_t<_InputIterator>>, + equal_to<__iter_key_t<_InputIterator>>, _Allocator>; + + template, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(_InputIterator, _InputIterator, + unordered_multimap::size_type, _Hash, + _Allocator) + -> unordered_multimap<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, _Hash, + equal_to<__iter_key_t<_InputIterator>>, _Allocator>; + + template> + unordered_multimap(initializer_list>, + unordered_multimap::size_type, + _Allocator) + -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; + + template> + unordered_multimap(initializer_list>, _Allocator) + -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(initializer_list>, + unordered_multimap::size_type, + _Hash, _Allocator) + -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; + + + + template + inline void + swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + template + inline void + swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + template + inline bool + operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + { return __x._M_h._M_equal(__y._M_h); } +# 2146 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + inline bool + operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + { return __x._M_h._M_equal(__y._M_h); } +# 2160 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + + + + + template + struct _Hash_merge_helper< + std::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>, + _Hash2, _Eq2> + { + private: + template + using unordered_map = std::unordered_map<_Tp...>; + template + using unordered_multimap = std::unordered_multimap<_Tp...>; + + friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; + + static auto& + _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + + static auto& + _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + }; + + + template + struct _Hash_merge_helper< + std::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>, + _Hash2, _Eq2> + { + private: + template + using unordered_map = std::unordered_map<_Tp...>; + template + using unordered_multimap = std::unordered_multimap<_Tp...>; + + friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; + + static auto& + _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + + static auto& + _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + }; + + + +} +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/erase_if.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/erase_if.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/erase_if.h" 3 + + + + + +namespace std +{ + + + + + + + namespace __detail + { + template + typename _Container::size_type + __erase_nodes_if(_Container& __cont, _Predicate __pred) + { + typename _Container::size_type __num = 0; + for (auto __iter = __cont.begin(), __last = __cont.end(); + __iter != __last;) + { + if (__pred(*__iter)) + { + __iter = __cont.erase(__iter); + ++__num; + } + else + ++__iter; + } + return __num; + } + } + + +} +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 2 3 + + + + + + +namespace std +{ + + namespace pmr + { + template class polymorphic_allocator; + template, + typename _Pred = std::equal_to<_Key>> + using unordered_map + = std::unordered_map<_Key, _Tp, _Hash, _Pred, + polymorphic_allocator>>; + template, + typename _Pred = std::equal_to<_Key>> + using unordered_multimap + = std::unordered_multimap<_Key, _Tp, _Hash, _Pred, + polymorphic_allocator>>; + } + +} + + + +namespace std +{ + + template + inline typename unordered_map<_Key, _Tp, _Hash, _CPred, _Alloc>::size_type + erase_if(unordered_map<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont, + _Predicate __pred) + { return __detail::__erase_nodes_if(__cont, __pred); } + + template + inline typename unordered_multimap<_Key, _Tp, _Hash, _CPred, _Alloc>:: + size_type + erase_if(unordered_multimap<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont, + _Predicate __pred) + { return __detail::__erase_nodes_if(__cont, __pred); } + +} +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 1 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 3 + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 3 + + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 1 3 +# 70 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 +namespace std +{ + + + + + + + + + template + struct __uninitialized_copy + { + template + static _ForwardIterator + __uninit_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, (void)++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_copy + { + template + static _ForwardIterator + __uninit_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { return std::copy(__first, __last, __result); } + }; +# 124 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + + + + + + static_assert(is_constructible<_ValueType2, decltype(*__first)>::value, + "result type must be constructible from value type of input range"); + + typedef typename iterator_traits<_InputIterator>::reference _RefType1; + typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; + + + const bool __assignable = is_assignable<_RefType2, _RefType1>::value; + + + return std::__uninitialized_copy<__is_trivial(_ValueType1) + && __is_trivial(_ValueType2) + && __assignable>:: + __uninit_copy(__first, __last, __result); + } + + + + template + struct __uninitialized_fill + { + template + static void + __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill + { + template + static void + __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { std::fill(__first, __last, __x); } + }; +# 199 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + + + + static_assert(is_constructible<_ValueType, const _Tp&>::value, + "result type must be constructible from input type"); + + + + const bool __assignable = is_copy_assignable<_ValueType>::value; + + + std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: + __uninit_fill(__first, __last, __x); + } + + + + template + struct __uninitialized_fill_n + { + template + static _ForwardIterator + __uninit_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, (void) ++__cur) + std::_Construct(std::__addressof(*__cur), __x); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill_n + { + template + static _ForwardIterator + __uninit_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { return std::fill_n(__first, __n, __x); } + }; +# 271 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; +# 288 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + static_assert(is_constructible<_ValueType, const _Tp&>::value, + "result type must be constructible from input type"); + + + + constexpr bool __can_fill + = __and_, is_copy_assignable<_ValueType>>::value; + + return __uninitialized_fill_n<__is_trivial(_ValueType) && __can_fill>:: + __uninit_fill_n(__first, __n, __x); + } +# 308 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + _ForwardIterator __cur = __result; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __first != __last; ++__first, (void)++__cur) + __traits::construct(__alloc, std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur, __alloc); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, allocator<_Tp>&) + { return std::uninitialized_copy(__first, __last, __result); } + + template + inline _ForwardIterator + __uninitialized_move_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + return std::__uninitialized_copy_a(std::make_move_iterator(__first), + std::make_move_iterator(__last), + __result, __alloc); + } + + template + inline _ForwardIterator + __uninitialized_move_if_noexcept_a(_InputIterator __first, + _InputIterator __last, + _ForwardIterator __result, + _Allocator& __alloc) + { + return std::__uninitialized_copy_a + (std::__make_move_if_noexcept_iterator(__first), + std::__make_move_if_noexcept_iterator(__last), __result, __alloc); + } + + template + void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __cur != __last; ++__cur) + __traits::construct(__alloc, std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill(__first, __last, __x); } + + template + _ForwardIterator + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __n > 0; --__n, (void) ++__cur) + __traits::construct(__alloc, std::__addressof(*__cur), __x); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, allocator<_Tp2>&) + { return std::uninitialized_fill_n(__first, __n, __x); } +# 422 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + __uninitialized_copy_move(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + + template + inline _ForwardIterator + __uninitialized_move_copy(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline _ForwardIterator + __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, + const _Tp& __x, _InputIterator __first, + _InputIterator __last, _Allocator& __alloc) + { + std::__uninitialized_fill_a(__result, __mid, __x, __alloc); + try + { + return std::__uninitialized_move_a(__first, __last, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline void + __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x, + _Allocator& __alloc) + { + _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, + __first2, + __alloc); + try + { + std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); + } + catch(...) + { + std::_Destroy(__first2, __mid2, __alloc); + throw; + } + } +# 529 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + struct __uninitialized_default_1 + { + template + static void + __uninit_default(_ForwardIterator __first, _ForwardIterator __last) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(std::__addressof(*__cur)); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_default_1 + { + template + static void + __uninit_default(_ForwardIterator __first, _ForwardIterator __last) + { + if (__first == __last) + return; + + typename iterator_traits<_ForwardIterator>::value_type* __val + = std::__addressof(*__first); + std::_Construct(__val); + if (++__first != __last) + std::fill(__first, __last, *__val); + } + }; + + template + struct __uninitialized_default_n_1 + { + template + static _ForwardIterator + __uninit_default_n(_ForwardIterator __first, _Size __n) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, (void) ++__cur) + std::_Construct(std::__addressof(*__cur)); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_default_n_1 + { + template + static _ForwardIterator + __uninit_default_n(_ForwardIterator __first, _Size __n) + { + if (__n > 0) + { + typename iterator_traits<_ForwardIterator>::value_type* __val + = std::__addressof(*__first); + std::_Construct(__val); + ++__first; + __first = std::fill_n(__first, __n - 1, *__val); + } + return __first; + } + }; + + + + template + inline void + __uninitialized_default(_ForwardIterator __first, + _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + const bool __assignable = is_copy_assignable<_ValueType>::value; + + std::__uninitialized_default_1<__is_trivial(_ValueType) + && __assignable>:: + __uninit_default(__first, __last); + } + + + + template + inline _ForwardIterator + __uninitialized_default_n(_ForwardIterator __first, _Size __n) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + constexpr bool __can_fill + = __and_, is_copy_assignable<_ValueType>>::value; + + return __uninitialized_default_n_1<__is_trivial(_ValueType) + && __can_fill>:: + __uninit_default_n(__first, __n); + } + + + + + + template + void + __uninitialized_default_a(_ForwardIterator __first, + _ForwardIterator __last, + _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __cur != __last; ++__cur) + __traits::construct(__alloc, std::__addressof(*__cur)); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_default_a(_ForwardIterator __first, + _ForwardIterator __last, + allocator<_Tp>&) + { std::__uninitialized_default(__first, __last); } + + + + + + template + _ForwardIterator + __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, + _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __n > 0; --__n, (void) ++__cur) + __traits::construct(__alloc, std::__addressof(*__cur)); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + + + template + inline _ForwardIterator + __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, + allocator<_Tp>&) + { return std::__uninitialized_default_n(__first, __n); } + + template + struct __uninitialized_default_novalue_1 + { + template + static void + __uninit_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct_novalue(std::__addressof(*__cur)); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_default_novalue_1 + { + template + static void + __uninit_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + } + }; + + template + struct __uninitialized_default_novalue_n_1 + { + template + static _ForwardIterator + __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, (void) ++__cur) + std::_Construct_novalue(std::__addressof(*__cur)); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_default_novalue_n_1 + { + template + static _ForwardIterator + __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) + { return std::next(__first, __n); } + }; + + + + template + inline void + __uninitialized_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_default_novalue_1< + is_trivially_default_constructible<_ValueType>::value>:: + __uninit_default_novalue(__first, __last); + } + + + + template + inline _ForwardIterator + __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + return __uninitialized_default_novalue_n_1< + is_trivially_default_constructible<_ValueType>::value>:: + __uninit_default_novalue_n(__first, __n); + } + + template + _ForwardIterator + __uninitialized_copy_n(_InputIterator __first, _Size __n, + _ForwardIterator __result, input_iterator_tag) + { + _ForwardIterator __cur = __result; + try + { + for (; __n > 0; --__n, (void) ++__first, ++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, + _ForwardIterator __result, + random_access_iterator_tag) + { return std::uninitialized_copy(__first, __first + __n, __result); } + + template + pair<_InputIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, + _ForwardIterator __result, input_iterator_tag) + { + _ForwardIterator __cur = __result; + try + { + for (; __n > 0; --__n, (void) ++__first, ++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return {__first, __cur}; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + + template + inline pair<_RandomAccessIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, + _ForwardIterator __result, + random_access_iterator_tag) + { + auto __second_res = uninitialized_copy(__first, __first + __n, __result); + auto __first_res = std::next(__first, __n); + return {__first_res, __second_res}; + } +# 870 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_copy_n(_InputIterator __first, _Size __n, + _ForwardIterator __result) + { return std::__uninitialized_copy_n(__first, __n, __result, + std::__iterator_category(__first)); } + + + template + inline pair<_InputIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, + _ForwardIterator __result) + { + return + std::__uninitialized_copy_n_pair(__first, __n, __result, + std::__iterator_category(__first)); + } +# 898 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_default_construct(_ForwardIterator __first, + _ForwardIterator __last) + { + __uninitialized_default_novalue(__first, __last); + } + + + + + + + + template + inline _ForwardIterator + uninitialized_default_construct_n(_ForwardIterator __first, _Size __count) + { + return __uninitialized_default_novalue_n(__first, __count); + } + + + + + + + template + inline void + uninitialized_value_construct(_ForwardIterator __first, + _ForwardIterator __last) + { + return __uninitialized_default(__first, __last); + } + + + + + + + + template + inline _ForwardIterator + uninitialized_value_construct_n(_ForwardIterator __first, _Size __count) + { + return __uninitialized_default_n(__first, __count); + } +# 952 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_move(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + return std::uninitialized_copy + (std::make_move_iterator(__first), + std::make_move_iterator(__last), __result); + } +# 969 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline pair<_InputIterator, _ForwardIterator> + uninitialized_move_n(_InputIterator __first, _Size __count, + _ForwardIterator __result) + { + auto __res = std::__uninitialized_copy_n_pair + (std::make_move_iterator(__first), + __count, __result); + return {__res.first.base(), __res.second}; + } + + + + + + template + inline void + __relocate_object_a(_Tp* __restrict __dest, _Up* __restrict __orig, + _Allocator& __alloc) + noexcept(noexcept(std::allocator_traits<_Allocator>::construct(__alloc, + __dest, std::move(*__orig))) + && noexcept(std::allocator_traits<_Allocator>::destroy( + __alloc, std::__addressof(*__orig)))) + { + typedef std::allocator_traits<_Allocator> __traits; + __traits::construct(__alloc, __dest, std::move(*__orig)); + __traits::destroy(__alloc, std::__addressof(*__orig)); + } + + + + template + struct __is_bitwise_relocatable + : is_trivial<_Tp> { }; + + template + inline __enable_if_t::value, _Tp*> + __relocate_a_1(_Tp* __first, _Tp* __last, + _Tp* __result, allocator<_Up>&) noexcept + { + ptrdiff_t __count = __last - __first; + if (__count > 0) + __builtin_memmove(__result, __first, __count * sizeof(_Tp)); + return __result + __count; + } + + template + inline _ForwardIterator + __relocate_a_1(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + noexcept(noexcept(std::__relocate_object_a(std::addressof(*__result), + std::addressof(*__first), + __alloc))) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + static_assert(std::is_same<_ValueType, _ValueType2>::value, + "relocation is only possible for values of the same type"); + _ForwardIterator __cur = __result; + for (; __first != __last; ++__first, (void)++__cur) + std::__relocate_object_a(std::__addressof(*__cur), + std::__addressof(*__first), __alloc); + return __cur; + } + + template + inline _ForwardIterator + __relocate_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + noexcept(noexcept(__relocate_a_1(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result), __alloc))) + { + return __relocate_a_1(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result), __alloc); + } + + + + + + + +} +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 1 3 +# 77 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 +namespace std +{ + + + + + template + struct _Vector_base + { + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_Tp>::other _Tp_alloc_type; + typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer + pointer; + + struct _Vector_impl_data + { + pointer _M_start; + pointer _M_finish; + pointer _M_end_of_storage; + + _Vector_impl_data() noexcept + : _M_start(), _M_finish(), _M_end_of_storage() + { } + + + _Vector_impl_data(_Vector_impl_data&& __x) noexcept + : _M_start(__x._M_start), _M_finish(__x._M_finish), + _M_end_of_storage(__x._M_end_of_storage) + { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); } + + + void + _M_copy_data(_Vector_impl_data const& __x) noexcept + { + _M_start = __x._M_start; + _M_finish = __x._M_finish; + _M_end_of_storage = __x._M_end_of_storage; + } + + void + _M_swap_data(_Vector_impl_data& __x) noexcept + { + + + _Vector_impl_data __tmp; + __tmp._M_copy_data(*this); + _M_copy_data(__x); + __x._M_copy_data(__tmp); + } + }; + + struct _Vector_impl + : public _Tp_alloc_type, public _Vector_impl_data + { + _Vector_impl() noexcept(is_nothrow_default_constructible<_Tp_alloc_type>::value) + + : _Tp_alloc_type() + { } + + _Vector_impl(_Tp_alloc_type const& __a) noexcept + : _Tp_alloc_type(__a) + { } + + + + + _Vector_impl(_Vector_impl&& __x) noexcept + : _Tp_alloc_type(std::move(__x)), _Vector_impl_data(std::move(__x)) + { } + + _Vector_impl(_Tp_alloc_type&& __a) noexcept + : _Tp_alloc_type(std::move(__a)) + { } + + _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept + : _Tp_alloc_type(std::move(__a)), _Vector_impl_data(std::move(__rv)) + { } +# 270 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + }; + + public: + typedef _Alloc allocator_type; + + _Tp_alloc_type& + _M_get_Tp_allocator() noexcept + { return this->_M_impl; } + + const _Tp_alloc_type& + _M_get_Tp_allocator() const noexcept + { return this->_M_impl; } + + allocator_type + get_allocator() const noexcept + { return allocator_type(_M_get_Tp_allocator()); } + + + _Vector_base() = default; + + + + + _Vector_base(const allocator_type& __a) noexcept + : _M_impl(__a) { } + + + + _Vector_base(size_t __n) + : _M_impl() + { _M_create_storage(__n); } + + + _Vector_base(size_t __n, const allocator_type& __a) + : _M_impl(__a) + { _M_create_storage(__n); } + + + _Vector_base(_Vector_base&&) = default; + + + + _Vector_base(_Tp_alloc_type&& __a) noexcept + : _M_impl(std::move(__a)) { } + + _Vector_base(_Vector_base&& __x, const allocator_type& __a) + : _M_impl(__a) + { + if (__x.get_allocator() == __a) + this->_M_impl._M_swap_data(__x._M_impl); + else + { + size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; + _M_create_storage(__n); + } + } + + + _Vector_base(const allocator_type& __a, _Vector_base&& __x) + : _M_impl(_Tp_alloc_type(__a), std::move(__x._M_impl)) + { } + + + ~_Vector_base() noexcept + { + _M_deallocate(_M_impl._M_start, + _M_impl._M_end_of_storage - _M_impl._M_start); + } + + public: + _Vector_impl _M_impl; + + pointer + _M_allocate(size_t __n) + { + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; + return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); + } + + void + _M_deallocate(pointer __p, size_t __n) + { + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; + if (__p) + _Tr::deallocate(_M_impl, __p, __n); + } + + protected: + void + _M_create_storage(size_t __n) + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + }; +# 388 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template > + class vector : protected _Vector_base<_Tp, _Alloc> + { +# 401 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + static_assert(is_same::type, _Tp>::value, + "std::vector must have a non-const, non-volatile value_type"); + + static_assert(is_same::value, + "std::vector must have the same value_type as its allocator"); + + + + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; + + public: + typedef _Tp value_type; + typedef typename _Base::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + private: + + static constexpr bool + _S_nothrow_relocate(true_type) + { + return noexcept(std::__relocate_a(std::declval(), + std::declval(), + std::declval(), + std::declval<_Tp_alloc_type&>())); + } + + static constexpr bool + _S_nothrow_relocate(false_type) + { return false; } + + static constexpr bool + _S_use_relocate() + { + + + + return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{}); + } + + static pointer + _S_do_relocate(pointer __first, pointer __last, pointer __result, + _Tp_alloc_type& __alloc, true_type) noexcept + { + return std::__relocate_a(__first, __last, __result, __alloc); + } + + static pointer + _S_do_relocate(pointer, pointer, pointer __result, + _Tp_alloc_type&, false_type) noexcept + { return __result; } + + static pointer + _S_relocate(pointer __first, pointer __last, pointer __result, + _Tp_alloc_type& __alloc) noexcept + { + using __do_it = __bool_constant<_S_use_relocate()>; + return _S_do_relocate(__first, __last, __result, __alloc, __do_it{}); + } + + + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_impl; + using _Base::_M_get_Tp_allocator; + + public: + + + + + + + + vector() = default; +# 496 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + explicit + vector(const allocator_type& __a) noexcept + : _Base(__a) { } +# 509 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + explicit + vector(size_type __n, const allocator_type& __a = allocator_type()) + : _Base(_S_check_init_len(__n, __a), __a) + { _M_default_initialize(__n); } +# 522 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector(size_type __n, const value_type& __value, + const allocator_type& __a = allocator_type()) + : _Base(_S_check_init_len(__n, __a), __a) + { _M_fill_initialize(__n, __value); } +# 553 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector(const vector& __x) + : _Base(__x.size(), + _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) + { + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } +# 572 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector(vector&&) noexcept = default; + + + vector(const vector& __x, const allocator_type& __a) + : _Base(__x.size(), __a) + { + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + + private: + vector(vector&& __rv, const allocator_type& __m, true_type) noexcept + : _Base(__m, std::move(__rv)) + { } + + vector(vector&& __rv, const allocator_type& __m, false_type) + : _Base(__m) + { + if (__rv.get_allocator() == __m) + this->_M_impl._M_swap_data(__rv._M_impl); + else if (!__rv.empty()) + { + this->_M_create_storage(__rv.size()); + this->_M_impl._M_finish = + std::__uninitialized_move_a(__rv.begin(), __rv.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + __rv.clear(); + } + } + + public: + + vector(vector&& __rv, const allocator_type& __m) + noexcept( noexcept( + vector(std::declval(), std::declval(), + std::declval())) ) + : vector(std::move(__rv), __m, typename _Alloc_traits::is_always_equal{}) + { } +# 625 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector(initializer_list __l, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_range_initialize(__l.begin(), __l.end(), + random_access_iterator_tag()); + } +# 651 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template> + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_range_initialize(__first, __last, + std::__iterator_category(__first)); + } +# 678 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + ~vector() noexcept + { + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + } +# 694 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector& + operator=(const vector& __x); +# 708 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector& + operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) + { + constexpr bool __move_storage = + _Alloc_traits::_S_propagate_on_move_assign() + || _Alloc_traits::_S_always_equal(); + _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); + return *this; + } +# 729 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector& + operator=(initializer_list __l) + { + this->_M_assign_aux(__l.begin(), __l.end(), + random_access_iterator_tag()); + return *this; + } +# 748 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 765 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template> + void + assign(_InputIterator __first, _InputIterator __last) + { _M_assign_dispatch(__first, __last, __false_type()); } +# 793 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + assign(initializer_list __l) + { + this->_M_assign_aux(__l.begin(), __l.end(), + random_access_iterator_tag()); + } + + + + using _Base::get_allocator; + + + + + + + + iterator + begin() noexcept + { return iterator(this->_M_impl._M_start); } + + + + + + + const_iterator + begin() const noexcept + { return const_iterator(this->_M_impl._M_start); } + + + + + + + iterator + end() noexcept + { return iterator(this->_M_impl._M_finish); } + + + + + + + const_iterator + end() const noexcept + { return const_iterator(this->_M_impl._M_finish); } + + + + + + + reverse_iterator + rbegin() noexcept + { return reverse_iterator(end()); } + + + + + + + const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(end()); } + + + + + + + reverse_iterator + rend() noexcept + { return reverse_iterator(begin()); } + + + + + + + const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(begin()); } + + + + + + + + const_iterator + cbegin() const noexcept + { return const_iterator(this->_M_impl._M_start); } + + + + + + + const_iterator + cend() const noexcept + { return const_iterator(this->_M_impl._M_finish); } + + + + + + + const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(end()); } + + + + + + + const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(begin()); } + + + + + size_type + size() const noexcept + { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } + + + size_type + max_size() const noexcept + { return _S_max_size(_M_get_Tp_allocator()); } +# 936 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + resize(size_type __new_size) + { + if (__new_size > size()) + _M_default_append(__new_size - size()); + else if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + } +# 956 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + resize(size_type __new_size, const value_type& __x) + { + if (__new_size > size()) + _M_fill_insert(end(), __new_size - size(), __x); + else if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + } +# 988 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + shrink_to_fit() + { _M_shrink_to_fit(); } + + + + + + + size_type + capacity() const noexcept + { return size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + + + + + + [[__nodiscard__]] bool + empty() const noexcept + { return begin() == end(); } +# 1027 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + reserve(size_type __n); +# 1042 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + reference + operator[](size_type __n) noexcept + { + ; + return *(this->_M_impl._M_start + __n); + } +# 1060 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + const_reference + operator[](size_type __n) const noexcept + { + ; + return *(this->_M_impl._M_start + __n); + } + + protected: + + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") + + , + __n, this->size()); + } + + public: +# 1091 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } +# 1109 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + + + + + + reference + front() noexcept + { + ; + return *begin(); + } + + + + + + const_reference + front() const noexcept + { + ; + return *begin(); + } + + + + + + reference + back() noexcept + { + ; + return *(end() - 1); + } + + + + + + const_reference + back() const noexcept + { + ; + return *(end() - 1); + } +# 1167 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + _Tp* + data() noexcept + { return _M_data_ptr(this->_M_impl._M_start); } + + const _Tp* + data() const noexcept + { return _M_data_ptr(this->_M_impl._M_start); } +# 1186 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + __x); + ++this->_M_impl._M_finish; + ; + } + else + _M_realloc_insert(end(), __x); + } + + + void + push_back(value_type&& __x) + { emplace_back(std::move(__x)); } + + template + + reference + + + + emplace_back(_Args&&... __args); +# 1224 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + pop_back() noexcept + { + ; + --this->_M_impl._M_finish; + _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); + ; + } +# 1246 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + iterator + emplace(const_iterator __position, _Args&&... __args) + { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } +# 1262 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + insert(const_iterator __position, const value_type& __x); +# 1292 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + insert(const_iterator __position, value_type&& __x) + { return _M_insert_rval(__position, std::move(__x)); } +# 1309 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + insert(const_iterator __position, initializer_list __l) + { + auto __offset = __position - cbegin(); + _M_range_insert(begin() + __offset, __l.begin(), __l.end(), + std::random_access_iterator_tag()); + return begin() + __offset; + } +# 1334 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + insert(const_iterator __position, size_type __n, const value_type& __x) + { + difference_type __offset = __position - cbegin(); + _M_fill_insert(begin() + __offset, __n, __x); + return begin() + __offset; + } +# 1376 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template> + iterator + insert(const_iterator __position, _InputIterator __first, + _InputIterator __last) + { + difference_type __offset = __position - cbegin(); + _M_insert_dispatch(begin() + __offset, + __first, __last, __false_type()); + return begin() + __offset; + } +# 1428 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + + erase(const_iterator __position) + { return _M_erase(begin() + (__position - cbegin())); } +# 1455 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + + erase(const_iterator __first, const_iterator __last) + { + const auto __beg = begin(); + const auto __cbeg = cbegin(); + return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); + } +# 1479 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + swap(vector& __x) noexcept + { + + do { if (__builtin_is_constant_evaluated() && !bool(_Alloc_traits::propagate_on_container_swap::value || _M_get_Tp_allocator() == __x._M_get_Tp_allocator())) __builtin_unreachable(); } while (false) + ; + + this->_M_impl._M_swap_data(__x._M_impl); + _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + + + + + + + void + clear() noexcept + { _M_erase_at_end(this->_M_impl._M_start); } + + protected: + + + + + template + pointer + _M_allocate_and_copy(size_type __n, + _ForwardIterator __first, _ForwardIterator __last) + { + pointer __result = this->_M_allocate(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __result, + _M_get_Tp_allocator()); + return __result; + } + catch(...) + { + _M_deallocate(__result, __n); + throw; + } + } +# 1556 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + void + _M_range_initialize(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + try { + for (; __first != __last; ++__first) + + emplace_back(*__first); + + + + } catch(...) { + clear(); + throw; + } + } + + + template + void + _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_impl._M_start + = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + + + + void + _M_fill_initialize(size_type __n, const value_type& __value) + { + this->_M_impl._M_finish = + std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, + _M_get_Tp_allocator()); + } + + + + void + _M_default_initialize(size_type __n) + { + this->_M_impl._M_finish = + std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, + _M_get_Tp_allocator()); + } +# 1618 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } + + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); + + + + void + _M_fill_assign(size_type __n, const value_type& __val); + + + + + + + + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, __n, __val); } + + + template + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, + _InputIterator __last, __false_type) + { + _M_range_insert(__pos, __first, __last, + std::__iterator_category(__first)); + } + + + template + void + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + + + template + void + _M_range_insert(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + + + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + + + + void + _M_default_append(size_type __n); + + bool + _M_shrink_to_fit(); +# 1705 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + struct _Temporary_value + { + template + explicit + _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) + { + _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), + std::forward<_Args>(__args)...); + } + + ~_Temporary_value() + { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } + + value_type& + _M_val() { return *_M_ptr(); } + + private: + _Tp* + _M_ptr() { return reinterpret_cast<_Tp*>(&__buf); } + + vector* _M_this; + typename aligned_storage::type __buf; + }; + + + + template + void + _M_insert_aux(iterator __position, _Arg&& __arg); + + template + void + _M_realloc_insert(iterator __position, _Args&&... __args); + + + iterator + _M_insert_rval(const_iterator __position, value_type&& __v); + + + template + iterator + _M_emplace_aux(const_iterator __position, _Args&&... __args); + + + iterator + _M_emplace_aux(const_iterator __position, value_type&& __v) + { return _M_insert_rval(__position, std::move(__v)); } + + + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + (std::max)(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + + static size_type + _S_check_init_len(size_type __n, const allocator_type& __a) + { + if (__n > _S_max_size(_Tp_alloc_type(__a))) + __throw_length_error( + ("cannot create std::vector larger than max_size()")); + return __n; + } + + static size_type + _S_max_size(const _Tp_alloc_type& __a) noexcept + { + + + + const size_t __diffmax + = __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + const size_t __allocmax = _Alloc_traits::max_size(__a); + return (std::min)(__diffmax, __allocmax); + } + + + + + + void + _M_erase_at_end(pointer __pos) noexcept + { + if (size_type __n = this->_M_impl._M_finish - __pos) + { + std::_Destroy(__pos, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __pos; + ; + } + } + + iterator + _M_erase(iterator __position); + + iterator + _M_erase(iterator __first, iterator __last); + + + private: + + + + void + _M_move_assign(vector&& __x, true_type) noexcept + { + vector __tmp(get_allocator()); + this->_M_impl._M_swap_data(__x._M_impl); + __tmp._M_impl._M_swap_data(__x._M_impl); + std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); + } + + + + void + _M_move_assign(vector&& __x, false_type) + { + if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) + _M_move_assign(std::move(__x), true_type()); + else + { + + + this->_M_assign_aux(std::make_move_iterator(__x.begin()), + std::make_move_iterator(__x.end()), + std::random_access_iterator_tag()); + __x.clear(); + } + } + + + template + _Up* + _M_data_ptr(_Up* __ptr) const noexcept + { return __ptr; } + + + template + typename std::pointer_traits<_Ptr>::element_type* + _M_data_ptr(_Ptr __ptr) const + { return empty() ? nullptr : std::__to_address(__ptr); } +# 1868 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + }; + + + template::value_type, + typename _Allocator = allocator<_ValT>, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireAllocator<_Allocator>> + vector(_InputIterator, _InputIterator, _Allocator = _Allocator()) + -> vector<_ValT, _Allocator>; +# 1890 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + inline bool + operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return (__x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin())); } +# 1908 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + inline __detail::__synth3way_t<_Tp> + operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { + return std::lexicographical_compare_three_way(__x.begin(), __x.end(), + __y.begin(), __y.end(), + __detail::__synth3way); + } +# 1960 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + inline void + swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + + + + namespace __detail::__variant + { + template struct _Never_valueless_alt; + + + + template + struct _Never_valueless_alt> + : std::is_nothrow_move_assignable> + { }; + } + + + +} +# 68 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 1 3 +# 64 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 +namespace std +{ + + + + typedef unsigned long _Bit_type; + enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; + + struct _Bit_reference + { + _Bit_type * _M_p; + _Bit_type _M_mask; + + _Bit_reference(_Bit_type * __x, _Bit_type __y) + : _M_p(__x), _M_mask(__y) { } + + _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } + + + _Bit_reference(const _Bit_reference&) = default; + + + operator bool() const noexcept + { return !!(*_M_p & _M_mask); } + + _Bit_reference& + operator=(bool __x) noexcept + { + if (__x) + *_M_p |= _M_mask; + else + *_M_p &= ~_M_mask; + return *this; + } + + _Bit_reference& + operator=(const _Bit_reference& __x) noexcept + { return *this = bool(__x); } + + bool + operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + + bool + operator<(const _Bit_reference& __x) const + { return !bool(*this) && bool(__x); } + + void + flip() noexcept + { *_M_p ^= _M_mask; } + }; + + + inline void + swap(_Bit_reference __x, _Bit_reference __y) noexcept + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + inline void + swap(_Bit_reference __x, bool& __y) noexcept + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + inline void + swap(bool& __x, _Bit_reference __y) noexcept + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + + struct _Bit_iterator_base + : public std::iterator + { + _Bit_type * _M_p; + unsigned int _M_offset; + + _Bit_iterator_base(_Bit_type * __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) { } + + void + _M_bump_up() + { + if (_M_offset++ == int(_S_word_bit) - 1) + { + _M_offset = 0; + ++_M_p; + } + } + + void + _M_bump_down() + { + if (_M_offset-- == 0) + { + _M_offset = int(_S_word_bit) - 1; + --_M_p; + } + } + + void + _M_incr(ptrdiff_t __i) + { + difference_type __n = __i + _M_offset; + _M_p += __n / int(_S_word_bit); + __n = __n % int(_S_word_bit); + if (__n < 0) + { + __n += int(_S_word_bit); + --_M_p; + } + _M_offset = static_cast(__n); + } + + friend constexpr bool + operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { return __x._M_p == __y._M_p && __x._M_offset == __y._M_offset; } + + + friend constexpr strong_ordering + operator<=>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + noexcept + { + if (const auto __cmp = __x._M_p <=> __y._M_p; __cmp != 0) + return __cmp; + return __x._M_offset <=> __y._M_offset; + } +# 223 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + friend ptrdiff_t + operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { + return (int(_S_word_bit) * (__x._M_p - __y._M_p) + + __x._M_offset - __y._M_offset); + } + }; + + struct _Bit_iterator : public _Bit_iterator_base + { + typedef _Bit_reference reference; + + typedef void pointer; + + + + typedef _Bit_iterator iterator; + + _Bit_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + iterator + _M_const_cast() const + { return *this; } + + reference + operator*() const + { return reference(_M_p, 1UL << _M_offset); } + + iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + iterator + operator++(int) + { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + iterator + operator--(int) + { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + reference + operator[](difference_type __i) const + { return *(*this + __i); } + + friend iterator + operator+(const iterator& __x, difference_type __n) + { + iterator __tmp = __x; + __tmp += __n; + return __tmp; + } + + friend iterator + operator+(difference_type __n, const iterator& __x) + { return __x + __n; } + + friend iterator + operator-(const iterator& __x, difference_type __n) + { + iterator __tmp = __x; + __tmp -= __n; + return __tmp; + } + }; + + struct _Bit_const_iterator : public _Bit_iterator_base + { + typedef bool reference; + typedef bool const_reference; + + typedef void pointer; + + + + typedef _Bit_const_iterator const_iterator; + + _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_const_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) { } + + _Bit_iterator + _M_const_cast() const + { return _Bit_iterator(_M_p, _M_offset); } + + const_reference + operator*() const + { return _Bit_reference(_M_p, 1UL << _M_offset); } + + const_iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + const_iterator + operator++(int) + { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + const_iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + const_iterator + operator--(int) + { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + const_iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + const_iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + const_reference + operator[](difference_type __i) const + { return *(*this + __i); } + + friend const_iterator + operator+(const const_iterator& __x, difference_type __n) + { + const_iterator __tmp = __x; + __tmp += __n; + return __tmp; + } + + friend const_iterator + operator-(const const_iterator& __x, difference_type __n) + { + const_iterator __tmp = __x; + __tmp -= __n; + return __tmp; + } + + friend const_iterator + operator+(difference_type __n, const const_iterator& __x) + { return __x + __n; } + }; + + template + struct _Bvector_base + { + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_Bit_type>::other _Bit_alloc_type; + typedef typename __gnu_cxx::__alloc_traits<_Bit_alloc_type> + _Bit_alloc_traits; + typedef typename _Bit_alloc_traits::pointer _Bit_pointer; + + struct _Bvector_impl_data + { + + _Bit_iterator _M_start; +# 440 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + _Bit_iterator _M_finish; + _Bit_pointer _M_end_of_storage; + + _Bvector_impl_data() noexcept + : _M_start(), _M_finish(), _M_end_of_storage() + { } + + + _Bvector_impl_data(const _Bvector_impl_data&) = default; + _Bvector_impl_data& + operator=(const _Bvector_impl_data&) = default; + + _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept + : _Bvector_impl_data(__x) + { __x._M_reset(); } + + void + _M_move_data(_Bvector_impl_data&& __x) noexcept + { + *this = __x; + __x._M_reset(); + } + + + void + _M_reset() noexcept + { *this = _Bvector_impl_data(); } + + void + _M_swap_data(_Bvector_impl_data& __x) noexcept + { + + + std::swap(*this, __x); + } + }; + + struct _Bvector_impl + : public _Bit_alloc_type, public _Bvector_impl_data + { + _Bvector_impl() noexcept(is_nothrow_default_constructible<_Bit_alloc_type>::value) + + : _Bit_alloc_type() + { } + + _Bvector_impl(const _Bit_alloc_type& __a) noexcept + : _Bit_alloc_type(__a) + { } + + + + + _Bvector_impl(_Bvector_impl&& __x) noexcept + : _Bit_alloc_type(std::move(__x)), _Bvector_impl_data(std::move(__x)) + { } + + _Bvector_impl(_Bit_alloc_type&& __a, _Bvector_impl&& __x) noexcept + : _Bit_alloc_type(std::move(__a)), _Bvector_impl_data(std::move(__x)) + { } + + + _Bit_type* + _M_end_addr() const noexcept + { + if (this->_M_end_of_storage) + return std::__addressof(this->_M_end_of_storage[-1]) + 1; + return 0; + } + }; + + public: + typedef _Alloc allocator_type; + + _Bit_alloc_type& + _M_get_Bit_allocator() noexcept + { return this->_M_impl; } + + const _Bit_alloc_type& + _M_get_Bit_allocator() const noexcept + { return this->_M_impl; } + + allocator_type + get_allocator() const noexcept + { return allocator_type(_M_get_Bit_allocator()); } + + + _Bvector_base() = default; + + + + + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } + + + _Bvector_base(_Bvector_base&&) = default; + + _Bvector_base(_Bvector_base&& __x, const allocator_type& __a) noexcept + : _M_impl(_Bit_alloc_type(__a), std::move(__x._M_impl)) + { } + + + ~_Bvector_base() + { this->_M_deallocate(); } + + protected: + _Bvector_impl _M_impl; + + _Bit_pointer + _M_allocate(size_t __n) + { return _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); } + + void + _M_deallocate() + { + if (_M_impl._M_start._M_p) + { + const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; + _Bit_alloc_traits::deallocate(_M_impl, + _M_impl._M_end_of_storage - __n, + __n); + _M_impl._M_reset(); + } + } + + + void + _M_move_data(_Bvector_base&& __x) noexcept + { _M_impl._M_move_data(std::move(__x._M_impl)); } + + + static size_t + _S_nword(size_t __n) + { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } + }; +# 595 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + template + class vector : protected _Bvector_base<_Alloc> + { + typedef _Bvector_base<_Alloc> _Base; + typedef typename _Base::_Bit_pointer _Bit_pointer; + typedef typename _Base::_Bit_alloc_traits _Bit_alloc_traits; + + + friend struct std::hash; + + + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef _Alloc allocator_type; + + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_S_nword; + using _Base::_M_get_Bit_allocator; + + public: + + vector() = default; + + + + + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + + + explicit + vector(size_type __n, const allocator_type& __a = allocator_type()) + : vector(__n, false, __a) + { } + + vector(size_type __n, const bool& __value, + const allocator_type& __a = allocator_type()) + + + + + + : _Base(__a) + { + _M_initialize(__n); + _M_initialize_value(__value); + } + + vector(const vector& __x) + : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator())) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), begin()); + } + + + vector(vector&&) = default; + + private: + vector(vector&& __x, const allocator_type& __a, true_type) noexcept + : _Base(std::move(__x), __a) + { } + + vector(vector&& __x, const allocator_type& __a, false_type) + : _Base(__a) + { + if (__x.get_allocator() == __a) + this->_M_move_data(std::move(__x)); + else + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), begin()); + __x.clear(); + } + } + + public: + vector(vector&& __x, const allocator_type& __a) + noexcept(_Bit_alloc_traits::_S_always_equal()) + : vector(std::move(__x), __a, + typename _Bit_alloc_traits::is_always_equal{}) + { } + + vector(const vector& __x, const allocator_type& __a) + : _Base(__a) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), begin()); + } + + vector(initializer_list __l, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize_range(__l.begin(), __l.end(), + random_access_iterator_tag()); + } + + + + template> + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize_range(__first, __last, + std::__iterator_category(__first)); + } +# 733 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + ~vector() noexcept { } + + vector& + operator=(const vector& __x) + { + if (&__x == this) + return *this; + + if (_Bit_alloc_traits::_S_propagate_on_copy_assign()) + { + if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator()) + { + this->_M_deallocate(); + std::__alloc_on_copy(_M_get_Bit_allocator(), + __x._M_get_Bit_allocator()); + _M_initialize(__x.size()); + } + else + std::__alloc_on_copy(_M_get_Bit_allocator(), + __x._M_get_Bit_allocator()); + } + + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + return *this; + } + + + vector& + operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) + { + if (_Bit_alloc_traits::_S_propagate_on_move_assign() + || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator()) + { + this->_M_deallocate(); + this->_M_move_data(std::move(__x)); + std::__alloc_on_move(_M_get_Bit_allocator(), + __x._M_get_Bit_allocator()); + } + else + { + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + __x.clear(); + } + return *this; + } + + vector& + operator=(initializer_list __l) + { + this->assign(__l.begin(), __l.end()); + return *this; + } + + + + + + + void + assign(size_type __n, const bool& __x) + { _M_fill_assign(__n, __x); } + + + template> + void + assign(_InputIterator __first, _InputIterator __last) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } +# 825 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + void + assign(initializer_list __l) + { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } + + + iterator + begin() noexcept + { return iterator(this->_M_impl._M_start._M_p, 0); } + + const_iterator + begin() const noexcept + { return const_iterator(this->_M_impl._M_start._M_p, 0); } + + iterator + end() noexcept + { return this->_M_impl._M_finish; } + + const_iterator + end() const noexcept + { return this->_M_impl._M_finish; } + + reverse_iterator + rbegin() noexcept + { return reverse_iterator(end()); } + + const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(end()); } + + reverse_iterator + rend() noexcept + { return reverse_iterator(begin()); } + + const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(begin()); } + + + const_iterator + cbegin() const noexcept + { return const_iterator(this->_M_impl._M_start._M_p, 0); } + + const_iterator + cend() const noexcept + { return this->_M_impl._M_finish; } + + const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(end()); } + + const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(begin()); } + + + size_type + size() const noexcept + { return size_type(end() - begin()); } + + size_type + max_size() const noexcept + { + const size_type __isize = + __gnu_cxx::__numeric_traits::__max + - int(_S_word_bit) + 1; + const size_type __asize + = _Bit_alloc_traits::max_size(_M_get_Bit_allocator()); + return (__asize <= __isize / int(_S_word_bit) + ? __asize * int(_S_word_bit) : __isize); + } + + size_type + capacity() const noexcept + { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) + - begin()); } + + [[__nodiscard__]] bool + empty() const noexcept + { return begin() == end(); } + + reference + operator[](size_type __n) + { return begin()[__n]; } + + const_reference + operator[](size_type __n) const + { return begin()[__n]; } + + protected: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") + + , + __n, this->size()); + } + + public: + reference + at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + + const_reference + at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + void + reserve(size_type __n) + { + if (__n > max_size()) + __throw_length_error(("vector::reserve")); + if (capacity() < __n) + _M_reallocate(__n); + } + + reference + front() + { return *begin(); } + + const_reference + front() const + { return *begin(); } + + reference + back() + { return *(end() - 1); } + + const_reference + back() const + { return *(end() - 1); } + + + + + + + void + data() noexcept { } + + void + push_back(bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + + void + swap(vector& __x) noexcept + { + + do { if (__builtin_is_constant_evaluated() && !bool(_Bit_alloc_traits::propagate_on_container_swap::value || _M_get_Bit_allocator() == __x._M_get_Bit_allocator())) __builtin_unreachable(); } while (false) + ; + + this->_M_impl._M_swap_data(__x._M_impl); + _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), + __x._M_get_Bit_allocator()); + } + + + static void + swap(reference __x, reference __y) noexcept + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + iterator + + insert(const_iterator __position, const bool& __x = bool()) + + + + { + const difference_type __n = __position - begin(); + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr() + && __position == end()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(__position._M_const_cast(), __x); + return begin() + __n; + } + + + template> + iterator + insert(const_iterator __position, + _InputIterator __first, _InputIterator __last) + { + difference_type __offset = __position - cbegin(); + _M_insert_range(__position._M_const_cast(), + __first, __last, + std::__iterator_category(__first)); + return begin() + __offset; + } +# 1038 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + iterator + insert(const_iterator __position, size_type __n, const bool& __x) + { + difference_type __offset = __position - cbegin(); + _M_fill_insert(__position._M_const_cast(), __n, __x); + return begin() + __offset; + } + + + + + + + + iterator + insert(const_iterator __p, initializer_list __l) + { return this->insert(__p, __l.begin(), __l.end()); } + + + void + pop_back() + { --this->_M_impl._M_finish; } + + iterator + + erase(const_iterator __position) + + + + { return _M_erase(__position._M_const_cast()); } + + iterator + + erase(const_iterator __first, const_iterator __last) + + + + { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } + + void + resize(size_type __new_size, bool __x = bool()) + { + if (__new_size < size()) + _M_erase_at_end(begin() + difference_type(__new_size)); + else + insert(end(), __new_size - size(), __x); + } + + + void + shrink_to_fit() + { _M_shrink_to_fit(); } + + + void + flip() noexcept + { + _Bit_type * const __end = this->_M_impl._M_end_addr(); + for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p) + *__p = ~*__p; + } + + void + clear() noexcept + { _M_erase_at_end(begin()); } + + + template + + reference + + + + emplace_back(_Args&&... __args) + { + push_back(bool(__args...)); + + return back(); + + } + + template + iterator + emplace(const_iterator __pos, _Args&&... __args) + { return insert(__pos, bool(__args...)); } + + + protected: + + iterator + _M_copy_aligned(const_iterator __first, const_iterator __last, + iterator __result) + { + _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); + return std::copy(const_iterator(__last._M_p, 0), __last, + iterator(__q, 0)); + } + + void + _M_initialize(size_type __n) + { + if (__n) + { + _Bit_pointer __q = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = __q + _S_nword(__n); + iterator __start = iterator(std::__addressof(*__q), 0); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __start + difference_type(__n); + } + } + + void + _M_initialize_value(bool __x) + { + if (_Bit_type* __p = this->_M_impl._M_start._M_p) + __builtin_memset(__p, __x ? ~0 : 0, + (this->_M_impl._M_end_addr() - __p) + * sizeof(_Bit_type)); + } + + void + _M_reallocate(size_type __n); + + + bool + _M_shrink_to_fit(); +# 1185 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + template + void + _M_initialize_range(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + template + void + _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + _M_initialize(__n); + std::copy(__first, __last, begin()); + } +# 1219 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + void + _M_fill_assign(size_t __n, bool __x) + { + if (__n > size()) + { + _M_initialize_value(__x); + insert(end(), __n - size(), __x); + } + else + { + _M_erase_at_end(begin() + __n); + _M_initialize_value(__x); + } + } + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, (void)++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len < size()) + _M_erase_at_end(std::copy(__first, __last, begin())); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } +# 1283 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + void + _M_fill_insert(iterator __position, size_type __n, bool __x); + + template + void + _M_insert_range(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + void + _M_insert_aux(iterator __position, bool __x); + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + void + _M_erase_at_end(iterator __pos) + { this->_M_impl._M_finish = __pos; } + + iterator + _M_erase(iterator __pos); + + iterator + _M_erase(iterator __first, iterator __last); + }; + + + + inline void + __fill_bvector(std::_Bit_type * __v, + unsigned int __first, unsigned int __last, bool __x) + { + using std::_Bit_type; + using std::_S_word_bit; + const _Bit_type __fmask = ~0ul << __first; + const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); + const _Bit_type __mask = __fmask & __lmask; + + if (__x) + *__v |= __mask; + else + *__v &= ~__mask; + } + + inline void + __fill_a1(std::_Bit_iterator __first, + std::_Bit_iterator __last, const bool& __x) + { + using std::_Bit_type; + using std::_S_word_bit; + if (__first._M_p != __last._M_p) + { + _Bit_type* __first_p = __first._M_p; + if (__first._M_offset != 0) + __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); + + __builtin_memset(__first_p, __x ? ~0 : 0, + (__last._M_p - __first_p) * sizeof(_Bit_type)); + + if (__last._M_offset != 0) + __fill_bvector(__last._M_p, 0, __last._M_offset, __x); + } + else if (__first._M_offset != __last._M_offset) + __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); + } + + + + + template + struct hash> + : public __hash_base> + { + size_t + operator()(const std::vector&) const noexcept; + }; + + + +} +# 69 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/vector.tcc" 1 3 +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/vector.tcc" 3 +namespace std +{ + + + + template + void + vector<_Tp, _Alloc>:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + const size_type __old_size = size(); + pointer __tmp; + + if constexpr (_S_use_relocate()) + { + __tmp = this->_M_allocate(__n); + _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, + __tmp, _M_get_Tp_allocator()); + } + else + + { + __tmp = _M_allocate_and_copy(__n, + std::__make_move_if_noexcept_iterator(this->_M_impl._M_start), + std::__make_move_if_noexcept_iterator(this->_M_impl._M_finish)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = __tmp + __old_size; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + } + + + template + template + + typename vector<_Tp, _Alloc>::reference + + + + vector<_Tp, _Alloc>:: + emplace_back(_Args&&... __args) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::forward<_Args>(__args)...); + ++this->_M_impl._M_finish; + ; + } + else + _M_realloc_insert(end(), std::forward<_Args>(__args)...); + + return back(); + + } + + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + + insert(const_iterator __position, const value_type& __x) + + + + { + const size_type __n = __position - begin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == end()) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + __x); + ++this->_M_impl._M_finish; + ; + } + else + { + + const auto __pos = begin() + (__position - cbegin()); + + + _Temporary_value __x_copy(this, __x); + _M_insert_aux(__pos, std::move(__x_copy._M_val())); + + + + } + else + + _M_realloc_insert(begin() + (__position - cbegin()), __x); + + + + + return iterator(this->_M_impl._M_start + __n); + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + _M_erase(iterator __position) + { + if (__position + 1 != end()) + std::move(__position + 1, end(), __position); + --this->_M_impl._M_finish; + _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); + ; + return __position; + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + _M_erase(iterator __first, iterator __last) + { + if (__first != __last) + { + if (__last != end()) + std::move(__last, end(), __first); + _M_erase_at_end(__first.base() + (end() - __last)); + } + return __first; + } + + template + vector<_Tp, _Alloc>& + vector<_Tp, _Alloc>:: + operator=(const vector<_Tp, _Alloc>& __x) + { + if (&__x != this) + { + ; + + if (_Alloc_traits::_S_propagate_on_copy_assign()) + { + if (!_Alloc_traits::_S_always_equal() + && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) + { + + this->clear(); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = nullptr; + this->_M_impl._M_finish = nullptr; + this->_M_impl._M_end_of_storage = nullptr; + } + std::__alloc_on_copy(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + const size_type __xlen = __x.size(); + if (__xlen > capacity()) + { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), + __x.end()); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; + } + else if (size() >= __xlen) + { + std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), + end(), _M_get_Tp_allocator()); + } + else + { + std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), + this->_M_impl._M_start); + std::__uninitialized_copy_a(__x._M_impl._M_start + size(), + __x._M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; + } + return *this; + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_assign(size_t __n, const value_type& __val) + { + if (__n > capacity()) + { + vector __tmp(__n, __val, _M_get_Tp_allocator()); + __tmp._M_impl._M_swap_data(this->_M_impl); + } + else if (__n > size()) + { + std::fill(begin(), end(), __val); + const size_type __add = __n - size(); + ; + this->_M_impl._M_finish = + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __add, __val, _M_get_Tp_allocator()); + ; + } + else + _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + pointer __cur(this->_M_impl._M_start); + for (; __first != __last && __cur != this->_M_impl._M_finish; + ++__cur, (void)++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + _M_range_insert(end(), __first, __last, + std::__iterator_category(__first)); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + + if (__len > capacity()) + { + _S_check_init_len(__len, _M_get_Tp_allocator()); + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = this->_M_impl._M_start + __len; + this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; + } + else if (size() >= __len) + _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, this->_M_impl._M_start); + const size_type __attribute__((__unused__)) __n = __len - size(); + ; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + } + } + + + template + auto + vector<_Tp, _Alloc>:: + _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator + { + const auto __n = __position - cbegin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == cend()) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::move(__v)); + ++this->_M_impl._M_finish; + ; + } + else + _M_insert_aux(begin() + __n, std::move(__v)); + else + _M_realloc_insert(begin() + __n, std::move(__v)); + + return iterator(this->_M_impl._M_start + __n); + } + + template + template + auto + vector<_Tp, _Alloc>:: + _M_emplace_aux(const_iterator __position, _Args&&... __args) + -> iterator + { + const auto __n = __position - cbegin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == cend()) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::forward<_Args>(__args)...); + ++this->_M_impl._M_finish; + ; + } + else + { + + + + _Temporary_value __tmp(this, std::forward<_Args>(__args)...); + _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); + } + else + _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); + + return iterator(this->_M_impl._M_start + __n); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_insert_aux(iterator __position, _Arg&& __arg) + + + + + + + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::move(*(this->_M_impl._M_finish - 1))); + ++this->_M_impl._M_finish; + ; + + + + std::move_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) + + ; + + + + *__position = std::forward<_Arg>(__arg); + + } + + + template + template + void + vector<_Tp, _Alloc>:: + _M_realloc_insert(iterator __position, _Args&&... __args) + + + + + + + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_realloc_insert"); + pointer __old_start = this->_M_impl._M_start; + pointer __old_finish = this->_M_impl._M_finish; + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + + + + + _Alloc_traits::construct(this->_M_impl, + __new_start + __elems_before, + + std::forward<_Args>(__args)...); + + + + __new_finish = pointer(); + + + if constexpr (_S_use_relocate()) + { + __new_finish = _S_relocate(__old_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + + ++__new_finish; + + __new_finish = _S_relocate(__position.base(), __old_finish, + __new_finish, _M_get_Tp_allocator()); + } + else + + { + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__old_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + + ++__new_finish; + + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__position.base(), __old_finish, + __new_finish, _M_get_Tp_allocator()); + } + } + catch(...) + { + if (!__new_finish) + _Alloc_traits::destroy(this->_M_impl, + __new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + + if constexpr (!_S_use_relocate()) + + std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); + ; + _M_deallocate(__old_start, + this->_M_impl._M_end_of_storage - __old_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_insert(iterator __position, size_type __n, const value_type& __x) + { + if (__n != 0) + { + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + + + + _Temporary_value __tmp(this, __x); + value_type& __x_copy = __tmp._M_val(); + + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + ; + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + ; + std::move_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::fill(__position.base(), __position.base() + __n, + __x_copy); + } + else + { + ; + this->_M_impl._M_finish = + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - __elems_after, + __x_copy, + _M_get_Tp_allocator()); + ; + std::__uninitialized_move_a(__position.base(), __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + ; + std::fill(__position.base(), __old_finish, __x_copy); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + std::__uninitialized_fill_n_a(__new_start + __elems_before, + __n, __x, + _M_get_Tp_allocator()); + __new_finish = pointer(); + + __new_finish + = std::__uninitialized_move_if_noexcept_a + (this->_M_impl._M_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + + __new_finish += __n; + + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__position.base(), this->_M_impl._M_finish, + __new_finish, _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + std::_Destroy(__new_start + __elems_before, + __new_start + __elems_before + __n, + _M_get_Tp_allocator()); + else + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + + template + void + vector<_Tp, _Alloc>:: + _M_default_append(size_type __n) + { + if (__n != 0) + { + const size_type __size = size(); + size_type __navail = size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish); + + if (__size > max_size() || __navail > max_size() - __size) + __builtin_unreachable(); + + if (__navail >= __n) + { + ; + this->_M_impl._M_finish = + std::__uninitialized_default_n_a(this->_M_impl._M_finish, + __n, _M_get_Tp_allocator()); + ; + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_default_append"); + pointer __new_start(this->_M_allocate(__len)); + if constexpr (_S_use_relocate()) + { + try + { + std::__uninitialized_default_n_a(__new_start + __size, + __n, _M_get_Tp_allocator()); + } + catch(...) + { + _M_deallocate(__new_start, __len); + throw; + } + _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, + __new_start, _M_get_Tp_allocator()); + } + else + { + pointer __destroy_from = pointer(); + try + { + std::__uninitialized_default_n_a(__new_start + __size, + __n, _M_get_Tp_allocator()); + __destroy_from = __new_start + __size; + std::__uninitialized_move_if_noexcept_a( + this->_M_impl._M_start, this->_M_impl._M_finish, + __new_start, _M_get_Tp_allocator()); + } + catch(...) + { + if (__destroy_from) + std::_Destroy(__destroy_from, __destroy_from + __n, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_start + __size + __n; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + template + bool + vector<_Tp, _Alloc>:: + _M_shrink_to_fit() + { + if (capacity() == size()) + return false; + ; + return std::__shrink_to_fit_aux::_S_do_it(*this); + } + + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + if (__pos == end()) + { + for (; __first != __last; ++__first) + insert(end(), *__first); + } + else if (__first != __last) + { + vector __tmp(__first, __last, _M_get_Tp_allocator()); + insert(__pos, + std::make_move_iterator(__tmp.begin()), + std::make_move_iterator(__tmp.end())); + } + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + const size_type __n = std::distance(__first, __last); + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + ; + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + ; + std::move_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::copy(__first, __last, __position); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elems_after); + ; + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + ; + std::__uninitialized_move_a(__position.base(), + __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + ; + std::copy(__first, __mid, __position); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_range_insert"); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + __new_finish + = std::__uninitialized_move_if_noexcept_a + (this->_M_impl._M_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + __new_finish + = std::__uninitialized_copy_a(__first, __last, + __new_finish, + _M_get_Tp_allocator()); + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__position.base(), this->_M_impl._M_finish, + __new_finish, _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + + + template + void + vector:: + _M_reallocate(size_type __n) + { + _Bit_pointer __q = this->_M_allocate(__n); + iterator __start(std::__addressof(*__q), 0); + iterator __finish(_M_copy_aligned(begin(), end(), __start)); + this->_M_deallocate(); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; + this->_M_impl._M_end_of_storage = __q + _S_nword(__n); + } + + template + void + vector:: + _M_fill_insert(iterator __position, size_type __n, bool __x) + { + if (__n == 0) + return; + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + difference_type(__n)); + std::fill(__position, __position + difference_type(__n), __x); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + _Bit_pointer __q = this->_M_allocate(__len); + iterator __start(std::__addressof(*__q), 0); + iterator __i = _M_copy_aligned(begin(), __position, __start); + std::fill(__i, __i + difference_type(__n), __x); + iterator __finish = std::copy(__position, end(), + __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = __q + _S_nword(__len); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; + } + } + + template + template + void + vector:: + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + size_type __n = std::distance(__first, __last); + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + + difference_type(__n)); + std::copy(__first, __last, __position); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_insert_range"); + _Bit_pointer __q = this->_M_allocate(__len); + iterator __start(std::__addressof(*__q), 0); + iterator __i = _M_copy_aligned(begin(), __position, __start); + __i = std::copy(__first, __last, __i); + iterator __finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = __q + _S_nword(__len); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; + } + } + } + + template + void + vector:: + _M_insert_aux(iterator __position, bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) + { + std::copy_backward(__position, this->_M_impl._M_finish, + this->_M_impl._M_finish + 1); + *__position = __x; + ++this->_M_impl._M_finish; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + _Bit_pointer __q = this->_M_allocate(__len); + iterator __start(std::__addressof(*__q), 0); + iterator __i = _M_copy_aligned(begin(), __position, __start); + *__i++ = __x; + iterator __finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = __q + _S_nword(__len); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; + } + } + + template + typename vector::iterator + vector:: + _M_erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + return __position; + } + + template + typename vector::iterator + vector:: + _M_erase(iterator __first, iterator __last) + { + if (__first != __last) + _M_erase_at_end(std::copy(__last, end(), __first)); + return __first; + } + + + template + bool + vector:: + _M_shrink_to_fit() + { + if (capacity() - size() < int(_S_word_bit)) + return false; + try + { + _M_reallocate(size()); + return true; + } + catch(...) + { return false; } + } + + + + +} + + + +namespace std +{ + + + template + size_t + hash>:: + operator()(const std::vector& __b) const noexcept + { + size_t __hash = 0; + using std::_S_word_bit; + using std::_Bit_type; + + const size_t __words = __b.size() / _S_word_bit; + if (__words) + { + const size_t __clength = __words * sizeof(_Bit_type); + __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); + } + + const size_t __extrabits = __b.size() % _S_word_bit; + if (__extrabits) + { + _Bit_type __hiword = *__b._M_impl._M_finish._M_p; + __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); + + const size_t __clength + = (__extrabits + 8 - 1) / 8; + if (__words) + __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); + else + __hash = std::_Hash_impl::hash(&__hiword, __clength); + } + + return __hash; + } + + +} +# 73 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 2 3 + + + + + + + +namespace std +{ + + namespace pmr { + template class polymorphic_allocator; + template + using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; + } + + + + + + + + +} + + + +namespace std +{ + + + + + template + inline typename vector<_Tp, _Alloc>::size_type + erase_if(vector<_Tp, _Alloc>& __cont, _Predicate __pred) + { + const auto __osz = __cont.size(); + __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), + __cont.end()); + return __osz - __cont.size(); + } + + template + inline typename vector<_Tp, _Alloc>::size_type + erase(vector<_Tp, _Alloc>& __cont, const _Up& __value) + { + const auto __osz = __cont.size(); + __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), + __cont.end()); + return __osz - __cont.size(); + } + +} +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 +# 74 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 +namespace std +{ + + + + + + template struct _Placeholder { }; +# 92 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template + inline constexpr invoke_result_t<_Callable, _Args...> + invoke(_Callable&& __fn, _Args&&... __args) + noexcept(is_nothrow_invocable_v<_Callable, _Args...>) + { + return std::__invoke(std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + } + + + template::value> + class _Mem_fn_base + : public _Mem_fn_traits<_MemFunPtr>::__maybe_type + { + using _Traits = _Mem_fn_traits<_MemFunPtr>; + + using _Arity = typename _Traits::__arity; + using _Varargs = typename _Traits::__vararg; + + template + friend struct _Bind_check_arity; + + _MemFunPtr _M_pmf; + + public: + + using result_type = typename _Traits::__result_type; + + explicit constexpr + _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { } + + template + constexpr + auto + operator()(_Args&&... __args) const + noexcept(noexcept( + std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) + -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) + { return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); } + }; + + + template + class _Mem_fn_base<_MemObjPtr, false> + { + using _Arity = integral_constant; + using _Varargs = false_type; + + template + friend struct _Bind_check_arity; + + _MemObjPtr _M_pm; + + public: + explicit constexpr + _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { } + + template + constexpr + auto + operator()(_Tp&& __obj) const + noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) + -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) + { return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); } + }; + + template + struct _Mem_fn; + + template + struct _Mem_fn<_Res _Class::*> + : _Mem_fn_base<_Res _Class::*> + { + using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; + }; +# 176 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template + constexpr + inline _Mem_fn<_Tp _Class::*> + mem_fn(_Tp _Class::* __pm) noexcept + { + return _Mem_fn<_Tp _Class::*>(__pm); + } +# 192 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template + struct is_bind_expression + : public false_type { }; +# 203 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template + struct is_placeholder + : public integral_constant + { }; + + + template inline constexpr bool is_bind_expression_v + = is_bind_expression<_Tp>::value; + template inline constexpr int is_placeholder_v + = is_placeholder<_Tp>::value; + + + + + + + namespace placeholders + { + + + + + extern const _Placeholder<1> _1; + extern const _Placeholder<2> _2; + extern const _Placeholder<3> _3; + extern const _Placeholder<4> _4; + extern const _Placeholder<5> _5; + extern const _Placeholder<6> _6; + extern const _Placeholder<7> _7; + extern const _Placeholder<8> _8; + extern const _Placeholder<9> _9; + extern const _Placeholder<10> _10; + extern const _Placeholder<11> _11; + extern const _Placeholder<12> _12; + extern const _Placeholder<13> _13; + extern const _Placeholder<14> _14; + extern const _Placeholder<15> _15; + extern const _Placeholder<16> _16; + extern const _Placeholder<17> _17; + extern const _Placeholder<18> _18; + extern const _Placeholder<19> _19; + extern const _Placeholder<20> _20; + extern const _Placeholder<21> _21; + extern const _Placeholder<22> _22; + extern const _Placeholder<23> _23; + extern const _Placeholder<24> _24; + extern const _Placeholder<25> _25; + extern const _Placeholder<26> _26; + extern const _Placeholder<27> _27; + extern const _Placeholder<28> _28; + extern const _Placeholder<29> _29; + } + + + + + + + template + struct is_placeholder<_Placeholder<_Num> > + : public integral_constant + { }; + + template + struct is_placeholder > + : public integral_constant + { }; + + + + template + using _Safe_tuple_element_t + = typename enable_if<(__i < tuple_size<_Tuple>::value), + tuple_element<__i, _Tuple>>::type::type; +# 289 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template::value, + bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> + class _Mu; + + + + + + + template + class _Mu, false, false> + { + public: + + + + + template + constexpr + _Tp& + operator()(_CVRef& __arg, _Tuple&) const volatile + { return __arg.get(); } + }; + + + + + + + + template + class _Mu<_Arg, true, false> + { + public: + template + constexpr + auto + operator()(_CVArg& __arg, + tuple<_Args...>& __tuple) const volatile + -> decltype(__arg(declval<_Args>()...)) + { + + typedef typename _Build_index_tuple::__type + _Indexes; + return this->__call(__arg, __tuple, _Indexes()); + } + + private: + + + template + constexpr + auto + __call(_CVArg& __arg, tuple<_Args...>& __tuple, + const _Index_tuple<_Indexes...>&) const volatile + -> decltype(__arg(declval<_Args>()...)) + { + return __arg(std::get<_Indexes>(std::move(__tuple))...); + } + }; + + + + + + + template + class _Mu<_Arg, false, true> + { + public: + template + constexpr + _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& + operator()(const volatile _Arg&, _Tuple& __tuple) const volatile + { + return + ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple)); + } + }; + + + + + + + template + class _Mu<_Arg, false, false> + { + public: + template + constexpr + _CVArg&& + operator()(_CVArg&& __arg, _Tuple&) const volatile + { return std::forward<_CVArg>(__arg); } + }; + + + template + inline auto + __volget(volatile tuple<_Tp...>& __tuple) + -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& + { return std::get<_Ind>(const_cast&>(__tuple)); } + + + template + inline auto + __volget(const volatile tuple<_Tp...>& __tuple) + -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& + { return std::get<_Ind>(const_cast&>(__tuple)); } + + + template + class _Bind; + + template + class _Bind<_Functor(_Bound_args...)> + : public _Weak_result_type<_Functor> + { + typedef typename _Build_index_tuple::__type + _Bound_indexes; + + _Functor _M_f; + tuple<_Bound_args...> _M_bound_args; + + + template + constexpr + _Result + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... + ); + } + + + template + constexpr + _Result + __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... + ); + } + + + template + _Result + __call_v(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) volatile + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... + ); + } + + + template + _Result + __call_c_v(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) const volatile + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... + ); + } + + template + using _Mu_type = decltype( + _Mu::type>()( + std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) ); + + template + using _Res_type_impl + = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type; + + template + using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>; + + template + using __dependent = typename + enable_if::value+1), _Functor>::type; + + template class __cv_quals> + using _Res_type_cv = _Res_type_impl< + typename __cv_quals<__dependent<_CallArgs>>::type, + _CallArgs, + typename __cv_quals<_Bound_args>::type...>; + + public: + template + explicit constexpr + _Bind(const _Functor& __f, _Args&&... __args) + : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) + { } + + template + explicit constexpr + _Bind(_Functor&& __f, _Args&&... __args) + : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) + { } + + _Bind(const _Bind&) = default; + _Bind(_Bind&&) = default; + + + template>> + constexpr + _Result + operator()(_Args&&... __args) + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template, add_const>> + constexpr + _Result + operator()(_Args&&... __args) const + { + return this->__call_c<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } +# 527 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template, add_volatile>> + [[deprecated("std::bind does not support volatile in C++17")]] + _Result + operator()(_Args&&... __args) volatile + { + return this->__call_v<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template, add_cv>> + [[deprecated("std::bind does not support volatile in C++17")]] + _Result + operator()(_Args&&... __args) const volatile + { + return this->__call_c_v<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + }; + + + template + class _Bind_result; + + template + class _Bind_result<_Result, _Functor(_Bound_args...)> + { + typedef typename _Build_index_tuple::__type + _Bound_indexes; + + _Functor _M_f; + tuple<_Bound_args...> _M_bound_args; + + + template + constexpr + _Res + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) + { + return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() + (std::get<_Indexes>(_M_bound_args), __args)...); + } + + + template + constexpr + _Res + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const + { + return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() + (std::get<_Indexes>(_M_bound_args), __args)...); + } + + + template + constexpr + _Res + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile + { + return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() + (__volget<_Indexes>(_M_bound_args), __args)...); + } + + + template + constexpr + _Res + __call(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) const volatile + { + return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() + (__volget<_Indexes>(_M_bound_args), __args)...); + } + + public: + typedef _Result result_type; + + template + explicit constexpr + _Bind_result(const _Functor& __f, _Args&&... __args) + : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) + { } + + template + explicit constexpr + _Bind_result(_Functor&& __f, _Args&&... __args) + : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) + { } + + _Bind_result(const _Bind_result&) = default; + _Bind_result(_Bind_result&&) = default; + + + template + constexpr + result_type + operator()(_Args&&... __args) + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template + constexpr + result_type + operator()(_Args&&... __args) const + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template + [[deprecated("std::bind does not support volatile in C++17")]] + result_type + operator()(_Args&&... __args) volatile + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template + [[deprecated("std::bind does not support volatile in C++17")]] + result_type + operator()(_Args&&... __args) const volatile + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + }; + + + + + + + template + struct is_bind_expression<_Bind<_Signature> > + : public true_type { }; + + + + + + template + struct is_bind_expression > + : public true_type { }; + + + + + + template + struct is_bind_expression > + : public true_type { }; + + + + + + template + struct is_bind_expression> + : public true_type { }; + + + + + + template + struct is_bind_expression<_Bind_result<_Result, _Signature>> + : public true_type { }; + + + + + + template + struct is_bind_expression> + : public true_type { }; + + + + + + template + struct is_bind_expression> + : public true_type { }; + + + + + + template + struct is_bind_expression> + : public true_type { }; + + template + struct _Bind_check_arity { }; + + template + struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> + { + static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), + "Wrong number of arguments for function"); + }; + + template + struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> + { + static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), + "Wrong number of arguments for function"); + }; + + template + struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> + { + using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; + using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; + static_assert(_Varargs::value + ? sizeof...(_BoundArgs) >= _Arity::value + 1 + : sizeof...(_BoundArgs) == _Arity::value + 1, + "Wrong number of arguments for pointer-to-member"); + }; + + + + + template::type> + using __is_socketlike = __or_, is_enum<_Tp2>>; + + template + struct _Bind_helper + : _Bind_check_arity::type, _BoundArgs...> + { + typedef typename decay<_Func>::type __func_type; + typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; + }; + + + + + template + struct _Bind_helper + { }; + + + + + + template + inline constexpr typename + _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type + bind(_Func&& __f, _BoundArgs&&... __args) + { + typedef _Bind_helper __helper_type; + return typename __helper_type::type(std::forward<_Func>(__f), + std::forward<_BoundArgs>(__args)...); + } + + template + struct _Bindres_helper + : _Bind_check_arity::type, _BoundArgs...> + { + typedef typename decay<_Func>::type __functor_type; + typedef _Bind_result<_Result, + __functor_type(typename decay<_BoundArgs>::type...)> + type; + }; + + + + + + template + inline constexpr + typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type + bind(_Func&& __f, _BoundArgs&&... __args) + { + typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; + return typename __helper_type::type(std::forward<_Func>(__f), + std::forward<_BoundArgs>(__args)...); + } + + + + + template + struct _Bind_front + { + static_assert(is_move_constructible_v<_Fd>); + static_assert((is_move_constructible_v<_BoundArgs> && ...)); + + + + template + explicit constexpr + _Bind_front(int, _Fn&& __fn, _Args&&... __args) + noexcept(__and_, + is_nothrow_constructible<_BoundArgs, _Args>...>::value) + : _M_fd(std::forward<_Fn>(__fn)), + _M_bound_args(std::forward<_Args>(__args)...) + { static_assert(sizeof...(_Args) == sizeof...(_BoundArgs)); } + + _Bind_front(const _Bind_front&) = default; + _Bind_front(_Bind_front&&) = default; + _Bind_front& operator=(const _Bind_front&) = default; + _Bind_front& operator=(_Bind_front&&) = default; + ~_Bind_front() = default; + + template + constexpr + invoke_result_t<_Fd&, _BoundArgs&..., _CallArgs...> + operator()(_CallArgs&&... __call_args) & + noexcept(is_nothrow_invocable_v<_Fd&, _BoundArgs&..., _CallArgs...>) + { + return _S_call(*this, _BoundIndices(), + std::forward<_CallArgs>(__call_args)...); + } + + template + constexpr + invoke_result_t + operator()(_CallArgs&&... __call_args) const & + noexcept(is_nothrow_invocable_v) + { + return _S_call(*this, _BoundIndices(), + std::forward<_CallArgs>(__call_args)...); + } + + template + constexpr + invoke_result_t<_Fd, _BoundArgs..., _CallArgs...> + operator()(_CallArgs&&... __call_args) && + noexcept(is_nothrow_invocable_v<_Fd, _BoundArgs..., _CallArgs...>) + { + return _S_call(std::move(*this), _BoundIndices(), + std::forward<_CallArgs>(__call_args)...); + } + + template + constexpr + invoke_result_t + operator()(_CallArgs&&... __call_args) const && + noexcept(is_nothrow_invocable_v) + { + return _S_call(std::move(*this), _BoundIndices(), + std::forward<_CallArgs>(__call_args)...); + } + + private: + using _BoundIndices = index_sequence_for<_BoundArgs...>; + + template + static constexpr + decltype(auto) + _S_call(_Tp&& __g, index_sequence<_Ind...>, _CallArgs&&... __call_args) + { + return std::invoke(std::forward<_Tp>(__g)._M_fd, + std::get<_Ind>(std::forward<_Tp>(__g)._M_bound_args)..., + std::forward<_CallArgs>(__call_args)...); + } + + _Fd _M_fd; + std::tuple<_BoundArgs...> _M_bound_args; + }; + + template + using _Bind_front_t + = _Bind_front, decay_t<_Args>...>; + + template + constexpr _Bind_front_t<_Fn, _Args...> + bind_front(_Fn&& __fn, _Args&&... __args) + noexcept(is_nothrow_constructible_v<_Bind_front_t<_Fn, _Args...>, + int, _Fn, _Args...>) + { + return _Bind_front_t<_Fn, _Args...>(0, std::forward<_Fn>(__fn), + std::forward<_Args>(__args)...); + } + + + + + template + class _Not_fn + { + template + using __inv_res_t = typename __invoke_result<_Fn2, _Args...>::type; + + template + static decltype(!std::declval<_Tp>()) + _S_not() noexcept(noexcept(!std::declval<_Tp>())); + + public: + template + constexpr + _Not_fn(_Fn2&& __fn, int) + : _M_fn(std::forward<_Fn2>(__fn)) { } + + _Not_fn(const _Not_fn& __fn) = default; + _Not_fn(_Not_fn&& __fn) = default; + ~_Not_fn() = default; +# 956 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template constexpr decltype(_S_not<__inv_res_t<_Fn &, _Args...>>()) operator()(_Args&&... __args) & noexcept(__is_nothrow_invocable<_Fn &, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn &, _Args...>>())) { return !std::__invoke(std::forward< _Fn & >(_M_fn), std::forward<_Args>(__args)...); } + template constexpr decltype(_S_not<__inv_res_t<_Fn const &, _Args...>>()) operator()(_Args&&... __args) const & noexcept(__is_nothrow_invocable<_Fn const &, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn const &, _Args...>>())) { return !std::__invoke(std::forward< _Fn const & >(_M_fn), std::forward<_Args>(__args)...); } + template constexpr decltype(_S_not<__inv_res_t<_Fn &&, _Args...>>()) operator()(_Args&&... __args) && noexcept(__is_nothrow_invocable<_Fn &&, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn &&, _Args...>>())) { return !std::__invoke(std::forward< _Fn && >(_M_fn), std::forward<_Args>(__args)...); } + template constexpr decltype(_S_not<__inv_res_t<_Fn const &&, _Args...>>()) operator()(_Args&&... __args) const && noexcept(__is_nothrow_invocable<_Fn const &&, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn const &&, _Args...>>())) { return !std::__invoke(std::forward< _Fn const && >(_M_fn), std::forward<_Args>(__args)...); } + + + private: + _Fn _M_fn; + }; + + template + struct __is_byte_like : false_type { }; + + template + struct __is_byte_like<_Tp, equal_to<_Tp>> + : __bool_constant::value> { }; + + template + struct __is_byte_like<_Tp, equal_to> + : __bool_constant::value> { }; + + + + enum class byte : unsigned char; + + template<> + struct __is_byte_like> + : true_type { }; + + template<> + struct __is_byte_like> + : true_type { }; + + + + template + constexpr + inline auto + not_fn(_Fn&& __fn) + noexcept(std::is_nothrow_constructible, _Fn&&>::value) + { + return _Not_fn>{std::forward<_Fn>(__fn), 0}; + } + + + + + template> + class default_searcher + { + public: + constexpr + default_searcher(_ForwardIterator1 __pat_first, + _ForwardIterator1 __pat_last, + _BinaryPredicate __pred = _BinaryPredicate()) + : _M_m(__pat_first, __pat_last, std::move(__pred)) + { } + + template + constexpr + pair<_ForwardIterator2, _ForwardIterator2> + operator()(_ForwardIterator2 __first, _ForwardIterator2 __last) const + { + _ForwardIterator2 __first_ret = + std::search(__first, __last, std::get<0>(_M_m), std::get<1>(_M_m), + std::get<2>(_M_m)); + auto __ret = std::make_pair(__first_ret, __first_ret); + if (__ret.first != __last) + std::advance(__ret.second, std::distance(std::get<0>(_M_m), + std::get<1>(_M_m))); + return __ret; + } + + private: + tuple<_ForwardIterator1, _ForwardIterator1, _BinaryPredicate> _M_m; + }; + + template + struct __boyer_moore_map_base + { + template + __boyer_moore_map_base(_RAIter __pat, size_t __patlen, + _Hash&& __hf, _Pred&& __pred) + : _M_bad_char{ __patlen, std::move(__hf), std::move(__pred) } + { + if (__patlen > 0) + for (__diff_type __i = 0; __i < __patlen - 1; ++__i) + _M_bad_char[__pat[__i]] = __patlen - 1 - __i; + } + + using __diff_type = _Tp; + + __diff_type + _M_lookup(_Key __key, __diff_type __not_found) const + { + auto __iter = _M_bad_char.find(__key); + if (__iter == _M_bad_char.end()) + return __not_found; + return __iter->second; + } + + _Pred + _M_pred() const { return _M_bad_char.key_eq(); } + + std::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char; + }; + + template + struct __boyer_moore_array_base + { + template + __boyer_moore_array_base(_RAIter __pat, size_t __patlen, + _Unused&&, _Pred&& __pred) + : _M_bad_char{ array<_Tp, _Len>{}, std::move(__pred) } + { + std::get<0>(_M_bad_char).fill(__patlen); + if (__patlen > 0) + for (__diff_type __i = 0; __i < __patlen - 1; ++__i) + { + auto __ch = __pat[__i]; + using _UCh = make_unsigned_t; + auto __uch = static_cast<_UCh>(__ch); + std::get<0>(_M_bad_char)[__uch] = __patlen - 1 - __i; + } + } + + using __diff_type = _Tp; + + template + __diff_type + _M_lookup(_Key __key, __diff_type __not_found) const + { + auto __ukey = static_cast>(__key); + if (__ukey >= _Len) + return __not_found; + return std::get<0>(_M_bad_char)[__ukey]; + } + + const _Pred& + _M_pred() const { return std::get<1>(_M_bad_char); } + + tuple, _Pred> _M_bad_char; + }; + + + + template::value_type, + typename _Diff = typename iterator_traits<_RAIter>::difference_type> + using __boyer_moore_base_t + = conditional_t<__is_byte_like<_Val, _Pred>::value, + __boyer_moore_array_base<_Diff, 256, _Pred>, + __boyer_moore_map_base<_Val, _Diff, _Hash, _Pred>>; + + template::value_type>, + typename _BinaryPredicate = equal_to<>> + class boyer_moore_searcher + : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate> + { + using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>; + using typename _Base::__diff_type; + + public: + boyer_moore_searcher(_RAIter __pat_first, _RAIter __pat_last, + _Hash __hf = _Hash(), + _BinaryPredicate __pred = _BinaryPredicate()); + + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const; + + private: + bool + _M_is_prefix(_RAIter __word, __diff_type __len, + __diff_type __pos) + { + const auto& __pred = this->_M_pred(); + __diff_type __suffixlen = __len - __pos; + for (__diff_type __i = 0; __i < __suffixlen; ++__i) + if (!__pred(__word[__i], __word[__pos + __i])) + return false; + return true; + } + + __diff_type + _M_suffix_length(_RAIter __word, __diff_type __len, + __diff_type __pos) + { + const auto& __pred = this->_M_pred(); + __diff_type __i = 0; + while (__pred(__word[__pos - __i], __word[__len - 1 - __i]) + && __i < __pos) + { + ++__i; + } + return __i; + } + + template + __diff_type + _M_bad_char_shift(_Tp __c) const + { return this->_M_lookup(__c, _M_pat_end - _M_pat); } + + _RAIter _M_pat; + _RAIter _M_pat_end; + std::vector<__diff_type> _M_good_suffix; + }; + + template::value_type>, + typename _BinaryPredicate = equal_to<>> + class boyer_moore_horspool_searcher + : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate> + { + using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>; + using typename _Base::__diff_type; + + public: + boyer_moore_horspool_searcher(_RAIter __pat, + _RAIter __pat_end, + _Hash __hf = _Hash(), + _BinaryPredicate __pred + = _BinaryPredicate()) + : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)), + _M_pat(__pat), _M_pat_end(__pat_end) + { } + + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const + { + const auto& __pred = this->_M_pred(); + auto __patlen = _M_pat_end - _M_pat; + if (__patlen == 0) + return std::make_pair(__first, __first); + auto __len = __last - __first; + while (__len >= __patlen) + { + for (auto __scan = __patlen - 1; + __pred(__first[__scan], _M_pat[__scan]); --__scan) + if (__scan == 0) + return std::make_pair(__first, __first + __patlen); + auto __shift = _M_bad_char_shift(__first[__patlen - 1]); + __len -= __shift; + __first += __shift; + } + return std::make_pair(__last, __last); + } + + private: + template + __diff_type + _M_bad_char_shift(_Tp __c) const + { return this->_M_lookup(__c, _M_pat_end - _M_pat); } + + _RAIter _M_pat; + _RAIter _M_pat_end; + }; + + template + boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>:: + boyer_moore_searcher(_RAIter __pat, _RAIter __pat_end, + _Hash __hf, _BinaryPredicate __pred) + : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)), + _M_pat(__pat), _M_pat_end(__pat_end), _M_good_suffix(__pat_end - __pat) + { + auto __patlen = __pat_end - __pat; + if (__patlen == 0) + return; + __diff_type __last_prefix = __patlen - 1; + for (__diff_type __p = __patlen - 1; __p >= 0; --__p) + { + if (_M_is_prefix(__pat, __patlen, __p + 1)) + __last_prefix = __p + 1; + _M_good_suffix[__p] = __last_prefix + (__patlen - 1 - __p); + } + for (__diff_type __p = 0; __p < __patlen - 1; ++__p) + { + auto __slen = _M_suffix_length(__pat, __patlen, __p); + auto __pos = __patlen - 1 - __slen; + if (!__pred(__pat[__p - __slen], __pat[__pos])) + _M_good_suffix[__pos] = __patlen - 1 - __p + __slen; + } + } + + template + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>:: + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const + { + auto __patlen = _M_pat_end - _M_pat; + if (__patlen == 0) + return std::make_pair(__first, __first); + const auto& __pred = this->_M_pred(); + __diff_type __i = __patlen - 1; + auto __stringlen = __last - __first; + while (__i < __stringlen) + { + __diff_type __j = __patlen - 1; + while (__j >= 0 && __pred(__first[__i], _M_pat[__j])) + { + --__i; + --__j; + } + if (__j < 0) + { + const auto __match = __first + __i + 1; + return std::make_pair(__match, __match + __patlen); + } + __i += std::max(_M_bad_char_shift(__first[__i]), + _M_good_suffix[__j]); + } + return std::make_pair(__last, __last); + } + + + + + + +} +# 14 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/glue_algorithm_defs.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/execution_defs.h" 1 3 +# 15 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/execution_defs.h" 3 +namespace __pstl +{ +namespace execution +{ +inline namespace v1 +{ + + +class sequenced_policy +{ + public: + + static constexpr std::false_type + __allow_unsequenced() + { + return std::false_type{}; + } + static constexpr std::false_type + __allow_vector() + { + return std::false_type{}; + } + static constexpr std::false_type + __allow_parallel() + { + return std::false_type{}; + } +}; + + +class parallel_policy +{ + public: + + static constexpr std::false_type + __allow_unsequenced() + { + return std::false_type{}; + } + static constexpr std::false_type + __allow_vector() + { + return std::false_type{}; + } + static constexpr std::true_type + __allow_parallel() + { + return std::true_type{}; + } +}; + + +class parallel_unsequenced_policy +{ + public: + + static constexpr std::true_type + __allow_unsequenced() + { + return std::true_type{}; + } + static constexpr std::true_type + __allow_vector() + { + return std::true_type{}; + } + static constexpr std::true_type + __allow_parallel() + { + return std::true_type{}; + } +}; + +class unsequenced_policy +{ + public: + + static constexpr std::true_type + __allow_unsequenced() + { + return std::true_type{}; + } + static constexpr std::true_type + __allow_vector() + { + return std::true_type{}; + } + static constexpr std::false_type + __allow_parallel() + { + return std::false_type{}; + } +}; + + +constexpr sequenced_policy seq{}; +constexpr parallel_policy par{}; +constexpr parallel_unsequenced_policy par_unseq{}; +constexpr unsequenced_policy unseq{}; + + +template +struct is_execution_policy : std::false_type +{ +}; + +template <> +struct is_execution_policy<__pstl::execution::sequenced_policy> : std::true_type +{ +}; +template <> +struct is_execution_policy<__pstl::execution::parallel_policy> : std::true_type +{ +}; +template <> +struct is_execution_policy<__pstl::execution::parallel_unsequenced_policy> : std::true_type +{ +}; +template <> +struct is_execution_policy<__pstl::execution::unsequenced_policy> : std::true_type +{ +}; + + +template +constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<_Tp>::value; + + +} +} + +namespace __internal +{ +template + +using __enable_if_execution_policy = + typename std::enable_if<__pstl::execution::is_execution_policy>::value, + _Tp>::type; + + + + + +} + +} +# 16 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/glue_algorithm_defs.h" 2 3 + +namespace std +{ + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +any_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +all_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +none_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +for_each(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Function __f); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +for_each_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n, _Function __f); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +find_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +find_if_not(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, + _ForwardIterator2 __s_last, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, + _ForwardIterator2 __s_last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, + _ForwardIterator2 __s_first, _ForwardIterator2 __s_last, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, + _ForwardIterator2 __s_first, _ForwardIterator2 __s_last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, + typename iterator_traits<_ForwardIterator>::difference_type> +count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, + typename iterator_traits<_ForwardIterator>::difference_type> +count_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, + _ForwardIterator2 __s_last, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, + _ForwardIterator2 __s_last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count, + const _Tp& __value, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count, + const _Tp& __value); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +copy_n(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _Size __n, _ForwardIterator2 __result); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 result, + _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +swap_ranges(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, + _UnaryOperation __op); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator __result, _BinaryOperation __op); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +replace_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred, + const _Tp& __new_value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +replace(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, + const _Tp& __new_value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +replace_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, + _ForwardIterator2 __result, _UnaryPredicate __pred, const _Tp& __new_value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +replace_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, + const _Tp& __old_value, const _Tp& __new_value); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +fill_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __count, const _Tp& __value); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +generate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Generator __g); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +generate_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size count, _Generator __g); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +remove_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, + _ForwardIterator2 __result, _Predicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +remove_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, + const _Tp& __value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +remove_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +remove(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, + _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +reverse_copy(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, + _ForwardIterator __d_first); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +rotate_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __middle, _ForwardIterator1 __last, + _ForwardIterator2 __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_partitioned(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +partition(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _BidirectionalIterator> +stable_partition(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, + _UnaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +partition_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, + _ForwardIterator1 __out_true, _ForwardIterator2 __out_false, _UnaryPredicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _BinaryPredicate __p); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _BinaryPredicate __p); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +move(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, + _RandomAccessIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> +partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, + _RandomAccessIterator __d_first, _RandomAccessIterator __d_last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> +partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, + _RandomAccessIterator __d_first, _RandomAccessIterator __d_last); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _ForwardIterator __d_first, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _ForwardIterator __d_first); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, + _BidirectionalIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, + _BidirectionalIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _ForwardIterator __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator result, + _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> +is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> +is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>> +minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>> +minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2); + +} +# 75 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 2 3 +# 14 "../../module/sf.cxx" 2 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 + template + struct __static_sign + : integral_constant + { }; + + template + struct __static_abs + : integral_constant::value> + { }; + + template + struct __static_gcd + : __static_gcd<_Qn, (_Pn % _Qn)> + { }; + + template + struct __static_gcd<_Pn, 0> + : integral_constant::value> + { }; + + template + struct __static_gcd<0, _Qn> + : integral_constant::value> + { }; + + + + + + + + template + struct __safe_multiply + { + private: + static const uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); + + static const uintmax_t __a0 = __static_abs<_Pn>::value % __c; + static const uintmax_t __a1 = __static_abs<_Pn>::value / __c; + static const uintmax_t __b0 = __static_abs<_Qn>::value % __c; + static const uintmax_t __b1 = __static_abs<_Qn>::value / __c; + + static_assert(__a1 == 0 || __b1 == 0, + "overflow in multiplication"); + static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), + "overflow in multiplication"); + static_assert(__b0 * __a0 <= 0x7fffffffffffffffLL, + "overflow in multiplication"); + static_assert((__a0 * __b1 + __b0 * __a1) * __c + <= 0x7fffffffffffffffLL - __b0 * __a0, + "overflow in multiplication"); + + public: + static const intmax_t value = _Pn * _Qn; + }; + + + + template + struct __big_less + : integral_constant + { }; + + template + struct __big_add + { + static constexpr uintmax_t __lo = __lo1 + __lo2; + static constexpr uintmax_t __hi = (__hi1 + __hi2 + + (__lo1 + __lo2 < __lo1)); + }; + + + template + struct __big_sub + { + static_assert(!__big_less<__hi1, __lo1, __hi2, __lo2>::value, + "Internal library error"); + static constexpr uintmax_t __lo = __lo1 - __lo2; + static constexpr uintmax_t __hi = (__hi1 - __hi2 - + (__lo1 < __lo2)); + }; + + + template + struct __big_mul + { + private: + static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); + static constexpr uintmax_t __x0 = __x % __c; + static constexpr uintmax_t __x1 = __x / __c; + static constexpr uintmax_t __y0 = __y % __c; + static constexpr uintmax_t __y1 = __y / __c; + static constexpr uintmax_t __x0y0 = __x0 * __y0; + static constexpr uintmax_t __x0y1 = __x0 * __y1; + static constexpr uintmax_t __x1y0 = __x1 * __y0; + static constexpr uintmax_t __x1y1 = __x1 * __y1; + static constexpr uintmax_t __mix = __x0y1 + __x1y0; + static constexpr uintmax_t __mix_lo = __mix * __c; + static constexpr uintmax_t __mix_hi + = __mix / __c + ((__mix < __x0y1) ? __c : 0); + typedef __big_add<__mix_hi, __mix_lo, __x1y1, __x0y0> _Res; + public: + static constexpr uintmax_t __hi = _Res::__hi; + static constexpr uintmax_t __lo = _Res::__lo; + }; + + + + template + struct __big_div_impl + { + private: + static_assert(__d >= (uintmax_t(1) << (sizeof(intmax_t) * 8 - 1)), + "Internal library error"); + static_assert(__n1 < __d, "Internal library error"); + static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); + static constexpr uintmax_t __d1 = __d / __c; + static constexpr uintmax_t __d0 = __d % __c; + + static constexpr uintmax_t __q1x = __n1 / __d1; + static constexpr uintmax_t __r1x = __n1 % __d1; + static constexpr uintmax_t __m = __q1x * __d0; + static constexpr uintmax_t __r1y = __r1x * __c + __n0 / __c; + static constexpr uintmax_t __r1z = __r1y + __d; + static constexpr uintmax_t __r1 + = ((__r1y < __m) ? ((__r1z >= __d) && (__r1z < __m)) + ? (__r1z + __d) : __r1z : __r1y) - __m; + static constexpr uintmax_t __q1 + = __q1x - ((__r1y < __m) + ? ((__r1z >= __d) && (__r1z < __m)) ? 2 : 1 : 0); + static constexpr uintmax_t __q0x = __r1 / __d1; + static constexpr uintmax_t __r0x = __r1 % __d1; + static constexpr uintmax_t __n = __q0x * __d0; + static constexpr uintmax_t __r0y = __r0x * __c + __n0 % __c; + static constexpr uintmax_t __r0z = __r0y + __d; + static constexpr uintmax_t __r0 + = ((__r0y < __n) ? ((__r0z >= __d) && (__r0z < __n)) + ? (__r0z + __d) : __r0z : __r0y) - __n; + static constexpr uintmax_t __q0 + = __q0x - ((__r0y < __n) ? ((__r0z >= __d) + && (__r0z < __n)) ? 2 : 1 : 0); + + public: + static constexpr uintmax_t __quot = __q1 * __c + __q0; + static constexpr uintmax_t __rem = __r0; + + private: + typedef __big_mul<__quot, __d> _Prod; + typedef __big_add<_Prod::__hi, _Prod::__lo, 0, __rem> _Sum; + static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, + "Internal library error"); + }; + + template + struct __big_div + { + private: + static_assert(__d != 0, "Internal library error"); + static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), + "This library calls __builtin_clzll on uintmax_t, which " + "is unsafe on your platform. Please complain to " + "http://gcc.gnu.org/bugzilla/"); + static constexpr int __shift = __builtin_clzll(__d); + static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift; + static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0; + static constexpr uintmax_t __c1 = uintmax_t(1) << __shift; + static constexpr uintmax_t __c2 = uintmax_t(1) << __coshift; + static constexpr uintmax_t __new_d = __d * __c1; + static constexpr uintmax_t __new_n0 = __n0 * __c1; + static constexpr uintmax_t __n1_shifted = (__n1 % __d) * __c1; + static constexpr uintmax_t __n0_top = (__shift != 0) ? (__n0 / __c2) : 0; + static constexpr uintmax_t __new_n1 = __n1_shifted + __n0_top; + typedef __big_div_impl<__new_n1, __new_n0, __new_d> _Res; + + public: + static constexpr uintmax_t __quot_hi = __n1 / __d; + static constexpr uintmax_t __quot_lo = _Res::__quot; + static constexpr uintmax_t __rem = _Res::__rem / __c1; + + private: + typedef __big_mul<__quot_lo, __d> _P0; + typedef __big_mul<__quot_hi, __d> _P1; + typedef __big_add<_P0::__hi, _P0::__lo, _P1::__lo, __rem> _Sum; + + static_assert(_P1::__hi == 0, "Internal library error"); + static_assert(_Sum::__hi >= _P0::__hi, "Internal library error"); + + static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, + "Internal library error"); + static_assert(__rem < __d, "Internal library error"); + }; +# 265 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 + template + struct ratio + { + static_assert(_Den != 0, "denominator cannot be zero"); + static_assert(_Num >= -0x7fffffffffffffffLL && _Den >= -0x7fffffffffffffffLL, + "out of range"); + + + static constexpr intmax_t num = + _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value; + + static constexpr intmax_t den = + __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value; + + typedef ratio type; + }; + + template + constexpr intmax_t ratio<_Num, _Den>::num; + + template + constexpr intmax_t ratio<_Num, _Den>::den; + + + + template + struct __ratio_multiply + { + private: + static const intmax_t __gcd1 = + __static_gcd<_R1::num, _R2::den>::value; + static const intmax_t __gcd2 = + __static_gcd<_R2::num, _R1::den>::value; + + public: + typedef ratio< + __safe_multiply<(_R1::num / __gcd1), + (_R2::num / __gcd2)>::value, + __safe_multiply<(_R1::den / __gcd2), + (_R2::den / __gcd1)>::value> type; + + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; + }; + + template + constexpr intmax_t __ratio_multiply<_R1, _R2>::num; + + template + constexpr intmax_t __ratio_multiply<_R1, _R2>::den; + + + + + template + using ratio_multiply = typename __ratio_multiply<_R1, _R2>::type; + + + + template + struct __ratio_divide + { + static_assert(_R2::num != 0, "division by 0"); + + typedef typename __ratio_multiply< + _R1, + ratio<_R2::den, _R2::num>>::type type; + + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; + }; + + template + constexpr intmax_t __ratio_divide<_R1, _R2>::num; + + template + constexpr intmax_t __ratio_divide<_R1, _R2>::den; + + + + + template + using ratio_divide = typename __ratio_divide<_R1, _R2>::type; + + + template + struct ratio_equal + : integral_constant + { }; + + + template + struct ratio_not_equal + : integral_constant::value> + { }; + + + + + template, + typename _Right = __big_mul<_R2::num,_R1::den> > + struct __ratio_less_impl_1 + : integral_constant::value> + { }; + + template::value + != __static_sign<_R2::num>::value)), + bool = (__static_sign<_R1::num>::value == -1 + && __static_sign<_R2::num>::value == -1)> + struct __ratio_less_impl + : __ratio_less_impl_1<_R1, _R2>::type + { }; + + template + struct __ratio_less_impl<_R1, _R2, true, false> + : integral_constant + { }; + + template + struct __ratio_less_impl<_R1, _R2, false, true> + : __ratio_less_impl_1, + ratio<-_R1::num, _R1::den> >::type + { }; + + + + + template + struct ratio_less + : __ratio_less_impl<_R1, _R2>::type + { }; + + + template + struct ratio_less_equal + : integral_constant::value> + { }; + + + template + struct ratio_greater + : integral_constant::value> + { }; + + + template + struct ratio_greater_equal + : integral_constant::value> + { }; + + + template + inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; + template + inline constexpr bool ratio_less_equal_v = + ratio_less_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; + template + inline constexpr bool ratio_greater_equal_v + = ratio_greater_equal<_R1, _R2>::value; + + + + + template= 0), + bool = (_R2::num >= 0), + bool = ratio_less::value, _R1::den>, + ratio<__static_abs<_R2::num>::value, _R2::den> >::value> + struct __ratio_add_impl + { + private: + typedef typename __ratio_add_impl< + ratio<-_R1::num, _R1::den>, + ratio<-_R2::num, _R2::den> >::type __t; + public: + typedef ratio<-__t::num, __t::den> type; + }; + + + template + struct __ratio_add_impl<_R1, _R2, true, true, __b> + { + private: + static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; + static constexpr uintmax_t __d2 = _R2::den / __g; + typedef __big_mul<_R1::den, __d2> __d; + typedef __big_mul<_R1::num, _R2::den / __g> __x; + typedef __big_mul<_R2::num, _R1::den / __g> __y; + typedef __big_add<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; + static_assert(__n::__hi >= __x::__hi, "Internal library error"); + typedef __big_div<__n::__hi, __n::__lo, __g> __ng; + static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; + typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; + static_assert(__n_final::__rem == 0, "Internal library error"); + static_assert(__n_final::__quot_hi == 0 && + __n_final::__quot_lo <= 0x7fffffffffffffffLL, "overflow in addition"); + typedef __big_mul<_R1::den / __g2, __d2> __d_final; + static_assert(__d_final::__hi == 0 && + __d_final::__lo <= 0x7fffffffffffffffLL, "overflow in addition"); + public: + typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; + }; + + template + struct __ratio_add_impl<_R1, _R2, false, true, true> + : __ratio_add_impl<_R2, _R1> + { }; + + + template + struct __ratio_add_impl<_R1, _R2, true, false, false> + { + private: + static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; + static constexpr uintmax_t __d2 = _R2::den / __g; + typedef __big_mul<_R1::den, __d2> __d; + typedef __big_mul<_R1::num, _R2::den / __g> __x; + typedef __big_mul<-_R2::num, _R1::den / __g> __y; + typedef __big_sub<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; + typedef __big_div<__n::__hi, __n::__lo, __g> __ng; + static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; + typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; + static_assert(__n_final::__rem == 0, "Internal library error"); + static_assert(__n_final::__quot_hi == 0 && + __n_final::__quot_lo <= 0x7fffffffffffffffLL, "overflow in addition"); + typedef __big_mul<_R1::den / __g2, __d2> __d_final; + static_assert(__d_final::__hi == 0 && + __d_final::__lo <= 0x7fffffffffffffffLL, "overflow in addition"); + public: + typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; + }; + + template + struct __ratio_add + { + typedef typename __ratio_add_impl<_R1, _R2>::type type; + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; + }; + + template + constexpr intmax_t __ratio_add<_R1, _R2>::num; + + template + constexpr intmax_t __ratio_add<_R1, _R2>::den; + + + + + template + using ratio_add = typename __ratio_add<_R1, _R2>::type; + + + + template + struct __ratio_subtract + { + typedef typename __ratio_add< + _R1, + ratio<-_R2::num, _R2::den>>::type type; + + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; + }; + + template + constexpr intmax_t __ratio_subtract<_R1, _R2>::num; + + template + constexpr intmax_t __ratio_subtract<_R1, _R2>::den; + + + + + template + using ratio_subtract = typename __ratio_subtract<_R1, _R2>::type; + + + typedef ratio<1, 1000000000000000000> atto; + typedef ratio<1, 1000000000000000> femto; + typedef ratio<1, 1000000000000> pico; + typedef ratio<1, 1000000000> nano; + typedef ratio<1, 1000000> micro; + typedef ratio<1, 1000> milli; + typedef ratio<1, 100> centi; + typedef ratio<1, 10> deci; + typedef ratio< 10, 1> deca; + typedef ratio< 100, 1> hecto; + typedef ratio< 1000, 1> kilo; + typedef ratio< 1000000, 1> mega; + typedef ratio< 1000000000, 1> giga; + typedef ratio< 1000000000000, 1> tera; + typedef ratio< 1000000000000000, 1> peta; + typedef ratio< 1000000000000000000, 1> exa; + + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ctime" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ctime" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ctime" 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ctime" 3 +namespace std +{ + using ::clock_t; + using ::time_t; + using ::tm; + + using ::clock; + using ::difftime; + using ::mktime; + using ::time; + using ::asctime; + using ::ctime; + using ::gmtime; + using ::localtime; + using ::strftime; +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/parse_numbers.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/parse_numbers.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/parse_numbers.h" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/parse_numbers.h" 3 +namespace std +{ + + +namespace __parse_int +{ + template + struct _Digit; + + template + struct _Digit<_Base, '0'> : integral_constant + { + using __valid = true_type; + }; + + template + struct _Digit<_Base, '1'> : integral_constant + { + using __valid = true_type; + }; + + template + struct _Digit_impl : integral_constant + { + static_assert(_Base > _Val, "invalid digit"); + using __valid = true_type; + }; + + template + struct _Digit<_Base, '2'> : _Digit_impl<_Base, 2> + { }; + + template + struct _Digit<_Base, '3'> : _Digit_impl<_Base, 3> + { }; + + template + struct _Digit<_Base, '4'> : _Digit_impl<_Base, 4> + { }; + + template + struct _Digit<_Base, '5'> : _Digit_impl<_Base, 5> + { }; + + template + struct _Digit<_Base, '6'> : _Digit_impl<_Base, 6> + { }; + + template + struct _Digit<_Base, '7'> : _Digit_impl<_Base, 7> + { }; + + template + struct _Digit<_Base, '8'> : _Digit_impl<_Base, 8> + { }; + + template + struct _Digit<_Base, '9'> : _Digit_impl<_Base, 9> + { }; + + template + struct _Digit<_Base, 'a'> : _Digit_impl<_Base, 0xa> + { }; + + template + struct _Digit<_Base, 'A'> : _Digit_impl<_Base, 0xa> + { }; + + template + struct _Digit<_Base, 'b'> : _Digit_impl<_Base, 0xb> + { }; + + template + struct _Digit<_Base, 'B'> : _Digit_impl<_Base, 0xb> + { }; + + template + struct _Digit<_Base, 'c'> : _Digit_impl<_Base, 0xc> + { }; + + template + struct _Digit<_Base, 'C'> : _Digit_impl<_Base, 0xc> + { }; + + template + struct _Digit<_Base, 'd'> : _Digit_impl<_Base, 0xd> + { }; + + template + struct _Digit<_Base, 'D'> : _Digit_impl<_Base, 0xd> + { }; + + template + struct _Digit<_Base, 'e'> : _Digit_impl<_Base, 0xe> + { }; + + template + struct _Digit<_Base, 'E'> : _Digit_impl<_Base, 0xe> + { }; + + template + struct _Digit<_Base, 'f'> : _Digit_impl<_Base, 0xf> + { }; + + template + struct _Digit<_Base, 'F'> : _Digit_impl<_Base, 0xf> + { }; + + + template + struct _Digit<_Base, '\''> : integral_constant + { + using __valid = false_type; + }; + + + + template + using __ull_constant = integral_constant; + + template + struct _Power_help + { + using __next = typename _Power_help<_Base, _Digs...>::type; + using __valid_digit = typename _Digit<_Base, _Dig>::__valid; + using type + = __ull_constant<__next::value * (__valid_digit{} ? _Base : 1ULL)>; + }; + + template + struct _Power_help<_Base, _Dig> + { + using __valid_digit = typename _Digit<_Base, _Dig>::__valid; + using type = __ull_constant<__valid_digit::value>; + }; + + template + struct _Power : _Power_help<_Base, _Digs...>::type + { }; + + template + struct _Power<_Base> : __ull_constant<0> + { }; + + + + template + struct _Number_help + { + using __digit = _Digit<_Base, _Dig>; + using __valid_digit = typename __digit::__valid; + using __next = _Number_help<_Base, + __valid_digit::value ? _Pow / _Base : _Pow, + _Digs...>; + using type = __ull_constant<_Pow * __digit::value + __next::type::value>; + static_assert((type::value / _Pow) == __digit::value, + "integer literal does not fit in unsigned long long"); + }; + + + template + struct _Number_help<_Base, _Pow, '\'', _Dig, _Digs...> + : _Number_help<_Base, _Pow, _Dig, _Digs...> + { }; + + + template + struct _Number_help<_Base, 1ULL, _Dig> + { + using type = __ull_constant<_Digit<_Base, _Dig>::value>; + }; + + template + struct _Number + : _Number_help<_Base, _Power<_Base, _Digs...>::value, _Digs...>::type + { }; + + template + struct _Number<_Base> + : __ull_constant<0> + { }; + + + + template + struct _Parse_int; + + template + struct _Parse_int<'0', 'b', _Digs...> + : _Number<2U, _Digs...>::type + { }; + + template + struct _Parse_int<'0', 'B', _Digs...> + : _Number<2U, _Digs...>::type + { }; + + template + struct _Parse_int<'0', 'x', _Digs...> + : _Number<16U, _Digs...>::type + { }; + + template + struct _Parse_int<'0', 'X', _Digs...> + : _Number<16U, _Digs...>::type + { }; + + template + struct _Parse_int<'0', _Digs...> + : _Number<8U, _Digs...>::type + { }; + + template + struct _Parse_int + : _Number<10U, _Digs...>::type + { }; + +} + + +namespace __select_int +{ + template + struct _Select_int_base; + + template + struct _Select_int_base<_Val, _IntType, _Ints...> + : conditional_t<(_Val <= __gnu_cxx::__int_traits<_IntType>::__max), + integral_constant<_IntType, (_IntType)_Val>, + _Select_int_base<_Val, _Ints...>> + { }; + + template + struct _Select_int_base<_Val> + { }; + + template + using _Select_int = typename _Select_int_base< + __parse_int::_Parse_int<_Digs...>::value, + unsigned char, + unsigned short, + unsigned int, + unsigned long, + unsigned long long + >::type; + +} + + +} +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 2 3 + + + + + +namespace std +{ + + + + namespace filesystem { struct __file_clock; }; +# 68 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + namespace chrono + { + template> + struct duration; + + template + struct time_point; + } + + + + + + template + struct __duration_common_type + { }; + + template + struct __duration_common_type<_CT, _Period1, _Period2, + __void_t> + { + private: + using __gcd_num = __static_gcd<_Period1::num, _Period2::num>; + using __gcd_den = __static_gcd<_Period1::den, _Period2::den>; + using __cr = typename _CT::type; + using __r = ratio<__gcd_num::value, + (_Period1::den / __gcd_den::value) * _Period2::den>; + + public: + using type = chrono::duration<__cr, typename __r::type>; + }; + + + + + + template + struct common_type, + chrono::duration<_Rep2, _Period2>> + : __duration_common_type, + typename _Period1::type, + typename _Period2::type> + { }; + + + + template + struct common_type, + chrono::duration<_Rep, _Period>> + { + using type = chrono::duration::type, + typename _Period::type>; + }; + + + + template + struct common_type> + { + using type = chrono::duration::type, + typename _Period::type>; + }; + + + + + + template + struct __timepoint_common_type + { }; + + template + struct __timepoint_common_type<_CT, _Clock, __void_t> + { + using type = chrono::time_point<_Clock, typename _CT::type>; + }; + + + + + + template + struct common_type, + chrono::time_point<_Clock, _Duration2>> + : __timepoint_common_type, _Clock> + { }; + + + + template + struct common_type, + chrono::time_point<_Clock, _Duration>> + { using type = chrono::time_point<_Clock, _Duration>; }; + + + + template + struct common_type> + { using type = chrono::time_point<_Clock, _Duration>; }; + + + + namespace chrono + { + + + + + + + template + struct __duration_cast_impl + { + template + static constexpr _ToDur + __cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::rep __to_rep; + return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count()) + * static_cast<_CR>(_CF::num) + / static_cast<_CR>(_CF::den))); + } + }; + + template + struct __duration_cast_impl<_ToDur, _CF, _CR, true, true> + { + template + static constexpr _ToDur + __cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::rep __to_rep; + return _ToDur(static_cast<__to_rep>(__d.count())); + } + }; + + template + struct __duration_cast_impl<_ToDur, _CF, _CR, true, false> + { + template + static constexpr _ToDur + __cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::rep __to_rep; + return _ToDur(static_cast<__to_rep>( + static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den))); + } + }; + + template + struct __duration_cast_impl<_ToDur, _CF, _CR, false, true> + { + template + static constexpr _ToDur + __cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::rep __to_rep; + return _ToDur(static_cast<__to_rep>( + static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num))); + } + }; + + template + struct __is_duration + : std::false_type + { }; + + template + struct __is_duration> + : std::true_type + { }; + + template + using __enable_if_is_duration + = typename enable_if<__is_duration<_Tp>::value, _Tp>::type; + + template + using __disable_if_is_duration + = typename enable_if::value, _Tp>::type; + + + + + template + constexpr __enable_if_is_duration<_ToDur> + duration_cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::period __to_period; + typedef typename _ToDur::rep __to_rep; + typedef ratio_divide<_Period, __to_period> __cf; + typedef typename common_type<__to_rep, _Rep, intmax_t>::type + __cr; + typedef __duration_cast_impl<_ToDur, __cf, __cr, + __cf::num == 1, __cf::den == 1> __dc; + return __dc::__cast(__d); + } + + + template + struct treat_as_floating_point + : is_floating_point<_Rep> + { }; + + + template + inline constexpr bool treat_as_floating_point_v = + treat_as_floating_point<_Rep>::value; + + + + template + struct is_clock; + + template + inline constexpr bool is_clock_v = is_clock<_Tp>::value; + + + template + struct is_clock : false_type + { }; + + template + requires requires { + typename _Tp::rep; + typename _Tp::period; + typename _Tp::duration; + typename _Tp::time_point::clock; + typename _Tp::time_point::duration; + { &_Tp::is_steady } -> same_as; + { _Tp::now() } -> same_as; + requires same_as>; + requires same_as; + } + struct is_clock<_Tp> : true_type + { }; +# 335 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template + constexpr __enable_if_is_duration<_ToDur> + floor(const duration<_Rep, _Period>& __d) + { + auto __to = chrono::duration_cast<_ToDur>(__d); + if (__to > __d) + return __to - _ToDur{1}; + return __to; + } + + template + constexpr __enable_if_is_duration<_ToDur> + ceil(const duration<_Rep, _Period>& __d) + { + auto __to = chrono::duration_cast<_ToDur>(__d); + if (__to < __d) + return __to + _ToDur{1}; + return __to; + } + + template + constexpr enable_if_t< + __and_<__is_duration<_ToDur>, + __not_>>::value, + _ToDur> + round(const duration<_Rep, _Period>& __d) + { + _ToDur __t0 = chrono::floor<_ToDur>(__d); + _ToDur __t1 = __t0 + _ToDur{1}; + auto __diff0 = __d - __t0; + auto __diff1 = __t1 - __d; + if (__diff0 == __diff1) + { + if (__t0.count() & 1) + return __t1; + return __t0; + } + else if (__diff0 < __diff1) + return __t0; + return __t1; + } + + template + constexpr + enable_if_t::is_signed, duration<_Rep, _Period>> + abs(duration<_Rep, _Period> __d) + { + if (__d >= __d.zero()) + return __d; + return -__d; + } + + + namespace __detail { using chrono::ceil; } +# 415 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template + struct duration_values + { + static constexpr _Rep + zero() noexcept + { return _Rep(0); } + + static constexpr _Rep + max() noexcept + { return numeric_limits<_Rep>::max(); } + + static constexpr _Rep + min() noexcept + { return numeric_limits<_Rep>::lowest(); } + }; + + + + template + struct __is_ratio + : std::false_type + { }; + + template + struct __is_ratio> + : std::true_type + { }; + + + + + template + struct duration + { + private: + template + using __is_float = treat_as_floating_point<_Rep2>; + + static constexpr intmax_t + _S_gcd(intmax_t __m, intmax_t __n) noexcept + { + + + + do + { + intmax_t __rem = __m % __n; + __m = __n; + __n = __rem; + } + while (__n != 0); + return __m; + + + + + + } + + + + + + template + using __divide = ratio<(_R1::num / __gcd1) * (_R2::den / __gcd2), + (_R1::den / __gcd2) * (_R2::num / __gcd1)>; + + + template + using __is_harmonic + = __bool_constant<__divide<_Period2, _Period>::den == 1>; + + public: + + using rep = _Rep; + using period = typename _Period::type; + + static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration"); + static_assert(__is_ratio<_Period>::value, + "period must be a specialization of ratio"); + static_assert(_Period::num > 0, "period must be positive"); + + + constexpr duration() = default; + + duration(const duration&) = default; + + + + template, + __or_<__is_float, __not_<__is_float<_Rep2>>>>> + constexpr explicit duration(const _Rep2& __rep) + : __r(static_cast(__rep)) { } + + template, + __or_<__is_float, + __and_<__is_harmonic<_Period2>, + __not_<__is_float<_Rep2>>>>>> + constexpr duration(const duration<_Rep2, _Period2>& __d) + : __r(duration_cast(__d).count()) { } + + ~duration() = default; + duration& operator=(const duration&) = default; + + + constexpr rep + count() const + { return __r; } + + + + constexpr duration::type, period> + operator+() const + { return duration::type, period>(__r); } + + constexpr duration::type, period> + operator-() const + { return duration::type, period>(-__r); } + + constexpr duration& + operator++() + { + ++__r; + return *this; + } + + constexpr duration + operator++(int) + { return duration(__r++); } + + constexpr duration& + operator--() + { + --__r; + return *this; + } + + constexpr duration + operator--(int) + { return duration(__r--); } + + constexpr duration& + operator+=(const duration& __d) + { + __r += __d.count(); + return *this; + } + + constexpr duration& + operator-=(const duration& __d) + { + __r -= __d.count(); + return *this; + } + + constexpr duration& + operator*=(const rep& __rhs) + { + __r *= __rhs; + return *this; + } + + constexpr duration& + operator/=(const rep& __rhs) + { + __r /= __rhs; + return *this; + } + + + template + constexpr + typename enable_if::value, + duration&>::type + operator%=(const rep& __rhs) + { + __r %= __rhs; + return *this; + } + + template + constexpr + typename enable_if::value, + duration&>::type + operator%=(const duration& __d) + { + __r %= __d.count(); + return *this; + } + + + static constexpr duration + zero() noexcept + { return duration(duration_values::zero()); } + + static constexpr duration + min() noexcept + { return duration(duration_values::min()); } + + static constexpr duration + max() noexcept + { return duration(duration_values::max()); } + + private: + rep __r; + }; + + + + + template + constexpr typename common_type, + duration<_Rep2, _Period2>>::type + operator+(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __cd; + return __cd(__cd(__lhs).count() + __cd(__rhs).count()); + } + + + template + constexpr typename common_type, + duration<_Rep2, _Period2>>::type + operator-(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __cd; + return __cd(__cd(__lhs).count() - __cd(__rhs).count()); + } +# 664 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template::type> + using __common_rep_t = typename + enable_if::value, _CRep>::type; + + + + + + + template + constexpr duration<__common_rep_t<_Rep1, _Rep2>, _Period> + operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) + { + typedef duration::type, _Period> + __cd; + return __cd(__cd(__d).count() * __s); + } + + + template + constexpr duration<__common_rep_t<_Rep2, _Rep1>, _Period> + operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) + { return __d * __s; } + + template + constexpr + duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> + operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) + { + typedef duration::type, _Period> + __cd; + return __cd(__cd(__d).count() / __s); + } + + template + constexpr typename common_type<_Rep1, _Rep2>::type + operator/(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __cd; + return __cd(__lhs).count() / __cd(__rhs).count(); + } + + + template + constexpr + duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> + operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) + { + typedef duration::type, _Period> + __cd; + return __cd(__cd(__d).count() % __s); + } + + template + constexpr typename common_type, + duration<_Rep2, _Period2>>::type + operator%(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __cd; + return __cd(__cd(__lhs).count() % __cd(__rhs).count()); + } + + + + template + constexpr bool + operator==(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __ct; + return __ct(__lhs).count() == __ct(__rhs).count(); + } + + template + constexpr bool + operator<(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __ct; + return __ct(__lhs).count() < __ct(__rhs).count(); + } + + + template + requires three_way_comparable> + constexpr auto + operator<=>(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + using __ct = common_type_t, + duration<_Rep2, _Period2>>; + return __ct(__lhs).count() <=> __ct(__rhs).count(); + } +# 782 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template + constexpr bool + operator<=(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { return !(__rhs < __lhs); } + + template + constexpr bool + operator>(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { return __rhs < __lhs; } + + template + constexpr bool + operator>=(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { return !(__lhs < __rhs); } +# 816 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + using nanoseconds = duration; + + + using microseconds = duration; + + + using milliseconds = duration; + + + using seconds = duration; + + + using minutes = duration>; + + + using hours = duration>; + + + + using days = duration>; + + + using weeks = duration>; + + + using years = duration>; + + + using months = duration>; + + + + + + template + struct time_point + { + static_assert(__is_duration<_Dur>::value, + "duration must be a specialization of std::chrono::duration"); + + typedef _Clock clock; + typedef _Dur duration; + typedef typename duration::rep rep; + typedef typename duration::period period; + + constexpr time_point() : __d(duration::zero()) + { } + + constexpr explicit time_point(const duration& __dur) + : __d(__dur) + { } + + + template>> + constexpr time_point(const time_point& __t) + : __d(__t.time_since_epoch()) + { } + + + constexpr duration + time_since_epoch() const + { return __d; } + + + constexpr time_point& + operator++() + { + ++__d; + return *this; + } + + constexpr time_point + operator++(int) + { return time_point{__d++}; } + + constexpr time_point& + operator--() + { + --__d; + return *this; + } + + constexpr time_point + operator--(int) + { return time_point{__d--}; } + + + + constexpr time_point& + operator+=(const duration& __dur) + { + __d += __dur; + return *this; + } + + constexpr time_point& + operator-=(const duration& __dur) + { + __d -= __dur; + return *this; + } + + + static constexpr time_point + min() noexcept + { return time_point(duration::min()); } + + static constexpr time_point + max() noexcept + { return time_point(duration::max()); } + + private: + duration __d; + }; + + + template + constexpr typename enable_if<__is_duration<_ToDur>::value, + time_point<_Clock, _ToDur>>::type + time_point_cast(const time_point<_Clock, _Dur>& __t) + { + typedef time_point<_Clock, _ToDur> __time_point; + return __time_point(duration_cast<_ToDur>(__t.time_since_epoch())); + } + + + template + constexpr + enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>> + floor(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::floor<_ToDur>(__tp.time_since_epoch())}; + } + + template + constexpr + enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>> + ceil(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::ceil<_ToDur>(__tp.time_since_epoch())}; + } + + template + constexpr enable_if_t< + __and_<__is_duration<_ToDur>, + __not_>>::value, + time_point<_Clock, _ToDur>> + round(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::round<_ToDur>(__tp.time_since_epoch())}; + } + + + + + + template + constexpr time_point<_Clock, + typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> + operator+(const time_point<_Clock, _Dur1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<_Dur1,__dur2>::type __ct; + typedef time_point<_Clock, __ct> __time_point; + return __time_point(__lhs.time_since_epoch() + __rhs); + } + + + template + constexpr time_point<_Clock, + typename common_type, _Dur2>::type> + operator+(const duration<_Rep1, _Period1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef typename common_type<__dur1,_Dur2>::type __ct; + typedef time_point<_Clock, __ct> __time_point; + return __time_point(__rhs.time_since_epoch() + __lhs); + } + + + template + constexpr time_point<_Clock, + typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> + operator-(const time_point<_Clock, _Dur1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<_Dur1,__dur2>::type __ct; + typedef time_point<_Clock, __ct> __time_point; + return __time_point(__lhs.time_since_epoch() -__rhs); + } + + + + + + + template + constexpr typename common_type<_Dur1, _Dur2>::type + operator-(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __lhs.time_since_epoch() - __rhs.time_since_epoch(); } + + template + constexpr bool + operator==(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); } + + + template _Dur2> + constexpr auto + operator<=>(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __lhs.time_since_epoch() <=> __rhs.time_since_epoch(); } +# 1049 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template + constexpr bool + operator<(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); } + + template + constexpr bool + operator<=(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return !(__rhs < __lhs); } + + template + constexpr bool + operator>(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __rhs < __lhs; } + + template + constexpr bool + operator>=(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return !(__lhs < __rhs); } +# 1093 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + inline namespace _V2 { + + + + + + + + struct system_clock + { + typedef chrono::nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + + static_assert(system_clock::duration::min() + < system_clock::duration::zero(), + "a clock's minimum duration cannot be less than its epoch"); + + static constexpr bool is_steady = false; + + static time_point + now() noexcept; + + + static std::time_t + to_time_t(const time_point& __t) noexcept + { + return std::time_t(duration_cast + (__t.time_since_epoch()).count()); + } + + static time_point + from_time_t(std::time_t __t) noexcept + { + typedef chrono::time_point __from; + return time_point_cast + (__from(chrono::seconds(__t))); + } + }; +# 1141 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + struct steady_clock + { + typedef chrono::nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + + static constexpr bool is_steady = true; + + static time_point + now() noexcept; + }; +# 1163 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + using high_resolution_clock = system_clock; + + } + + + template + using sys_time = time_point; + using sys_seconds = sys_time; + using sys_days = sys_time; + + using file_clock = ::std::filesystem::__file_clock; + + template + using file_time = time_point; + + template<> struct is_clock : true_type { }; + template<> struct is_clock : true_type { }; + template<> struct is_clock : true_type { }; + + template<> inline constexpr bool is_clock_v = true; + template<> inline constexpr bool is_clock_v = true; + template<> inline constexpr bool is_clock_v = true; + + struct local_t { }; + template + using local_time = time_point; + using local_seconds = local_time; + using local_days = local_time; + + class utc_clock; + class tai_clock; + class gps_clock; + + template + using utc_time = time_point; + using utc_seconds = utc_time; + + template + using tai_time = time_point; + using tai_seconds = tai_time; + + template + using gps_time = time_point; + using gps_seconds = gps_time; + + template<> struct is_clock : true_type { }; + template<> struct is_clock : true_type { }; + template<> struct is_clock : true_type { }; + + template<> inline constexpr bool is_clock_v = true; + template<> inline constexpr bool is_clock_v = true; + template<> inline constexpr bool is_clock_v = true; + + struct leap_second_info + { + bool is_leap_second; + seconds elapsed; + }; + + + + + class day; + class month; + class year; + class weekday; + class weekday_indexed; + class weekday_last; + class month_day; + class month_day_last; + class month_weekday; + class month_weekday_last; + class year_month; + class year_month_day; + class year_month_day_last; + class year_month_weekday; + class year_month_weekday_last; + + struct last_spec + { + explicit last_spec() = default; + + friend constexpr month_day_last + operator/(int __m, last_spec) noexcept; + + friend constexpr month_day_last + operator/(last_spec, int __m) noexcept; + }; + + inline constexpr last_spec last{}; + + namespace __detail + { + + + + + + constexpr unsigned + __modulo(long long __n, unsigned __d) + { + if (__n >= 0) + return __n % __d; + else + return (__d + (__n % __d)) % __d; + } + + inline constexpr unsigned __days_per_month[12] + = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + } + + + + class day + { + private: + unsigned char _M_d; + + public: + day() = default; + + explicit constexpr + day(unsigned __d) noexcept + : _M_d(__d) + { } + + constexpr day& + operator++() noexcept + { + ++_M_d; + return *this; + } + + constexpr day + operator++(int) noexcept + { + auto __ret = *this; + ++(*this); + return __ret; + } + + constexpr day& + operator--() noexcept + { + --_M_d; + return *this; + } + + constexpr day + operator--(int) noexcept + { + auto __ret = *this; + --(*this); + return __ret; + } + + constexpr day& + operator+=(const days& __d) noexcept + { + *this = *this + __d; + return *this; + } + + constexpr day& + operator-=(const days& __d) noexcept + { + *this = *this - __d; + return *this; + } + + constexpr explicit + operator unsigned() const noexcept + { return _M_d; } + + constexpr bool + ok() const noexcept + { return 1 <= _M_d && _M_d <= 31; } + + friend constexpr bool + operator==(const day& __x, const day& __y) noexcept + { return unsigned{__x} == unsigned{__y}; } + + friend constexpr strong_ordering + operator<=>(const day& __x, const day& __y) noexcept + { return unsigned{__x} <=> unsigned{__y}; } + + friend constexpr day + operator+(const day& __x, const days& __y) noexcept + { return day(unsigned{__x} + __y.count()); } + + friend constexpr day + operator+(const days& __x, const day& __y) noexcept + { return __y + __x; } + + friend constexpr day + operator-(const day& __x, const days& __y) noexcept + { return __x + -__y; } + + friend constexpr days + operator-(const day& __x, const day& __y) noexcept + { return days{int(unsigned{__x}) - int(unsigned{__y})}; } + + friend constexpr month_day + operator/(const month& __m, const day& __d) noexcept; + + friend constexpr month_day + operator/(int __m, const day& __d) noexcept; + + friend constexpr month_day + operator/(const day& __d, const month& __m) noexcept; + + friend constexpr month_day + operator/(const day& __d, int __m) noexcept; + + friend constexpr year_month_day + operator/(const year_month& __ym, const day& __d) noexcept; + + + }; + + + + class month + { + private: + unsigned char _M_m; + + public: + month() = default; + + explicit constexpr + month(unsigned __m) noexcept + : _M_m(__m) + { } + + constexpr month& + operator++() noexcept + { + *this += months{1}; + return *this; + } + + constexpr month + operator++(int) noexcept + { + auto __ret = *this; + ++(*this); + return __ret; + } + + constexpr month& + operator--() noexcept + { + *this -= months{1}; + return *this; + } + + constexpr month + operator--(int) noexcept + { + auto __ret = *this; + --(*this); + return __ret; + } + + constexpr month& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + constexpr month& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + explicit constexpr + operator unsigned() const noexcept + { return _M_m; } + + constexpr bool + ok() const noexcept + { return 1 <= _M_m && _M_m <= 12; } + + friend constexpr bool + operator==(const month& __x, const month& __y) noexcept + { return unsigned{__x} == unsigned{__y}; } + + friend constexpr strong_ordering + operator<=>(const month& __x, const month& __y) noexcept + { return unsigned{__x} <=> unsigned{__y}; } + + friend constexpr month + operator+(const month& __x, const months& __y) noexcept + { + auto __n = static_cast(unsigned{__x}) + (__y.count() - 1); + return month{__detail::__modulo(__n, 12) + 1}; + } + + friend constexpr month + operator+(const months& __x, const month& __y) noexcept + { return __y + __x; } + + friend constexpr month + operator-(const month& __x, const months& __y) noexcept + { return __x + -__y; } + + friend constexpr months + operator-(const month& __x, const month& __y) noexcept + { + const auto __dm = int(unsigned(__x)) - int(unsigned(__y)); + return months{__dm < 0 ? 12 + __dm : __dm}; + } + + friend constexpr year_month + operator/(const year& __y, const month& __m) noexcept; + + friend constexpr month_day + operator/(const month& __m, int __d) noexcept; + + friend constexpr month_day_last + operator/(const month& __m, last_spec) noexcept; + + friend constexpr month_day_last + operator/(last_spec, const month& __m) noexcept; + + friend constexpr month_weekday + operator/(const month& __m, const weekday_indexed& __wdi) noexcept; + + friend constexpr month_weekday + operator/(const weekday_indexed& __wdi, const month& __m) noexcept; + + friend constexpr month_weekday_last + operator/(const month& __m, const weekday_last& __wdl) noexcept; + + friend constexpr month_weekday_last + operator/(const weekday_last& __wdl, const month& __m) noexcept; + + + }; + + inline constexpr month January{1}; + inline constexpr month February{2}; + inline constexpr month March{3}; + inline constexpr month April{4}; + inline constexpr month May{5}; + inline constexpr month June{6}; + inline constexpr month July{7}; + inline constexpr month August{8}; + inline constexpr month September{9}; + inline constexpr month October{10}; + inline constexpr month November{11}; + inline constexpr month December{12}; + + + + class year + { + private: + short _M_y; + + public: + year() = default; + + explicit constexpr + year(int __y) noexcept + : _M_y{static_cast(__y)} + { } + + static constexpr year + min() noexcept + { return year{-32767}; } + + static constexpr year + max() noexcept + { return year{32767}; } + + constexpr year& + operator++() noexcept + { + ++_M_y; + return *this; + } + + constexpr year + operator++(int) noexcept + { + auto __ret = *this; + ++(*this); + return __ret; + } + + constexpr year& + operator--() noexcept + { + --_M_y; + return *this; + } + + constexpr year + operator--(int) noexcept + { + auto __ret = *this; + --(*this); + return __ret; + } + + constexpr year& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr year + operator+() const noexcept + { return *this; } + + constexpr year + operator-() const noexcept + { return year{-_M_y}; } + + constexpr bool + is_leap() const noexcept + { +# 1609 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + constexpr uint32_t __multiplier = 42949673; + constexpr uint32_t __bound = 42949669; + constexpr uint32_t __max_dividend = 1073741799; + constexpr uint32_t __offset = __max_dividend / 2 / 100 * 100; + const bool __is_multiple_of_100 + = __multiplier * (_M_y + __offset) < __bound; + return (!__is_multiple_of_100 || _M_y % 400 == 0) && _M_y % 4 == 0; + } + + explicit constexpr + operator int() const noexcept + { return _M_y; } + + constexpr bool + ok() const noexcept + { return min()._M_y <= _M_y && _M_y <= max()._M_y; } + + friend constexpr bool + operator==(const year& __x, const year& __y) noexcept + { return int{__x} == int{__y}; } + + friend constexpr strong_ordering + operator<=>(const year& __x, const year& __y) noexcept + { return int{__x} <=> int{__y}; } + + friend constexpr year + operator+(const year& __x, const years& __y) noexcept + { return year{int{__x} + static_cast(__y.count())}; } + + friend constexpr year + operator+(const years& __x, const year& __y) noexcept + { return __y + __x; } + + friend constexpr year + operator-(const year& __x, const years& __y) noexcept + { return __x + -__y; } + + friend constexpr years + operator-(const year& __x, const year& __y) noexcept + { return years{int{__x} - int{__y}}; } + + friend constexpr year_month + operator/(const year& __y, int __m) noexcept; + + friend constexpr year_month_day + operator/(const year& __y, const month_day& __md) noexcept; + + friend constexpr year_month_day + operator/(const month_day& __md, const year& __y) noexcept; + + friend constexpr year_month_day_last + operator/(const year& __y, const month_day_last& __mdl) noexcept; + + friend constexpr year_month_day_last + operator/(const month_day_last& __mdl, const year& __y) noexcept; + + friend constexpr year_month_weekday + operator/(const year& __y, const month_weekday& __mwd) noexcept; + + friend constexpr year_month_weekday + operator/(const month_weekday& __mwd, const year& __y) noexcept; + + friend constexpr year_month_weekday_last + operator/(const year& __y, const month_weekday_last& __mwdl) noexcept; + + friend constexpr year_month_weekday_last + operator/(const month_weekday_last& __mwdl, const year& __y) noexcept; + + + }; + + + + class weekday + { + private: + unsigned char _M_wd; + + static constexpr weekday + _S_from_days(const days& __d) + { + auto __n = __d.count(); + return weekday(__n >= -4 ? (__n + 4) % 7 : (__n + 5) % 7 + 6); + } + + public: + weekday() = default; + + explicit constexpr + weekday(unsigned __wd) noexcept + : _M_wd(__wd == 7 ? 0 : __wd) + { } + + constexpr + weekday(const sys_days& __dp) noexcept + : weekday{_S_from_days(__dp.time_since_epoch())} + { } + + explicit constexpr + weekday(const local_days& __dp) noexcept + : weekday{sys_days{__dp.time_since_epoch()}} + { } + + constexpr weekday& + operator++() noexcept + { + *this += days{1}; + return *this; + } + + constexpr weekday + operator++(int) noexcept + { + auto __ret = *this; + ++(*this); + return __ret; + } + + constexpr weekday& + operator--() noexcept + { + *this -= days{1}; + return *this; + } + + constexpr weekday + operator--(int) noexcept + { + auto __ret = *this; + --(*this); + return __ret; + } + + constexpr weekday& + operator+=(const days& __d) noexcept + { + *this = *this + __d; + return *this; + } + + constexpr weekday& + operator-=(const days& __d) noexcept + { + *this = *this - __d; + return *this; + } + + constexpr unsigned + c_encoding() const noexcept + { return _M_wd; } + + constexpr unsigned + iso_encoding() const noexcept + { return _M_wd == 0u ? 7u : _M_wd; } + + constexpr bool + ok() const noexcept + { return _M_wd <= 6; } + + constexpr weekday_indexed + operator[](unsigned __index) const noexcept; + + constexpr weekday_last + operator[](last_spec) const noexcept; + + friend constexpr bool + operator==(const weekday& __x, const weekday& __y) noexcept + { return __x._M_wd == __y._M_wd; } + + friend constexpr weekday + operator+(const weekday& __x, const days& __y) noexcept + { + auto __n = static_cast(__x._M_wd) + __y.count(); + return weekday{__detail::__modulo(__n, 7)}; + } + + friend constexpr weekday + operator+(const days& __x, const weekday& __y) noexcept + { return __y + __x; } + + friend constexpr weekday + operator-(const weekday& __x, const days& __y) noexcept + { return __x + -__y; } + + friend constexpr days + operator-(const weekday& __x, const weekday& __y) noexcept + { + auto __n = static_cast(__x._M_wd) - __y._M_wd; + return days{__detail::__modulo(__n, 7)}; + } + + + }; + + inline constexpr weekday Sunday{0}; + inline constexpr weekday Monday{1}; + inline constexpr weekday Tuesday{2}; + inline constexpr weekday Wednesday{3}; + inline constexpr weekday Thursday{4}; + inline constexpr weekday Friday{5}; + inline constexpr weekday Saturday{6}; + + + + class weekday_indexed + { + private: + chrono::weekday _M_wd; + unsigned char _M_index; + + public: + weekday_indexed() = default; + + constexpr + weekday_indexed(const chrono::weekday& __wd, unsigned __index) noexcept + : _M_wd(__wd), _M_index(__index) + { } + + constexpr chrono::weekday + weekday() const noexcept + { return _M_wd; } + + constexpr unsigned + index() const noexcept + { return _M_index; }; + + constexpr bool + ok() const noexcept + { return _M_wd.ok() && 1 <= _M_index && _M_index <= 5; } + + friend constexpr bool + operator==(const weekday_indexed& __x, const weekday_indexed& __y) noexcept + { return __x.weekday() == __y.weekday() && __x.index() == __y.index(); } + + friend constexpr month_weekday + operator/(const month& __m, const weekday_indexed& __wdi) noexcept; + + friend constexpr month_weekday + operator/(int __m, const weekday_indexed& __wdi) noexcept; + + friend constexpr month_weekday + operator/(const weekday_indexed& __wdi, const month& __m) noexcept; + + friend constexpr month_weekday + operator/(const weekday_indexed& __wdi, int __m) noexcept; + + friend constexpr year_month_weekday + operator/(const year_month& __ym, const weekday_indexed& __wdi) noexcept; + + + }; + + constexpr weekday_indexed + weekday::operator[](unsigned __index) const noexcept + { return {*this, __index}; } + + + + class weekday_last + { + private: + chrono::weekday _M_wd; + + public: + explicit constexpr + weekday_last(const chrono::weekday& __wd) noexcept + : _M_wd{__wd} + { } + + constexpr chrono::weekday + weekday() const noexcept + { return _M_wd; } + + constexpr bool + ok() const noexcept + { return _M_wd.ok(); } + + friend constexpr bool + operator==(const weekday_last& __x, const weekday_last& __y) noexcept + { return __x.weekday() == __y.weekday(); } + + friend constexpr month_weekday_last + operator/(int __m, const weekday_last& __wdl) noexcept; + + friend constexpr month_weekday_last + operator/(const weekday_last& __wdl, int __m) noexcept; + + friend constexpr year_month_weekday_last + operator/(const year_month& __ym, const weekday_last& __wdl) noexcept; + + + }; + + constexpr weekday_last + weekday::operator[](last_spec) const noexcept + { return weekday_last{*this}; } + + + + class month_day + { + private: + chrono::month _M_m; + chrono::day _M_d; + + public: + month_day() = default; + + constexpr + month_day(const chrono::month& __m, const chrono::day& __d) noexcept + : _M_m{__m}, _M_d{__d} + { } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::day + day() const noexcept + { return _M_d; } + + constexpr bool + ok() const noexcept + { + return _M_m.ok() + && 1u <= unsigned(_M_d) + && unsigned(_M_d) <= __detail::__days_per_month[unsigned(_M_m) - 1]; + } + + friend constexpr bool + operator==(const month_day& __x, const month_day& __y) noexcept + { return __x.month() == __y.month() && __x.day() == __y.day(); } + + friend constexpr strong_ordering + operator<=>(const month_day& __x, const month_day& __y) noexcept + = default; + + friend constexpr month_day + operator/(const chrono::month& __m, const chrono::day& __d) noexcept + { return {__m, __d}; } + + friend constexpr month_day + operator/(const chrono::month& __m, int __d) noexcept + { return {__m, chrono::day(unsigned(__d))}; } + + friend constexpr month_day + operator/(int __m, const chrono::day& __d) noexcept + { return {chrono::month(unsigned(__m)), __d}; } + + friend constexpr month_day + operator/(const chrono::day& __d, const chrono::month& __m) noexcept + { return {__m, __d}; } + + friend constexpr month_day + operator/(const chrono::day& __d, int __m) noexcept + { return {chrono::month(unsigned(__m)), __d}; } + + friend constexpr year_month_day + operator/(int __y, const month_day& __md) noexcept; + + friend constexpr year_month_day + operator/(const month_day& __md, int __y) noexcept; + + + }; + + + + class month_day_last + { + private: + chrono::month _M_m; + + public: + explicit constexpr + month_day_last(const chrono::month& __m) noexcept + : _M_m{__m} + { } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr bool + ok() const noexcept + { return _M_m.ok(); } + + friend constexpr bool + operator==(const month_day_last& __x, const month_day_last& __y) noexcept + { return __x.month() == __y.month(); } + + friend constexpr strong_ordering + operator<=>(const month_day_last& __x, const month_day_last& __y) noexcept + = default; + + friend constexpr month_day_last + operator/(const chrono::month& __m, last_spec) noexcept + { return month_day_last{__m}; } + + friend constexpr month_day_last + operator/(int __m, last_spec) noexcept + { return chrono::month(unsigned(__m)) / last; } + + friend constexpr month_day_last + operator/(last_spec, const chrono::month& __m) noexcept + { return __m / last; } + + friend constexpr month_day_last + operator/(last_spec, int __m) noexcept + { return __m / last; } + + friend constexpr year_month_day_last + operator/(int __y, const month_day_last& __mdl) noexcept; + + friend constexpr year_month_day_last + operator/(const month_day_last& __mdl, int __y) noexcept; + + + }; + + + + class month_weekday + { + private: + chrono::month _M_m; + chrono::weekday_indexed _M_wdi; + + public: + constexpr + month_weekday(const chrono::month& __m, + const chrono::weekday_indexed& __wdi) noexcept + : _M_m{__m}, _M_wdi{__wdi} + { } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::weekday_indexed + weekday_indexed() const noexcept + { return _M_wdi; } + + constexpr bool + ok() const noexcept + { return _M_m.ok() && _M_wdi.ok(); } + + friend constexpr bool + operator==(const month_weekday& __x, const month_weekday& __y) noexcept + { + return __x.month() == __y.month() + && __x.weekday_indexed() == __y.weekday_indexed(); + } + + friend constexpr month_weekday + operator/(const chrono::month& __m, + const chrono::weekday_indexed& __wdi) noexcept + { return {__m, __wdi}; } + + friend constexpr month_weekday + operator/(int __m, const chrono::weekday_indexed& __wdi) noexcept + { return chrono::month(unsigned(__m)) / __wdi; } + + friend constexpr month_weekday + operator/(const chrono::weekday_indexed& __wdi, + const chrono::month& __m) noexcept + { return __m / __wdi; } + + friend constexpr month_weekday + operator/(const chrono::weekday_indexed& __wdi, int __m) noexcept + { return __m / __wdi; } + + friend constexpr year_month_weekday + operator/(int __y, const month_weekday& __mwd) noexcept; + + friend constexpr year_month_weekday + operator/(const month_weekday& __mwd, int __y) noexcept; + + + }; + + + + class month_weekday_last + { + private: + chrono::month _M_m; + chrono::weekday_last _M_wdl; + + public: + constexpr + month_weekday_last(const chrono::month& __m, + const chrono::weekday_last& __wdl) noexcept + :_M_m{__m}, _M_wdl{__wdl} + { } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::weekday_last + weekday_last() const noexcept + { return _M_wdl; } + + constexpr bool + ok() const noexcept + { return _M_m.ok() && _M_wdl.ok(); } + + friend constexpr bool + operator==(const month_weekday_last& __x, + const month_weekday_last& __y) noexcept + { + return __x.month() == __y.month() + && __x.weekday_last() == __y.weekday_last(); + } + + friend constexpr month_weekday_last + operator/(const chrono::month& __m, + const chrono::weekday_last& __wdl) noexcept + { return {__m, __wdl}; } + + friend constexpr month_weekday_last + operator/(int __m, const chrono::weekday_last& __wdl) noexcept + { return chrono::month(unsigned(__m)) / __wdl; } + + friend constexpr month_weekday_last + operator/(const chrono::weekday_last& __wdl, + const chrono::month& __m) noexcept + { return __m / __wdl; } + + friend constexpr month_weekday_last + operator/(const chrono::weekday_last& __wdl, int __m) noexcept + { return chrono::month(unsigned(__m)) / __wdl; } + + friend constexpr year_month_weekday_last + operator/(int __y, const month_weekday_last& __mwdl) noexcept; + + friend constexpr year_month_weekday_last + operator/(const month_weekday_last& __mwdl, int __y) noexcept; + + + }; + + + + namespace __detail + { +# 2168 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + using __months_years_conversion_disambiguator = void; + } + + class year_month + { + private: + chrono::year _M_y; + chrono::month _M_m; + + public: + year_month() = default; + + constexpr + year_month(const chrono::year& __y, const chrono::month& __m) noexcept + : _M_y{__y}, _M_m{__m} + { } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + template + constexpr year_month& + operator+=(const months& __dm) noexcept + { + *this = *this + __dm; + return *this; + } + + template + constexpr year_month& + operator-=(const months& __dm) noexcept + { + *this = *this - __dm; + return *this; + } + + constexpr year_month& + operator+=(const years& __dy) noexcept + { + *this = *this + __dy; + return *this; + } + + constexpr year_month& + operator-=(const years& __dy) noexcept + { + *this = *this - __dy; + return *this; + } + + constexpr bool + ok() const noexcept + { return _M_y.ok() && _M_m.ok(); } + + friend constexpr bool + operator==(const year_month& __x, const year_month& __y) noexcept + { return __x.year() == __y.year() && __x.month() == __y.month(); } + + friend constexpr strong_ordering + operator<=>(const year_month& __x, const year_month& __y) noexcept + = default; + + template + friend constexpr year_month + operator+(const year_month& __ym, const months& __dm) noexcept + { + + auto __m = __ym.month() + __dm; + auto __i = int(unsigned(__ym.month())) - 1 + __dm.count(); + auto __y = (__i < 0 + ? __ym.year() + years{(__i - 11) / 12} + : __ym.year() + years{__i / 12}); + return __y / __m; + } + + template + friend constexpr year_month + operator+(const months& __dm, const year_month& __ym) noexcept + { return __ym + __dm; } + + template + friend constexpr year_month + operator-(const year_month& __ym, const months& __dm) noexcept + { return __ym + -__dm; } + + friend constexpr months + operator-(const year_month& __x, const year_month& __y) noexcept + { + return (__x.year() - __y.year() + + months{static_cast(unsigned{__x.month()}) + - static_cast(unsigned{__y.month()})}); + } + + friend constexpr year_month + operator+(const year_month& __ym, const years& __dy) noexcept + { return (__ym.year() + __dy) / __ym.month(); } + + friend constexpr year_month + operator+(const years& __dy, const year_month& __ym) noexcept + { return __ym + __dy; } + + friend constexpr year_month + operator-(const year_month& __ym, const years& __dy) noexcept + { return __ym + -__dy; } + + friend constexpr year_month + operator/(const chrono::year& __y, const chrono::month& __m) noexcept + { return {__y, __m}; } + + friend constexpr year_month + operator/(const chrono::year& __y, int __m) noexcept + { return {__y, chrono::month(unsigned(__m))}; } + + friend constexpr year_month_day + operator/(const year_month& __ym, int __d) noexcept; + + friend constexpr year_month_day_last + operator/(const year_month& __ym, last_spec) noexcept; + + + }; + + + + class year_month_day + { + private: + chrono::year _M_y; + chrono::month _M_m; + chrono::day _M_d; + + static constexpr year_month_day _S_from_days(const days& __dp) noexcept; + + constexpr days _M_days_since_epoch() const noexcept; + + public: + year_month_day() = default; + + constexpr + year_month_day(const chrono::year& __y, const chrono::month& __m, + const chrono::day& __d) noexcept + : _M_y{__y}, _M_m{__m}, _M_d{__d} + { } + + constexpr + year_month_day(const year_month_day_last& __ymdl) noexcept; + + constexpr + year_month_day(const sys_days& __dp) noexcept + : year_month_day(_S_from_days(__dp.time_since_epoch())) + { } + + explicit constexpr + year_month_day(const local_days& __dp) noexcept + : year_month_day(sys_days{__dp.time_since_epoch()}) + { } + + template + constexpr year_month_day& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + template + constexpr year_month_day& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + constexpr year_month_day& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year_month_day& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::day + day() const noexcept + { return _M_d; } + + constexpr + operator sys_days() const noexcept + { return sys_days{_M_days_since_epoch()}; } + + explicit constexpr + operator local_days() const noexcept + { return local_days{sys_days{*this}.time_since_epoch()}; } + + constexpr bool ok() const noexcept; + + friend constexpr bool + operator==(const year_month_day& __x, const year_month_day& __y) noexcept + { + return __x.year() == __y.year() + && __x.month() == __y.month() + && __x.day() == __y.day(); + } + + friend constexpr strong_ordering + operator<=>(const year_month_day& __x, const year_month_day& __y) noexcept + = default; + + template + friend constexpr year_month_day + operator+(const year_month_day& __ymd, const months& __dm) noexcept + { return (__ymd.year() / __ymd.month() + __dm) / __ymd.day(); } + + template + friend constexpr year_month_day + operator+(const months& __dm, const year_month_day& __ymd) noexcept + { return __ymd + __dm; } + + friend constexpr year_month_day + operator+(const year_month_day& __ymd, const years& __dy) noexcept + { return (__ymd.year() + __dy) / __ymd.month() / __ymd.day(); } + + friend constexpr year_month_day + operator+(const years& __dy, const year_month_day& __ymd) noexcept + { return __ymd + __dy; } + + template + friend constexpr year_month_day + operator-(const year_month_day& __ymd, const months& __dm) noexcept + { return __ymd + -__dm; } + + friend constexpr year_month_day + operator-(const year_month_day& __ymd, const years& __dy) noexcept + { return __ymd + -__dy; } + + friend constexpr year_month_day + operator/(const year_month& __ym, const chrono::day& __d) noexcept + { return {__ym.year(), __ym.month(), __d}; } + + friend constexpr year_month_day + operator/(const year_month& __ym, int __d) noexcept + { return __ym / chrono::day{unsigned(__d)}; } + + friend constexpr year_month_day + operator/(const chrono::year& __y, const month_day& __md) noexcept + { return __y / __md.month() / __md.day(); } + + friend constexpr year_month_day + operator/(int __y, const month_day& __md) noexcept + { return chrono::year{__y} / __md; } + + friend constexpr year_month_day + operator/(const month_day& __md, const chrono::year& __y) noexcept + { return __y / __md; } + + friend constexpr year_month_day + operator/(const month_day& __md, int __y) noexcept + { return chrono::year(__y) / __md; } + + + }; + + + + + + constexpr year_month_day + year_month_day::_S_from_days(const days& __dp) noexcept + { + constexpr auto __z2 = static_cast(-1468000); + constexpr auto __r2_e3 = static_cast(536895458); + + const auto __r0 = static_cast(__dp.count()) + __r2_e3; + + const auto __n1 = 4 * __r0 + 3; + const auto __q1 = __n1 / 146097; + const auto __r1 = __n1 % 146097 / 4; + + constexpr auto __p32 = static_cast(1) << 32; + const auto __n2 = 4 * __r1 + 3; + const auto __u2 = static_cast(2939745) * __n2; + const auto __q2 = static_cast(__u2 / __p32); + const auto __r2 = static_cast(__u2 % __p32) / 2939745 / 4; + + constexpr auto __p16 = static_cast(1) << 16; + const auto __n3 = 2141 * __r2 + 197913; + const auto __q3 = __n3 / __p16; + const auto __r3 = __n3 % __p16 / 2141; + + const auto __y0 = 100 * __q1 + __q2; + const auto __m0 = __q3; + const auto __d0 = __r3; + + const auto __j = __r2 >= 306; + const auto __y1 = __y0 + __j; + const auto __m1 = __j ? __m0 - 12 : __m0; + const auto __d1 = __d0 + 1; + + return year_month_day{chrono::year{static_cast(__y1 + __z2)}, + chrono::month{__m1}, chrono::day{__d1}}; + } + + + + + + constexpr days + year_month_day::_M_days_since_epoch() const noexcept + { + auto constexpr __z2 = static_cast(-1468000); + auto constexpr __r2_e3 = static_cast(536895458); + + const auto __y1 = static_cast(static_cast(_M_y)) - __z2; + const auto __m1 = static_cast(static_cast(_M_m)); + const auto __d1 = static_cast(static_cast(_M_d)); + + const auto __j = static_cast(__m1 < 3); + const auto __y0 = __y1 - __j; + const auto __m0 = __j ? __m1 + 12 : __m1; + const auto __d0 = __d1 - 1; + + const auto __q1 = __y0 / 100; + const auto __yc = 1461 * __y0 / 4 - __q1 + __q1 / 4; + const auto __mc = (979 *__m0 - 2919) / 32; + const auto __dc = __d0; + + return days{static_cast(__yc + __mc + __dc - __r2_e3)}; + } + + + + class year_month_day_last + { + private: + chrono::year _M_y; + chrono::month_day_last _M_mdl; + + public: + constexpr + year_month_day_last(const chrono::year& __y, + const chrono::month_day_last& __mdl) noexcept + : _M_y{__y}, _M_mdl{__mdl} + { } + + template + constexpr year_month_day_last& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + template + constexpr year_month_day_last& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + constexpr year_month_day_last& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year_month_day_last& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_mdl.month(); } + + constexpr chrono::month_day_last + month_day_last() const noexcept + { return _M_mdl; } + + + constexpr chrono::day + day() const noexcept + { + const auto __m = static_cast(month()); +# 2592 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + return chrono::day{__m != 2 ? ((__m ^ (__m >> 3)) & 1) | 30 + : _M_y.is_leap() ? 29 : 28}; + } + + constexpr + operator sys_days() const noexcept + { return sys_days{year() / month() / day()}; } + + explicit constexpr + operator local_days() const noexcept + { return local_days{sys_days{*this}.time_since_epoch()}; } + + constexpr bool + ok() const noexcept + { return _M_y.ok() && _M_mdl.ok(); } + + friend constexpr bool + operator==(const year_month_day_last& __x, + const year_month_day_last& __y) noexcept + { + return __x.year() == __y.year() + && __x.month_day_last() == __y.month_day_last(); + } + + friend constexpr strong_ordering + operator<=>(const year_month_day_last& __x, + const year_month_day_last& __y) noexcept + = default; + + template + friend constexpr year_month_day_last + operator+(const year_month_day_last& __ymdl, + const months& __dm) noexcept + { return (__ymdl.year() / __ymdl.month() + __dm) / last; } + + template + friend constexpr year_month_day_last + operator+(const months& __dm, + const year_month_day_last& __ymdl) noexcept + { return __ymdl + __dm; } + + template + friend constexpr year_month_day_last + operator-(const year_month_day_last& __ymdl, + const months& __dm) noexcept + { return __ymdl + -__dm; } + + friend constexpr year_month_day_last + operator+(const year_month_day_last& __ymdl, + const years& __dy) noexcept + { return {__ymdl.year() + __dy, __ymdl.month_day_last()}; } + + friend constexpr year_month_day_last + operator+(const years& __dy, + const year_month_day_last& __ymdl) noexcept + { return __ymdl + __dy; } + + friend constexpr year_month_day_last + operator-(const year_month_day_last& __ymdl, + const years& __dy) noexcept + { return __ymdl + -__dy; } + + friend constexpr year_month_day_last + operator/(const year_month& __ym, last_spec) noexcept + { return {__ym.year(), chrono::month_day_last{__ym.month()}}; } + + friend constexpr year_month_day_last + operator/(const chrono::year& __y, + const chrono::month_day_last& __mdl) noexcept + { return {__y, __mdl}; } + + friend constexpr year_month_day_last + operator/(int __y, const chrono::month_day_last& __mdl) noexcept + { return chrono::year(__y) / __mdl; } + + friend constexpr year_month_day_last + operator/(const chrono::month_day_last& __mdl, + const chrono::year& __y) noexcept + { return __y / __mdl; } + + friend constexpr year_month_day_last + operator/(const chrono::month_day_last& __mdl, int __y) noexcept + { return chrono::year(__y) / __mdl; } + + + }; + + + constexpr + year_month_day::year_month_day(const year_month_day_last& __ymdl) noexcept + : _M_y{__ymdl.year()}, _M_m{__ymdl.month()}, _M_d{__ymdl.day()} + { } + + constexpr bool + year_month_day::ok() const noexcept + { + if (!_M_y.ok() || !_M_m.ok()) + return false; + return chrono::day{1} <= _M_d && _M_d <= (_M_y / _M_m / last).day(); + } + + + + class year_month_weekday + { + private: + chrono::year _M_y; + chrono::month _M_m; + chrono::weekday_indexed _M_wdi; + + static constexpr year_month_weekday + _S_from_sys_days(const sys_days& __dp) + { + year_month_day __ymd{__dp}; + chrono::weekday __wd{__dp}; + auto __index = __wd[(unsigned{__ymd.day()} - 1) / 7 + 1]; + return {__ymd.year(), __ymd.month(), __index}; + } + + public: + year_month_weekday() = default; + + constexpr + year_month_weekday(const chrono::year& __y, const chrono::month& __m, + const chrono::weekday_indexed& __wdi) noexcept + : _M_y{__y}, _M_m{__m}, _M_wdi{__wdi} + { } + + constexpr + year_month_weekday(const sys_days& __dp) noexcept + : year_month_weekday{_S_from_sys_days(__dp)} + { } + + explicit constexpr + year_month_weekday(const local_days& __dp) noexcept + : year_month_weekday{sys_days{__dp.time_since_epoch()}} + { } + + template + constexpr year_month_weekday& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + template + constexpr year_month_weekday& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + constexpr year_month_weekday& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year_month_weekday& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::weekday + weekday() const noexcept + { return _M_wdi.weekday(); } + + constexpr unsigned + index() const noexcept + { return _M_wdi.index(); } + + constexpr chrono::weekday_indexed + weekday_indexed() const noexcept + { return _M_wdi; } + + constexpr + operator sys_days() const noexcept + { + auto __d = sys_days{year() / month() / 1}; + return __d + (weekday() - chrono::weekday(__d) + + days{(static_cast(index())-1)*7}); + } + + explicit constexpr + operator local_days() const noexcept + { return local_days{sys_days{*this}.time_since_epoch()}; } + + constexpr bool + ok() const noexcept + { + if (!_M_y.ok() || !_M_m.ok() || !_M_wdi.ok()) + return false; + if (_M_wdi.index() <= 4) + return true; + days __d = (_M_wdi.weekday() + - chrono::weekday{sys_days{_M_y / _M_m / 1}} + + days((_M_wdi.index()-1)*7 + 1)); + do { if (__builtin_is_constant_evaluated() && !bool(__d.count() >= 1)) __builtin_unreachable(); } while (false); + return __d.count() <= unsigned{(_M_y / _M_m / last).day()}; + } + + friend constexpr bool + operator==(const year_month_weekday& __x, + const year_month_weekday& __y) noexcept + { + return __x.year() == __y.year() + && __x.month() == __y.month() + && __x.weekday_indexed() == __y.weekday_indexed(); + } + + template + friend constexpr year_month_weekday + operator+(const year_month_weekday& __ymwd, const months& __dm) noexcept + { + return ((__ymwd.year() / __ymwd.month() + __dm) + / __ymwd.weekday_indexed()); + } + + template + friend constexpr year_month_weekday + operator+(const months& __dm, const year_month_weekday& __ymwd) noexcept + { return __ymwd + __dm; } + + friend constexpr year_month_weekday + operator+(const year_month_weekday& __ymwd, const years& __dy) noexcept + { return {__ymwd.year() + __dy, __ymwd.month(), __ymwd.weekday_indexed()}; } + + friend constexpr year_month_weekday + operator+(const years& __dy, const year_month_weekday& __ymwd) noexcept + { return __ymwd + __dy; } + + template + friend constexpr year_month_weekday + operator-(const year_month_weekday& __ymwd, const months& __dm) noexcept + { return __ymwd + -__dm; } + + friend constexpr year_month_weekday + operator-(const year_month_weekday& __ymwd, const years& __dy) noexcept + { return __ymwd + -__dy; } + + friend constexpr year_month_weekday + operator/(const year_month& __ym, + const chrono::weekday_indexed& __wdi) noexcept + { return {__ym.year(), __ym.month(), __wdi}; } + + friend constexpr year_month_weekday + operator/(const chrono::year& __y, const month_weekday& __mwd) noexcept + { return {__y, __mwd.month(), __mwd.weekday_indexed()}; } + + friend constexpr year_month_weekday + operator/(int __y, const month_weekday& __mwd) noexcept + { return chrono::year(__y) / __mwd; } + + friend constexpr year_month_weekday + operator/(const month_weekday& __mwd, const chrono::year& __y) noexcept + { return __y / __mwd; } + + friend constexpr year_month_weekday + operator/(const month_weekday& __mwd, int __y) noexcept + { return chrono::year(__y) / __mwd; } + + + }; + + + + class year_month_weekday_last + { + private: + chrono::year _M_y; + chrono::month _M_m; + chrono::weekday_last _M_wdl; + + public: + constexpr + year_month_weekday_last(const chrono::year& __y, const chrono::month& __m, + const chrono::weekday_last& __wdl) noexcept + : _M_y{__y}, _M_m{__m}, _M_wdl{__wdl} + { } + + template + constexpr year_month_weekday_last& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + template + constexpr year_month_weekday_last& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + constexpr year_month_weekday_last& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year_month_weekday_last& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::weekday + weekday() const noexcept + { return _M_wdl.weekday(); } + + constexpr chrono::weekday_last + weekday_last() const noexcept + { return _M_wdl; } + + constexpr + operator sys_days() const noexcept + { + const auto __d = sys_days{_M_y / _M_m / last}; + return sys_days{(__d - (chrono::weekday{__d} + - _M_wdl.weekday())).time_since_epoch()}; + } + + explicit constexpr + operator local_days() const noexcept + { return local_days{sys_days{*this}.time_since_epoch()}; } + + constexpr bool + ok() const noexcept + { return _M_y.ok() && _M_m.ok() && _M_wdl.ok(); } + + friend constexpr bool + operator==(const year_month_weekday_last& __x, + const year_month_weekday_last& __y) noexcept + { + return __x.year() == __y.year() + && __x.month() == __y.month() + && __x.weekday_last() == __y.weekday_last(); + } + + template + friend constexpr year_month_weekday_last + operator+(const year_month_weekday_last& __ymwdl, + const months& __dm) noexcept + { + return ((__ymwdl.year() / __ymwdl.month() + __dm) + / __ymwdl.weekday_last()); + } + + template + friend constexpr year_month_weekday_last + operator+(const months& __dm, + const year_month_weekday_last& __ymwdl) noexcept + { return __ymwdl + __dm; } + + friend constexpr year_month_weekday_last + operator+(const year_month_weekday_last& __ymwdl, + const years& __dy) noexcept + { return {__ymwdl.year() + __dy, __ymwdl.month(), __ymwdl.weekday_last()}; } + + friend constexpr year_month_weekday_last + operator+(const years& __dy, + const year_month_weekday_last& __ymwdl) noexcept + { return __ymwdl + __dy; } + + template + friend constexpr year_month_weekday_last + operator-(const year_month_weekday_last& __ymwdl, + const months& __dm) noexcept + { return __ymwdl + -__dm; } + + friend constexpr year_month_weekday_last + operator-(const year_month_weekday_last& __ymwdl, + const years& __dy) noexcept + { return __ymwdl + -__dy; } + + friend constexpr year_month_weekday_last + operator/(const year_month& __ym, + const chrono::weekday_last& __wdl) noexcept + { return {__ym.year(), __ym.month(), __wdl}; } + + friend constexpr year_month_weekday_last + operator/(const chrono::year& __y, + const chrono::month_weekday_last& __mwdl) noexcept + { return {__y, __mwdl.month(), __mwdl.weekday_last()}; } + + friend constexpr year_month_weekday_last + operator/(int __y, const chrono::month_weekday_last& __mwdl) noexcept + { return chrono::year(__y) / __mwdl; } + + friend constexpr year_month_weekday_last + operator/(const chrono::month_weekday_last& __mwdl, + const chrono::year& __y) noexcept + { return __y / __mwdl; } + + friend constexpr year_month_weekday_last + operator/(const chrono::month_weekday_last& __mwdl, int __y) noexcept + { return chrono::year(__y) / __mwdl; } + + + }; + + + + namespace __detail + { + consteval long long + __pow10(unsigned __n) + { + long long __r = 1; + while (__n-- > 0) + __r *= 10; + return __r; + } + } + + template + class hh_mm_ss + { + private: + static constexpr int + _S_fractional_width() + { + int __multiplicity_2 = 0; + int __multiplicity_5 = 0; + auto __den = _Duration::period::den; + while ((__den % 2) == 0) + { + ++__multiplicity_2; + __den /= 2; + } + while ((__den % 5) == 0) + { + ++__multiplicity_5; + __den /= 5; + } + if (__den != 1) + return 6; + + int __width = (__multiplicity_2 > __multiplicity_5 + ? __multiplicity_2 : __multiplicity_5); + if (__width > 18) + __width = 18; + return __width; + } + + public: + static constexpr unsigned fractional_width = {_S_fractional_width()}; + + using precision + = duration, + ratio<1, __detail::__pow10(fractional_width)>>; + + constexpr + hh_mm_ss() noexcept + : hh_mm_ss{_Duration::zero()} + { } + + constexpr explicit + hh_mm_ss(_Duration __d) noexcept + : _M_is_neg (__d < _Duration::zero()), + _M_h (duration_cast(abs(__d))), + _M_m (duration_cast(abs(__d) - hours())), + _M_s (duration_cast(abs(__d) - hours() - minutes())) + { + if constexpr (treat_as_floating_point_v) + _M_ss = abs(__d) - hours() - minutes() - seconds(); + else + _M_ss = duration_cast(abs(__d) - hours() + - minutes() - seconds()); + } + + constexpr bool + is_negative() const noexcept + { return _M_is_neg; } + + constexpr chrono::hours + hours() const noexcept + { return _M_h; } + + constexpr chrono::minutes + minutes() const noexcept + { return _M_m; } + + constexpr chrono::seconds + seconds() const noexcept + { return _M_s; } + + constexpr precision + subseconds() const noexcept + { return _M_ss; } + + constexpr explicit + operator precision() const noexcept + { return to_duration(); } + + constexpr precision + to_duration() const noexcept + { + if (_M_is_neg) + return -(_M_h + _M_m + _M_s + _M_ss); + else + return _M_h + _M_m + _M_s + _M_ss; + } + + + + private: + bool _M_is_neg; + chrono::hours _M_h; + chrono::minutes _M_m; + chrono::seconds _M_s; + precision _M_ss; + }; + + + + } + + + + + + inline namespace literals + { +# 3165 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + inline namespace chrono_literals + { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wliteral-suffix" + + template + constexpr _Dur __check_overflow() + { + using _Val = __parse_int::_Parse_int<_Digits...>; + constexpr typename _Dur::rep __repval = _Val::value; + static_assert(__repval >= 0 && __repval == _Val::value, + "literal value cannot be represented by duration type"); + return _Dur(__repval); + } + + + + constexpr chrono::duration> + operator""h(long double __hours) + { return chrono::duration>{__hours}; } + + + template + constexpr chrono::hours + operator""h() + { return __check_overflow(); } + + + constexpr chrono::duration> + operator""min(long double __mins) + { return chrono::duration>{__mins}; } + + + template + constexpr chrono::minutes + operator""min() + { return __check_overflow(); } + + + constexpr chrono::duration + operator""s(long double __secs) + { return chrono::duration{__secs}; } + + + template + constexpr chrono::seconds + operator""s() + { return __check_overflow(); } + + + constexpr chrono::duration + operator""ms(long double __msecs) + { return chrono::duration{__msecs}; } + + + template + constexpr chrono::milliseconds + operator""ms() + { return __check_overflow(); } + + + constexpr chrono::duration + operator""us(long double __usecs) + { return chrono::duration{__usecs}; } + + + template + constexpr chrono::microseconds + operator""us() + { return __check_overflow(); } + + + constexpr chrono::duration + operator""ns(long double __nsecs) + { return chrono::duration{__nsecs}; } + + + template + constexpr chrono::nanoseconds + operator""ns() + { return __check_overflow(); } + + + constexpr chrono::day + operator""d(unsigned long long __d) noexcept + { return chrono::day{static_cast(__d)}; } + + constexpr chrono::year + operator""y(unsigned long long __y) noexcept + { return chrono::year{static_cast(__y)}; } + + +#pragma GCC diagnostic pop + } + } + + namespace chrono + { + using namespace literals::chrono_literals; + } + + + namespace chrono + { + + + constexpr bool + is_am(const hours& __h) noexcept + { return 0h <= __h && __h <= 11h; } + + constexpr bool + is_pm(const hours& __h) noexcept + { return 12h <= __h && __h <= 23h; } + + constexpr hours + make12(const hours& __h) noexcept + { + if (__h == 0h) + return 12h; + else if (__h > 12h) + return __h - 12h; + return __h; + } + + constexpr hours + make24(const hours& __h, bool __is_pm) noexcept + { + if (!__is_pm) + { + if (__h == 12h) + return 0h; + else + return __h; + } + else + { + if (__h == 12h) + return __h; + else + return __h + 12h; + } + } + } + + + + namespace filesystem + { + struct __file_clock + { + using duration = chrono::nanoseconds; + using rep = duration::rep; + using period = duration::period; + using time_point = chrono::time_point<__file_clock>; + static constexpr bool is_steady = false; + + static time_point + now() noexcept + { return _S_from_sys(chrono::system_clock::now()); } + + + template + static + chrono::file_time<_Dur> + from_sys(const chrono::sys_time<_Dur>& __t) noexcept + { return _S_from_sys(__t); } + + + template + static + chrono::sys_time<_Dur> + to_sys(const chrono::file_time<_Dur>& __t) noexcept + { return _S_to_sys(__t); } + + + private: + using __sys_clock = chrono::system_clock; + + + + + static constexpr chrono::seconds _S_epoch_diff{6437664000}; + + protected: + + template + static + chrono::time_point<__file_clock, _Dur> + _S_from_sys(const chrono::time_point<__sys_clock, _Dur>& __t) noexcept + { + using __file_time = chrono::time_point<__file_clock, _Dur>; + return __file_time{__t.time_since_epoch()} - _S_epoch_diff; + } + + + template + static + chrono::time_point<__sys_clock, _Dur> + _S_to_sys(const chrono::time_point<__file_clock, _Dur>& __t) noexcept + { + using __sys_time = chrono::time_point<__sys_clock, _Dur>; + return __sys_time{__t.time_since_epoch()} + _S_epoch_diff; + } + }; + } + + + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 +namespace std +{ + +# 57 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 + class __mutex_base + { + protected: + typedef __gthread_mutex_t __native_type; + + + + + + + __native_type _M_mutex; + + __mutex_base() noexcept + { + + __gthread_mutex_init_function(&_M_mutex); + } + + ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); } + + + __mutex_base(const __mutex_base&) = delete; + __mutex_base& operator=(const __mutex_base&) = delete; + }; + + + class mutex : private __mutex_base + { + public: + typedef __native_type* native_handle_type; + + + + + mutex() noexcept = default; + ~mutex() = default; + + mutex(const mutex&) = delete; + mutex& operator=(const mutex&) = delete; + + void + lock() + { + int __e = __gthread_mutex_lock(&_M_mutex); + + + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + + return !__gthread_mutex_trylock(&_M_mutex); + } + + void + unlock() + { + + __gthread_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + }; + + + class __condvar + { + using timespec = __gthread_time_t; + + public: + __condvar() noexcept + { + + + + } + + ~__condvar() + { + int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond); + do { if (__builtin_is_constant_evaluated() && !bool(__e != 16)) __builtin_unreachable(); } while (false); + } + + __condvar(const __condvar&) = delete; + __condvar& operator=(const __condvar&) = delete; + + __gthread_cond_t* native_handle() noexcept { return &_M_cond; } + + + void + wait(mutex& __m) noexcept + { + int __e __attribute__((__unused__)) + = __gthread_cond_wait(&_M_cond, __m.native_handle()); + do { if (__builtin_is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); + } + + void + wait_until(mutex& __m, timespec& __abs_time) noexcept + { + __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time); + } +# 174 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 + void + notify_one() noexcept + { + int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond); + do { if (__builtin_is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); + } + + void + notify_all() noexcept + { + int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond); + do { if (__builtin_is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); + } + + protected: + + __gthread_cond_t _M_cond = (pthread_cond_t)-1; + + + + }; + + + + + struct defer_lock_t { explicit defer_lock_t() = default; }; + + + struct try_to_lock_t { explicit try_to_lock_t() = default; }; + + + + struct adopt_lock_t { explicit adopt_lock_t() = default; }; + + + inline constexpr defer_lock_t defer_lock { }; + + + inline constexpr try_to_lock_t try_to_lock { }; + + + inline constexpr adopt_lock_t adopt_lock { }; + + + + + + + template + class lock_guard + { + public: + typedef _Mutex mutex_type; + + explicit lock_guard(mutex_type& __m) : _M_device(__m) + { _M_device.lock(); } + + lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m) + { } + + ~lock_guard() + { _M_device.unlock(); } + + lock_guard(const lock_guard&) = delete; + lock_guard& operator=(const lock_guard&) = delete; + + private: + mutex_type& _M_device; + }; + + + +} +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 3 +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 3 + template + class unique_lock + { + public: + typedef _Mutex mutex_type; + + unique_lock() noexcept + : _M_device(0), _M_owns(false) + { } + + explicit unique_lock(mutex_type& __m) + : _M_device(std::__addressof(__m)), _M_owns(false) + { + lock(); + _M_owns = true; + } + + unique_lock(mutex_type& __m, defer_lock_t) noexcept + : _M_device(std::__addressof(__m)), _M_owns(false) + { } + + unique_lock(mutex_type& __m, try_to_lock_t) + : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock()) + { } + + unique_lock(mutex_type& __m, adopt_lock_t) noexcept + : _M_device(std::__addressof(__m)), _M_owns(true) + { + + } + + template + unique_lock(mutex_type& __m, + const chrono::time_point<_Clock, _Duration>& __atime) + : _M_device(std::__addressof(__m)), + _M_owns(_M_device->try_lock_until(__atime)) + { } + + template + unique_lock(mutex_type& __m, + const chrono::duration<_Rep, _Period>& __rtime) + : _M_device(std::__addressof(__m)), + _M_owns(_M_device->try_lock_for(__rtime)) + { } + + ~unique_lock() + { + if (_M_owns) + unlock(); + } + + unique_lock(const unique_lock&) = delete; + unique_lock& operator=(const unique_lock&) = delete; + + unique_lock(unique_lock&& __u) noexcept + : _M_device(__u._M_device), _M_owns(__u._M_owns) + { + __u._M_device = 0; + __u._M_owns = false; + } + + unique_lock& operator=(unique_lock&& __u) noexcept + { + if(_M_owns) + unlock(); + + unique_lock(std::move(__u)).swap(*this); + + __u._M_device = 0; + __u._M_owns = false; + + return *this; + } + + void + lock() + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_device->lock(); + _M_owns = true; + } + } + + bool + try_lock() + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock(); + return _M_owns; + } + } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock_until(__atime); + return _M_owns; + } + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock_for(__rtime); + return _M_owns; + } + } + + void + unlock() + { + if (!_M_owns) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_device) + { + _M_device->unlock(); + _M_owns = false; + } + } + + void + swap(unique_lock& __u) noexcept + { + std::swap(_M_device, __u._M_device); + std::swap(_M_owns, __u._M_owns); + } + + mutex_type* + release() noexcept + { + mutex_type* __ret = _M_device; + _M_device = 0; + _M_owns = false; + return __ret; + } + + bool + owns_lock() const noexcept + { return _M_owns; } + + explicit operator bool() const noexcept + { return owns_lock(); } + + mutex_type* + mutex() const noexcept + { return _M_device; } + + private: + mutex_type* _M_device; + bool _M_owns; + }; + + + + template + inline void + swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept + { __x.swap(__y); } + + +} +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 2 3 +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 +namespace std +{ + +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + class __recursive_mutex_base + { + protected: + typedef __gthread_recursive_mutex_t __native_type; + + __recursive_mutex_base(const __recursive_mutex_base&) = delete; + __recursive_mutex_base& operator=(const __recursive_mutex_base&) = delete; + + + __native_type _M_mutex = (pthread_mutex_t)-3; + + __recursive_mutex_base() = default; +# 91 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + }; + + + class recursive_mutex : private __recursive_mutex_base + { + public: + typedef __native_type* native_handle_type; + + recursive_mutex() = default; + ~recursive_mutex() = default; + + recursive_mutex(const recursive_mutex&) = delete; + recursive_mutex& operator=(const recursive_mutex&) = delete; + + void + lock() + { + int __e = __gthread_recursive_mutex_lock(&_M_mutex); + + + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + + return !__gthread_recursive_mutex_trylock(&_M_mutex); + } + + void + unlock() + { + + __gthread_recursive_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + }; + + + template + class __timed_mutex_impl + { + protected: + template + bool + _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { + + + + using __clock = chrono::system_clock; + + + auto __rt = chrono::duration_cast<__clock::duration>(__rtime); + if (ratio_greater<__clock::period, _Period>()) + ++__rt; + return _M_try_lock_until(__clock::now() + __rt); + } + + template + bool + _M_try_lock_until(const chrono::time_point& __atime) + { + auto __s = chrono::time_point_cast(__atime); + auto __ns = chrono::duration_cast(__atime - __s); + + __gthread_time_t __ts = { + static_cast(__s.time_since_epoch().count()), + static_cast(__ns.count()) + }; + + return static_cast<_Derived*>(this)->_M_timedlock(__ts); + } +# 190 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + bool + _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { + + static_assert(chrono::is_clock_v<_Clock>); + + + + + auto __now = _Clock::now(); + do { + auto __rtime = __atime - __now; + if (_M_try_lock_for(__rtime)) + return true; + __now = _Clock::now(); + } while (__atime > __now); + return false; + } + }; + + + class timed_mutex + : private __mutex_base, public __timed_mutex_impl + { + public: + typedef __native_type* native_handle_type; + + timed_mutex() = default; + ~timed_mutex() = default; + + timed_mutex(const timed_mutex&) = delete; + timed_mutex& operator=(const timed_mutex&) = delete; + + void + lock() + { + int __e = __gthread_mutex_lock(&_M_mutex); + + + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + + return !__gthread_mutex_trylock(&_M_mutex); + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { return _M_try_lock_for(__rtime); } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { return _M_try_lock_until(__atime); } + + void + unlock() + { + + __gthread_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + + private: + friend class __timed_mutex_impl; + + bool + _M_timedlock(const __gthread_time_t& __ts) + { return !__gthread_mutex_timedlock(&_M_mutex, &__ts); } + + + + + + + }; + + + class recursive_timed_mutex + : private __recursive_mutex_base, + public __timed_mutex_impl + { + public: + typedef __native_type* native_handle_type; + + recursive_timed_mutex() = default; + ~recursive_timed_mutex() = default; + + recursive_timed_mutex(const recursive_timed_mutex&) = delete; + recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete; + + void + lock() + { + int __e = __gthread_recursive_mutex_lock(&_M_mutex); + + + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + + return !__gthread_recursive_mutex_trylock(&_M_mutex); + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { return _M_try_lock_for(__rtime); } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { return _M_try_lock_until(__atime); } + + void + unlock() + { + + __gthread_recursive_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + + private: + friend class __timed_mutex_impl; + + bool + _M_timedlock(const __gthread_time_t& __ts) + { return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts); } + + + + + + + }; +# 515 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + inline unique_lock<_Lock> + __try_to_lock(_Lock& __l) + { return unique_lock<_Lock>{__l, try_to_lock}; } + + template + struct __try_lock_impl + { + template + static void + __do_try_lock(tuple<_Lock&...>& __locks, int& __idx) + { + __idx = _Idx; + auto __lock = std::__try_to_lock(std::get<_Idx>(__locks)); + if (__lock.owns_lock()) + { + constexpr bool __cont = _Idx + 2 < sizeof...(_Lock); + using __try_locker = __try_lock_impl<_Idx + 1, __cont>; + __try_locker::__do_try_lock(__locks, __idx); + if (__idx == -1) + __lock.release(); + } + } + }; + + template + struct __try_lock_impl<_Idx, false> + { + template + static void + __do_try_lock(tuple<_Lock&...>& __locks, int& __idx) + { + __idx = _Idx; + auto __lock = std::__try_to_lock(std::get<_Idx>(__locks)); + if (__lock.owns_lock()) + { + __idx = -1; + __lock.release(); + } + } + }; +# 568 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + int + try_lock(_Lock1& __l1, _Lock2& __l2, _Lock3&... __l3) + { + int __idx; + auto __locks = std::tie(__l1, __l2, __l3...); + __try_lock_impl<0>::__do_try_lock(__locks, __idx); + return __idx; + } +# 589 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + void + lock(_L1& __l1, _L2& __l2, _L3&... __l3) + { + while (true) + { + using __try_locker = __try_lock_impl<0, sizeof...(_L3) != 0>; + unique_lock<_L1> __first(__l1); + int __idx; + auto __locks = std::tie(__l2, __l3...); + __try_locker::__do_try_lock(__locks, __idx); + if (__idx == -1) + { + __first.release(); + return; + } + } + } +# 615 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + class scoped_lock + { + public: + explicit scoped_lock(_MutexTypes&... __m) : _M_devices(std::tie(__m...)) + { std::lock(__m...); } + + explicit scoped_lock(adopt_lock_t, _MutexTypes&... __m) noexcept + : _M_devices(std::tie(__m...)) + { } + + ~scoped_lock() + { std::apply([](auto&... __m) { (__m.unlock(), ...); }, _M_devices); } + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + + private: + tuple<_MutexTypes&...> _M_devices; + }; + + template<> + class scoped_lock<> + { + public: + explicit scoped_lock() = default; + explicit scoped_lock(adopt_lock_t) noexcept { } + ~scoped_lock() = default; + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + }; + + template + class scoped_lock<_Mutex> + { + public: + using mutex_type = _Mutex; + + explicit scoped_lock(mutex_type& __m) : _M_device(__m) + { _M_device.lock(); } + + explicit scoped_lock(adopt_lock_t, mutex_type& __m) noexcept + : _M_device(__m) + { } + + ~scoped_lock() + { _M_device.unlock(); } + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + + private: + mutex_type& _M_device; + }; + + + + + struct once_flag + { + constexpr once_flag() noexcept = default; + + + once_flag(const once_flag&) = delete; + + once_flag& operator=(const once_flag&) = delete; + + private: + + + __gthread_once_t _M_once = 0; + + struct _Prepare_execution; + + template + friend void + call_once(once_flag& __once, _Callable&& __f, _Args&&... __args); + }; + + + + + + extern __thread void* __once_callable; + extern __thread void (*__once_call)(); + + + struct once_flag::_Prepare_execution + { + template + explicit + _Prepare_execution(_Callable& __c) + { + + __once_callable = std::__addressof(__c); + + __once_call = [] { (*static_cast<_Callable*>(__once_callable))(); }; + } + + ~_Prepare_execution() + { + + __once_callable = nullptr; + __once_call = nullptr; + } + + _Prepare_execution(const _Prepare_execution&) = delete; + _Prepare_execution& operator=(const _Prepare_execution&) = delete; + }; +# 767 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + extern "C" void __once_proxy(void); + + + template + void + call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) + { + + auto __callable = [&] { + std::__invoke(std::forward<_Callable>(__f), + std::forward<_Args>(__args)...); + }; + + once_flag::_Prepare_execution __exec(__callable); + + + if (int __e = __gthread_once(&__once._M_once, &__once_proxy)) + __throw_system_error(__e); + } +# 888 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + +} +# 18 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/tools/promotion.hpp" 1 +# 25 "../../../../boost/math/tools/promotion.hpp" +# 1 "../../../../boost/math/tools/config.hpp" 1 +# 14 "../../../../boost/math/tools/config.hpp" +# 1 "../../../../boost/math/tools/is_standalone.hpp" 1 +# 15 "../../../../boost/math/tools/config.hpp" 2 +# 94 "../../../../boost/math/tools/config.hpp" +# 1 "../../../../boost/math/tools/user.hpp" 1 +# 95 "../../../../boost/math/tools/config.hpp" 2 +# 386 "../../../../boost/math/tools/config.hpp" + +# 386 "../../../../boost/math/tools/config.hpp" +namespace boost{ namespace math{ +namespace tools +{ + +template +inline T max (T a, T b, T c) noexcept(std::is_floating_point::value) +{ + return (std::max)((std::max)(a, b), c); +} + +template +inline T max (T a, T b, T c, T d) noexcept(std::is_floating_point::value) +{ + return (std::max)((std::max)(a, b), (std::max)(c, d)); +} + +} + +template +void suppress_unused_variable_warning(const T&) noexcept(std::is_floating_point::value) +{ +} + +namespace detail{ + +template +struct is_integer_for_rounding +{ + static constexpr bool value = std::is_integral::value || (std::numeric_limits::is_specialized && std::numeric_limits::is_integer); +}; + +} + +}} +# 26 "../../../../boost/math/tools/promotion.hpp" 2 + + + + +namespace boost +{ + namespace math + { + namespace tools + { +# 56 "../../../../boost/math/tools/promotion.hpp" + template + struct promote_arg + { + using type = typename std::conditional::value, double, T>::type; + }; + + + template <> struct promote_arg { using type = float; }; + template <> struct promote_arg{ using type = double; }; + template <> struct promote_arg { using type = long double; }; + template <> struct promote_arg { using type = double; }; + + template + struct promote_args_2 + { + + using T1P = typename promote_arg::type; + using T2P = typename promote_arg::type; + + using type = typename std::conditional< + std::is_floating_point::value && std::is_floating_point::value, + + + + + typename std::conditional::value || std::is_same::value, + long double, + typename std::conditional::value || std::is_same::value, + double, + float + >::type + + + + >::type, + + typename std::conditional::value && std::is_convertible::value, T2P, T1P>::type>::type; + }; + + + template <> struct promote_args_2 { using type = float; }; + template <> struct promote_args_2{ using type = double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = long double; }; + + template + struct promote_args + { + using type = typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, typename std::remove_cv::type + >::type + >::type + >::type + >::type + >::type; + + + + + + + + }; + + + + + + + template + struct promote_args_permissive + { + using type = typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, typename std::remove_cv::type + >::type + >::type + >::type + >::type + >::type; + }; + + } + } +} +# 19 "../../module/sf.cxx" 2 + + +export module boost.math.special_functions; + +import boost.math.core; +import boost.math.constants; + + + + +export namespace boost::math { + + template + struct max_factorial; + template + RT factorial(unsigned int); + template + RT factorial(unsigned int, const Policy& pol); + template + RT unchecked_factorial(unsigned int ); + template + RT double_factorial(unsigned i); + template + RT double_factorial(unsigned i, const Policy& pol); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol); + + template + typename tools::promote_args::type rising_factorial(RT x, int n); + + template + typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol); + + + template + typename tools::promote_args::type tgamma(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z, const Policy& pol); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT z, int* sign); + + template + typename tools::promote_args::type lgamma(RT z, int* sign, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT x); + + template + typename tools::promote_args::type lgamma(RT x, const Policy& pol); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_p(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&); + + + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q, const Policy&); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q, const Policy&); + + + template + typename tools::promote_args::type digamma(T x); + + template + typename tools::promote_args::type digamma(T x, const Policy&); + + + template + typename tools::promote_args::type trigamma(T x); + + template + typename tools::promote_args::type trigamma(T x, const Policy&); + + + template + typename tools::promote_args::type polygamma(int n, T x); + + template + typename tools::promote_args::type polygamma(int n, T x, const Policy&); + + + template + typename tools::promote_args::type erf(RT z); + template + typename tools::promote_args::type erf(RT z, const Policy&); + + template + typename tools::promote_args::type erfc(RT z); + template + typename tools::promote_args::type erfc(RT z, const Policy&); + + template + typename tools::promote_args::type erf_inv(RT z); + template + typename tools::promote_args::type erf_inv(RT z, const Policy& pol); + + template + typename tools::promote_args::type erfc_inv(RT z); + template + typename tools::promote_args::type erfc_inv(RT z, const Policy& pol); + + + template + typename tools::promote_args::type zeta(T s, const Policy&); +} + + + +# 1 "../../../../boost/math/special_functions/log1p.hpp" 1 +# 26 "../../../../boost/math/special_functions/log1p.hpp" +# 1 "../../../../boost/math/tools/series.hpp" 1 +# 20 "../../../../boost/math/tools/series.hpp" +namespace boost{ namespace math{ namespace tools{ + + + + +template +inline typename Functor::result_type sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms, const V& init_value) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename Functor::result_type result_type; + + std::uintmax_t counter = max_terms; + + result_type result = init_value; + result_type next_term; + do{ + next_term = func(); + result += next_term; + } + while((abs(factor * result) < abs(next_term)) && --counter); + + + max_terms = max_terms - counter; + + return result; +} + +template +inline typename Functor::result_type sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + typename Functor::result_type init_value = 0; + return sum_series(func, factor, max_terms, init_value); +} + +template +inline typename Functor::result_type sum_series(Functor& func, int bits, std::uintmax_t& max_terms, const U& init_value) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + typedef typename Functor::result_type result_type; + result_type factor = ldexp(result_type(1), 1 - bits); + return sum_series(func, factor, max_terms, init_value); +} + +template +inline typename Functor::result_type sum_series(Functor& func, int bits) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + typedef typename Functor::result_type result_type; + std::uintmax_t iters = (std::numeric_limits::max)(); + result_type init_val = 0; + return sum_series(func, bits, iters, init_val); +} + +template +inline typename Functor::result_type sum_series(Functor& func, int bits, std::uintmax_t& max_terms) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + typedef typename Functor::result_type result_type; + result_type init_val = 0; + return sum_series(func, bits, max_terms, init_val); +} + +template +inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + std::uintmax_t iters = (std::numeric_limits::max)(); + return sum_series(func, bits, iters, init_value); +} + + + +template +inline typename Functor::result_type checked_sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms, const V& init_value, V& norm) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename Functor::result_type result_type; + + std::uintmax_t counter = max_terms; + + result_type result = init_value; + result_type next_term; + do { + next_term = func(); + result += next_term; + norm += fabs(next_term); + } while ((abs(factor * result) < abs(next_term)) && --counter); + + + max_terms = max_terms - counter; + + return result; +} +# 129 "../../../../boost/math/tools/series.hpp" +template +inline typename Functor::result_type kahan_sum_series(Functor& func, int bits) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename Functor::result_type result_type; + + result_type factor = pow(result_type(2), bits); + result_type result = func(); + result_type next_term, y, t; + result_type carry = 0; + do{ + next_term = func(); + y = next_term - carry; + t = result + y; + carry = t - result; + carry -= y; + result = t; + } + while(fabs(result) < fabs(factor * next_term)); + return result; +} + +template +inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, std::uintmax_t& max_terms) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename Functor::result_type result_type; + + std::uintmax_t counter = max_terms; + + result_type factor = ldexp(result_type(1), bits); + result_type result = func(); + result_type next_term, y, t; + result_type carry = 0; + do{ + next_term = func(); + y = next_term - carry; + t = result + y; + carry = t - result; + carry -= y; + result = t; + } + while((fabs(result) < fabs(factor * next_term)) && --counter); + + + max_terms = max_terms - counter; + + return result; +} + +} +} +} +# 27 "../../../../boost/math/special_functions/log1p.hpp" 2 +# 1 "../../../../boost/math/tools/big_constant.hpp" 1 +# 21 "../../../../boost/math/tools/big_constant.hpp" +namespace boost{ namespace math{ + +namespace tools{ + +template +struct numeric_traits : public std::numeric_limits< T > {}; +# 43 "../../../../boost/math/tools/big_constant.hpp" +typedef double largest_float; + + + +template +inline constexpr T make_big_value(largest_float v, const char*, std::true_type const&, std::false_type const&) noexcept(std::is_floating_point::value) +{ + return static_cast(v); +} +template +inline constexpr T make_big_value(largest_float v, const char*, std::true_type const&, std::true_type const&) noexcept(std::is_floating_point::value) +{ + return static_cast(v); +} + + + + + + + +template +inline T make_big_value(largest_float, const char* s, std::false_type const&, std::false_type const&) +{ + static_assert(sizeof(T) == 0, "Type is unsupported in standalone mode. Please disable and try again."); +} + +template +inline constexpr T make_big_value(largest_float, const char* s, std::false_type const&, std::true_type const&) noexcept(std::is_floating_point::value) +{ + return T(s); +} +# 97 "../../../../boost/math/tools/big_constant.hpp" +}}} +# 28 "../../../../boost/math/special_functions/log1p.hpp" 2 +# 1 "../../../../boost/math/tools/assert.hpp" 1 +# 26 "../../../../boost/math/tools/assert.hpp" +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cassert" 1 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cassert" 3 + +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cassert" 3 + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/assert.h" 1 3 +# 17 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/assert.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 2 3 + + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 3 +using std::abort; +using std::atexit; +using std::exit; +# 51 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 3 +using std::div_t; +using std::ldiv_t; + +using std::abs; +using std::atof; +using std::atoi; +using std::atol; +using std::bsearch; +using std::calloc; +using std::div; +using std::free; +using std::getenv; +using std::labs; +using std::ldiv; +using std::malloc; + +using std::mblen; +using std::mbstowcs; +using std::mbtowc; + +using std::qsort; +using std::rand; +using std::realloc; +using std::srand; +using std::strtod; +using std::strtol; +using std::strtoul; +using std::system; + +using std::wcstombs; +using std::wctomb; +# 18 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/assert.h" 2 3 + + + +extern "C" { + + +__attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line); +__attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _assert (const char *_Message, const char *_File, unsigned _Line); + + +} +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cassert" 2 3 +# 27 "../../../../boost/math/tools/assert.hpp" 2 +# 29 "../../../../boost/math/special_functions/log1p.hpp" 2 +# 40 "../../../../boost/math/special_functions/log1p.hpp" + +# 40 "../../../../boost/math/special_functions/log1p.hpp" +namespace boost{ namespace math{ + + +export template +typename tools::promote_args::type log1p(T x, const Policy&); + + +namespace detail +{ + + + + + template + struct log1p_series + { + typedef T result_type; + + log1p_series(T x) + : k(0), m_mult(-x), m_prod(-1){} + + T operator()() + { + m_prod *= m_mult; + return m_prod / ++k; + } + + int count()const + { + return k; + } + + private: + int k; + const T m_mult; + T m_prod; + log1p_series(const log1p_series&); + log1p_series& operator=(const log1p_series&); + }; +# 89 "../../../../boost/math/special_functions/log1p.hpp" +template +T log1p_imp(T const & x, const Policy& pol, const std::integral_constant&) +{ + typedef typename tools::promote_args::type result_type; + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if((x < -1) || (boost::math::isnan)(x)) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + result_type a = abs(result_type(x)); + if(a > result_type(0.5f)) + return log(1 + result_type(x)); + + + if(a < tools::epsilon()) + return x; + detail::log1p_series s(x); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + + result_type result = tools::sum_series(s, policies::get_epsilon(), max_iter); + + policies::check_series_iterations(function, max_iter, pol); + return result; +} + +template +T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + + + if(a < tools::epsilon()) + return x; + + + + + + static const T P[] = { + 0.15141069795941984e-16L, + 0.35495104378055055e-15L, + 0.33333333333332835L, + 0.99249063543365859L, + 1.1143969784156509L, + 0.58052937949269651L, + 0.13703234928513215L, + 0.011294864812099712L + }; + static const T Q[] = { + 1L, + 3.7274719063011499L, + 5.5387948649720334L, + 4.159201143419005L, + 1.6423855110312755L, + 0.31706251443180914L, + 0.022665554431410243L, + -0.29252538135177773e-5L + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +template +T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + + + if(a < tools::epsilon()) + return x; + + + + + + static const T P[] = { + boost::math::tools::make_big_value( -0.807533446680736736712e-19, "-0.807533446680736736712e-19", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.490881544804798926426e-18, "-0.490881544804798926426e-18", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.333333333333333373941, "0.333333333333333373941", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.17141290782087994162, "1.17141290782087994162", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.62790522814926264694, "1.62790522814926264694", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.13156411870766876113, "1.13156411870766876113", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.408087379932853785336, "0.408087379932853785336", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0706537026422828914622, "0.0706537026422828914622", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00441709903782239229447, "0.00441709903782239229447", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.26423872346263928361, "4.26423872346263928361", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 7.48189472704477708962, "7.48189472704477708962", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 6.94757016732904280913, "6.94757016732904280913", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.6493508622280767304, "3.6493508622280767304", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.06884863623790638317, "1.06884863623790638317", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.158292216998514145947, "0.158292216998514145947", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00885295524069924328658, "0.00885295524069924328658", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.560026216133415663808e-6, "-0.560026216133415663808e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +template +T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + + + if(a < tools::epsilon()) + return x; + + + + + + + static const T P[] = { + -0.671192866803148236519e-7L, + 0.119670999140731844725e-6L, + 0.333339469182083148598L, + 0.237827183019664122066L + }; + static const T Q[] = { + 1L, + 1.46348272586988539733L, + 0.497859871350117338894L, + -0.00471666268910169651936L + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +template +struct log1p_initializer +{ + struct init + { + init() + { + do_init(tag()); + } + template + static void do_init(const std::integral_constant&){} + static void do_init(const std::integral_constant&) + { + boost::math::log1p(static_cast(0.25), Policy()); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename log1p_initializer::init log1p_initializer::initializer; + + +} + +export template +inline typename tools::promote_args::type log1p(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + typedef std::integral_constant tag_type; + + detail::log1p_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::log1p_imp(static_cast(x), forwarding_policy(), tag_type()), "boost::math::log1p<%1%>(%1%)"); +} +# 435 "../../../../boost/math/special_functions/log1p.hpp" +export template +inline typename tools::promote_args::type log1p(T x) +{ + return boost::math::log1p(x, policies::policy<>()); +} + + + +export template +inline typename tools::promote_args::type + log1pmx(T x, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const char* function = "boost::math::log1pmx<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1pmx(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + result_type a = abs(result_type(x)); + if(a > result_type(0.95f)) + return log(1 + result_type(x)) - result_type(x); + + + if(a < tools::epsilon()) + return -x * x / 2; + boost::math::detail::log1p_series s(x); + s(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + + T result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter); + + policies::check_series_iterations(function, max_iter, pol); + return result; +} + +export template +inline typename tools::promote_args::type log1pmx(T x) +{ + return log1pmx(x, policies::policy<>()); +} + +} +} +# 192 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/expm1.hpp" 1 +# 37 "../../../../boost/math/special_functions/expm1.hpp" +namespace boost{ namespace math{ + +namespace detail +{ + + + + + template + struct expm1_series + { + typedef T result_type; + + expm1_series(T x) + : k(0), m_x(x), m_term(1) {} + + T operator()() + { + ++k; + m_term *= m_x; + m_term /= k; + return m_term; + } + + int count()const + { + return k; + } + + private: + int k; + const T m_x; + T m_term; + expm1_series(const expm1_series&); + expm1_series& operator=(const expm1_series&); + }; + +template +struct expm1_initializer +{ + struct init + { + init() + { + do_init(tag()); + } + template + static void do_init(const std::integral_constant&){} + static void do_init(const std::integral_constant&) + { + expm1(T(0.5)); + } + static void do_init(const std::integral_constant&) + { + expm1(T(0.5)); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename expm1_initializer::init expm1_initializer::initializer; + + + + + + +template +T expm1_imp(T x, const std::integral_constant&, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T a = fabs(x); + if((boost::math::isnan)(a)) + { + return policies::raise_domain_error("boost::math::expm1<%1%>(%1%)", "expm1 requires a finite argument, but got %1%", a, pol); + } + if(a > T(0.5f)) + { + if(a >= tools::log_max_value()) + { + if(x > 0) + return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); + return -1; + } + return exp(x) - T(1); + } + if(a < tools::epsilon()) + return x; + detail::expm1_series s(x); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + + T result = tools::sum_series(s, policies::get_epsilon(), max_iter); + + policies::check_series_iterations("boost::math::expm1<%1%>(%1%)", max_iter, pol); + return result; +} + +template +T expm1_imp(T x, const std::integral_constant&, const P& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T a = fabs(x); + if(a > T(0.5L)) + { + if(a >= tools::log_max_value()) + { + if(x > 0) + return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); + return -1; + } + return exp(x) - T(1); + } + if(a < tools::epsilon()) + return x; + + static const float Y = 0.10281276702880859e1f; + static const T n[] = { static_cast(-0.28127670288085937e-1), static_cast(0.51278186299064534e0), static_cast(-0.6310029069350198e-1), static_cast(0.11638457975729296e-1), static_cast(-0.52143390687521003e-3), static_cast(0.21491399776965688e-4) }; + static const T d[] = { 1, static_cast(-0.45442309511354755e0), static_cast(0.90850389570911714e-1), static_cast(-0.10088963629815502e-1), static_cast(0.63003407478692265e-3), static_cast(-0.17976570003654402e-4) }; + + T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); + return result; +} + +template +T expm1_imp(T x, const std::integral_constant&, const P& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T a = fabs(x); + if(a > T(0.5L)) + { + if(a >= tools::log_max_value()) + { + if(x > 0) + return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); + return -1; + } + return exp(x) - T(1); + } + if(a < tools::epsilon()) + return x; + + static const float Y = 0.10281276702880859375e1f; + static const T n[] = { + boost::math::tools::make_big_value( -0.281276702880859375e-1, "-0.281276702880859375e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.512980290285154286358e0, "0.512980290285154286358e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.667758794592881019644e-1, "-0.667758794592881019644e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.131432469658444745835e-1, "0.131432469658444745835e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.72303795326880286965e-3, "-0.72303795326880286965e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.447441185192951335042e-4, "0.447441185192951335042e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.714539134024984593011e-6, "-0.714539134024984593011e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T d[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.461477618025562520389e0, "-0.461477618025562520389e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.961237488025708540713e-1, "0.961237488025708540713e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.116483957658204450739e-1, "-0.116483957658204450739e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.873308008461557544458e-3, "0.873308008461557544458e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.387922804997682392562e-4, "-0.387922804997682392562e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.807473180049193557294e-6, "0.807473180049193557294e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); + return result; +} + +template +T expm1_imp(T x, const std::integral_constant&, const P& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T a = fabs(x); + if(a > T(0.5L)) + { + if(a >= tools::log_max_value()) + { + if(x > 0) + return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); + return -1; + } + return exp(x) - T(1); + } + if(a < tools::epsilon()) + return x; + + static const float Y = 0.10281276702880859375e1f; + static const T n[] = { + boost::math::tools::make_big_value( -0.28127670288085937499999999999999999854e-1, "-0.28127670288085937499999999999999999854e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.51278156911210477556524452177540792214e0, "0.51278156911210477556524452177540792214e0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.63263178520747096729500254678819588223e-1, "-0.63263178520747096729500254678819588223e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.14703285606874250425508446801230572252e-1, "0.14703285606874250425508446801230572252e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.8675686051689527802425310407898459386e-3, "-0.8675686051689527802425310407898459386e-3", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.88126359618291165384647080266133492399e-4, "0.88126359618291165384647080266133492399e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.25963087867706310844432390015463138953e-5, "-0.25963087867706310844432390015463138953e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.14226691087800461778631773363204081194e-6, "0.14226691087800461778631773363204081194e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.15995603306536496772374181066765665596e-8, "-0.15995603306536496772374181066765665596e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.45261820069007790520447958280473183582e-10, "0.45261820069007790520447958280473183582e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T d[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.45441264709074310514348137469214538853e0, "-0.45441264709074310514348137469214538853e0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.96827131936192217313133611655555298106e-1, "0.96827131936192217313133611655555298106e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.12745248725908178612540554584374876219e-1, "-0.12745248725908178612540554584374876219e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.11473613871583259821612766907781095472e-2, "0.11473613871583259821612766907781095472e-2", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.73704168477258911962046591907690764416e-4, "-0.73704168477258911962046591907690764416e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.34087499397791555759285503797256103259e-5, "0.34087499397791555759285503797256103259e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.11114024704296196166272091230695179724e-6, "-0.11114024704296196166272091230695179724e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.23987051614110848595909588343223896577e-8, "0.23987051614110848595909588343223896577e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.29477341859111589208776402638429026517e-10, "-0.29477341859111589208776402638429026517e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.13222065991022301420255904060628100924e-12, "0.13222065991022301420255904060628100924e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); + return result; +} + +} + +export template +inline typename tools::promote_args::type expm1(T x, const Policy& ) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + typedef std::integral_constant tag_type; + + detail::expm1_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::expm1_imp( + static_cast(x), + tag_type(), forwarding_policy()), "boost::math::expm1<%1%>(%1%)"); +} +# 309 "../../../../boost/math/special_functions/expm1.hpp" +export template +inline typename tools::promote_args::type expm1(T x) +{ + return expm1(x, policies::policy<>()); +} + +} +} +# 193 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/powm1.hpp" 1 +# 23 "../../../../boost/math/special_functions/powm1.hpp" +namespace boost{ namespace math{ namespace detail{ + +template +inline T powm1_imp(const T x, const T y, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const char* function = "boost::math::powm1<%1%>(%1%, %1%)"; + + if (x > 0) + { + if ((fabs(y * (x - 1)) < 0.5) || (fabs(y) < 0.2)) + { + + + T l = y * log(x); + if (l < 0.5) + return boost::math::expm1(l, pol); + if (l > boost::math::tools::log_max_value()) + return boost::math::policies::raise_overflow_error(function, 0, pol); + + } + } + else if (x < 0) + { + + if (boost::math::trunc(y) != y) + return boost::math::policies::raise_domain_error(function, "For non-integral exponent, expected base > 0 but got %1%", x, pol); + if (boost::math::trunc(y / 2) == y / 2) + return powm1_imp(T(-x), y, pol); + } + return pow(x, y) - 1; +} + +} + +export template +inline typename tools::promote_args::type + powm1(const T1 a, const T2 z) +{ + typedef typename tools::promote_args::type result_type; + return detail::powm1_imp(static_cast(a), static_cast(z), policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + powm1(const T1 a, const T2 z, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::powm1_imp(static_cast(a), static_cast(z), pol); +} + +} +} +# 194 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/sqrt1pm1.hpp" 1 +# 23 "../../../../boost/math/special_functions/sqrt1pm1.hpp" +namespace boost{ namespace math{ + +export template +inline typename tools::promote_args::type sqrt1pm1(const T& val, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if(fabs(result_type(val)) > 0.75) + return sqrt(1 + result_type(val)) - 1; + return boost::math::expm1(boost::math::log1p(val, pol) / 2, pol); +} + +export template +inline typename tools::promote_args::type sqrt1pm1(const T& val) +{ + return sqrt1pm1(val, policies::policy<>()); +} + +} +} +# 195 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" 1 +# 17 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" +# 1 "../../../../boost/math/tools/convert_from_string.hpp" 1 +# 20 "../../../../boost/math/tools/convert_from_string.hpp" +namespace boost{ namespace math{ namespace tools{ + + template + struct convert_from_string_result + { + typedef typename std::conditional::value, const char*, T>::type type; + }; + + template + Real convert_from_string(const char* p, const std::false_type&) + { + + + static_assert(sizeof(Real) == 0, "boost.lexical_cast is not supported in standalone mode."); + (void)p; + return Real(0); + + + + } + template + constexpr const char* convert_from_string(const char* p, const std::true_type&) noexcept + { + return p; + } + template + constexpr typename convert_from_string_result::type convert_from_string(const char* p) noexcept((std::is_constructible::value)) + { + return convert_from_string(p, std::is_constructible()); + } + +} +} +} +# 18 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" 2 +# 39 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" +namespace boost { namespace math +{ + +export template +struct max_factorial; + +export template +RT unchecked_factorial(unsigned int ); + + +export template <> +inline constexpr float unchecked_factorial(unsigned i ) +{ + + constexpr std::array factorials = { { + + + + 1.0F, + 1.0F, + 2.0F, + 6.0F, + 24.0F, + 120.0F, + 720.0F, + 5040.0F, + 40320.0F, + 362880.0F, + 3628800.0F, + 39916800.0F, + 479001600.0F, + 6227020800.0F, + 87178291200.0F, + 1307674368000.0F, + 20922789888000.0F, + 355687428096000.0F, + 6402373705728000.0F, + 121645100408832000.0F, + 0.243290200817664e19F, + 0.5109094217170944e20F, + 0.112400072777760768e22F, + 0.2585201673888497664e23F, + 0.62044840173323943936e24F, + 0.15511210043330985984e26F, + 0.403291461126605635584e27F, + 0.10888869450418352160768e29F, + 0.304888344611713860501504e30F, + 0.8841761993739701954543616e31F, + 0.26525285981219105863630848e33F, + 0.822283865417792281772556288e34F, + 0.26313083693369353016721801216e36F, + 0.868331761881188649551819440128e37F, + 0.29523279903960414084761860964352e39F, + }}; + + return factorials[i]; +} + +export template <> +struct max_factorial +{ + static constexpr unsigned value = 34; +}; + +export template <> +inline constexpr double unchecked_factorial(unsigned i ) +{ + + constexpr std::array factorials = { { + + + + 1.0, + 1.0, + 2.0, + 6.0, + 24.0, + 120.0, + 720.0, + 5040.0, + 40320.0, + 362880.0, + 3628800.0, + 39916800.0, + 479001600.0, + 6227020800.0, + 87178291200.0, + 1307674368000.0, + 20922789888000.0, + 355687428096000.0, + 6402373705728000.0, + 121645100408832000.0, + 0.243290200817664e19, + 0.5109094217170944e20, + 0.112400072777760768e22, + 0.2585201673888497664e23, + 0.62044840173323943936e24, + 0.15511210043330985984e26, + 0.403291461126605635584e27, + 0.10888869450418352160768e29, + 0.304888344611713860501504e30, + 0.8841761993739701954543616e31, + 0.26525285981219105863630848e33, + 0.822283865417792281772556288e34, + 0.26313083693369353016721801216e36, + 0.868331761881188649551819440128e37, + 0.29523279903960414084761860964352e39, + 0.103331479663861449296666513375232e41, + 0.3719933267899012174679994481508352e42, + 0.137637530912263450463159795815809024e44, + 0.5230226174666011117600072241000742912e45, + 0.203978820811974433586402817399028973568e47, + 0.815915283247897734345611269596115894272e48, + 0.3345252661316380710817006205344075166515e50, + 0.1405006117752879898543142606244511569936e52, + 0.6041526306337383563735513206851399750726e53, + 0.265827157478844876804362581101461589032e55, + 0.1196222208654801945619631614956577150644e57, + 0.5502622159812088949850305428800254892962e58, + 0.2586232415111681806429643551536119799692e60, + 0.1241391559253607267086228904737337503852e62, + 0.6082818640342675608722521633212953768876e63, + 0.3041409320171337804361260816606476884438e65, + 0.1551118753287382280224243016469303211063e67, + 0.8065817517094387857166063685640376697529e68, + 0.427488328406002556429801375338939964969e70, + 0.2308436973392413804720927426830275810833e72, + 0.1269640335365827592596510084756651695958e74, + 0.7109985878048634518540456474637249497365e75, + 0.4052691950487721675568060190543232213498e77, + 0.2350561331282878571829474910515074683829e79, + 0.1386831185456898357379390197203894063459e81, + 0.8320987112741390144276341183223364380754e82, + 0.507580213877224798800856812176625227226e84, + 0.3146997326038793752565312235495076408801e86, + 0.1982608315404440064116146708361898137545e88, + 0.1268869321858841641034333893351614808029e90, + 0.8247650592082470666723170306785496252186e91, + 0.5443449390774430640037292402478427526443e93, + 0.3647111091818868528824985909660546442717e95, + 0.2480035542436830599600990418569171581047e97, + 0.1711224524281413113724683388812728390923e99, + 0.1197857166996989179607278372168909873646e101, + 0.8504785885678623175211676442399260102886e102, + 0.6123445837688608686152407038527467274078e104, + 0.4470115461512684340891257138125051110077e106, + 0.3307885441519386412259530282212537821457e108, + 0.2480914081139539809194647711659403366093e110, + 0.188549470166605025498793226086114655823e112, + 0.1451830920282858696340707840863082849837e114, + 0.1132428117820629783145752115873204622873e116, + 0.8946182130782975286851441715398316520698e117, + 0.7156945704626380229481153372318653216558e119, + 0.5797126020747367985879734231578109105412e121, + 0.4753643337012841748421382069894049466438e123, + 0.3945523969720658651189747118012061057144e125, + 0.3314240134565353266999387579130131288001e127, + 0.2817104114380550276949479442260611594801e129, + 0.2422709538367273238176552320344125971528e131, + 0.210775729837952771721360051869938959523e133, + 0.1854826422573984391147968456455462843802e135, + 0.1650795516090846108121691926245361930984e137, + 0.1485715964481761497309522733620825737886e139, + 0.1352001527678402962551665687594951421476e141, + 0.1243841405464130725547532432587355307758e143, + 0.1156772507081641574759205162306240436215e145, + 0.1087366156656743080273652852567866010042e147, + 0.103299784882390592625997020993947270954e149, + 0.9916779348709496892095714015418938011582e150, + 0.9619275968248211985332842594956369871234e152, + 0.942689044888324774562618574305724247381e154, + 0.9332621544394415268169923885626670049072e156, + 0.9332621544394415268169923885626670049072e158, + 0.9425947759838359420851623124482936749562e160, + 0.9614466715035126609268655586972595484554e162, + 0.990290071648618040754671525458177334909e164, + 0.1029901674514562762384858386476504428305e167, + 0.1081396758240290900504101305800329649721e169, + 0.1146280563734708354534347384148349428704e171, + 0.1226520203196137939351751701038733888713e173, + 0.132464181945182897449989183712183259981e175, + 0.1443859583202493582204882102462797533793e177, + 0.1588245541522742940425370312709077287172e179, + 0.1762952551090244663872161047107075788761e181, + 0.1974506857221074023536820372759924883413e183, + 0.2231192748659813646596607021218715118256e185, + 0.2543559733472187557120132004189335234812e187, + 0.2925093693493015690688151804817735520034e189, + 0.339310868445189820119825609358857320324e191, + 0.396993716080872089540195962949863064779e193, + 0.4684525849754290656574312362808384164393e195, + 0.5574585761207605881323431711741977155627e197, + 0.6689502913449127057588118054090372586753e199, + 0.8094298525273443739681622845449350829971e201, + 0.9875044200833601362411579871448208012564e203, + 0.1214630436702532967576624324188129585545e206, + 0.1506141741511140879795014161993280686076e208, + 0.1882677176888926099743767702491600857595e210, + 0.237217324288004688567714730513941708057e212, + 0.3012660018457659544809977077527059692324e214, + 0.3856204823625804217356770659234636406175e216, + 0.4974504222477287440390234150412680963966e218, + 0.6466855489220473672507304395536485253155e220, + 0.8471580690878820510984568758152795681634e222, + 0.1118248651196004307449963076076169029976e225, + 0.1487270706090685728908450891181304809868e227, + 0.1992942746161518876737324194182948445223e229, + 0.269047270731805048359538766214698040105e231, + 0.3659042881952548657689727220519893345429e233, + 0.5012888748274991661034926292112253883237e235, + 0.6917786472619488492228198283114910358867e237, + 0.9615723196941089004197195613529725398826e239, + 0.1346201247571752460587607385894161555836e242, + 0.1898143759076170969428526414110767793728e244, + 0.2695364137888162776588507508037290267094e246, + 0.3854370717180072770521565736493325081944e248, + 0.5550293832739304789551054660550388118e250, + 0.80479260574719919448490292577980627711e252, + 0.1174997204390910823947958271638517164581e255, + 0.1727245890454638911203498659308620231933e257, + 0.2556323917872865588581178015776757943262e259, + 0.380892263763056972698595524350736933546e261, + 0.571338395644585459047893286526105400319e263, + 0.8627209774233240431623188626544191544816e265, + 0.1311335885683452545606724671234717114812e268, + 0.2006343905095682394778288746989117185662e270, + 0.308976961384735088795856467036324046592e272, + 0.4789142901463393876335775239063022722176e274, + 0.7471062926282894447083809372938315446595e276, + 0.1172956879426414428192158071551315525115e279, + 0.1853271869493734796543609753051078529682e281, + 0.2946702272495038326504339507351214862195e283, + 0.4714723635992061322406943211761943779512e285, + 0.7590705053947218729075178570936729485014e287, + 0.1229694218739449434110178928491750176572e290, + 0.2004401576545302577599591653441552787813e292, + 0.3287218585534296227263330311644146572013e294, + 0.5423910666131588774984495014212841843822e296, + 0.9003691705778437366474261723593317460744e298, + 0.1503616514864999040201201707840084015944e301, + 0.2526075744973198387538018869171341146786e303, + 0.4269068009004705274939251888899566538069e305, + 0.7257415615307998967396728211129263114717e307, + }}; + + return factorials[i]; +} + +export template <> +struct max_factorial +{ + static constexpr unsigned value = 170; +}; + +export template <> +inline constexpr long double unchecked_factorial(unsigned i ) +{ + + constexpr std::array factorials = { { + + + + 1L, + 1L, + 2L, + 6L, + 24L, + 120L, + 720L, + 5040L, + 40320L, + 362880.0L, + 3628800.0L, + 39916800.0L, + 479001600.0L, + 6227020800.0L, + 87178291200.0L, + 1307674368000.0L, + 20922789888000.0L, + 355687428096000.0L, + 6402373705728000.0L, + 121645100408832000.0L, + 0.243290200817664e19L, + 0.5109094217170944e20L, + 0.112400072777760768e22L, + 0.2585201673888497664e23L, + 0.62044840173323943936e24L, + 0.15511210043330985984e26L, + 0.403291461126605635584e27L, + 0.10888869450418352160768e29L, + 0.304888344611713860501504e30L, + 0.8841761993739701954543616e31L, + 0.26525285981219105863630848e33L, + 0.822283865417792281772556288e34L, + 0.26313083693369353016721801216e36L, + 0.868331761881188649551819440128e37L, + 0.29523279903960414084761860964352e39L, + 0.103331479663861449296666513375232e41L, + 0.3719933267899012174679994481508352e42L, + 0.137637530912263450463159795815809024e44L, + 0.5230226174666011117600072241000742912e45L, + 0.203978820811974433586402817399028973568e47L, + 0.815915283247897734345611269596115894272e48L, + 0.3345252661316380710817006205344075166515e50L, + 0.1405006117752879898543142606244511569936e52L, + 0.6041526306337383563735513206851399750726e53L, + 0.265827157478844876804362581101461589032e55L, + 0.1196222208654801945619631614956577150644e57L, + 0.5502622159812088949850305428800254892962e58L, + 0.2586232415111681806429643551536119799692e60L, + 0.1241391559253607267086228904737337503852e62L, + 0.6082818640342675608722521633212953768876e63L, + 0.3041409320171337804361260816606476884438e65L, + 0.1551118753287382280224243016469303211063e67L, + 0.8065817517094387857166063685640376697529e68L, + 0.427488328406002556429801375338939964969e70L, + 0.2308436973392413804720927426830275810833e72L, + 0.1269640335365827592596510084756651695958e74L, + 0.7109985878048634518540456474637249497365e75L, + 0.4052691950487721675568060190543232213498e77L, + 0.2350561331282878571829474910515074683829e79L, + 0.1386831185456898357379390197203894063459e81L, + 0.8320987112741390144276341183223364380754e82L, + 0.507580213877224798800856812176625227226e84L, + 0.3146997326038793752565312235495076408801e86L, + 0.1982608315404440064116146708361898137545e88L, + 0.1268869321858841641034333893351614808029e90L, + 0.8247650592082470666723170306785496252186e91L, + 0.5443449390774430640037292402478427526443e93L, + 0.3647111091818868528824985909660546442717e95L, + 0.2480035542436830599600990418569171581047e97L, + 0.1711224524281413113724683388812728390923e99L, + 0.1197857166996989179607278372168909873646e101L, + 0.8504785885678623175211676442399260102886e102L, + 0.6123445837688608686152407038527467274078e104L, + 0.4470115461512684340891257138125051110077e106L, + 0.3307885441519386412259530282212537821457e108L, + 0.2480914081139539809194647711659403366093e110L, + 0.188549470166605025498793226086114655823e112L, + 0.1451830920282858696340707840863082849837e114L, + 0.1132428117820629783145752115873204622873e116L, + 0.8946182130782975286851441715398316520698e117L, + 0.7156945704626380229481153372318653216558e119L, + 0.5797126020747367985879734231578109105412e121L, + 0.4753643337012841748421382069894049466438e123L, + 0.3945523969720658651189747118012061057144e125L, + 0.3314240134565353266999387579130131288001e127L, + 0.2817104114380550276949479442260611594801e129L, + 0.2422709538367273238176552320344125971528e131L, + 0.210775729837952771721360051869938959523e133L, + 0.1854826422573984391147968456455462843802e135L, + 0.1650795516090846108121691926245361930984e137L, + 0.1485715964481761497309522733620825737886e139L, + 0.1352001527678402962551665687594951421476e141L, + 0.1243841405464130725547532432587355307758e143L, + 0.1156772507081641574759205162306240436215e145L, + 0.1087366156656743080273652852567866010042e147L, + 0.103299784882390592625997020993947270954e149L, + 0.9916779348709496892095714015418938011582e150L, + 0.9619275968248211985332842594956369871234e152L, + 0.942689044888324774562618574305724247381e154L, + 0.9332621544394415268169923885626670049072e156L, + 0.9332621544394415268169923885626670049072e158L, + 0.9425947759838359420851623124482936749562e160L, + 0.9614466715035126609268655586972595484554e162L, + 0.990290071648618040754671525458177334909e164L, + 0.1029901674514562762384858386476504428305e167L, + 0.1081396758240290900504101305800329649721e169L, + 0.1146280563734708354534347384148349428704e171L, + 0.1226520203196137939351751701038733888713e173L, + 0.132464181945182897449989183712183259981e175L, + 0.1443859583202493582204882102462797533793e177L, + 0.1588245541522742940425370312709077287172e179L, + 0.1762952551090244663872161047107075788761e181L, + 0.1974506857221074023536820372759924883413e183L, + 0.2231192748659813646596607021218715118256e185L, + 0.2543559733472187557120132004189335234812e187L, + 0.2925093693493015690688151804817735520034e189L, + 0.339310868445189820119825609358857320324e191L, + 0.396993716080872089540195962949863064779e193L, + 0.4684525849754290656574312362808384164393e195L, + 0.5574585761207605881323431711741977155627e197L, + 0.6689502913449127057588118054090372586753e199L, + 0.8094298525273443739681622845449350829971e201L, + 0.9875044200833601362411579871448208012564e203L, + 0.1214630436702532967576624324188129585545e206L, + 0.1506141741511140879795014161993280686076e208L, + 0.1882677176888926099743767702491600857595e210L, + 0.237217324288004688567714730513941708057e212L, + 0.3012660018457659544809977077527059692324e214L, + 0.3856204823625804217356770659234636406175e216L, + 0.4974504222477287440390234150412680963966e218L, + 0.6466855489220473672507304395536485253155e220L, + 0.8471580690878820510984568758152795681634e222L, + 0.1118248651196004307449963076076169029976e225L, + 0.1487270706090685728908450891181304809868e227L, + 0.1992942746161518876737324194182948445223e229L, + 0.269047270731805048359538766214698040105e231L, + 0.3659042881952548657689727220519893345429e233L, + 0.5012888748274991661034926292112253883237e235L, + 0.6917786472619488492228198283114910358867e237L, + 0.9615723196941089004197195613529725398826e239L, + 0.1346201247571752460587607385894161555836e242L, + 0.1898143759076170969428526414110767793728e244L, + 0.2695364137888162776588507508037290267094e246L, + 0.3854370717180072770521565736493325081944e248L, + 0.5550293832739304789551054660550388118e250L, + 0.80479260574719919448490292577980627711e252L, + 0.1174997204390910823947958271638517164581e255L, + 0.1727245890454638911203498659308620231933e257L, + 0.2556323917872865588581178015776757943262e259L, + 0.380892263763056972698595524350736933546e261L, + 0.571338395644585459047893286526105400319e263L, + 0.8627209774233240431623188626544191544816e265L, + 0.1311335885683452545606724671234717114812e268L, + 0.2006343905095682394778288746989117185662e270L, + 0.308976961384735088795856467036324046592e272L, + 0.4789142901463393876335775239063022722176e274L, + 0.7471062926282894447083809372938315446595e276L, + 0.1172956879426414428192158071551315525115e279L, + 0.1853271869493734796543609753051078529682e281L, + 0.2946702272495038326504339507351214862195e283L, + 0.4714723635992061322406943211761943779512e285L, + 0.7590705053947218729075178570936729485014e287L, + 0.1229694218739449434110178928491750176572e290L, + 0.2004401576545302577599591653441552787813e292L, + 0.3287218585534296227263330311644146572013e294L, + 0.5423910666131588774984495014212841843822e296L, + 0.9003691705778437366474261723593317460744e298L, + 0.1503616514864999040201201707840084015944e301L, + 0.2526075744973198387538018869171341146786e303L, + 0.4269068009004705274939251888899566538069e305L, + 0.7257415615307998967396728211129263114717e307L, + }}; + + return factorials[i]; +} + +export template <> +struct max_factorial +{ + static constexpr unsigned value = 170; +}; +# 677 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" +template +struct unchecked_factorial_initializer +{ + struct init + { + init() + { + boost::math::unchecked_factorial(3); + } + void force_instantiate()const {} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename unchecked_factorial_initializer::init unchecked_factorial_initializer::initializer; + + +template +inline T unchecked_factorial_imp(unsigned i, const std::integral_constant&) +{ +# 714 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" + static_assert(!std::is_integral::value && !std::numeric_limits::is_integer, "Type T must not be an integral type"); + + + static const std::array factorials = {{ + T(boost::math::tools::convert_from_string("1")), + T(boost::math::tools::convert_from_string("1")), + T(boost::math::tools::convert_from_string("2")), + T(boost::math::tools::convert_from_string("6")), + T(boost::math::tools::convert_from_string("24")), + T(boost::math::tools::convert_from_string("120")), + T(boost::math::tools::convert_from_string("720")), + T(boost::math::tools::convert_from_string("5040")), + T(boost::math::tools::convert_from_string("40320")), + T(boost::math::tools::convert_from_string("362880")), + T(boost::math::tools::convert_from_string("3628800")), + T(boost::math::tools::convert_from_string("39916800")), + T(boost::math::tools::convert_from_string("479001600")), + T(boost::math::tools::convert_from_string("6227020800")), + T(boost::math::tools::convert_from_string("87178291200")), + T(boost::math::tools::convert_from_string("1307674368000")), + T(boost::math::tools::convert_from_string("20922789888000")), + T(boost::math::tools::convert_from_string("355687428096000")), + T(boost::math::tools::convert_from_string("6402373705728000")), + T(boost::math::tools::convert_from_string("121645100408832000")), + T(boost::math::tools::convert_from_string("2432902008176640000")), + T(boost::math::tools::convert_from_string("51090942171709440000")), + T(boost::math::tools::convert_from_string("1124000727777607680000")), + T(boost::math::tools::convert_from_string("25852016738884976640000")), + T(boost::math::tools::convert_from_string("620448401733239439360000")), + T(boost::math::tools::convert_from_string("15511210043330985984000000")), + T(boost::math::tools::convert_from_string("403291461126605635584000000")), + T(boost::math::tools::convert_from_string("10888869450418352160768000000")), + T(boost::math::tools::convert_from_string("304888344611713860501504000000")), + T(boost::math::tools::convert_from_string("8841761993739701954543616000000")), + T(boost::math::tools::convert_from_string("265252859812191058636308480000000")), + T(boost::math::tools::convert_from_string("8222838654177922817725562880000000")), + T(boost::math::tools::convert_from_string("263130836933693530167218012160000000")), + T(boost::math::tools::convert_from_string("8683317618811886495518194401280000000")), + T(boost::math::tools::convert_from_string("295232799039604140847618609643520000000")), + T(boost::math::tools::convert_from_string("10333147966386144929666651337523200000000")), + T(boost::math::tools::convert_from_string("371993326789901217467999448150835200000000")), + T(boost::math::tools::convert_from_string("13763753091226345046315979581580902400000000")), + T(boost::math::tools::convert_from_string("523022617466601111760007224100074291200000000")), + T(boost::math::tools::convert_from_string("20397882081197443358640281739902897356800000000")), + T(boost::math::tools::convert_from_string("815915283247897734345611269596115894272000000000")), + T(boost::math::tools::convert_from_string("33452526613163807108170062053440751665152000000000")), + T(boost::math::tools::convert_from_string("1405006117752879898543142606244511569936384000000000")), + T(boost::math::tools::convert_from_string("60415263063373835637355132068513997507264512000000000")), + T(boost::math::tools::convert_from_string("2658271574788448768043625811014615890319638528000000000")), + T(boost::math::tools::convert_from_string("119622220865480194561963161495657715064383733760000000000")), + T(boost::math::tools::convert_from_string("5502622159812088949850305428800254892961651752960000000000")), + T(boost::math::tools::convert_from_string("258623241511168180642964355153611979969197632389120000000000")), + T(boost::math::tools::convert_from_string("12413915592536072670862289047373375038521486354677760000000000")), + T(boost::math::tools::convert_from_string("608281864034267560872252163321295376887552831379210240000000000")), + T(boost::math::tools::convert_from_string("30414093201713378043612608166064768844377641568960512000000000000")), + T(boost::math::tools::convert_from_string("1551118753287382280224243016469303211063259720016986112000000000000")), + T(boost::math::tools::convert_from_string("80658175170943878571660636856403766975289505440883277824000000000000")), + T(boost::math::tools::convert_from_string("4274883284060025564298013753389399649690343788366813724672000000000000")), + T(boost::math::tools::convert_from_string("230843697339241380472092742683027581083278564571807941132288000000000000")), + T(boost::math::tools::convert_from_string("12696403353658275925965100847566516959580321051449436762275840000000000000")), + T(boost::math::tools::convert_from_string("710998587804863451854045647463724949736497978881168458687447040000000000000")), + T(boost::math::tools::convert_from_string("40526919504877216755680601905432322134980384796226602145184481280000000000000")), + T(boost::math::tools::convert_from_string("2350561331282878571829474910515074683828862318181142924420699914240000000000000")), + T(boost::math::tools::convert_from_string("138683118545689835737939019720389406345902876772687432540821294940160000000000000")), + T(boost::math::tools::convert_from_string("8320987112741390144276341183223364380754172606361245952449277696409600000000000000")), + T(boost::math::tools::convert_from_string("507580213877224798800856812176625227226004528988036003099405939480985600000000000000")), + T(boost::math::tools::convert_from_string("31469973260387937525653122354950764088012280797258232192163168247821107200000000000000")), + T(boost::math::tools::convert_from_string("1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000")), + T(boost::math::tools::convert_from_string("126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000")), + T(boost::math::tools::convert_from_string("8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000")), + T(boost::math::tools::convert_from_string("544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000")), + T(boost::math::tools::convert_from_string("36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000")), + T(boost::math::tools::convert_from_string("2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000")), + T(boost::math::tools::convert_from_string("171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000")), + T(boost::math::tools::convert_from_string("11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000")), + T(boost::math::tools::convert_from_string("850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000")), + T(boost::math::tools::convert_from_string("61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000")), + T(boost::math::tools::convert_from_string("4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000")), + T(boost::math::tools::convert_from_string("330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000")), + T(boost::math::tools::convert_from_string("24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000")), + T(boost::math::tools::convert_from_string("1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000")), + T(boost::math::tools::convert_from_string("145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000")), + T(boost::math::tools::convert_from_string("11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000")), + T(boost::math::tools::convert_from_string("894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000")), + T(boost::math::tools::convert_from_string("71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000")), + T(boost::math::tools::convert_from_string("5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000")), + T(boost::math::tools::convert_from_string("475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000")), + T(boost::math::tools::convert_from_string("39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000")), + T(boost::math::tools::convert_from_string("3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000")), + T(boost::math::tools::convert_from_string("281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000")), + T(boost::math::tools::convert_from_string("24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000")), + T(boost::math::tools::convert_from_string("2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000")), + T(boost::math::tools::convert_from_string("185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000")), + T(boost::math::tools::convert_from_string("16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000")), + T(boost::math::tools::convert_from_string("1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000")), + T(boost::math::tools::convert_from_string("135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000")), + T(boost::math::tools::convert_from_string("12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000")), + T(boost::math::tools::convert_from_string("1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000")), + T(boost::math::tools::convert_from_string("108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000")), + T(boost::math::tools::convert_from_string("10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000")), + T(boost::math::tools::convert_from_string("991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000")), + T(boost::math::tools::convert_from_string("96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000")), + T(boost::math::tools::convert_from_string("9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000")), + T(boost::math::tools::convert_from_string("933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000")), + T(boost::math::tools::convert_from_string("93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000")), + }}; + + return factorials[i]; +} + +template +inline T unchecked_factorial_imp(unsigned i, const std::integral_constant&) +{ +# 839 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" + static_assert(!std::is_integral::value && !std::numeric_limits::is_integer, "Type T must not be an integral type"); + + static const char* const factorial_strings[] = { + "1", + "1", + "2", + "6", + "24", + "120", + "720", + "5040", + "40320", + "362880", + "3628800", + "39916800", + "479001600", + "6227020800", + "87178291200", + "1307674368000", + "20922789888000", + "355687428096000", + "6402373705728000", + "121645100408832000", + "2432902008176640000", + "51090942171709440000", + "1124000727777607680000", + "25852016738884976640000", + "620448401733239439360000", + "15511210043330985984000000", + "403291461126605635584000000", + "10888869450418352160768000000", + "304888344611713860501504000000", + "8841761993739701954543616000000", + "265252859812191058636308480000000", + "8222838654177922817725562880000000", + "263130836933693530167218012160000000", + "8683317618811886495518194401280000000", + "295232799039604140847618609643520000000", + "10333147966386144929666651337523200000000", + "371993326789901217467999448150835200000000", + "13763753091226345046315979581580902400000000", + "523022617466601111760007224100074291200000000", + "20397882081197443358640281739902897356800000000", + "815915283247897734345611269596115894272000000000", + "33452526613163807108170062053440751665152000000000", + "1405006117752879898543142606244511569936384000000000", + "60415263063373835637355132068513997507264512000000000", + "2658271574788448768043625811014615890319638528000000000", + "119622220865480194561963161495657715064383733760000000000", + "5502622159812088949850305428800254892961651752960000000000", + "258623241511168180642964355153611979969197632389120000000000", + "12413915592536072670862289047373375038521486354677760000000000", + "608281864034267560872252163321295376887552831379210240000000000", + "30414093201713378043612608166064768844377641568960512000000000000", + "1551118753287382280224243016469303211063259720016986112000000000000", + "80658175170943878571660636856403766975289505440883277824000000000000", + "4274883284060025564298013753389399649690343788366813724672000000000000", + "230843697339241380472092742683027581083278564571807941132288000000000000", + "12696403353658275925965100847566516959580321051449436762275840000000000000", + "710998587804863451854045647463724949736497978881168458687447040000000000000", + "40526919504877216755680601905432322134980384796226602145184481280000000000000", + "2350561331282878571829474910515074683828862318181142924420699914240000000000000", + "138683118545689835737939019720389406345902876772687432540821294940160000000000000", + "8320987112741390144276341183223364380754172606361245952449277696409600000000000000", + "507580213877224798800856812176625227226004528988036003099405939480985600000000000000", + "31469973260387937525653122354950764088012280797258232192163168247821107200000000000000", + "1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000", + "126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000", + "8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000", + "544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000", + "36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000", + "2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000", + "171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000", + "11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000", + "850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000", + "61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000", + "4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000", + "330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000", + "24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000", + "1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000", + "145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000", + "11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000", + "894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000", + "71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000", + "5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000", + "475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000", + "39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000", + "3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000", + "281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000", + "24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000", + "2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000", + "185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000", + "16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000", + "1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000", + "135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000", + "12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000", + "1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000", + "108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000", + "10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000", + "991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000", + "96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000", + "9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000", + "933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000", + "93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000", + }; + + + + static thread_local T factorials[sizeof(factorial_strings) / sizeof(factorial_strings[0])]; + static thread_local int digits = 0; + + int current_digits = boost::math::tools::digits(); + + if(digits != current_digits) + { + digits = current_digits; + for(unsigned k = 0; k < sizeof(factorials) / sizeof(factorials[0]); ++k) + factorials[k] = static_cast(boost::math::tools::convert_from_string(factorial_strings[k])); + } + + return factorials[i]; +} + +template +inline T unchecked_factorial_imp(unsigned i, const std::integral_constant::digits>&) +{ + return unchecked_factorial(i); +} + +template +inline T unchecked_factorial_imp(unsigned i, const std::integral_constant::digits>&) +{ + return unchecked_factorial(i); +} +# 989 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" +export template +inline T unchecked_factorial(unsigned i) +{ + typedef typename boost::math::policies::precision >::type tag_type; + return unchecked_factorial_imp(i, tag_type()); +} + + + + + + + +export template +struct max_factorial +{ + static constexpr unsigned value = + std::numeric_limits::digits == std::numeric_limits::digits ? max_factorial::value + : std::numeric_limits::digits == std::numeric_limits::digits ? max_factorial::value + : std::numeric_limits::digits == std::numeric_limits::digits ? max_factorial::value + + : 100; +}; + + + + +template +const unsigned max_factorial::value; + + +} +} +# 196 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/bernoulli.hpp" 1 +# 17 "../../../../boost/math/special_functions/bernoulli.hpp" +# 1 "../../../../boost/math/special_functions/detail/unchecked_bernoulli.hpp" 1 +# 25 "../../../../boost/math/special_functions/detail/unchecked_bernoulli.hpp" +namespace boost { namespace math { + +namespace detail { + +template +struct max_bernoulli_index +{ + static constexpr unsigned value = 17; +}; + +template <> +struct max_bernoulli_index<1> +{ + static constexpr unsigned value = 32; +}; + +template <> +struct max_bernoulli_index<2> +{ + static constexpr unsigned value = 129; +}; + +template <> +struct max_bernoulli_index<3> +{ + static constexpr unsigned value = 1156; +}; + +template <> +struct max_bernoulli_index<4> +{ + static constexpr unsigned value = 11; +}; + +template +struct bernoulli_imp_variant +{ + static constexpr unsigned value = + (std::numeric_limits::max_exponent == 128) + && (std::numeric_limits::radix == 2) + && (std::numeric_limits::digits <= std::numeric_limits::digits) + && (std::is_convertible::value) ? 1 : + ( + (std::numeric_limits::max_exponent == 1024) + && (std::numeric_limits::radix == 2) + && (std::numeric_limits::digits <= std::numeric_limits::digits) + && (std::is_convertible::value) ? 2 : + ( + (std::numeric_limits::max_exponent == 16384) + && (std::numeric_limits::radix == 2) + && (std::numeric_limits::digits <= std::numeric_limits::digits) + && (std::is_convertible::value) ? 3 : (!std::is_convertible::value ? 4 : 0) + ) + ); +}; + +} + +export template +struct max_bernoulli_b2n : public detail::max_bernoulli_index::value>{}; + +namespace detail{ + +template +inline constexpr T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + constexpr std::array::value> numerators = + + + + {{ + std::int64_t( +1LL), + std::int64_t( +1LL), + std::int64_t( -1LL), + std::int64_t( +1LL), + std::int64_t( -1LL), + std::int64_t( +5LL), + std::int64_t( -691LL), + std::int64_t( +7LL), + std::int64_t( -3617LL), + std::int64_t( +43867LL), + std::int64_t( -174611LL), + std::int64_t( +854513LL), + std::int64_t( -236364091LL), + std::int64_t( +8553103LL), + std::int64_t( -23749461029LL), + std::int64_t(+8615841276005LL), + std::int64_t(-7709321041217LL), + std::int64_t(+2577687858367LL) + }}; + + + constexpr std::array::value> denominators = + + + + {{ + std::int64_t( 1LL), + std::int64_t( 6LL), + std::int64_t( 30LL), + std::int64_t( 42LL), + std::int64_t( 30LL), + std::int64_t( 66LL), + std::int64_t( 2730LL), + std::int64_t( 6LL), + std::int64_t( 510LL), + std::int64_t( 798LL), + std::int64_t( 330LL), + std::int64_t( 138LL), + std::int64_t( 2730LL), + std::int64_t( 6LL), + std::int64_t( 870LL), + std::int64_t( 14322LL), + std::int64_t( 510LL), + std::int64_t( 6LL) + }}; + return T(numerators[n]) / denominators[n]; +} + +template +inline constexpr T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + constexpr std::array::value> bernoulli_data = + + + + {{ + +1.00000000000000000000000000000000000000000F, + +0.166666666666666666666666666666666666666667F, + -0.0333333333333333333333333333333333333333333F, + +0.0238095238095238095238095238095238095238095F, + -0.0333333333333333333333333333333333333333333F, + +0.0757575757575757575757575757575757575757576F, + -0.253113553113553113553113553113553113553114F, + +1.16666666666666666666666666666666666666667F, + -7.09215686274509803921568627450980392156863F, + +54.9711779448621553884711779448621553884712F, + -529.124242424242424242424242424242424242424F, + +6192.12318840579710144927536231884057971014F, + -86580.2531135531135531135531135531135531136F, + +1.42551716666666666666666666666666666666667e6F, + -2.72982310678160919540229885057471264367816e7F, + +6.01580873900642368384303868174835916771401e8F, + -1.51163157670921568627450980392156862745098e10F, + +4.29614643061166666666666666666666666666667e11F, + -1.37116552050883327721590879485616327721591e13F, + +4.88332318973593166666666666666666666666667e14F, + -1.92965793419400681486326681448632668144863e16F, + +8.41693047573682615000553709856035437430786e17F, + -4.03380718540594554130768115942028985507246e19F, + +2.11507486380819916056014539007092198581560e21F, + -1.20866265222965259346027311937082525317819e23F, + +7.50086674607696436685572007575757575757576e24F, + -5.03877810148106891413789303052201257861635e26F, + +3.65287764848181233351104308429711779448622e28F, + -2.84987693024508822262691464329106781609195e30F, + +2.38654274996836276446459819192192149717514e32F, + -2.13999492572253336658107447651910973926742e34F, + +2.05009757234780975699217330956723102516667e36F, + -2.09380059113463784090951852900279701847092e38F, + }}; + + return bernoulli_data[n]; +} + + +template +inline constexpr T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + constexpr std::array::value> bernoulli_data = + + + + {{ + +1.00000000000000000000000000000000000000000, + +0.166666666666666666666666666666666666666667, + -0.0333333333333333333333333333333333333333333, + +0.0238095238095238095238095238095238095238095, + -0.0333333333333333333333333333333333333333333, + +0.0757575757575757575757575757575757575757576, + -0.253113553113553113553113553113553113553114, + +1.16666666666666666666666666666666666666667, + -7.09215686274509803921568627450980392156863, + +54.9711779448621553884711779448621553884712, + -529.124242424242424242424242424242424242424, + +6192.12318840579710144927536231884057971014, + -86580.2531135531135531135531135531135531136, + +1.42551716666666666666666666666666666666667e6, + -2.72982310678160919540229885057471264367816e7, + +6.01580873900642368384303868174835916771401e8, + -1.51163157670921568627450980392156862745098e10, + +4.29614643061166666666666666666666666666667e11, + -1.37116552050883327721590879485616327721591e13, + +4.88332318973593166666666666666666666666667e14, + -1.92965793419400681486326681448632668144863e16, + +8.41693047573682615000553709856035437430786e17, + -4.03380718540594554130768115942028985507246e19, + +2.11507486380819916056014539007092198581560e21, + -1.20866265222965259346027311937082525317819e23, + +7.50086674607696436685572007575757575757576e24, + -5.03877810148106891413789303052201257861635e26, + +3.65287764848181233351104308429711779448622e28, + -2.84987693024508822262691464329106781609195e30, + +2.38654274996836276446459819192192149717514e32, + -2.13999492572253336658107447651910973926742e34, + +2.05009757234780975699217330956723102516667e36, + -2.09380059113463784090951852900279701847092e38, + +2.27526964884635155596492603527692645814700e40, + -2.62577102862395760473030497361582020814490e42, + +3.21250821027180325182047923042649852435219e44, + -4.15982781667947109139170744952623589366896e46, + +5.69206954820352800238834562191210586444805e48, + -8.21836294197845756922906534686173330145509e50, + +1.25029043271669930167323398297028955241772e53, + -2.00155832332483702749253291988132987687242e55, + +3.36749829153643742333966769033387530162196e57, + -5.94709705031354477186604968440515408405791e59, + +1.10119103236279775595641307904376916046305e62, + -2.13552595452535011886583850190410656789733e64, + +4.33288969866411924196166130593792062184514e66, + -9.18855282416693282262005552155018971389604e68, + +2.03468967763290744934550279902200200659751e71, + -4.70038339580357310785752555350060606545967e73, + +1.13180434454842492706751862577339342678904e76, + -2.83822495706937069592641563364817647382847e78, + +7.40642489796788506297508271409209841768797e80, + -2.00964548027566044834656196727153631868673e83, + +5.66571700508059414457193460305193569614195e85, + -1.65845111541362169158237133743199123014950e88, + +5.03688599504923774192894219151801548124424e90, + -1.58614682376581863693634015729664387827410e93, + +5.17567436175456269840732406825071225612408e95, + -1.74889218402171173396900258776181591451415e98, + +6.11605199949521852558245252642641677807677e100, + -2.21227769127078349422883234567129324455732e103, + +8.27227767987709698542210624599845957312047e105, + -3.19589251114157095835916343691808148735263e108, + +1.27500822233877929823100243029266798669572e111, + -5.25009230867741338994028246245651754469199e113, + +2.23018178942416252098692981988387281437383e116, + -9.76845219309552044386335133989802393011669e118, + +4.40983619784529542722726228748131691918758e121, + -2.05085708864640888397293377275830154864566e124, + +9.82144332797912771075729696020975210414919e126, + -4.84126007982088805087891967099634127611305e129, + +2.45530888014809826097834674040886903996737e132, + -1.28069268040847475487825132786017857218118e135, + +6.86761671046685811921018885984644004360924e137, + -3.78464685819691046949789954163795568144895e140, + +2.14261012506652915508713231351482720966602e143, + -1.24567271371836950070196429616376072194583e146, + +7.43457875510001525436796683940520613117807e148, + -4.55357953046417048940633332233212748767721e151, + +2.86121128168588683453638472510172325229190e154, + -1.84377235520338697276882026536287854875414e157, + +1.21811545362210466995013165065995213558174e160, + -8.24821871853141215484818457296893447301419e162, + +5.72258779378329433296516498142978615918685e165, + -4.06685305250591047267679693831158655602196e168, + +2.95960920646420500628752695815851870426379e171, + -2.20495225651894575090311752273445984836379e174, + +1.68125970728895998058311525151360665754464e177, + -1.31167362135569576486452806355817153004431e180, + +1.04678940094780380821832853929823089643829e183, + -8.54328935788337077185982546299082774593270e185, + +7.12878213224865423522884066771438224721245e188, + -6.08029314555358993000847118686477458461988e191, + +5.29967764248499239300942910043247266228490e194, + -4.71942591687458626443646229013379911103761e197, + +4.29284137914029810894168296541074669045521e200, + -3.98767449682322074434477655542938795106651e203, + +3.78197804193588827138944181161393327898220e206, + -3.66142336836811912436858082151197348755196e209, + +3.61760902723728623488554609298914089477541e212, + -3.64707726451913543621383088655499449048682e215, + +3.75087554364544090983452410104814189306842e218, + -3.93458672964390282694891288533713429355657e221, + +4.20882111481900820046571171111494898242731e224, + -4.59022962206179186559802940573325591059371e227, + +5.10317257726295759279198185106496768539760e230, + -5.78227623036569554015377271242917142512200e233, + +6.67624821678358810322637794412809363451080e236, + -7.85353076444504163225916259639312444428230e239, + +9.41068940670587255245443288258762485293948e242, + -1.14849338734651839938498599206805592548354e246, + +1.42729587428487856771416320087122499897180e249, + -1.80595595869093090142285728117654560926719e252, + +2.32615353076608052161297985184708876161736e255, + -3.04957517154995947681942819261542593785327e258, + +4.06858060764339734424012124124937318633684e261, + -5.52310313219743616252320044093186392324280e264, + +7.62772793964343924869949690204961215533859e267, + -1.07155711196978863132793524001065396932667e271, + +1.53102008959691884453440916153355334355847e274, + -2.22448916821798346676602348865048510824835e277, + +3.28626791906901391668189736436895275365183e280, + -4.93559289559603449020711938191575963496999e283, + +7.53495712008325067212266049779283956727824e286, + -1.16914851545841777278088924731655041783900e290, + +1.84352614678389394126646201597702232396492e293, + -2.95368261729680829728014917350525183485207e296, + +4.80793212775015697668878704043264072227967e299, + -7.95021250458852528538243631671158693036798e302, + +1.33527841873546338750122832017820518292039e306 + }}; + + return bernoulli_data[n]; +} + +template +inline constexpr T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + constexpr std::array::value> bernoulli_data = + + + + {{ + +1.00000000000000000000000000000000000000000L, + +0.166666666666666666666666666666666666666667L, + -0.0333333333333333333333333333333333333333333L, + +0.0238095238095238095238095238095238095238095L, + -0.0333333333333333333333333333333333333333333L, + +0.0757575757575757575757575757575757575757576L, + -0.253113553113553113553113553113553113553114L, + +1.16666666666666666666666666666666666666667L, + -7.09215686274509803921568627450980392156863L, + +54.9711779448621553884711779448621553884712L, + -529.124242424242424242424242424242424242424L, + +6192.12318840579710144927536231884057971014L, + -86580.2531135531135531135531135531135531136L, + +1.42551716666666666666666666666666666666667E6L, + -2.72982310678160919540229885057471264367816E7L, + +6.01580873900642368384303868174835916771401E8L, + -1.51163157670921568627450980392156862745098E10L, + +4.29614643061166666666666666666666666666667E11L, + -1.37116552050883327721590879485616327721591E13L, + +4.88332318973593166666666666666666666666667E14L, + -1.92965793419400681486326681448632668144863E16L, + +8.41693047573682615000553709856035437430786E17L, + -4.03380718540594554130768115942028985507246E19L, + +2.11507486380819916056014539007092198581560E21L, + -1.20866265222965259346027311937082525317819E23L, + +7.50086674607696436685572007575757575757576E24L, + -5.03877810148106891413789303052201257861635E26L, + +3.65287764848181233351104308429711779448622E28L, + -2.84987693024508822262691464329106781609195E30L, + +2.38654274996836276446459819192192149717514E32L, + -2.13999492572253336658107447651910973926742E34L, + +2.05009757234780975699217330956723102516667E36L, + -2.09380059113463784090951852900279701847092E38L, + +2.27526964884635155596492603527692645814700E40L, + -2.62577102862395760473030497361582020814490E42L, + +3.21250821027180325182047923042649852435219E44L, + -4.15982781667947109139170744952623589366896E46L, + +5.69206954820352800238834562191210586444805E48L, + -8.21836294197845756922906534686173330145509E50L, + +1.25029043271669930167323398297028955241772E53L, + -2.00155832332483702749253291988132987687242E55L, + +3.36749829153643742333966769033387530162196E57L, + -5.94709705031354477186604968440515408405791E59L, + +1.10119103236279775595641307904376916046305E62L, + -2.13552595452535011886583850190410656789733E64L, + +4.33288969866411924196166130593792062184514E66L, + -9.18855282416693282262005552155018971389604E68L, + +2.03468967763290744934550279902200200659751E71L, + -4.70038339580357310785752555350060606545967E73L, + +1.13180434454842492706751862577339342678904E76L, + -2.83822495706937069592641563364817647382847E78L, + +7.40642489796788506297508271409209841768797E80L, + -2.00964548027566044834656196727153631868673E83L, + +5.66571700508059414457193460305193569614195E85L, + -1.65845111541362169158237133743199123014950E88L, + +5.03688599504923774192894219151801548124424E90L, + -1.58614682376581863693634015729664387827410E93L, + +5.17567436175456269840732406825071225612408E95L, + -1.74889218402171173396900258776181591451415E98L, + +6.11605199949521852558245252642641677807677E100L, + -2.21227769127078349422883234567129324455732E103L, + +8.27227767987709698542210624599845957312047E105L, + -3.19589251114157095835916343691808148735263E108L, + +1.27500822233877929823100243029266798669572E111L, + -5.25009230867741338994028246245651754469199E113L, + +2.23018178942416252098692981988387281437383E116L, + -9.76845219309552044386335133989802393011669E118L, + +4.40983619784529542722726228748131691918758E121L, + -2.05085708864640888397293377275830154864566E124L, + +9.82144332797912771075729696020975210414919E126L, + -4.84126007982088805087891967099634127611305E129L, + +2.45530888014809826097834674040886903996737E132L, + -1.28069268040847475487825132786017857218118E135L, + +6.86761671046685811921018885984644004360924E137L, + -3.78464685819691046949789954163795568144895E140L, + +2.14261012506652915508713231351482720966602E143L, + -1.24567271371836950070196429616376072194583E146L, + +7.43457875510001525436796683940520613117807E148L, + -4.55357953046417048940633332233212748767721E151L, + +2.86121128168588683453638472510172325229190E154L, + -1.84377235520338697276882026536287854875414E157L, + +1.21811545362210466995013165065995213558174E160L, + -8.24821871853141215484818457296893447301419E162L, + +5.72258779378329433296516498142978615918685E165L, + -4.06685305250591047267679693831158655602196E168L, + +2.95960920646420500628752695815851870426379E171L, + -2.20495225651894575090311752273445984836379E174L, + +1.68125970728895998058311525151360665754464E177L, + -1.31167362135569576486452806355817153004431E180L, + +1.04678940094780380821832853929823089643829E183L, + -8.54328935788337077185982546299082774593270E185L, + +7.12878213224865423522884066771438224721245E188L, + -6.08029314555358993000847118686477458461988E191L, + +5.29967764248499239300942910043247266228490E194L, + -4.71942591687458626443646229013379911103761E197L, + +4.29284137914029810894168296541074669045521E200L, + -3.98767449682322074434477655542938795106651E203L, + +3.78197804193588827138944181161393327898220E206L, + -3.66142336836811912436858082151197348755196E209L, + +3.61760902723728623488554609298914089477541E212L, + -3.64707726451913543621383088655499449048682E215L, + +3.75087554364544090983452410104814189306842E218L, + -3.93458672964390282694891288533713429355657E221L, + +4.20882111481900820046571171111494898242731E224L, + -4.59022962206179186559802940573325591059371E227L, + +5.10317257726295759279198185106496768539760E230L, + -5.78227623036569554015377271242917142512200E233L, + +6.67624821678358810322637794412809363451080E236L, + -7.85353076444504163225916259639312444428230E239L, + +9.41068940670587255245443288258762485293948E242L, + -1.14849338734651839938498599206805592548354E246L, + +1.42729587428487856771416320087122499897180E249L, + -1.80595595869093090142285728117654560926719E252L, + +2.32615353076608052161297985184708876161736E255L, + -3.04957517154995947681942819261542593785327E258L, + +4.06858060764339734424012124124937318633684E261L, + -5.52310313219743616252320044093186392324280E264L, + +7.62772793964343924869949690204961215533859E267L, + -1.07155711196978863132793524001065396932667E271L, + +1.53102008959691884453440916153355334355847E274L, + -2.22448916821798346676602348865048510824835E277L, + +3.28626791906901391668189736436895275365183E280L, + -4.93559289559603449020711938191575963496999E283L, + +7.53495712008325067212266049779283956727824E286L, + -1.16914851545841777278088924731655041783900E290L, + +1.84352614678389394126646201597702232396492E293L, + -2.95368261729680829728014917350525183485207E296L, + +4.80793212775015697668878704043264072227967E299L, + -7.95021250458852528538243631671158693036798E302L, + +1.33527841873546338750122832017820518292039E306L, +# 665 "../../../../boost/math/special_functions/detail/unchecked_bernoulli.hpp" + }}; + + return bernoulli_data[n]; +} + +template +inline T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + + + + static const std::array::value> numerators = + {{ + std::int32_t( +1LL), + std::int32_t( +1LL), + std::int32_t( -1LL), + std::int32_t( +1LL), + std::int32_t( -1LL), + std::int32_t( +5LL), + std::int32_t( -691LL), + std::int32_t( +7LL), + std::int32_t( -3617LL), + std::int32_t( +43867LL), + std::int32_t( -174611LL), + std::int32_t( +854513LL), + }}; + + static const std::array::value> denominators = + {{ + std::int32_t( 1LL), + std::int32_t( 6LL), + std::int32_t( 30LL), + std::int32_t( 42LL), + std::int32_t( 30LL), + std::int32_t( 66LL), + std::int32_t( 2730LL), + std::int32_t( 6LL), + std::int32_t( 510LL), + std::int32_t( 798LL), + std::int32_t( 330LL), + std::int32_t( 138LL), + }}; + return T(numerators[n]) / T(denominators[n]); +} + +} + +export template +inline constexpr T unchecked_bernoulli_b2n(const std::size_t n) +{ + typedef std::integral_constant::value> tag_type; + + return detail::unchecked_bernoulli_imp(n, tag_type()); +} + +}} +# 18 "../../../../boost/math/special_functions/bernoulli.hpp" 2 +# 1 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 1 +# 11 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" +# 1 "../../../../boost/math/tools/throw_exception.hpp" 1 +# 12 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 2 +# 31 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" +namespace boost{ namespace math{ namespace detail{ + + + + +template +T b2n_asymptotic(int n) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + const T nx = static_cast(n); + const T nx2(nx * nx); + + const T approximate_log_of_bernoulli_bn = + ((boost::math::constants::half() + nx) * log(nx)) + + ((boost::math::constants::half() - nx) * log(boost::math::constants::pi())) + + (((T(3) / 2) - nx) * boost::math::constants::ln_two()) + + ((nx * (T(2) - (nx2 * 7) * (1 + ((nx2 * 30) * ((nx2 * 12) - 1))))) / (((nx2 * nx2) * nx2) * 2520)); + return ((n / 2) & 1 ? 1 : -1) * (approximate_log_of_bernoulli_bn > tools::log_max_value() + ? policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, nx, Policy()) + : static_cast(exp(approximate_log_of_bernoulli_bn))); +} + +template +T t2n_asymptotic(int n) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T t2n = fabs(b2n_asymptotic(2 * n)) / (2 * n); + T p2 = ldexp(T(1), n); + if(tools::max_value() / p2 < t2n) + return policies::raise_overflow_error("boost::math::tangent_t2n<%1%>(std::size_t)", 0, T(n), Policy()); + t2n *= p2; + p2 -= 1; + if(tools::max_value() / p2 < t2n) + return policies::raise_overflow_error("boost::math::tangent_t2n<%1%>(std::size_t)", 0, Policy()); + t2n *= p2; + return t2n; +} +# 84 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" +struct max_bernoulli_root_functor +{ + max_bernoulli_root_functor(unsigned long long t) : target(static_cast(t)) {} + double operator()(double n) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + const double nx2(n * n); + + const double approximate_log_of_bernoulli_bn + = ((boost::math::constants::half() + n) * log(n)) + + ((boost::math::constants::half() - n) * log(boost::math::constants::pi())) + + (((double(3) / 2) - n) * boost::math::constants::ln_two()) + + ((n * (2 - (nx2 * 7) * (1 + ((nx2 * 30) * ((nx2 * 12) - 1))))) / (((nx2 * nx2) * nx2) * 2520)); + + return approximate_log_of_bernoulli_bn - target; + } +private: + double target; +}; + +template +inline std::size_t find_bernoulli_overflow_limit(const std::false_type&) +{ + + static const double max_result = static_cast((std::numeric_limits::max)() - 1000u); + + unsigned long long t = lltrunc(boost::math::tools::log_max_value()); + max_bernoulli_root_functor fun(t); + boost::math::tools::equal_floor tol; + std::uintmax_t max_iter = boost::math::policies::get_max_root_iterations(); + double result = boost::math::tools::toms748_solve(fun, sqrt(double(t)), double(t), tol, max_iter).first / 2; + if (result > max_result) + result = max_result; + + return static_cast(result); +} + +template +inline std::size_t find_bernoulli_overflow_limit(const std::true_type&) +{ + return max_bernoulli_index::value>::value; +} + +template +std::size_t b2n_overflow_limit() +{ + + + typedef std::integral_constant::value >= 1) && (bernoulli_imp_variant::value <= 3)> tag_type; + static const std::size_t lim = find_bernoulli_overflow_limit(tag_type()); + return lim; +} + + + + + + +template ::is_specialized && (std::numeric_limits::radix == 2), bool>::type = true> +inline T tangent_scale_factor() +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + return ldexp(T(1), std::numeric_limits::min_exponent + 5); +} + +template ::is_specialized || !(std::numeric_limits::radix == 2), bool>::type = true> +inline T tangent_scale_factor() +{ + return tools::min_value() * 16; +} +# 168 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" +template +struct fixed_vector : private std::allocator +{ + typedef unsigned size_type; + typedef T* iterator; + typedef const T* const_iterator; + fixed_vector() : m_used(0) + { + std::size_t overflow_limit = 5 + b2n_overflow_limit >(); + m_capacity = static_cast((std::min)(overflow_limit, static_cast(100000u))); + m_data = this->allocate(m_capacity); + } + ~fixed_vector() + { + typedef std::allocator allocator_type; + typedef std::allocator_traits allocator_traits; + allocator_type& alloc = *this; + for(unsigned i = 0; i < m_used; ++i) + allocator_traits::destroy(alloc, &m_data[i]); + allocator_traits::deallocate(alloc, m_data, m_capacity); + } + T& operator[](unsigned n) { +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + (void) ((!!( +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + n < m_used +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + )) || (_assert( +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + "n < m_used" +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + ,"../../../../boost/math/special_functions/detail/bernoulli_details.hpp",189),0)) +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + ; return m_data[n]; } + const T& operator[](unsigned n)const { +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + (void) ((!!( +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + n < m_used +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + )) || (_assert( +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + "n < m_used" +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + ,"../../../../boost/math/special_functions/detail/bernoulli_details.hpp",190),0)) +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + ; return m_data[n]; } + unsigned size()const { return m_used; } + unsigned size() { return m_used; } + void resize(unsigned n, const T& val) + { + if(n > m_capacity) + { + throw std::runtime_error("Exhausted storage for Bernoulli numbers.");; + } + for(unsigned i = m_used; i < n; ++i) + new (m_data + i) T(val); + m_used = n; + } + void resize(unsigned n) { resize(n, T()); } + T* begin() { return m_data; } + T* end() { return m_data + m_used; } + T* begin()const { return m_data; } + T* end()const { return m_data + m_used; } + unsigned capacity()const { return m_capacity; } + void clear() { m_used = 0; } +private: + T* m_data; + unsigned m_used, m_capacity; +}; + +template +class bernoulli_numbers_cache +{ +public: + bernoulli_numbers_cache() : m_overflow_limit((std::numeric_limits::max)()) + , m_counter(0) + , m_current_precision(boost::math::tools::digits()) + {} + + typedef fixed_vector container_type; + + void tangent(std::size_t m) + { + static const std::size_t min_overflow_index = b2n_overflow_limit() - 1; + tn.resize(static_cast(m), T(0U)); + + ; + + std::size_t prev_size = m_intermediates.size(); + m_intermediates.resize(m, T(0U)); + + if(prev_size == 0) + { + m_intermediates[1] = tangent_scale_factor() ; + tn[0U] = T(0U); + tn[1U] = tangent_scale_factor() ; + ; + ; + } + + for(std::size_t i = std::max(2, prev_size); i < m; i++) + { + bool overflow_check = false; + if(i >= min_overflow_index && (boost::math::tools::max_value() / (i-1) < m_intermediates[1]) ) + { + std::fill(tn.begin() + i, tn.end(), boost::math::tools::max_value()); + break; + } + m_intermediates[1] = m_intermediates[1] * (i-1); + for(std::size_t j = 2; j <= i; j++) + { + overflow_check = + (i >= min_overflow_index) && ( + (boost::math::tools::max_value() / (i - j) < m_intermediates[j]) + || (boost::math::tools::max_value() / (i - j + 2) < m_intermediates[j-1]) + || (boost::math::tools::max_value() - m_intermediates[j] * (i - j) < m_intermediates[j-1] * (i - j + 2)) + || ((boost::math::isinf)(m_intermediates[j])) + ); + + if(overflow_check) + { + std::fill(tn.begin() + i, tn.end(), boost::math::tools::max_value()); + break; + } + m_intermediates[j] = m_intermediates[j] * (i - j) + m_intermediates[j-1] * (i - j + 2); + } + if(overflow_check) + break; + tn[static_cast(i)] = m_intermediates[i]; + ; + ; + } + } + + void tangent_numbers_series(const std::size_t m) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const std::size_t min_overflow_index = b2n_overflow_limit() - 1; + + typename container_type::size_type old_size = bn.size(); + + tangent(m); + bn.resize(static_cast(m)); + + if(!old_size) + { + bn[0] = 1; + old_size = 1; + } + + T power_two(ldexp(T(1), static_cast(2 * old_size))); + + for(std::size_t i = old_size; i < m; i++) + { + T b(static_cast(i * 2)); + + + + + + b = b / (power_two * tangent_scale_factor()); + b /= (power_two - 1); + bool overflow_check = (i >= min_overflow_index) && (tools::max_value() / tn[static_cast(i)] < b); + if(overflow_check) + { + m_overflow_limit = i; + while(i < m) + { + b = std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : tools::max_value(); + bn[static_cast(i)] = ((i % 2U) ? b : T(-b)); + ++i; + } + break; + } + else + { + b *= tn[static_cast(i)]; + } + + power_two = ldexp(power_two, 2); + + const bool b_neg = i % 2 == 0; + + bn[static_cast(i)] = ((!b_neg) ? b : T(-b)); + } + } + + template + OutputIterator copy_bernoulli_numbers(OutputIterator out, std::size_t start, std::size_t n, const Policy& pol) + { +# 347 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + if(start + n > bn.capacity()) + { + if(start < bn.capacity()) + { + out = copy_bernoulli_numbers(out, start, bn.capacity() - start, pol); + n -= bn.capacity() - start; + start = static_cast(bn.capacity()); + } + if(start < b2n_overflow_limit() + 2u) + { + for(; n; ++start, --n) + { + *out = b2n_asymptotic(static_cast(start * 2U)); + ++out; + } + } + for(; n; ++start, --n) + { + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(start), pol); + ++out; + } + return out; + } + + + + static_assert(sizeof(T) == 1, "Unsupported configuration: your platform appears to have either no atomic integers, or no std::mutex. If you are happy with thread-unsafe code, then you may define BOOST_MATH_BERNOULLI_UNTHREADED to suppress this error."); +# 435 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + return out; + } + + template + OutputIterator copy_tangent_numbers(OutputIterator out, std::size_t start, std::size_t n, const Policy& pol) + { +# 454 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + if(start + n > bn.capacity()) + { + if(start < bn.capacity()) + { + out = copy_tangent_numbers(out, start, bn.capacity() - start, pol); + n -= bn.capacity() - start; + start = static_cast(bn.capacity()); + } + if(start < b2n_overflow_limit() + 2u) + { + for(; n; ++start, --n) + { + *out = t2n_asymptotic(static_cast(start)); + ++out; + } + } + for(; n; ++start, --n) + { + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(start), pol); + ++out; + } + return out; + } + + + + + + if(m_current_precision < boost::math::tools::digits()) + { + bn.clear(); + tn.clear(); + m_intermediates.clear(); + m_current_precision = boost::math::tools::digits(); + } + if(start + n >= bn.size()) + { + std::size_t new_size = (std::min)((std::max)((std::max)(start + n, std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity())); + tangent_numbers_series(new_size); + } + + for(std::size_t i = start; i < start + n; ++i) + { + if(i >= m_overflow_limit) + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol); + else + { + if(tools::max_value() * tangent_scale_factor() < tn[static_cast(i)]) + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol); + else + *out = tn[static_cast(i)] / tangent_scale_factor(); + } + ++out; + } +# 557 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + return out; + } + +private: + + + + + + fixed_vector bn, tn; + std::vector m_intermediates; + + std::size_t m_overflow_limit; + + + + + + int m_counter; + int m_current_precision; + +}; + +template +inline typename std::enable_if<(std::numeric_limits::digits == 0) || (std::numeric_limits::digits >= 0x7fffffff), bernoulli_numbers_cache&>::type get_bernoulli_numbers_cache() +{ + + + + + + static + + thread_local + + bernoulli_numbers_cache data; + return data; +} +template +inline typename std::enable_if::digits && (std::numeric_limits::digits < 0x7fffffff), bernoulli_numbers_cache&>::type get_bernoulli_numbers_cache() +{ + + + + static bernoulli_numbers_cache data; + return data; +} + +}}} +# 19 "../../../../boost/math/special_functions/bernoulli.hpp" 2 + +namespace boost { namespace math { + +namespace detail { + +template +OutputIterator bernoulli_number_imp(OutputIterator out, std::size_t start, std::size_t n, const Policy& pol, const std::integral_constant& tag) +{ + for(std::size_t i = start; (i <= max_bernoulli_b2n::value) && (i < start + n); ++i) + { + *out = unchecked_bernoulli_imp(i, tag); + ++out; + } + + for(std::size_t i = (std::max)(static_cast(max_bernoulli_b2n::value + 1), start); i < start + n; ++i) + { + + *out = (i & 1 ? 1 : -1) * policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(n)", 0, T(i), pol); + ++out; + } + return out; +} + +template +OutputIterator bernoulli_number_imp(OutputIterator out, std::size_t start, std::size_t n, const Policy& pol, const std::integral_constant& tag) +{ + for(std::size_t i = start; (i <= max_bernoulli_b2n::value) && (i < start + n); ++i) + { + *out = unchecked_bernoulli_imp(i, tag); + ++out; + } + + + + if(start + n <= max_bernoulli_b2n::value) + return out; + + return get_bernoulli_numbers_cache().copy_bernoulli_numbers(out, start, n, pol); +} + +} + +export template +inline T bernoulli_b2n(const int i, const Policy &pol) +{ + typedef std::integral_constant::value> tag_type; + if(i < 0) + return policies::raise_domain_error("boost::math::bernoulli_b2n<%1%>", "Index should be >= 0 but got %1%", T(i), pol); + + T result = static_cast(0); + boost::math::detail::bernoulli_number_imp(&result, static_cast(i), 1u, pol, tag_type()); + return result; +} + +export template +inline T bernoulli_b2n(const int i) +{ + return boost::math::bernoulli_b2n(i, policies::policy<>()); +} + +export template +inline OutputIterator bernoulli_b2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it, + const Policy& pol) +{ + typedef std::integral_constant::value> tag_type; + if(start_index < 0) + { + *out_it = policies::raise_domain_error("boost::math::bernoulli_b2n<%1%>", "Index should be >= 0 but got %1%", T(start_index), pol); + return ++out_it; + } + + return boost::math::detail::bernoulli_number_imp(out_it, start_index, number_of_bernoullis_b2n, pol, tag_type()); +} + +export template +inline OutputIterator bernoulli_b2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it) +{ + return boost::math::bernoulli_b2n(start_index, number_of_bernoullis_b2n, out_it, policies::policy<>()); +} + +export template +inline T tangent_t2n(const int i, const Policy &pol) +{ + if(i < 0) + return policies::raise_domain_error("boost::math::tangent_t2n<%1%>", "Index should be >= 0 but got %1%", T(i), pol); + + T result; + boost::math::detail::get_bernoulli_numbers_cache().copy_tangent_numbers(&result, i, 1, pol); + return result; +} + +export template +inline T tangent_t2n(const int i) +{ + return boost::math::tangent_t2n(i, policies::policy<>()); +} + +export template +inline OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_tangent_t2n, + OutputIterator out_it, + const Policy& pol) +{ + if(start_index < 0) + { + *out_it = policies::raise_domain_error("boost::math::tangent_t2n<%1%>", "Index should be >= 0 but got %1%", T(start_index), pol); + return ++out_it; + } + + return boost::math::detail::get_bernoulli_numbers_cache().copy_tangent_numbers(out_it, start_index, number_of_tangent_t2n, pol); +} + +export template +inline OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_tangent_t2n, + OutputIterator out_it) +{ + return boost::math::tangent_t2n(start_index, number_of_tangent_t2n, out_it, policies::policy<>()); +} + +} } +# 197 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/gamma.hpp" 1 +# 25 "../../../../boost/math/special_functions/gamma.hpp" +# 1 "../../../../boost/math/tools/fraction.hpp" 1 +# 13 "../../../../boost/math/tools/fraction.hpp" +# 1 "../../../../boost/math/tools/complex.hpp" 1 +# 14 "../../../../boost/math/tools/complex.hpp" +# 1 "../../../../boost/math/tools/is_detected.hpp" 1 +# 13 "../../../../boost/math/tools/is_detected.hpp" +namespace boost { namespace math { namespace tools { + +template +using void_t = void; + +namespace detail { + +template class Op, typename... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, typename... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +} + + +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(const nonesuch&) = delete; + void operator=(const nonesuch&) = delete; +}; + +template class Op, typename... Args> +using is_detected = typename detail::detector::value_t; + +template class Op, typename... Args> +using detected_t = typename detail::detector::type; + +template class Op, typename... Args> +using detected_or = detail::detector; + +}}} +# 15 "../../../../boost/math/tools/complex.hpp" 2 + +namespace boost { + namespace math { + namespace tools { + + namespace detail { + template + struct is_complex_type_impl + { + static constexpr bool value = false; + }; + + template + struct is_complex_type_impl().real()), + decltype(std::declval().imag())>> + { + static constexpr bool value = true; + }; + } + + template + struct is_complex_type : public detail::is_complex_type_impl {}; + + + + + + template ::value> + struct integer_scalar_type + { + typedef int type; + }; + template + struct integer_scalar_type + { + typedef typename T::value_type type; + }; + template ::value> + struct unsigned_scalar_type + { + typedef unsigned type; + }; + template + struct unsigned_scalar_type + { + typedef typename T::value_type type; + }; + template ::value> + struct scalar_type + { + typedef T type; + }; + template + struct scalar_type + { + typedef typename T::value_type type; + }; + + +} } } +# 14 "../../../../boost/math/tools/fraction.hpp" 2 + + + + + + + +namespace boost{ namespace math{ namespace tools{ + +namespace detail +{ + + template + struct is_pair : public std::false_type{}; + + template + struct is_pair> : public std::true_type{}; + + template + struct fraction_traits_simple + { + using result_type = typename Gen::result_type; + using value_type = typename Gen::result_type; + + static result_type a(const value_type&) noexcept(std::is_floating_point::value) + { + return 1; + } + static result_type b(const value_type& v) noexcept(std::is_floating_point::value) + { + return v; + } + }; + + template + struct fraction_traits_pair + { + using value_type = typename Gen::result_type; + using result_type = typename value_type::first_type; + + static result_type a(const value_type& v) noexcept(std::is_floating_point::value) + { + return v.first; + } + static result_type b(const value_type& v) noexcept(std::is_floating_point::value) + { + return v.second; + } + }; + + template + struct fraction_traits + : public std::conditional< + is_pair::value, + fraction_traits_pair, + fraction_traits_simple>::type + { + }; + + template ::value> + struct tiny_value + { + + + + static T get() { + return 16*tools::min_value(); + } + }; + template + struct tiny_value + { + using value_type = typename T::value_type; + static T get() { + return 16*tools::min_value(); + } + }; + +} +# 108 "../../../../boost/math/tools/fraction.hpp" +template +inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, const U& factor, std::uintmax_t& max_terms) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + using value_type = typename traits::value_type; + using integer_type = typename integer_scalar_type::type; + using scalar_type = typename scalar_type::type; + + integer_type const zero(0), one(1); + + result_type tiny = detail::tiny_value::get(); + scalar_type terminator = abs(factor); + + value_type v = g(); + + result_type f, C, D, delta; + f = traits::b(v); + if(f == zero) + f = tiny; + C = f; + D = 0; + + std::uintmax_t counter(max_terms); + do{ + v = g(); + D = traits::b(v) + traits::a(v) * D; + if(D == result_type(0)) + D = tiny; + C = traits::b(v) + traits::a(v) / C; + if(C == zero) + C = tiny; + D = one/D; + delta = C*D; + f = f * delta; + }while((abs(delta - one) > terminator) && --counter); + + max_terms = max_terms - counter; + + return f; +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, const U& factor) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + std::uintmax_t max_terms = (std::numeric_limits::max)(); + return continued_fraction_b(g, factor, max_terms); +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, int bits) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + + result_type factor = ldexp(1.0f, 1 - bits); + std::uintmax_t max_terms = (std::numeric_limits::max)(); + return continued_fraction_b(g, factor, max_terms); +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, int bits, std::uintmax_t& max_terms) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + + result_type factor = ldexp(1.0f, 1 - bits); + return continued_fraction_b(g, factor, max_terms); +} +# 202 "../../../../boost/math/tools/fraction.hpp" +template +inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, const U& factor, std::uintmax_t& max_terms) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + using value_type = typename traits::value_type; + using integer_type = typename integer_scalar_type::type; + using scalar_type = typename scalar_type::type; + + integer_type const zero(0), one(1); + + result_type tiny = detail::tiny_value::get(); + scalar_type terminator = abs(factor); + + value_type v = g(); + + result_type f, C, D, delta, a0; + f = traits::b(v); + a0 = traits::a(v); + if(f == zero) + f = tiny; + C = f; + D = 0; + + std::uintmax_t counter(max_terms); + + do{ + v = g(); + D = traits::b(v) + traits::a(v) * D; + if(D == zero) + D = tiny; + C = traits::b(v) + traits::a(v) / C; + if(C == zero) + C = tiny; + D = one/D; + delta = C*D; + f = f * delta; + }while((abs(delta - one) > terminator) && --counter); + + max_terms = max_terms - counter; + + return a0/f; +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, const U& factor) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + std::uintmax_t max_iter = (std::numeric_limits::max)(); + return continued_fraction_a(g, factor, max_iter); +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, int bits) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef detail::fraction_traits traits; + typedef typename traits::result_type result_type; + + result_type factor = ldexp(1.0f, 1-bits); + std::uintmax_t max_iter = (std::numeric_limits::max)(); + + return continued_fraction_a(g, factor, max_iter); +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, int bits, std::uintmax_t& max_terms) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + + result_type factor = ldexp(1.0f, 1-bits); + return continued_fraction_a(g, factor, max_terms); +} + +} +} +} +# 26 "../../../../boost/math/special_functions/gamma.hpp" 2 + + + + + + +# 1 "../../../../boost/math/special_functions/lanczos.hpp" 1 +# 33 "../../../../boost/math/special_functions/lanczos.hpp" +namespace boost{ namespace math{ namespace lanczos{ +# 50 "../../../../boost/math/special_functions/lanczos.hpp" +template +struct lanczos_initializer +{ + struct init + { + init() + { + T t(1); + Lanczos::lanczos_sum(t); + Lanczos::lanczos_sum_expG_scaled(t); + Lanczos::lanczos_sum_near_1(t); + Lanczos::lanczos_sum_near_2(t); + Lanczos::g(); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; +template +typename lanczos_initializer::init const lanczos_initializer::initializer; + + + + + + + +template +inline double lanczos_g_near_1_and_2(const L&) +{ + return L::g(); +} + + + + + + + +struct lanczos6 : public std::integral_constant +{ + + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[6] = { + static_cast(boost::math::tools::make_big_value( 8706.349592549009182288174442774377925882, "8706.349592549009182288174442774377925882", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8523.650341121874633477483696775067709735, "8523.650341121874633477483696775067709735", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3338.029219476423550899999750161289306564, "3338.029219476423550899999750161289306564", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 653.6424994294008795995653541449610986791, "653.6424994294008795995653541449610986791", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 63.99951844938187085666201263218840287667, "63.99951844938187085666201263218840287667", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631006311133031631822390264407, "2.506628274631006311133031631822390264407", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint16_t denom[6] = { + static_cast(0u), + static_cast(24u), + static_cast(50u), + static_cast(35u), + static_cast(10u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[6] = { + static_cast(boost::math::tools::make_big_value( 32.81244541029783471623665933780748627823, "32.81244541029783471623665933780748627823", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 32.12388941444332003446077108933558534361, "32.12388941444332003446077108933558534361", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12.58034729455216106950851080138931470954, "12.58034729455216106950851080138931470954", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.463444478353241423633780693218408889251, "2.463444478353241423633780693218408889251", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2412010548258800231126240760264822486599, "0.2412010548258800231126240760264822486599", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.009446967704539249494420221613134244048319, "0.009446967704539249494420221613134244048319", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint16_t denom[6] = { + static_cast(0u), + static_cast(24u), + static_cast(50u), + static_cast(35u), + static_cast(10u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[5] = { + static_cast(boost::math::tools::make_big_value( 2.044879010930422922760429926121241330235, "2.044879010930422922760429926121241330235", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.751366405578505366591317846728753993668, "-2.751366405578505366591317846728753993668", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.02282965224225004296750609604264824677, "1.02282965224225004296750609604264824677", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.09786124911582813985028889636665335893627, "-0.09786124911582813985028889636665335893627", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0009829742267506615183144364420540766510112, "0.0009829742267506615183144364420540766510112", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[5] = { + static_cast(boost::math::tools::make_big_value( 5.748142489536043490764289256167080091892, "5.748142489536043490764289256167080091892", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.734074268282457156081021756682138251825, "-7.734074268282457156081021756682138251825", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.875167944990511006997713242805893543947, "2.875167944990511006997713242805893543947", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.2750873773533504542306766137703788781776, "-0.2750873773533504542306766137703788781776", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.002763134585812698552178368447708846850353, "0.002763134585812698552178368447708846850353", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 5.581000000000000405009359383257105946541; } +}; + + + + + + +struct lanczos11 : public std::integral_constant +{ + + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[11] = { + static_cast(boost::math::tools::make_big_value( 38474670393.31776828316099004518914832218, "38474670393.31776828316099004518914832218", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 36857665043.51950660081971227404959150474, "36857665043.51950660081971227404959150474", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 15889202453.72942008945006665994637853242, "15889202453.72942008945006665994637853242", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4059208354.298834770194507810788393801607, "4059208354.298834770194507810788393801607", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 680547661.1834733286087695557084801366446, "680547661.1834733286087695557084801366446", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 78239755.00312005289816041245285376206263, "78239755.00312005289816041245285376206263", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6246580.776401795264013335510453568106366, "6246580.776401795264013335510453568106366", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 341986.3488721347032223777872763188768288, "341986.3488721347032223777872763188768288", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12287.19451182455120096222044424100527629, "12287.19451182455120096222044424100527629", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 261.6140441641668190791708576058805625502, "261.6140441641668190791708576058805625502", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415573855452633787834, "2.506628274631000502415573855452633787834", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint32_t denom[11] = { + static_cast(0u), + static_cast(362880u), + static_cast(1026576u), + static_cast(1172700u), + static_cast(723680u), + static_cast(269325u), + static_cast(63273u), + static_cast(9450u), + static_cast(870u), + static_cast(45u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[11] = { + static_cast(boost::math::tools::make_big_value( 709811.662581657956893540610814842699825, "709811.662581657956893540610814842699825", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 679979.847415722640161734319823103390728, "679979.847415722640161734319823103390728", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 293136.785721159725251629480984140341656, "293136.785721159725251629480984140341656", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 74887.5403291467179935942448101441897121, "74887.5403291467179935942448101441897121", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12555.29058241386295096255111537516768137, "12555.29058241386295096255111537516768137", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1443.42992444170669746078056942194198252, "1443.42992444170669746078056942194198252", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 115.2419459613734722083208906727972935065, "115.2419459613734722083208906727972935065", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.30923920573262762719523981992008976989, "6.30923920573262762719523981992008976989", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2266840463022436475495508977579735223818, "0.2266840463022436475495508977579735223818", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.004826466289237661857584712046231435101741, "0.004826466289237661857584712046231435101741", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.4624429436045378766270459638520555557321e-4, "0.4624429436045378766270459638520555557321e-4", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint32_t denom[11] = { + static_cast(0u), + static_cast(362880u), + static_cast(1026576u), + static_cast(1172700u), + static_cast(723680u), + static_cast(269325u), + static_cast(63273u), + static_cast(9450u), + static_cast(870u), + static_cast(45u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[10] = { + static_cast(boost::math::tools::make_big_value( 4.005853070677940377969080796551266387954, "4.005853070677940377969080796551266387954", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -13.17044315127646469834125159673527183164, "-13.17044315127646469834125159673527183164", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 17.19146865350790353683895137079288129318, "17.19146865350790353683895137079288129318", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -11.36446409067666626185701599196274701126, "-11.36446409067666626185701599196274701126", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.024801119349323770107694133829772634737, "4.024801119349323770107694133829772634737", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.7445703262078094128346501724255463005006, "-0.7445703262078094128346501724255463005006", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.06513861351917497265045550019547857713172, "0.06513861351917497265045550019547857713172", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.00217899958561830354633560009312512312758, "-0.00217899958561830354633560009312512312758", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.17655204574495137651670832229571934738e-4, "0.17655204574495137651670832229571934738e-4", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1036282091079938047775645941885460820853e-7, "-0.1036282091079938047775645941885460820853e-7", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[10] = { + static_cast(boost::math::tools::make_big_value( 19.05889633808148715159575716844556056056, "19.05889633808148715159575716844556056056", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -62.66183664701721716960978577959655644762, "-62.66183664701721716960978577959655644762", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 81.7929198065004751699057192860287512027, "81.7929198065004751699057192860287512027", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -54.06941772964234828416072865069196553015, "-54.06941772964234828416072865069196553015", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 19.14904664790693019642068229478769661515, "19.14904664790693019642068229478769661515", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.542488556926667589704590409095331790317, "-3.542488556926667589704590409095331790317", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.3099140334815639910894627700232804503017, "0.3099140334815639910894627700232804503017", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.01036716187296241640634252431913030440825, "-0.01036716187296241640634252431913030440825", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.8399926504443119927673843789048514017761e-4, "0.8399926504443119927673843789048514017761e-4", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.493038376656195010308610694048822561263e-7, "-0.493038376656195010308610694048822561263e-7", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 10.90051099999999983936049829935654997826; } +}; + + + + + + +struct lanczos13 : public std::integral_constant +{ + + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[13] = { + static_cast(boost::math::tools::make_big_value( 44012138428004.60895436261759919070125699, "44012138428004.60895436261759919070125699", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 41590453358593.20051581730723108131357995, "41590453358593.20051581730723108131357995", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 18013842787117.99677796276038389462742949, "18013842787117.99677796276038389462742949", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4728736263475.388896889723995205703970787, "4728736263475.388896889723995205703970787", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 837910083628.4046470415724300225777912264, "837910083628.4046470415724300225777912264", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 105583707273.4299344907359855510105321192, "105583707273.4299344907359855510105321192", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9701363618.494999493386608345339104922694, "9701363618.494999493386608345339104922694", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 654914397.5482052641016767125048538245644, "654914397.5482052641016767125048538245644", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 32238322.94213356530668889463945849409184, "32238322.94213356530668889463945849409184", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1128514.219497091438040721811544858643121, "1128514.219497091438040721811544858643121", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 26665.79378459858944762533958798805525125, "26665.79378459858944762533958798805525125", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 381.8801248632926870394389468349331394196, "381.8801248632926870394389468349331394196", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415763426076722427007, "2.506628274631000502415763426076722427007", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[13] = { + static_cast(boost::math::tools::make_big_value( 86091529.53418537217994842267760536134841, "86091529.53418537217994842267760536134841", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 81354505.17858011242874285785316135398567, "81354505.17858011242874285785316135398567", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 35236626.38815461910817650960734605416521, "35236626.38815461910817650960734605416521", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9249814.988024471294683815872977672237195, "9249814.988024471294683815872977672237195", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1639024.216687146960253839656643518985826, "1639024.216687146960253839656643518985826", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 206530.8157641225032631778026076868855623, "206530.8157641225032631778026076868855623", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 18976.70193530288915698282139308582105936, "18976.70193530288915698282139308582105936", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1281.068909912559479885759622791374106059, "1281.068909912559479885759622791374106059", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 63.06093343420234536146194868906771599354, "63.06093343420234536146194868906771599354", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.207470909792527638222674678171050209691, "2.207470909792527638222674678171050209691", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.05216058694613505427476207805814960742102, "0.05216058694613505427476207805814960742102", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0007469903808915448316510079585999893674101, "0.0007469903808915448316510079585999893674101", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.4903180573459871862552197089738373164184e-5, "0.4903180573459871862552197089738373164184e-5", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[12] = { + static_cast(boost::math::tools::make_big_value( 4.832115561461656947793029596285626840312, "4.832115561461656947793029596285626840312", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -19.86441536140337740383120735104359034688, "-19.86441536140337740383120735104359034688", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 33.9927422807443239927197864963170585331, "33.9927422807443239927197864963170585331", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -31.41520692249765980987427413991250886138, "-31.41520692249765980987427413991250886138", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 17.0270866009599345679868972409543597821, "17.0270866009599345679868972409543597821", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.5077216950865501362506920516723682167, "-5.5077216950865501362506920516723682167", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.037811741948214855286817963800439373362, "1.037811741948214855286817963800439373362", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.106640468537356182313660880481398642811, "-0.106640468537356182313660880481398642811", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.005276450526660653288757565778182586742831, "0.005276450526660653288757565778182586742831", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.0001000935625597121545867453746252064770029, "-0.0001000935625597121545867453746252064770029", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.462590910138598083940803704521211569234e-6, "0.462590910138598083940803704521211569234e-6", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1735307814426389420248044907765671743012e-9, "-0.1735307814426389420248044907765671743012e-9", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[12] = { + static_cast(boost::math::tools::make_big_value( 26.96979819614830698367887026728396466395, "26.96979819614830698367887026728396466395", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -110.8705424709385114023884328797900204863, "-110.8705424709385114023884328797900204863", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 189.7258846119231466417015694690434770085, "189.7258846119231466417015694690434770085", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -175.3397202971107486383321670769397356553, "-175.3397202971107486383321670769397356553", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 95.03437648691551457087250340903980824948, "95.03437648691551457087250340903980824948", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -30.7406022781665264273675797983497141978, "-30.7406022781665264273675797983497141978", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.792405601630517993355102578874590410552, "5.792405601630517993355102578874590410552", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.5951993240669148697377539518639997795831, "-0.5951993240669148697377539518639997795831", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.02944979359164017509944724739946255067671, "0.02944979359164017509944724739946255067671", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.0005586586555377030921194246330399163602684, "-0.0005586586555377030921194246330399163602684", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2581888478270733025288922038673392636029e-5, "0.2581888478270733025288922038673392636029e-5", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.9685385411006641478305219367315965391289e-9, "-0.9685385411006641478305219367315965391289e-9", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 13.1445650000000000545696821063756942749; } +}; + + + + + + +struct lanczos6m24 : public std::integral_constant +{ + + + + template + static T lanczos_sum(const T& z) + { + static const T num[6] = { + static_cast(58.52061591769095910314047740215847630266L), + static_cast(182.5248962595894264831189414768236280862L), + static_cast(211.0971093028510041839168287718170827259L), + static_cast(112.2526547883668146736465390902227161763L), + static_cast(27.5192015197455403062503721613097825345L), + static_cast(2.50662858515256974113978724717473206342L) + }; + static const std::uint16_t denom[6] = { + static_cast(0u), + static_cast(24u), + static_cast(50u), + static_cast(35u), + static_cast(10u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[6] = { + static_cast(14.0261432874996476619570577285003839357L), + static_cast(43.74732405540314316089531289293124360129L), + static_cast(50.59547402616588964511581430025589038612L), + static_cast(26.90456680562548195593733429204228910299L), + static_cast(6.595765571169314946316366571954421695196L), + static_cast(0.6007854010515290065101128585795542383721L) + }; + static const std::uint16_t denom[6] = { + static_cast(0u), + static_cast(24u), + static_cast(50u), + static_cast(35u), + static_cast(10u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[5] = { + static_cast(0.4922488055204602807654354732674868442106L), + static_cast(0.004954497451132152436631238060933905650346L), + static_cast(-0.003374784572167105840686977985330859371848L), + static_cast(0.001924276018962061937026396537786414831385L), + static_cast(-0.00056533046336427583708166383712907694434L), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[5] = { + static_cast(0.6534966888520080645505805298901130485464L), + static_cast(0.006577461728560758362509168026049182707101L), + static_cast(-0.004480276069269967207178373559014835978161L), + static_cast(0.00255461870648818292376982818026706528842L), + static_cast(-0.000750517993690428370380996157470900204524L), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 1.428456135094165802001953125; } +}; + + + + + + +struct lanczos13m53 : public std::integral_constant +{ + + + + template + static T lanczos_sum(const T& z) + { + static const T num[13] = { + static_cast(23531376880.41075968857200767445163675473L), + static_cast(42919803642.64909876895789904700198885093L), + static_cast(35711959237.35566804944018545154716670596L), + static_cast(17921034426.03720969991975575445893111267L), + static_cast(6039542586.35202800506429164430729792107L), + static_cast(1439720407.311721673663223072794912393972L), + static_cast(248874557.8620541565114603864132294232163L), + static_cast(31426415.58540019438061423162831820536287L), + static_cast(2876370.628935372441225409051620849613599L), + static_cast(186056.2653952234950402949897160456992822L), + static_cast(8071.672002365816210638002902272250613822L), + static_cast(210.8242777515793458725097339207133627117L), + static_cast(2.506628274631000270164908177133837338626L) + }; + static const std::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[13] = { + static_cast(56906521.91347156388090791033559122686859L), + static_cast(103794043.1163445451906271053616070238554L), + static_cast(86363131.28813859145546927288977868422342L), + static_cast(43338889.32467613834773723740590533316085L), + static_cast(14605578.08768506808414169982791359218571L), + static_cast(3481712.15498064590882071018964774556468L), + static_cast(601859.6171681098786670226533699352302507L), + static_cast(75999.29304014542649875303443598909137092L), + static_cast(6955.999602515376140356310115515198987526L), + static_cast(449.9445569063168119446858607650988409623L), + static_cast(19.51992788247617482847860966235652136208L), + static_cast(0.5098416655656676188125178644804694509993L), + static_cast(0.006061842346248906525783753964555936883222L) + }; + static const std::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[12] = { + static_cast(2.208709979316623790862569924861841433016L), + static_cast(-3.327150580651624233553677113928873034916L), + static_cast(1.483082862367253753040442933770164111678L), + static_cast(-0.1993758927614728757314233026257810172008L), + static_cast(0.004785200610085071473880915854204301886437L), + static_cast(-0.1515973019871092388943437623825208095123e-5L), + static_cast(-0.2752907702903126466004207345038327818713e-7L), + static_cast(0.3075580174791348492737947340039992829546e-7L), + static_cast(-0.1933117898880828348692541394841204288047e-7L), + static_cast(0.8690926181038057039526127422002498960172e-8L), + static_cast(-0.2499505151487868335680273909354071938387e-8L), + static_cast(0.3394643171893132535170101292240837927725e-9L), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[12] = { + static_cast(6.565936202082889535528455955485877361223L), + static_cast(-9.8907772644920670589288081640128194231L), + static_cast(4.408830289125943377923077727900630927902L), + static_cast(-0.5926941084905061794445733628891024027949L), + static_cast(0.01422519127192419234315002746252160965831L), + static_cast(-0.4506604409707170077136555010018549819192e-5L), + static_cast(-0.8183698410724358930823737982119474130069e-7L), + static_cast(0.9142922068165324132060550591210267992072e-7L), + static_cast(-0.5746670642147041587497159649318454348117e-7L), + static_cast(0.2583592566524439230844378948704262291927e-7L), + static_cast(-0.7430396708998719707642735577238449585822e-8L), + static_cast(0.1009141566987569892221439918230042368112e-8L), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 6.024680040776729583740234375; } +}; + + + + + + +struct lanczos17m64 : public std::integral_constant +{ + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[17] = { + static_cast(boost::math::tools::make_big_value( 553681095419291969.2230556393350368550504, "553681095419291969.2230556393350368550504", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 731918863887667017.2511276782146694632234, "731918863887667017.2511276782146694632234", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 453393234285807339.4627124634539085143364, "453393234285807339.4627124634539085143364", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 174701893724452790.3546219631779712198035, "174701893724452790.3546219631779712198035", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 46866125995234723.82897281620357050883077, "46866125995234723.82897281620357050883077", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9281280675933215.169109622777099699054272, "9281280675933215.169109622777099699054272", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1403600894156674.551057997617468721789536, "1403600894156674.551057997617468721789536", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 165345984157572.7305349809894046783973837, "165345984157572.7305349809894046783973837", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 15333629842677.31531822808737907246817024, "15333629842677.31531822808737907246817024", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1123152927963.956626161137169462874517318, "1123152927963.956626161137169462874517318", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 64763127437.92329018717775593533620578237, "64763127437.92329018717775593533620578237", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2908830362.657527782848828237106640944457, "2908830362.657527782848828237106640944457", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 99764700.56999856729959383751710026787811, "99764700.56999856729959383751710026787811", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2525791.604886139959837791244686290089331, "2525791.604886139959837791244686290089331", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 44516.94034970167828580039370201346554872, "44516.94034970167828580039370201346554872", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 488.0063567520005730476791712814838113252, "488.0063567520005730476791712814838113252", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.50662827463100050241576877135758834683, "2.50662827463100050241576877135758834683", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint64_t denom[17] = { + 0uLL, + 1307674368000uLL, + 4339163001600uLL, + 6165817614720uLL, + 5056995703824uLL, + 2706813345600uLL, + 1009672107080uLL, + 272803210680uLL, + 54631129553uLL, + 8207628000uLL, + 928095740uLL, + 78558480uLL, + 4899622uLL, + 218400uLL, + 6580uLL, + 120uLL, + 1uLL + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[17] = { + static_cast(boost::math::tools::make_big_value( 2715894658327.717377557655133124376674911, "2715894658327.717377557655133124376674911", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3590179526097.912105038525528721129550434, "3590179526097.912105038525528721129550434", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2223966599737.814969312127353235818710172, "2223966599737.814969312127353235818710172", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 856940834518.9562481809925866825485883417, "856940834518.9562481809925866825485883417", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 229885871668.749072933597446453399395469, "229885871668.749072933597446453399395469", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 45526171687.54610815813502794395753410032, "45526171687.54610815813502794395753410032", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6884887713.165178784550917647709216424823, "6884887713.165178784550917647709216424823", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 811048596.1407531864760282453852372777439, "811048596.1407531864760282453852372777439", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 75213915.96540822314499613623119501704812, "75213915.96540822314499613623119501704812", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5509245.417224265151697527957954952830126, "5509245.417224265151697527957954952830126", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 317673.5368435419126714931842182369574221, "317673.5368435419126714931842182369574221", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 14268.27989845035520147014373320337523596, "14268.27989845035520147014373320337523596", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 489.3618720403263670213909083601787814792, "489.3618720403263670213909083601787814792", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12.38941330038454449295883217865458609584, "12.38941330038454449295883217865458609584", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2183627389504614963941574507281683147897, "0.2183627389504614963941574507281683147897", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.002393749522058449186690627996063983095463, "0.002393749522058449186690627996063983095463", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.1229541408909435212800785616808830746135e-4, "0.1229541408909435212800785616808830746135e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint64_t denom[17] = { + 0uLL, + 1307674368000uLL, + 4339163001600uLL, + 6165817614720uLL, + 5056995703824uLL, + 2706813345600uLL, + 1009672107080uLL, + 272803210680uLL, + 54631129553uLL, + 8207628000uLL, + 928095740uLL, + 78558480uLL, + 4899622uLL, + 218400uLL, + 6580uLL, + 120uLL, + 1uLL + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[16] = { + static_cast(boost::math::tools::make_big_value( 4.493645054286536365763334986866616581265, "4.493645054286536365763334986866616581265", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -16.95716370392468543800733966378143997694, "-16.95716370392468543800733966378143997694", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 26.19196892983737527836811770970479846644, "26.19196892983737527836811770970479846644", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -21.3659076437988814488356323758179283908, "-21.3659076437988814488356323758179283908", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.913992596774556590710751047594507535764, "9.913992596774556590710751047594507535764", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.62888300018780199210536267080940382158, "-2.62888300018780199210536267080940382158", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.3807056693542503606384861890663080735588, "0.3807056693542503606384861890663080735588", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.02714647489697685807340312061034730486958, "-0.02714647489697685807340312061034730486958", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0007815484715461206757220527133967191796747, "0.0007815484715461206757220527133967191796747", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.6108630817371501052576880554048972272435e-5, "-0.6108630817371501052576880554048972272435e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.5037380238864836824167713635482801545086e-8, "0.5037380238864836824167713635482801545086e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1483232144262638814568926925964858237006e-13, "-0.1483232144262638814568926925964858237006e-13", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.1346609158752142460943888149156716841693e-14, "0.1346609158752142460943888149156716841693e-14", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.660492688923978805315914918995410340796e-15, "-0.660492688923978805315914918995410340796e-15", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.1472114697343266749193617793755763792681e-15, "0.1472114697343266749193617793755763792681e-15", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1410901942033374651613542904678399264447e-16, "-0.1410901942033374651613542904678399264447e-16", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[16] = { + static_cast(boost::math::tools::make_big_value( 23.56409085052261327114594781581930373708, "23.56409085052261327114594781581930373708", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -88.92116338946308797946237246006238652361, "-88.92116338946308797946237246006238652361", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 137.3472822086847596961177383569603988797, "137.3472822086847596961177383569603988797", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -112.0400438263562152489272966461114852861, "-112.0400438263562152489272966461114852861", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 51.98768915202973863076166956576777843805, "51.98768915202973863076166956576777843805", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -13.78552090862799358221343319574970124948, "-13.78552090862799358221343319574970124948", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.996371068830872830250406773917646121742, "1.996371068830872830250406773917646121742", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1423525874909934506274738563671862576161, "-0.1423525874909934506274738563671862576161", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.004098338646046865122459664947239111298524, "0.004098338646046865122459664947239111298524", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.3203286637326511000882086573060433529094e-4, "-0.3203286637326511000882086573060433529094e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2641536751640138646146395939004587594407e-7, "0.2641536751640138646146395939004587594407e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.7777876663062235617693516558976641009819e-13, "-0.7777876663062235617693516558976641009819e-13", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.7061443477097101636871806229515157914789e-14, "0.7061443477097101636871806229515157914789e-14", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.3463537849537988455590834887691613484813e-14, "-0.3463537849537988455590834887691613484813e-14", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.7719578215795234036320348283011129450595e-15, "0.7719578215795234036320348283011129450595e-15", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.7398586479708476329563577384044188912075e-16, "-0.7398586479708476329563577384044188912075e-16", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 12.2252227365970611572265625; } +}; + + + + + + +struct lanczos24m113 : public std::integral_constant +{ + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[24] = { + static_cast(boost::math::tools::make_big_value( 2029889364934367661624137213253.22102954656825019111612712252027267955023987678816620961507, "2029889364934367661624137213253.22102954656825019111612712252027267955023987678816620961507", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2338599599286656537526273232565.2727349714338768161421882478417543004440597874814359063158, "2338599599286656537526273232565.2727349714338768161421882478417543004440597874814359063158", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1288527989493833400335117708406.3953711906175960449186720680201425446299360322830739180195, "1288527989493833400335117708406.3953711906175960449186720680201425446299360322830739180195", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 451779745834728745064649902914.550539158066332484594436145043388809847364393288132164411521, "451779745834728745064649902914.550539158066332484594436145043388809847364393288132164411521", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 113141284461097964029239556815.291212318665536114012605167994061291631013303788706545334708, "113141284461097964029239556815.291212318665536114012605167994061291631013303788706545334708", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 21533689802794625866812941616.7509064680880468667055339259146063256555368135236149614592432, "21533689802794625866812941616.7509064680880468667055339259146063256555368135236149614592432", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3235510315314840089932120340.71494940111731241353655381919722177496659303550321056514776757, "3235510315314840089932120340.71494940111731241353655381919722177496659303550321056514776757", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 393537392344185475704891959.081297108513472083749083165179784098220158201055270548272414314, "393537392344185475704891959.081297108513472083749083165179784098220158201055270548272414314", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 39418265082950435024868801.5005452240816902251477336582325944930252142622315101857742955673, "39418265082950435024868801.5005452240816902251477336582325944930252142622315101857742955673", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3290158764187118871697791.05850632319194734270969161036889516414516566453884272345518372696, "3290158764187118871697791.05850632319194734270969161036889516414516566453884272345518372696", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 230677110449632078321772.618245845856640677845629174549731890660612368500786684333975350954, "230677110449632078321772.618245845856640677845629174549731890660612368500786684333975350954", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 13652233645509183190158.5916189185218250859402806777406323001463296297553612462737044693697, "13652233645509183190158.5916189185218250859402806777406323001463296297553612462737044693697", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 683661466754325350495.216655026531202476397782296585200982429378069417193575896602446904762, "683661466754325350495.216655026531202476397782296585200982429378069417193575896602446904762", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 28967871782219334117.0122379171041074970463982134039409352925258212207710168851968215545064, "28967871782219334117.0122379171041074970463982134039409352925258212207710168851968215545064", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1036104088560167006.2022834098572346459442601718514554488352117620272232373622553429728555, "1036104088560167006.2022834098572346459442601718514554488352117620272232373622553429728555", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 31128490785613152.8380102669349814751268126141105475287632676569913936040772990253369753962, "31128490785613152.8380102669349814751268126141105475287632676569913936040772990253369753962", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 779327504127342.536207878988196814811198475410572992436243686674896894543126229424358472541, "779327504127342.536207878988196814811198475410572992436243686674896894543126229424358472541", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 16067543181294.643350688789124777020407337133926174150582333950666044399234540521336771876, "16067543181294.643350688789124777020407337133926174150582333950666044399234540521336771876", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 268161795520.300916569439413185778557212729611517883948634711190170998896514639936969855484, "268161795520.300916569439413185778557212729611517883948634711190170998896514639936969855484", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3533216359.10528191668842486732408440112703691790824611391987708562111396961696753452085068, "3533216359.10528191668842486732408440112703691790824611391987708562111396961696753452085068", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 35378979.5479656110614685178752543826919239614088343789329169535932709470588426584501652577, "35378979.5479656110614685178752543826919239614088343789329169535932709470588426584501652577", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 253034.881362204346444503097491737872930637147096453940375713745904094735506180552724766444, "253034.881362204346444503097491737872930637147096453940375713745904094735506180552724766444", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1151.61895453463992438325318456328526085882924197763140514450975619271382783957699017875304, "1151.61895453463992438325318456328526085882924197763140514450975619271382783957699017875304", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.50662827463100050241576528481104515966515623051532908941425544355490413900497467936202516, "2.50662827463100050241576528481104515966515623051532908941425544355490413900497467936202516", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[24] = { + static_cast(boost::math::tools::make_big_value( 0.0, "0.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.112400072777760768e22, "0.112400072777760768e22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.414847677933545472e22, "0.414847677933545472e22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6756146673770930688000.0, "6756146673770930688000.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6548684852703068697600.0, "6548684852703068697600.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4280722865357147142912.0, "4280722865357147142912.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2021687376910682741568.0, "2021687376910682741568.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 720308216440924653696.0, "720308216440924653696.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 199321978221066137360.0, "199321978221066137360.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 43714229649594412832.0, "43714229649594412832.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7707401101297361068.0, "7707401101297361068.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1103230881185949736.0, "1103230881185949736.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 129006659818331295.0, "129006659818331295.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12363045847086207.0, "12363045847086207.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 971250460939913.0, "971250460939913.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 62382416421941.0, "62382416421941.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3256091103430.0, "3256091103430.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 136717357942.0, "136717357942.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4546047198.0, "4546047198.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 116896626.0, "116896626.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2240315.0, "2240315.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 30107.0, "30107.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 253.0, "253.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[24] = { + static_cast(boost::math::tools::make_big_value( 3035162425359883494754.02878223286972654682199012688209026810841953293372712802258398358538, "3035162425359883494754.02878223286972654682199012688209026810841953293372712802258398358538", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3496756894406430103600.16057175075063458536101374170860226963245118484234495645518505519827, "3496756894406430103600.16057175075063458536101374170860226963245118484234495645518505519827", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1926652656689320888654.01954015145958293168365236755537645929361841917596501251362171653478, "1926652656689320888654.01954015145958293168365236755537645929361841917596501251362171653478", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 675517066488272766316.083023742440619929434602223726894748181327187670231286180156444871912, "675517066488272766316.083023742440619929434602223726894748181327187670231286180156444871912", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 169172853104918752780.086262749564831660238912144573032141700464995906149421555926000038492, "169172853104918752780.086262749564831660238912144573032141700464995906149421555926000038492", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 32197935167225605785.6444116302160245528783954573163541751756353183343357329404208062043808, "32197935167225605785.6444116302160245528783954573163541751756353183343357329404208062043808", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4837849542714083249.37587447454818124327561966323276633775195138872820542242539845253171632, "4837849542714083249.37587447454818124327561966323276633775195138872820542242539845253171632", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 588431038090493242.308438203986649553459461798968819276505178004064031201740043314534404158, "588431038090493242.308438203986649553459461798968819276505178004064031201740043314534404158", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 58939585141634058.6206417889192563007809470547755357240808035714047014324843817783741669733, "58939585141634058.6206417889192563007809470547755357240808035714047014324843817783741669733", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4919561837722192.82991866530802080996138070630296720420704876654726991998309206256077395868, "4919561837722192.82991866530802080996138070630296720420704876654726991998309206256077395868", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 344916580244240.407442753122831512004021081677987651622305356145640394384006997569631719101, "344916580244240.407442753122831512004021081677987651622305356145640394384006997569631719101", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 20413302960687.8250598845969238472629322716685686993835561234733641729957841485003560103066, "20413302960687.8250598845969238472629322716685686993835561234733641729957841485003560103066", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1022234822943.78400752460970689311934727763870970686747383486600540378889311406851534545789, "1022234822943.78400752460970689311934727763870970686747383486600540378889311406851534545789", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 43313787191.9821354846952908076307094286897439975815501673706144217246093900159173598852503, "43313787191.9821354846952908076307094286897439975815501673706144217246093900159173598852503", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1549219505.59667418528481770869280437577581951167003505825834192510436144666564648361001914, "1549219505.59667418528481770869280437577581951167003505825834192510436144666564648361001914", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 46544421.1998761919380541579358096705925369145324466147390364674998568485110045455014967149, "46544421.1998761919380541579358096705925369145324466147390364674998568485110045455014967149", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1165278.06807504975090675074910052763026564833951579556132777702952882101173607903881127542, "1165278.06807504975090675074910052763026564833951579556132777702952882101173607903881127542", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 24024.759267256769471083727721827405338569868270177779485912486668586611981795179894572115, "24024.759267256769471083727721827405338569868270177779485912486668586611981795179894572115", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 400.965008113421955824358063769761286758463521789765880962939528760888853281920872064838918, "400.965008113421955824358063769761286758463521789765880962939528760888853281920872064838918", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.28299015654478269617039029170846385138134929147421558771949982217659507918482272439717603, "5.28299015654478269617039029170846385138134929147421558771949982217659507918482272439717603", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0528999024412510102409256676599360516359062802002483877724963720047531347449011629466149805, "0.0528999024412510102409256676599360516359062802002483877724963720047531347449011629466149805", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.000378346710654740685454266569593414561162134092347356968516522170279688139165340746957511115, "0.000378346710654740685454266569593414561162134092347356968516522170279688139165340746957511115", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.172194142179211139195966608011235161516824700287310869949928393345257114743230967204370963e-5, "0.172194142179211139195966608011235161516824700287310869949928393345257114743230967204370963e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.374799931707148855771381263542708435935402853962736029347951399323367765509988401336565436e-8, "0.374799931707148855771381263542708435935402853962736029347951399323367765509988401336565436e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[24] = { + static_cast(boost::math::tools::make_big_value( 0.0, "0.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.112400072777760768e22, "0.112400072777760768e22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.414847677933545472e22, "0.414847677933545472e22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6756146673770930688000.0, "6756146673770930688000.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6548684852703068697600.0, "6548684852703068697600.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4280722865357147142912.0, "4280722865357147142912.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2021687376910682741568.0, "2021687376910682741568.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 720308216440924653696.0, "720308216440924653696.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 199321978221066137360.0, "199321978221066137360.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 43714229649594412832.0, "43714229649594412832.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7707401101297361068.0, "7707401101297361068.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1103230881185949736.0, "1103230881185949736.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 129006659818331295.0, "129006659818331295.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12363045847086207.0, "12363045847086207.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 971250460939913.0, "971250460939913.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 62382416421941.0, "62382416421941.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3256091103430.0, "3256091103430.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 136717357942.0, "136717357942.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4546047198.0, "4546047198.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 116896626.0, "116896626.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2240315.0, "2240315.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 30107.0, "30107.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 253.0, "253.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[23] = { + static_cast(boost::math::tools::make_big_value( 7.4734083002469026177867421609938203388868806387315406134072298925733950040583068760685908, "7.4734083002469026177867421609938203388868806387315406134072298925733950040583068760685908", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -50.4225805042247530267317342133388132970816607563062253708655085754357843064134941138154171, "-50.4225805042247530267317342133388132970816607563062253708655085754357843064134941138154171", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 152.288200621747008570784082624444625293884063492396162110698238568311211546361189979357019, "152.288200621747008570784082624444625293884063492396162110698238568311211546361189979357019", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -271.894959539150384169327513139846971255640842175739337449692360299099322742181325023644769, "-271.894959539150384169327513139846971255640842175739337449692360299099322742181325023644769", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 319.240102980202312307047586791116902719088581839891008532114107693294261542869734803906793, "319.240102980202312307047586791116902719088581839891008532114107693294261542869734803906793", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -259.493144143048088289689500935518073716201741349569864988870534417890269467336454358361499, "-259.493144143048088289689500935518073716201741349569864988870534417890269467336454358361499", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 149.747518319689708813209645403067832020714660918583227716408482877303972685262557460145835, "149.747518319689708813209645403067832020714660918583227716408482877303972685262557460145835", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -61.9261301009341333289187201425188698128684426428003249782448828881580630606817104372760037, "-61.9261301009341333289187201425188698128684426428003249782448828881580630606817104372760037", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 18.3077524177286961563937379403377462608113523887554047531153187277072451294845795496072365, "18.3077524177286961563937379403377462608113523887554047531153187277072451294845795496072365", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.82011322251948043097070160584761236869363471824695092089556195047949392738162970152230254, "-3.82011322251948043097070160584761236869363471824695092089556195047949392738162970152230254", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.549382685505691522516705902336780999493262538301283190963770663549981309645795228539620711, "0.549382685505691522516705902336780999493262538301283190963770663549981309645795228539620711", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.0524814679715180697633723771076668718265358076235229045603747927518423453658004287459638024, "-0.0524814679715180697633723771076668718265358076235229045603747927518423453658004287459638024", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.00315392664003333528534120626687784812050217700942910879712808180705014754163256855643360698, "0.00315392664003333528534120626687784812050217700942910879712808180705014754163256855643360698", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.000110098373127648510519799564665442121339511198561008748083409549601095293123407080388658329, "-0.000110098373127648510519799564665442121339511198561008748083409549601095293123407080388658329", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.19809382866681658224945717689377373458866950897791116315219376038432014207446832310901893e-5, "0.19809382866681658224945717689377373458866950897791116315219376038432014207446832310901893e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.152278977408600291408265615203504153130482270424202400677280558181047344681214058227949755e-7, "-0.152278977408600291408265615203504153130482270424202400677280558181047344681214058227949755e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.364344768076106268872239259083188037615571711218395765792787047015406264051536972018235217e-10, "0.364344768076106268872239259083188037615571711218395765792787047015406264051536972018235217e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.148897510480440424971521542520683536298361220674662555578951242811522959610991621951203526e-13, "-0.148897510480440424971521542520683536298361220674662555578951242811522959610991621951203526e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.261199241161582662426512749820666625442516059622425213340053324061794752786482115387573582e-18, "0.261199241161582662426512749820666625442516059622425213340053324061794752786482115387573582e-18", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.780072664167099103420998436901014795601783313858454665485256897090476089641613851903791529e-24, "-0.780072664167099103420998436901014795601783313858454665485256897090476089641613851903791529e-24", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.303465867587106629530056603454807425512962762653755513440561256044986695349304176849392735e-24, "0.303465867587106629530056603454807425512962762653755513440561256044986695349304176849392735e-24", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.615420597971283870342083342286977366161772327800327789325710571275345878439656918541092056e-25, "-0.615420597971283870342083342286977366161772327800327789325710571275345878439656918541092056e-25", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.499641233843540749369110053005439398774706583601830828776209650445427083113181961630763702e-26, "0.499641233843540749369110053005439398774706583601830828776209650445427083113181961630763702e-26", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[23] = { + static_cast(boost::math::tools::make_big_value( 61.4165001061101455341808888883960361969557848005400286332291451422461117307237198559485365, "61.4165001061101455341808888883960361969557848005400286332291451422461117307237198559485365", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -414.372973678657049667308134761613915623353625332248315105320470271523320700386200587519147, "-414.372973678657049667308134761613915623353625332248315105320470271523320700386200587519147", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1251.50505818554680171298972755376376836161706773644771875668053742215217922228357204561873, "1251.50505818554680171298972755376376836161706773644771875668053742215217922228357204561873", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2234.43389421602399514176336175766511311493214354568097811220122848998413358085613880612158, "-2234.43389421602399514176336175766511311493214354568097811220122848998413358085613880612158", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2623.51647746991904821899989145639147785427273427135380151752779100215839537090464785708684, "2623.51647746991904821899989145639147785427273427135380151752779100215839537090464785708684", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2132.51572435428751962745870184529534443305617818870214348386131243463614597272260797772423, "-2132.51572435428751962745870184529534443305617818870214348386131243463614597272260797772423", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1230.62572059218405766499842067263311220019173335523810725664442147670956427061920234820189, "1230.62572059218405766499842067263311220019173335523810725664442147670956427061920234820189", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -508.90919151163744999377586956023909888833335885805154492270846381061182696305011395981929, "-508.90919151163744999377586956023909888833335885805154492270846381061182696305011395981929", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 150.453184562246579758706538566480316921938628645961177699894388251635886834047343195475395, "150.453184562246579758706538566480316921938628645961177699894388251635886834047343195475395", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -31.3937061525822497422230490071156186113405446381476081565548185848237169870395131828731397, "-31.3937061525822497422230490071156186113405446381476081565548185848237169870395131828731397", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.51482916590287954234936829724231512565732528859217337795452389161322923867318809206313688, "4.51482916590287954234936829724231512565732528859217337795452389161322923867318809206313688", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.431292919341108177524462194102701868233551186625103849565527515201492276412231365776131952, "-0.431292919341108177524462194102701868233551186625103849565527515201492276412231365776131952", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0259189820815586225636729971503340447445001375909094681698918294680345547092233915092128323, "0.0259189820815586225636729971503340447445001375909094681698918294680345547092233915092128323", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.000904788882557558697594884691337532557729219389814315972435534723829065673966567231504429712, "-0.000904788882557558697594884691337532557729219389814315972435534723829065673966567231504429712", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.162793589759218213439218473348810982422449144393340433592232065020562974405674317564164312e-4, "0.162793589759218213439218473348810982422449144393340433592232065020562974405674317564164312e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.125142926178202562426432039899709511761368233479483128438847484617555752948755923647214487e-6, "-0.125142926178202562426432039899709511761368233479483128438847484617555752948755923647214487e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.299418680048132583204152682950097239197934281178261879500770485862852229898797687301941982e-9, "0.299418680048132583204152682950097239197934281178261879500770485862852229898797687301941982e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.122364035267809278675627784883078206654408225276233049012165202996967011873995261617995421e-12, "-0.122364035267809278675627784883078206654408225276233049012165202996967011873995261617995421e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.21465364366598631597052073538883430194257709353929022544344097235100199405814005393447785e-17, "0.21465364366598631597052073538883430194257709353929022544344097235100199405814005393447785e-17", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.641064035802907518396608051803921688237330857546406669209280666066685733941549058513986818e-23, "-0.641064035802907518396608051803921688237330857546406669209280666066685733941549058513986818e-23", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.249388374622173329690271566855185869111237201309011956145463506483151054813346819490278951e-23, "0.249388374622173329690271566855185869111237201309011956145463506483151054813346819490278951e-23", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.505752900177513489906064295001851463338022055787536494321532352380960774349054239257683149e-24, "-0.505752900177513489906064295001851463338022055787536494321532352380960774349054239257683149e-24", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.410605371184590959139968810080063542546949719163227555918846829816144878123034347778284006e-25, "0.410605371184590959139968810080063542546949719163227555918846829816144878123034347778284006e-25", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 20.3209821879863739013671875; } +}; + + + + + + + +struct lanczos27MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[27] = { + static_cast(boost::math::tools::make_big_value( 2.532923291341302819860952064783714673718970e+36, "2.532923291341302819860952064783714673718970e+36", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.715272050979243637524956158081893927075092e+36, "2.715272050979243637524956158081893927075092e+36", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.399396313336459710065708403038293278484916e+36, "1.399396313336459710065708403038293278484916e+36", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.615805213483907585030394968151583590083805e+35, "4.615805213483907585030394968151583590083805e+35", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.094287593119694642121339924355455488336630e+35, "1.094287593119694642121339924355455488336630e+35", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.985179143643083871895846729884916046817583e+34, "1.985179143643083871895846729884916046817583e+34", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.864723387203319421361199873281888626383507e+33, "2.864723387203319421361199873281888626383507e+33", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.374651939493419385833371654981557918551584e+32, "3.374651939493419385833371654981557918551584e+32", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.304504350810987437240912594601486056121725e+31, "3.304504350810987437240912594601486056121725e+31", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.724892917231894382998818728699010291796660e+30, "2.724892917231894382998818728699010291796660e+30", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.909901039551708500588401626148435467434009e+29, "1.909901039551708500588401626148435467434009e+29", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.145381204249362220411918333792713760478856e+28, "1.145381204249362220411918333792713760478856e+28", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.902980366355225260615014098246446681081078e+26, "5.902980366355225260615014098246446681081078e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.620997933261144559370948440813656891792187e+25, "2.620997933261144559370948440813656891792187e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.003441440382636640319535096309665505136930e+24, "1.003441440382636640319535096309665505136930e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.309721390821762354780404195884829522953769e+22, "3.309721390821762354780404195884829522953769e+22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.381514076593540726655991152770953882150136e+20, "9.381514076593540726655991152770953882150136e+20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.275266040978137565809877941293859174071955e+19, "2.275266040978137565809877941293859174071955e+19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.690398430937632687996992361090819887063422e+17, "4.690398430937632687996992361090819887063422e+17", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.142411407304237744553849404860811146407986e+15, "8.142411407304237744553849404860811146407986e+15", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.174971623395676312463521417132401487856454e+14, "1.174971623395676312463521417132401487856454e+14", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.384092119107453943335286646923309490786229e+12, "1.384092119107453943335286646923309490786229e+12", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.296932429990667045419860753608558102709582e+10, "1.296932429990667045419860753608558102709582e+10", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.299378037650538629629318998114044963408825e+07, "9.299378037650538629629318998114044963408825e+07", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.792561328661952922209314899668849919321249e+05, "4.792561328661952922209314899668849919321249e+05", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.580741273679785112052701460119954412080073e+03, "1.580741273679785112052701460119954412080073e+03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415765284811045253005320e+00, "2.506628274631000502415765284811045253005320e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[27] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.551121004333098598400000000000000000000000e+25, "1.551121004333098598400000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.919012881170120359936000000000000000000000e+25, "5.919012881170120359936000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.004801715483511615488000000000000000000000e+26, "1.004801715483511615488000000000000000000000e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.023395306017446756725760000000000000000000e+26, "1.023395306017446756725760000000000000000000e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.087414531983767267719680000000000000000000e+25, "7.087414531983767267719680000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.577035564590760682636262400000000000000000e+25, "3.577035564590760682636262400000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.374646821796792697868000000000000000000000e+25, "1.374646821796792697868000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.144457803247115877036800000000000000000000e+24, "4.144457803247115877036800000000000000000000e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.001369304512841374110000000000000000000000e+24, "1.001369304512841374110000000000000000000000e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.969281004511108202428800000000000000000000e+23, "1.969281004511108202428800000000000000000000e+23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.188201437529851278250000000000000000000000e+22, "3.188201437529851278250000000000000000000000e+22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.284218746244111474800000000000000000000000e+21, "4.284218746244111474800000000000000000000000e+21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.805445587427335451250000000000000000000000e+20, "4.805445587427335451250000000000000000000000e+20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.514594692699448186500000000000000000000000e+19, "4.514594692699448186500000000000000000000000e+19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.557372853474553750000000000000000000000000e+18, "3.557372853474553750000000000000000000000000e+18", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.349615694227860500000000000000000000000000e+17, "2.349615694227860500000000000000000000000000e+17", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.297275331854287500000000000000000000000000e+16, "1.297275331854287500000000000000000000000000e+16", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.956673043671350000000000000000000000000000e+14, "5.956673043671350000000000000000000000000000e+14", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.256393782500000000000000000000000000000000e+13, "2.256393782500000000000000000000000000000000e+13", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.968295763000000000000000000000000000000000e+11, "6.968295763000000000000000000000000000000000e+11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.724710487500000000000000000000000000000000e+10, "1.724710487500000000000000000000000000000000e+10", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.336854950000000000000000000000000000000000e+08, "3.336854950000000000000000000000000000000000e+08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.858750000000000000000000000000000000000000e+06, "4.858750000000000000000000000000000000000000e+06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.005000000000000000000000000000000000000000e+04, "5.005000000000000000000000000000000000000000e+04", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.250000000000000000000000000000000000000000e+02, "3.250000000000000000000000000000000000000000e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[27] = { + static_cast(boost::math::tools::make_big_value( 4.630539114451826442425094380936505531231478e+25, "4.630539114451826442425094380936505531231478e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.963898228350662244301785145431331232866294e+25, "4.963898228350662244301785145431331232866294e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.558292778812387748738731408569861630189290e+25, "2.558292778812387748738731408569861630189290e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.438339470758124934572462000795083198080916e+24, "8.438339470758124934572462000795083198080916e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.000511235267926346573212315280041509763731e+24, "2.000511235267926346573212315280041509763731e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.629185970715063928416526096935558921044815e+23, "3.629185970715063928416526096935558921044815e+23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.237116237146422484431753186953979152997281e+22, "5.237116237146422484431753186953979152997281e+22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.169337167415775727114018906990954798102547e+21, "6.169337167415775727114018906990954798102547e+21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.041097534463262894898495303906833076469281e+20, "6.041097534463262894898495303906833076469281e+20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.981486521549315574859643064948741979243976e+19, "4.981486521549315574859643064948741979243976e+19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.491567035847004398885838650781864506656075e+18, "3.491567035847004398885838650781864506656075e+18", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.093917524216073202169716871304960622121045e+17, "2.093917524216073202169716871304960622121045e+17", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.079147622499629876874169792116583887362096e+16, "1.079147622499629876874169792116583887362096e+16", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.791551915666662583520458128259897770660473e+14, "4.791551915666662583520458128259897770660473e+14", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.834431723470453391466841656396291574724498e+13, "1.834431723470453391466841656396291574724498e+13", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.050635015489291434258728317621551605496937e+11, "6.050635015489291434258728317621551605496937e+11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.715072384266421431637543951156767586591045e+10, "1.715072384266421431637543951156767586591045e+10", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.159505514655385281007353699906486901798470e+08, "4.159505514655385281007353699906486901798470e+08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.574706336771416438731056639147393961539411e+06, "8.574706336771416438731056639147393961539411e+06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.488547033239016552342729952719496931402330e+05, "1.488547033239016552342729952719496931402330e+05", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.148012961586177396403312787979484589898276e+03, "2.148012961586177396403312787979484589898276e+03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.530314564772178162122057449947469958774484e+01, "2.530314564772178162122057449947469958774484e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.370974425637913452858480025228307253546963e-01, "2.370974425637913452858480025228307253546963e-01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.700056764080375263450528442694493496437080e-03, "1.700056764080375263450528442694493496437080e-03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.761474446005270789145652778771406388702068e-06, "8.761474446005270789145652778771406388702068e-06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.889816806780013044430000551700375309307825e-08, "2.889816806780013044430000551700375309307825e-08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.582468135039046226997146555551548992616343e-11, "4.582468135039046226997146555551548992616343e-11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[27] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.551121004333098598400000000000000000000000e+25, "1.551121004333098598400000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.919012881170120359936000000000000000000000e+25, "5.919012881170120359936000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.004801715483511615488000000000000000000000e+26, "1.004801715483511615488000000000000000000000e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.023395306017446756725760000000000000000000e+26, "1.023395306017446756725760000000000000000000e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.087414531983767267719680000000000000000000e+25, "7.087414531983767267719680000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.577035564590760682636262400000000000000000e+25, "3.577035564590760682636262400000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.374646821796792697868000000000000000000000e+25, "1.374646821796792697868000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.144457803247115877036800000000000000000000e+24, "4.144457803247115877036800000000000000000000e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.001369304512841374110000000000000000000000e+24, "1.001369304512841374110000000000000000000000e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.969281004511108202428800000000000000000000e+23, "1.969281004511108202428800000000000000000000e+23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.188201437529851278250000000000000000000000e+22, "3.188201437529851278250000000000000000000000e+22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.284218746244111474800000000000000000000000e+21, "4.284218746244111474800000000000000000000000e+21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.805445587427335451250000000000000000000000e+20, "4.805445587427335451250000000000000000000000e+20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.514594692699448186500000000000000000000000e+19, "4.514594692699448186500000000000000000000000e+19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.557372853474553750000000000000000000000000e+18, "3.557372853474553750000000000000000000000000e+18", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.349615694227860500000000000000000000000000e+17, "2.349615694227860500000000000000000000000000e+17", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.297275331854287500000000000000000000000000e+16, "1.297275331854287500000000000000000000000000e+16", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.956673043671350000000000000000000000000000e+14, "5.956673043671350000000000000000000000000000e+14", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.256393782500000000000000000000000000000000e+13, "2.256393782500000000000000000000000000000000e+13", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.968295763000000000000000000000000000000000e+11, "6.968295763000000000000000000000000000000000e+11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.724710487500000000000000000000000000000000e+10, "1.724710487500000000000000000000000000000000e+10", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.336854950000000000000000000000000000000000e+08, "3.336854950000000000000000000000000000000000e+08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.858750000000000000000000000000000000000000e+06, "4.858750000000000000000000000000000000000000e+06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.005000000000000000000000000000000000000000e+04, "5.005000000000000000000000000000000000000000e+04", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.250000000000000000000000000000000000000000e+02, "3.250000000000000000000000000000000000000000e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[34] = { + static_cast(boost::math::tools::make_big_value( 6.264579889722939745225908247624593169040293e+00, "6.264579889722939745225908247624593169040293e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.470545597111704235784909052092266897169254e+01, "-3.470545597111704235784909052092266897169254e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.398164226943527197542310295220360303173237e+01, "8.398164226943527197542310295220360303173237e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.166490739555248669771075340695671987349622e+02, "-1.166490739555248669771075340695671987349622e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.028101937812836112448434230485371426845812e+02, "1.028101937812836112448434230485371426845812e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.003050880354706854567842055875605768028585e+01, "-6.003050880354706854567842055875605768028585e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.355206767355338215012383892758889890708805e+01, "2.355206767355338215012383892758889890708805e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.173166763225116428638036856999036700963277e+00, "-6.173166763225116428638036856999036700963277e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.055748115088123667349396984075505516234940e+00, "1.055748115088123667349396984075505516234940e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.127784364612243323022358484127515048080935e-01, "-1.127784364612243323022358484127515048080935e-01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.013011055366411613813518259345336997226641e-03, "7.013011055366411613813518259345336997226641e-03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.271137289000937686705998821090835222190159e-04, "-2.271137289000937686705998821090835222190159e-04", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.195172534910278451113805217678979457290834e-06, "3.195172534910278451113805217678979457290834e-06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.421890451863814077221239932785029648679973e-08, "-1.421890451863814077221239932785029648679973e-08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.066311611137421591999312557597869716741027e-11, "1.066311611137421591999312557597869716741027e-11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.797948012646761974584234409950319937184538e-16, "-2.797948012646761974584234409950319937184538e-16", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.274002995605577985657965320478056380380290e-22, "-5.274002995605577985657965320478056380380290e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.270091452696164640108774677242731307730848e-21, "2.270091452696164640108774677242731307730848e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.933040546739252731034872986511694993372995e-21, "-6.933040546739252731034872986511694993372995e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.405071936614348906224568346156522897751303e-20, "1.405071936614348906224568346156522897751303e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.105092450748689398417350156762592106638543e-20, "-2.105092450748689398417350156762592106638543e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.573335807137266819877752062372030042747590e-20, "2.573335807137266819877752062372030042747590e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.690602407074901259448169161354115161602278e-20, "-2.690602407074901259448169161354115161602278e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.445091932555604281164557526008785529455861e-20, "2.445091932555604281164557526008785529455861e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.932804556880430674197633802977544778784320e-20, "-1.932804556880430674197633802977544778784320e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.320001406610629373227596309759263536640140e-20, "1.320001406610629373227596309759263536640140e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.699733918513786660891771237627803608806010e-21, "-7.699733918513786660891771237627803608806010e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.776870859236169815307382842451635095251495e-21, "3.776870859236169815307382842451635095251495e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.526154769745297076196084765279504608995696e-21, "-1.526154769745297076196084765279504608995696e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.939458578626915680695594094484224178207306e-22, "4.939458578626915680695594094484224178207306e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.229538969055131478930409285699348366508295e-22, "-1.229538969055131478930409285699348366508295e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.207569067702627873429089508800955397620386e-23, "2.207569067702627873429089508800955397620386e-23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.542428477414786133402832964643707382175743e-24, "-2.542428477414786133402832964643707382175743e-24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.409458057545117569935733339065832415295665e-25, "1.409458057545117569935733339065832415295665e-25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[34] = { + static_cast(boost::math::tools::make_big_value( 4.391991857844535020743473289228849738381662e+01, "4.391991857844535020743473289228849738381662e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.433141291692735004291785549611375831426138e+02, "-2.433141291692735004291785549611375831426138e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.887812040849956173864447000497922705559488e+02, "5.887812040849956173864447000497922705559488e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.178070869177285054991117755136346786974125e+02, "-8.178070869177285054991117755136346786974125e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.207850198088647199855281811058606257270817e+02, "7.207850198088647199855281811058606257270817e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.208638257131458956367681504789416772705762e+02, "-4.208638257131458956367681504789416772705762e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.651195950543217389263490876246883903526458e+02, "1.651195950543217389263490876246883903526458e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.327903648523876358512872196882929451369963e+01, "-4.327903648523876358512872196882929451369963e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.401672908678997114468388150043974540095678e+00, "7.401672908678997114468388150043974540095678e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.906706968342945744899907670199667000072243e-01, "-7.906706968342945744899907670199667000072243e-01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.916704391410548803397953511596928808893685e-02, "4.916704391410548803397953511596928808893685e-02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.592256249729202493268939584019491192080080e-03, "-1.592256249729202493268939584019491192080080e-03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.240081857804364904696255913500139170039349e-05, "2.240081857804364904696255913500139170039349e-05", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.968635402954290441376528527568797927543768e-08, "-9.968635402954290441376528527568797927543768e-08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.475731807209447934074840206826861054997914e-11, "7.475731807209447934074840206826861054997914e-11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.961594409606987475034042150632670295904917e-15, "-1.961594409606987475034042150632670295904917e-15", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.697515016601028609216707527257479621172555e-21, "-3.697515016601028609216707527257479621172555e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.591523031442252914289458638424672100510104e-20, "1.591523031442252914289458638424672100510104e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.860638409502590149748648713304503849363893e-20, "-4.860638409502590149748648713304503849363893e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.850723614235842081434077716825371111986246e-20, "9.850723614235842081434077716825371111986246e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.475844999417373489569601576817086030522522e-19, "-1.475844999417373489569601576817086030522522e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.804122560714365990744061859839148408328067e-19, "1.804122560714365990744061859839148408328067e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.886336206511766947905039498619940334834436e-19, "-1.886336206511766947905039498619940334834436e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.714212931833249115161397417081604581762608e-19, "1.714212931833249115161397417081604581762608e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.355056847554880232469037060291577918972607e-19, "-1.355056847554880232469037060291577918972607e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.254308400931922182743462783124793743058980e-20, "9.254308400931922182743462783124793743058980e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.398154269396277345367516583851274647578103e-20, "-5.398154269396277345367516583851274647578103e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.647900793652290520419156346839352858087685e-20, "2.647900793652290520419156346839352858087685e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.069961504286664892352397126472100106281531e-20, "-1.069961504286664892352397126472100106281531e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.462971538614891132079878533424998572755101e-21, "3.462971538614891132079878533424998572755101e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.620091428399885297009840750915836982112365e-22, "-8.620091428399885297009840750915836982112365e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.547689636281132331592940788973245529484744e-22, "1.547689636281132331592940788973245529484744e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.782453950387991004107321678322483537333246e-23, "-1.782453950387991004107321678322483537333246e-23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.881473972208065873607436095608077625677024e-25, "9.881473972208065873607436095608077625677024e-25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 2.472513680905104038743047567550092935562134e+01; } +}; + +inline double lanczos_g_near_1_and_2(const lanczos27MP&) +{ + return 17.03623256087303; +} + + + + + + + +struct lanczos35MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[35] = { + static_cast(boost::math::tools::make_big_value( 2.17215050716253100021302249837728942659410271586236104e+50, "2.17215050716253100021302249837728942659410271586236104e+50", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.51055117651708470336913962553466820524801246971658127e+50, "2.51055117651708470336913962553466820524801246971658127e+50", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.40813458996718289733677017073036013655624930344397267e+50, "1.40813458996718289733677017073036013655624930344397267e+50", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.10569518324826607478187974291222641098997506635019681e+49, "5.10569518324826607478187974291222641098997506635019681e+49", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.34502197565331471178368569687788687058240547971732391e+49, "1.34502197565331471178368569687788687058240547971732391e+49", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.74311603169690571192608960963509140372217014888512918e+48, "2.74311603169690571192608960963509140372217014888512918e+48", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.50656021978234091874071935392175934984492682009447097e+47, "4.50656021978234091874071935392175934984492682009447097e+47", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.12703102551730381018400796362603958419580969330315139e+46, "6.12703102551730381018400796362603958419580969330315139e+46", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.02844698442195350077632196816248435420923619452768200e+45, "7.02844698442195350077632196816248435420923619452768200e+45", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.90106767379334717236568166816961185224083190775430842e+44, "6.90106767379334717236568166816961185224083190775430842e+44", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.86371531667026447746284883480888667804130713757839681e+43, "5.86371531667026447746284883480888667804130713757839681e+43", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.34808948517797782155274346690360992144536507118093783e+42, "4.34808948517797782155274346690360992144536507118093783e+42", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.83232124439938458545786668616393415008373341980153072e+41, "2.83232124439938458545786668616393415008373341980153072e+41", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.62895707563068512468013948922815298700909218398406635e+40, "1.62895707563068512468013948922815298700909218398406635e+40", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.30384063116420066671650072267242339695473078925159324e+38, "8.30384063116420066671650072267242339695473078925159324e+38", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.76258309689585811716178198120267186946262194080905971e+37, "3.76258309689585811716178198120267186946262194080905971e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.51837231299916455171135124843484994848995300472356341e+36, "1.51837231299916455171135124843484994848995300472356341e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.46324357690180919340289798257560253430931750807924001e+34, "5.46324357690180919340289798257560253430931750807924001e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.75333853376321853646128997503611223620394342435525484e+33, "1.75333853376321853646128997503611223620394342435525484e+33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.01719517877315910652307531002686423847077617217874485e+31, "5.01719517877315910652307531002686423847077617217874485e+31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.27861878894319497853745513558138184450369083409359360e+30, "1.27861878894319497853745513558138184450369083409359360e+30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.89640024726662067702004632718605032785787967237099607e+28, "2.89640024726662067702004632718605032785787967237099607e+28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.81537701811791870172286588846619085013138846074815251e+26, "5.81537701811791870172286588846619085013138846074815251e+26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.03090758312551459302562064161308518889144037164899961e+25, "1.03090758312551459302562064161308518889144037164899961e+25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.60538569869661647274451913615710409703905629234367906e+23, "1.60538569869661647274451913615710409703905629234367906e+23", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.18176163448730621246454091850022844174919234685832508e+21, "2.18176163448730621246454091850022844174919234685832508e+21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.56586635256765282348264053213197702964352373258511008e+19, "2.56586635256765282348264053213197702964352373258511008e+19", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.58289895656990946427745668670352144404744258615044371e+17, "2.58289895656990946427745668670352144404744258615044371e+17", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.19373478903102411154024309088124853938046967389531861e+15, "2.19373478903102411154024309088124853938046967389531861e+15", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.54192605870424877025476980158698548681325282029269310e+13, "1.54192605870424877025476980158698548681325282029269310e+13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.73027427579217615249706012469272147499107562412573337e+10, "8.73027427579217615249706012469272147499107562412573337e+10", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.82675918536460865549992482360500962016208597062710654e+08, "3.82675918536460865549992482360500962016208597062710654e+08", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.21869956201943834772161655315196962519434419814106818e+06, "1.21869956201943834772161655315196962519434419814106818e+06", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.50897418653428667959996348205296461689142907811767371e+03, "2.50897418653428667959996348205296461689142907811767371e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.50662827463100050241576528481104525300698674060984055e+00, "2.50662827463100050241576528481104525300698674060984055e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[35] = { + static_cast(boost::math::tools::make_big_value( 0.00000000000000000000000000000000000000000000000000000e+00, "0.00000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.68331761881188649551819440128000000000000000000000000e+36, "8.68331761881188649551819440128000000000000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.55043336733310191803732770947072000000000000000000000e+37, "3.55043336733310191803732770947072000000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.55728779174162547080350866368102400000000000000000000e+37, "6.55728779174162547080350866368102400000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.37352350419052295388404251629977600000000000000000000e+37, "7.37352350419052295388404251629977600000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.72117566475005542296335706764492800000000000000000000e+37, "5.72117566475005542296335706764492800000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28417720643003773414159612967554252800000000000000000e+37, "3.28417720643003773414159612967554252800000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.45822739485943139719482682477713244160000000000000000e+37, "1.45822739485943139719482682477713244160000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.16476527817201997988283152951021977600000000000000000e+36, "5.16476527817201997988283152951021977600000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.49225481668254064104679479029764121600000000000000000e+36, "1.49225481668254064104679479029764121600000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.57726463942545496998486904826347776000000000000000000e+35, "3.57726463942545496998486904826347776000000000000000000e+35", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.20859297660335343156864734965859840000000000000000000e+34, "7.20859297660335343156864734965859840000000000000000000e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.23364307820330543590375511999050240000000000000000000e+34, "1.23364307820330543590375511999050240000000000000000000e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.80750015058176473779293385245398400000000000000000000e+33, "1.80750015058176473779293385245398400000000000000000000e+33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.28183125026789051815954180232544000000000000000000000e+32, "2.28183125026789051815954180232544000000000000000000000e+32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.49437224233918151570015089338400000000000000000000000e+31, "2.49437224233918151570015089338400000000000000000000000e+31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.37000480501772121324931003824000000000000000000000000e+30, "2.37000480501772121324931003824000000000000000000000000e+30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.96258640868140652967646352465000000000000000000000000e+29, "1.96258640868140652967646352465000000000000000000000000e+29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.41894262447739018035536664650000000000000000000000000e+28, "1.41894262447739018035536664650000000000000000000000000e+28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.96452376168568744680811480000000000000000000000000000e+26, "8.96452376168568744680811480000000000000000000000000000e+26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.94875410890088264440962800000000000000000000000000000e+25, "4.94875410890088264440962800000000000000000000000000000e+25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.38478815149246067334598000000000000000000000000000000e+24, "2.38478815149246067334598000000000000000000000000000000e+24", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.00124085806115519088380000000000000000000000000000000e+23, "1.00124085806115519088380000000000000000000000000000000e+23", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.65117470518809938644000000000000000000000000000000000e+21, "3.65117470518809938644000000000000000000000000000000000e+21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.15145312544238764840000000000000000000000000000000000e+20, "1.15145312544238764840000000000000000000000000000000000e+20", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.12192419709374919000000000000000000000000000000000000e+18, "3.12192419709374919000000000000000000000000000000000000e+18", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.22038661704031100000000000000000000000000000000000000e+16, "7.22038661704031100000000000000000000000000000000000000e+16", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.40979763670090400000000000000000000000000000000000000e+15, "1.40979763670090400000000000000000000000000000000000000e+15", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.29191290647440000000000000000000000000000000000000000e+13, "2.29191290647440000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.04437176604000000000000000000000000000000000000000000e+11, "3.04437176604000000000000000000000000000000000000000000e+11", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.21763644400000000000000000000000000000000000000000000e+09, "3.21763644400000000000000000000000000000000000000000000e+09", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.60169360000000000000000000000000000000000000000000000e+07, "2.60169360000000000000000000000000000000000000000000000e+07", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.51096000000000000000000000000000000000000000000000000e+05, "1.51096000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.61000000000000000000000000000000000000000000000000000e+02, "5.61000000000000000000000000000000000000000000000000000e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.00000000000000000000000000000000000000000000000000000e+00, "1.00000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[35] = { + static_cast(boost::math::tools::make_big_value( 2.84421398435712762388902267099927585742388886580864424e+37, "2.84421398435712762388902267099927585742388886580864424e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28731583799033736725852757551292030085556435695468295e+37, "3.28731583799033736725852757551292030085556435695468295e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.84381150359300352571680869181416248982215282642834936e+37, "1.84381150359300352571680869181416248982215282642834936e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.68539753215772969226355064737523321566208288321687448e+36, "6.68539753215772969226355064737523321566208288321687448e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.76117184320624276162478300964159399462275652881271996e+36, "1.76117184320624276162478300964159399462275652881271996e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.59183627116994441494601110756468114877940946273012852e+35, "3.59183627116994441494601110756468114877940946273012852e+35", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.90089018057779871758440184258134151304912092733579104e+34, "5.90089018057779871758440184258134151304912092733579104e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.02273473587728940068021671629793244969348874651645551e+33, "8.02273473587728940068021671629793244969348874651645551e+33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.20304883823127369598764418881022021049206245678741573e+32, "9.20304883823127369598764418881022021049206245678741573e+32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.03625836242722113759123056762610636251641913153595812e+31, "9.03625836242722113759123056762610636251641913153595812e+31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.67794913334462808923359541498599600753842936204419932e+30, "7.67794913334462808923359541498599600753842936204419932e+30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.69338859264140114791649895977363900871692586779302150e+29, "5.69338859264140114791649895977363900871692586779302150e+29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.70864158121145435408364940074910197916145829346031858e+28, "3.70864158121145435408364940074910197916145829346031858e+28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.13295647753179115743895667847873122731507276407230715e+27, "2.13295647753179115743895667847873122731507276407230715e+27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.08730493440263847356723847541024859440843056640671533e+26, "1.08730493440263847356723847541024859440843056640671533e+26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.92672649809905793239714364398097142490510744815940192e+24, "4.92672649809905793239714364398097142490510744815940192e+24", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.98815678372776973689475889094271298156568135487559824e+23, "1.98815678372776973689475889094271298156568135487559824e+23", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.15357141696015228406471054927723105303656292491717836e+21, "7.15357141696015228406471054927723105303656292491717836e+21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.29582156512528703674984172534752222415664014582498353e+20, "2.29582156512528703674984172534752222415664014582498353e+20", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.56951562180494343732211791410530161839249714612303326e+18, "6.56951562180494343732211791410530161839249714612303326e+18", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.67422350715677024140556410421772283993277946880053914e+17, "1.67422350715677024140556410421772283993277946880053914e+17", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.79254663081905790190270601146772274854974105071798035e+15, "3.79254663081905790190270601146772274854974105071798035e+15", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.61465496276608608941993297108655885737613121720232292e+13, "7.61465496276608608941993297108655885737613121720232292e+13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.34987044168298086318822469739196823360923972361455073e+12, "1.34987044168298086318822469739196823360923972361455073e+12", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.10209211537761991333937729340544738747931371426736883e+10, "2.10209211537761991333937729340544738747931371426736883e+10", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.85679879496413826670691454915567101976631415248412906e+08, "2.85679879496413826670691454915567101976631415248412906e+08", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.35974553231926272707704478737590721340254406209650188e+06, "3.35974553231926272707704478737590721340254406209650188e+06", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.38204802486455055334129565820015244464343854444712513e+04, "3.38204802486455055334129565820015244464343854444712513e+04", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.87247644413155087645140975008088533286977710080244249e+02, "2.87247644413155087645140975008088533286977710080244249e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.01899805954981363917258740277358024893572331522514601e+00, "2.01899805954981363917258740277358024893572331522514601e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.14314215799519834172753514406176454576793263619287700e-02, "1.14314215799519834172753514406176454576793263619287700e-02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.01075867159821346256470334018168931185179114379271616e-05, "5.01075867159821346256470334018168931185179114379271616e-05", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.59576526838074751422330690168945437827562833198707558e-07, "1.59576526838074751422330690168945437827562833198707558e-07", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28525092722679899458094768960179796663588010298597603e-10, "3.28525092722679899458094768960179796663588010298597603e-10", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28217919006153582429216342066702743329957749672852350e-13, "3.28217919006153582429216342066702743329957749672852350e-13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[35] = { + static_cast(boost::math::tools::make_big_value( 0.00000000000000000000000000000000000000000000000000000e+00, "0.00000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.68331761881188649551819440128000000000000000000000000e+36, "8.68331761881188649551819440128000000000000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.55043336733310191803732770947072000000000000000000000e+37, "3.55043336733310191803732770947072000000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.55728779174162547080350866368102400000000000000000000e+37, "6.55728779174162547080350866368102400000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.37352350419052295388404251629977600000000000000000000e+37, "7.37352350419052295388404251629977600000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.72117566475005542296335706764492800000000000000000000e+37, "5.72117566475005542296335706764492800000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28417720643003773414159612967554252800000000000000000e+37, "3.28417720643003773414159612967554252800000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.45822739485943139719482682477713244160000000000000000e+37, "1.45822739485943139719482682477713244160000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.16476527817201997988283152951021977600000000000000000e+36, "5.16476527817201997988283152951021977600000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.49225481668254064104679479029764121600000000000000000e+36, "1.49225481668254064104679479029764121600000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.57726463942545496998486904826347776000000000000000000e+35, "3.57726463942545496998486904826347776000000000000000000e+35", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.20859297660335343156864734965859840000000000000000000e+34, "7.20859297660335343156864734965859840000000000000000000e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.23364307820330543590375511999050240000000000000000000e+34, "1.23364307820330543590375511999050240000000000000000000e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.80750015058176473779293385245398400000000000000000000e+33, "1.80750015058176473779293385245398400000000000000000000e+33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.28183125026789051815954180232544000000000000000000000e+32, "2.28183125026789051815954180232544000000000000000000000e+32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.49437224233918151570015089338400000000000000000000000e+31, "2.49437224233918151570015089338400000000000000000000000e+31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.37000480501772121324931003824000000000000000000000000e+30, "2.37000480501772121324931003824000000000000000000000000e+30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.96258640868140652967646352465000000000000000000000000e+29, "1.96258640868140652967646352465000000000000000000000000e+29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.41894262447739018035536664650000000000000000000000000e+28, "1.41894262447739018035536664650000000000000000000000000e+28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.96452376168568744680811480000000000000000000000000000e+26, "8.96452376168568744680811480000000000000000000000000000e+26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.94875410890088264440962800000000000000000000000000000e+25, "4.94875410890088264440962800000000000000000000000000000e+25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.38478815149246067334598000000000000000000000000000000e+24, "2.38478815149246067334598000000000000000000000000000000e+24", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.00124085806115519088380000000000000000000000000000000e+23, "1.00124085806115519088380000000000000000000000000000000e+23", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.65117470518809938644000000000000000000000000000000000e+21, "3.65117470518809938644000000000000000000000000000000000e+21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.15145312544238764840000000000000000000000000000000000e+20, "1.15145312544238764840000000000000000000000000000000000e+20", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.12192419709374919000000000000000000000000000000000000e+18, "3.12192419709374919000000000000000000000000000000000000e+18", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.22038661704031100000000000000000000000000000000000000e+16, "7.22038661704031100000000000000000000000000000000000000e+16", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.40979763670090400000000000000000000000000000000000000e+15, "1.40979763670090400000000000000000000000000000000000000e+15", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.29191290647440000000000000000000000000000000000000000e+13, "2.29191290647440000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.04437176604000000000000000000000000000000000000000000e+11, "3.04437176604000000000000000000000000000000000000000000e+11", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.21763644400000000000000000000000000000000000000000000e+09, "3.21763644400000000000000000000000000000000000000000000e+09", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.60169360000000000000000000000000000000000000000000000e+07, "2.60169360000000000000000000000000000000000000000000000e+07", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.51096000000000000000000000000000000000000000000000000e+05, "1.51096000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.61000000000000000000000000000000000000000000000000000e+02, "5.61000000000000000000000000000000000000000000000000000e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.00000000000000000000000000000000000000000000000000000e+00, "1.00000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[42] = { + static_cast(boost::math::tools::make_big_value( 8.2258008829795701933757823508857131818190413131511363e+00, "8.2258008829795701933757823508857131818190413131511363e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.1680809698202901664719598422224259984110345848176138e+01, "-6.1680809698202901664719598422224259984110345848176138e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0937956909159916126016144892534179459545368045658870e+02, "2.0937956909159916126016144892534179459545368045658870e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.2570860117223597345299309707009980433696777143916823e+02, "-4.2570860117223597345299309707009980433696777143916823e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7808407045434705509914139521956838552432057817709310e+02, "5.7808407045434705509914139521956838552432057817709310e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.5355182201018147597112724614545263772722036922648575e+02, "-5.5355182201018147597112724614545263772722036922648575e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.8474340895549068665467127190441982794533803160633534e+02, "3.8474340895549068665467127190441982794533803160633534e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9687073432491586288948383529096081854867384409828362e+02, "-1.9687073432491586288948383529096081854867384409828362e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.4457539281218595159502905008069838638140685905208109e+01, "7.4457539281218595159502905008069838638140685905208109e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.0724321926101376768201888687693227423632630755627070e+01, "-2.0724321926101376768201888687693227423632630755627070e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.1941554220476109189863208161993450668341832413951177e+00, "4.1941554220476109189863208161993450668341832413951177e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.0469416499468520752326008902894754184436051369514739e-01, "-6.0469416499468520752326008902894754184436051369514739e-01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.0254471406496505041361077191383344271915106887055424e-02, "6.0254471406496505041361077191383344271915106887055424e-02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.9743975328123868311047848806382369109187457702980947e-03, "-3.9743975328123868311047848806382369109187457702980947e-03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6326975883294075748535457727960259872733702003969396e-04, "1.6326975883294075748535457727960259872733702003969396e-04", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.8276395425975110081829250599527615065306178329307764e-06, "-3.8276395425975110081829250599527615065306178329307764e-06", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.4994926214942760944619799278085799215984014361562132e-08, "4.4994926214942760944619799278085799215984014361562132e-08", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.1685212562684580327244208091708941173130794374261284e-10, "-2.1685212562684580327244208091708941173130794374261284e-10", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0566129445336641178978472923139566421562362783155822e-13, "3.0566129445336641178978472923139566421562362783155822e-13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.6744193557172228303189080097715371728193237070211608e-17, "-6.6744193557172228303189080097715371728193237070211608e-17", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.3116377246238995291497495503598572469502355628188604e-22, "5.3116377246238995291497495503598572469502355628188604e-22", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.7791795131683583370183641939988202673347172514688534e-28, "-2.7791795131683583370183641939988202673347172514688534e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.6372242277604226411817535739257869758194674562641039e-28, "9.6372242277604226411817535739257869758194674562641039e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.7502495488892655715569603094708394381657045801526069e-27, "-2.7502495488892655715569603094708394381657045801526069e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.0501577132014302973783965458067331883116843242885033e-27, "6.0501577132014302973783965458067331883116843242885033e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.0246214059191840597181314245134333087378581123342727e-26, "-1.0246214059191840597181314245134333087378581123342727e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4016071303078853730266134475467378117726380022343630e-26, "1.4016071303078853730266134475467378117726380022343630e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.6214830666337247122639245651193515459936309025504988e-26, "-1.6214830666337247122639245651193515459936309025504988e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6312853482448038567407561706085851388360060108080568e-26, "1.6312853482448038567407561706085851388360060108080568e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.4458785355627609495060506977643541320437284829970271e-26, "-1.4458785355627609495060506977643541320437284829970271e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1331287575394227733315016732552406681866623847709417e-26, "1.1331287575394227733315016732552406681866623847709417e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.8351635033967037250982310034619565150687081453609992e-27, "-7.8351635033967037250982310034619565150687081453609992e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7520885958378593874310858129100278585054737696926701e-27, "4.7520885958378593874310858129100278585054737696926701e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.5058409122183022757924336573867978222207111500077203e-27, "-2.5058409122183022757924336573867978222207111500077203e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1353898614924597482474648262273645405650282912119167e-27, "1.1353898614924597482474648262273645405650282912119167e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.3531153377666279783383214654257629384565834244973196e-28, "-4.3531153377666279783383214654257629384565834244973196e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3839135182642184911017974189326632232475070566724497e-28, "1.3839135182642184911017974189326632232475070566724497e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.5479558181723745255902653783884759401621303982915322e-29, "-3.5479558181723745255902653783884759401621303982915322e-29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.0441825447107352322817077249008075090725287665933142e-30, "7.0441825447107352322817077249008075090725287665933142e-30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.0157887327297754418593987114368959771100770274203800e-30, "-1.0157887327297754418593987114368959771100770274203800e-30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.4607280988529299025458955706898751267120992042268667e-32, "9.4607280988529299025458955706898751267120992042268667e-32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.2702032336418528894772149178970767164510337389404370e-33, "-4.2702032336418528894772149178970767164510337389404370e-33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[42] = { + static_cast(boost::math::tools::make_big_value( 7.3782193657165970743894979068466124765194827248379940e+01, "7.3782193657165970743894979068466124765194827248379940e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.5325256602067816772285455933211570612342576586214891e+02, "-5.5325256602067816772285455933211570612342576586214891e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.8780522570799869937961476290263461833002660531646012e+03, "1.8780522570799869937961476290263461833002660531646012e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.8184384596766268378888212415693303553880671796724735e+03, "-3.8184384596766268378888212415693303553880671796724735e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.1851863962133477520750252664910607723762372771833722e+03, "5.1851863962133477520750252664910607723762372771833722e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.9651417912803026185477059393373316779106801664686922e+03, "-4.9651417912803026185477059393373316779106801664686922e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4509968222802070571038728168526976259879110509473673e+03, "3.4509968222802070571038728168526976259879110509473673e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.7658529366356277958293590921029620586497540226150778e+03, "-1.7658529366356277958293590921029620586497540226150778e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.6785479743985639684438881535624244315638292743993560e+02, "6.6785479743985639684438881535624244315638292743993560e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.8588900406390499925005060563245955316983471925301184e+02, "-1.8588900406390499925005060563245955316983471925301184e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.7619921996662567540276653040387614527561121386327888e+01, "3.7619921996662567540276653040387614527561121386327888e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.4238684621351227134322239416053684476498738936970880e+00, "-5.4238684621351227134322239416053684476498738936970880e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4045887339956612618258661862314001628281850888893694e-01, "5.4045887339956612618258661862314001628281850888893694e-01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.5648780296066214471224136948413423004282323597057130e-02, "-3.5648780296066214471224136948413423004282323597057130e-02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4644654223878248996887367583334112564695286627087816e-03, "1.4644654223878248996887367583334112564695286627087816e-03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.4332418933955508302078477926243914098802666261366678e-05, "-3.4332418933955508302078477926243914098802666261366678e-05", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.0358676398914795323109452992079597262040795201720992e-07, "4.0358676398914795323109452992079597262040795201720992e-07", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9450781456519433542572418782578042705818718277820822e-09, "-1.9450781456519433542572418782578042705818718277820822e-09", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.7416614067965791526251519843473783727166050306987362e-12, "2.7416614067965791526251519843473783727166050306987362e-12", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.9866912469474631311384623900742191091588854047124831e-16, "-5.9866912469474631311384623900742191091588854047124831e-16", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7643298058164570865040068204832109970445542816595386e-21, "4.7643298058164570865040068204832109970445542816595386e-21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.4928145473701388663847838847907869194628008362147191e-27, "-2.4928145473701388663847838847907869194628008362147191e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.6442105079571407791997926495585104881317603986245265e-27, "8.6442105079571407791997926495585104881317603986245265e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.4668655090053572169091092679046557243825245275372519e-26, "-2.4668655090053572169091092679046557243825245275372519e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4267531441890485644063141608998212380717408586417687e-26, "5.4267531441890485644063141608998212380717408586417687e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.1904503977518246823477462773596622658428222241396033e-26, "-9.1904503977518246823477462773596622658428222241396033e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2571863845333234910026102012663485977044671519503762e-25, "1.2571863845333234910026102012663485977044671519503762e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.4544064381831932921238058900083969277495893492892409e-25, "-1.4544064381831932921238058900083969277495893492892409e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4631986986621358205011740516995928067691739105999606e-25, "1.4631986986621358205011740516995928067691739105999606e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.2968960911316058263225162731552440661464077730310616e-25, "-1.2968960911316058263225162731552440661464077730310616e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0163718599154085420173689991270137222141149005433561e-25, "1.0163718599154085420173689991270137222141149005433561e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.0278330240079354003556694314544898753730575016426382e-26, "-7.0278330240079354003556694314544898753730575016426382e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.2624362787531585897289168590458242934350512724487489e-26, "4.2624362787531585897289168590458242934350512724487489e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.2476405895248242769628910185593849817270999749433590e-26, "-2.2476405895248242769628910185593849817270999749433590e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0183999810930941402072961555627198647985838184285745e-26, "1.0183999810930941402072961555627198647985838184285745e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.9045729824028673594421184017022743317479187113896743e-27, "-3.9045729824028673594421184017022743317479187113896743e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2413159115073860802650598534057774896614268826143102e-27, "1.2413159115073860802650598534057774896614268826143102e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.1823766097367740928881247634568036933183255409575449e-28, "-3.1823766097367740928881247634568036933183255409575449e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.3183542619623422719031481991659628332908631907371078e-29, "6.3183542619623422719031481991659628332908631907371078e-29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.1112247985618590949970839428497941653776549519221927e-30, "-9.1112247985618590949970839428497941653776549519221927e-30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.4859004327675283792859615082199609974336399587796249e-31, "8.4859004327675283792859615082199609974336399587796249e-31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.8302040910318742925508017945893539585506545571212821e-32, "-3.8302040910318742925508017945893539585506545571212821e-32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 2.96640371531248092651367187500000000000000000000000000e+01; } +}; + +inline double lanczos_g_near_1_and_2(const lanczos35MP&) +{ + return 22.36563469469547; +} + + + + + + +struct lanczos48MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[48] = { + static_cast(boost::math::tools::make_big_value( 5.761757987425932419978923296640371540367427757167447418730589877e+70, "5.761757987425932419978923296640371540367427757167447418730589877e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.723233313564421930629677035555276136256253817229396631458438691e+70, "8.723233313564421930629677035555276136256253817229396631458438691e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.460052620548943146316510839385235752729444155384745952604400014e+70, "6.460052620548943146316510839385235752729444155384745952604400014e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.118620599704657143233902039524163888476114389296433891234019212e+70, "3.118620599704657143233902039524163888476114389296433891234019212e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.103553323924588863191816202847384353588419783622786374048756587e+70, "1.103553323924588863191816202847384353588419783622786374048756587e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.051624469576894078907076790635986076815810433950937821174281248e+69, "3.051624469576894078907076790635986076815810433950937821174281248e+69", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.865434054315747674202246332480484800778071304068935338977820344e+68, "6.865434054315747674202246332480484800778071304068935338977820344e+68", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.291785980379681713553231795767203835753576510251486784293089714e+68, "1.291785980379681713553231795767203835753576510251486784293089714e+68", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.073927196464385740270105346713079967925505577692095446860826790e+67, "2.073927196464385740270105346713079967925505577692095446860826790e+67", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.884317172328855613403642857232246924724496526520223674336243586e+66, "2.884317172328855613403642857232246924724496526520223674336243586e+66", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.515983058669346491005379681336434957516572863544374020968683717e+65, "3.515983058669346491005379681336434957516572863544374020968683717e+65", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.791988252541273516986153564408477102509671668999707480365384945e+64, "3.791988252541273516986153564408477102509671668999707480365384945e+64", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.645764905652320236264233988360776875326874810201273735655153182e+63, "3.645764905652320236264233988360776875326874810201273735655153182e+63", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.144135487589921315512939394666974184673239886993573956770438389e+62, "3.144135487589921315512939394666974184673239886993573956770438389e+62", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.444700846549614719681016920231266383188819427952261902403138865e+61, "2.444700846549614719681016920231266383188819427952261902403138865e+61", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.721099093953481665535866508692670759355705777392277743203856663e+60, "1.721099093953481665535866508692670759355705777392277743203856663e+60", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.100969797434901880312682514502493221610943693861105392844971160e+59, "1.100969797434901880312682514502493221610943693861105392844971160e+59", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.418121506159806547634040503980950792234471035467217702752406105e+57, "6.418121506159806547634040503980950792234471035467217702752406105e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.417864259432558812733518752689742288284271989351444645566759428e+56, "3.417864259432558812733518752689742288284271989351444645566759428e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.665995533734965936996397899459612023184583125575089834552055942e+55, "1.665995533734965936996397899459612023184583125575089834552055942e+55", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.444766925649844009950058690449625999301860892596426461258095232e+53, "7.444766925649844009950058690449625999301860892596426461258095232e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.053637791492838551734963920042182131006240650838206322215619662e+52, "3.053637791492838551734963920042182131006240650838206322215619662e+52", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.150696853422753584935226676401667305978026730065639035499393518e+51, "1.150696853422753584935226676401667305978026730065639035499393518e+51", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.985976091763077924792684854305586783380530313659602423780141188e+49, "3.985976091763077924792684854305586783380530313659602423780141188e+49", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.269589095786672590317833654141210781129738119237951536741077115e+48, "1.269589095786672590317833654141210781129738119237951536741077115e+48", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.718300118825405526804849893058410300716988331091767076237827497e+46, "3.718300118825405526804849893058410300716988331091767076237827497e+46", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.001037055130874457401651655102738871459032839441218104652569066e+45, "1.001037055130874457401651655102738871459032839441218104652569066e+45", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.475842513986568687160423191409256650108932454810648362428602348e+43, "2.475842513986568687160423191409256650108932454810648362428602348e+43", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.620452049086499203878684285356863241396518483154492676811559133e+41, "5.620452049086499203878684285356863241396518483154492676811559133e+41", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.169661026157169583693125067814111812572434991018171004040405784e+40, "1.169661026157169583693125067814111812572434991018171004040405784e+40", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.227918466522161929152413190031319328201533237960827483146218740e+38, "2.227918466522161929152413190031319328201533237960827483146218740e+38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.876388843752351291646654793076860108915313255758699513365393870e+36, "3.876388843752351291646654793076860108915313255758699513365393870e+36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.145947758366681136606104191450792163942386660344907590963820717e+34, "6.145947758366681136606104191450792163942386660344907590963820717e+34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.853323303407534484800459250019301328433169196161471441696806506e+32, "8.853323303407534484800459250019301328433169196161471441696806506e+32", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.154628006575221227908667538321556179086649067527404327882584768e+31, "1.154628006575221227908667538321556179086649067527404327882584768e+31", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.357526820024103486396860374714568600536209103260198100884104997e+29, "1.357526820024103486396860374714568600536209103260198100884104997e+29", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.431529899588725297356982438015035066854198997921929156832870645e+27, "1.431529899588725297356982438015035066854198997921929156832870645e+27", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.345565129287503320724079046959642760096964859126850291147857935e+25, "1.345565129287503320724079046959642760096964859126850291147857935e+25", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.118851309483567225684739040233675455708538654675741148330404763e+23, "1.118851309483567225684739040233675455708538654675741148330404763e+23", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.153371780240325463304870847387326315142505274277395976930776452e+20, "8.153371780240325463304870847387326315142505274277395976930776452e+20", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.146212685927632120682088036018035709941745020823689824280902727e+18, "5.146212685927632120682088036018035709941745020823689824280902727e+18", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.771109638413640784841091904266004758198074452790973613270876444e+16, "2.771109638413640784841091904266004758198074452790973613270876444e+16", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.247775743837944205683004431867637625466576857881195465700397478e+14, "1.247775743837944205683004431867637625466576857881195465700397478e+14", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.570311375510395966207715903995528566489264305503840005145629111e+11, "4.570311375510395966207715903995528566489264305503840005145629111e+11", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.307932649387240491969419239876926639445902586258953887216911993e+09, "1.307932649387240491969419239876926639445902586258953887216911993e+09", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.743144608535924824275750439447323876880302369055576390115394778e+06, "2.743144608535924824275750439447323876880302369055576390115394778e+06", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.749690888961891063146468955091435916957208840312184463551812828e+03, "3.749690888961891063146468955091435916957208840312184463551812828e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415765284811045253006986740609938316629929233e+00, "2.506628274631000502415765284811045253006986740609938316629929233e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[48] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.502622159812088949850305428800254892961651752960000000000000000e+57, "5.502622159812088949850305428800254892961651752960000000000000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.430336111272256671478593169569751383305061494947840000000000000e+58, "2.430336111272256671478593169569751383305061494947840000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.920361290698585974808779016476219830728024276336640000000000000e+58, "4.920361290698585974808779016476219830728024276336640000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.149178946896205138947217427059336370288899808821248000000000000e+58, "6.149178946896205138947217427059336370288899808821248000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.374105269656119699331051574067858017333550280343552000000000000e+58, "5.374105269656119699331051574067858017333550280343552000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.521316226597066883749849655326023294027593332332429312000000000e+58, "3.521316226597066883749849655326023294027593332332429312000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.808864152650289891915479515152146571014320216782405632000000000e+58, "1.808864152650289891915479515152146571014320216782405632000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.514810409642252571378917003183814999063638859346214912000000000e+57, "7.514810409642252571378917003183814999063638859346214912000000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.583350992233550434239775839017811699814141926043903590400000000e+57, "2.583350992233550434239775839017811699814141926043903590400000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.478403249251559174520099458337662519939088809134875607040000000e+56, "7.478403249251559174520099458337662519939088809134875607040000000e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.848344883280695333961708798743230793633983609036568330240000000e+56, "1.848344883280695333961708798743230793633983609036568330240000000e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.943873277267014936040757307088314776495222166971439104000000000e+55, "3.943873277267014936040757307088314776495222166971439104000000000e+55", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.331069721888505257142927693659482094449571844495257600000000000e+54, "7.331069721888505257142927693659482094449571844495257600000000000e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.196124539826947758881834650235619760202156354268084224000000000e+54, "1.196124539826947758881834650235619760202156354268084224000000000e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.723744838816127002822609734027860811982593574672547840000000000e+53, "1.723744838816127002822609734027860811982593574672547840000000000e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.205691767196054136766333529400075228162139411801728000000000000e+52, "2.205691767196054136766333529400075228162139411801728000000000000e+52", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.517213632743192166819003098472340901249838381523200000000000000e+51, "2.517213632743192166819003098472340901249838381523200000000000000e+51", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.571722144655713179046526371841394014407124514352640000000000000e+50, "2.571722144655713179046526371841394014407124514352640000000000000e+50", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.359512744028577584409389641902976782871564427046400000000000000e+49, "2.359512744028577584409389641902976782871564427046400000000000000e+49", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.949188285585060392916084953872833077002135851920000000000000000e+48, "1.949188285585060392916084953872833077002135851920000000000000000e+48", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.452967188675463645529736303316005271151737332000000000000000000e+47, "1.452967188675463645529736303316005271151737332000000000000000000e+47", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.790015208782962556675223159728484084908850744000000000000000000e+45, "9.790015208782962556675223159728484084908850744000000000000000000e+45", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.970673071264242753610155919125826961862567840000000000000000000e+44, "5.970673071264242753610155919125826961862567840000000000000000000e+44", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.299166890445957751586491053313346243255473500000000000000000000e+43, "3.299166890445957751586491053313346243255473500000000000000000000e+43", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.652735578141047520337049888545244673386975000000000000000000000e+42, "1.652735578141047520337049888545244673386975000000000000000000000e+42", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.508428802270485256066710729742536448661900000000000000000000000e+40, "7.508428802270485256066710729742536448661900000000000000000000000e+40", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.093294777021479729147119238554967297499000000000000000000000000e+39, "3.093294777021479729147119238554967297499000000000000000000000000e+39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.155176275192359061296447275633302204250000000000000000000000000e+38, "1.155176275192359061296447275633302204250000000000000000000000000e+38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.907505708457079284974986712721395225000000000000000000000000000e+36, "3.907505708457079284974986712721395225000000000000000000000000000e+36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.195848283940498442888394846136646210000000000000000000000000000e+35, "1.195848283940498442888394846136646210000000000000000000000000000e+35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.305934675041764670409270520636101000000000000000000000000000000e+33, "3.305934675041764670409270520636101000000000000000000000000000000e+33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.238840089027488915014959267151000000000000000000000000000000000e+31, "8.238840089027488915014959267151000000000000000000000000000000000e+31", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.846167161648076059624793804150000000000000000000000000000000000e+30, "1.846167161648076059624793804150000000000000000000000000000000000e+30", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.707826341119682695847826052600000000000000000000000000000000000e+28, "3.707826341119682695847826052600000000000000000000000000000000000e+28", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.648183019818072129964867660000000000000000000000000000000000000e+26, "6.648183019818072129964867660000000000000000000000000000000000000e+26", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.059080011923383455919277000000000000000000000000000000000000000e+25, "1.059080011923383455919277000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.490144286132397218940500000000000000000000000000000000000000000e+23, "1.490144286132397218940500000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.838362455658776519186000000000000000000000000000000000000000000e+21, "1.838362455658776519186000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.970532718044669378600000000000000000000000000000000000000000000e+19, "1.970532718044669378600000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.814183952293757550000000000000000000000000000000000000000000000e+17, "1.814183952293757550000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.413370614847675000000000000000000000000000000000000000000000000e+15, "1.413370614847675000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.134958017031000000000000000000000000000000000000000000000000000e+12, "9.134958017031000000000000000000000000000000000000000000000000000e+12", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.765795079100000000000000000000000000000000000000000000000000000e+10, "4.765795079100000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.928125650000000000000000000000000000000000000000000000000000000e+08, "1.928125650000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.675250000000000000000000000000000000000000000000000000000000000e+05, "5.675250000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.081000000000000000000000000000000000000000000000000000000000000e+03, "1.081000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[48] = { + static_cast(boost::math::tools::make_big_value( 1.775732062655417998910881298714821053061055705608286949609421120e+58, "1.775732062655417998910881298714821053061055705608286949609421120e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.688437299644448784121592662352787426980194425446481703306505899e+58, "2.688437299644448784121592662352787426980194425446481703306505899e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.990941408817264621124181941423397180231807676408175000011574647e+58, "1.990941408817264621124181941423397180231807676408175000011574647e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.611362716446299768312931282360230566955098878347512701289885826e+57, "9.611362716446299768312931282360230566955098878347512701289885826e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.401071382066693821667231534775770086983519477562699643517826070e+57, "3.401071382066693821667231534775770086983519477562699643517826070e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.404885497858970433702192998314287586471872015950314081905843790e+56, "9.404885497858970433702192998314287586471872015950314081905843790e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.115877029354588030985670444733795075439494699793733843615128537e+56, "2.115877029354588030985670444733795075439494699793733843615128537e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.981190790128533233774351539949086864384527026303253658346042487e+55, "3.981190790128533233774351539949086864384527026303253658346042487e+55", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.391693345003088328615594164751621620795026048184784616056424156e+54, "6.391693345003088328615594164751621620795026048184784616056424156e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.889256530644592752851605934648543064680013184446459552930302708e+53, "8.889256530644592752851605934648543064680013184446459552930302708e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.083600502252557317792851907104175947655615832167024966482957198e+53, "1.083600502252557317792851907104175947655615832167024966482957198e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.168663303100387254423547467716347840589509950430146037235024663e+52, "1.168663303100387254423547467716347840589509950430146037235024663e+52", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.123598327107617380847613820395680616677588511868146055764672247e+51, "1.123598327107617380847613820395680616677588511868146055764672247e+51", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.689997752127767317102012222013845618089045780981297513260591263e+49, "9.689997752127767317102012222013845618089045780981297513260591263e+49", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.534390868711924145397558028431517797916157184545344400315049888e+48, "7.534390868711924145397558028431517797916157184545344400315049888e+48", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.304302698603539256283286371502868034443493795813215278491516590e+47, "5.304302698603539256283286371502868034443493795813215278491516590e+47", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.393109140624987047793401361048831961769792029208766436336102130e+46, "3.393109140624987047793401361048831961769792029208766436336102130e+46", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.978018543190809154654104033779556195143800802618966016721119650e+45, "1.978018543190809154654104033779556195143800802618966016721119650e+45", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.053360999285885098804414279382371819392475408561904784568215676e+44, "1.053360999285885098804414279382371819392475408561904784568215676e+44", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.134477518753880004346650767299407142912151189519394755303948278e+42, "5.134477518753880004346650767299407142912151189519394755303948278e+42", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.294423222517027804991661400849986263936601088969957809227734095e+41, "2.294423222517027804991661400849986263936601088969957809227734095e+41", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.411090410120803602405769061472811786006792830932395177026805674e+39, "9.411090410120803602405769061472811786006792830932395177026805674e+39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.546364324011365762789375386661337991434000702963811196005801731e+38, "3.546364324011365762789375386661337991434000702963811196005801731e+38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.228448949533845774618310075362255075191314754073111861819975658e+37, "1.228448949533845774618310075362255075191314754073111861819975658e+37", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.912781600174900095022672513908490962899309128877584272045832513e+35, "3.912781600174900095022672513908490962899309128877584272045832513e+35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.145953154225327686809754524860534768156895534588187817885425867e+34, "1.145953154225327686809754524860534768156895534588187817885425867e+34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.085123669861365984774838320924008647858451270384142925874188908e+32, "3.085123669861365984774838320924008647858451270384142925874188908e+32", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.630367231261397170650842427640465271470437848007390468680241668e+30, "7.630367231261397170650842427640465271470437848007390468680241668e+30", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.732182596346604787991836614669276692020582495778773122326853797e+29, "1.732182596346604787991836614669276692020582495778773122326853797e+29", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.604810530255586389021528105443008249789929772232910820974558737e+27, "3.604810530255586389021528105443008249789929772232910820974558737e+27", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.866283281281868197964883431828004811500103664332499479032936741e+25, "6.866283281281868197964883431828004811500103664332499479032936741e+25", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.194674953754173153419535571352963617418336620849047024493757781e+24, "1.194674953754173153419535571352963617418336620849047024493757781e+24", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.894136566262225941799684575793203365634052117390221232065529506e+22, "1.894136566262225941799684575793203365634052117390221232065529506e+22", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.728530091896234109430773225830735206267902257956559214561779937e+20, "2.728530091896234109430773225830735206267902257956559214561779937e+20", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.558479853180206010560597094150305393424259777860361999786422123e+18, "3.558479853180206010560597094150305393424259777860361999786422123e+18", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.183799294403182487629551851184805610521945574359855930862189385e+16, "4.183799294403182487629551851184805610521945574359855930862189385e+16", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.411871423439005125979602342436157376541872925894678545707600871e+14, "4.411871423439005125979602342436157376541872925894678545707600871e+14", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.146934230284030660663814250662713645615827253848318877256260252e+12, "4.146934230284030660663814250662713645615827253848318877256260252e+12", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.448218665084135299794121636822853382005896647323977605040284573e+10, "3.448218665084135299794121636822853382005896647323977605040284573e+10", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.512810104228409918190743070957013357446861162954554120244345275e+08, "2.512810104228409918190743070957013357446861162954554120244345275e+08", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.586025460907685522041021408846741988415862331430490056017676558e+06, "1.586025460907685522041021408846741988415862331430490056017676558e+06", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.540359114012197595748944623835295064565126012703153392373623351e+03, "8.540359114012197595748944623835295064565126012703153392373623351e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.845554430040583564794301575257907183920519062724643766057340299e+01, "3.845554430040583564794301575257907183920519062724643766057340299e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.408536849955106342184570268692357634552350288861587703063273018e-01, "1.408536849955106342184570268692357634552350288861587703063273018e-01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.030953654039823541442226125506893371879437951634029024402619056e-04, "4.030953654039823541442226125506893371879437951634029024402619056e-04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.454172918244607114802676127860508419821673596398248024962237789e-07, "8.454172918244607114802676127860508419821673596398248024962237789e-07", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.155627562127299657410444702080985966726894475302009989071093439e-09, "1.155627562127299657410444702080985966726894475302009989071093439e-09", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.725246714864934496649491688787278190129598018071339049048385845e-13, "7.725246714864934496649491688787278190129598018071339049048385845e-13", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[48] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.502622159812088949850305428800254892961651752960000000000000000e+57, "5.502622159812088949850305428800254892961651752960000000000000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.430336111272256671478593169569751383305061494947840000000000000e+58, "2.430336111272256671478593169569751383305061494947840000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.920361290698585974808779016476219830728024276336640000000000000e+58, "4.920361290698585974808779016476219830728024276336640000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.149178946896205138947217427059336370288899808821248000000000000e+58, "6.149178946896205138947217427059336370288899808821248000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.374105269656119699331051574067858017333550280343552000000000000e+58, "5.374105269656119699331051574067858017333550280343552000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.521316226597066883749849655326023294027593332332429312000000000e+58, "3.521316226597066883749849655326023294027593332332429312000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.808864152650289891915479515152146571014320216782405632000000000e+58, "1.808864152650289891915479515152146571014320216782405632000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.514810409642252571378917003183814999063638859346214912000000000e+57, "7.514810409642252571378917003183814999063638859346214912000000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.583350992233550434239775839017811699814141926043903590400000000e+57, "2.583350992233550434239775839017811699814141926043903590400000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.478403249251559174520099458337662519939088809134875607040000000e+56, "7.478403249251559174520099458337662519939088809134875607040000000e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.848344883280695333961708798743230793633983609036568330240000000e+56, "1.848344883280695333961708798743230793633983609036568330240000000e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.943873277267014936040757307088314776495222166971439104000000000e+55, "3.943873277267014936040757307088314776495222166971439104000000000e+55", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.331069721888505257142927693659482094449571844495257600000000000e+54, "7.331069721888505257142927693659482094449571844495257600000000000e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.196124539826947758881834650235619760202156354268084224000000000e+54, "1.196124539826947758881834650235619760202156354268084224000000000e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.723744838816127002822609734027860811982593574672547840000000000e+53, "1.723744838816127002822609734027860811982593574672547840000000000e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.205691767196054136766333529400075228162139411801728000000000000e+52, "2.205691767196054136766333529400075228162139411801728000000000000e+52", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.517213632743192166819003098472340901249838381523200000000000000e+51, "2.517213632743192166819003098472340901249838381523200000000000000e+51", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.571722144655713179046526371841394014407124514352640000000000000e+50, "2.571722144655713179046526371841394014407124514352640000000000000e+50", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.359512744028577584409389641902976782871564427046400000000000000e+49, "2.359512744028577584409389641902976782871564427046400000000000000e+49", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.949188285585060392916084953872833077002135851920000000000000000e+48, "1.949188285585060392916084953872833077002135851920000000000000000e+48", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.452967188675463645529736303316005271151737332000000000000000000e+47, "1.452967188675463645529736303316005271151737332000000000000000000e+47", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.790015208782962556675223159728484084908850744000000000000000000e+45, "9.790015208782962556675223159728484084908850744000000000000000000e+45", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.970673071264242753610155919125826961862567840000000000000000000e+44, "5.970673071264242753610155919125826961862567840000000000000000000e+44", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.299166890445957751586491053313346243255473500000000000000000000e+43, "3.299166890445957751586491053313346243255473500000000000000000000e+43", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.652735578141047520337049888545244673386975000000000000000000000e+42, "1.652735578141047520337049888545244673386975000000000000000000000e+42", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.508428802270485256066710729742536448661900000000000000000000000e+40, "7.508428802270485256066710729742536448661900000000000000000000000e+40", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.093294777021479729147119238554967297499000000000000000000000000e+39, "3.093294777021479729147119238554967297499000000000000000000000000e+39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.155176275192359061296447275633302204250000000000000000000000000e+38, "1.155176275192359061296447275633302204250000000000000000000000000e+38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.907505708457079284974986712721395225000000000000000000000000000e+36, "3.907505708457079284974986712721395225000000000000000000000000000e+36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.195848283940498442888394846136646210000000000000000000000000000e+35, "1.195848283940498442888394846136646210000000000000000000000000000e+35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.305934675041764670409270520636101000000000000000000000000000000e+33, "3.305934675041764670409270520636101000000000000000000000000000000e+33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.238840089027488915014959267151000000000000000000000000000000000e+31, "8.238840089027488915014959267151000000000000000000000000000000000e+31", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.846167161648076059624793804150000000000000000000000000000000000e+30, "1.846167161648076059624793804150000000000000000000000000000000000e+30", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.707826341119682695847826052600000000000000000000000000000000000e+28, "3.707826341119682695847826052600000000000000000000000000000000000e+28", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.648183019818072129964867660000000000000000000000000000000000000e+26, "6.648183019818072129964867660000000000000000000000000000000000000e+26", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.059080011923383455919277000000000000000000000000000000000000000e+25, "1.059080011923383455919277000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.490144286132397218940500000000000000000000000000000000000000000e+23, "1.490144286132397218940500000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.838362455658776519186000000000000000000000000000000000000000000e+21, "1.838362455658776519186000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.970532718044669378600000000000000000000000000000000000000000000e+19, "1.970532718044669378600000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.814183952293757550000000000000000000000000000000000000000000000e+17, "1.814183952293757550000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.413370614847675000000000000000000000000000000000000000000000000e+15, "1.413370614847675000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.134958017031000000000000000000000000000000000000000000000000000e+12, "9.134958017031000000000000000000000000000000000000000000000000000e+12", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.765795079100000000000000000000000000000000000000000000000000000e+10, "4.765795079100000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.928125650000000000000000000000000000000000000000000000000000000e+08, "1.928125650000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.675250000000000000000000000000000000000000000000000000000000000e+05, "5.675250000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.081000000000000000000000000000000000000000000000000000000000000e+03, "1.081000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[47] = { + static_cast(boost::math::tools::make_big_value( 1.059629332377126683204423480567078764834299559082175332563440691e+01, "1.059629332377126683204423480567078764834299559082175332563440691e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.045539783916612448318159279915745234781500064405838259582295756e+02, "-1.045539783916612448318159279915745234781500064405838259582295756e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.784116147862702971548198855631720823614071322755242269800139953e+02, "4.784116147862702971548198855631720823614071322755242269800139953e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.347627123899697763041970836639890836066182746484603984701614322e+03, "-1.347627123899697763041970836639890836066182746484603984701614322e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.616287350264343765684251764154979472791739226517501453422663702e+03, "2.616287350264343765684251764154979472791739226517501453422663702e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.713882062539651653939339395399443747287004395732955159091898814e+03, "-3.713882062539651653939339395399443747287004395732955159091898814e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.991169606573224259776909844091992693404451938778998047720606365e+03, "3.991169606573224259776909844091992693404451938778998047720606365e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.317302161605094814956529918647229867233820698992970037871348037e+03, "-3.317302161605094814956529918647229867233820698992970037871348037e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.160243421312714521088457044577429625205805822189897013706603525e+03, "2.160243421312714521088457044577429625205805822189897013706603525e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.109943233027050100899811890306430189301581767622560123811853152e+03, "-1.109943233027050100899811890306430189301581767622560123811853152e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.510589694767723034579229465791750718722450232983242500655372350e+02, "4.510589694767723034579229465791750718722450232983242500655372350e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.447631000703120050516586541372187152390222336990410786008441418e+02, "-1.447631000703120050516586541372187152390222336990410786008441418e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.650513815713423478665128697883383003943391843803280033790640056e+01, "3.650513815713423478665128697883383003943391843803280033790640056e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.169833252147741984016531016457108860830636610643268300442548571e+00, "-7.169833252147741984016531016457108860830636610643268300442548571e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.082891222574188256195988224106955541928146669677565424595939508e+00, "1.082891222574188256195988224106955541928146669677565424595939508e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.236107424816170540654753273736991964308279435358993150196240041e-01, "-1.236107424816170540654753273736991964308279435358993150196240041e-01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.042295614972976540486053879488442847688158698802215145729595300e-02, "1.042295614972976540486053879488442847688158698802215145729595300e-02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.301008161384761854991230670333450694872613042265540662425668275e-04, "-6.301008161384761854991230670333450694872613042265540662425668275e-04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.626174700692043436308812511757112824553679923076031241653340508e-05, "2.626174700692043436308812511757112824553679923076031241653340508e-05", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.165638597797307942127436742547456896168876912136407736672893749e-07, "-7.165638597797307942127436742547456896168876912136407736672893749e-07", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.193760947891421842393017150194414897043594152709554867681454093e-08, "1.193760947891421842393017150194414897043594152709554867681454093e-08", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.102566205604210639065160857917396944102487766555058309172771685e-10, "-1.102566205604210639065160857917396944102487766555058309172771685e-10", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.915816623470797626925445072607835810426224865943397673652473644e-13, "4.915816623470797626925445072607835810426224865943397673652473644e-13", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.588275837841705058968991523347781566219989845111381889185487327e-16, "-8.588275837841705058968991523347781566219989845111381889185487327e-16", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.200550301285945062259329336559146630395284987411539369061121774e-19, "4.200550301285945062259329336559146630395284987411539369061121774e-19", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.164333226683698411437894680594408940426530663957731548446585176e-23, "-3.164333226683698411437894680594408940426530663957731548446585176e-23", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.066415481671710192926882432742434212829003971627792457166443068e-28, "1.066415481671710192926882432742434212829003971627792457166443068e-28", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.794259516500627365643093960688415401054083199354112116216326548e-35, "1.794259516500627365643093960688415401054083199354112116216326548e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.109766027021453750770079684473469373477285891593627979028234104e-35, "-4.109766027021453750770079684473469373477285891593627979028234104e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.857040454431507009464118652247309465880198950544005451066913133e-35, "7.857040454431507009464118652247309465880198950544005451066913133e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.257636833252205356462338019252188768182918234805529456629813332e-34, "-1.257636833252205356462338019252188768182918234805529456629813332e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.657386968948568677903872677704817552898314429680193647771915640e-34, "1.657386968948568677903872677704817552898314429680193647771915640e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.807368757318279512579151153998249666772948741065806312921477647e-34, "-1.807368757318279512579151153998249666772948741065806312921477647e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.661046240741398691824399424582067048482718145278248186045239803e-34, "1.661046240741398691824399424582067048482718145278248186045239803e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.310274358393495831279259654715581878034928245769119610060724565e-34, "-1.310274358393495831279259654715581878034928245769119610060724565e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.979289812994200254512860775692570111131240734486735844065571645e-35, "8.979289812994200254512860775692570111131240734486735844065571645e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.374132043246630393307108400571746261019561481928368054130159659e-35, "-5.374132043246630393307108400571746261019561481928368054130159659e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.807680467889122570534300256450516518962725443297886143108832476e-35, "2.807680467889122570534300256450516518962725443297886143108832476e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.273791157694681089776609329544693948790210894828257493359951461e-35, "-1.273791157694681089776609329544693948790210894828257493359951461e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.971177216154470328027539744763226999793762414262864963697237346e-36, "4.971177216154470328027539744763226999793762414262864963697237346e-36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.645869582759689501568146144102914403686604774258048281344406053e-36, "-1.645869582759689501568146144102914403686604774258048281344406053e-36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.533836765077295478897031652308024155740827573708543095934776509e-37, "4.533836765077295478897031652308024155740827573708543095934776509e-37", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.011071482407693628614243045457397049948479637840391111641112292e-37, "-1.011071482407693628614243045457397049948479637840391111641112292e-37", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.753334959707221495336088007359122169612976692723773645699626150e-38, "1.753334959707221495336088007359122169612976692723773645699626150e-38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.217604773736938924265403811396189809599754278055061061653740309e-39, "-2.217604773736938924265403811396189809599754278055061061653740309e-39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.819104328189909539214493755590516594857915205552841395610714917e-40, "1.819104328189909539214493755590516594857915205552841395610714917e-40", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.261124772729210946163851510369531392121538686694430629664292782e-42, "-7.261124772729210946163851510369531392121538686694430629664292782e-42", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[47] = { + static_cast(boost::math::tools::make_big_value( 1.201442621036266842137537764128372139686555918574926377003612763e+02, "1.201442621036266842137537764128372139686555918574926377003612763e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.185467427150643969519910927764836582205108528009141221591420898e+03, "-1.185467427150643969519910927764836582205108528009141221591420898e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.424388386017623557963301151646679462091516489317860889362683594e+03, "5.424388386017623557963301151646679462091516489317860889362683594e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.527983998220780910263892115033927387104053611029099941633323011e+04, "-1.527983998220780910263892115033927387104053611029099941633323011e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.966432728352315714505545454293409301356907573727621630702827634e+04, "2.966432728352315714505545454293409301356907573727621630702827634e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.210921746972897898551337991192707389898034825880579655985363009e+04, "-4.210921746972897898551337991192707389898034825880579655985363009e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.525319492963037163576188790739239848749059077112768508582824310e+04, "4.525319492963037163576188790739239848749059077112768508582824310e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.761266399512640929192286468240357629226481512485264527650043412e+04, "-3.761266399512640929192286468240357629226481512485264527650043412e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.449355108314973517543246836489412427594992113516547680523282212e+04, "2.449355108314973517543246836489412427594992113516547680523282212e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.258490177973741431378782429416242097479994678322390199981700552e+04, "-1.258490177973741431378782429416242097479994678322390199981700552e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.114255088752286384038861754183366335220682008583459292808501983e+03, "5.114255088752286384038861754183366335220682008583459292808501983e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.641371685961506906939690430062582517060728808639566257675679493e+03, "-1.641371685961506906939690430062582517060728808639566257675679493e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.139072742579462987548668350779672609568514018384674745960251434e+02, "4.139072742579462987548668350779672609568514018384674745960251434e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.129392978890804438983060711164783076784089453197491087525720250e+01, "-8.129392978890804438983060711164783076784089453197491087525720250e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.227817717944841986447189375517242505918979312023367060292099051e+01, "1.227817717944841986447189375517242505918979312023367060292099051e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.401539292067249253713639886818857395065226008969910929456090178e+00, "-1.401539292067249253713639886818857395065226008969910929456090178e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.181789081601278618540976740818676551399023595924451938057596056e-01, "1.181789081601278618540976740818676551399023595924451938057596056e-01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.144290488450459735914078985115746320918090890348935029860425141e-03, "-7.144290488450459735914078985115746320918090890348935029860425141e-03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.977643331768050273059868974450773270172308183228656321879824795e-04, "2.977643331768050273059868974450773270172308183228656321879824795e-04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.124636941696344229278652214634921673116603924841964381194849043e-06, "-8.124636941696344229278652214634921673116603924841964381194849043e-06", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.353525462444406600575359080915245707387262742058104197063680358e-07, "1.353525462444406600575359080915245707387262742058104197063680358e-07", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.250125861423094782405286690199652039727315544398975014264972834e-09, "-1.250125861423094782405286690199652039727315544398975014264972834e-09", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.573714720964717327652547152474097356959063887913062262865877352e-12, "5.573714720964717327652547152474097356959063887913062262865877352e-12", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.737669879005051560419153179757554889911318336987864449783329044e-15, "-9.737669879005051560419153179757554889911318336987864449783329044e-15", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.762722217636305077074994367900679148917691897585712642440813437e-18, "4.762722217636305077074994367900679148917691897585712642440813437e-18", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.587825185218585020252537180920386716805319681061835516115435092e-22, "-3.587825185218585020252537180920386716805319681061835516115435092e-22", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.209136980512837161314713015292452549173388035330975386269996826e-27, "1.209136980512837161314713015292452549173388035330975386269996826e-27", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.034390508507134900778125110328032318737425888723900242108805840e-34, "2.034390508507134900778125110328032318737425888723900242108805840e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.659788018772143666295222723749466460348336784193790467337277007e-34, "-4.659788018772143666295222723749466460348336784193790467337277007e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.908571128342935499766722474863105091718059244706787068658556651e-34, "8.908571128342935499766722474863105091718059244706787068658556651e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.425950044120254934054607924023969978647876123112048584684333719e-33, "-1.425950044120254934054607924023969978647876123112048584684333719e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.879199908120536747953526966437055347446296944118172532473563579e-33, "1.879199908120536747953526966437055347446296944118172532473563579e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.049254197314637745167349860869170443784687973315125511356920644e-33, "-2.049254197314637745167349860869170443784687973315125511356920644e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.883348910945891785870183207161008885784794173754432580579430117e-33, "1.883348910945891785870183207161008885784794173754432580579430117e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.485632203001929498321635338807138918181560966989477820879657556e-33, "-1.485632203001929498321635338807138918181560966989477820879657556e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.018101439657813295290872898460623215815148336073781084176896879e-33, "1.018101439657813295290872898460623215815148336073781084176896879e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.093367832078140478972419022586567008505333455627897676553352131e-34, "-6.093367832078140478972419022586567008505333455627897676553352131e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.183440545955440848970303491445824299419388286256245840846211512e-34, "3.183440545955440848970303491445824299419388286256245840846211512e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.444266348988579122529259208173467560400718346248315966198898381e-34, "-1.444266348988579122529259208173467560400718346248315966198898381e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.636484383471871096369253024129613184534143941833907586683970329e-35, "5.636484383471871096369253024129613184534143941833907586683970329e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.866141116496477515961611479835778926021343627571438400431425496e-35, "-1.866141116496477515961611479835778926021343627571438400431425496e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.140613382384541819628458619521408963917801187880958447868987984e-36, "5.140613382384541819628458619521408963917801187880958447868987984e-36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.146386132171160390143187663792496413753249459594650450672610453e-36, "-1.146386132171160390143187663792496413753249459594650450672610453e-36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.987988898740147227778865012441676866493607979490727350027458052e-37, "1.987988898740147227778865012441676866493607979490727350027458052e-37", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.514393298082843730831623322496784440966181704206301582735570257e-38, "-2.514393298082843730831623322496784440966181704206301582735570257e-38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.062560373914843383483799612278119836498689222815662595453851079e-39, "2.062560373914843383483799612278119836498689222815662595453851079e-39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.232902310328177520527925464546117674377821202617522000849431630e-41, "-8.232902310328177520527925464546117674377821202617522000849431630e-41", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 2.880805098265409469604492187500000000000000000000000000000000000e+01; } +}; + + + + + + +struct lanczos49MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[49] = { + static_cast(boost::math::tools::make_big_value( 2.019754080776483553135944314398390557182640085494778723336498544843678485e+75, "2.019754080776483553135944314398390557182640085494778723336498544843678485e+75", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.676059842235360762770131859925648183945167646928679564649946220888559950e+75, "2.676059842235360762770131859925648183945167646928679564649946220888559950e+75", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.735650057396761011129552305882284776566019938011364428733911563803428382e+75, "1.735650057396761011129552305882284776566019938011364428733911563803428382e+75", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.344111322348095681337661934126816558843997557802467558098296633193647235e+74, "7.344111322348095681337661934126816558843997557802467558098296633193647235e+74", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.279680216265226689865713732197298481387164441051031689408254603978998739e+74, "2.279680216265226689865713732197298481387164441051031689408254603978998739e+74", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.534520884978570988754896701605114795240254179745381857143817149573644190e+73, "5.534520884978570988754896701605114795240254179745381857143817149573644190e+73", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.094111428842887690996413081740290562974159836498138544655694952917058279e+73, "1.094111428842887690996413081740290562974159836498138544655694952917058279e+73", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.810579629726532069935485995735078752851873354363515145898406449827612179e+72, "1.810579629726532069935485995735078752851873354363515145898406449827612179e+72", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.558918434547693216059693184449337082460551934950816980580247364223027781e+71, "2.558918434547693216059693184449337082460551934950816980580247364223027781e+71", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.135873934032978624782044873078145389831812962597897650459872577452106819e+70, "3.135873934032978624782044873078145389831812962597897650459872577452106819e+70", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.371686637133152315568960647279607142944608875215381633194517073295482279e+69, "3.371686637133152315568960647279607142944608875215381633194517073295482279e+69", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.210709791290211789451664416279176396010610028867877916229859938579263979e+68, "3.210709791290211789451664416279176396010610028867877916229859938579263979e+68", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.728493971517374186383948573740973812742868532549695728659376828743835354e+67, "2.728493971517374186383948573740973812742868532549695728659376828743835354e+67", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.082196640005602972025690170863702787506422900608580581233509996818990072e+66, "2.082196640005602972025690170863702787506422900608580581233509996818990072e+66", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.434296904963427729210616126543061543796855074189151534322145897294331943e+65, "1.434296904963427729210616126543061543796855074189151534322145897294331943e+65", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.956561957668034323532429269801091280845027370525277092791205986418388937e+63, "8.956561957668034323532429269801091280845027370525277092791205986418388937e+63", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.088465031117387833989029481250197681372395074774197408003458965955199114e+62, "5.088465031117387833989029481250197681372395074774197408003458965955199114e+62", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.638006253255673292005995366039132327048285444095672469721651872147026836e+61, "2.638006253255673292005995366039132327048285444095672469721651872147026836e+61", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.251091350064240218784436940525650498454117574503185703454335896105827459e+60, "1.251091350064240218784436940525650498454117574503185703454335896105827459e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.438965470269742797671507642697325276853822736866823134892262314489634493e+58, "5.438965470269742797671507642697325276853822736866823134892262314489634493e+58", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.171096428020164782492194583597894107448038723781192404665010946856416728e+57, "2.171096428020164782492194583597894107448038723781192404665010946856416728e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.967964763783296071512049792468354332039332869323402055488486515880211228e+55, "7.967964763783296071512049792468354332039332869323402055488486515880211228e+55", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.691239511306362286583973595898917873397629545053239582674237238671075149e+54, "2.691239511306362286583973595898917873397629545053239582674237238671075149e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.371351678345135454487045322888974392983710298168736348320865063481886470e+52, "8.371351678345135454487045322888974392983710298168736348320865063481886470e+52", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.399139456864000364822305296187724318277750756512114883045860699513780982e+51, "2.399139456864000364822305296187724318277750756512114883045860699513780982e+51", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.335644907596902422235465624341780552277299385700659659374735347476790554e+49, "6.335644907596902422235465624341780552277299385700659659374735347476790554e+49", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.541494306852766687136536628805359613169443442681232300932385167150904206e+48, "1.541494306852766687136536628805359613169443442681232300932385167150904206e+48", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.454056970723993494338669836718832149990196703371093557999871225274488103e+46, "3.454056970723993494338669836718832149990196703371093557999871225274488103e+46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.122804036582476347394286398036300142213667443126058369432667730381406969e+44, "7.122804036582476347394286398036300142213667443126058369432667730381406969e+44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.350437044906396962588019269622122085882249454809361766675217669398941902e+43, "1.350437044906396962588019269622122085882249454809361766675217669398941902e+43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.350870345849974415762276588597695308720927596639430565914494820338490132e+41, "2.350870345849974415762276588597695308720927596639430565914494820338490132e+41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.751385019528115548010259296564491721747559138159547937603014471132985302e+39, "3.751385019528115548010259296564491721747559138159547937603014471132985302e+39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.476113159838159765344429146854859477076267913220368138623944281045558949e+37, "5.476113159838159765344429146854859477076267913220368138623944281045558949e+37", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.294398437121931983845715884547145127710330599817550100565429763115048575e+35, "7.294398437121931983845715884547145127710330599817550100565429763115048575e+35", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.839781945206891229035081139535266037057033378415390353746447012903101485e+33, "8.839781945206891229035081139535266037057033378415390353746447012903101485e+33", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.711123560991297649877080280435694393772679378388200862936651880878974513e+31, "9.711123560991297649877080280435694393772679378388200862936651880878974513e+31", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.629549637595714724789129505098155944312207076674498749184233965222505036e+29, "9.629549637595714724789129505098155944312207076674498749184233965222505036e+29", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.574490956477982663124058935512682291631619753616365947349506147258465402e+27, "8.574490956477982663124058935512682291631619753616365947349506147258465402e+27", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.813448512582564107136706674347542806763477703915847701777955330517207527e+25, "6.813448512582564107136706674347542806763477703915847701777955330517207527e+25", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.794883897023788035285405896000621807947409236640451176090748912226153397e+23, "4.794883897023788035285405896000621807947409236640451176090748912226153397e+23", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.960479107645842137800504870276268649357196518321705636965540139043447991e+21, "2.960479107645842137800504870276268649357196518321705636965540139043447991e+21", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.584873693858658935208259218348427715203386574579073396812006362138544628e+19, "1.584873693858658935208259218348427715203386574579073396812006362138544628e+19", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.245936834930690813978996898166861135901321349975150652784783993349872251e+16, "7.245936834930690813978996898166861135901321349975150652784783993349872251e+16", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.773017141345068472510554017030953209437181800565207451480397068178339458e+14, "2.773017141345068472510554017030953209437181800565207451480397068178339458e+14", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.641092177320087625773994531564401851985558319657745034892144486195046163e+11, "8.641092177320087625773994531564401851985558319657745034892144486195046163e+11", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.105900602857710093040451403979744395599050533242553243284994146810134883e+09, "2.105900602857710093040451403979744395599050533242553243284994146810134883e+09", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.764831079995208797424885873124263386851285031310243195313947355076198006e+06, "3.764831079995208797424885873124263386851285031310243195313947355076198006e+06", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.390800780998954208500039666019609185743083611214630479125238184115750385e+03, "4.390800780998954208500039666019609185743083611214630479125238184115750385e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415765284811045253006986740609938316629923576327386304e+00, "2.506628274631000502415765284811045253006986740609938316629923576327386304e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[49] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.586232415111681806429643551536119799691976323891200000000000000000000000e+59, "2.586232415111681806429643551536119799691976323891200000000000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.147760594457772724544789095126583405046340554378444800000000000000000000e+60, "1.147760594457772724544789095126583405046340554378444800000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.336873167741057974874912069439520834275222024827699200000000000000000000e+60, "2.336873167741057974874912069439520834275222024827699200000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.939317717948202275053279980882650292343063152909352960000000000000000000e+60, "2.939317717948202275053279980882650292343063152909352960000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.587321266207338310075066414082486631849657629849681920000000000000000000e+60, "2.587321266207338310075066414082486631849657629849681920000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.708759679197182632355739853743909528366304368999677296640000000000000000e+60, "1.708759679197182632355739853743909528366304368999677296640000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.853793140116069180377738686747691213170064352110549401600000000000000000e+59, "8.853793140116069180377738686747691213170064352110549401600000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.712847307796887697739638943011607706661342285570961571840000000000000000e+59, "3.712847307796887697739638943011607706661342285570961571840000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.289323070446191229806483814370209648903283093834096836608000000000000000e+59, "1.289323070446191229806483814370209648903283093834096836608000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.773184626371587855448424329320482554352785932897781894348800000000000000e+58, "3.773184626371587855448424329320482554352785932897781894348800000000000000e+58", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.435061276344423987072041299926950982073631843385358712832000000000000000e+57, "9.435061276344423987072041299926950982073631843385358712832000000000000000e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.038454928643566553335326814205831024316152779380233211904000000000000000e+57, "2.038454928643566553335326814205831024316152779380233211904000000000000000e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.839990097014298964461251746728788062040820983609914982400000000000000000e+56, "3.839990097014298964461251746728788062040820983609914982400000000000000000e+56", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.354892309375504992458915625473361082395092049509521612800000000000000000e+55, "6.354892309375504992458915625473361082395092049509521612800000000000000000e+55", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.297725282262744672148100400166565576520346155229059072000000000000000000e+54, "9.297725282262744672148100400166565576520346155229059072000000000000000000e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.209049614463758144562437732220821438434464881014066944000000000000000000e+54, "1.209049614463758144562437732220821438434464881014066944000000000000000000e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.403659584108905732081564809222007746403637980496076800000000000000000000e+53, "1.403659584108905732081564809222007746403637980496076800000000000000000000e+53", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.460430771262504410833767704612689276896332359898060800000000000000000000e+52, "1.460430771262504410833767704612689276896332359898060800000000000000000000e+52", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.366143204159002782577065768878538489390347732147072000000000000000000000e+51, "1.366143204159002782577065768878538489390347732147072000000000000000000000e+51", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.152069768627836143111498892510529224478160293107040000000000000000000000e+50, "1.152069768627836143111498892510529224478160293107040000000000000000000000e+50", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.778134072359739526905845579458057851415301312320000000000000000000000000e+48, "8.778134072359739526905845579458057851415301312320000000000000000000000000e+48", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.054274336803456047167091188388392791058897181680000000000000000000000000e+47, "6.054274336803456047167091188388392791058897181680000000000000000000000000e+47", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.785217864372490349864295597961987080566291959200000000000000000000000000e+46, "3.785217864372490349864295597961987080566291959200000000000000000000000000e+46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.147675745636024418606666386969855430516329329000000000000000000000000000e+45, "2.147675745636024418606666386969855430516329329000000000000000000000000000e+45", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.106702410770888109717062552947599620817425600000000000000000000000000000e+44, "1.106702410770888109717062552947599620817425600000000000000000000000000000e+44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.181697115208175590688403931524236804258068000000000000000000000000000000e+42, "5.181697115208175590688403931524236804258068000000000000000000000000000000e+42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.204691425427143998305817115095088274690720000000000000000000000000000000e+41, "2.204691425427143998305817115095088274690720000000000000000000000000000000e+41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.522623270425567317240421434031487657474000000000000000000000000000000000e+39, "8.522623270425567317240421434031487657474000000000000000000000000000000000e+39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.991703958167186325234691030612357960000000000000000000000000000000000000e+38, "2.991703958167186325234691030612357960000000000000000000000000000000000000e+38", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.527992642977421966550442489563632412000000000000000000000000000000000000e+36, "9.527992642977421966550442489563632412000000000000000000000000000000000000e+36", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.749637581210127837980751990835613680000000000000000000000000000000000000e+35, "2.749637581210127837980751990835613680000000000000000000000000000000000000e+35", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.178189516884684460466301376197071000000000000000000000000000000000000000e+33, "7.178189516884684460466301376197071000000000000000000000000000000000000000e+33", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.691582574877344639525149014665600000000000000000000000000000000000000000e+32, "1.691582574877344639525149014665600000000000000000000000000000000000000000e+32", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.588845541974326926673272048872000000000000000000000000000000000000000000e+30, "3.588845541974326926673272048872000000000000000000000000000000000000000000e+30", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.832472360434176596931313852800000000000000000000000000000000000000000000e+28, "6.832472360434176596931313852800000000000000000000000000000000000000000000e+28", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.162585907585797437278546956000000000000000000000000000000000000000000000e+27, "1.162585907585797437278546956000000000000000000000000000000000000000000000e+27", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.759447826405610148821312000000000000000000000000000000000000000000000000e+25, "1.759447826405610148821312000000000000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.354174640292022182957920000000000000000000000000000000000000000000000000e+23, "2.354174640292022182957920000000000000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.764512833139771127128000000000000000000000000000000000000000000000000000e+21, "2.764512833139771127128000000000000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.823199175622735427100000000000000000000000000000000000000000000000000000e+19, "2.823199175622735427100000000000000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.478468141272164800000000000000000000000000000000000000000000000000000000e+17, "2.478468141272164800000000000000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.842713641648132000000000000000000000000000000000000000000000000000000000e+15, "1.842713641648132000000000000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.137488170420800000000000000000000000000000000000000000000000000000000000e+13, "1.137488170420800000000000000000000000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.672014134600000000000000000000000000000000000000000000000000000000000000e+10, "5.672014134600000000000000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.194862400000000000000000000000000000000000000000000000000000000000000000e+08, "2.194862400000000000000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.183320000000000000000000000000000000000000000000000000000000000000000000e+05, "6.183320000000000000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.128000000000000000000000000000000000000000000000000000000000000000000000e+03, "1.128000000000000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[49] = { + static_cast(boost::math::tools::make_big_value( 9.256115936295239128792053510340342045264892843178101822334871337037830072e+59, "9.256115936295239128792053510340342045264892843178101822334871337037830072e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.226382973449509462464247401218271019985727521806127065773488938845990367e+60, "1.226382973449509462464247401218271019985727521806127065773488938845990367e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.954125855720840120393676022050001333138789037332565663424594891457273557e+59, "7.954125855720840120393676022050001333138789037332565663424594891457273557e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.365654586155298475098646391183374531128854691159534781627889669107191405e+59, "3.365654586155298475098646391183374531128854691159534781627889669107191405e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.044730374864121201936514442517987939299764008179567577221682561782183421e+59, "1.044730374864121201936514442517987939299764008179567577221682561782183421e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.536356651078758500509516730725625323443004425012359430385110182685573948e+58, "2.536356651078758500509516730725625323443004425012359430385110182685573948e+58", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.014086778674585662580239648780048641118590040590185584314710995851825637e+57, "5.014086778674585662580239648780048641118590040590185584314710995851825637e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.297512615100351568281310997196097430272736169985311846063847409602541101e+56, "8.297512615100351568281310997196097430272736169985311846063847409602541101e+56", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.172699484909110833455814713100736399837181820940085502574724938707290372e+56, "1.172699484909110833455814713100736399837181820940085502574724938707290372e+56", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.437106278000765568297205273500695563702563420274384149002742312586130286e+55, "1.437106278000765568297205273500695563702563420274384149002742312586130286e+55", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.545174371038470657228461270859888251519093095798232203286784662979129719e+54, "1.545174371038470657228461270859888251519093095798232203286784662979129719e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.471402006255895070535216946049289412987253853074246902793428565040300946e+53, "1.471402006255895070535216946049289412987253853074246902793428565040300946e+53", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.250412452299054568666234182931337401773386777590706330586351790579683785e+52, "1.250412452299054568666234182931337401773386777590706330586351790579683785e+52", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.542277292811232416618979097150690892713986488440887554977845301225180167e+50, "9.542277292811232416618979097150690892713986488440887554977845301225180167e+50", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.573086578098175124839634461979173468237189761083032074786971884241523043e+49, "6.573086578098175124839634461979173468237189761083032074786971884241523043e+49", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.104607420271440962257749252277010146224322860594339170999893725175800398e+48, "4.104607420271440962257749252277010146224322860594339170999893725175800398e+48", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.331938462909285706991247107187321645123045527742414883815000495606636547e+47, "2.331938462909285706991247107187321645123045527742414883815000495606636547e+47", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.208943799307442534797422457740696336724404643783689597868534121046756796e+46, "1.208943799307442534797422457740696336724404643783689597868534121046756796e+46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.733493346199244389057953770564978235470425412393741328222813802783023596e+44, "5.733493346199244389057953770564978235470425412393741328222813802783023596e+44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.492565577437473684677047557246888601845840521959370888739670894941330993e+43, "2.492565577437473684677047557246888601845840521959370888739670894941330993e+43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.949686666262532681847746981577965659951530620900061798663932175932503947e+41, "9.949686666262532681847746981577965659951530620900061798663932175932503947e+41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.651553737747111429808666993553840522239787479567412806226997545642698201e+40, "3.651553737747111429808666993553840522239787479567412806226997545642698201e+40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.233339502372167653077823100186702309252932859938068579827741608727620372e+39, "1.233339502372167653077823100186702309252932859938068579827741608727620372e+39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.836417632015534931979173072268670137192644539820843175043472436022533106e+37, "3.836417632015534931979173072268670137192644539820843175043472436022533106e+37", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.099476078371695988128239701316213720767789442435824569996795481661867708e+36, "1.099476078371695988128239701316213720767789442435824569996795481661867708e+36", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.903495249944998411669955533495843613032560579446280190215596256375769138e+34, "2.903495249944998411669955533495843613032560579446280190215596256375769138e+34", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.064350138053898858268455142115215057417819864153422362951139202939062254e+32, "7.064350138053898858268455142115215057417819864153422362951139202939062254e+32", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.582922994233975143266417356893351025577967930478759984258796518122317112e+31, "1.582922994233975143266417356893351025577967930478759984258796518122317112e+31", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.264234026390622585348908134631186844315412961960282698027228844566912117e+29, "3.264234026390622585348908134631186844315412961960282698027228844566912117e+29", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.188774153889105680535092985608022230760508397240005354866271201170463092e+27, "6.188774153889105680535092985608022230760508397240005354866271201170463092e+27", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.077355341399798609786211120408446935756994848842131485074396331912972263e+26, "1.077355341399798609786211120408446935756994848842131485074396331912972263e+26", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.719182300108746375704686202821491852452619639378413670885143111968297622e+24, "1.719182300108746375704686202821491852452619639378413670885143111968297622e+24", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.509589596583338412898049035294868361167322854043341291672085090640104583e+22, "2.509589596583338412898049035294868361167322854043341291672085090640104583e+22", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.342872197271389972201661238004898097226547537612646678471852083509061055e+20, "3.342872197271389972201661238004898097226547537612646678471852083509061055e+20", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.051089551701679946626603411942133093477647785693757342688765248578133558e+18, "4.051089551701679946626603411942133093477647785693757342688765248578133558e+18", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.450407423742747934005020832364099630124534867513398798024857849571995697e+16, "4.450407423742747934005020832364099630124534867513398798024857849571995697e+16", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.413023778896356322547226273989314105826233010702360664846872922408122652e+14, "4.413023778896356322547226273989314105826233010702360664846872922408122652e+14", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.929512168994516762673517469057078217752079550440541815733308359698355209e+12, "3.929512168994516762673517469057078217752079550440541815733308359698355209e+12", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.122462776963280343259527700358220850883119067227711325233658329309622143e+10, "3.122462776963280343259527700358220850883119067227711325233658329309622143e+10", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.197396290684303702682694949348422316362810937601334045965871833844532390e+08, "2.197396290684303702682694949348422316362810937601334045965871833844532390e+08", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.356726450420886407112529306259506900505875228060535982041959265851381932e+06, "1.356726450420886407112529306259506900505875228060535982041959265851381932e+06", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.263148912218322814862431970673685825699419657740452507847522864799628960e+03, "7.263148912218322814862431970673685825699419657740452507847522864799628960e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.320663245567314255422944457710191091603773917350053498982455870821336578e+01, "3.320663245567314255422944457710191091603773917350053498982455870821336578e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.270816501767199044429825237923512258332267743288560304635568302760089360e-01, "1.270816501767199044429825237923512258332267743288560304635568302760089360e-01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.960034133400021433681975737071902053498506976351095156717280432287769760e-04, "3.960034133400021433681975737071902053498506976351095156717280432287769760e-04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.650907660437171004901238983264357806498757360812524606971708594836581635e-07, "9.650907660437171004901238983264357806498757360812524606971708594836581635e-07", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.725344352001816640635025885398718044955247687225228912342703408863775468e-09, "1.725344352001816640635025885398718044955247687225228912342703408863775468e-09", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.012213341659767638341287600182102653785253052492980766472349845276996656e-12, "2.012213341659767638341287600182102653785253052492980766472349845276996656e-12", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.148735984247176123115370642724455566337349193609892794757225210307646070e-15, "1.148735984247176123115370642724455566337349193609892794757225210307646070e-15", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[49] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.586232415111681806429643551536119799691976323891200000000000000000000000e+59, "2.586232415111681806429643551536119799691976323891200000000000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.147760594457772724544789095126583405046340554378444800000000000000000000e+60, "1.147760594457772724544789095126583405046340554378444800000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.336873167741057974874912069439520834275222024827699200000000000000000000e+60, "2.336873167741057974874912069439520834275222024827699200000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.939317717948202275053279980882650292343063152909352960000000000000000000e+60, "2.939317717948202275053279980882650292343063152909352960000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.587321266207338310075066414082486631849657629849681920000000000000000000e+60, "2.587321266207338310075066414082486631849657629849681920000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.708759679197182632355739853743909528366304368999677296640000000000000000e+60, "1.708759679197182632355739853743909528366304368999677296640000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.853793140116069180377738686747691213170064352110549401600000000000000000e+59, "8.853793140116069180377738686747691213170064352110549401600000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.712847307796887697739638943011607706661342285570961571840000000000000000e+59, "3.712847307796887697739638943011607706661342285570961571840000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.289323070446191229806483814370209648903283093834096836608000000000000000e+59, "1.289323070446191229806483814370209648903283093834096836608000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.773184626371587855448424329320482554352785932897781894348800000000000000e+58, "3.773184626371587855448424329320482554352785932897781894348800000000000000e+58", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.435061276344423987072041299926950982073631843385358712832000000000000000e+57, "9.435061276344423987072041299926950982073631843385358712832000000000000000e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.038454928643566553335326814205831024316152779380233211904000000000000000e+57, "2.038454928643566553335326814205831024316152779380233211904000000000000000e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.839990097014298964461251746728788062040820983609914982400000000000000000e+56, "3.839990097014298964461251746728788062040820983609914982400000000000000000e+56", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.354892309375504992458915625473361082395092049509521612800000000000000000e+55, "6.354892309375504992458915625473361082395092049509521612800000000000000000e+55", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.297725282262744672148100400166565576520346155229059072000000000000000000e+54, "9.297725282262744672148100400166565576520346155229059072000000000000000000e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.209049614463758144562437732220821438434464881014066944000000000000000000e+54, "1.209049614463758144562437732220821438434464881014066944000000000000000000e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.403659584108905732081564809222007746403637980496076800000000000000000000e+53, "1.403659584108905732081564809222007746403637980496076800000000000000000000e+53", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.460430771262504410833767704612689276896332359898060800000000000000000000e+52, "1.460430771262504410833767704612689276896332359898060800000000000000000000e+52", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.366143204159002782577065768878538489390347732147072000000000000000000000e+51, "1.366143204159002782577065768878538489390347732147072000000000000000000000e+51", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.152069768627836143111498892510529224478160293107040000000000000000000000e+50, "1.152069768627836143111498892510529224478160293107040000000000000000000000e+50", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.778134072359739526905845579458057851415301312320000000000000000000000000e+48, "8.778134072359739526905845579458057851415301312320000000000000000000000000e+48", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.054274336803456047167091188388392791058897181680000000000000000000000000e+47, "6.054274336803456047167091188388392791058897181680000000000000000000000000e+47", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.785217864372490349864295597961987080566291959200000000000000000000000000e+46, "3.785217864372490349864295597961987080566291959200000000000000000000000000e+46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.147675745636024418606666386969855430516329329000000000000000000000000000e+45, "2.147675745636024418606666386969855430516329329000000000000000000000000000e+45", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.106702410770888109717062552947599620817425600000000000000000000000000000e+44, "1.106702410770888109717062552947599620817425600000000000000000000000000000e+44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.181697115208175590688403931524236804258068000000000000000000000000000000e+42, "5.181697115208175590688403931524236804258068000000000000000000000000000000e+42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.204691425427143998305817115095088274690720000000000000000000000000000000e+41, "2.204691425427143998305817115095088274690720000000000000000000000000000000e+41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.522623270425567317240421434031487657474000000000000000000000000000000000e+39, "8.522623270425567317240421434031487657474000000000000000000000000000000000e+39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.991703958167186325234691030612357960000000000000000000000000000000000000e+38, "2.991703958167186325234691030612357960000000000000000000000000000000000000e+38", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.527992642977421966550442489563632412000000000000000000000000000000000000e+36, "9.527992642977421966550442489563632412000000000000000000000000000000000000e+36", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.749637581210127837980751990835613680000000000000000000000000000000000000e+35, "2.749637581210127837980751990835613680000000000000000000000000000000000000e+35", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.178189516884684460466301376197071000000000000000000000000000000000000000e+33, "7.178189516884684460466301376197071000000000000000000000000000000000000000e+33", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.691582574877344639525149014665600000000000000000000000000000000000000000e+32, "1.691582574877344639525149014665600000000000000000000000000000000000000000e+32", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.588845541974326926673272048872000000000000000000000000000000000000000000e+30, "3.588845541974326926673272048872000000000000000000000000000000000000000000e+30", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.832472360434176596931313852800000000000000000000000000000000000000000000e+28, "6.832472360434176596931313852800000000000000000000000000000000000000000000e+28", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.162585907585797437278546956000000000000000000000000000000000000000000000e+27, "1.162585907585797437278546956000000000000000000000000000000000000000000000e+27", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.759447826405610148821312000000000000000000000000000000000000000000000000e+25, "1.759447826405610148821312000000000000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.354174640292022182957920000000000000000000000000000000000000000000000000e+23, "2.354174640292022182957920000000000000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.764512833139771127128000000000000000000000000000000000000000000000000000e+21, "2.764512833139771127128000000000000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.823199175622735427100000000000000000000000000000000000000000000000000000e+19, "2.823199175622735427100000000000000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.478468141272164800000000000000000000000000000000000000000000000000000000e+17, "2.478468141272164800000000000000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.842713641648132000000000000000000000000000000000000000000000000000000000e+15, "1.842713641648132000000000000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.137488170420800000000000000000000000000000000000000000000000000000000000e+13, "1.137488170420800000000000000000000000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.672014134600000000000000000000000000000000000000000000000000000000000000e+10, "5.672014134600000000000000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.194862400000000000000000000000000000000000000000000000000000000000000000e+08, "2.194862400000000000000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.183320000000000000000000000000000000000000000000000000000000000000000000e+05, "6.183320000000000000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.128000000000000000000000000000000000000000000000000000000000000000000000e+03, "1.128000000000000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[48] = { + static_cast(boost::math::tools::make_big_value( 1.233965513689195496302526816415068018137532804347903252026160914018410959e+01, "1.233965513689195496302526816415068018137532804347903252026160914018410959e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.432567696701419045483804034990696504881298696037704685583731202573594084e+02, "-1.432567696701419045483804034990696504881298696037704685583731202573594084e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.800990151010204780591569831451389602736047219596430673280355834870101274e+02, "7.800990151010204780591569831451389602736047219596430673280355834870101274e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.648373417629954217779547889047207255669324591553480603234009701221311635e+03, "-2.648373417629954217779547889047207255669324591553480603234009701221311635e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.284437059737535030909183878223579768026497336818714964176813046702885009e+03, "6.284437059737535030909183878223579768026497336818714964176813046702885009e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.107670081863262975759677889098250504331506870772724719160419469778560968e+04, "-1.107670081863262975759677889098250504331506870772724719160419469778560968e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.504360049237893454280746661699303420195288960483588101185311510511921407e+04, "1.504360049237893454280746661699303420195288960483588101185311510511921407e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.611963690317610801367925234041815344408602188860817148261094946859641055e+04, "-1.611963690317610801367925234041815344408602188860817148261094946859641055e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.384196825969374886217890731633708081987015968697189525652444057097652970e+04, "1.384196825969374886217890731633708081987015968697189525652444057097652970e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.622790278065968351142661698209916105231451436587332112667311309898112907e+03, "-9.622790278065968351142661698209916105231451436587332112667311309898112907e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.449580263451402816852387882691399098166718792531955596134468390704873784e+03, "5.449580263451402816852387882691399098166718792531955596134468390704873784e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.521891259305373384442177581056279631601936059906718384076120380236152660e+03, "-2.521891259305373384442177581056279631601936059906718384076120380236152660e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.540905879286304237452585078525021002948388724011947750659051968465604420e+02, "9.540905879286304237452585078525021002948388724011947750659051968465604420e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.945234350579576646146368625320015500721771847656877764914364796999018932e+02, "-2.945234350579576646146368625320015500721771847656877764914364796999018932e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.387416831492605275144126841246803690906548552137287238128485938487779304e+01, "7.387416831492605275144126841246803690906548552137287238128485938487779304e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.495798927786732788454640929952042349030889163403974404914516146280530443e+01, "-1.495798927786732788454640929952042349030889163403974404914516146280530443e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.422943482445615791699986810123527175351383953692494761445061153868299970e+00, "2.422943482445615791699986810123527175351383953692494761445061153868299970e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.102903565532198274392276413606953369815588940855811878456066484772851432e-01, "-3.102903565532198274392276413606953369815588940855811878456066484772851432e-01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.094535028891646496546262084074169534843273855151767819779938179094208188e-02, "3.094535028891646496546262084074169534843273855151767819779938179094208188e-02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.358095366769232988323350838247191988585424776577310286935330610243011743e-03, "-2.358095366769232988323350838247191988585424776577310286935330610243011743e-03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.340530976890392038064297300042596231921772020705486053763028541479656280e-04, "1.340530976890392038064297300042596231921772020705486053763028541479656280e-04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.516126555541810552632615941497264105370152230590961486150754875983890898e-06, "-5.516126555541810552632615941497264105370152230590961486150754875983890898e-06", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.581070770182358530034488215134552244420314579258249233845063889274308385e-07, "1.581070770182358530034488215134552244420314579258249233845063889274308385e-07", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.004041803560396287949218893554883846494476801309699018606217164405518118e-09, "-3.004041803560396287949218893554883846494476801309699018606217164405518118e-09", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.544940513373792201443764129828570298376651506143103507977578771056330357e-11, "3.544940513373792201443764129828570298376651506143103507977578771056330357e-11", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.379886756316120706725450388823927894039691498002769785120646242635823255e-13, "-2.379886756316120706725450388823927894039691498002769785120646242635823255e-13", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.045944766231461555774689284231476775257484866624431880423176393512207387e-16, "8.045944766231461555774689284231476775257484866624431880423176393512207387e-16", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.148008349481903710728852060629194581596537318553456161574664356163226596e-18, "-1.148008349481903710728852060629194581596537318553456161574664356163226596e-18", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.275939213508899016428747078031525836021120921513924955762486505940940452e-22, "5.275939213508899016428747078031525836021120921513924955762486505940940452e-22", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.002074313199153828387282409848698339315167131865367803807278126600553143e-26, "-5.002074313199153828387282409848698339315167131865367803807278126600553143e-26", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.312111841788085794021549817149806212210409562054999023338937587332395908e-31, "4.312111841788085794021549817149806212210409562054999023338937587332395908e-31", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.626943187621427535665396572257733498961554813667830477603994486170242725e-38, "-5.626943187621427535665396572257733498961554813667830477603994486170242725e-38", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.301342661659868689654008011518619781951990528882947953585638647826710208e-40, "1.301342661659868689654008011518619781951990528882947953585638647826710208e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.943206436729179344584590804980950978078020765463364229230497237642990035e-40, "-1.943206436729179344584590804980950978078020765463364229230497237642990035e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.427985516258891942239250982488681113868086410604389604401061682071089711e-40, "2.427985516258891942239250982488681113868086410604389604401061682071089711e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.507315406936486999900039292673781706696418133992677762607195734544800586e-40, "-2.507315406936486999900039292673781706696418133992677762607195734544800586e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.128602212783277628616662270027724563712726585388232543952969868791288808e-40, "2.128602212783277628616662270027724563712726585388232543952969868791288808e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.491772665541813784561971549986243397968726526748411110109050933398474269e-40, "-1.491772665541813784561971549986243397968726526748411110109050933398474269e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.703534948980953284999107504304646577995487754638088095508324603995172100e-41, "8.703534948980953284999107504304646577995487754638088095508324603995172100e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.254734374358011114570777363031532176229997594050978074992481078060588238e-41, "-4.254734374358011114570777363031532176229997594050978074992481078060588238e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.744400882431682663010546719169103111178937911186079762496396144974231758e-41, "1.744400882431682663010546719169103111178937911186079762496396144974231758e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.962681142344559707919656870822506290159603512929253279249408502104315114e-42, "-5.962681142344559707919656870822506290159603512929253279249408502104315114e-42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.676028721091677637759913537058723470799950761402802553076562435074866681e-42, "1.676028721091677637759913537058723470799950761402802553076562435074866681e-42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.784145301171889911387402141919770031244273301985414474074193734901497838e-43, "-3.784145301171889911387402141919770031244273301985414474074193734901497838e-43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.609382025715763421062067113377305459236198785081684246167946524325632358e-44, "6.609382025715763421062067113377305459236198785081684246167946524325632358e-44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.390549764136377795654766730143252213193890014751189315315457960953487009e-45, "-8.390549764136377795654766730143252213193890014751189315315457960953487009e-45", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.892571860428412953244204670046307154753124542150699703190076405369134986e-46, "6.892571860428412953244204670046307154753124542150699703190076405369134986e-46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.750996769906711001487027901108989269217518777400665423098451353536180397e-47, "-2.750996769906711001487027901108989269217518777400665423098451353536180397e-47", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[48] = { + static_cast(boost::math::tools::make_big_value( 1.614127734928823683399031924928203896697519780457812139739363243361356121e+02, "1.614127734928823683399031924928203896697519780457812139739363243361356121e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.873915620620241270111954934939697069495813017577862172724257417200307532e+03, "-1.873915620620241270111954934939697069495813017577862172724257417200307532e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.020433263568799913803105156119729477192007677199414299858195073560627451e+04, "1.020433263568799913803105156119729477192007677199414299858195073560627451e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.464288862550385816890047588667703388387049707546055857832236105882063068e+04, "-3.464288862550385816890047588667703388387049707546055857832236105882063068e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.220557255453323997837181773609238378313171107809994660932186398177260086e+04, "8.220557255453323997837181773609238378313171107809994660932186398177260086e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.448922988893760252035044756495535237100474172953062930583429032976738764e+05, "-1.448922988893760252035044756495535237100474172953062930583429032976738764e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.967825884804576295373543809345485166700533400342174877153161242305801190e+05, "1.967825884804576295373543809345485166700533400342174877153161242305801190e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.108580240999530194943835615053920860235079936071561387017856553284307741e+05, "-2.108580240999530194943835615053920860235079936071561387017856553284307741e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.810642568703399030220299393722324927217417866857948859237865608524037352e+05, "1.810642568703399030220299393722324927217417866857948859237865608524037352e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.258739608434628125323282855631713548863857229929349389847042534864564944e+05, "-1.258739608434628125323282855631713548863857229929349389847042534864564944e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.128496339139347963949841917163532287235353252857530075762245657435637432e+04, "7.128496339139347963949841917163532287235353252857530075762245657435637432e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.298839862995292241245807816785011319551976707839297599695370993581498944e+04, "-3.298839862995292241245807816785011319551976707839297599695370993581498944e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.248028459892634227909925496833936295152351078572924268478121601580013392e+04, "1.248028459892634227909925496833936295152351078572924268478121601580013392e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.852607223132643180520259993802350485519940462836224552121831884016060957e+03, "-3.852607223132643180520259993802350485519940462836224552121831884016060957e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.663344935420648740647632834149137036410170363282848810726789852512040974e+02, "9.663344935420648740647632834149137036410170363282848810726789852512040974e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.956627238308290890004850312580119602770863155061517303602115059073018915e+02, "-1.956627238308290890004850312580119602770863155061517303602115059073018915e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.169408084580850119987259593698335014334975914638255180200227109093248923e+01, "3.169408084580850119987259593698335014334975914638255180200227109093248923e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.058851441448441752395908342271882717629330686791993331066549580482119207e+00, "-4.058851441448441752395908342271882717629330686791993331066549580482119207e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.047904711622988136321913253467026391205138759157051345098701122533901641e-01, "4.047904711622988136321913253467026391205138759157051345098701122533901641e-01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.084581449711468658856874852797634685668605539676219540421511092086784257e-02, "-3.084581449711468658856874852797634685668605539676219540421511092086784257e-02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.753524069615947925605286028020036313127948537531901833841745089038345419e-03, "1.753524069615947925605286028020036313127948537531901833841745089038345419e-03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.215544327537876774584851905154058374732203881621234998864896154317725107e-05, "-7.215544327537876774584851905154058374732203881621234998864896154317725107e-05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.068169776809028066872463505146223239383722607505095101927453621607143258e-06, "2.068169776809028066872463505146223239383722607505095101927453621607143258e-06", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.929532177536816530254915957100118239727512976366989010196601003141928983e-08, "-3.929532177536816530254915957100118239727512976366989010196601003141928983e-08", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.637071893688824301043677755554700799944720607401583032240419889530137613e-10, "4.637071893688824301043677755554700799944720607401583032240419889530137613e-10", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.113086368090515818656083953394041201305628629939937324183681568207995992e-12, "-3.113086368090515818656083953394041201305628629939937324183681568207995992e-12", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.052475329075586591944149534403412432330839345810529801140374324740860043e-14, "1.052475329075586591944149534403412432330839345810529801140374324740860043e-14", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.501688739492061913271178171928421774535209059448213231063121542726735922e-17, "-1.501688739492061913271178171928421774535209059448213231063121542726735922e-17", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.901359655394917555561825304708227606591126162154019191593957327845941711e-21, "6.901359655394917555561825304708227606591126162154019191593957327845941711e-21", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.543121984804052902464306048576584437634232699686221158393201347605610557e-25, "-6.543121984804052902464306048576584437634232699686221158393201347605610557e-25", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.640594686585611716813857202286477090235259523435190405734068397561049518e-30, "5.640594686585611716813857202286477090235259523435190405734068397561049518e-30", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.360501538535076761830231649645320930651740695652757112015168140991871811e-37, "-7.360501538535076761830231649645320930651740695652757112015168140991871811e-37", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.702262550718545671102818966852852449667460777654069395734978498316238097e-39, "1.702262550718545671102818966852852449667460777654069395734978498316238097e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.541872823365472358451692936741339351955915607098512711275660224596475692e-39, "-2.541872823365472358451692936741339351955915607098512711275660224596475692e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.176003476857354088823169817786505980377842772003301806663816129924483628e-39, "3.176003476857354088823169817786505980377842772003301806663816129924483628e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.279773456918425628141724849602711155924011970103858226014129388572719403e-39, "-3.279773456918425628141724849602711155924011970103858226014129388572719403e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.784385649492108496180681575852127700091310578360977342260193352159187181e-39, "2.784385649492108496180681575852127700091310578360977342260193352159187181e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.951360558254817806983487356566692526413661637802019026539779594905551108e-39, "-1.951360558254817806983487356566692526413661637802019026539779594905551108e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.138493498985334706374097781200574458692873800531006014767134080212447095e-39, "1.138493498985334706374097781200574458692873800531006014767134080212447095e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.565540270144127561133019747139820473778629043608866511009741796439135919e-40, "-5.565540270144127561133019747139820473778629043608866511009741796439135919e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.281818911412862056602174736820614290615384940807745468773991962352596562e-40, "2.281818911412862056602174736820614290615384940807745468773991962352596562e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.799674220733213250330301520376602557698625350979839820580611411813901622e-41, "-7.799674220733213250330301520376602557698625350979839820580611411813901622e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.192382536820850868749995412323169490150589703968805623276375892630104761e-41, "2.192382536820850868749995412323169490150589703968805623276375892630104761e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.949971304595638285364920838869349221534754917093372730956379282259345856e-42, "-4.949971304595638285364920838869349221534754917093372730956379282259345856e-42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.645611826340683772044616248727903964535937439036743879074020086333544390e-43, "8.645611826340683772044616248727903964535937439036743879074020086333544390e-43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.097552479007470044347986004697357054639788223386746160457893283010512693e-43, "-1.097552479007470044347986004697357054639788223386746160457893283010512693e-43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.016047273189589762707582112298788030798897468010511171850691914431226857e-45, "9.016047273189589762707582112298788030798897468010511171850691914431226857e-45", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.598528593988298984798384438686079221879557020145063999565131046963034260e-46, "-3.598528593988298984798384438686079221879557020145063999565131046963034260e-46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 3.531905273437499914734871708787977695465087890625000000000000000000000000e+01; } +}; + +inline double lanczos_g_near_1_and_2(const lanczos49MP&) +{ + return 33.54638671875000; +} + + + + + + + +struct lanczos52MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[52] = { + static_cast(boost::math::tools::make_big_value( 6.2155666558597192337239536765115831322604714024167432764126799013946738944179064162e+86, "6.2155666558597192337239536765115831322604714024167432764126799013946738944179064162e+86", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.4127424062560995063147129656553600039438028633959646865531341376543275935920940510e+86, "6.4127424062560995063147129656553600039438028633959646865531341376543275935920940510e+86", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2432219642804430367752303997394644425738553439619047355470691880100895245432999409e+86, "3.2432219642804430367752303997394644425738553439619047355470691880100895245432999409e+86", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0716287209474721369403884015994122665163651602768597920624758793936677215462844844e+86, "1.0716287209474721369403884015994122665163651602768597920624758793936677215462844844e+86", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6014675657079399574912415792629561012344641595734333223485162579517263855066064448e+85, "2.6014675657079399574912415792629561012344641595734333223485162579517263855066064448e+85", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.9469676695440316675866392095745726625355531618465991865275205877617243118858829897e+84, "4.9469676695440316675866392095745726625355531618465991865275205877617243118858829897e+84", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.6725271559955312030697432949232367888201769834554225137624859446813736913045818789e+83, "7.6725271559955312030697432949232367888201769834554225137624859446813736913045818789e+83", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.9780497929717466762906957902715326245615108291247102827737801883575021795143342955e+82, "9.9780497929717466762906957902715326245615108291247102827737801883575021795143342955e+82", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1101996681004003890634693624249367763382356608502270377869975360325542360496573703e+82, "1.1101996681004003890634693624249367763382356608502270377869975360325542360496573703e+82", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0730494939748425861290791265310097852481749101609248058586423168275758843014930972e+81, "1.0730494939748425861290791265310097852481749101609248058586423168275758843014930972e+81", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.1172053614337336389459663390209768009612090987295451850767107564157925998672033369e+79, "9.1172053614337336389459663390209768009612090987295451850767107564157925998672033369e+79", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.8745706482859815560001340912167784132864948819270481387088631069414787418480398968e+78, "6.8745706482859815560001340912167784132864948819270481387088631069414787418480398968e+78", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.6357176185157048005266104227745750047123126912102898052446617690907900639513363491e+77, "4.6357176185157048005266104227745750047123126912102898052446617690907900639513363491e+77", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8133959284164525780065088214012765730887094925955713435258703832914376223639644932e+76, "2.8133959284164525780065088214012765730887094925955713435258703832914376223639644932e+76", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5448240429477602353083070839059087571962149587434416045281607922549720081768160509e+75, "1.5448240429477602353083070839059087571962149587434416045281607922549720081768160509e+75", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.7087163798498299832185901789792446192843546181020939291287863440328666852365937976e+73, "7.7087163798498299832185901789792446192843546181020939291287863440328666852365937976e+73", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.5087881343681529988104227139117041222747015656224230641710513581568311157611360164e+72, "3.5087881343681529988104227139117041222747015656224230641710513581568311157611360164e+72", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4613990031561986058105893353533330535471171288800176856715938119122276074192401252e+71, "1.4613990031561986058105893353533330535471171288800176856715938119122276074192401252e+71", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.5842870550209699690118875938391296069620575640884684638841925128818533345720622707e+69, "5.5842870550209699690118875938391296069620575640884684638841925128818533345720622707e+69", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.9620974233284411294099207169175001352700074635064713292874723705223947089062735699e+68, "1.9620974233284411294099207169175001352700074635064713292874723705223947089062735699e+68", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.3508670578887212089913735806070046196943428333276779526487779234259460474649929457e+66, "6.3508670578887212089913735806070046196943428333276779526487779234259460474649929457e+66", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.8965656059697746722951241391165378222796048954133067890004635351203115571283351365e+65, "1.8965656059697746722951241391165378222796048954133067890004635351203115571283351365e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.2318932193708961851167812069245962898666936025147808964284039760031905048392189838e+63, "5.2318932193708961851167812069245962898666936025147808964284039760031905048392189838e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3345087899695578368548637479429057252399026780996532026306572668368481753083446035e+62, "1.3345087899695578368548637479429057252399026780996532026306572668368481753083446035e+62", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1496377806602727082710361157715063723084394483433707624016834119253720339362659524e+60, "3.1496377806602727082710361157715063723084394483433707624016834119253720339362659524e+60", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.8813988021021593903128761372635593523664342047294885462297735355749747492567917846e+58, "6.8813988021021593903128761372635593523664342047294885462297735355749747492567917846e+58", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3920956168650489448209669451137968296707297452484593173253158710325555644182737609e+57, "1.3920956168650489448209669451137968296707297452484593173253158710325555644182737609e+57", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6075799130233642952967048487438119546115615639287311948474085370143960495152991553e+55, "2.6075799130233642952967048487438119546115615639287311948474085370143960495152991553e+55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.5215062065032735365892761801093050964342794846560150713881139044884954246649618411e+53, "4.5215062065032735365892761801093050964342794846560150713881139044884954246649618411e+53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.2544625196666558309461059934941389307783421507071758131936839820683873609174384275e+51, "7.2544625196666558309461059934941389307783421507071758131936839820683873609174384275e+51", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0762146929190267795931737389984769617036500590695127135611707890269647516827819385e+50, "1.0762146929190267795931737389984769617036500590695127135611707890269647516827819385e+50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4748530311527356370488285932357594780386892716488623785717991900210848418789146683e+48, "1.4748530311527356370488285932357594780386892716488623785717991900210848418789146683e+48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.8647515097879595082625933421641550420004206477055484917914396725134286781971556627e+46, "1.8647515097879595082625933421641550420004206477055484917914396725134286781971556627e+46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1719649433541326415406560692060639805792580579388667358862336598215919709516402950e+44, "2.1719649433541326415406560692060639805792580579388667358862336598215919709516402950e+44", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.3261545166351967601378626266818200343311913249759151579277193749871910741821474852e+42, "2.3261545166351967601378626266818200343311913249759151579277193749871910741821474852e+42", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2856597199911108057679518458817252978491416960383076400280909448497251424577297828e+40, "2.2856597199911108057679518458817252978491416960383076400280909448497251424577297828e+40", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0550442252418806202988575468283015522717243147245311227478147425985867569431393246e+38, "2.0550442252418806202988575468283015522717243147245311227478147425985867569431393246e+38", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6853992677311201643273807677942992750803865734634293875367989072577697582186788546e+36, "1.6853992677311201643273807677942992750803865734634293875367989072577697582186788546e+36", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2561436609157539906689091056055983931948431067099841829117491622768568140084478954e+34, "1.2561436609157539906689091056055983931948431067099841829117491622768568140084478954e+34", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.4705206401662673954957473131998048608819946981033942322942114785407455940229233196e+31, "8.4705206401662673954957473131998048608819946981033942322942114785407455940229233196e+31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.1407133281903210341367420024686210845937006762879607281383052013961468193494392782e+29, "5.1407133281903210341367420024686210845937006762879607281383052013961468193494392782e+29", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.7901285852211406723998154843259068960125192963338996339928284868353890653815257694e+27, "2.7901285852211406723998154843259068960125192963338996339928284868353890653815257694e+27", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3438998631585891046402379167404007265944767353624748363650936091693896699924614422e+25, "1.3438998631585891046402379167404007265944767353624748363650936091693896699924614422e+25", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.6902706401090767936392657986442523138728548699749092883267263725876049498265301615e+22, "5.6902706401090767936392657986442523138728548699749092883267263725876049498265301615e+22", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0929659841192947874271802260842934838560431084502779238527946412041140734245143884e+20, "2.0929659841192947874271802260842934838560431084502779238527946412041140734245143884e+20", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5862712170406726646812829026907981494912831615106789457689818325123973212320279526e+17, "6.5862712170406726646812829026907981494912831615106789457689818325123973212320279526e+17", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7379005522986464990683100411983090503131358664627225315444053238030719367736285441e+15, "1.7379005522986464990683100411983090503131358664627225315444053238030719367736285441e+15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.7401492854176051649551304067922101744785432102294852270917872876250420006402939364e+12, "3.7401492854176051649551304067922101744785432102294852270917872876250420006402939364e+12", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.3052097444388598287826452442622724171650622602495079541553039504582845036611195233e+09, "6.3052097444388598287826452442622724171650622602495079541553039504582845036611195233e+09", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.8093796662195533917872631136981728293723308532958487302137409818490410036072819019e+06, "7.8093796662195533917872631136981728293723308532958487302137409818490410036072819019e+06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.3192906485096381210566149918556620595525679738152760526187454875638091923687554946e+03, "6.3192906485096381210566149918556620595525679738152760526187454875638091923687554946e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.5066282746310005024157652848110452530069867406099383166299235763422936546004304390e+00, "2.5066282746310005024157652848110452530069867406099383166299235763422936546004304390e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[52] = { + static_cast(boost::math::tools::make_big_value( 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0414093201713378043612608166064768844377641568960512000000000000000000000000000000e+64, "3.0414093201713378043612608166064768844377641568960512000000000000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3683925049359750564345782687270252191318781054337155072000000000000000000000000000e+65, "1.3683925049359750564345782687270252191318781054337155072000000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8312047394413543873001574618939688475496532684433218600960000000000000000000000000e+65, "2.8312047394413543873001574618939688475496532684433218600960000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.6266290361540649084000356943724186480051615706407501824000000000000000000000000000e+65, "3.6266290361540649084000356943724186480051615706407501824000000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2578261522689833134479268958172001145701798207577980403712000000000000000000000000e+65, "3.2578261522689833134479268958172001145701798207577980403712000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2001844261052005486660334218376501837226733355004196185702400000000000000000000000e+65, "2.2001844261052005486660334218376501837226733355004196185702400000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1681037008119350981332433342566749327534832358109654944841728000000000000000000000e+65, "1.1681037008119350981332433342566749327534832358109654944841728000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.0293361153311185534392570196926631029364162024577328008396800000000000000000000000e+64, "5.0293361153311185534392570196926631029364162024577328008396800000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7968291458361430782020246122299560311802074147902210076049408000000000000000000000e+64, "1.7968291458361430782020246122299560311802074147902210076049408000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4212998306869600977887871207212578754682594793002122395254784000000000000000000000e+63, "5.4212998306869600977887871207212578754682594793002122395254784000000000000000000000e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4006322967557247180769968530346138316658911433773347563153653760000000000000000000e+63, "1.4006322967557247180769968530346138316658911433773347563153653760000000000000000000e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1334912462852682149761710693821775975226278702191992823808000000000000000000000000e+62, "3.1334912462852682149761710693821775975226278702191992823808000000000000000000000000e+62", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.1263921790865468343839418571823409266633338824655665334886400000000000000000000000e+61, "6.1263921790865468343839418571823409266633338824655665334886400000000000000000000000e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0548002159482240692664043366538929906734975613031337827840000000000000000000000000e+61, "1.0548002159482240692664043366538929906734975613031337827840000000000000000000000000e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6095781466700764043324234378972985924892034584990590768742400000000000000000000000e+60, "1.6095781466700764043324234378972985924892034584990590768742400000000000000000000000e+60", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1887214284827766716471402753528692603931747042835394432000000000000000000000000000e+59, "2.1887214284827766716471402753528692603931747042835394432000000000000000000000000000e+59", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6644926572075096083148238618984385847884240529010940198400000000000000000000000000e+58, "2.6644926572075096083148238618984385847884240529010940198400000000000000000000000000e+58", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9154102380883742873084802432628398856163736124576909120000000000000000000000000000e+57, "2.9154102380883742873084802432628398856163736124576909120000000000000000000000000000e+57", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8768151045628896730547232493410634338494669305466040192000000000000000000000000000e+56, "2.8768151045628896730547232493410634338494669305466040192000000000000000000000000000e+56", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.5674503027583263140245049650089911892130421780961760000000000000000000000000000000e+55, "2.5674503027583263140245049650089911892130421780961760000000000000000000000000000000e+55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0774565729992714117801952876016228015049549176491224000000000000000000000000000000e+54, "2.0774565729992714117801952876016228015049549176491224000000000000000000000000000000e+54", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5271995659293168127377699172748774995796493494870600000000000000000000000000000000e+53, "1.5271995659293168127377699172748774995796493494870600000000000000000000000000000000e+53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0217297271367563021376459886512004721472442416486880000000000000000000000000000000e+52, "1.0217297271367563021376459886512004721472442416486880000000000000000000000000000000e+52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.2295402510227377004563262212164474005108576587500000000000000000000000000000000000e+50, "6.2295402510227377004563262212164474005108576587500000000000000000000000000000000000e+50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4652078765044198452095090589463630638929867781650000000000000000000000000000000000e+49, "3.4652078765044198452095090589463630638929867781650000000000000000000000000000000000e+49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7599751702378955591170076678443001141850220448750000000000000000000000000000000000e+48, "1.7599751702378955591170076678443001141850220448750000000000000000000000000000000000e+48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.1661954970720573655661780303655361431161958585000000000000000000000000000000000000e+46, "8.1661954970720573655661780303655361431161958585000000000000000000000000000000000000e+46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4624589782073664468902246801624082962588775000000000000000000000000000000000000000e+45, "3.4624589782073664468902246801624082962588775000000000000000000000000000000000000000e+45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3415303241063823936930939721131813816093940000000000000000000000000000000000000000e+44, "1.3415303241063823936930939721131813816093940000000000000000000000000000000000000000e+44", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7484118887814252101652801793318408875609500000000000000000000000000000000000000000e+42, "4.7484118887814252101652801793318408875609500000000000000000000000000000000000000000e+42", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5345701242523770267594030980609724717749800000000000000000000000000000000000000000e+41, "1.5345701242523770267594030980609724717749800000000000000000000000000000000000000000e+41", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.5242293875075726230709587746676742825000000000000000000000000000000000000000000000e+39, "4.5242293875075726230709587746676742825000000000000000000000000000000000000000000000e+39", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2153799706792737162996155167868591485000000000000000000000000000000000000000000000e+38, "1.2153799706792737162996155167868591485000000000000000000000000000000000000000000000e+38", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9704836232659058554494106146940431250000000000000000000000000000000000000000000000e+36, "2.9704836232659058554494106146940431250000000000000000000000000000000000000000000000e+36", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5926306456751344865378122278650335000000000000000000000000000000000000000000000000e+34, "6.5926306456751344865378122278650335000000000000000000000000000000000000000000000000e+34", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3255133142885196993084362383550000000000000000000000000000000000000000000000000000e+33, "1.3255133142885196993084362383550000000000000000000000000000000000000000000000000000e+33", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.4074634262098477202456261501600000000000000000000000000000000000000000000000000000e+31, "2.4074634262098477202456261501600000000000000000000000000000000000000000000000000000e+31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9362537824702021303895557050000000000000000000000000000000000000000000000000000000e+29, "3.9362537824702021303895557050000000000000000000000000000000000000000000000000000000e+29", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7695574975175958167624223800000000000000000000000000000000000000000000000000000000e+27, "5.7695574975175958167624223800000000000000000000000000000000000000000000000000000000e+27", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.5430949131153796097540000000000000000000000000000000000000000000000000000000000000e+25, "7.5430949131153796097540000000000000000000000000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.7427444047045863749135000000000000000000000000000000000000000000000000000000000000e+23, "8.7427444047045863749135000000000000000000000000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.9163115009072256171250000000000000000000000000000000000000000000000000000000000000e+21, "8.9163115009072256171250000000000000000000000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9274383168492884295000000000000000000000000000000000000000000000000000000000000000e+19, "7.9274383168492884295000000000000000000000000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.0731790610548750000000000000000000000000000000000000000000000000000000000000000000e+17, "6.0731790610548750000000000000000000000000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9491312919646000000000000000000000000000000000000000000000000000000000000000000000e+15, "3.9491312919646000000000000000000000000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1366198225750000000000000000000000000000000000000000000000000000000000000000000000e+13, "2.1366198225750000000000000000000000000000000000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.3570498490000000000000000000000000000000000000000000000000000000000000000000000000e+10, "9.3570498490000000000000000000000000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1862250000000000000000000000000000000000000000000000000000000000000000000000000000e+08, "3.1862250000000000000000000000000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9135000000000000000000000000000000000000000000000000000000000000000000000000000000e+05, "7.9135000000000000000000000000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2750000000000000000000000000000000000000000000000000000000000000000000000000000000e+03, "1.2750000000000000000000000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00, "1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[52] = { + static_cast(boost::math::tools::make_big_value( 1.2968364952374867351881152115042817894191583875220489481700563388077315440993668645e+65, "1.2968364952374867351881152115042817894191583875220489481700563388077315440993668645e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3379758994539627857606593702434364057385206718035611620158459666404856221820703129e+65, "1.3379758994539627857606593702434364057385206718035611620158459666404856221820703129e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.7667661507089657936560642518188013126674666141084536651063996312630940638352438169e+64, "6.7667661507089657936560642518188013126674666141084536651063996312630940638352438169e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2358817974531517479015567958773172164495426366469934483861648449503257164430597676e+64, "2.2358817974531517479015567958773172164495426366469934483861648449503257164430597676e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4277884337482721045863559292777143585727342521289738221346249419373476553706960477e+63, "5.4277884337482721045863559292777143585727342521289738221346249419373476553706960477e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0321517843552558179026592998573667333331808062275687745076218349815677074985963362e+63, "1.0321517843552558179026592998573667333331808062275687745076218349815677074985963362e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6008215787076020416349896191435806440785263359504290408274535992043818825469757467e+62, "1.6008215787076020416349896191435806440785263359504290408274535992043818825469757467e+62", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0818534880683055883178218002277669005830432150690130666222387190067193078388546735e+61, "2.0818534880683055883178218002277669005830432150690130666222387190067193078388546735e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.3163575041638782544481444410280012073460223217514438140658322833554580013590099428e+60, "2.3163575041638782544481444410280012073460223217514438140658322833554580013590099428e+60", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2388461455413602821779255933063678852868399289922539164611151211712717693487661387e+59, "2.2388461455413602821779255933063678852868399289922539164611151211712717693487661387e+59", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.9022440433706121764851738708000810548525373575286185895490944900856672029848122464e+58, "1.9022440433706121764851738708000810548525373575286185895490944900856672029848122464e+58", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4343332795539887118781806263726922877784774015269102474184340994778721415926159254e+57, "1.4343332795539887118781806263726922877784774015269102474184340994778721415926159254e+57", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.6721153873219058826376914786734034750310419590675042405183247501763477751707551977e+55, "9.6721153873219058826376914786734034750310419590675042405183247501763477751707551977e+55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.8699628167986487178009534272364155924157279822557444996249799757685987843467799627e+54, "5.8699628167986487178009534272364155924157279822557444996249799757685987843467799627e+54", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2231722520846745745100754786781488061001048923809737738337722261187091800649653747e+53, "3.2231722520846745745100754786781488061001048923809737738337722261187091800649653747e+53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6083722187098822924476598339806607838145759265459316214837904824198871273160389130e+52, "1.6083722187098822924476598339806607838145759265459316214837904824198871273160389130e+52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.3208522386531907691637761481331075921814846045082743370064300808114976199945037122e+50, "7.3208522386531907691637761481331075921814846045082743370064300808114976199945037122e+50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0491114749931089548713463433723654679587396917777106103842119656518486449033314603e+49, "3.0491114749931089548713463433723654679587396917777106103842119656518486449033314603e+49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1651242201716492163343440840407055970036142959703118121095709130441296636187948680e+48, "1.1651242201716492163343440840407055970036142959703118121095709130441296636187948680e+48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.0937853081905503955154539906393844955264076759979726863680373891843152853217317289e+46, "4.0937853081905503955154539906393844955264076759979726863680373891843152853217317289e+46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3250660210211249438634406634827812076838178133500698949898645633350310552370070845e+45, "1.3250660210211249438634406634827812076838178133500698949898645633350310552370070845e+45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9570575453729198045577937136948643736522682229986841993417806493265120889607818521e+43, "3.9570575453729198045577937136948643736522682229986841993417806493265120889607818521e+43", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0915995985127530070498760979124015775616748288243587047367665303776535820627821806e+42, "1.0915995985127530070498760979124015775616748288243587047367665303776535820627821806e+42", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.7843635148151485646319955417265990806303645948936943738048724343049029864512194310e+40, "2.7843635148151485646319955417265990806303645948936943738048724343049029864512194310e+40", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5715089981189796608580098957107087883056675964697423692398096552244865201126563742e+38, "6.5715089981189796608580098957107087883056675964697423692398096552244865201126563742e+38", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4357579282713452366310121777478478833619311278663562587227576970753556113485917320e+37, "1.4357579282713452366310121777478478833619311278663562587227576970753556113485917320e+37", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9045145853415845950075255530781663873014618840017618405203106705648527948595759022e+35, "2.9045145853415845950075255530781663873014618840017618405203106705648527948595759022e+35", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4405414384364870662900944749199576151689786973539596080446881216688775114111401244e+33, "5.4405414384364870662900944749199576151689786973539596080446881216688775114111401244e+33", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.4338208995125086931437020109275839003754703899452696411395381222142064582727164193e+31, "9.4338208995125086931437020109275839003754703899452696411395381222142064582727164193e+31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5135951828248789401437398422210292739440102976394266807495518051141687446206426902e+30, "1.5135951828248789401437398422210292739440102976394266807495518051141687446206426902e+30", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2454501218684993019799803589484969919745689383924985827556442495293105857928357346e+28, "2.2454501218684993019799803589484969919745689383924985827556442495293105857928357346e+28", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0771824063818140076215034706980442595962662610399835096143334152833816531221628660e+26, "3.0771824063818140076215034706980442595962662610399835096143334152833816531221628660e+26", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.8906795572088352821870480514365587413988764084322141604846302060067104077934035979e+24, "3.8906795572088352821870480514365587413988764084322141604846302060067104077934035979e+24", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.5316598805398286987903918997966274192433403859480290402541541527289805994033568970e+22, "4.5316598805398286987903918997966274192433403859480290402541541527289805994033568970e+22", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.8533661333839969582529636915290426021792269810841946250308753325085094758818317464e+20, "4.8533661333839969582529636915290426021792269810841946250308753325085094758818317464e+20", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7688764431225908123092120518561018783609436337842987641148647520393460757258932651e+18, "4.7688764431225908123092120518561018783609436337842987641148647520393460757258932651e+18", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.2877126063932361367573287637428749753108811218139980724742491890986894871059180965e+16, "4.2877126063932361367573287637428749753108811218139980724742491890986894871059180965e+16", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.5164730755154849065370365582371664006783859248354506763822538105452920154803662025e+14, "3.5164730755154849065370365582371664006783859248354506763822538105452920154803662025e+14", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6208599037402680475080806960664748732421517587082652352333314249266933718172853538e+12, "2.6208599037402680475080806960664748732421517587082652352333314249266933718172853538e+12", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7673175927530323929887314159232706831613273850912577130092484125942772196619237882e+10, "1.7673175927530323929887314159232706831613273850912577130092484125942772196619237882e+10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0725755228231653548395606930605822556041123469753556193146323302002970112193491322e+08, "1.0725755228231653548395606930605822556041123469753556193146323302002970112193491322e+08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.8214170582643892131251904381692606071847290625764371754232909841174413907293095377e+05, "5.8214170582643892131251904381692606071847290625764371754232909841174413907293095377e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8039573621910762166001861467061356387294777080327106241940313632291985560896860294e+03, "2.8039573621910762166001861467061356387294777080327106241940313632291985560896860294e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1872369877837204032074079418146123055615124618000942960799358353269625124323889098e+01, "1.1872369877837204032074079418146123055615124618000942960799358353269625124323889098e+01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.3668338250989578832466315465536077672534713261875481920848252453271529995224516632e-02, "4.3668338250989578832466315465536077672534713261875481920848252453271529995224516632e-02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3741815275584317532245789502116967720634823787379160467839166784058598703361284195e-04, "1.3741815275584317532245789502116967720634823787379160467839166784058598703361284195e-04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.6260135014231198723283200126807995474827979567257597700738272144468899515236872878e-07, "3.6260135014231198723283200126807995474827979567257597700738272144468899515236872878e-07", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.8035718374820798318368374097127140964803349360705519156103446564446533105562174708e-10, "7.8035718374820798318368374097127140964803349360705519156103446564446533105562174708e-10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3155399273220963343988533731471377905809634204429087235409329216539588313353641052e-12, "1.3155399273220963343988533731471377905809634204429087235409329216539588313353641052e-12", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6293749415061585604836546051163481302110136557722031417335367202114639560092787049e-15, "1.6293749415061585604836546051163481302110136557722031417335367202114639560092787049e-15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3184778139696006596104645792244972612333458493576785210966728195969324996631733257e-18, "1.3184778139696006596104645792244972612333458493576785210966728195969324996631733257e-18", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.2299125832253333486600023635817464870204660970908989075481425992405717273229096642e-22, "5.2299125832253333486600023635817464870204660970908989075481425992405717273229096642e-22", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[52] = { + static_cast(boost::math::tools::make_big_value( 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0414093201713378043612608166064768844377641568960512000000000000000000000000000000e+64, "3.0414093201713378043612608166064768844377641568960512000000000000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3683925049359750564345782687270252191318781054337155072000000000000000000000000000e+65, "1.3683925049359750564345782687270252191318781054337155072000000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8312047394413543873001574618939688475496532684433218600960000000000000000000000000e+65, "2.8312047394413543873001574618939688475496532684433218600960000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.6266290361540649084000356943724186480051615706407501824000000000000000000000000000e+65, "3.6266290361540649084000356943724186480051615706407501824000000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2578261522689833134479268958172001145701798207577980403712000000000000000000000000e+65, "3.2578261522689833134479268958172001145701798207577980403712000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2001844261052005486660334218376501837226733355004196185702400000000000000000000000e+65, "2.2001844261052005486660334218376501837226733355004196185702400000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1681037008119350981332433342566749327534832358109654944841728000000000000000000000e+65, "1.1681037008119350981332433342566749327534832358109654944841728000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.0293361153311185534392570196926631029364162024577328008396800000000000000000000000e+64, "5.0293361153311185534392570196926631029364162024577328008396800000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7968291458361430782020246122299560311802074147902210076049408000000000000000000000e+64, "1.7968291458361430782020246122299560311802074147902210076049408000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4212998306869600977887871207212578754682594793002122395254784000000000000000000000e+63, "5.4212998306869600977887871207212578754682594793002122395254784000000000000000000000e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4006322967557247180769968530346138316658911433773347563153653760000000000000000000e+63, "1.4006322967557247180769968530346138316658911433773347563153653760000000000000000000e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1334912462852682149761710693821775975226278702191992823808000000000000000000000000e+62, "3.1334912462852682149761710693821775975226278702191992823808000000000000000000000000e+62", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.1263921790865468343839418571823409266633338824655665334886400000000000000000000000e+61, "6.1263921790865468343839418571823409266633338824655665334886400000000000000000000000e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0548002159482240692664043366538929906734975613031337827840000000000000000000000000e+61, "1.0548002159482240692664043366538929906734975613031337827840000000000000000000000000e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6095781466700764043324234378972985924892034584990590768742400000000000000000000000e+60, "1.6095781466700764043324234378972985924892034584990590768742400000000000000000000000e+60", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1887214284827766716471402753528692603931747042835394432000000000000000000000000000e+59, "2.1887214284827766716471402753528692603931747042835394432000000000000000000000000000e+59", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6644926572075096083148238618984385847884240529010940198400000000000000000000000000e+58, "2.6644926572075096083148238618984385847884240529010940198400000000000000000000000000e+58", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9154102380883742873084802432628398856163736124576909120000000000000000000000000000e+57, "2.9154102380883742873084802432628398856163736124576909120000000000000000000000000000e+57", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8768151045628896730547232493410634338494669305466040192000000000000000000000000000e+56, "2.8768151045628896730547232493410634338494669305466040192000000000000000000000000000e+56", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.5674503027583263140245049650089911892130421780961760000000000000000000000000000000e+55, "2.5674503027583263140245049650089911892130421780961760000000000000000000000000000000e+55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0774565729992714117801952876016228015049549176491224000000000000000000000000000000e+54, "2.0774565729992714117801952876016228015049549176491224000000000000000000000000000000e+54", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5271995659293168127377699172748774995796493494870600000000000000000000000000000000e+53, "1.5271995659293168127377699172748774995796493494870600000000000000000000000000000000e+53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0217297271367563021376459886512004721472442416486880000000000000000000000000000000e+52, "1.0217297271367563021376459886512004721472442416486880000000000000000000000000000000e+52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.2295402510227377004563262212164474005108576587500000000000000000000000000000000000e+50, "6.2295402510227377004563262212164474005108576587500000000000000000000000000000000000e+50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4652078765044198452095090589463630638929867781650000000000000000000000000000000000e+49, "3.4652078765044198452095090589463630638929867781650000000000000000000000000000000000e+49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7599751702378955591170076678443001141850220448750000000000000000000000000000000000e+48, "1.7599751702378955591170076678443001141850220448750000000000000000000000000000000000e+48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.1661954970720573655661780303655361431161958585000000000000000000000000000000000000e+46, "8.1661954970720573655661780303655361431161958585000000000000000000000000000000000000e+46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4624589782073664468902246801624082962588775000000000000000000000000000000000000000e+45, "3.4624589782073664468902246801624082962588775000000000000000000000000000000000000000e+45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3415303241063823936930939721131813816093940000000000000000000000000000000000000000e+44, "1.3415303241063823936930939721131813816093940000000000000000000000000000000000000000e+44", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7484118887814252101652801793318408875609500000000000000000000000000000000000000000e+42, "4.7484118887814252101652801793318408875609500000000000000000000000000000000000000000e+42", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5345701242523770267594030980609724717749800000000000000000000000000000000000000000e+41, "1.5345701242523770267594030980609724717749800000000000000000000000000000000000000000e+41", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.5242293875075726230709587746676742825000000000000000000000000000000000000000000000e+39, "4.5242293875075726230709587746676742825000000000000000000000000000000000000000000000e+39", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2153799706792737162996155167868591485000000000000000000000000000000000000000000000e+38, "1.2153799706792737162996155167868591485000000000000000000000000000000000000000000000e+38", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9704836232659058554494106146940431250000000000000000000000000000000000000000000000e+36, "2.9704836232659058554494106146940431250000000000000000000000000000000000000000000000e+36", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5926306456751344865378122278650335000000000000000000000000000000000000000000000000e+34, "6.5926306456751344865378122278650335000000000000000000000000000000000000000000000000e+34", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3255133142885196993084362383550000000000000000000000000000000000000000000000000000e+33, "1.3255133142885196993084362383550000000000000000000000000000000000000000000000000000e+33", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.4074634262098477202456261501600000000000000000000000000000000000000000000000000000e+31, "2.4074634262098477202456261501600000000000000000000000000000000000000000000000000000e+31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9362537824702021303895557050000000000000000000000000000000000000000000000000000000e+29, "3.9362537824702021303895557050000000000000000000000000000000000000000000000000000000e+29", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7695574975175958167624223800000000000000000000000000000000000000000000000000000000e+27, "5.7695574975175958167624223800000000000000000000000000000000000000000000000000000000e+27", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.5430949131153796097540000000000000000000000000000000000000000000000000000000000000e+25, "7.5430949131153796097540000000000000000000000000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.7427444047045863749135000000000000000000000000000000000000000000000000000000000000e+23, "8.7427444047045863749135000000000000000000000000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.9163115009072256171250000000000000000000000000000000000000000000000000000000000000e+21, "8.9163115009072256171250000000000000000000000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9274383168492884295000000000000000000000000000000000000000000000000000000000000000e+19, "7.9274383168492884295000000000000000000000000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.0731790610548750000000000000000000000000000000000000000000000000000000000000000000e+17, "6.0731790610548750000000000000000000000000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9491312919646000000000000000000000000000000000000000000000000000000000000000000000e+15, "3.9491312919646000000000000000000000000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1366198225750000000000000000000000000000000000000000000000000000000000000000000000e+13, "2.1366198225750000000000000000000000000000000000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.3570498490000000000000000000000000000000000000000000000000000000000000000000000000e+10, "9.3570498490000000000000000000000000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1862250000000000000000000000000000000000000000000000000000000000000000000000000000e+08, "3.1862250000000000000000000000000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9135000000000000000000000000000000000000000000000000000000000000000000000000000000e+05, "7.9135000000000000000000000000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2750000000000000000000000000000000000000000000000000000000000000000000000000000000e+03, "1.2750000000000000000000000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00, "1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[56] = { + static_cast(boost::math::tools::make_big_value( 1.4249481633301349696310814410227012806541100102720500928500445853537331413655453290e+01, "1.4249481633301349696310814410227012806541100102720500928500445853537331413655453290e+01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9263209672927829270913652941762375058727326960303110137656951784697992824730035351e+02, "-1.9263209672927829270913652941762375058727326960303110137656951784697992824730035351e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2326134462101140657073655882621393643823409472993225649429843685598155061860815843e+03, "1.2326134462101140657073655882621393643823409472993225649429843685598155061860815843e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.9662801801612054404095225935108977904002486830482176026791636595192650184999106786e+03, "-4.9662801801612054404095225935108977904002486830482176026791636595192650184999106786e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4138906470545941456294493142170199869989528110729651897652377168498087934667952997e+04, "1.4138906470545941456294493142170199869989528110729651897652377168498087934667952997e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.0258375230969759913527502498295624381557778356817817750999982139142785355759733840e+04, "-3.0258375230969759913527502498295624381557778356817817750999982139142785355759733840e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.0558030423043855628646211274492485894483342086566824594162146024985516781169314244e+04, "5.0558030423043855628646211274492485894483342086566824594162146024985516781169314244e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.7626679132766782666656123523498939281680490327213627146988312255304416262392894908e+04, "-6.7626679132766782666656123523498939281680490327213627146988312255304416262392894908e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.3671346711777066286093979449135095463576878628561846047759456811238250487006378990e+04, "7.3671346711777066286093979449135095463576878628561846047759456811238250487006378990e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.6153175690992245402186127652781399642963298842199508872954793356226534605339323333e+04, "-6.6153175690992245402186127652781399642963298842199508872954793356226534605339323333e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.9373755602608411416894250529851681229919578866115774473369305562033628341735461195e+04, "4.9373755602608411416894250529851681229919578866115774473369305562033628341735461195e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.0800169087178819510009898255169517991710412699732186488007608833012065028092686003e+04, "-3.0800169087178819510009898255169517991710412699732186488007608833012065028092686003e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6113163429881357240014185384821233436360839107514932109343845514870210427965645190e+04, "1.6113163429881357240014185384821233436360839107514932109343845514870210427965645190e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.0800055208994526950912019754052939899262033086446277779400918426435279835354194130e+03, "-7.0800055208994526950912019754052939899262033086446277779400918426435279835354194130e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6124888869258097801249338962341633267998552553797818622228028001697157538310910762e+03, "2.6124888869258097801249338962341633267998552553797818622228028001697157538310910762e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.0821345203062947277822243784585588745042841720677807798397954250617939305106506107e+02, "-8.0821345203062947277822243784585588745042841720677807798397954250617939305106506107e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0897234684613304316686535121178451999373954297009955842614973223259353042645941321e+02, "2.0897234684613304316686535121178451999373954297009955842614973223259353042645941321e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.4950083481830885847356672064097545823284701899839135264776743195466249025042048810e+01, "-4.4950083481830885847356672064097545823284701899839135264776743195466249025042048810e+01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9937323326320843218449977911798288651196634496462091472078054583251005505547883394e+00, "7.9937323326320843218449977911798288651196634496462091472078054583251005505547883394e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.1659790383945267871585567047493689107693027444469426401770619301894048344984407423e+00, "-1.1659790383945267871585567047493689107693027444469426401770619301894048344984407423e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3811750187329199929662456874823737031712476205965338135458988288637511665389967467e-01, "1.3811750187329199929662456874823737031712476205965338135458988288637511665389967467e-01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.3126057597099554726738230571307233576246752870932752732642137542414937991213738675e-02, "-1.3126057597099554726738230571307233576246752870932752732642137542414937991213738675e-02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.8603278118738070120786476302797971799214428999935477462676132231556636610008100990e-04, "9.8603278118738070120786476302797971799214428999935477462676132231556636610008100990e-04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.7497497499750147559650543128496209797619661773802614023013669364107360500260024694e-05, "-5.7497497499750147559650543128496209797619661773802614023013669364107360500260024694e-05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.5455669051693660429433444114100199274899990967149528799831986363426701813268631682e-06, "2.5455669051693660429433444114100199274899990967149528799831986363426701813268631682e-06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.3264707731119706730021053355613906861401420453549875829176477978488700910763350933e-08, "-8.3264707731119706730021053355613906861401420453549875829176477978488700910763350933e-08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.9452716333766656109625805591981088427443890665155986807469770654997947109460588842e-09, "1.9452716333766656109625805591981088427443890665155986807469770654997947109460588842e-09", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.1107270143427404085533822649150071785436589803547989849458232547054059840123879700e-11, "-3.1107270143427404085533822649150071785436589803547989849458232547054059840123879700e-11", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2247407103283988605835624937345007318815870047594787786390767998944461846883100894e-13, "3.2247407103283988605835624937345007318815870047594787786390767998944461846883100894e-13", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.0188429331847134597398824340892444962476368435762668313929678602451262836436731615e-15, "-2.0188429331847134597398824340892444962476368435762668313929678602451262836436731615e-15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.9431143198672109701045920614322844783143358661530851155605617982604226639477903946e-18, "6.9431143198672109701045920614322844783143358661530851155605617982604226639477903946e-18", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.1511473493622067561750500375000264321547190996454590396416983138367840485620637483e-20, "-1.1511473493622067561750500375000264321547190996454590396416983138367840485620637483e-20", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.6282967029324804059233959451615215356643254329321661581764544172041721688288262211e-24, "7.6282967029324804059233959451615215356643254329321661581764544172041721688288262211e-24", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.5217584051959451141711566663295724419583710296958056943098481375601920843969902641e-27, "-1.5217584051959451141711566663295724419583710296958056943098481375601920843969902641e-27", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7686779496951341450129898316334506462294006086177935245787611395642697303462481134e-32, "5.7686779496951341450129898316334506462294006086177935245787611395642697303462481134e-32", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.8183279898437068462121010262051285364082674967144808177521395570040237794774928143e-37, "-1.8183279898437068462121010262051285364082674967144808177521395570040237794774928143e-37", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.2301356317533360807190133199588525842189842444453020346114472115201441728418314131e-45, "8.2301356317533360807190133199588525842189842444453020346114472115201441728418314131e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0538087755476779873724252308339637373681982420524344896439951953765025296864700289e-46, "2.0538087755476779873724252308339637373681982420524344896439951953765025296864700289e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.7368861518094102628071448870890238982875711317443189777819779346097156832497387210e-46, "-2.7368861518094102628071448870890238982875711317443189777819779346097156832497387210e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2127031296187719256650789211253726767816659542004125362087789737915250037588745613e-46, "3.2127031296187719256650789211253726767816659542004125362087789737915250037588745613e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.2845218026163010098046208410081722573197086178079121337275774350592686815176989662e-46, "-3.2845218026163010098046208410081722573197086178079121337275774350592686815176989662e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9013371187879239559027439498823204927228357549709009148789220121477613502450061401e-46, "2.9013371187879239559027439498823204927228357549709009148789220121477613502450061401e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.2089862298013055403993867290116144511841012233395353799752061257869549127164945780e-46, "-2.2089862298013055403993867290116144511841012233395353799752061257869549127164945780e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4527554216741432380141011585082087141319941270266854468232919279949735902352803053e-46, "1.4527554216741432380141011585082087141319941270266854468232919279949735902352803053e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.2837166837027744593760237442711271028335526295415770894642075176684832265233618094e-47, "-8.2837166837027744593760237442711271028335526295415770894642075176684832265233618094e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.1059350216220761035803511769514044782618497241929104348673618588819476720900045601e-47, "4.1059350216220761035803511769514044782618497241929104348673618588819476720900045601e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.7687314351211090978609979306272584841117647148823431923713385159635722296908466519e-47, "-1.7687314351211090978609979306272584841117647148823431923713385159635722296908466519e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5969462796000208210556070606779102539560199436191964981433237450523523642860510077e-48, "6.5969462796000208210556070606779102539560199436191964981433237450523523642860510077e-48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.1139078862715122066066654151520960142401928001906787354175105139384536625985592872e-48, "-2.1139078862715122066066654151520960142401928001906787354175105139384536625985592872e-48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7479750622279993094858160487261517850737208803407757126835554161719741165140561935e-49, "5.7479750622279993094858160487261517850737208803407757126835554161719741165140561935e-49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.3023257271883644155548861805986381464362072120660374852325331311980696768011868477e-49, "-1.3023257271883644155548861805986381464362072120660374852325331311980696768011868477e-49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.3944877765920457854470382189260552086188360983214813092431218719428924850775816044e-50, "2.3944877765920457854470382189260552086188360983214813092431218719428924850775816044e-50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.4340311277195491754628728769381617236158442845382974748650525927232846582643581377e-51, "-3.4340311277195491754628728769381617236158442845382974748650525927232846582643581377e-51", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.6046447704173152191387256911138439680611975514728905319266554977285611063458373730e-52, "3.6046447704173152191387256911138439680611975514728905319266554977285611063458373730e-52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.4634008445755689570224291035627638546740260971523702032261365019321949141711275488e-53, "-2.4634008445755689570224291035627638546740260971523702032261365019321949141711275488e-53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.2246731300220072906782081133065950352668949898418513030190006777980796985877588993e-55, "8.2246731300220072906782081133065950352668949898418513030190006777980796985877588993e-55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[56] = { + static_cast(boost::math::tools::make_big_value( 2.1359871474796665853092357455924330354587340093067807143261699873815704783987359772e+02, "2.1359871474796665853092357455924330354587340093067807143261699873815704783987359772e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.8875414095359657817766255009397774415784763914903057809977502598124862632510767554e+03, "-2.8875414095359657817766255009397774415784763914903057809977502598124862632510767554e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.8476787764422274017528261804071971508619123082396685980448133660376964287516316704e+04, "1.8476787764422274017528261804071971508619123082396685980448133660376964287516316704e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.4444186171772165373465718949072340109367841198406244729719893501352272283072463708e+04, "-7.4444186171772165373465718949072340109367841198406244729719893501352272283072463708e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1194120093410237139270201027497804988299179344758829377397770385486861046469631203e+05, "2.1194120093410237139270201027497804988299179344758829377397770385486861046469631203e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.5357088952571626888790834841289410266972526362527135768453266364708511931775492144e+05, "-4.5357088952571626888790834841289410266972526362527135768453266364708511931775492144e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.5786127498932741985489606333645851990301122033327283854824446437684628190530769575e+05, "7.5786127498932741985489606333645851990301122033327283854824446437684628190530769575e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.0137191034145345260388746496030657014468720426439135322862142167063250610782207818e+06, "-1.0137191034145345260388746496030657014468720426439135322862142167063250610782207818e+06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1043282398857092560432546685968118908647431787644471096079379813564778477126420342e+06, "1.1043282398857092560432546685968118908647431787644471096079379813564778477126420342e+06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.9163139177426012658354764048015319057833754923450432555380434933570665536720208880e+05, "-9.9163139177426012658354764048015319057833754923450432555380434933570665536720208880e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.4010907978229491816684804764341724977655263945662331641124141340242633003517508734e+05, "7.4010907978229491816684804764341724977655263945662331641124141340242633003517508734e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.6169234084041844689042685434707229435012900685910183054712320472809843835362299874e+05, "-4.6169234084041844689042685434707229435012900685910183054712320472809843835362299874e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.4153517213588660353769404140539796364318846647922938442928982516763682295297524025e+05, "2.4153517213588660353769404140539796364318846647922938442928982516763682295297524025e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.0612877847699383856310204418767999963941175773527544927951233517414654065993562292e+05, "-1.0612877847699383856310204418767999963941175773527544927951233517414654065993562292e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9161022337583429443319078749411063125143924304273472659235111671109967684138896371e+04, "3.9161022337583429443319078749411063125143924304273472659235111671109967684138896371e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.2115062080034682817602956663792443265985654149672855657063890194977099012713284199e+04, "-1.2115062080034682817602956663792443265985654149672855657063890194977099012713284199e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1324805949350810193947943179103430601921304099416931772402636138580376468344900971e+03, "3.1324805949350810193947943179103430601921304099416931772402636138580376468344900971e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.7379854977281995958474241831424455939028898406040636148869222006236410315246590813e+02, "-6.7379854977281995958474241831424455939028898406040636148869222006236410315246590813e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1982547830365481876880107367272973441376153376561639433022240961322166151300388030e+02, "1.1982547830365481876880107367272973441376153376561639433022240961322166151300388030e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.7477942737376629095840094280792553329439356352076603742418189295402785845496828618e+01, "-1.7477942737376629095840094280792553329439356352076603742418189295402785845496828618e+01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0703715155075453775002558378654461695986020593253642834916629665157095201951753511e+00, "2.0703715155075453775002558378654461695986020593253642834916629665157095201951753511e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9675866846243159020907742164534290169104130230063615572789631974066350817947062221e-01, "-1.9675866846243159020907742164534290169104130230063615572789631974066350817947062221e-01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4780561158714357685758956261017689353220221023341472401836356861114284203430539079e-02, "1.4780561158714357685758956261017689353220221023341472401836356861114284203430539079e-02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.6188339219787319686113112867608363101891398970645607178011869309209804235190901119e-04, "-8.6188339219787319686113112867608363101891398970645607178011869309209804235190901119e-04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.8157866597647120851117681906042345217930339391652255480834165995078338419417330285e-05, "3.8157866597647120851117681906042345217930339391652255480834165995078338419417330285e-05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.2481320382678181695580703583602390565135442535050898393382403247198998298046344360e-06, "-1.2481320382678181695580703583602390565135442535050898393382403247198998298046344360e-06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9159483230174733349570293758760922152980844047473628166544981799492351078480622954e-08, "2.9159483230174733349570293758760922152980844047473628166544981799492351078480622954e-08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.6629576379996951454117430064764364032095890196838102664116218770332578145496215211e-10, "-4.6629576379996951454117430064764364032095890196838102664116218770332578145496215211e-10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.8338633562069325240602901391334379837235954960205324388722028354858275502279946625e-12, "4.8338633562069325240602901391334379837235954960205324388722028354858275502279946625e-12", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.0262311774099493927119217222064229499121659914970978765047236920420564019570051218e-14, "-3.0262311774099493927119217222064229499121659914970978765047236920420564019570051218e-14", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0407678912374899180410563256969325940215095079830235805022567411720384237429934979e-16, "1.0407678912374899180410563256969325940215095079830235805022567411720384237429934979e-16", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.7255616775185743686583950617043659309702235282144322436444914063380593981448767314e-19, "-1.7255616775185743686583950617043659309702235282144322436444914063380593981448767314e-19", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1434762424301802086970046614089097993428600914262940192954247147222512140342020251e-22, "1.1434762424301802086970046614089097993428600914262940192954247147222512140342020251e-22", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.2811050104947718753668138286684667456060595320836882460657390484001848305710926658e-26, "-2.2811050104947718753668138286684667456060595320836882460657390484001848305710926658e-26", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.6472071585409775242391978767682093973522869636260937895265262698161653967448170294e-31, "8.6472071585409775242391978767682093973522869636260937895265262698161653967448170294e-31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.7256607055318261608651300407042778032797661723154154620044497458638616772687293939e-36, "-2.7256607055318261608651300407042778032797661723154154620044497458638616772687293939e-36", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2336914691939376212057695014798607076719945066572302277992040650923577371403732374e-43, "1.2336914691939376212057695014798607076719945066572302277992040650923577371403732374e-43", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0786447260639215447891518190226750925343851277049431943886851989702400712288529676e-45, "3.0786447260639215447891518190226750925343851277049431943886851989702400712288529676e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.1025728477854679597292503557220243198932574654689944030312971203381791545284070615e-45, "-4.1025728477854679597292503557220243198932574654689944030312971203381791545284070615e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.8158191084622128024881877808372136805034582816867095109911304441480739442791111504e-45, "4.8158191084622128024881877808372136805034582816867095109911304441480739442791111504e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.9234747877490011456140079812669308237793558885580849786063897631770733025035207671e-45, "-4.9234747877490011456140079812669308237793558885580849786063897631770733025035207671e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.3490836759659078559291835803157452697088321139262167213210146255834532556301891370e-45, "4.3490836759659078559291835803157452697088321139262167213210146255834532556301891370e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.3112546247213856964589957649093570444521154190936715486464158458810486032666803106e-45, "-3.3112546247213856964589957649093570444521154190936715486464158458810486032666803106e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1776700296770363161098741319363506481285657595677761712371712460328658791045355723e-45, "2.1776700296770363161098741319363506481285657595677761712371712460328658791045355723e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.2417232307174566390298057341943116719841715593695502126267674406446096534743228763e-45, "-1.2417232307174566390298057341943116719841715593695502126267674406446096534743228763e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.1547673524314003744185487198857922344498908431160001720400958944740800214791613435e-46, "6.1547673524314003744185487198857922344498908431160001720400958944740800214791613435e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.6513158232596442320093540701345954468693696224501434722041096230050093398371645003e-46, "-2.6513158232596442320093540701345954468693696224501434722041096230050093398371645003e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.8887754856348531434071033903412118519453856283236928328635658056271487149248163047e-47, "9.8887754856348531434071033903412118519453856283236928328635658056271487149248163047e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.1687328649763305634603605974128554276109745864508580830005398092245895954643537734e-47, "-3.1687328649763305634603605974128554276109745864508580830005398092245895954643537734e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.6161736776863672083691176367303804395378775987877354282547095064819083181262752062e-48, "8.6161736776863672083691176367303804395378775987877354282547095064819083181262752062e-48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9521769890951289875720183789100014523337064918766622763963203875214061068994800866e-48, "-1.9521769890951289875720183789100014523337064918766622763963203875214061068994800866e-48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.5893201221052508883479696840784788679013550155716308694609078334579681197829045250e-49, "3.5893201221052508883479696840784788679013550155716308694609078334579681197829045250e-49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.1475882011819285876938214420399142925361432312238692258191602240316479716676925358e-50, "-5.1475882011819285876938214420399142925361432312238692258191602240316479716676925358e-50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4033368363711826759446617519812384260206693934532562051784267615057052651438166096e-51, "5.4033368363711826759446617519812384260206693934532562051784267615057052651438166096e-51", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.6926203201715401183464726950807528731521709827951454941037337126228208878967951308e-52, "-3.6926203201715401183464726950807528731521709827951454941037337126228208878967951308e-52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2328726440751392123787631395330686880390176572387043105330275032212649717981066795e-53, "1.2328726440751392123787631395330686880390176572387043105330275032212649717981066795e-53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 4.9921416015624998863131622783839702606201171875000000000000000000000000000000000000e+01; } +}; + +inline double lanczos_g_near_1_and_2(const lanczos52MP&) +{ + return 38.73733398437500; +} + + + + + +struct undefined_lanczos : public std::integral_constant::max)() - 1> { }; + +template +struct lanczos +{ + static constexpr auto target_precision = policies::precision::type::value <= 0 ? (std::numeric_limits::max)()-2 : + policies::precision::type::value; + + using type = typename std::conditional<(target_precision <= lanczos6m24::value), lanczos6m24, + typename std::conditional<(target_precision <= lanczos13m53::value), lanczos13m53, + typename std::conditional<(target_precision <= lanczos11::value), lanczos11, + typename std::conditional<(target_precision <= lanczos17m64::value), lanczos17m64, + typename std::conditional<(target_precision <= lanczos24m113::value), lanczos24m113, + typename std::conditional<(target_precision <= lanczos27MP::value), lanczos27MP, + typename std::conditional<(target_precision <= lanczos35MP::value), lanczos35MP, + typename std::conditional<(target_precision <= lanczos48MP::value), lanczos48MP, + typename std::conditional<(target_precision <= lanczos49MP::value), lanczos49MP, + typename std::conditional<(target_precision <= lanczos52MP::value), lanczos52MP, undefined_lanczos>::type + >::type>::type>::type>::type>::type>::type>::type>::type + >::type; +}; + +} +} +} + + + +# 1 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" 1 +# 13 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 1 3 4 +# 31 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 1 3 4 +# 31 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 1 3 4 +# 44 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 3 4 + +# 44 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 3 4 +typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); +typedef int __m32 __attribute__ ((__vector_size__ (4), __may_alias__)); +typedef short __m16 __attribute__ ((__vector_size__ (2), __may_alias__)); + + +typedef int __m64_u __attribute__ ((__vector_size__ (8), __may_alias__, __aligned__ (1))); +typedef int __m32_u __attribute__ ((__vector_size__ (4), + __may_alias__, __aligned__ (1))); +typedef short __m16_u __attribute__ ((__vector_size__ (2), + __may_alias__, __aligned__ (1))); + + +typedef int __v2si __attribute__ ((__vector_size__ (8))); +typedef short __v4hi __attribute__ ((__vector_size__ (8))); +typedef char __v8qi __attribute__ ((__vector_size__ (8))); +typedef long long __v1di __attribute__ ((__vector_size__ (8))); +typedef float __v2sf __attribute__ ((__vector_size__ (8))); + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_empty (void) +{ + __builtin_ia32_emms (); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_empty (void) +{ + _mm_empty (); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi32_si64 (int __i) +{ + return (__m64) __builtin_ia32_vec_init_v2si (__i, 0); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_from_int (int __i) +{ + return _mm_cvtsi32_si64 (__i); +} + + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_from_int64 (long long __i) +{ + return (__m64) __i; +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_m64 (long long __i) +{ + return (__m64) __i; +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64x_si64 (long long __i) +{ + return (__m64) __i; +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pi64x (long long __i) +{ + return (__m64) __i; +} + + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_si32 (__m64 __i) +{ + return __builtin_ia32_vec_ext_v2si ((__v2si)__i, 0); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_to_int (__m64 __i) +{ + return _mm_cvtsi64_si32 (__i); +} + + + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_to_int64 (__m64 __i) +{ + return (long long)__i; +} + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtm64_si64 (__m64 __i) +{ + return (long long)__i; +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_si64x (__m64 __i) +{ + return (long long)__i; +} + + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_packsswb ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_packsswb (__m64 __m1, __m64 __m2) +{ + return _mm_packs_pi16 (__m1, __m2); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_packssdw ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_packssdw (__m64 __m1, __m64 __m2) +{ + return _mm_packs_pi32 (__m1, __m2); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_pu16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_packuswb ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_packuswb (__m64 __m1, __m64 __m2) +{ + return _mm_packs_pu16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpckhbw ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpckhbw (__m64 __m1, __m64 __m2) +{ + return _mm_unpackhi_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpckhwd ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpckhwd (__m64 __m1, __m64 __m2) +{ + return _mm_unpackhi_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpckhdq ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpckhdq (__m64 __m1, __m64 __m2) +{ + return _mm_unpackhi_pi32 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpcklbw ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpcklbw (__m64 __m1, __m64 __m2) +{ + return _mm_unpacklo_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpcklwd ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpcklwd (__m64 __m1, __m64 __m2) +{ + return _mm_unpacklo_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpckldq ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpckldq (__m64 __m1, __m64 __m2) +{ + return _mm_unpacklo_pi32 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddb (__m64 __m1, __m64 __m2) +{ + return _mm_add_pi8 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddw (__m64 __m1, __m64 __m2) +{ + return _mm_add_pi16 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddd ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddd (__m64 __m1, __m64 __m2) +{ + return _mm_add_pi32 (__m1, __m2); +} +# 334 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 3 4 +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_si64 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddq ((__v1di)__m1, (__v1di)__m2); +} + + + + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddsb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddsb (__m64 __m1, __m64 __m2) +{ + return _mm_adds_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddsw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddsw (__m64 __m1, __m64 __m2) +{ + return _mm_adds_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_pu8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddusb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddusb (__m64 __m1, __m64 __m2) +{ + return _mm_adds_pu8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_pu16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddusw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddusw (__m64 __m1, __m64 __m2) +{ + return _mm_adds_pu16 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubb (__m64 __m1, __m64 __m2) +{ + return _mm_sub_pi8 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubw (__m64 __m1, __m64 __m2) +{ + return _mm_sub_pi16 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubd ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubd (__m64 __m1, __m64 __m2) +{ + return _mm_sub_pi32 (__m1, __m2); +} +# 450 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 3 4 +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_si64 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubq ((__v1di)__m1, (__v1di)__m2); +} + + + + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubsb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubsb (__m64 __m1, __m64 __m2) +{ + return _mm_subs_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubsw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubsw (__m64 __m1, __m64 __m2) +{ + return _mm_subs_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_pu8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubusb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubusb (__m64 __m1, __m64 __m2) +{ + return _mm_subs_pu8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_pu16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubusw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubusw (__m64 __m1, __m64 __m2) +{ + return _mm_subs_pu16 (__m1, __m2); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_madd_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pmaddwd ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmaddwd (__m64 __m1, __m64 __m2) +{ + return _mm_madd_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mulhi_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pmulhw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmulhw (__m64 __m1, __m64 __m2) +{ + return _mm_mulhi_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mullo_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pmullw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmullw (__m64 __m1, __m64 __m2) +{ + return _mm_mullo_pi16 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_pi16 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psllw ((__v4hi)__m, (__v4hi)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psllw (__m64 __m, __m64 __count) +{ + return _mm_sll_pi16 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_pi16 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psllwi ((__v4hi)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psllwi (__m64 __m, int __count) +{ + return _mm_slli_pi16 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_pi32 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_pslld ((__v2si)__m, (__v2si)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pslld (__m64 __m, __m64 __count) +{ + return _mm_sll_pi32 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_pi32 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_pslldi ((__v2si)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pslldi (__m64 __m, int __count) +{ + return _mm_slli_pi32 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_si64 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psllq ((__v1di)__m, (__v1di)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psllq (__m64 __m, __m64 __count) +{ + return _mm_sll_si64 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_si64 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psllqi ((__v1di)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psllqi (__m64 __m, int __count) +{ + return _mm_slli_si64 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sra_pi16 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psraw ((__v4hi)__m, (__v4hi)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psraw (__m64 __m, __m64 __count) +{ + return _mm_sra_pi16 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srai_pi16 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psrawi ((__v4hi)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrawi (__m64 __m, int __count) +{ + return _mm_srai_pi16 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sra_pi32 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psrad ((__v2si)__m, (__v2si)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrad (__m64 __m, __m64 __count) +{ + return _mm_sra_pi32 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srai_pi32 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psradi ((__v2si)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psradi (__m64 __m, int __count) +{ + return _mm_srai_pi32 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_pi16 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psrlw ((__v4hi)__m, (__v4hi)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrlw (__m64 __m, __m64 __count) +{ + return _mm_srl_pi16 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_pi16 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psrlwi ((__v4hi)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrlwi (__m64 __m, int __count) +{ + return _mm_srli_pi16 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_pi32 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psrld ((__v2si)__m, (__v2si)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrld (__m64 __m, __m64 __count) +{ + return _mm_srl_pi32 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_pi32 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psrldi ((__v2si)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrldi (__m64 __m, int __count) +{ + return _mm_srli_pi32 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_si64 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psrlq ((__v1di)__m, (__v1di)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrlq (__m64 __m, __m64 __count) +{ + return _mm_srl_si64 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_si64 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psrlqi ((__v1di)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrlqi (__m64 __m, int __count) +{ + return _mm_srli_si64 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_and_si64 (__m64 __m1, __m64 __m2) +{ + return __builtin_ia32_pand (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pand (__m64 __m1, __m64 __m2) +{ + return _mm_and_si64 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_andnot_si64 (__m64 __m1, __m64 __m2) +{ + return __builtin_ia32_pandn (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pandn (__m64 __m1, __m64 __m2) +{ + return _mm_andnot_si64 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_or_si64 (__m64 __m1, __m64 __m2) +{ + return __builtin_ia32_por (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_por (__m64 __m1, __m64 __m2) +{ + return _mm_or_si64 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_xor_si64 (__m64 __m1, __m64 __m2) +{ + return __builtin_ia32_pxor (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pxor (__m64 __m1, __m64 __m2) +{ + return _mm_xor_si64 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpeqb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpeqb (__m64 __m1, __m64 __m2) +{ + return _mm_cmpeq_pi8 (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpgtb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpgtb (__m64 __m1, __m64 __m2) +{ + return _mm_cmpgt_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpeqw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpeqw (__m64 __m1, __m64 __m2) +{ + return _mm_cmpeq_pi16 (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpgtw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpgtw (__m64 __m1, __m64 __m2) +{ + return _mm_cmpgt_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpeqd ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpeqd (__m64 __m1, __m64 __m2) +{ + return _mm_cmpeq_pi32 (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpgtd ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpgtd (__m64 __m1, __m64 __m2) +{ + return _mm_cmpgt_pi32 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setzero_si64 (void) +{ + return (__m64)0LL; +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pi32 (int __i1, int __i0) +{ + return (__m64) __builtin_ia32_vec_init_v2si (__i0, __i1); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pi16 (short __w3, short __w2, short __w1, short __w0) +{ + return (__m64) __builtin_ia32_vec_init_v4hi (__w0, __w1, __w2, __w3); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pi8 (char __b7, char __b6, char __b5, char __b4, + char __b3, char __b2, char __b1, char __b0) +{ + return (__m64) __builtin_ia32_vec_init_v8qi (__b0, __b1, __b2, __b3, + __b4, __b5, __b6, __b7); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_pi32 (int __i0, int __i1) +{ + return _mm_set_pi32 (__i1, __i0); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_pi16 (short __w0, short __w1, short __w2, short __w3) +{ + return _mm_set_pi16 (__w3, __w2, __w1, __w0); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_pi8 (char __b0, char __b1, char __b2, char __b3, + char __b4, char __b5, char __b6, char __b7) +{ + return _mm_set_pi8 (__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_pi32 (int __i) +{ + return _mm_set_pi32 (__i, __i); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_pi16 (short __w) +{ + return _mm_set_pi16 (__w, __w, __w, __w); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_pi8 (char __b) +{ + return _mm_set_pi8 (__b, __b, __b, __b, __b, __b, __b, __b); +} +# 32 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 2 3 4 + + + + + +enum _mm_hint +{ + + _MM_HINT_ET0 = 7, + _MM_HINT_ET1 = 6, + _MM_HINT_T0 = 3, + _MM_HINT_T1 = 2, + _MM_HINT_T2 = 1, + _MM_HINT_NTA = 0 +}; +# 69 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); + + +typedef float __m128_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); + + +typedef float __v4sf __attribute__ ((__vector_size__ (16))); +# 109 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_undefined_ps (void) +{ + __m128 __Y = __Y; + return __Y; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setzero_ps (void) +{ + return __extension__ (__m128){ 0.0f, 0.0f, 0.0f, 0.0f }; +} + + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_addss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_subss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_mulss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_div_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_divss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sqrt_ss (__m128 __A) +{ + return (__m128) __builtin_ia32_sqrtss ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_rcp_ss (__m128 __A) +{ + return (__m128) __builtin_ia32_rcpss ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_rsqrt_ss (__m128 __A) +{ + return (__m128) __builtin_ia32_rsqrtss ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_minss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_maxss ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_ps (__m128 __A, __m128 __B) +{ + return (__m128) ((__v4sf)__A + (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_ps (__m128 __A, __m128 __B) +{ + return (__m128) ((__v4sf)__A - (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_ps (__m128 __A, __m128 __B) +{ + return (__m128) ((__v4sf)__A * (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_div_ps (__m128 __A, __m128 __B) +{ + return (__m128) ((__v4sf)__A / (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sqrt_ps (__m128 __A) +{ + return (__m128) __builtin_ia32_sqrtps ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_rcp_ps (__m128 __A) +{ + return (__m128) __builtin_ia32_rcpps ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_rsqrt_ps (__m128 __A) +{ + return (__m128) __builtin_ia32_rsqrtps ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_minps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_maxps ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_and_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_andps (__A, __B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_andnot_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_andnps (__A, __B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_or_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_orps (__A, __B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_xor_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_xorps (__A, __B); +} + + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpeqss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpltss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmple_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpless ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movss ((__v4sf) __A, + (__v4sf) + __builtin_ia32_cmpltss ((__v4sf) __B, + (__v4sf) + __A)); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpge_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movss ((__v4sf) __A, + (__v4sf) + __builtin_ia32_cmpless ((__v4sf) __B, + (__v4sf) + __A)); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpneq_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpneqss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnlt_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpnltss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnle_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpnless ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpngt_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movss ((__v4sf) __A, + (__v4sf) + __builtin_ia32_cmpnltss ((__v4sf) __B, + (__v4sf) + __A)); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnge_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movss ((__v4sf) __A, + (__v4sf) + __builtin_ia32_cmpnless ((__v4sf) __B, + (__v4sf) + __A)); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpord_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpordss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpunord_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpunordss ((__v4sf)__A, (__v4sf)__B); +} + + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpeqps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpltps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmple_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpleps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpgtps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpge_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpgeps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpneq_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpneqps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnlt_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpnltps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnle_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpnleps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpngt_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpngtps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnge_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpngeps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpord_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpordps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpunord_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpunordps ((__v4sf)__A, (__v4sf)__B); +} + + + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comieq_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comieq ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comilt_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comilt ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comile_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comile ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comigt_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comigt ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comige_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comige ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comineq_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comineq ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomieq_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomieq ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomilt_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomilt ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomile_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomile ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomigt_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomigt ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomige_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomige ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomineq_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomineq ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_si32 (__m128 __A) +{ + return __builtin_ia32_cvtss2si ((__v4sf) __A); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvt_ss2si (__m128 __A) +{ + return _mm_cvtss_si32 (__A); +} + + + + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_si64 (__m128 __A) +{ + return __builtin_ia32_cvtss2si64 ((__v4sf) __A); +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_si64x (__m128 __A) +{ + return __builtin_ia32_cvtss2si64 ((__v4sf) __A); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_pi32 (__m128 __A) +{ + return (__m64) __builtin_ia32_cvtps2pi ((__v4sf) __A); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvt_ps2pi (__m128 __A) +{ + return _mm_cvtps_pi32 (__A); +} + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttss_si32 (__m128 __A) +{ + return __builtin_ia32_cvttss2si ((__v4sf) __A); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtt_ss2si (__m128 __A) +{ + return _mm_cvttss_si32 (__A); +} + + + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttss_si64 (__m128 __A) +{ + return __builtin_ia32_cvttss2si64 ((__v4sf) __A); +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttss_si64x (__m128 __A) +{ + return __builtin_ia32_cvttss2si64 ((__v4sf) __A); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttps_pi32 (__m128 __A) +{ + return (__m64) __builtin_ia32_cvttps2pi ((__v4sf) __A); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtt_ps2pi (__m128 __A) +{ + return _mm_cvttps_pi32 (__A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi32_ss (__m128 __A, int __B) +{ + return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvt_si2ss (__m128 __A, int __B) +{ + return _mm_cvtsi32_ss (__A, __B); +} + + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_ss (__m128 __A, long long __B) +{ + return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64x_ss (__m128 __A, long long __B) +{ + return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); +} + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi32_ps (__m128 __A, __m64 __B) +{ + return (__m128) __builtin_ia32_cvtpi2ps ((__v4sf) __A, (__v2si)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvt_pi2ps (__m128 __A, __m64 __B) +{ + return _mm_cvtpi32_ps (__A, __B); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi16_ps (__m64 __A) +{ + __v4hi __sign; + __v2si __hisi, __losi; + __v4sf __zero, __ra, __rb; + + + + + __sign = __builtin_ia32_pcmpgtw ((__v4hi)0LL, (__v4hi)__A); + + + __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, __sign); + __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, __sign); + + + __zero = (__v4sf) _mm_setzero_ps (); + __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); + __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); + + return (__m128) __builtin_ia32_movlhps (__ra, __rb); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpu16_ps (__m64 __A) +{ + __v2si __hisi, __losi; + __v4sf __zero, __ra, __rb; + + + __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, (__v4hi)0LL); + __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, (__v4hi)0LL); + + + __zero = (__v4sf) _mm_setzero_ps (); + __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); + __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); + + return (__m128) __builtin_ia32_movlhps (__ra, __rb); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi8_ps (__m64 __A) +{ + __v8qi __sign; + + + + + __sign = __builtin_ia32_pcmpgtb ((__v8qi)0LL, (__v8qi)__A); + + + __A = (__m64) __builtin_ia32_punpcklbw ((__v8qi)__A, __sign); + + return _mm_cvtpi16_ps(__A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpu8_ps(__m64 __A) +{ + __A = (__m64) __builtin_ia32_punpcklbw ((__v8qi)__A, (__v8qi)0LL); + return _mm_cvtpu16_ps(__A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi32x2_ps(__m64 __A, __m64 __B) +{ + __v4sf __zero = (__v4sf) _mm_setzero_ps (); + __v4sf __sfa = __builtin_ia32_cvtpi2ps (__zero, (__v2si)__A); + __v4sf __sfb = __builtin_ia32_cvtpi2ps (__sfa, (__v2si)__B); + return (__m128) __builtin_ia32_movlhps (__sfa, __sfb); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_pi16(__m128 __A) +{ + __v4sf __hisf = (__v4sf)__A; + __v4sf __losf = __builtin_ia32_movhlps (__hisf, __hisf); + __v2si __hisi = __builtin_ia32_cvtps2pi (__hisf); + __v2si __losi = __builtin_ia32_cvtps2pi (__losf); + return (__m64) __builtin_ia32_packssdw (__hisi, __losi); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_pi8(__m128 __A) +{ + __v4hi __tmp = (__v4hi) _mm_cvtps_pi16 (__A); + return (__m64) __builtin_ia32_packsswb (__tmp, (__v4hi)0LL); +} +# 755 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_unpckhps ((__v4sf)__A, (__v4sf)__B); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_unpcklps ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadh_pi (__m128 __A, __m64 const *__P) +{ + return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (const __v2sf *)__P); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeh_pi (__m64 *__P, __m128 __A) +{ + __builtin_ia32_storehps ((__v2sf *)__P, (__v4sf)__A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movehl_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movhlps ((__v4sf)__A, (__v4sf)__B); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movelh_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movlhps ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadl_pi (__m128 __A, __m64 const *__P) +{ + return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (const __v2sf *)__P); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storel_pi (__m64 *__P, __m128 __A) +{ + __builtin_ia32_storelps ((__v2sf *)__P, (__v4sf)__A); +} + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movemask_ps (__m128 __A) +{ + return __builtin_ia32_movmskps ((__v4sf)__A); +} + + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_getcsr (void) +{ + return __builtin_ia32_stmxcsr (); +} + + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_GET_EXCEPTION_STATE (void) +{ + return _mm_getcsr() & 0x003f; +} + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_GET_EXCEPTION_MASK (void) +{ + return _mm_getcsr() & 0x1f80; +} + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_GET_ROUNDING_MODE (void) +{ + return _mm_getcsr() & 0x6000; +} + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_GET_FLUSH_ZERO_MODE (void) +{ + return _mm_getcsr() & 0x8000; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setcsr (unsigned int __I) +{ + __builtin_ia32_ldmxcsr (__I); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_SET_EXCEPTION_STATE(unsigned int __mask) +{ + _mm_setcsr((_mm_getcsr() & ~0x003f) | __mask); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_SET_EXCEPTION_MASK (unsigned int __mask) +{ + _mm_setcsr((_mm_getcsr() & ~0x1f80) | __mask); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_SET_ROUNDING_MODE (unsigned int __mode) +{ + _mm_setcsr((_mm_getcsr() & ~0x6000) | __mode); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_SET_FLUSH_ZERO_MODE (unsigned int __mode) +{ + _mm_setcsr((_mm_getcsr() & ~0x8000) | __mode); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_ss (float __F) +{ + return __extension__ (__m128)(__v4sf){ __F, 0.0f, 0.0f, 0.0f }; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_ps (float __F) +{ + return __extension__ (__m128)(__v4sf){ __F, __F, __F, __F }; +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_ps1 (float __F) +{ + return _mm_set1_ps (__F); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_ss (float const *__P) +{ + return _mm_set_ss (*__P); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load1_ps (float const *__P) +{ + return _mm_set1_ps (*__P); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_ps1 (float const *__P) +{ + return _mm_load1_ps (__P); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_ps (float const *__P) +{ + return *(__m128 *)__P; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_ps (float const *__P) +{ + return *(__m128_u *)__P; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadr_ps (float const *__P) +{ + __v4sf __tmp = *(__v4sf *)__P; + return (__m128) __builtin_ia32_shufps (__tmp, __tmp, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3))); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_ps (const float __Z, const float __Y, const float __X, const float __W) +{ + return __extension__ (__m128)(__v4sf){ __W, __X, __Y, __Z }; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_ps (float __Z, float __Y, float __X, float __W) +{ + return __extension__ (__m128)(__v4sf){ __Z, __Y, __X, __W }; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_ss (float *__P, __m128 __A) +{ + *__P = ((__v4sf)__A)[0]; +} + +extern __inline float __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_f32 (__m128 __A) +{ + return ((__v4sf)__A)[0]; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_ps (float *__P, __m128 __A) +{ + *(__m128 *)__P = __A; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_ps (float *__P, __m128 __A) +{ + *(__m128_u *)__P = __A; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store1_ps (float *__P, __m128 __A) +{ + __v4sf __va = (__v4sf)__A; + __v4sf __tmp = __builtin_ia32_shufps (__va, __va, (((0) << 6) | ((0) << 4) | ((0) << 2) | (0))); + _mm_storeu_ps (__P, __tmp); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_ps1 (float *__P, __m128 __A) +{ + _mm_store1_ps (__P, __A); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storer_ps (float *__P, __m128 __A) +{ + __v4sf __va = (__v4sf)__A; + __v4sf __tmp = __builtin_ia32_shufps (__va, __va, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3))); + _mm_store_ps (__P, __tmp); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_move_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_shuffle ((__v4sf)__A, (__v4sf)__B, + __extension__ + (__attribute__((__vector_size__ (16))) int) + {4,1,2,3}); +} +# 1063 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_pi16 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pmaxsw ((__v4hi)__A, (__v4hi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmaxsw (__m64 __A, __m64 __B) +{ + return _mm_max_pi16 (__A, __B); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_pu8 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pmaxub ((__v8qi)__A, (__v8qi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmaxub (__m64 __A, __m64 __B) +{ + return _mm_max_pu8 (__A, __B); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_pi16 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pminsw ((__v4hi)__A, (__v4hi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pminsw (__m64 __A, __m64 __B) +{ + return _mm_min_pi16 (__A, __B); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_pu8 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pminub ((__v8qi)__A, (__v8qi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pminub (__m64 __A, __m64 __B) +{ + return _mm_min_pu8 (__A, __B); +} + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movemask_pi8 (__m64 __A) +{ + return __builtin_ia32_pmovmskb ((__v8qi)__A); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmovmskb (__m64 __A) +{ + return _mm_movemask_pi8 (__A); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mulhi_pu16 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pmulhuw ((__v4hi)__A, (__v4hi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmulhuw (__m64 __A, __m64 __B) +{ + return _mm_mulhi_pu16 (__A, __B); +} +# 1165 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_maskmove_si64 (__m64 __A, __m64 __N, char *__P) +{ + + + + typedef long long __v2di __attribute__ ((__vector_size__ (16))); + typedef char __v16qi __attribute__ ((__vector_size__ (16))); + + __v2di __A128 = __extension__ (__v2di) { ((__v1di) __A)[0], 0 }; + __v2di __N128 = __extension__ (__v2di) { ((__v1di) __N)[0], 0 }; + + + long long unsigned int offset = ((long long unsigned int) __P) & 0xf; + if (offset) + { + + + if (offset > 8) + offset = 8; + __P = (char *) (((long long unsigned int) __P) - offset); + + + switch (offset) + { + case 1: + __A128 = __builtin_ia32_pslldqi128 (__A128, 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 8); + break; + case 2: + __A128 = __builtin_ia32_pslldqi128 (__A128, 2 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 2 * 8); + break; + case 3: + __A128 = __builtin_ia32_pslldqi128 (__A128, 3 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 3 * 8); + break; + case 4: + __A128 = __builtin_ia32_pslldqi128 (__A128, 4 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 4 * 8); + break; + case 5: + __A128 = __builtin_ia32_pslldqi128 (__A128, 5 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 5 * 8); + break; + case 6: + __A128 = __builtin_ia32_pslldqi128 (__A128, 6 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 6 * 8); + break; + case 7: + __A128 = __builtin_ia32_pslldqi128 (__A128, 7 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 7 * 8); + break; + case 8: + __A128 = __builtin_ia32_pslldqi128 (__A128, 8 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 8 * 8); + break; + default: + break; + } + } + __builtin_ia32_maskmovdqu ((__v16qi)__A128, (__v16qi)__N128, __P); + + + +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_maskmovq (__m64 __A, __m64 __N, char *__P) +{ + _mm_maskmove_si64 (__A, __N, __P); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_avg_pu8 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pavgb ((__v8qi)__A, (__v8qi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pavgb (__m64 __A, __m64 __B) +{ + return _mm_avg_pu8 (__A, __B); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_avg_pu16 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pavgw ((__v4hi)__A, (__v4hi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pavgw (__m64 __A, __m64 __B) +{ + return _mm_avg_pu16 (__A, __B); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sad_pu8 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_psadbw ((__v8qi)__A, (__v8qi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psadbw (__m64 __A, __m64 __B) +{ + return _mm_sad_pu8 (__A, __B); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_pi (__m64 *__P, __m64 __A) +{ + __builtin_ia32_movntq ((unsigned long long *)__P, (unsigned long long)__A); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_ps (float *__P, __m128 __A) +{ + __builtin_ia32_movntps (__P, (__v4sf)__A); +} + + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sfence (void) +{ + __builtin_ia32_sfence (); +} +# 1316 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 1 3 4 +# 1317 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 2 3 4 +# 1328 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_pause (void) +{ + __builtin_ia32_pause (); +} +# 32 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 2 3 4 +# 40 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +typedef double __v2df __attribute__ ((__vector_size__ (16))); +typedef long long __v2di __attribute__ ((__vector_size__ (16))); +typedef unsigned long long __v2du __attribute__ ((__vector_size__ (16))); +typedef int __v4si __attribute__ ((__vector_size__ (16))); +typedef unsigned int __v4su __attribute__ ((__vector_size__ (16))); +typedef short __v8hi __attribute__ ((__vector_size__ (16))); +typedef unsigned short __v8hu __attribute__ ((__vector_size__ (16))); +typedef char __v16qi __attribute__ ((__vector_size__ (16))); +typedef signed char __v16qs __attribute__ ((__vector_size__ (16))); +typedef unsigned char __v16qu __attribute__ ((__vector_size__ (16))); + + + +typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); +typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); + + +typedef long long __m128i_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); +typedef double __m128d_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); + + + + + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_sd (double __F) +{ + return __extension__ (__m128d){ __F, 0.0 }; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_pd (double __F) +{ + return __extension__ (__m128d){ __F, __F }; +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pd1 (double __F) +{ + return _mm_set1_pd (__F); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pd (double __W, double __X) +{ + return __extension__ (__m128d){ __X, __W }; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_pd (double __W, double __X) +{ + return __extension__ (__m128d){ __W, __X }; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_undefined_pd (void) +{ + __m128d __Y = __Y; + return __Y; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setzero_pd (void) +{ + return __extension__ (__m128d){ 0.0, 0.0 }; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_move_sd (__m128d __A, __m128d __B) +{ + return __extension__ (__m128d) __builtin_shuffle ((__v2df)__A, (__v2df)__B, (__v2di){2, 1}); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_pd (double const *__P) +{ + return *(__m128d *)__P; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_pd (double const *__P) +{ + return *(__m128d_u *)__P; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load1_pd (double const *__P) +{ + return _mm_set1_pd (*__P); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_sd (double const *__P) +{ + return _mm_set_sd (*__P); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_pd1 (double const *__P) +{ + return _mm_load1_pd (__P); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadr_pd (double const *__P) +{ + __m128d __tmp = _mm_load_pd (__P); + return __builtin_ia32_shufpd (__tmp, __tmp, (((0) << 1) | (1))); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_pd (double *__P, __m128d __A) +{ + *(__m128d *)__P = __A; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_pd (double *__P, __m128d __A) +{ + *(__m128d_u *)__P = __A; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_sd (double *__P, __m128d __A) +{ + *__P = ((__v2df)__A)[0]; +} + +extern __inline double __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_f64 (__m128d __A) +{ + return ((__v2df)__A)[0]; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storel_pd (double *__P, __m128d __A) +{ + _mm_store_sd (__P, __A); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeh_pd (double *__P, __m128d __A) +{ + *__P = ((__v2df)__A)[1]; +} + + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store1_pd (double *__P, __m128d __A) +{ + _mm_store_pd (__P, __builtin_ia32_shufpd (__A, __A, (((0) << 1) | (0)))); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_pd1 (double *__P, __m128d __A) +{ + _mm_store1_pd (__P, __A); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storer_pd (double *__P, __m128d __A) +{ + _mm_store_pd (__P, __builtin_ia32_shufpd (__A, __A, (((0) << 1) | (1)))); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi128_si32 (__m128i __A) +{ + return __builtin_ia32_vec_ext_v4si ((__v4si)__A, 0); +} + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi128_si64 (__m128i __A) +{ + return ((__v2di)__A)[0]; +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi128_si64x (__m128i __A) +{ + return ((__v2di)__A)[0]; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_pd (__m128d __A, __m128d __B) +{ + return (__m128d) ((__v2df)__A + (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_addsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_pd (__m128d __A, __m128d __B) +{ + return (__m128d) ((__v2df)__A - (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_subsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_pd (__m128d __A, __m128d __B) +{ + return (__m128d) ((__v2df)__A * (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_mulsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_div_pd (__m128d __A, __m128d __B) +{ + return (__m128d) ((__v2df)__A / (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_div_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_divsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sqrt_pd (__m128d __A) +{ + return (__m128d)__builtin_ia32_sqrtpd ((__v2df)__A); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sqrt_sd (__m128d __A, __m128d __B) +{ + __v2df __tmp = __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); + return (__m128d)__builtin_ia32_sqrtsd ((__v2df)__tmp); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_minpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_minsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_maxpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_maxsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_and_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_andpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_andnot_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_andnpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_or_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_orpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_xor_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_xorpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpeqpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpltpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmple_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmplepd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpgtpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpge_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpgepd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpneq_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpneqpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnlt_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpnltpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnle_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpnlepd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpngt_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpngtpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnge_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpngepd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpord_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpordpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpunord_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpunordpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpeqsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpltsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmple_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmplesd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpltsd ((__v2df) __B, + (__v2df) + __A)); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpge_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmplesd ((__v2df) __B, + (__v2df) + __A)); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpneq_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpneqsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnlt_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpnltsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnle_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpnlesd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpngt_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpnltsd ((__v2df) __B, + (__v2df) + __A)); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnge_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpnlesd ((__v2df) __B, + (__v2df) + __A)); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpord_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpordsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpunord_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpunordsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comieq_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdeq ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comilt_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdlt ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comile_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdle ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comigt_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdgt ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comige_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdge ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comineq_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdneq ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomieq_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdeq ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomilt_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdlt ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomile_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdle ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomigt_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdgt ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomige_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdge ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomineq_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdneq ((__v2df)__A, (__v2df)__B); +} + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi64x (long long __q1, long long __q0) +{ + return __extension__ (__m128i)(__v2di){ __q0, __q1 }; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi64 (__m64 __q1, __m64 __q0) +{ + return _mm_set_epi64x ((long long)__q1, (long long)__q0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi32 (int __q3, int __q2, int __q1, int __q0) +{ + return __extension__ (__m128i)(__v4si){ __q0, __q1, __q2, __q3 }; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi16 (short __q7, short __q6, short __q5, short __q4, + short __q3, short __q2, short __q1, short __q0) +{ + return __extension__ (__m128i)(__v8hi){ + __q0, __q1, __q2, __q3, __q4, __q5, __q6, __q7 }; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi8 (char __q15, char __q14, char __q13, char __q12, + char __q11, char __q10, char __q09, char __q08, + char __q07, char __q06, char __q05, char __q04, + char __q03, char __q02, char __q01, char __q00) +{ + return __extension__ (__m128i)(__v16qi){ + __q00, __q01, __q02, __q03, __q04, __q05, __q06, __q07, + __q08, __q09, __q10, __q11, __q12, __q13, __q14, __q15 + }; +} + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi64x (long long __A) +{ + return _mm_set_epi64x (__A, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi64 (__m64 __A) +{ + return _mm_set_epi64 (__A, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi32 (int __A) +{ + return _mm_set_epi32 (__A, __A, __A, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi16 (short __A) +{ + return _mm_set_epi16 (__A, __A, __A, __A, __A, __A, __A, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi8 (char __A) +{ + return _mm_set_epi8 (__A, __A, __A, __A, __A, __A, __A, __A, + __A, __A, __A, __A, __A, __A, __A, __A); +} + + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_epi64 (__m64 __q0, __m64 __q1) +{ + return _mm_set_epi64 (__q1, __q0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_epi32 (int __q0, int __q1, int __q2, int __q3) +{ + return _mm_set_epi32 (__q3, __q2, __q1, __q0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_epi16 (short __q0, short __q1, short __q2, short __q3, + short __q4, short __q5, short __q6, short __q7) +{ + return _mm_set_epi16 (__q7, __q6, __q5, __q4, __q3, __q2, __q1, __q0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_epi8 (char __q00, char __q01, char __q02, char __q03, + char __q04, char __q05, char __q06, char __q07, + char __q08, char __q09, char __q10, char __q11, + char __q12, char __q13, char __q14, char __q15) +{ + return _mm_set_epi8 (__q15, __q14, __q13, __q12, __q11, __q10, __q09, __q08, + __q07, __q06, __q05, __q04, __q03, __q02, __q01, __q00); +} + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_si128 (__m128i const *__P) +{ + return *__P; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si128 (__m128i_u const *__P) +{ + return *__P; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadl_epi64 (__m128i_u const *__P) +{ + return _mm_set_epi64 ((__m64)0LL, *(__m64_u *)__P); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si64 (void const *__P) +{ + return _mm_loadl_epi64 ((__m128i_u *)__P); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si32 (void const *__P) +{ + return _mm_set_epi32 (*(int *)__P, (int)0, (int)0, (int)0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si16 (void const *__P) +{ + return _mm_set_epi16 (*(short *)__P, (short)0, (short)0, (short)0, + (short)0, (short)0, (short)0, (short)0); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_si128 (__m128i *__P, __m128i __B) +{ + *__P = __B; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si128 (__m128i_u *__P, __m128i __B) +{ + *__P = __B; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storel_epi64 (__m128i_u *__P, __m128i __B) +{ + *(__m64_u *)__P = (__m64) ((__v2di)__B)[0]; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si64 (void *__P, __m128i __B) +{ + _mm_storel_epi64 ((__m128i_u *)__P, __B); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si32 (void *__P, __m128i __B) +{ + *(__m32_u *)__P = (__m32) ((__v4si)__B)[0]; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si16 (void *__P, __m128i __B) +{ + *(__m16_u *)__P = (__m16) ((__v8hi)__B)[0]; +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movepi64_pi64 (__m128i __B) +{ + return (__m64) ((__v2di)__B)[0]; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movpi64_epi64 (__m64 __A) +{ + return _mm_set_epi64 ((__m64)0LL, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_move_epi64 (__m128i __A) +{ + return (__m128i)__builtin_ia32_movq128 ((__v2di) __A); +} + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_undefined_si128 (void) +{ + __m128i __Y = __Y; + return __Y; +} + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setzero_si128 (void) +{ + return __extension__ (__m128i)(__v4si){ 0, 0, 0, 0 }; +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtepi32_pd (__m128i __A) +{ + return (__m128d)__builtin_ia32_cvtdq2pd ((__v4si) __A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtepi32_ps (__m128i __A) +{ + return (__m128)__builtin_ia32_cvtdq2ps ((__v4si) __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpd_epi32 (__m128d __A) +{ + return (__m128i)__builtin_ia32_cvtpd2dq ((__v2df) __A); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpd_pi32 (__m128d __A) +{ + return (__m64)__builtin_ia32_cvtpd2pi ((__v2df) __A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpd_ps (__m128d __A) +{ + return (__m128)__builtin_ia32_cvtpd2ps ((__v2df) __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttpd_epi32 (__m128d __A) +{ + return (__m128i)__builtin_ia32_cvttpd2dq ((__v2df) __A); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttpd_pi32 (__m128d __A) +{ + return (__m64)__builtin_ia32_cvttpd2pi ((__v2df) __A); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi32_pd (__m64 __A) +{ + return (__m128d)__builtin_ia32_cvtpi2pd ((__v2si) __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_epi32 (__m128 __A) +{ + return (__m128i)__builtin_ia32_cvtps2dq ((__v4sf) __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttps_epi32 (__m128 __A) +{ + return (__m128i)__builtin_ia32_cvttps2dq ((__v4sf) __A); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_pd (__m128 __A) +{ + return (__m128d)__builtin_ia32_cvtps2pd ((__v4sf) __A); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_si32 (__m128d __A) +{ + return __builtin_ia32_cvtsd2si ((__v2df) __A); +} + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_si64 (__m128d __A) +{ + return __builtin_ia32_cvtsd2si64 ((__v2df) __A); +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_si64x (__m128d __A) +{ + return __builtin_ia32_cvtsd2si64 ((__v2df) __A); +} + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttsd_si32 (__m128d __A) +{ + return __builtin_ia32_cvttsd2si ((__v2df) __A); +} + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttsd_si64 (__m128d __A) +{ + return __builtin_ia32_cvttsd2si64 ((__v2df) __A); +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttsd_si64x (__m128d __A) +{ + return __builtin_ia32_cvttsd2si64 ((__v2df) __A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_ss (__m128 __A, __m128d __B) +{ + return (__m128)__builtin_ia32_cvtsd2ss ((__v4sf) __A, (__v2df) __B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi32_sd (__m128d __A, int __B) +{ + return (__m128d)__builtin_ia32_cvtsi2sd ((__v2df) __A, __B); +} + + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_sd (__m128d __A, long long __B) +{ + return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64x_sd (__m128d __A, long long __B) +{ + return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_sd (__m128d __A, __m128 __B) +{ + return (__m128d)__builtin_ia32_cvtss2sd ((__v2df) __A, (__v4sf)__B); +} +# 956 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_unpckhpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_unpcklpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadh_pd (__m128d __A, double const *__B) +{ + return (__m128d)__builtin_ia32_loadhpd ((__v2df)__A, __B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadl_pd (__m128d __A, double const *__B) +{ + return (__m128d)__builtin_ia32_loadlpd ((__v2df)__A, __B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movemask_pd (__m128d __A) +{ + return __builtin_ia32_movmskpd ((__v2df)__A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_packsswb128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_packssdw128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packus_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_packuswb128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckhbw128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckhwd128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckhdq128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckhqdq128 ((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpcklbw128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpcklwd128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckldq128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpcklqdq128 ((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qu)__A + (__v16qu)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hu)__A + (__v8hu)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4su)__A + (__v4su)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A + (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_paddsb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_paddsw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_paddusb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_epu16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_paddusw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qu)__A - (__v16qu)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hu)__A - (__v8hu)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4su)__A - (__v4su)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A - (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psubsb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psubsw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psubusb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_epu16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psubusw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_madd_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmaddwd128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mulhi_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmulhw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mullo_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hu)__A * (__v8hu)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_su32 (__m64 __A, __m64 __B) +{ + return (__m64)__builtin_ia32_pmuludq ((__v2si)__A, (__v2si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_epu32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmuludq128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_epi16 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psllwi128 ((__v8hi)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_epi32 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_pslldi128 ((__v4si)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_epi64 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psllqi128 ((__v2di)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srai_epi16 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psrawi128 ((__v8hi)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srai_epi32 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psradi128 ((__v4si)__A, __B); +} +# 1243 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_epi16 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psrlwi128 ((__v8hi)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_epi32 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psrldi128 ((__v4si)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_epi64 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psrlqi128 ((__v2di)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psllw128((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pslld128((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psllq128((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sra_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psraw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sra_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psrad128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psrlw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psrld128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psrlq128 ((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_and_si128 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A & (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_andnot_si128 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pandn128 ((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_or_si128 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A | (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_xor_si128 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A ^ (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qi)__A == (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hi)__A == (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4si)__A == (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qs)__A < (__v16qs)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hi)__A < (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4si)__A < (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qs)__A > (__v16qs)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hi)__A > (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4si)__A > (__v4si)__B); +} +# 1407 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmaxsw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmaxub128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pminsw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pminub128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movemask_epi8 (__m128i __A) +{ + return __builtin_ia32_pmovmskb128 ((__v16qi)__A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mulhi_epu16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmulhuw128 ((__v8hi)__A, (__v8hi)__B); +} +# 1470 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_maskmoveu_si128 (__m128i __A, __m128i __B, char *__C) +{ + __builtin_ia32_maskmovdqu ((__v16qi)__A, (__v16qi)__B, __C); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_avg_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pavgb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_avg_epu16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pavgw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sad_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psadbw128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_si32 (int *__A, int __B) +{ + __builtin_ia32_movnti (__A, __B); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_si64 (long long int *__A, long long int __B) +{ + __builtin_ia32_movnti64 (__A, __B); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_si128 (__m128i *__A, __m128i __B) +{ + __builtin_ia32_movntdq ((__v2di *)__A, (__v2di)__B); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_pd (double *__A, __m128d __B) +{ + __builtin_ia32_movntpd (__A, (__v2df)__B); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_clflush (void const *__A) +{ + __builtin_ia32_clflush (__A); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_lfence (void) +{ + __builtin_ia32_lfence (); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mfence (void) +{ + __builtin_ia32_mfence (); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi32_si128 (int __A) +{ + return _mm_set_epi32 (0, 0, 0, __A); +} + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_si128 (long long __A) +{ + return _mm_set_epi64x (0, __A); +} + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64x_si128 (long long __A) +{ + return _mm_set_epi64x (0, __A); +} + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castpd_ps(__m128d __A) +{ + return (__m128) __A; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castpd_si128(__m128d __A) +{ + return (__m128i) __A; +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castps_pd(__m128 __A) +{ + return (__m128d) __A; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castps_si128(__m128 __A) +{ + return (__m128i) __A; +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castsi128_ps(__m128i __A) +{ + return (__m128) __A; +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castsi128_pd(__m128i __A) +{ + return (__m128d) __A; +} +# 14 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" 2 + + + + + + + + +# 21 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" +namespace boost{ namespace math{ namespace lanczos{ + +template <> +inline double lanczos13m53::lanczos_sum(const double& x) +{ + static const __attribute__((__aligned__(16))) double coeff[26] = { + static_cast(2.506628274631000270164908177133837338626L), + static_cast(1u), + static_cast(210.8242777515793458725097339207133627117L), + static_cast(66u), + static_cast(8071.672002365816210638002902272250613822L), + static_cast(1925u), + static_cast(186056.2653952234950402949897160456992822L), + static_cast(32670u), + static_cast(2876370.628935372441225409051620849613599L), + static_cast(357423u), + static_cast(31426415.58540019438061423162831820536287L), + static_cast(2637558u), + static_cast(248874557.8620541565114603864132294232163L), + static_cast(13339535u), + static_cast(1439720407.311721673663223072794912393972L), + static_cast(45995730u), + static_cast(6039542586.35202800506429164430729792107L), + static_cast(105258076u), + static_cast(17921034426.03720969991975575445893111267L), + static_cast(150917976u), + static_cast(35711959237.35566804944018545154716670596L), + static_cast(120543840u), + static_cast(42919803642.64909876895789904700198885093L), + static_cast(39916800u), + static_cast(23531376880.41075968857200767445163675473L), + static_cast(0u) + }; + + static const double lim = 4.31965e+25; + + if (x > lim) + { + double z = 1 / x; + return ((((((((((((coeff[24] * z + coeff[22]) * z + coeff[20]) * z + coeff[18]) * z + coeff[16]) * z + coeff[14]) * z + coeff[12]) * z + coeff[10]) * z + coeff[8]) * z + coeff[6]) * z + coeff[4]) * z + coeff[2]) * z + coeff[0]) / ((((((((((((coeff[25] * z + coeff[23]) * z + coeff[21]) * z + coeff[19]) * z + coeff[17]) * z + coeff[15]) * z + coeff[13]) * z + coeff[11]) * z + coeff[9]) * z + coeff[7]) * z + coeff[5]) * z + coeff[3]) * z + coeff[1]); + } + + __m128d vx = _mm_load1_pd(&x); + __m128d sum_even = _mm_load_pd(coeff); + __m128d sum_odd = _mm_load_pd(coeff+2); + __m128d nc_odd, nc_even; + __m128d vx2 = _mm_mul_pd(vx, vx); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 4); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 6); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 8); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 10); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 12); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 14); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 16); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 18); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 20); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 22); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 24); + sum_odd = _mm_mul_pd(sum_odd, vx); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_even = _mm_add_pd(sum_even, sum_odd); + + + double __attribute__((__aligned__(16))) t[2]; + _mm_store_pd(t, sum_even); + + return t[0] / t[1]; +} + +template <> +inline double lanczos13m53::lanczos_sum_expG_scaled(const double& x) +{ + static const __attribute__((__aligned__(16))) double coeff[26] = { + static_cast(0.006061842346248906525783753964555936883222L), + static_cast(1u), + static_cast(0.5098416655656676188125178644804694509993L), + static_cast(66u), + static_cast(19.51992788247617482847860966235652136208L), + static_cast(1925u), + static_cast(449.9445569063168119446858607650988409623L), + static_cast(32670u), + static_cast(6955.999602515376140356310115515198987526L), + static_cast(357423u), + static_cast(75999.29304014542649875303443598909137092L), + static_cast(2637558u), + static_cast(601859.6171681098786670226533699352302507L), + static_cast(13339535u), + static_cast(3481712.15498064590882071018964774556468L), + static_cast(45995730u), + static_cast(14605578.08768506808414169982791359218571L), + static_cast(105258076u), + static_cast(43338889.32467613834773723740590533316085L), + static_cast(150917976u), + static_cast(86363131.28813859145546927288977868422342L), + static_cast(120543840u), + static_cast(103794043.1163445451906271053616070238554L), + static_cast(39916800u), + static_cast(56906521.91347156388090791033559122686859L), + static_cast(0u) + }; + + static const double lim = 4.76886e+25; + + if (x > lim) + { + double z = 1 / x; + return ((((((((((((coeff[24] * z + coeff[22]) * z + coeff[20]) * z + coeff[18]) * z + coeff[16]) * z + coeff[14]) * z + coeff[12]) * z + coeff[10]) * z + coeff[8]) * z + coeff[6]) * z + coeff[4]) * z + coeff[2]) * z + coeff[0]) / ((((((((((((coeff[25] * z + coeff[23]) * z + coeff[21]) * z + coeff[19]) * z + coeff[17]) * z + coeff[15]) * z + coeff[13]) * z + coeff[11]) * z + coeff[9]) * z + coeff[7]) * z + coeff[5]) * z + coeff[3]) * z + coeff[1]); + } + + __m128d vx = _mm_load1_pd(&x); + __m128d sum_even = _mm_load_pd(coeff); + __m128d sum_odd = _mm_load_pd(coeff+2); + __m128d nc_odd, nc_even; + __m128d vx2 = _mm_mul_pd(vx, vx); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 4); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 6); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 8); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 10); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 12); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 14); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 16); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 18); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 20); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 22); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 24); + sum_odd = _mm_mul_pd(sum_odd, vx); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_even = _mm_add_pd(sum_even, sum_odd); + + + double __attribute__((__aligned__(16))) t[2]; + _mm_store_pd(t, sum_even); + + return t[0] / t[1]; +} +# 227 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" +} +} +} +# 2708 "../../../../boost/math/special_functions/lanczos.hpp" 2 +# 33 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/detail/igamma_large.hpp" 1 +# 62 "../../../../boost/math/special_functions/detail/igamma_large.hpp" +namespace boost{ namespace math{ + + +export template +typename tools::promote_args::type erf(T z); +export template +typename tools::promote_args::type erfc(T z); + + +namespace detail{ + + + + +template +inline T igamma_temme_large(T, T, const Policy& , std::integral_constant const *) +{ + + +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" 3 + (void) ((!!( +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" + 0 +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" 3 + )) || (_assert( +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" + "0" +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" 3 + ,"../../../../boost/math/special_functions/detail/igamma_large.hpp",80),0)) +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" + ; + return 0; +} + + + + +template +T igamma_temme_large(T a, T x, const Policy& pol, std::integral_constant const *) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T sigma = (x - a) / a; + T phi = -boost::math::log1pmx(sigma, pol); + T y = a * phi; + T z = sqrt(2 * phi); + if(x < a) + z = -z; + + T workspace[13]; + + static const T C0[] = { + boost::math::tools::make_big_value( -0.333333333333333333333, "-0.333333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0833333333333333333333, "0.0833333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0148148148148148148148, "-0.0148148148148148148148", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00115740740740740740741, "0.00115740740740740740741", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000352733686067019400353, "0.000352733686067019400353", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0001787551440329218107, "-0.0001787551440329218107", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.39192631785224377817e-4, "0.39192631785224377817e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.218544851067999216147e-5, "-0.218544851067999216147e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.18540622107151599607e-5, "-0.18540622107151599607e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.829671134095308600502e-6, "0.829671134095308600502e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.176659527368260793044e-6, "-0.176659527368260793044e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.670785354340149858037e-8, "0.670785354340149858037e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.102618097842403080426e-7, "0.102618097842403080426e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.438203601845335318655e-8, "-0.438203601845335318655e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.914769958223679023418e-9, "0.914769958223679023418e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.255141939949462497669e-10, "-0.255141939949462497669e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.583077213255042506746e-10, "-0.583077213255042506746e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.243619480206674162437e-10, "0.243619480206674162437e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.502766928011417558909e-11, "-0.502766928011417558909e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[0] = tools::evaluate_polynomial(C0, z); + + static const T C1[] = { + boost::math::tools::make_big_value( -0.00185185185185185185185, "-0.00185185185185185185185", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00347222222222222222222, "-0.00347222222222222222222", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00264550264550264550265, "0.00264550264550264550265", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000990226337448559670782, "-0.000990226337448559670782", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000205761316872427983539, "0.000205761316872427983539", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.40187757201646090535e-6, "-0.40187757201646090535e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.18098550334489977837e-4, "-0.18098550334489977837e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.764916091608111008464e-5, "0.764916091608111008464e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.161209008945634460038e-5, "-0.161209008945634460038e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.464712780280743434226e-8, "0.464712780280743434226e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137863344691572095931e-6, "0.137863344691572095931e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.575254560351770496402e-7, "-0.575254560351770496402e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119516285997781473243e-7, "0.119516285997781473243e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.175432417197476476238e-10, "-0.175432417197476476238e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.100915437106004126275e-8, "-0.100915437106004126275e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.416279299184258263623e-9, "0.416279299184258263623e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.856390702649298063807e-10, "-0.856390702649298063807e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[1] = tools::evaluate_polynomial(C1, z); + + static const T C2[] = { + boost::math::tools::make_big_value( 0.00413359788359788359788, "0.00413359788359788359788", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00268132716049382716049, "-0.00268132716049382716049", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000771604938271604938272, "0.000771604938271604938272", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.200938786008230452675e-5, "0.200938786008230452675e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000107366532263651605215, "-0.000107366532263651605215", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.529234488291201254164e-4, "0.529234488291201254164e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.127606351886187277134e-4, "-0.127606351886187277134e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.342357873409613807419e-7, "0.342357873409613807419e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137219573090629332056e-5, "0.137219573090629332056e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.629899213838005502291e-6, "-0.629899213838005502291e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.142806142060642417916e-6, "0.142806142060642417916e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.204770984219908660149e-9, "-0.204770984219908660149e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.140925299108675210533e-7, "-0.140925299108675210533e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.622897408492202203356e-8, "0.622897408492202203356e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.136704883966171134993e-8, "-0.136704883966171134993e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[2] = tools::evaluate_polynomial(C2, z); + + static const T C3[] = { + boost::math::tools::make_big_value( 0.000649434156378600823045, "0.000649434156378600823045", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000229472093621399176955, "0.000229472093621399176955", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000469189494395255712128, "-0.000469189494395255712128", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000267720632062838852962, "0.000267720632062838852962", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.756180167188397641073e-4, "-0.756180167188397641073e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.239650511386729665193e-6, "-0.239650511386729665193e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.110826541153473023615e-4, "0.110826541153473023615e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.56749528269915965675e-5, "-0.56749528269915965675e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.142309007324358839146e-5, "0.142309007324358839146e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.278610802915281422406e-10, "-0.278610802915281422406e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.169584040919302772899e-6, "-0.169584040919302772899e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.809946490538808236335e-7, "0.809946490538808236335e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.191111684859736540607e-7, "-0.191111684859736540607e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[3] = tools::evaluate_polynomial(C3, z); + + static const T C4[] = { + boost::math::tools::make_big_value( -0.000861888290916711698605, "-0.000861888290916711698605", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000784039221720066627474, "0.000784039221720066627474", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000299072480303190179733, "-0.000299072480303190179733", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.146384525788434181781e-5, "-0.146384525788434181781e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.664149821546512218666e-4, "0.664149821546512218666e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.396836504717943466443e-4, "-0.396836504717943466443e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113757269706784190981e-4, "0.113757269706784190981e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.250749722623753280165e-9, "0.250749722623753280165e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.169541495365583060147e-5, "-0.169541495365583060147e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.890750753220530968883e-6, "0.890750753220530968883e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.229293483400080487057e-6, "-0.229293483400080487057e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[4] = tools::evaluate_polynomial(C4, z); + + static const T C5[] = { + boost::math::tools::make_big_value( -0.000336798553366358150309, "-0.000336798553366358150309", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.697281375836585777429e-4, "-0.697281375836585777429e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000277275324495939207873, "0.000277275324495939207873", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000199325705161888477003, "-0.000199325705161888477003", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.679778047793720783882e-4, "0.679778047793720783882e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.141906292064396701483e-6, "0.141906292064396701483e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.135940481897686932785e-4, "-0.135940481897686932785e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.801847025633420153972e-5, "0.801847025633420153972e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.229148117650809517038e-5, "-0.229148117650809517038e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[5] = tools::evaluate_polynomial(C5, z); + + static const T C6[] = { + boost::math::tools::make_big_value( 0.000531307936463992223166, "0.000531307936463992223166", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000592166437353693882865, "-0.000592166437353693882865", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000270878209671804482771, "0.000270878209671804482771", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.790235323266032787212e-6, "0.790235323266032787212e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.815396936756196875093e-4, "-0.815396936756196875093e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.561168275310624965004e-4, "0.561168275310624965004e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.183291165828433755673e-4, "-0.183291165828433755673e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.307961345060330478256e-8, "-0.307961345060330478256e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.346515536880360908674e-5, "0.346515536880360908674e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.20291327396058603727e-5, "-0.20291327396058603727e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.57887928631490037089e-6, "0.57887928631490037089e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[6] = tools::evaluate_polynomial(C6, z); + + static const T C7[] = { + boost::math::tools::make_big_value( 0.000344367606892377671254, "0.000344367606892377671254", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.517179090826059219337e-4, "0.517179090826059219337e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000334931610811422363117, "-0.000334931610811422363117", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000281269515476323702274, "0.000281269515476323702274", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000109765822446847310235, "-0.000109765822446847310235", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.127410090954844853795e-6, "-0.127410090954844853795e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.277444515115636441571e-4, "0.277444515115636441571e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.182634888057113326614e-4, "-0.182634888057113326614e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.578769494973505239894e-5, "0.578769494973505239894e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[7] = tools::evaluate_polynomial(C7, z); + + static const T C8[] = { + boost::math::tools::make_big_value( -0.000652623918595309418922, "-0.000652623918595309418922", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000839498720672087279993, "0.000839498720672087279993", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000438297098541721005061, "-0.000438297098541721005061", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.696909145842055197137e-6, "-0.696909145842055197137e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000166448466420675478374, "0.000166448466420675478374", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000127835176797692185853, "-0.000127835176797692185853", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.462995326369130429061e-4, "0.462995326369130429061e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[8] = tools::evaluate_polynomial(C8, z); + + static const T C9[] = { + boost::math::tools::make_big_value( -0.000596761290192746250124, "-0.000596761290192746250124", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.720489541602001055909e-4, "-0.720489541602001055909e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000678230883766732836162, "0.000678230883766732836162", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0006401475260262758451, "-0.0006401475260262758451", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000277501076343287044992, "0.000277501076343287044992", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[9] = tools::evaluate_polynomial(C9, z); + + static const T C10[] = { + boost::math::tools::make_big_value( 0.00133244544948006563713, "0.00133244544948006563713", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0019144384985654775265, "-0.0019144384985654775265", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00110893691345966373396, "0.00110893691345966373396", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[10] = tools::evaluate_polynomial(C10, z); + + static const T C11[] = { + boost::math::tools::make_big_value( 0.00157972766073083495909, "0.00157972766073083495909", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000162516262783915816899, "0.000162516262783915816899", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00206334210355432762645, "-0.00206334210355432762645", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00213896861856890981541, "0.00213896861856890981541", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00101085593912630031708, "-0.00101085593912630031708", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[11] = tools::evaluate_polynomial(C11, z); + + static const T C12[] = { + boost::math::tools::make_big_value( -0.00407251211951401664727, "-0.00407251211951401664727", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00640336283380806979482, "0.00640336283380806979482", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00404101610816766177474, "-0.00404101610816766177474", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[12] = tools::evaluate_polynomial(C12, z); + + T result = tools::evaluate_polynomial<13, T, T>(workspace, 1/a); + result *= exp(-y) / sqrt(2 * constants::pi() * a); + if(x < a) + result = -result; + + result += boost::math::erfc(sqrt(y), pol) / 2; + + return result; +} + + + + +template +T igamma_temme_large(T a, T x, const Policy& pol, std::integral_constant const *) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T sigma = (x - a) / a; + T phi = -boost::math::log1pmx(sigma, pol); + T y = a * phi; + T z = sqrt(2 * phi); + if(x < a) + z = -z; + + T workspace[10]; + + static const T C0[] = { + static_cast(-0.33333333333333333L), + static_cast(0.083333333333333333L), + static_cast(-0.014814814814814815L), + static_cast(0.0011574074074074074L), + static_cast(0.0003527336860670194L), + static_cast(-0.00017875514403292181L), + static_cast(0.39192631785224378e-4L), + static_cast(-0.21854485106799922e-5L), + static_cast(-0.185406221071516e-5L), + static_cast(0.8296711340953086e-6L), + static_cast(-0.17665952736826079e-6L), + static_cast(0.67078535434014986e-8L), + static_cast(0.10261809784240308e-7L), + static_cast(-0.43820360184533532e-8L), + static_cast(0.91476995822367902e-9L), + }; + workspace[0] = tools::evaluate_polynomial(C0, z); + + static const T C1[] = { + static_cast(-0.0018518518518518519L), + static_cast(-0.0034722222222222222L), + static_cast(0.0026455026455026455L), + static_cast(-0.00099022633744855967L), + static_cast(0.00020576131687242798L), + static_cast(-0.40187757201646091e-6L), + static_cast(-0.18098550334489978e-4L), + static_cast(0.76491609160811101e-5L), + static_cast(-0.16120900894563446e-5L), + static_cast(0.46471278028074343e-8L), + static_cast(0.1378633446915721e-6L), + static_cast(-0.5752545603517705e-7L), + static_cast(0.11951628599778147e-7L), + }; + workspace[1] = tools::evaluate_polynomial(C1, z); + + static const T C2[] = { + static_cast(0.0041335978835978836L), + static_cast(-0.0026813271604938272L), + static_cast(0.00077160493827160494L), + static_cast(0.20093878600823045e-5L), + static_cast(-0.00010736653226365161L), + static_cast(0.52923448829120125e-4L), + static_cast(-0.12760635188618728e-4L), + static_cast(0.34235787340961381e-7L), + static_cast(0.13721957309062933e-5L), + static_cast(-0.6298992138380055e-6L), + static_cast(0.14280614206064242e-6L), + }; + workspace[2] = tools::evaluate_polynomial(C2, z); + + static const T C3[] = { + static_cast(0.00064943415637860082L), + static_cast(0.00022947209362139918L), + static_cast(-0.00046918949439525571L), + static_cast(0.00026772063206283885L), + static_cast(-0.75618016718839764e-4L), + static_cast(-0.23965051138672967e-6L), + static_cast(0.11082654115347302e-4L), + static_cast(-0.56749528269915966e-5L), + static_cast(0.14230900732435884e-5L), + }; + workspace[3] = tools::evaluate_polynomial(C3, z); + + static const T C4[] = { + static_cast(-0.0008618882909167117L), + static_cast(0.00078403922172006663L), + static_cast(-0.00029907248030319018L), + static_cast(-0.14638452578843418e-5L), + static_cast(0.66414982154651222e-4L), + static_cast(-0.39683650471794347e-4L), + static_cast(0.11375726970678419e-4L), + }; + workspace[4] = tools::evaluate_polynomial(C4, z); + + static const T C5[] = { + static_cast(-0.00033679855336635815L), + static_cast(-0.69728137583658578e-4L), + static_cast(0.00027727532449593921L), + static_cast(-0.00019932570516188848L), + static_cast(0.67977804779372078e-4L), + static_cast(0.1419062920643967e-6L), + static_cast(-0.13594048189768693e-4L), + static_cast(0.80184702563342015e-5L), + static_cast(-0.22914811765080952e-5L), + }; + workspace[5] = tools::evaluate_polynomial(C5, z); + + static const T C6[] = { + static_cast(0.00053130793646399222L), + static_cast(-0.00059216643735369388L), + static_cast(0.00027087820967180448L), + static_cast(0.79023532326603279e-6L), + static_cast(-0.81539693675619688e-4L), + static_cast(0.56116827531062497e-4L), + static_cast(-0.18329116582843376e-4L), + }; + workspace[6] = tools::evaluate_polynomial(C6, z); + + static const T C7[] = { + static_cast(0.00034436760689237767L), + static_cast(0.51717909082605922e-4L), + static_cast(-0.00033493161081142236L), + static_cast(0.0002812695154763237L), + static_cast(-0.00010976582244684731L), + }; + workspace[7] = tools::evaluate_polynomial(C7, z); + + static const T C8[] = { + static_cast(-0.00065262391859530942L), + static_cast(0.00083949872067208728L), + static_cast(-0.00043829709854172101L), + }; + workspace[8] = tools::evaluate_polynomial(C8, z); + workspace[9] = static_cast(-0.00059676129019274625L); + + T result = tools::evaluate_polynomial<10, T, T>(workspace, 1/a); + result *= exp(-y) / sqrt(2 * constants::pi() * a); + if(x < a) + result = -result; + + result += boost::math::erfc(sqrt(y), pol) / 2; + + return result; +} + + + + +template +T igamma_temme_large(T a, T x, const Policy& pol, std::integral_constant const *) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T sigma = (x - a) / a; + T phi = -boost::math::log1pmx(sigma, pol); + T y = a * phi; + T z = sqrt(2 * phi); + if(x < a) + z = -z; + + T workspace[3]; + + static const T C0[] = { + static_cast(-0.333333333L), + static_cast(0.0833333333L), + static_cast(-0.0148148148L), + static_cast(0.00115740741L), + static_cast(0.000352733686L), + static_cast(-0.000178755144L), + static_cast(0.391926318e-4L), + }; + workspace[0] = tools::evaluate_polynomial(C0, z); + + static const T C1[] = { + static_cast(-0.00185185185L), + static_cast(-0.00347222222L), + static_cast(0.00264550265L), + static_cast(-0.000990226337L), + static_cast(0.000205761317L), + }; + workspace[1] = tools::evaluate_polynomial(C1, z); + + static const T C2[] = { + static_cast(0.00413359788L), + static_cast(-0.00268132716L), + static_cast(0.000771604938L), + }; + workspace[2] = tools::evaluate_polynomial(C2, z); + + T result = tools::evaluate_polynomial(workspace, 1/a); + result *= exp(-y) / sqrt(2 * constants::pi() * a); + if(x < a) + result = -result; + + result += boost::math::erfc(sqrt(y), pol) / 2; + + return result; +} + + + + + + + +template +T igamma_temme_large(T a, T x, const Policy& pol, std::integral_constant const *) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T sigma = (x - a) / a; + T phi = -boost::math::log1pmx(sigma, pol); + T y = a * phi; + T z = sqrt(2 * phi); + if(x < a) + z = -z; + + T workspace[14]; + + static const T C0[] = { + boost::math::tools::make_big_value( -0.333333333333333333333333333333333333, "-0.333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0833333333333333333333333333333333333, "0.0833333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0148148148148148148148148148148148148, "-0.0148148148148148148148148148148148148", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00115740740740740740740740740740740741, "0.00115740740740740740740740740740740741", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0003527336860670194003527336860670194, "0.0003527336860670194003527336860670194", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000178755144032921810699588477366255144, "-0.000178755144032921810699588477366255144", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.391926317852243778169704095630021556e-4, "0.391926317852243778169704095630021556e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.218544851067999216147364295512443661e-5, "-0.218544851067999216147364295512443661e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.185406221071515996070179883622956325e-5, "-0.185406221071515996070179883622956325e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.829671134095308600501624213166443227e-6, "0.829671134095308600501624213166443227e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.17665952736826079304360054245742403e-6, "-0.17665952736826079304360054245742403e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.670785354340149858036939710029613572e-8, "0.670785354340149858036939710029613572e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.102618097842403080425739573227252951e-7, "0.102618097842403080425739573227252951e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.438203601845335318655297462244719123e-8, "-0.438203601845335318655297462244719123e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.914769958223679023418248817633113681e-9, "0.914769958223679023418248817633113681e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.255141939949462497668779537993887013e-10, "-0.255141939949462497668779537993887013e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.583077213255042506746408945040035798e-10, "-0.583077213255042506746408945040035798e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.243619480206674162436940696707789943e-10, "0.243619480206674162436940696707789943e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.502766928011417558909054985925744366e-11, "-0.502766928011417558909054985925744366e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.110043920319561347708374174497293411e-12, "0.110043920319561347708374174497293411e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.337176326240098537882769884169200185e-12, "0.337176326240098537882769884169200185e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.13923887224181620659193661848957998e-12, "-0.13923887224181620659193661848957998e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.285348938070474432039669099052828299e-13, "0.285348938070474432039669099052828299e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.513911183424257261899064580300494205e-15, "-0.513911183424257261899064580300494205e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.197522882943494428353962401580710912e-14, "-0.197522882943494428353962401580710912e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.809952115670456133407115668702575255e-15, "0.809952115670456133407115668702575255e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.165225312163981618191514820265351162e-15, "-0.165225312163981618191514820265351162e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.253054300974788842327061090060267385e-17, "0.253054300974788842327061090060267385e-17", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.116869397385595765888230876507793475e-16, "0.116869397385595765888230876507793475e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.477003704982048475822167804084816597e-17, "-0.477003704982048475822167804084816597e-17", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.969912605905623712420709685898585354e-18, "0.969912605905623712420709685898585354e-18", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[0] = tools::evaluate_polynomial(C0, z); + + static const T C1[] = { + boost::math::tools::make_big_value( -0.00185185185185185185185185185185185185, "-0.00185185185185185185185185185185185185", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00347222222222222222222222222222222222, "-0.00347222222222222222222222222222222222", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0026455026455026455026455026455026455, "0.0026455026455026455026455026455026455", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000990226337448559670781893004115226337, "-0.000990226337448559670781893004115226337", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000205761316872427983539094650205761317, "0.000205761316872427983539094650205761317", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.401877572016460905349794238683127572e-6, "-0.401877572016460905349794238683127572e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.180985503344899778370285914867533523e-4, "-0.180985503344899778370285914867533523e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.76491609160811100846374214980916921e-5, "0.76491609160811100846374214980916921e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.16120900894563446003775221882217767e-5, "-0.16120900894563446003775221882217767e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.464712780280743434226135033938722401e-8, "0.464712780280743434226135033938722401e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137863344691572095931187533077488877e-6, "0.137863344691572095931187533077488877e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.575254560351770496402194531835048307e-7, "-0.575254560351770496402194531835048307e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119516285997781473243076536699698169e-7, "0.119516285997781473243076536699698169e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.175432417197476476237547551202312502e-10, "-0.175432417197476476237547551202312502e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.100915437106004126274577504686681675e-8, "-0.100915437106004126274577504686681675e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.416279299184258263623372347219858628e-9, "0.416279299184258263623372347219858628e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.856390702649298063807431562579670208e-10, "-0.856390702649298063807431562579670208e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.606721510160475861512701762169919581e-13, "0.606721510160475861512701762169919581e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.716249896481148539007961017165545733e-11, "0.716249896481148539007961017165545733e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.293318664377143711740636683615595403e-11, "-0.293318664377143711740636683615595403e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.599669636568368872330374527568788909e-12, "0.599669636568368872330374527568788909e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.216717865273233141017100472779701734e-15, "-0.216717865273233141017100472779701734e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.497833997236926164052815522048108548e-13, "-0.497833997236926164052815522048108548e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.202916288237134247736694804325894226e-13, "0.202916288237134247736694804325894226e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.413125571381061004935108332558187111e-14, "-0.413125571381061004935108332558187111e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.828651623988309644380188591057589316e-18, "0.828651623988309644380188591057589316e-18", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.341003088693333279336339355910600992e-15, "0.341003088693333279336339355910600992e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.138541953028939715357034547426313703e-15, "-0.138541953028939715357034547426313703e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.281234665322887466568860332727259483e-16, "0.281234665322887466568860332727259483e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[1] = tools::evaluate_polynomial(C1, z); + + static const T C2[] = { + boost::math::tools::make_big_value( 0.0041335978835978835978835978835978836, "0.0041335978835978835978835978835978836", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00268132716049382716049382716049382716, "-0.00268132716049382716049382716049382716", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000771604938271604938271604938271604938, "0.000771604938271604938271604938271604938", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.200938786008230452674897119341563786e-5, "0.200938786008230452674897119341563786e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000107366532263651605215391223621676297, "-0.000107366532263651605215391223621676297", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.529234488291201254164217127180090143e-4, "0.529234488291201254164217127180090143e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.127606351886187277133779191392360117e-4, "-0.127606351886187277133779191392360117e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.34235787340961380741902003904747389e-7, "0.34235787340961380741902003904747389e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137219573090629332055943852926020279e-5, "0.137219573090629332055943852926020279e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.629899213838005502290672234278391876e-6, "-0.629899213838005502290672234278391876e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.142806142060642417915846008822771748e-6, "0.142806142060642417915846008822771748e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.204770984219908660149195854409200226e-9, "-0.204770984219908660149195854409200226e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.140925299108675210532930244154315272e-7, "-0.140925299108675210532930244154315272e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.622897408492202203356394293530327112e-8, "0.622897408492202203356394293530327112e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.136704883966171134992724380284402402e-8, "-0.136704883966171134992724380284402402e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.942835615901467819547711211663208075e-12, "0.942835615901467819547711211663208075e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.128722524000893180595479368872770442e-9, "0.128722524000893180595479368872770442e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.556459561343633211465414765894951439e-10, "-0.556459561343633211465414765894951439e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119759355463669810035898150310311343e-10, "0.119759355463669810035898150310311343e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.416897822518386350403836626692480096e-14, "-0.416897822518386350403836626692480096e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.109406404278845944099299008640802908e-11, "-0.109406404278845944099299008640802908e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.4662239946390135746326204922464679e-12, "0.4662239946390135746326204922464679e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.990510576390690597844122258212382301e-13, "-0.990510576390690597844122258212382301e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.189318767683735145056885183170630169e-16, "0.189318767683735145056885183170630169e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.885922187259112726176031067028740667e-14, "0.885922187259112726176031067028740667e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.373782039804640545306560251777191937e-14, "-0.373782039804640545306560251777191937e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.786883363903515525774088394065960751e-15, "0.786883363903515525774088394065960751e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[2] = tools::evaluate_polynomial(C2, z); + + static const T C3[] = { + boost::math::tools::make_big_value( 0.000649434156378600823045267489711934156, "0.000649434156378600823045267489711934156", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000229472093621399176954732510288065844, "0.000229472093621399176954732510288065844", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000469189494395255712128140111679206329, "-0.000469189494395255712128140111679206329", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000267720632062838852962309752433209223, "0.000267720632062838852962309752433209223", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.756180167188397641072538191879755666e-4, "-0.756180167188397641072538191879755666e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.239650511386729665193314027333231723e-6, "-0.239650511386729665193314027333231723e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.110826541153473023614770299726861227e-4, "0.110826541153473023614770299726861227e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.567495282699159656749963105701560205e-5, "-0.567495282699159656749963105701560205e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.14230900732435883914551894470580433e-5, "0.14230900732435883914551894470580433e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.278610802915281422405802158211174452e-10, "-0.278610802915281422405802158211174452e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.16958404091930277289864168795820267e-6, "-0.16958404091930277289864168795820267e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.809946490538808236335278504852724081e-7, "0.809946490538808236335278504852724081e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.191111684859736540606728140872727635e-7, "-0.191111684859736540606728140872727635e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.239286204398081179686413514022282056e-11, "0.239286204398081179686413514022282056e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.206201318154887984369925818486654549e-8, "0.206201318154887984369925818486654549e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.946049666185513217375417988510192814e-9, "-0.946049666185513217375417988510192814e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.215410497757749078380130268468744512e-9, "0.215410497757749078380130268468744512e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.138882333681390304603424682490735291e-13, "-0.138882333681390304603424682490735291e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.218947616819639394064123400466489455e-10, "-0.218947616819639394064123400466489455e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.979099895117168512568262802255883368e-11, "0.979099895117168512568262802255883368e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.217821918801809621153859472011393244e-11, "-0.217821918801809621153859472011393244e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.62088195734079014258166361684972205e-16, "0.62088195734079014258166361684972205e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.212697836327973697696702537114614471e-12, "0.212697836327973697696702537114614471e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.934468879151743333127396765626749473e-13, "-0.934468879151743333127396765626749473e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.204536712267828493249215913063207436e-13, "0.204536712267828493249215913063207436e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[3] = tools::evaluate_polynomial(C3, z); + + static const T C4[] = { + boost::math::tools::make_big_value( -0.000861888290916711698604702719929057378, "-0.000861888290916711698604702719929057378", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00078403922172006662747403488144228885, "0.00078403922172006662747403488144228885", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000299072480303190179733389609932819809, "-0.000299072480303190179733389609932819809", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.146384525788434181781232535690697556e-5, "-0.146384525788434181781232535690697556e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.664149821546512218665853782451862013e-4, "0.664149821546512218665853782451862013e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.396836504717943466443123507595386882e-4, "-0.396836504717943466443123507595386882e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113757269706784190980552042885831759e-4, "0.113757269706784190980552042885831759e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.250749722623753280165221942390057007e-9, "0.250749722623753280165221942390057007e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.169541495365583060147164356781525752e-5, "-0.169541495365583060147164356781525752e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.890750753220530968882898422505515924e-6, "0.890750753220530968882898422505515924e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.229293483400080487057216364891158518e-6, "-0.229293483400080487057216364891158518e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.295679413754404904696572852500004588e-10, "0.295679413754404904696572852500004588e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.288658297427087836297341274604184504e-7, "0.288658297427087836297341274604184504e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.141897394378032193894774303903982717e-7, "-0.141897394378032193894774303903982717e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.344635804994648970659527720474194356e-8, "0.344635804994648970659527720474194356e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.230245171745280671320192735850147087e-12, "-0.230245171745280671320192735850147087e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.394092330280464052750697640085291799e-9, "-0.394092330280464052750697640085291799e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.186023389685045019134258533045185639e-9, "0.186023389685045019134258533045185639e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.435632300505661804380678327446262424e-10, "-0.435632300505661804380678327446262424e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.127860010162962312660550463349930726e-14, "0.127860010162962312660550463349930726e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.467927502665791946200382739991760062e-11, "0.467927502665791946200382739991760062e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.214924647061348285410535341910721086e-11, "-0.214924647061348285410535341910721086e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.490881561480965216323649688463984082e-12, "0.490881561480965216323649688463984082e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[4] = tools::evaluate_polynomial(C4, z); + + static const T C5[] = { + boost::math::tools::make_big_value( -0.000336798553366358150308767592718210002, "-0.000336798553366358150308767592718210002", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.697281375836585777429398828575783308e-4, "-0.697281375836585777429398828575783308e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00027727532449593920787336425196507501, "0.00027727532449593920787336425196507501", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000199325705161888477003360405280844238, "-0.000199325705161888477003360405280844238", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.679778047793720783881640176604435742e-4, "0.679778047793720783881640176604435742e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.141906292064396701483392727105575757e-6, "0.141906292064396701483392727105575757e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.135940481897686932784583938837504469e-4, "-0.135940481897686932784583938837504469e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.80184702563342015397192571980419684e-5, "0.80184702563342015397192571980419684e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.229148117650809517038048790128781806e-5, "-0.229148117650809517038048790128781806e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.325247355129845395166230137750005047e-9, "-0.325247355129845395166230137750005047e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.346528464910852649559195496827579815e-6, "0.346528464910852649559195496827579815e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.184471871911713432765322367374920978e-6, "-0.184471871911713432765322367374920978e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.482409670378941807563762631738989002e-7, "0.482409670378941807563762631738989002e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.179894667217435153025754291716644314e-13, "-0.179894667217435153025754291716644314e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.630619450001352343517516981425944698e-8, "-0.630619450001352343517516981425944698e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.316241762877456793773762181540969623e-8, "0.316241762877456793773762181540969623e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.784092425369742929000839303523267545e-9, "-0.784092425369742929000839303523267545e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[5] = tools::evaluate_polynomial(C5, z); + + static const T C6[] = { + boost::math::tools::make_big_value( 0.00053130793646399222316574854297762391, "0.00053130793646399222316574854297762391", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000592166437353693882864836225604401187, "-0.000592166437353693882864836225604401187", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000270878209671804482771279183488328692, "0.000270878209671804482771279183488328692", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.790235323266032787212032944390816666e-6, "0.790235323266032787212032944390816666e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.815396936756196875092890088464682624e-4, "-0.815396936756196875092890088464682624e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.561168275310624965003775619041471695e-4, "0.561168275310624965003775619041471695e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.183291165828433755673259749374098313e-4, "-0.183291165828433755673259749374098313e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.307961345060330478256414192546677006e-8, "-0.307961345060330478256414192546677006e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.346515536880360908673728529745376913e-5, "0.346515536880360908673728529745376913e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.202913273960586037269527254582695285e-5, "-0.202913273960586037269527254582695285e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.578879286314900370889997586203187687e-6, "0.578879286314900370889997586203187687e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.233863067382665698933480579231637609e-12, "0.233863067382665698933480579231637609e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.88286007463304835250508524317926246e-7, "-0.88286007463304835250508524317926246e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.474359588804081278032150770595852426e-7, "0.474359588804081278032150770595852426e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.125454150207103824457130611214783073e-7, "-0.125454150207103824457130611214783073e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[6] = tools::evaluate_polynomial(C6, z); + + static const T C7[] = { + boost::math::tools::make_big_value( 0.000344367606892377671254279625108523655, "0.000344367606892377671254279625108523655", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.517179090826059219337057843002058823e-4, "0.517179090826059219337057843002058823e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000334931610811422363116635090580012327, "-0.000334931610811422363116635090580012327", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000281269515476323702273722110707777978, "0.000281269515476323702273722110707777978", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000109765822446847310235396824500789005, "-0.000109765822446847310235396824500789005", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.127410090954844853794579954588107623e-6, "-0.127410090954844853794579954588107623e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.277444515115636441570715073933712622e-4, "0.277444515115636441570715073933712622e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.182634888057113326614324442681892723e-4, "-0.182634888057113326614324442681892723e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.578769494973505239894178121070843383e-5, "0.578769494973505239894178121070843383e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.493875893393627039981813418398565502e-9, "0.493875893393627039981813418398565502e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.105953670140260427338098566209633945e-5, "-0.105953670140260427338098566209633945e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.616671437611040747858836254004890765e-6, "0.616671437611040747858836254004890765e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.175629733590604619378669693914265388e-6, "-0.175629733590604619378669693914265388e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[7] = tools::evaluate_polynomial(C7, z); + + static const T C8[] = { + boost::math::tools::make_big_value( -0.000652623918595309418922034919726622692, "-0.000652623918595309418922034919726622692", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000839498720672087279993357516764983445, "0.000839498720672087279993357516764983445", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000438297098541721005061087953050560377, "-0.000438297098541721005061087953050560377", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.696909145842055197136911097362072702e-6, "-0.696909145842055197136911097362072702e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00016644846642067547837384572662326101, "0.00016644846642067547837384572662326101", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000127835176797692185853344001461664247, "-0.000127835176797692185853344001461664247", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.462995326369130429061361032704489636e-4, "0.462995326369130429061361032704489636e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.455790986792270771162749294232219616e-8, "0.455790986792270771162749294232219616e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.105952711258051954718238500312872328e-4, "-0.105952711258051954718238500312872328e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.678334290486516662273073740749269432e-5, "0.678334290486516662273073740749269432e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.210754766662588042469972680229376445e-5, "-0.210754766662588042469972680229376445e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[8] = tools::evaluate_polynomial(C8, z); + + static const T C9[] = { + boost::math::tools::make_big_value( -0.000596761290192746250124390067179459605, "-0.000596761290192746250124390067179459605", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.720489541602001055908571930225015052e-4, "-0.720489541602001055908571930225015052e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000678230883766732836161951166000673426, "0.000678230883766732836161951166000673426", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000640147526026275845100045652582354779, "-0.000640147526026275845100045652582354779", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000277501076343287044992374518205845463, "0.000277501076343287044992374518205845463", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.181970083804651510461686554030325202e-6, "0.181970083804651510461686554030325202e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.847950711706850318239732559632810086e-4, "-0.847950711706850318239732559632810086e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.610519208250153101764709122740859458e-4, "0.610519208250153101764709122740859458e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.210739201834048624082975255893773306e-4, "-0.210739201834048624082975255893773306e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[9] = tools::evaluate_polynomial(C9, z); + + static const T C10[] = { + boost::math::tools::make_big_value( 0.00133244544948006563712694993432717968, "0.00133244544948006563712694993432717968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00191443849856547752650089885832852254, "-0.00191443849856547752650089885832852254", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0011089369134596637339607446329267522, "0.0011089369134596637339607446329267522", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.993240412264229896742295262075817566e-6, "0.993240412264229896742295262075817566e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000508745012930931989848393025305956774, "-0.000508745012930931989848393025305956774", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00042735056665392884328432271160040444, "0.00042735056665392884328432271160040444", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000168588537679107988033552814662382059, "-0.000168588537679107988033552814662382059", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[10] = tools::evaluate_polynomial(C10, z); + + static const T C11[] = { + boost::math::tools::make_big_value( 0.00157972766073083495908785631307733022, "0.00157972766073083495908785631307733022", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000162516262783915816898635123980270998, "0.000162516262783915816898635123980270998", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00206334210355432762645284467690276817, "-0.00206334210355432762645284467690276817", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00213896861856890981541061922797693947, "0.00213896861856890981541061922797693947", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00101085593912630031708085801712479376, "-0.00101085593912630031708085801712479376", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[11] = tools::evaluate_polynomial(C11, z); + + static const T C12[] = { + boost::math::tools::make_big_value( -0.00407251211951401664727281097914544601, "-0.00407251211951401664727281097914544601", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00640336283380806979482363809026579583, "0.00640336283380806979482363809026579583", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00404101610816766177473974858518094879, "-0.00404101610816766177473974858518094879", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[12] = tools::evaluate_polynomial(C12, z); + workspace[13] = -0.0059475779383993002845382844736066323L; + + T result = tools::evaluate_polynomial(workspace, T(1/a)); + result *= exp(-y) / sqrt(2 * constants::pi() * a); + if(x < a) + result = -result; + + result += boost::math::erfc(sqrt(y), pol) / 2; + + return result; +} + +} +} +} +# 34 "../../../../boost/math/special_functions/gamma.hpp" 2 + +# 1 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" 1 +# 25 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" +namespace boost{ namespace math{ namespace detail{ + + + + +template +T gamma_imp(T z, const Policy& pol, const Lanczos& l); +template +T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l); + + + + +template +T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& , const Lanczos&) +{ + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result = 0; + if(z < tools::epsilon()) + { + result = -log(z); + } + else if((zm1 == 0) || (zm2 == 0)) + { + + } + else if(z > 2) + { + + + + + if(z >= 3) + { + do + { + z -= 1; + zm2 -= 1; + result += log(z); + }while(z >= 3); + + zm2 = z - 2; + } +# 90 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const T P[] = { + static_cast(boost::math::tools::make_big_value( -0.180355685678449379109e-1, "-0.180355685678449379109e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.25126649619989678683e-1, "0.25126649619989678683e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.494103151567532234274e-1, "0.494103151567532234274e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.172491608709613993966e-1, "0.172491608709613993966e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.259453563205438108893e-3, "-0.259453563205438108893e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.541009869215204396339e-3, "-0.541009869215204396339e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.324588649825948492091e-4, "-0.324588649825948492091e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T Q[] = { + static_cast(boost::math::tools::make_big_value( 0.1e1, "0.1e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.196202987197795200688e1, "0.196202987197795200688e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.148019669424231326694e1, "0.148019669424231326694e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.541391432071720958364e0, "0.541391432071720958364e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.988504251128010129477e-1, "0.988504251128010129477e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.82130967464889339326e-2, "0.82130967464889339326e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.224936291922115757597e-3, "0.224936291922115757597e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.223352763208617092964e-6, "-0.223352763208617092964e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + + static const float Y = 0.158963680267333984375e0f; + + T r = zm2 * (z + 1); + T R = tools::evaluate_polynomial(P, zm2); + R /= tools::evaluate_polynomial(Q, zm2); + + result += r * Y + r * R; + } + else + { + + + + + if(z < 1) + { + result += -log(z); + zm2 = zm1; + zm1 = z; + z += 1; + } + + + + + if(z <= 1.5) + { +# 155 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const float Y = 0.52815341949462890625f; + + static const T P[] = { + static_cast(boost::math::tools::make_big_value( 0.490622454069039543534e-1, "0.490622454069039543534e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.969117530159521214579e-1, "-0.969117530159521214579e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.414983358359495381969e0, "-0.414983358359495381969e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.406567124211938417342e0, "-0.406567124211938417342e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.158413586390692192217e0, "-0.158413586390692192217e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.240149820648571559892e-1, "-0.240149820648571559892e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.100346687696279557415e-2, "-0.100346687696279557415e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T Q[] = { + static_cast(boost::math::tools::make_big_value( 0.1e1, "0.1e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.302349829846463038743e1, "0.302349829846463038743e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.348739585360723852576e1, "0.348739585360723852576e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.191415588274426679201e1, "0.191415588274426679201e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.507137738614363510846e0, "0.507137738614363510846e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.577039722690451849648e-1, "0.577039722690451849648e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.195768102601107189171e-2, "0.195768102601107189171e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + + T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1); + T prefix = zm1 * zm2; + + result += prefix * Y + prefix * r; + } + else + { +# 200 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const float Y = 0.452017307281494140625f; + + static const T P[] = { + static_cast(boost::math::tools::make_big_value( -0.292329721830270012337e-1, "-0.292329721830270012337e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.144216267757192309184e0, "0.144216267757192309184e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.142440390738631274135e0, "-0.142440390738631274135e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.542809694055053558157e-1, "0.542809694055053558157e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.850535976868336437746e-2, "-0.850535976868336437746e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.431171342679297331241e-3, "0.431171342679297331241e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T Q[] = { + static_cast(boost::math::tools::make_big_value( 0.1e1, "0.1e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.150169356054485044494e1, "-0.150169356054485044494e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.846973248876495016101e0, "0.846973248876495016101e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.220095151814995745555e0, "-0.220095151814995745555e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.25582797155975869989e-1, "0.25582797155975869989e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.100666795539143372762e-2, "-0.100666795539143372762e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.827193521891290553639e-6, "-0.827193521891290553639e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T r = zm2 * zm1; + T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2)); + + result += r * Y + r * R; + } + } + return result; +} +template +T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& , const Lanczos&) +{ + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result = 0; + if(z < tools::epsilon()) + { + result = -log(z); + ; + } + else if((zm1 == 0) || (zm2 == 0)) + { + + } + else if(z > 2) + { + + + + + if(z >= 3) + { + do + { + z -= 1; + result += log(z); + }while(z >= 3); + zm2 = z - 2; + } + ; + ; + ; +# 277 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const T P[] = { + boost::math::tools::make_big_value( -0.018035568567844937910504030027467476655, "-0.018035568567844937910504030027467476655", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.013841458273109517271750705401202404195, "0.013841458273109517271750705401202404195", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.062031842739486600078866923383017722399, "0.062031842739486600078866923383017722399", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.052518418329052161202007865149435256093, "0.052518418329052161202007865149435256093", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.01881718142472784129191838493267755758, "0.01881718142472784129191838493267755758", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0025104830367021839316463675028524702846, "0.0025104830367021839316463675028524702846", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00021043176101831873281848891452678568311, "-0.00021043176101831873281848891452678568311", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00010249622350908722793327719494037981166, "-0.00010249622350908722793327719494037981166", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.11381479670982006841716879074288176994e-4, "-0.11381479670982006841716879074288176994e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.49999811718089980992888533630523892389e-6, "-0.49999811718089980992888533630523892389e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.70529798686542184668416911331718963364e-8, "-0.70529798686542184668416911331718963364e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.5877485070422317542808137697939233685, "2.5877485070422317542808137697939233685", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.8797959228352591788629602533153837126, "2.8797959228352591788629602533153837126", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.8030885955284082026405495275461180977, "1.8030885955284082026405495275461180977", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.69774331297747390169238306148355428436, "0.69774331297747390169238306148355428436", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.17261566063277623942044077039756583802, "0.17261566063277623942044077039756583802", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.02729301254544230229429621192443000121, "0.02729301254544230229429621192443000121", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0026776425891195270663133581960016620433, "0.0026776425891195270663133581960016620433", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00015244249160486584591370355730402168106, "0.00015244249160486584591370355730402168106", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.43997034032479866020546814475414346627e-5, "0.43997034032479866020546814475414346627e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.46295080708455613044541885534408170934e-7, "0.46295080708455613044541885534408170934e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.93326638207459533682980757982834180952e-11, "-0.93326638207459533682980757982834180952e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.42316456553164995177177407325292867513e-13, "0.42316456553164995177177407325292867513e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T R = tools::evaluate_polynomial(P, zm2); + R /= tools::evaluate_polynomial(Q, zm2); + + static const float Y = 0.158963680267333984375F; + + T r = zm2 * (z + 1); + + result += r * Y + r * R; + ; + } + else + { + + + + + if(z < 1) + { + result += -log(z); + zm2 = zm1; + zm1 = z; + z += 1; + } + ; + ; + ; + + + + if(z <= 1.35) + { +# 353 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const float Y = 0.54076099395751953125f; + + static const T P[] = { + boost::math::tools::make_big_value( 0.036454670944013329356512090082402429697, "0.036454670944013329356512090082402429697", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.066235835556476033710068679907798799959, "-0.066235835556476033710068679907798799959", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.67492399795577182387312206593595565371, "-0.67492399795577182387312206593595565371", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.4345555263962411429855341651960000166, "-1.4345555263962411429855341651960000166", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.4894319559821365820516771951249649563, "-1.4894319559821365820516771951249649563", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.87210277668067964629483299712322411566, "-0.87210277668067964629483299712322411566", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.29602090537771744401524080430529369136, "-0.29602090537771744401524080430529369136", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0561832587517836908929331992218879676, "-0.0561832587517836908929331992218879676", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0053236785487328044334381502530383140443, "-0.0053236785487328044334381502530383140443", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00018629360291358130461736386077971890789, "-0.00018629360291358130461736386077971890789", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.10164985672213178500790406939467614498e-6, "-0.10164985672213178500790406939467614498e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.13680157145361387405588201461036338274e-8, "0.13680157145361387405588201461036338274e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.9106336261005990534095838574132225599, "4.9106336261005990534095838574132225599", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 10.258804800866438510889341082793078432, "10.258804800866438510889341082793078432", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 11.88588976846826108836629960537466889, "11.88588976846826108836629960537466889", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.3455000546999704314454891036700998428, "8.3455000546999704314454891036700998428", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.6428823682421746343233362007194282703, "3.6428823682421746343233362007194282703", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.97465989807254572142266753052776132252, "0.97465989807254572142266753052776132252", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.15121052897097822172763084966793352524, "0.15121052897097822172763084966793352524", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.012017363555383555123769849654484594893, "0.012017363555383555123769849654484594893", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0003583032812720649835431669893011257277, "0.0003583032812720649835431669893011257277", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1); + T prefix = zm1 * zm2; + + result += prefix * Y + prefix * r; + ; + } + else if(z <= 1.625) + { +# 406 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const float Y = 0.483787059783935546875f; + + static const T P[] = { + boost::math::tools::make_big_value( -0.017977422421608624353488126610933005432, "-0.017977422421608624353488126610933005432", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.18484528905298309555089509029244135703, "0.18484528905298309555089509029244135703", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.40401251514859546989565001431430884082, "-0.40401251514859546989565001431430884082", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.40277179799147356461954182877921388182, "0.40277179799147356461954182877921388182", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.21993421441282936476709677700477598816, "-0.21993421441282936476709677700477598816", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.069595742223850248095697771331107571011, "0.069595742223850248095697771331107571011", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.012681481427699686635516772923547347328, "-0.012681481427699686635516772923547347328", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0012489322866834830413292771335113136034, "0.0012489322866834830413292771335113136034", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.57058739515423112045108068834668269608e-4, "-0.57058739515423112045108068834668269608e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.8207548771933585614380644961342925976e-6, "0.8207548771933585614380644961342925976e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.9629552288944259229543137757200262073, "-2.9629552288944259229543137757200262073", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.7118380799042118987185957298964772755, "3.7118380799042118987185957298964772755", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.5569815272165399297600586376727357187, "-2.5569815272165399297600586376727357187", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.0546764918220835097855665680632153367, "1.0546764918220835097855665680632153367", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.26574021300894401276478730940980810831, "-0.26574021300894401276478730940980810831", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.03996289731752081380552901986471233462, "0.03996289731752081380552901986471233462", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0033398680924544836817826046380586480873, "-0.0033398680924544836817826046380586480873", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00013288854760548251757651556792598235735, "0.00013288854760548251757651556792598235735", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.17194794958274081373243161848194745111e-5, "-0.17194794958274081373243161848194745111e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T r = zm2 * zm1; + T R = tools::evaluate_polynomial(P, T(0.625 - zm1)) / tools::evaluate_polynomial(Q, T(0.625 - zm1)); + + result += r * Y + r * R; + ; + } + else + { + + + + + + + + static const float Y = 0.443811893463134765625f; + + static const T P[] = { + boost::math::tools::make_big_value( -0.021027558364667626231512090082402429494, "-0.021027558364667626231512090082402429494", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.15128811104498736604523586803722368377, "0.15128811104498736604523586803722368377", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.26249631480066246699388544451126410278, "-0.26249631480066246699388544451126410278", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.21148748610533489823742352180628489742, "0.21148748610533489823742352180628489742", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.093964130697489071999873506148104370633, "-0.093964130697489071999873506148104370633", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.024292059227009051652542804957550866827, "0.024292059227009051652542804957550866827", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0036284453226534839926304745756906117066, "-0.0036284453226534839926304745756906117066", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0002939230129315195346843036254392485984, "0.0002939230129315195346843036254392485984", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.11088589183158123733132268042570710338e-4, "-0.11088589183158123733132268042570710338e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.13240510580220763969511741896361984162e-6, "0.13240510580220763969511741896361984162e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.4240003754444040525462170802796471996, "-2.4240003754444040525462170802796471996", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.4868383476933178722203278602342786002, "2.4868383476933178722203278602342786002", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.4047068395206343375520721509193698547, "-1.4047068395206343375520721509193698547", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.47583809087867443858344765659065773369, "0.47583809087867443858344765659065773369", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.09865724264554556400463655444270700132, "-0.09865724264554556400463655444270700132", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.012238223514176587501074150988445109735, "0.012238223514176587501074150988445109735", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00084625068418239194670614419707491797097, "-0.00084625068418239194670614419707491797097", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.2796574430456237061420839429225710602e-4, "0.2796574430456237061420839429225710602e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.30202973883316730694433702165188835331e-6, "-0.30202973883316730694433702165188835331e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T r = zm2 * zm1; + T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2)); + + result += r * Y + r * R; + ; + } + } + ; + return result; +} +template +T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& pol, const Lanczos& l) +{ + + + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result = 0; + if(z < tools::epsilon()) + { + result = -log(z); + } + else if(z < 0.5) + { + + result = log(gamma_imp(z, pol, Lanczos())); + } + else if(z >= 3) + { + + result = log(gamma_imp(z, pol, Lanczos())); + } + else if(z >= 1.5) + { + + T dz = zm2; + result = dz * log((z + lanczos_g_near_1_and_2(l) - T(0.5)) / boost::math::constants::e()); + result += boost::math::log1p(dz / (lanczos_g_near_1_and_2(l) + T(1.5)), pol) * T(1.5); + result += boost::math::log1p(Lanczos::lanczos_sum_near_2(dz), pol); + } + else + { + + T dz = zm1; + result = dz * log((z + lanczos_g_near_1_and_2(l) - T(0.5)) / boost::math::constants::e()); + result += boost::math::log1p(dz / (lanczos_g_near_1_and_2(l) + T(0.5)), pol) / 2; + result += boost::math::log1p(Lanczos::lanczos_sum_near_1(dz), pol); + } + return result; +} + +}}} +# 36 "../../../../boost/math/special_functions/gamma.hpp" 2 + +# 1 "../../../../boost/math/special_functions/polygamma.hpp" 1 +# 14 "../../../../boost/math/special_functions/polygamma.hpp" +# 1 "../../../../boost/math/special_functions/factorials.hpp" 1 +# 19 "../../../../boost/math/special_functions/factorials.hpp" +# 1 "../../../../boost/math/special_functions/gamma.hpp" 1 +# 20 "../../../../boost/math/special_functions/factorials.hpp" 2 + + +namespace boost { namespace math +{ + +export template +inline T factorial(unsigned i, const Policy& pol) +{ + static_assert(!std::is_integral::value, "Type T must not be an integral type"); + + + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if(i <= max_factorial::value) + return unchecked_factorial(i); + T result = boost::math::tgamma(static_cast(i+1), pol); + if(result > tools::max_value()) + return result; + return floor(result + 0.5f); +} + +export template +inline T factorial(unsigned i) +{ + return factorial(i, policies::policy<>()); +} +# 69 "../../../../boost/math/special_functions/factorials.hpp" +export template +T double_factorial(unsigned i, const Policy& pol) +{ + static_assert(!std::is_integral::value, "Type T must not be an integral type"); + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if(i & 1) + { + + if(i < max_factorial::value) + { + unsigned n = (i - 1) / 2; + return ceil(unchecked_factorial(i) / (ldexp(T(1), (int)n) * unchecked_factorial(n)) - 0.5f); + } + + + + + T result = boost::math::tgamma(static_cast(i) / 2 + 1, pol) / sqrt(constants::pi()); + if(ldexp(tools::max_value(), -static_cast(i+1) / 2) > result) + return ceil(result * ldexp(T(1), static_cast(i+1) / 2) - 0.5f); + } + else + { + + unsigned n = i / 2; + T result = factorial(n, pol); + if(ldexp(tools::max_value(), -(int)n) > result) + return result * ldexp(T(1), (int)n); + } + + + + return policies::raise_overflow_error("boost::math::double_factorial<%1%>(unsigned)", 0, pol); +} + +export template +inline T double_factorial(unsigned i) +{ + return double_factorial(i, policies::policy<>()); +} + +namespace detail{ + +template +T rising_factorial_imp(T x, int n, const Policy& pol) +{ + static_assert(!std::is_integral::value, "Type T must not be an integral type"); + if(x < 0) + { +# 126 "../../../../boost/math/special_functions/factorials.hpp" + bool inv = false; + if(n < 0) + { + x += n; + n = -n; + inv = true; + } + T result = ((n&1) ? -1 : 1) * falling_factorial(-x, n, pol); + if(inv) + result = 1 / result; + return result; + } + if(n == 0) + return 1; + if(x == 0) + { + if(n < 0) + return -boost::math::tgamma_delta_ratio(x + 1, static_cast(-n), pol); + else + return 0; + } + if((x < 1) && (x + n < 0)) + { + T val = boost::math::tgamma_delta_ratio(1 - x, static_cast(-n), pol); + return (n & 1) ? T(-val) : val; + } + + + + + + return 1 / boost::math::tgamma_delta_ratio(x, static_cast(n), pol); +} + +template +inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) +{ + static_assert(!std::is_integral::value, "Type T must not be an integral type"); + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if(x == 0) + return 0; + if(x < 0) + { + + + + + return (n&1 ? -1 : 1) * rising_factorial(-x, n, pol); + } + if(n == 0) + return 1; + if(x < 0.5f) + { + + + + if(n > max_factorial::value - 2) + { + + + T t1 = x * boost::math::falling_factorial(x - 1, max_factorial::value - 2, pol); + T t2 = boost::math::falling_factorial(x - max_factorial::value + 1, n - max_factorial::value + 1, pol); + if(tools::max_value() / fabs(t1) < fabs(t2)) + return boost::math::sign(t1) * boost::math::sign(t2) * policies::raise_overflow_error("boost::math::falling_factorial<%1%>", 0, pol); + return t1 * t2; + } + return x * boost::math::falling_factorial(x - 1, n - 1, pol); + } + if(x <= n - 1) + { + + + + + T xp1 = x + 1; + unsigned n2 = itrunc((T)floor(xp1), pol); + if(n2 == xp1) + return 0; + T result = boost::math::tgamma_delta_ratio(xp1, -static_cast(n2), pol); + x -= n2; + result *= x; + ++n2; + if(n2 < n) + result *= falling_factorial(x - 1, n - n2, pol); + return result; + } + + + + + + + + return boost::math::tgamma_delta_ratio(x + 1, -static_cast(n), pol); +} + +} + +export template +inline typename tools::promote_args::type + falling_factorial(RT x, unsigned n) +{ + typedef typename tools::promote_args::type result_type; + return detail::falling_factorial_imp( + static_cast(x), n, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + falling_factorial(RT x, unsigned n, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::falling_factorial_imp( + static_cast(x), n, pol); +} + +export template +inline typename tools::promote_args::type + rising_factorial(RT x, int n) +{ + typedef typename tools::promote_args::type result_type; + return detail::rising_factorial_imp( + static_cast(x), n, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + rising_factorial(RT x, int n, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::rising_factorial_imp( + static_cast(x), n, pol); +} + +} +} +# 15 "../../../../boost/math/special_functions/polygamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/detail/polygamma.hpp" 1 +# 24 "../../../../boost/math/special_functions/detail/polygamma.hpp" +# 1 "../../../../boost/math/special_functions/zeta.hpp" 1 +# 22 "../../../../boost/math/special_functions/zeta.hpp" +# 1 "../../../../boost/math/special_functions/sin_pi.hpp" 1 +# 23 "../../../../boost/math/special_functions/sin_pi.hpp" +namespace boost{ namespace math{ namespace detail{ + +template +inline T sin_pi_imp(T x, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if(x < 0) + return -sin_pi_imp(T(-x), pol); + + bool invert; + if(x < 0.5) + return sin(constants::pi() * x); + if(x < 1) + { + invert = true; + x = -x; + } + else + invert = false; + + T rem = floor(x); + if(abs(floor(rem/2)*2 - rem) > std::numeric_limits::epsilon()) + { + invert = !invert; + } + rem = x - rem; + if(rem > 0.5f) + rem = 1 - rem; + if(rem == 0.5f) + return static_cast(invert ? -1 : 1); + + rem = sin(constants::pi() * rem); + return invert ? T(-rem) : rem; +} + +} + +export template +inline typename tools::promote_args::type sin_pi(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<>, + + + policies::overflow_error >::type forwarding_policy; + return policies::checked_narrowing_cast(boost::math::detail::sin_pi_imp(x, forwarding_policy()), "sin_pi"); +} + +export template +inline typename tools::promote_args::type sin_pi(T x) +{ + return boost::math::sin_pi(x, policies::policy<>()); +} + +} +} +# 23 "../../../../boost/math/special_functions/zeta.hpp" 2 +# 34 "../../../../boost/math/special_functions/zeta.hpp" +namespace boost{ namespace math{ namespace detail{ +# 145 "../../../../boost/math/special_functions/zeta.hpp" +template +T zeta_polynomial_series(T s, T sc, Policy const &) +{ + + + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + int n = itrunc(T(log(boost::math::tools::epsilon()) / -2)); + 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 * (-powm1(T(2), sc))); +} + +template +T zeta_imp_prec(T s, T sc, const Policy& pol, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result; + if(s >= policies::digits()) + return 1; + result = zeta_polynomial_series(s, sc, pol); +# 200 "../../../../boost/math/special_functions/zeta.hpp" + return result; +} + +template +inline T zeta_imp_prec(T s, T sc, const Policy&, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result; + if(s < 1) + { + + + + + static const T P[6] = { + static_cast(0.24339294433593750202L), + static_cast(-0.49092470516353571651L), + static_cast(0.0557616214776046784287L), + static_cast(-0.00320912498879085894856L), + static_cast(0.000451534528645796438704L), + static_cast(-0.933241270357061460782e-5L), + }; + static const T Q[6] = { + static_cast(1L), + static_cast(-0.279960334310344432495L), + static_cast(0.0419676223309986037706L), + static_cast(-0.00413421406552171059003L), + static_cast(0.00024978985622317935355L), + static_cast(-0.101855788418564031874e-4L), + }; + result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); + result -= 1.2433929443359375F; + result += (sc); + result /= (sc); + } + else if(s <= 2) + { + + + static const T P[6] = { + static_cast(0.577215664901532860516L), + static_cast(0.243210646940107164097L), + static_cast(0.0417364673988216497593L), + static_cast(0.00390252087072843288378L), + static_cast(0.000249606367151877175456L), + static_cast(0.110108440976732897969e-4L), + }; + static const T Q[6] = { + static_cast(1.0), + static_cast(0.295201277126631761737L), + static_cast(0.043460910607305495864L), + static_cast(0.00434930582085826330659L), + static_cast(0.000255784226140488490982L), + static_cast(0.10991819782396112081e-4L), + }; + result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc)); + result += 1 / (-sc); + } + else if(s <= 4) + { + + + static const float Y = 0.6986598968505859375; + static const T P[6] = { + static_cast(-0.0537258300023595030676L), + static_cast(0.0445163473292365591906L), + static_cast(0.0128677673534519952905L), + static_cast(0.00097541770457391752726L), + static_cast(0.769875101573654070925e-4L), + static_cast(0.328032510000383084155e-5L), + }; + static const T Q[7] = { + 1.0f, + static_cast(0.33383194553034051422L), + static_cast(0.0487798431291407621462L), + static_cast(0.00479039708573558490716L), + static_cast(0.000270776703956336357707L), + static_cast(0.106951867532057341359e-4L), + static_cast(0.236276623974978646399e-7L), + }; + result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2)); + result += Y + 1 / (-sc); + } + else if(s <= 7) + { + + + + + static const T P[6] = { + static_cast(-2.49710190602259410021L), + static_cast(-2.60013301809475665334L), + static_cast(-0.939260435377109939261L), + static_cast(-0.138448617995741530935L), + static_cast(-0.00701721240549802377623L), + static_cast(-0.229257310594893932383e-4L), + }; + static const T Q[9] = { + 1.0f, + static_cast(0.706039025937745133628L), + static_cast(0.15739599649558626358L), + static_cast(0.0106117950976845084417L), + static_cast(-0.36910273311764618902e-4L), + static_cast(0.493409563927590008943e-5L), + static_cast(-0.234055487025287216506e-6L), + static_cast(0.718833729365459760664e-8L), + static_cast(-0.1129200113474947419e-9L), + }; + result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4)); + result = 1 + exp(result); + } + else if(s < 15) + { + + + + static const T P[7] = { + static_cast(-4.78558028495135619286L), + static_cast(-1.89197364881972536382L), + static_cast(-0.211407134874412820099L), + static_cast(-0.000189204758260076688518L), + static_cast(0.00115140923889178742086L), + static_cast(0.639949204213164496988e-4L), + static_cast(0.139348932445324888343e-5L), + }; + static const T Q[9] = { + 1.0f, + static_cast(0.244345337378188557777L), + static_cast(0.00873370754492288653669L), + static_cast(-0.00117592765334434471562L), + static_cast(-0.743743682899933180415e-4L), + static_cast(-0.21750464515767984778e-5L), + static_cast(0.471001264003076486547e-8L), + static_cast(-0.833378440625385520576e-10L), + static_cast(0.699841545204845636531e-12L), + }; + result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7)); + result = 1 + exp(result); + } + else if(s < 36) + { + + + static const T P[8] = { + static_cast(-10.3948950573308896825L), + static_cast(-2.85827219671106697179L), + static_cast(-0.347728266539245787271L), + static_cast(-0.0251156064655346341766L), + static_cast(-0.00119459173416968685689L), + static_cast(-0.382529323507967522614e-4L), + static_cast(-0.785523633796723466968e-6L), + static_cast(-0.821465709095465524192e-8L), + }; + static const T Q[10] = { + 1.0f, + static_cast(0.208196333572671890965L), + static_cast(0.0195687657317205033485L), + static_cast(0.00111079638102485921877L), + static_cast(0.408507746266039256231e-4L), + static_cast(0.955561123065693483991e-6L), + static_cast(0.118507153474022900583e-7L), + static_cast(0.222609483627352615142e-14L), + }; + result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15)); + result = 1 + exp(result); + } + else if(s < 56) + { + result = 1 + pow(T(2), -s); + } + else + { + result = 1; + } + return result; +} + +template +T zeta_imp_prec(T s, T sc, const Policy&, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result; + if(s < 1) + { + + + + + static const T P[6] = { + boost::math::tools::make_big_value( 0.243392944335937499969, "0.243392944335937499969", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.496837806864865688082, "-0.496837806864865688082", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0680008039723709987107, "0.0680008039723709987107", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00511620413006619942112, "-0.00511620413006619942112", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000455369899250053003335, "0.000455369899250053003335", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.279496685273033761927e-4, "-0.279496685273033761927e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[7] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.30425480068225790522, "-0.30425480068225790522", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.050052748580371598736, "0.050052748580371598736", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00519355671064700627862, "-0.00519355671064700627862", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000360623385771198350257, "0.000360623385771198350257", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.159600883054550987633e-4, "-0.159600883054550987633e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.339770279812410586032e-6, "0.339770279812410586032e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); + result -= 1.2433929443359375F; + result += (sc); + result /= (sc); + } + else if(s <= 2) + { + + + + + static const T P[6] = { + boost::math::tools::make_big_value( 0.577215664901532860605, "0.577215664901532860605", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.222537368917162139445, "0.222537368917162139445", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0356286324033215682729, "0.0356286324033215682729", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00304465292366350081446, "0.00304465292366350081446", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000178102511649069421904, "0.000178102511649069421904", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.700867470265983665042e-5, "0.700867470265983665042e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[7] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.259385759149531030085, "0.259385759149531030085", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0373974962106091316854, "0.0373974962106091316854", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00332735159183332820617, "0.00332735159183332820617", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000188690420706998606469, "0.000188690420706998606469", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.635994377921861930071e-5, "0.635994377921861930071e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.226583954978371199405e-7, "0.226583954978371199405e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc)); + result += 1 / (-sc); + } + else if(s <= 4) + { + + + static const float Y = 0.6986598968505859375; + static const T P[7] = { + boost::math::tools::make_big_value( -0.053725830002359501027, "-0.053725830002359501027", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0470551187571475844778, "0.0470551187571475844778", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0101339410415759517471, "0.0101339410415759517471", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00100240326666092854528, "0.00100240326666092854528", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.685027119098122814867e-4, "0.685027119098122814867e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.390972820219765942117e-5, "0.390972820219765942117e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.540319769113543934483e-7, "0.540319769113543934483e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[8] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.286577739726542730421, "0.286577739726542730421", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0447355811517733225843, "0.0447355811517733225843", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00430125107610252363302, "0.00430125107610252363302", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000284956969089786662045, "0.000284956969089786662045", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.116188101609848411329e-4, "0.116188101609848411329e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.278090318191657278204e-6, "0.278090318191657278204e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.19683620233222028478e-8, "-0.19683620233222028478e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2)); + result += Y + 1 / (-sc); + } + else if(s <= 7) + { + + static const T P[8] = { + boost::math::tools::make_big_value( -2.49710190602259407065, "-2.49710190602259407065", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.36664913245960625334, "-3.36664913245960625334", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.77180020623777595452, "-1.77180020623777595452", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.464717885249654313933, "-0.464717885249654313933", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0643694921293579472583, "-0.0643694921293579472583", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00464265386202805715487, "-0.00464265386202805715487", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000165556579779704340166, "-0.000165556579779704340166", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.252884970740994069582e-5, "-0.252884970740994069582e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[9] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.01300131390690459085, "1.01300131390690459085", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.387898115758643503827, "0.387898115758643503827", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0695071490045701135188, "0.0695071490045701135188", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00586908595251442839291, "0.00586908595251442839291", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000217752974064612188616, "0.000217752974064612188616", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.397626583349419011731e-5, "0.397626583349419011731e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.927884739284359700764e-8, "-0.927884739284359700764e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119810501805618894381e-9, "0.119810501805618894381e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4)); + result = 1 + exp(result); + } + else if(s < 15) + { + + + static const T P[9] = { + boost::math::tools::make_big_value( -4.78558028495135548083, "-4.78558028495135548083", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.23873322238609358947, "-3.23873322238609358947", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.892338582881021799922, "-0.892338582881021799922", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.131326296217965913809, "-0.131326296217965913809", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0115651591773783712996, "-0.0115651591773783712996", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000657728968362695775205, "-0.000657728968362695775205", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.252051328129449973047e-4, "-0.252051328129449973047e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.626503445372641798925e-6, "-0.626503445372641798925e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.815696314790853893484e-8, "-0.815696314790853893484e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[9] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.525765665400123515036, "0.525765665400123515036", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.10852641753657122787, "0.10852641753657122787", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0115669945375362045249, "0.0115669945375362045249", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000732896513858274091966, "0.000732896513858274091966", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.30683952282420248448e-4, "0.30683952282420248448e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.819649214609633126119e-6, "0.819649214609633126119e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.117957556472335968146e-7, "0.117957556472335968146e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.193432300973017671137e-12, "-0.193432300973017671137e-12", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7)); + result = 1 + exp(result); + } + else if(s < 42) + { + + + static const T P[9] = { + boost::math::tools::make_big_value( -10.3948950573308861781, "-10.3948950573308861781", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.82646012777913950108, "-2.82646012777913950108", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.342144362739570333665, "-0.342144362739570333665", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0249285145498722647472, "-0.0249285145498722647472", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00122493108848097114118, "-0.00122493108848097114118", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.423055371192592850196e-4, "-0.423055371192592850196e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.1025215577185967488e-5, "-0.1025215577185967488e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.165096762663509467061e-7, "-0.165096762663509467061e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.145392555873022044329e-9, "-0.145392555873022044329e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[10] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.205135978585281988052, "0.205135978585281988052", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0192359357875879453602, "0.0192359357875879453602", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00111496452029715514119, "0.00111496452029715514119", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.434928449016693986857e-4, "0.434928449016693986857e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.116911068726610725891e-5, "0.116911068726610725891e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.206704342290235237475e-7, "0.206704342290235237475e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.209772836100827647474e-9, "0.209772836100827647474e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.939798249922234703384e-16, "-0.939798249922234703384e-16", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.264584017421245080294e-18, "0.264584017421245080294e-18", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15)); + result = 1 + exp(result); + } + else if(s < 63) + { + result = 1 + pow(T(2), -s); + } + else + { + result = 1; + } + return result; +} + +template +T zeta_imp_prec(T s, T sc, const Policy&, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result; + if(s < 1) + { + + + + + + static const T P[10] = { + boost::math::tools::make_big_value( -1.0, "-1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0353008629988648122808504280990313668, "-0.0353008629988648122808504280990313668", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0107795651204927743049369868548706909, "0.0107795651204927743049369868548706909", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000523961870530500751114866884685172975, "0.000523961870530500751114866884685172975", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.661805838304910731947595897966487515e-4, "-0.661805838304910731947595897966487515e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.658932670403818558510656304189164638e-5, "-0.658932670403818558510656304189164638e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.103437265642266106533814021041010453e-6, "-0.103437265642266106533814021041010453e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.116818787212666457105375746642927737e-7, "0.116818787212666457105375746642927737e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.660690993901506912123512551294239036e-9, "0.660690993901506912123512551294239036e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113103113698388531428914333768142527e-10, "0.113103113698388531428914333768142527e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[11] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.387483472099602327112637481818565459, "-0.387483472099602327112637481818565459", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0802265315091063135271497708694776875, "0.0802265315091063135271497708694776875", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0110727276164171919280036408995078164, "-0.0110727276164171919280036408995078164", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00112552716946286252000434849173787243, "0.00112552716946286252000434849173787243", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.874554160748626916455655180296834352e-4, "-0.874554160748626916455655180296834352e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.530097847491828379568636739662278322e-5, "0.530097847491828379568636739662278322e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.248461553590496154705565904497247452e-6, "-0.248461553590496154705565904497247452e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.881834921354014787309644951507523899e-8, "0.881834921354014787309644951507523899e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.217062446168217797598596496310953025e-9, "-0.217062446168217797598596496310953025e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.315823200002384492377987848307151168e-11, "0.315823200002384492377987848307151168e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); + result += (sc); + result /= (sc); + } + else if(s <= 2) + { + + + + static const T P[10] = { + boost::math::tools::make_big_value( 0.577215664901532860606512090082402431, "0.577215664901532860606512090082402431", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.255597968739771510415479842335906308, "0.255597968739771510415479842335906308", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0494056503552807274142218876983542205, "0.0494056503552807274142218876983542205", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00551372778611700965268920983472292325, "0.00551372778611700965268920983472292325", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00043667616723970574871427830895192731, "0.00043667616723970574871427830895192731", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.268562259154821957743669387915239528e-4, "0.268562259154821957743669387915239528e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.109249633923016310141743084480436612e-5, "0.109249633923016310141743084480436612e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.273895554345300227466534378753023924e-7, "0.273895554345300227466534378753023924e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.583103205551702720149237384027795038e-9, "0.583103205551702720149237384027795038e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.835774625259919268768735944711219256e-11, "-0.835774625259919268768735944711219256e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[11] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.316661751179735502065583176348292881, "0.316661751179735502065583176348292881", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0540401806533507064453851182728635272, "0.0540401806533507064453851182728635272", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00598621274107420237785899476374043797, "0.00598621274107420237785899476374043797", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000474907812321704156213038740142079615, "0.000474907812321704156213038740142079615", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.272125421722314389581695715835862418e-4, "0.272125421722314389581695715835862418e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.112649552156479800925522445229212933e-5, "0.112649552156479800925522445229212933e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.301838975502992622733000078063330461e-7, "0.301838975502992622733000078063330461e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.422960728687211282539769943184270106e-9, "0.422960728687211282539769943184270106e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.377105263588822468076813329270698909e-11, "-0.377105263588822468076813329270698909e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.581926559304525152432462127383600681e-13, "-0.581926559304525152432462127383600681e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc)); + result += 1 / (-sc); + } + else if(s <= 4) + { + + + + + static const float Y = 0.6986598968505859375; + static const T P[11] = { + boost::math::tools::make_big_value( -0.0537258300023595010275848333539748089, "-0.0537258300023595010275848333539748089", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0429086930802630159457448174466342553, "0.0429086930802630159457448174466342553", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0136148228754303412510213395034056857, "0.0136148228754303412510213395034056857", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00190231601036042925183751238033763915, "0.00190231601036042925183751238033763915", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000186880390916311438818302549192456581, "0.000186880390916311438818302549192456581", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.145347370745893262394287982691323657e-4, "0.145347370745893262394287982691323657e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.805843276446813106414036600485884885e-6, "0.805843276446813106414036600485884885e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.340818159286739137503297172091882574e-7, "0.340818159286739137503297172091882574e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.115762357488748996526167305116837246e-8, "0.115762357488748996526167305116837246e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.231904754577648077579913403645767214e-10, "0.231904754577648077579913403645767214e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.340169592866058506675897646629036044e-12, "0.340169592866058506675897646629036044e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[12] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.363755247765087100018556983050520554, "0.363755247765087100018556983050520554", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0696581979014242539385695131258321598, "0.0696581979014242539385695131258321598", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00882208914484611029571547753782014817, "0.00882208914484611029571547753782014817", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000815405623261946661762236085660996718, "0.000815405623261946661762236085660996718", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.571366167062457197282642344940445452e-4, "0.571366167062457197282642344940445452e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.309278269271853502353954062051797838e-5, "0.309278269271853502353954062051797838e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.12822982083479010834070516053794262e-6, "0.12822982083479010834070516053794262e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.397876357325018976733953479182110033e-8, "0.397876357325018976733953479182110033e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.8484432107648683277598472295289279e-10, "0.8484432107648683277598472295289279e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.105677416606909614301995218444080615e-11, "0.105677416606909614301995218444080615e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.547223964564003701979951154093005354e-15, "0.547223964564003701979951154093005354e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2)); + result += Y + 1 / (-sc); + } + else if(s <= 6) + { + + + + static const T Y = 3.28348541259765625F; + + static const T P[13] = { + boost::math::tools::make_big_value( 0.786383506575062179339611614117697622, "0.786383506575062179339611614117697622", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.495766593395271370974685959652073976, "0.495766593395271370974685959652073976", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.409116737851754766422360889037532228, "-0.409116737851754766422360889037532228", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.57340744006238263817895456842655987, "-0.57340744006238263817895456842655987", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.280479899797421910694892949057963111, "-0.280479899797421910694892949057963111", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0753148409447590257157585696212649869, "-0.0753148409447590257157585696212649869", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0122934003684672788499099362823748632, "-0.0122934003684672788499099362823748632", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00126148398446193639247961370266962927, "-0.00126148398446193639247961370266962927", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.828465038179772939844657040917364896e-4, "-0.828465038179772939844657040917364896e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.361008916706050977143208468690645684e-5, "-0.361008916706050977143208468690645684e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.109879825497910544424797771195928112e-6, "-0.109879825497910544424797771195928112e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.214539416789686920918063075528797059e-8, "-0.214539416789686920918063075528797059e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.15090220092460596872172844424267351e-10, "-0.15090220092460596872172844424267351e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[14] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.69490865837142338462982225731926485, "1.69490865837142338462982225731926485", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.22697696630994080733321401255942464, "1.22697696630994080733321401255942464", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.495409420862526540074366618006341533, "0.495409420862526540074366618006341533", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.122368084916843823462872905024259633, "0.122368084916843823462872905024259633", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0191412993625268971656513890888208623, "0.0191412993625268971656513890888208623", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00191401538628980617753082598351559642, "0.00191401538628980617753082598351559642", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000123318142456272424148930280876444459, "0.000123318142456272424148930280876444459", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.531945488232526067889835342277595709e-5, "0.531945488232526067889835342277595709e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.161843184071894368337068779669116236e-6, "0.161843184071894368337068779669116236e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.305796079600152506743828859577462778e-8, "0.305796079600152506743828859577462778e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.233582592298450202680170811044408894e-10, "0.233582592298450202680170811044408894e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.275363878344548055574209713637734269e-13, "-0.275363878344548055574209713637734269e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.221564186807357535475441900517843892e-15, "0.221564186807357535475441900517843892e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4)); + result -= Y; + result = 1 + exp(result); + } + else if(s < 10) + { + + + + static const T P[13] = { + boost::math::tools::make_big_value( -4.0545627381873738086704293881227365, "-4.0545627381873738086704293881227365", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.70088348734699134347906176097717782, "-4.70088348734699134347906176097717782", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.36921550900925512951976617607678789, "-2.36921550900925512951976617607678789", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.684322583796369508367726293719322866, "-0.684322583796369508367726293719322866", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.126026534540165129870721937592996324, "-0.126026534540165129870721937592996324", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.015636903921778316147260572008619549, "-0.015636903921778316147260572008619549", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00135442294754728549644376325814460807, "-0.00135442294754728549644376325814460807", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.842793965853572134365031384646117061e-4, "-0.842793965853572134365031384646117061e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.385602133791111663372015460784978351e-5, "-0.385602133791111663372015460784978351e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.130458500394692067189883214401478539e-6, "-0.130458500394692067189883214401478539e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.315861074947230418778143153383660035e-8, "-0.315861074947230418778143153383660035e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.500334720512030826996373077844707164e-10, "-0.500334720512030826996373077844707164e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.420204769185233365849253969097184005e-12, "-0.420204769185233365849253969097184005e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[14] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.97663511666410096104783358493318814, "0.97663511666410096104783358493318814", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.40878780231201806504987368939673249, "0.40878780231201806504987368939673249", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0963890666609396058945084107597727252, "0.0963890666609396058945084107597727252", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0142207619090854604824116070866614505, "0.0142207619090854604824116070866614505", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00139010220902667918476773423995750877, "0.00139010220902667918476773423995750877", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.940669540194694997889636696089994734e-4, "0.940669540194694997889636696089994734e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.458220848507517004399292480807026602e-5, "0.458220848507517004399292480807026602e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.16345521617741789012782420625435495e-6, "0.16345521617741789012782420625435495e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.414007452533083304371566316901024114e-8, "0.414007452533083304371566316901024114e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.68701473543366328016953742622661377e-10, "0.68701473543366328016953742622661377e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.603461891080716585087883971886075863e-12, "0.603461891080716585087883971886075863e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.294670713571839023181857795866134957e-16, "0.294670713571839023181857795866134957e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.147003914536437243143096875069813451e-18, "-0.147003914536437243143096875069813451e-18", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 6)) / tools::evaluate_polynomial(Q, T(s - 6)); + result = 1 + exp(result); + } + else if(s < 17) + { + + + static const T P[13] = { + boost::math::tools::make_big_value( -6.91319491921722925920883787894829678, "-6.91319491921722925920883787894829678", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.65491257639481960248690596951049048, "-3.65491257639481960248690596951049048", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.813557553449954526442644544105257881, "-0.813557553449954526442644544105257881", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0994317301685870959473658713841138083, "-0.0994317301685870959473658713841138083", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00726896610245676520248617014211734906, "-0.00726896610245676520248617014211734906", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000317253318715075854811266230916762929, "-0.000317253318715075854811266230916762929", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.66851422826636750855184211580127133e-5, "-0.66851422826636750855184211580127133e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.879464154730985406003332577806849971e-7, "0.879464154730985406003332577806849971e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113838903158254250631678791998294628e-7, "0.113838903158254250631678791998294628e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.379184410304927316385211327537817583e-9, "0.379184410304927316385211327537817583e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.612992858643904887150527613446403867e-11, "0.612992858643904887150527613446403867e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.347873737198164757035457841688594788e-13, "0.347873737198164757035457841688594788e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.289187187441625868404494665572279364e-15, "-0.289187187441625868404494665572279364e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[14] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.427310044448071818775721584949868806, "0.427310044448071818775721584949868806", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.074602514873055756201435421385243062, "0.074602514873055756201435421385243062", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00688651562174480772901425121653945942, "0.00688651562174480772901425121653945942", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000360174847635115036351323894321880445, "0.000360174847635115036351323894321880445", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.973556847713307543918865405758248777e-5, "0.973556847713307543918865405758248777e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.853455848314516117964634714780874197e-8, "-0.853455848314516117964634714780874197e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.118203513654855112421673192194622826e-7, "-0.118203513654855112421673192194622826e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.462521662511754117095006543363328159e-9, "-0.462521662511754117095006543363328159e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.834212591919475633107355719369463143e-11, "-0.834212591919475633107355719369463143e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.5354594751002702935740220218582929e-13, "-0.5354594751002702935740220218582929e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.406451690742991192964889603000756203e-15, "0.406451690742991192964889603000756203e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.887948682401000153828241615760146728e-19, "0.887948682401000153828241615760146728e-19", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.34980761098820347103967203948619072e-21, "-0.34980761098820347103967203948619072e-21", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 10)) / tools::evaluate_polynomial(Q, T(s - 10)); + result = 1 + exp(result); + } + else if(s < 30) + { + + + + static const T P[13] = { + boost::math::tools::make_big_value( -11.7824798233959252791987402769438322, "-11.7824798233959252791987402769438322", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.36131215284987731928174218354118102, "-4.36131215284987731928174218354118102", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.732260980060982349410898496846972204, "-0.732260980060982349410898496846972204", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0744985185694913074484248803015717388, "-0.0744985185694913074484248803015717388", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00517228281320594683022294996292250527, "-0.00517228281320594683022294996292250527", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000260897206152101522569969046299309939, "-0.000260897206152101522569969046299309939", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.989553462123121764865178453128769948e-5, "-0.989553462123121764865178453128769948e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.286916799741891410827712096608826167e-6, "-0.286916799741891410827712096608826167e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.637262477796046963617949532211619729e-8, "-0.637262477796046963617949532211619729e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.106796831465628373325491288787760494e-9, "-0.106796831465628373325491288787760494e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.129343095511091870860498356205376823e-11, "-0.129343095511091870860498356205376823e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.102397936697965977221267881716672084e-13, "-0.102397936697965977221267881716672084e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.402663128248642002351627980255756363e-16, "-0.402663128248642002351627980255756363e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[14] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.311288325355705609096155335186466508, "0.311288325355705609096155335186466508", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0438318468940415543546769437752132748, "0.0438318468940415543546769437752132748", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00374396349183199548610264222242269536, "0.00374396349183199548610264222242269536", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000218707451200585197339671707189281302, "0.000218707451200585197339671707189281302", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.927578767487930747532953583797351219e-5, "0.927578767487930747532953583797351219e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.294145760625753561951137473484889639e-6, "0.294145760625753561951137473484889639e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.704618586690874460082739479535985395e-8, "0.704618586690874460082739479535985395e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.126333332872897336219649130062221257e-9, "0.126333332872897336219649130062221257e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.16317315713773503718315435769352765e-11, "0.16317315713773503718315435769352765e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137846712823719515148344938160275695e-13, "0.137846712823719515148344938160275695e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.580975420554224366450994232723910583e-16, "0.580975420554224366450994232723910583e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.291354445847552426900293580511392459e-22, "-0.291354445847552426900293580511392459e-22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.73614324724785855925025452085443636e-25, "0.73614324724785855925025452085443636e-25", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 17)) / tools::evaluate_polynomial(Q, T(s - 17)); + result = 1 + exp(result); + } + else if(s < 74) + { + + + static const T P[14] = { + boost::math::tools::make_big_value( -20.7944102007844314586649688802236072, "-20.7944102007844314586649688802236072", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.95759941987499442499908748130192187, "-4.95759941987499442499908748130192187", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.563290752832461751889194629200298688, "-0.563290752832461751889194629200298688", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0406197001137935911912457120706122877, "-0.0406197001137935911912457120706122877", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0020846534789473022216888863613422293, "-0.0020846534789473022216888863613422293", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.808095978462109173749395599401375667e-4, "-0.808095978462109173749395599401375667e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.244706022206249301640890603610060959e-5, "-0.244706022206249301640890603610060959e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.589477682919645930544382616501666572e-7, "-0.589477682919645930544382616501666572e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.113699573675553496343617442433027672e-8, "-0.113699573675553496343617442433027672e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.174767860183598149649901223128011828e-10, "-0.174767860183598149649901223128011828e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.210051620306761367764549971980026474e-12, "-0.210051620306761367764549971980026474e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.189187969537370950337212675466400599e-14, "-0.189187969537370950337212675466400599e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.116313253429564048145641663778121898e-16, "-0.116313253429564048145641663778121898e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.376708747782400769427057630528578187e-19, "-0.376708747782400769427057630528578187e-19", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[16] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.205076752981410805177554569784219717, "0.205076752981410805177554569784219717", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0202526722696670378999575738524540269, "0.0202526722696670378999575738524540269", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.001278305290005994980069466658219057, "0.001278305290005994980069466658219057", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.576404779858501791742255670403304787e-4, "0.576404779858501791742255670403304787e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.196477049872253010859712483984252067e-5, "0.196477049872253010859712483984252067e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.521863830500876189501054079974475762e-7, "0.521863830500876189501054079974475762e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.109524209196868135198775445228552059e-8, "0.109524209196868135198775445228552059e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.181698713448644481083966260949267825e-10, "0.181698713448644481083966260949267825e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.234793316975091282090312036524695562e-12, "0.234793316975091282090312036524695562e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.227490441461460571047545264251399048e-14, "0.227490441461460571047545264251399048e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.151500292036937400913870642638520668e-16, "0.151500292036937400913870642638520668e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.543475775154780935815530649335936121e-19, "0.543475775154780935815530649335936121e-19", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.241647013434111434636554455083309352e-28, "0.241647013434111434636554455083309352e-28", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.557103423021951053707162364713587374e-31, "-0.557103423021951053707162364713587374e-31", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.618708773442584843384712258199645166e-34, "0.618708773442584843384712258199645166e-34", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 30)) / tools::evaluate_polynomial(Q, T(s - 30)); + result = 1 + exp(result); + } + else if(s < 117) + { + result = 1 + pow(T(2), -s); + } + else + { + result = 1; + } + return result; +} + +template +T zeta_imp_odd_integer(int s, const T&, const Policy&, const std::true_type&) +{ + static const T results[] = { + boost::math::tools::make_big_value( 1.2020569031595942853997381615114500, "1.2020569031595942853997381615114500", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0369277551433699263313654864570342, "1.0369277551433699263313654864570342", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0083492773819228268397975498497968, "1.0083492773819228268397975498497968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0020083928260822144178527692324121, "1.0020083928260822144178527692324121", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0004941886041194645587022825264699, "1.0004941886041194645587022825264699", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0001227133475784891467518365263574, "1.0001227133475784891467518365263574", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000305882363070204935517285106451, "1.0000305882363070204935517285106451", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000076371976378997622736002935630, "1.0000076371976378997622736002935630", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000019082127165539389256569577951, "1.0000019082127165539389256569577951", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000004769329867878064631167196044, "1.0000004769329867878064631167196044", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000001192199259653110730677887189, "1.0000001192199259653110730677887189", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000298035035146522801860637051, "1.0000000298035035146522801860637051", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000074507117898354294919810042, "1.0000000074507117898354294919810042", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000018626597235130490064039099, "1.0000000018626597235130490064039099", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000004656629065033784072989233, "1.0000000004656629065033784072989233", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000001164155017270051977592974, "1.0000000001164155017270051977592974", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000291038504449709968692943, "1.0000000000291038504449709968692943", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000072759598350574810145209, "1.0000000000072759598350574810145209", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000018189896503070659475848, "1.0000000000018189896503070659475848", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000004547473783042154026799, "1.0000000000004547473783042154026799", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000001136868407680227849349, "1.0000000000001136868407680227849349", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000284217097688930185546, "1.0000000000000284217097688930185546", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000071054273952108527129, "1.0000000000000071054273952108527129", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000017763568435791203275, "1.0000000000000017763568435791203275", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000004440892103143813364, "1.0000000000000004440892103143813364", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000001110223025141066134, "1.0000000000000001110223025141066134", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000277555756213612417, "1.0000000000000000277555756213612417", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000069388939045441537, "1.0000000000000000069388939045441537", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000017347234760475766, "1.0000000000000000017347234760475766", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000004336808690020650, "1.0000000000000000004336808690020650", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000001084202172494241, "1.0000000000000000001084202172494241", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000271050543122347, "1.0000000000000000000271050543122347", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000067762635780452, "1.0000000000000000000067762635780452", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000016940658945098, "1.0000000000000000000016940658945098", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000004235164736273, "1.0000000000000000000004235164736273", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000001058791184068, "1.0000000000000000000001058791184068", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000264697796017, "1.0000000000000000000000264697796017", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000066174449004, "1.0000000000000000000000066174449004", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000016543612251, "1.0000000000000000000000016543612251", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000004135903063, "1.0000000000000000000000004135903063", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000001033975766, "1.0000000000000000000000001033975766", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000258493941, "1.0000000000000000000000000258493941", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000064623485, "1.0000000000000000000000000064623485", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000016155871, "1.0000000000000000000000000016155871", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000004038968, "1.0000000000000000000000000004038968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000001009742, "1.0000000000000000000000000001009742", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000252435, "1.0000000000000000000000000000252435", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000063109, "1.0000000000000000000000000000063109", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000015777, "1.0000000000000000000000000000015777", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000003944, "1.0000000000000000000000000000003944", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000986, "1.0000000000000000000000000000000986", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000247, "1.0000000000000000000000000000000247", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000062, "1.0000000000000000000000000000000062", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000015, "1.0000000000000000000000000000000015", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000004, "1.0000000000000000000000000000000004", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000001, "1.0000000000000000000000000000000001", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + return s > 113 ? 1 : results[(s - 3) / 2]; +} + +template +T zeta_imp_odd_integer(int s, const T& sc, const Policy& pol, const std::false_type&) +{ + + + + static thread_local bool is_init = false; + static thread_local T results[50] = {}; + static thread_local int digits = tools::digits(); + int current_digits = tools::digits(); + if(digits != current_digits) + { + + is_init = false; + } + if(!is_init) + { + is_init = true; + digits = current_digits; + for(unsigned k = 0; k < sizeof(results) / sizeof(results[0]); ++k) + { + T arg = k * 2 + 3; + T c_arg = 1 - arg; + results[k] = zeta_polynomial_series(arg, c_arg, pol); + } + } + unsigned index = (s - 3) / 2; + return index >= sizeof(results) / sizeof(results[0]) ? zeta_polynomial_series(T(s), sc, pol): results[index]; +} + +template +T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const char* function = "boost::math::zeta<%1%>"; + if(sc == 0) + return policies::raise_pole_error( + function, + "Evaluation of zeta function at pole %1%", + s, pol); + T result; + + + + if(s > policies::digits()) + return 1; + + + + if(floor(s) == s) + { + + + + try + { + + int v = itrunc(s); + if(v == s) + { + if(v < 0) + { + if(((-v) & 1) == 0) + return 0; + int n = (-v + 1) / 2; + if(n <= (int)boost::math::max_bernoulli_b2n::value) + return T((-v & 1) ? -1 : 1) * boost::math::unchecked_bernoulli_b2n(n) / (1 - v); + } + else if((v & 1) == 0) + { + if(((v / 2) <= (int)boost::math::max_bernoulli_b2n::value) && (v <= (int)boost::math::max_factorial::value)) + return T(((v / 2 - 1) & 1) ? -1 : 1) * ldexp(T(1), v - 1) * pow(constants::pi(), v) * + boost::math::unchecked_bernoulli_b2n(v / 2) / boost::math::unchecked_factorial(v); + return T(((v / 2 - 1) & 1) ? -1 : 1) * ldexp(T(1), v - 1) * pow(constants::pi(), v) * + boost::math::bernoulli_b2n(v / 2) / boost::math::factorial(v, pol); + } + else + return zeta_imp_odd_integer(v, sc, pol, std::integral_constant()); + } + + } + catch(const boost::math::rounding_error&){} + catch(const std::overflow_error&){} + + } + + if(fabs(s) < tools::root_epsilon()) + { + result = -0.5f - constants::log_root_two_pi() * s; + } + else if(s < 0) + { + std::swap(s, sc); + if(floor(sc/2) == sc/2) + result = 0; + else + { + if(s > max_factorial::value) + { + T mult = boost::math::sin_pi(0.5f * sc, pol) * 2 * zeta_imp(s, sc, pol, tag); + result = boost::math::lgamma(s, pol); + result -= s * log(2 * constants::pi()); + if(result > tools::log_max_value()) + return sign(mult) * policies::raise_overflow_error(function, 0, pol); + result = exp(result); + if(tools::max_value() / fabs(mult) < result) + return boost::math::sign(mult) * policies::raise_overflow_error(function, 0, pol); + result *= mult; + } + else + { + result = boost::math::sin_pi(0.5f * sc, pol) + * 2 * pow(2 * constants::pi(), -s) + * boost::math::tgamma(s, pol) + * zeta_imp(s, sc, pol, tag); + } + } + } + else + { + result = zeta_imp_prec(s, sc, pol, tag); + } + return result; +} + +template +struct zeta_initializer +{ + struct init + { + init() + { + do_init(tag()); + } + static void do_init(const std::integral_constant&){ boost::math::zeta(static_cast(5), Policy()); } + static void do_init(const std::integral_constant&){ boost::math::zeta(static_cast(5), Policy()); } + static void do_init(const std::integral_constant&) + { + boost::math::zeta(static_cast(0.5), Policy()); + boost::math::zeta(static_cast(1.5), Policy()); + boost::math::zeta(static_cast(3.5), Policy()); + boost::math::zeta(static_cast(6.5), Policy()); + boost::math::zeta(static_cast(14.5), Policy()); + boost::math::zeta(static_cast(40.5), Policy()); + + boost::math::zeta(static_cast(5), Policy()); + } + static void do_init(const std::integral_constant&) + { + boost::math::zeta(static_cast(0.5), Policy()); + boost::math::zeta(static_cast(1.5), Policy()); + boost::math::zeta(static_cast(3.5), Policy()); + boost::math::zeta(static_cast(5.5), Policy()); + boost::math::zeta(static_cast(9.5), Policy()); + boost::math::zeta(static_cast(16.5), Policy()); + boost::math::zeta(static_cast(25.5), Policy()); + boost::math::zeta(static_cast(70.5), Policy()); + + boost::math::zeta(static_cast(5), Policy()); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename zeta_initializer::init zeta_initializer::initializer; + +} + +export template +inline typename tools::promote_args::type zeta(T s, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + typedef std::integral_constant tag_type; + + detail::zeta_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::zeta_imp( + static_cast(s), + static_cast(1 - static_cast(s)), + forwarding_policy(), + tag_type()), "boost::math::zeta<%1%>(%1%)"); +} + +export template +inline typename tools::promote_args::type zeta(T s) +{ + return zeta(s, policies::policy<>()); +} + +}} +# 25 "../../../../boost/math/special_functions/detail/polygamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/digamma.hpp" 1 +# 35 "../../../../boost/math/special_functions/digamma.hpp" +namespace boost{ +namespace math{ +namespace detail{ + + + + +inline unsigned digamma_large_lim(const std::integral_constant*) +{ return 20; } +inline unsigned digamma_large_lim(const std::integral_constant*) +{ return 20; } +inline unsigned digamma_large_lim(const void*) +{ return 10; } +# 58 "../../../../boost/math/special_functions/digamma.hpp" +template +inline T digamma_imp_large(T x, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const T P[] = { + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0083333333333333333333333333333333333333333333333333, "-0.0083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.003968253968253968253968253968253968253968253968254, "0.003968253968253968253968253968253968253968253968254", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0041666666666666666666666666666666666666666666666667, "-0.0041666666666666666666666666666666666666666666666667", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0075757575757575757575757575757575757575757575757576, "0.0075757575757575757575757575757575757575757575757576", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.021092796092796092796092796092796092796092796092796, "-0.021092796092796092796092796092796092796092796092796", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.44325980392156862745098039215686274509803921568627, "-0.44325980392156862745098039215686274509803921568627", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.0539543302701197438039543302701197438039543302701, "3.0539543302701197438039543302701197438039543302701", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -26.456212121212121212121212121212121212121212121212, "-26.456212121212121212121212121212121212121212121212", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 281.4601449275362318840579710144927536231884057971, "281.4601449275362318840579710144927536231884057971", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3607.510546398046398046398046398046398046398046398, "-3607.510546398046398046398046398046398046398046398", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 54827.583333333333333333333333333333333333333333333, "54827.583333333333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -974936.82385057471264367816091954022988505747126437, "-974936.82385057471264367816091954022988505747126437", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 20052695.796688078946143462272494530559046688078946, "20052695.796688078946143462272494530559046688078946", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -472384867.72162990196078431372549019607843137254902, "-472384867.72162990196078431372549019607843137254902", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 12635724795.916666666666666666666666666666666666667, "12635724795.916666666666666666666666666666666666667", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + x -= 1; + T result = log(x); + result += 1 / (2 * x); + T z = 1 / (x*x); + result -= z * tools::evaluate_polynomial(P, z); + return result; +} + + + +template +inline T digamma_imp_large(T x, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const T P[] = { + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0083333333333333333333333333333333333333333333333333, "-0.0083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.003968253968253968253968253968253968253968253968254, "0.003968253968253968253968253968253968253968253968254", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0041666666666666666666666666666666666666666666666667, "-0.0041666666666666666666666666666666666666666666666667", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0075757575757575757575757575757575757575757575757576, "0.0075757575757575757575757575757575757575757575757576", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.021092796092796092796092796092796092796092796092796, "-0.021092796092796092796092796092796092796092796092796", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.44325980392156862745098039215686274509803921568627, "-0.44325980392156862745098039215686274509803921568627", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.0539543302701197438039543302701197438039543302701, "3.0539543302701197438039543302701197438039543302701", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -26.456212121212121212121212121212121212121212121212, "-26.456212121212121212121212121212121212121212121212", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 281.4601449275362318840579710144927536231884057971, "281.4601449275362318840579710144927536231884057971", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + x -= 1; + T result = log(x); + result += 1 / (2 * x); + T z = 1 / (x*x); + result -= z * tools::evaluate_polynomial(P, z); + return result; +} + + + +template +inline T digamma_imp_large(T x, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const T P[] = { + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0083333333333333333333333333333333333333333333333333, "-0.0083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.003968253968253968253968253968253968253968253968254, "0.003968253968253968253968253968253968253968253968254", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0041666666666666666666666666666666666666666666666667, "-0.0041666666666666666666666666666666666666666666666667", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0075757575757575757575757575757575757575757575757576, "0.0075757575757575757575757575757575757575757575757576", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.021092796092796092796092796092796092796092796092796, "-0.021092796092796092796092796092796092796092796092796", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.44325980392156862745098039215686274509803921568627, "-0.44325980392156862745098039215686274509803921568627", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + x -= 1; + T result = log(x); + result += 1 / (2 * x); + T z = 1 / (x*x); + result -= z * tools::evaluate_polynomial(P, z); + return result; +} + + + +template +inline T digamma_imp_large(T x, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const T P[] = { + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((24 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0083333333333333333333333333333333333333333333333333, "-0.0083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((24 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.003968253968253968253968253968253968253968253968254, "0.003968253968253968253968253968253968253968253968254", std::integral_constant::value) && ((24 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + x -= 1; + T result = log(x); + result += 1 / (2 * x); + T z = 1 / (x*x); + result -= z * tools::evaluate_polynomial(P, z); + return result; +} + + + + +template +struct digamma_series_func +{ +private: + int k; + T xx; + T term; +public: + digamma_series_func(T x) : k(1), xx(x * x), term(1 / (x * x)) {} + T operator()() + { + T result = term * boost::math::bernoulli_b2n(k) / (2 * k); + term /= xx; + ++k; + return result; + } + typedef T result_type; +}; + +template +inline T digamma_imp_large(T x, const Policy& pol, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + digamma_series_func s(x); + T result = log(x) - 1 / (2 * x); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, -result); + result = -result; + policies::check_series_iterations("boost::math::digamma<%1%>(%1%)", max_iter, pol); + return result; +} + + + + + +template +T digamma_imp_1_2(T x, const std::integral_constant*) +{ +# 213 "../../../../boost/math/special_functions/digamma.hpp" + static const float Y = 0.99558162689208984375F; + + static const T root1 = T(1569415565) / 1073741824uL; + static const T root2 = (T(381566830) / 1073741824uL) / 1073741824uL; + static const T root3 = ((T(111616537) / 1073741824uL) / 1073741824uL) / 1073741824uL; + static const T root4 = (((T(503992070) / 1073741824uL) / 1073741824uL) / 1073741824uL) / 1073741824uL; + static const T root5 = boost::math::tools::make_big_value( 0.52112228569249997894452490385577338504019838794544e-36, "0.52112228569249997894452490385577338504019838794544e-36", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + + static const T P[] = { + boost::math::tools::make_big_value( 0.25479851061131551526977464225335883769, "0.25479851061131551526977464225335883769", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.18684290534374944114622235683619897417, "-0.18684290534374944114622235683619897417", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.80360876047931768958995775910991929922, "-0.80360876047931768958995775910991929922", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.67227342794829064330498117008564270136, "-0.67227342794829064330498117008564270136", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.26569010991230617151285010695543858005, "-0.26569010991230617151285010695543858005", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.05775672694575986971640757748003553385, "-0.05775672694575986971640757748003553385", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0071432147823164975485922555833274240665, "-0.0071432147823164975485922555833274240665", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00048740753910766168912364555706064993274, "-0.00048740753910766168912364555706064993274", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.16454996865214115723416538844975174761e-4, "-0.16454996865214115723416538844975174761e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.20327832297631728077731148515093164955e-6, "-0.20327832297631728077731148515093164955e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.6210924610812025425088411043163287646, "2.6210924610812025425088411043163287646", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.6850757078559596612621337395886392594, "2.6850757078559596612621337395886392594", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.4320913706209965531250495490639289418, "1.4320913706209965531250495490639289418", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.4410872083455009362557012239501953402, "0.4410872083455009362557012239501953402", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.081385727399251729505165509278152487225, "0.081385727399251729505165509278152487225", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0089478633066857163432104815183858149496, "0.0089478633066857163432104815183858149496", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00055861622855066424871506755481997374154, "0.00055861622855066424871506755481997374154", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.1760168552357342401304462967950178554e-4, "0.1760168552357342401304462967950178554e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.20585454493572473724556649516040874384e-6, "0.20585454493572473724556649516040874384e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.90745971844439990284514121823069162795e-11, "-0.90745971844439990284514121823069162795e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.48857673606545846774761343500033283272e-13, "0.48857673606545846774761343500033283272e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + T g = x - root1; + g -= root2; + g -= root3; + g -= root4; + g -= root5; + T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); + T result = g * Y + g * r; + + return result; +} + + + +template +T digamma_imp_1_2(T x, const std::integral_constant*) +{ +# 275 "../../../../boost/math/special_functions/digamma.hpp" + static const float Y = 0.99558162689208984375F; + + static const T root1 = T(1569415565) / 1073741824uL; + static const T root2 = (T(381566830) / 1073741824uL) / 1073741824uL; + static const T root3 = boost::math::tools::make_big_value( 0.9016312093258695918615325266959189453125e-19, "0.9016312093258695918615325266959189453125e-19", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + + static const T P[] = { + boost::math::tools::make_big_value( 0.254798510611315515235, "0.254798510611315515235", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.314628554532916496608, "-0.314628554532916496608", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.665836341559876230295, "-0.665836341559876230295", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.314767657147375752913, "-0.314767657147375752913", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0541156266153505273939, "-0.0541156266153505273939", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00289268368333918761452, "-0.00289268368333918761452", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.1195759927055347547, "2.1195759927055347547", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.54350554664961128724, "1.54350554664961128724", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.486986018231042975162, "0.486986018231042975162", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0660481487173569812846, "0.0660481487173569812846", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00298999662592323990972, "0.00298999662592323990972", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.165079794012604905639e-5, "-0.165079794012604905639e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.317940243105952177571e-7, "0.317940243105952177571e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T g = x - root1; + g -= root2; + g -= root3; + T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); + T result = g * Y + g * r; + + return result; +} + + + +template +T digamma_imp_1_2(T x, const std::integral_constant*) +{ +# 325 "../../../../boost/math/special_functions/digamma.hpp" + static const float Y = 0.99558162689208984F; + + static const T root1 = T(1569415565) / 1073741824uL; + static const T root2 = (T(381566830) / 1073741824uL) / 1073741824uL; + static const T root3 = boost::math::tools::make_big_value( 0.9016312093258695918615325266959189453125e-19, "0.9016312093258695918615325266959189453125e-19", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + + static const T P[] = { + boost::math::tools::make_big_value( 0.25479851061131551, "0.25479851061131551", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.32555031186804491, "-0.32555031186804491", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.65031853770896507, "-0.65031853770896507", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.28919126444774784, "-0.28919126444774784", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.045251321448739056, "-0.045251321448739056", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0020713321167745952, "-0.0020713321167745952", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.0767117023730469, "2.0767117023730469", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.4606242909763515, "1.4606242909763515", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.43593529692665969, "0.43593529692665969", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.054151797245674225, "0.054151797245674225", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0021284987017821144, "0.0021284987017821144", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.55789841321675513e-6, "-0.55789841321675513e-6", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T g = x - root1; + g -= root2; + g -= root3; + T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); + T result = g * Y + g * r; + + return result; +} + + + +template +inline T digamma_imp_1_2(T x, const std::integral_constant*) +{ +# 374 "../../../../boost/math/special_functions/digamma.hpp" + static const float Y = 0.99558162689208984f; + static const T root = 1532632.0f / 1048576; + static const T root_minor = static_cast(0.3700660185912626595423257213284682051735604e-6L); + static const T P[] = { + 0.25479851023250261e0f, + -0.44981331915268368e0f, + -0.43916936919946835e0f, + -0.61041765350579073e-1f + }; + static const T Q[] = { + 0.1e1, + 0.15890202430554952e1f, + 0.65341249856146947e0f, + 0.63851690523355715e-1f + }; + T g = x - root; + g -= root_minor; + T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); + T result = g * Y + g * r; + + return result; +} + +template +T digamma_imp(T x, const Tag* t, const Policy& pol) +{ + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 0; + + + + if(x <= -1) + { + + x = 1 - x; + + T remainder = x - floor(x); + + if(remainder > 0.5) + { + remainder -= 1; + } + + + + if(remainder == 0) + { + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, (1-x), pol); + } + result = constants::pi() / tan(constants::pi() * remainder); + } + if(x == 0) + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, x, pol); + + + + + if(x >= digamma_large_lim(t)) + { + result += digamma_imp_large(x, t); + } + else + { + + + + while(x > 2) + { + x -= 1; + result += 1/x; + } + + + + while(x < 1) + { + result -= 1/x; + x += 1; + } + result += digamma_imp_1_2(x, t); + } + return result; +} + +template +T digamma_imp(T x, const std::integral_constant* t, const Policy& pol) +{ + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 0; + + + + if(x <= -1) + { + + x = 1 - x; + + T remainder = x - floor(x); + + if(remainder > 0.5) + { + remainder -= 1; + } + + + + if(remainder == 0) + { + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, (1 - x), pol); + } + result = constants::pi() / tan(constants::pi() * remainder); + } + if(x == 0) + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, x, pol); + + + + + + + + int lim = 10 + ((tools::digits() - 50) * 240L) / 950; + T two_x = ldexp(x, 1); + if(x >= lim) + { + result += digamma_imp_large(x, pol, t); + } + else if(floor(x) == x) + { + + + + + result = -constants::euler(); + T val = 1; + while(val < x) + { + result += 1 / val; + val += 1; + } + } + else if(floor(two_x) == two_x) + { + + + + + result = -2 * constants::ln_two() - constants::euler(); + int n = itrunc(x); + if(n) + { + for(int k = 1; k < n; ++k) + result += 1 / T(k); + for(int k = n; k <= 2 * n - 1; ++k) + result += 2 / T(k); + } + } + else + { + + + + while(x < lim) + { + result -= 1 / x; + x += 1; + } + result += digamma_imp_large(x, pol, t); + } + return result; +} + + + +template +struct digamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + do_init(std::integral_constant()); + } + void do_init(const std::true_type&) + { + boost::math::digamma(T(1.5), Policy()); + boost::math::digamma(T(500), Policy()); + } + void do_init(const std::false_type&){} + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename digamma_initializer::init digamma_initializer::initializer; + +} + +export template +inline typename tools::promote_args::type + digamma(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef std::integral_constant 113) ? 0 : + precision_type::value <= 24 ? 24 : + precision_type::value <= 53 ? 53 : + precision_type::value <= 64 ? 64 : + precision_type::value <= 113 ? 113 : 0 > tag_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + + detail::digamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::digamma_imp( + static_cast(x), + static_cast(0), forwarding_policy()), "boost::math::digamma<%1%>(%1%)"); +} + +export template +inline typename tools::promote_args::type + digamma(T x) +{ + return digamma(x, policies::policy<>()); +} + +} +} +# 26 "../../../../boost/math/special_functions/detail/polygamma.hpp" 2 + +# 1 "../../../../boost/math/special_functions/cos_pi.hpp" 1 +# 23 "../../../../boost/math/special_functions/cos_pi.hpp" +namespace boost{ namespace math{ namespace detail{ + +template +T cos_pi_imp(T x, const Policy&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + bool invert = false; + if(fabs(x) < 0.25) + return cos(constants::pi() * x); + + if(x < 0) + { + x = -x; + } + T rem = floor(x); + if(abs(floor(rem/2)*2 - rem) > std::numeric_limits::epsilon()) + { + invert = !invert; + } + rem = x - rem; + if(rem > 0.5f) + { + rem = 1 - rem; + invert = !invert; + } + if(rem == 0.5f) + return 0; + + if(rem > 0.25f) + { + rem = 0.5f - rem; + rem = sin(constants::pi() * rem); + } + else + rem = cos(constants::pi() * rem); + return invert ? T(-rem) : rem; +} + +} + +export template +inline typename tools::promote_args::type cos_pi(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<>, + + + policies::overflow_error >::type forwarding_policy; + return policies::checked_narrowing_cast(boost::math::detail::cos_pi_imp(x, forwarding_policy()), "cos_pi"); +} + +export template +inline typename tools::promote_args::type cos_pi(T x) +{ + return boost::math::cos_pi(x, policies::policy<>()); +} + +} +} +# 28 "../../../../boost/math/special_functions/detail/polygamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/pow.hpp" 1 +# 22 "../../../../boost/math/special_functions/pow.hpp" +namespace boost { +namespace math { + + + + + + +namespace detail { + + +template +struct positive_power +{ + template + static constexpr T result(T base) + { + T power = positive_power::result(base); + return power * power; + } +}; + +template +struct positive_power +{ + template + static constexpr T result(T base) + { + T power = positive_power::result(base); + return base * power * power; + } +}; + +template <> +struct positive_power<1, 1> +{ + template + static constexpr T result(T base){ return base; } +}; + + +template +struct power_if_positive +{ + template + static constexpr T result(T base, const Policy&) + { return positive_power::result(base); } +}; + +template +struct power_if_positive +{ + template + static constexpr T result(T base, const Policy& policy) + { + if (base == 0) + { + return policies::raise_overflow_error( + "boost::math::pow(%1%)", + "Attempted to compute a negative power of 0", + policy + ); + } + + return T(1) / positive_power<-N>::result(base); + } +}; + +template <> +struct power_if_positive<0, true> +{ + template + static constexpr T result(T base, const Policy& policy) + { + if (base == 0) + { + return policies::raise_indeterminate_result_error( + "boost::math::pow(%1%)", + "The result of pow<0>(%1%) is undetermined", + base, + T(1), + policy + ); + } + + return T(1); + } +}; + + +template +struct select_power_if_positive +{ + using type = power_if_positive= 0)>; +}; + + +} + + +export template +constexpr inline typename tools::promote_args::type pow(T base, const Policy& policy) +{ + using result_type = typename tools::promote_args::type; + return detail::select_power_if_positive::type::result(static_cast(base), policy); +} + +export template +constexpr inline typename tools::promote_args::type pow(T base) +{ return pow(base, policies::policy<>()); } + + + + + +} +} +# 29 "../../../../boost/math/special_functions/detail/polygamma.hpp" 2 +# 40 "../../../../boost/math/special_functions/detail/polygamma.hpp" +namespace boost { namespace math { namespace detail{ + + template + T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol, const char* function) + { + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + + + if(n + x == x) + { + + if(n == 1) return 1 / x; + T nlx = n * log(x); + if((nlx < tools::log_max_value()) && (n < (int)max_factorial::value)) + return ((n & 1) ? 1 : -1) * boost::math::factorial(n - 1, pol) * pow(x, -n); + else + return ((n & 1) ? 1 : -1) * exp(boost::math::lgamma(T(n), pol) - n * log(x)); + } + T term, sum, part_term; + T x_squared = x * x; +# 84 "../../../../boost/math/special_functions/detail/polygamma.hpp" + part_term = ((n > (int)boost::math::max_factorial::value) && (T(n) * n > tools::log_max_value())) + ? T(0) : static_cast(boost::math::factorial(n - 1, pol) * pow(x, -n - 1)); + if(part_term == 0) + { + + + part_term = static_cast(boost::math::lgamma(n, pol) - (n + 1) * log(x)); + sum = exp(part_term + log(n + 2 * x) - boost::math::constants::ln_two()); + part_term += log(T(n) * (n + 1)) - boost::math::constants::ln_two() - log(x); + part_term = exp(part_term); + } + else + { + sum = part_term * (n + 2 * x) / 2; + part_term *= (T(n) * (n + 1)) / 2; + part_term /= x; + } + + + + if(sum == 0) + return sum; + + for(unsigned k = 1;;) + { + term = part_term * boost::math::bernoulli_b2n(k, pol); + sum += term; + + + + if(fabs(term / sum) < tools::epsilon()) + break; + + + + ++k; + part_term *= T(n + 2 * k - 2) * (n - 1 + 2 * k); + part_term /= (2 * k - 1) * 2 * k; + part_term /= x_squared; + + + + if(k > policies::get_max_series_iterations()) + { + return policies::raise_evaluation_error(function, "Series did not converge, closest value was %1%", sum, pol); + } + } + + if((n - 1) & 1) + sum = -sum; + + return sum; + } + + template + T polygamma_attransitionplus(const int n, const T& x, const Policy& pol, const char* function) + { + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + const int d4d = static_cast(0.4F * policies::digits_base10()); + const int N = d4d + (4 * n); + const int m = n; + const int iter = N - itrunc(x); + + if(iter > (int)policies::get_max_series_iterations()) + return policies::raise_evaluation_error(function, ("Exceeded maximum series evaluations evaluating at n = " + std::to_string(n) + " and x = %1%").c_str(), x, pol); + + const int minus_m_minus_one = -m - 1; + + T z(x); + T sum0(0); + T z_plus_k_pow_minus_m_minus_one(0); + + + if(log(z + iter) * minus_m_minus_one > -tools::log_max_value()) + { + for(int k = 1; k <= iter; ++k) + { + z_plus_k_pow_minus_m_minus_one = pow(z, minus_m_minus_one); + sum0 += z_plus_k_pow_minus_m_minus_one; + z += 1; + } + sum0 *= boost::math::factorial(n, pol); + } + else + { + for(int k = 1; k <= iter; ++k) + { + T log_term = log(z) * minus_m_minus_one + boost::math::lgamma(T(n + 1), pol); + sum0 += exp(log_term); + z += 1; + } + } + if((n - 1) & 1) + sum0 = -sum0; + + return sum0 + polygamma_atinfinityplus(n, z, pol, function); + } + + template + T polygamma_nearzero(int n, T x, const Policy& pol, const char* function) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; +# 197 "../../../../boost/math/special_functions/detail/polygamma.hpp" + T scale = boost::math::factorial(n, pol); + + + + + T factorial_part = 1; + + + + + + T prefix = pow(x, n + 1); + if(prefix == 0) + return boost::math::policies::raise_overflow_error(function, 0, pol); + prefix = 1 / prefix; + + + + + if(prefix > 2 / policies::get_epsilon()) + return ((n & 1) ? 1 : -1) * + (tools::max_value() / prefix < scale ? policies::raise_overflow_error(function, 0, pol) : prefix * scale); + + + + + + + + T sum = prefix; + for(unsigned k = 0;;) + { + + T term = factorial_part * boost::math::zeta(T(k + n + 1), pol); + sum += term; + + if(fabs(term) < fabs(sum * boost::math::policies::get_epsilon())) + break; + + + + ++k; + factorial_part *= (-x * (n + k)) / k; + + + + if(k > policies::get_max_series_iterations()) + return policies::raise_evaluation_error(function, "Series did not converge, best value is %1%", sum, pol); + } + + + + if(boost::math::tools::max_value() / scale < sum) + return boost::math::policies::raise_overflow_error(function, 0, pol); + sum *= scale; + return n & 1 ? sum : T(-sum); + } + + + + + + template + typename Table::value_type::reference dereference_table(Table& table, unsigned row, unsigned power) + { + return table[row][power / 2]; + } + + + + template + T poly_cot_pi(int n, T x, T xc, const Policy& pol, const char* function) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; +# 298 "../../../../boost/math/special_functions/detail/polygamma.hpp" + T s = fabs(x) < fabs(xc) ? boost::math::sin_pi(x, pol) : boost::math::sin_pi(xc, pol); + T c = boost::math::cos_pi(x, pol); + switch(n) + { + case 1: + return -constants::pi() / (s * s); + case 2: + { + return 2 * constants::pi() * constants::pi() * c / boost::math::pow<3>(s, pol); + } + case 3: + { + constexpr int P[] = { -2, -4 }; + return boost::math::pow<3>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<4>(s, pol); + } + case 4: + { + constexpr int P[] = { 16, 8 }; + return boost::math::pow<4>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<5>(s, pol); + } + case 5: + { + constexpr int P[] = { -16, -88, -16 }; + return boost::math::pow<5>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<6>(s, pol); + } + case 6: + { + constexpr int P[] = { 272, 416, 32 }; + return boost::math::pow<6>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<7>(s, pol); + } + case 7: + { + constexpr int P[] = { -272, -2880, -1824, -64 }; + return boost::math::pow<7>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<8>(s, pol); + } + case 8: + { + constexpr int P[] = { 7936, 24576, 7680, 128 }; + return boost::math::pow<8>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<9>(s, pol); + } + case 9: + { + constexpr int P[] = { -7936, -137216, -185856, -31616, -256 }; + return boost::math::pow<9>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<10>(s, pol); + } + case 10: + { + constexpr int P[] = { 353792, 1841152, 1304832, 128512, 512 }; + return boost::math::pow<10>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<11>(s, pol); + } + case 11: + { + constexpr int P[] = { -353792, -9061376, -21253376, -8728576, -518656, -1024}; + return boost::math::pow<11>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<12>(s, pol); + } + case 12: + { + constexpr int P[] = { 22368256, 175627264, 222398464, 56520704, 2084864, 2048 }; + return boost::math::pow<12>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<13>(s, pol); + } + + case 13: + { + constexpr long long P[] = { -22368256LL, -795300864LL, -2868264960LL, -2174832640LL, -357888000LL, -8361984LL, -4096 }; + return boost::math::pow<13>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<14>(s, pol); + } + case 14: + { + constexpr long long P[] = { 1903757312LL, 21016670208LL, 41731645440LL, 20261765120LL, 2230947840LL, 33497088LL, 8192 }; + return boost::math::pow<14>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<15>(s, pol); + } + case 15: + { + constexpr long long P[] = { -1903757312LL, -89702612992LL, -460858269696LL, -559148810240LL, -182172651520LL, -13754155008LL, -134094848LL, -16384 }; + return boost::math::pow<15>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<16>(s, pol); + } + case 16: + { + constexpr long long P[] = { 209865342976LL, 3099269660672LL, 8885192097792LL, 7048869314560LL, 1594922762240LL, 84134068224LL, 536608768LL, 32768 }; + return boost::math::pow<16>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<17>(s, pol); + } + case 17: + { + constexpr long long P[] = { -209865342976LL, -12655654469632LL, -87815735738368LL, -155964390375424LL, -84842998005760LL, -13684856848384LL, -511780323328LL, -2146926592LL, -65536 }; + return boost::math::pow<17>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<18>(s, pol); + } + case 18: + { + constexpr long long P[] = { 29088885112832LL, 553753414467584LL, 2165206642589696LL, 2550316668551168LL, 985278548541440LL, 115620218667008LL, 3100738912256LL, 8588754944LL, 131072 }; + return boost::math::pow<18>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<19>(s, pol); + } + case 19: + { + constexpr long long P[] = { -29088885112832LL, -2184860175433728LL, -19686087844429824LL, -48165109676113920LL, -39471306959486976LL, -11124607890751488LL, -965271355195392LL, -18733264797696LL, -34357248000LL, -262144 }; + return boost::math::pow<19>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<20>(s, pol); + } + case 20: + { + constexpr long long P[] = { 4951498053124096LL, 118071834535526400LL, 603968063567560704LL, 990081991141490688LL, 584901762421358592LL, 122829335169859584LL, 7984436548730880LL, 112949304754176LL, 137433710592LL, 524288 }; + return boost::math::pow<20>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<21>(s, pol); + } + + } +# 409 "../../../../boost/math/special_functions/detail/polygamma.hpp" + if((unsigned)n / 2u > policies::get_max_series_iterations()) + return policies::raise_evaluation_error(function, "The value of n is so large that we're unable to compute the result in reasonable time, best guess is %1%", 0, pol); + + static std::mutex m; + std::lock_guard l(m); + + static int digits = tools::digits(); + static std::vector > table(1, std::vector(1, T(-1))); + + int current_digits = tools::digits(); + + if(digits != current_digits) + { + + table = std::vector >(1, std::vector(1, T(-1))); + digits = current_digits; + } + + int index = n - 1; + + if(index >= (int)table.size()) + { + for(int i = (int)table.size() - 1; i < index; ++i) + { + int offset = i & 1; + int sin_order = i + 2; + int max_cos_order = sin_order - 1; + int max_columns = (max_cos_order - offset) / 2; + int next_offset = offset ? 0 : 1; + int next_max_columns = (max_cos_order + 1 - next_offset) / 2; + table.push_back(std::vector(next_max_columns + 1, T(0))); + + for(int column = 0; column <= max_columns; ++column) + { + int cos_order = 2 * column + offset; + +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + (void) ((!!( +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" + column < (int)table[i].size() +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + )) || (_assert( +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" + "column < (int)table[i].size()" +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + ,"../../../../boost/math/special_functions/detail/polygamma.hpp",444),0)) +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" + ; + +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + (void) ((!!( +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" + (cos_order + 1) / 2 < (int)table[i + 1].size() +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + )) || (_assert( +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" + "(cos_order + 1) / 2 < (int)table[i + 1].size()" +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + ,"../../../../boost/math/special_functions/detail/polygamma.hpp",445),0)) +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" + ; + table[i + 1][(cos_order + 1) / 2] += ((cos_order - sin_order) * table[i][column]) / (sin_order - 1); + if(cos_order) + table[i + 1][(cos_order - 1) / 2] += (-cos_order * table[i][column]) / (sin_order - 1); + } + } + + } + T sum = boost::math::tools::evaluate_even_polynomial(&table[index][0], c, table[index].size()); + if(index & 1) + sum *= c; + if(sum == 0) + return sum; + + + + + T power_terms = n * log(boost::math::constants::pi()); + if(s == 0) + return sum * boost::math::policies::raise_overflow_error(function, 0, pol); + power_terms -= log(fabs(s)) * (n + 1); + power_terms += boost::math::lgamma(T(n), pol); + power_terms += log(fabs(sum)); + + if(power_terms > boost::math::tools::log_max_value()) + return sum * boost::math::policies::raise_overflow_error(function, 0, pol); + + return exp(power_terms) * ((s < 0) && ((n + 1) & 1) ? -1 : 1) * boost::math::sign(sum); + } + + template + struct polygamma_initializer + { + struct init + { + init() + { + + boost::math::polygamma(30, T(-2.5f), Policy()); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } + }; + + template + const typename polygamma_initializer::init polygamma_initializer::initializer; + + template + inline T polygamma_imp(const int n, T x, const Policy &pol) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const char* function = "boost::math::polygamma<%1%>(int, %1%)"; + polygamma_initializer::initializer.force_instantiate(); + if(n < 0) + return policies::raise_domain_error(function, "Order must be >= 0, but got %1%", static_cast(n), pol); + if(x < 0) + { + if(floor(x) == x) + { + + + + if(lltrunc(x) & 1) + return policies::raise_overflow_error(function, 0, pol); + else + return policies::raise_pole_error(function, "Evaluation at negative integer %1%", x, pol); + } + T z = 1 - x; + T result = polygamma_imp(n, z, pol) + constants::pi() * poly_cot_pi(n, z, x, pol, function); + return n & 1 ? T(-result) : result; + } + + + + + + + + T small_x_limit = (std::min)(T(T(5) / n), T(0.25f)); + if(x < small_x_limit) + { + return polygamma_nearzero(n, x, pol, function); + } + else if(x > 0.4F * policies::digits_base10() + 4.0f * n) + { + return polygamma_atinfinityplus(n, x, pol, function); + } + else if(x == 1) + { + return (n & 1 ? 1 : -1) * boost::math::factorial(n, pol) * boost::math::zeta(T(n + 1), pol); + } + else if(x == 0.5f) + { + T result = (n & 1 ? 1 : -1) * boost::math::factorial(n, pol) * boost::math::zeta(T(n + 1), pol); + if(fabs(result) >= ldexp(tools::max_value(), -n - 1)) + return boost::math::sign(result) * policies::raise_overflow_error(function, 0, pol); + result *= ldexp(T(1), n + 1) - 1; + return result; + } + else + { + return polygamma_attransitionplus(n, x, pol, function); + } + } + +} } } +# 16 "../../../../boost/math/special_functions/polygamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/trigamma.hpp" 1 +# 22 "../../../../boost/math/special_functions/trigamma.hpp" +# 1 "../../../../boost/math/special_functions/polygamma.hpp" 1 +# 23 "../../../../boost/math/special_functions/trigamma.hpp" 2 +# 34 "../../../../boost/math/special_functions/trigamma.hpp" +namespace boost{ +namespace math{ +namespace detail{ + +template +T polygamma_imp(const int n, T x, const Policy &pol); + +template +T trigamma_prec(T x, const std::integral_constant*, const Policy&) +{ + + static const T offset = boost::math::tools::make_big_value( 2.1093254089355469, "2.1093254089355469", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + static const T P_1_2[] = { + boost::math::tools::make_big_value( -1.1093280605946045, "-1.1093280605946045", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.8310674472619321, "-3.8310674472619321", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.3703848401898283, "-3.3703848401898283", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.28080574467981213, "0.28080574467981213", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.6638069578676164, "1.6638069578676164", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.64468386819102836, "0.64468386819102836", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_1_2[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.4535389668541151, "3.4535389668541151", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.5208926987851437, "4.5208926987851437", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.7012734178351534, "2.7012734178351534", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.64468798399785611, "0.64468798399785611", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.20314516859987728e-6, "-0.20314516859987728e-6", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + static const T P_2_4[] = { + boost::math::tools::make_big_value( -0.13803835004508849e-7, "-0.13803835004508849e-7", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.50000049158540261, "0.50000049158540261", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.6077979838469348, "1.6077979838469348", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.5645435828098254, "2.5645435828098254", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.0534873203680393, "2.0534873203680393", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.74566981111565923, "0.74566981111565923", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_2_4[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.8822787662376169, "2.8822787662376169", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.1681660554090917, "4.1681660554090917", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.7853527819234466, "2.7853527819234466", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.74967671848044792, "0.74967671848044792", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00057069112416246805, "-0.00057069112416246805", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + + static const T P_4_inf[] = { + static_cast(0.68947581948701249e-17L), + static_cast(0.49999999999998975L), + static_cast(1.0177274392923795L), + static_cast(2.498208511343429L), + static_cast(2.1921221359427595L), + static_cast(1.5897035272532764L), + static_cast(0.40154388356961734L), + }; + static const T Q_4_inf[] = { + static_cast(1.0L), + static_cast(1.7021215452463932L), + static_cast(4.4290431747556469L), + static_cast(2.9745631894384922L), + static_cast(2.3013614809773616L), + static_cast(0.28360399799075752L), + static_cast(0.022892987908906897L), + }; + + if(x <= 2) + { + return (offset + boost::math::tools::evaluate_polynomial(P_1_2, x) / tools::evaluate_polynomial(Q_1_2, x)) / (x * x); + } + else if(x <= 4) + { + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_2_4, y) / tools::evaluate_polynomial(Q_2_4, y)) / x; + } + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_4_inf, y) / tools::evaluate_polynomial(Q_4_inf, y)) / x; +} + +template +T trigamma_prec(T x, const std::integral_constant*, const Policy&) +{ + + static const T offset_1_2 = boost::math::tools::make_big_value( 2.109325408935546875, "2.109325408935546875", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + static const T P_1_2[] = { + boost::math::tools::make_big_value( -1.10932535608960258341, "-1.10932535608960258341", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.18793841543017129052, "-4.18793841543017129052", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.63865531898487734531, "-4.63865531898487734531", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.919832884430500908047, "-0.919832884430500908047", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.68074038333180423012, "1.68074038333180423012", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.21172611429185622377, "1.21172611429185622377", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.259635673503366427284, "0.259635673503366427284", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_1_2[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.77521119359546982995, "3.77521119359546982995", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 5.664338024578956321, "5.664338024578956321", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.25995134879278028361, "4.25995134879278028361", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.62956638448940402182, "1.62956638448940402182", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.259635512844691089868, "0.259635512844691089868", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.629642219810618032207e-8, "0.629642219810618032207e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + static const T P_2_8[] = { + boost::math::tools::make_big_value( -0.387540035162952880976e-11, "-0.387540035162952880976e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.500000000276430504, "0.500000000276430504", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.21926880986360957306, "3.21926880986360957306", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 10.2550347708483445775, "10.2550347708483445775", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 18.9002075150709144043, "18.9002075150709144043", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 21.0357215832399705625, "21.0357215832399705625", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 13.4346512182925923978, "13.4346512182925923978", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.98656291026448279118, "3.98656291026448279118", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_2_8[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 6.10520430478613667724, "6.10520430478613667724", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 18.475001060603645512, "18.475001060603645512", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 31.7087534567758405638, "31.7087534567758405638", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 31.908814523890465398, "31.908814523890465398", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 17.4175479039227084798, "17.4175479039227084798", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.98749106958394941276, "3.98749106958394941276", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000115917322224411128566, "-0.000115917322224411128566", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + + static const T P_8_inf[] = { + boost::math::tools::make_big_value( -0.263527875092466899848e-19, "-0.263527875092466899848e-19", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.500000000000000058145, "0.500000000000000058145", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0730121433777364138677, "0.0730121433777364138677", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.94505878379957149534, "1.94505878379957149534", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0517092358874932620529, "0.0517092358874932620529", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.07995383547483921121, "1.07995383547483921121", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_8_inf[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.187309046577818095504, "-0.187309046577818095504", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.95255391645238842975, "3.95255391645238842975", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.14743283327078949087, "-1.14743283327078949087", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.52989799376344914499, "2.52989799376344914499", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.627414303172402506396, "-0.627414303172402506396", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.141554248216425512536, "0.141554248216425512536", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + if(x <= 2) + { + return (offset_1_2 + boost::math::tools::evaluate_polynomial(P_1_2, x) / tools::evaluate_polynomial(Q_1_2, x)) / (x * x); + } + else if(x <= 8) + { + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_2_8, y) / tools::evaluate_polynomial(Q_2_8, y)) / x; + } + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_8_inf, y) / tools::evaluate_polynomial(Q_8_inf, y)) / x; +} + +template +T trigamma_prec(T x, const std::integral_constant*, const Policy&) +{ + + + static const T P_1_2[] = { + boost::math::tools::make_big_value( -0.999999999999999082554457936871832533, "-0.999999999999999082554457936871832533", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.71237311120865266379041700054847734, "-4.71237311120865266379041700054847734", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -7.94125711970499027763789342500817316, "-7.94125711970499027763789342500817316", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -5.74657746697664735258222071695644535, "-5.74657746697664735258222071695644535", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.404213349456398905981223965160595687, "-0.404213349456398905981223965160595687", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.47877781178642876561595890095758896, "2.47877781178642876561595890095758896", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.07714151702455125992166949812126433, "2.07714151702455125992166949812126433", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.858877899162360138844032265418028567, "0.858877899162360138844032265418028567", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.20499222604410032375789018837922397, "0.20499222604410032375789018837922397", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0272103140348194747360175268778415049, "0.0272103140348194747360175268778415049", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0015764849020876949848954081173520686, "0.0015764849020876949848954081173520686", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_1_2[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.71237311120863419878375031457715223, "4.71237311120863419878375031457715223", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 9.58619118655339853449127952145877467, "9.58619118655339853449127952145877467", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 11.0940067269829372437561421279054968, "11.0940067269829372437561421279054968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.09075424749327792073276309969037885, "8.09075424749327792073276309969037885", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.87705890159891405185343806884451286, "3.87705890159891405185343806884451286", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.22758678701914477836330837816976782, "1.22758678701914477836330837816976782", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.249092040606385004109672077814668716, "0.249092040606385004109672077814668716", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0295750413900655597027079600025569048, "0.0295750413900655597027079600025569048", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00157648490200498142247694709728858139, "0.00157648490200498142247694709728858139", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.161264050344059471721062360645432809e-14, "0.161264050344059471721062360645432809e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + static const T P_2_4[] = { + boost::math::tools::make_big_value( -2.55843734739907925764326773972215085, "-2.55843734739907925764326773972215085", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -12.2830208240542011967952466273455887, "-12.2830208240542011967952466273455887", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -23.9195022162767993526575786066414403, "-23.9195022162767993526575786066414403", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -24.9256431504823483094158828285470862, "-24.9256431504823483094158828285470862", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -14.7979122765478779075108064826412285, "-14.7979122765478779075108064826412285", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.46654453928610666393276765059122272, "-4.46654453928610666393276765059122272", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0191439033405649675717082465687845002, "-0.0191439033405649675717082465687845002", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.515412052554351265708917209749037352, "0.515412052554351265708917209749037352", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.195378348786064304378247325360320038, "0.195378348786064304378247325360320038", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0334761282624174313035014426794245393, "0.0334761282624174313035014426794245393", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.002373665205942206348500250056602687, "0.002373665205942206348500250056602687", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_2_4[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.80098558454419907830670928248659245, "4.80098558454419907830670928248659245", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 9.99220727843170133895059300223445265, "9.99220727843170133895059300223445265", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 11.8896146167631330735386697123464976, "11.8896146167631330735386697123464976", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.96613256683809091593793565879092581, "8.96613256683809091593793565879092581", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.47254136149624110878909334574485751, "4.47254136149624110878909334574485751", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.48600982028196527372434773913633152, "1.48600982028196527372434773913633152", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.319570735766764237068541501137990078, "0.319570735766764237068541501137990078", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0407358345787680953107374215319322066, "0.0407358345787680953107374215319322066", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00237366520593271641375755486420859837, "0.00237366520593271641375755486420859837", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.239554887903526152679337256236302116e-15, "0.239554887903526152679337256236302116e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.294749244740618656265237072002026314e-17, "-0.294749244740618656265237072002026314e-17", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + static const T y_offset_2_4 = boost::math::tools::make_big_value( 3.558437347412109375, "3.558437347412109375", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + + + static const T P_4_8[] = { + boost::math::tools::make_big_value( 0.166626112697021464248967707021688845e-16, "0.166626112697021464248967707021688845e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.499999999999997739552090249208808197, "0.499999999999997739552090249208808197", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 6.40270945019053817915772473771553187, "6.40270945019053817915772473771553187", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 41.3833374155000608013677627389343329, "41.3833374155000608013677627389343329", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 166.803341854562809335667241074035245, "166.803341854562809335667241074035245", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 453.39964786925369319960722793414521, "453.39964786925369319960722793414521", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 851.153712317697055375935433362983944, "851.153712317697055375935433362983944", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1097.70657567285059133109286478004458, "1097.70657567285059133109286478004458", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 938.431232478455316020076349367632922, "938.431232478455316020076349367632922", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 487.268001604651932322080970189930074, "487.268001604651932322080970189930074", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 119.953445242335730062471193124820659, "119.953445242335730062471193124820659", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_4_8[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 12.4720855670474488978638945855932398, "12.4720855670474488978638945855932398", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 78.6093129753298570701376952709727391, "78.6093129753298570701376952709727391", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 307.470246050318322489781182863190127, "307.470246050318322489781182863190127", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 805.140686101151538537565264188630079, "805.140686101151538537565264188630079", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1439.12019760292146454787601409644413, "1439.12019760292146454787601409644413", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1735.6105285756048831268586001383127, "1735.6105285756048831268586001383127", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1348.32500712856328019355198611280536, "1348.32500712856328019355198611280536", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 607.225985860570846699704222144650563, "607.225985860570846699704222144650563", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 119.952317857277045332558673164517227, "119.952317857277045332558673164517227", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000140165918355036060868680809129436084, "0.000140165918355036060868680809129436084", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + + + static const T P_8_16[] = { + boost::math::tools::make_big_value( -0.184828315274146610610872315609837439e-19, "-0.184828315274146610610872315609837439e-19", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.500000000000000004122475157735807738, "0.500000000000000004122475157735807738", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.02533865247313349284875558880415875, "3.02533865247313349284875558880415875", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 13.5995927517457371243039532492642734, "13.5995927517457371243039532492642734", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 35.3132224283087906757037999452941588, "35.3132224283087906757037999452941588", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 67.1639424550714159157603179911505619, "67.1639424550714159157603179911505619", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 83.5767733658513967581959839367419891, "83.5767733658513967581959839367419891", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 71.073491212235705900866411319363501, "71.073491212235705900866411319363501", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 35.8621515614725564575893663483998663, "35.8621515614725564575893663483998663", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.72152231639983491987779743154333318, "8.72152231639983491987779743154333318", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_8_16[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 5.71734397161293452310624822415866372, "5.71734397161293452310624822415866372", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 25.293404179620438179337103263274815, "25.293404179620438179337103263274815", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 62.2619767967468199111077640625328469, "62.2619767967468199111077640625328469", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 113.955048909238993473389714972250235, "113.955048909238993473389714972250235", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 130.807138328938966981862203944329408, "130.807138328938966981862203944329408", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 102.423146902337654110717764213057753, "102.423146902337654110717764213057753", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 44.0424772805245202514468199602123565, "44.0424772805245202514468199602123565", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.89898032477904072082994913461386099, "8.89898032477904072082994913461386099", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0296627336872039988632793863671456398, "-0.0296627336872039988632793863671456398", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + + static const T P_16_inf[] = { + boost::math::tools::make_big_value( 0.0, "0.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.500000000000000000000000000000087317, "0.500000000000000000000000000000087317", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.345625669885456215194494735902663968, "0.345625669885456215194494735902663968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 9.62895499360842232127552650044647769, "9.62895499360842232127552650044647769", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.5936085382439026269301003761320812, "3.5936085382439026269301003761320812", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 49.459599118438883265036646019410669, "49.459599118438883265036646019410669", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 7.77519237321893917784735690560496607, "7.77519237321893917784735690560496607", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 74.4536074488178075948642351179304121, "74.4536074488178075948642351179304121", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.75209340397069050436806159297952699, "2.75209340397069050436806159297952699", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 23.9292359711471667884504840186561598, "23.9292359711471667884504840186561598", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_16_inf[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.357918006437579097055656138920742037, "0.357918006437579097055656138920742037", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 19.1386039850709849435325005484512944, "19.1386039850709849435325005484512944", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.874349081464143606016221431763364517, "0.874349081464143606016221431763364517", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 98.6516097434855572678195488061432509, "98.6516097434855572678195488061432509", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -16.1051972833382893468655223662534306, "-16.1051972833382893468655223662534306", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 154.316860216253720989145047141653727, "154.316860216253720989145047141653727", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -40.2026880424378986053105969312264534, "-40.2026880424378986053105969312264534", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 60.1679136674264778074736441126810223, "60.1679136674264778074736441126810223", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -13.3414844622256422644504472438320114, "-13.3414844622256422644504472438320114", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.53795636200649908779512969030363442, "2.53795636200649908779512969030363442", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + if(x <= 2) + { + return (2 + boost::math::tools::evaluate_polynomial(P_1_2, x) / tools::evaluate_polynomial(Q_1_2, x)) / (x * x); + } + else if(x <= 4) + { + return (y_offset_2_4 + boost::math::tools::evaluate_polynomial(P_2_4, x) / tools::evaluate_polynomial(Q_2_4, x)) / (x * x); + } + else if(x <= 8) + { + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_4_8, y) / tools::evaluate_polynomial(Q_4_8, y)) / x; + } + else if(x <= 16) + { + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_8_16, y) / tools::evaluate_polynomial(Q_8_16, y)) / x; + } + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_16_inf, y) / tools::evaluate_polynomial(Q_16_inf, y)) / x; +} + +template +T trigamma_imp(T x, const Tag* t, const Policy& pol) +{ + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 0; + + + + if(x <= 0) + { + + T z = 1 - x; + + if(floor(x) == x) + { + return policies::raise_pole_error("boost::math::trigamma<%1%>(%1%)", 0, (1-x), pol); + } + T s = fabs(x) < fabs(z) ? boost::math::sin_pi(x, pol) : boost::math::sin_pi(z, pol); + return -trigamma_imp(z, t, pol) + boost::math::pow<2>(constants::pi()) / (s * s); + } + if(x < 1) + { + result = 1 / (x * x); + x += 1; + } + return result + trigamma_prec(x, t, pol); +} + +template +T trigamma_imp(T x, const std::integral_constant*, const Policy& pol) +{ + return polygamma_imp(1, x, pol); +} + + + +template +struct trigamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + do_init(std::integral_constant()); + } + void do_init(const std::true_type&) + { + boost::math::trigamma(T(2.5), Policy()); + } + void do_init(const std::false_type&){} + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename trigamma_initializer::init trigamma_initializer::initializer; + +} + +export template +inline typename tools::promote_args::type + trigamma(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + + detail::trigamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::trigamma_imp( + static_cast(x), + static_cast(0), forwarding_policy()), "boost::math::trigamma<%1%>(%1%)"); +} + +export template +inline typename tools::promote_args::type + trigamma(T x) +{ + return trigamma(x, policies::policy<>()); +} + +} +} +# 17 "../../../../boost/math/special_functions/polygamma.hpp" 2 + +namespace boost { namespace math { + + + template + inline typename tools::promote_args::type polygamma(const int n, T x, const Policy& pol) + { + + + + if(n == 0) + return boost::math::digamma(x, pol); + if(n == 1) + return boost::math::trigamma(x, pol); + + + + + + + + + + + typedef typename tools::promote_args::type result_type; + + + + + typedef typename policies::evaluation::type value_type; +# 57 "../../../../boost/math/special_functions/polygamma.hpp" + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + + + + + + return policies::checked_narrowing_cast( + detail::polygamma_imp(n, static_cast(x), forwarding_policy()), + "boost::math::polygamma<%1%>(int, %1%)"); + } + + template + inline typename tools::promote_args::type polygamma(const int n, T x) + { + return boost::math::polygamma(n, x, policies::policy<>()); + } + +} } +# 38 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 59 "../../../../boost/math/special_functions/gamma.hpp" +namespace boost{ namespace math{ + +namespace detail{ + +template +inline bool is_odd(T v, const std::true_type&) +{ + int i = static_cast(v); + return i&1; +} +template +inline bool is_odd(T v, const std::false_type&) +{ + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T modulus = v - 2 * floor(v/2); + return static_cast(modulus != 0); +} +template +inline bool is_odd(T v) +{ + return is_odd(v, ::std::is_convertible()); +} + +template +T sinpx(T z) +{ + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + int sign = 1; + if(z < 0) + { + z = -z; + } + T fl = floor(z); + T dist; + if(is_odd(fl)) + { + fl += 1; + dist = fl - z; + sign = -sign; + } + else + { + dist = z - fl; + } + +# 106 "../../../../boost/math/special_functions/gamma.hpp" 3 + (void) ((!!( +# 106 "../../../../boost/math/special_functions/gamma.hpp" + fl >= 0 +# 106 "../../../../boost/math/special_functions/gamma.hpp" 3 + )) || (_assert( +# 106 "../../../../boost/math/special_functions/gamma.hpp" + "fl >= 0" +# 106 "../../../../boost/math/special_functions/gamma.hpp" 3 + ,"../../../../boost/math/special_functions/gamma.hpp",106),0)) +# 106 "../../../../boost/math/special_functions/gamma.hpp" + ; + if(dist > 0.5) + dist = 1 - dist; + T result = sin(dist*boost::math::constants::pi()); + return sign*z*result; +} + + + +template +T gamma_imp(T z, const Policy& pol, const Lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 1; +# 130 "../../../../boost/math/special_functions/gamma.hpp" + static const char* function = "boost::math::tgamma<%1%>(%1%)"; + + if(z <= 0) + { + if(floor(z) == z) + return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); + if(z <= -20) + { + result = gamma_imp(T(-z), pol, l) * sinpx(z); + ; + if((fabs(result) < 1) && (tools::max_value() * fabs(result) < boost::math::constants::pi())) + return -boost::math::sign(result) * policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + result = -boost::math::constants::pi() / result; + if(result == 0) + return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); + if((boost::math::fpclassify)(result) == (int) +# 145 "../../../../boost/math/special_functions/gamma.hpp" 3 + (0x0400 | 0x4000) +# 145 "../../../../boost/math/special_functions/gamma.hpp" + ) + return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); + ; + return result; + } + + + while(z < 0) + { + result /= z; + z += 1; + } + } + ; + if((floor(z) == z) && (z < max_factorial::value)) + { + result *= unchecked_factorial(itrunc(z, pol) - 1); + ; + } + else if (z < tools::root_epsilon()) + { + if (z < 1 / tools::max_value()) + result = policies::raise_overflow_error(function, 0, pol); + result *= 1 / z - constants::euler(); + } + else + { + result *= Lanczos::lanczos_sum(z); + T zgh = (z + static_cast(Lanczos::g()) - boost::math::constants::half()); + T lzgh = log(zgh); + ; + ; + if(z * lzgh > tools::log_max_value()) + { + + ; + if(lzgh * z / 2 > tools::log_max_value()) + return boost::math::sign(result) * policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + T hp = pow(zgh, (z / 2) - T(0.25)); + ; + result *= hp / exp(zgh); + ; + if(tools::max_value() / hp < result) + return boost::math::sign(result) * policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + result *= hp; + ; + } + else + { + ; + ; + ; + result *= pow(zgh, z - boost::math::constants::half()) / exp(zgh); + ; + } + } + return result; +} + + + +template +T lgamma_imp(T z, const Policy& pol, const Lanczos& l, int* sign = 0) +{ +# 218 "../../../../boost/math/special_functions/gamma.hpp" + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::lgamma<%1%>(%1%)"; + + T result = 0; + int sresult = 1; + if(z <= -tools::root_epsilon()) + { + + if(floor(z) == z) + return policies::raise_pole_error(function, "Evaluation of lgamma at a negative integer %1%.", z, pol); + + T t = sinpx(z); + z = -z; + if(t < 0) + { + t = -t; + } + else + { + sresult = -sresult; + } + result = log(boost::math::constants::pi()) - lgamma_imp(z, pol, l) - log(t); + } + else if (z < tools::root_epsilon()) + { + if (0 == z) + return policies::raise_pole_error(function, "Evaluation of lgamma at %1%.", z, pol); + if (4 * fabs(z) < tools::epsilon()) + result = -log(fabs(z)); + else + result = log(fabs(1 / z - constants::euler())); + if (z < 0) + sresult = -1; + } + else if(z < 15) + { + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + + result = lgamma_small_imp(z, T(z - 1), T(z - 2), tag_type(), pol, l); + } + else if((z >= 3) && (z < 100) && (std::numeric_limits::max_exponent >= 1024)) + { + + result = log(gamma_imp(z, pol, l)); + } + else + { + + T zgh = static_cast(z + Lanczos::g() - boost::math::constants::half()); + result = log(zgh) - 1; + result *= z - 0.5f; + + + + if(result * tools::epsilon() < 20) + result += log(Lanczos::lanczos_sum_expG_scaled(z)); + } + + if(sign) + *sign = sresult; + return result; +} + + + + +template +struct upper_incomplete_gamma_fract +{ +private: + T z, a; + int k; +public: + typedef std::pair result_type; + + upper_incomplete_gamma_fract(T a1, T z1) + : z(z1-a1+1), a(a1), k(0) + { + } + + result_type operator()() + { + ++k; + z += 2; + return result_type(k * (a - k), z); + } +}; + +template +inline T upper_gamma_fraction(T a, T z, T eps) +{ + + + + upper_incomplete_gamma_fract f(a, z); + return 1 / (z - a + 1 + boost::math::tools::continued_fraction_a(f, eps)); +} + +template +struct lower_incomplete_gamma_series +{ +private: + T a, z, result; +public: + typedef T result_type; + lower_incomplete_gamma_series(T a1, T z1) : a(a1), z(z1), result(1){} + + T operator()() + { + T r = result; + a += 1; + result *= z/a; + return r; + } +}; + +template +inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0) +{ + + + + lower_incomplete_gamma_series s(a, z); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + T factor = policies::get_epsilon(); + T result = boost::math::tools::sum_series(s, factor, max_iter, init_value); + policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol); + return result; +} + + + + + +template +std::size_t highest_bernoulli_index() +{ + const float digits10_of_type = (std::numeric_limits::is_specialized + ? static_cast(std::numeric_limits::digits10) + : static_cast(boost::math::tools::digits() * 0.301F)); + + + return static_cast(18.0F + (0.6F * digits10_of_type)); +} + +template +int minimum_argument_for_bernoulli_recursion() +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + const float digits10_of_type = (std::numeric_limits::is_specialized + ? (float) std::numeric_limits::digits10 + : (float) (boost::math::tools::digits() * 0.301F)); + + int min_arg = (int) (digits10_of_type * 1.7F); + + if(digits10_of_type < 50.0F) + { +# 394 "../../../../boost/math/special_functions/gamma.hpp" + const float d2_minus_one = ((digits10_of_type / 0.301F) - 1.0F); + const float limit = ceil(exp((d2_minus_one * log(2.0F)) / 20.0F)); + + min_arg = (int) ((std::min)(digits10_of_type * 1.7F, limit)); + } + + return min_arg; +} + +template +T scaled_tgamma_no_lanczos(const T& z, const Policy& pol, bool islog = false) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + + + +# 412 "../../../../boost/math/special_functions/gamma.hpp" 3 + (void) ((!!( +# 412 "../../../../boost/math/special_functions/gamma.hpp" + minimum_argument_for_bernoulli_recursion() <= z +# 412 "../../../../boost/math/special_functions/gamma.hpp" 3 + )) || (_assert( +# 412 "../../../../boost/math/special_functions/gamma.hpp" + "minimum_argument_for_bernoulli_recursion() <= z" +# 412 "../../../../boost/math/special_functions/gamma.hpp" 3 + ,"../../../../boost/math/special_functions/gamma.hpp",412),0)) +# 412 "../../../../boost/math/special_functions/gamma.hpp" + ; + + + + const std::size_t number_of_bernoullis_b2n = policies::get_max_series_iterations(); + + T one_over_x_pow_two_n_minus_one = 1 / z; + const T one_over_x2 = one_over_x_pow_two_n_minus_one * one_over_x_pow_two_n_minus_one; + T sum = (boost::math::bernoulli_b2n(1) / 2) * one_over_x_pow_two_n_minus_one; + const T target_epsilon_to_break_loop = sum * boost::math::tools::epsilon(); + const T half_ln_two_pi_over_z = sqrt(boost::math::constants::two_pi() / z); + T last_term = 2 * sum; + + for (std::size_t n = 2U;; ++n) + { + one_over_x_pow_two_n_minus_one *= one_over_x2; + + const std::size_t n2 = static_cast(n * 2U); + + const T term = (boost::math::bernoulli_b2n(static_cast(n)) * one_over_x_pow_two_n_minus_one) / (n2 * (n2 - 1U)); + + if ((n >= 3U) && (abs(term) < target_epsilon_to_break_loop)) + { + + + + + + break; + } + if (n > number_of_bernoullis_b2n) + return policies::raise_evaluation_error("scaled_tgamma_no_lanczos<%1%>()", "Exceeded maximum series iterations without reaching convergence, best approximation was %1%", T(exp(sum) * half_ln_two_pi_over_z), pol); + + sum += term; + + + T fterm = fabs(term); + if(fterm > last_term) + return policies::raise_evaluation_error("scaled_tgamma_no_lanczos<%1%>()", "Series became divergent without reaching convergence, best approximation was %1%", T(exp(sum) * half_ln_two_pi_over_z), pol); + last_term = fterm; + } + + + T scaled_gamma_value = islog ? T(sum + log(half_ln_two_pi_over_z)) : T(exp(sum) * half_ln_two_pi_over_z); + return scaled_gamma_value; +} + + +template +T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign = 0); + +template +T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::tgamma<%1%>(%1%)"; + + + const bool is_at_zero = (z == 0); + + if((boost::math::isnan)(z) || (is_at_zero) || ((boost::math::isinf)(z) && (z < 0))) + return policies::raise_domain_error(function, "Evaluation of tgamma at %1%.", z, pol); + + const bool b_neg = (z < 0); + + const bool floor_of_z_is_equal_to_z = (floor(z) == z); + + + if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial::value)) + { + return boost::math::unchecked_factorial(itrunc(z) - 1); + } + + + T zz((!b_neg) ? z : -z); + + + if(zz < tools::cbrt_epsilon()) + { + const T a0(1); + const T a1(boost::math::constants::euler()); + const T six_euler_squared((boost::math::constants::euler() * boost::math::constants::euler()) * 6); + const T a2((six_euler_squared - boost::math::constants::pi_sqr()) / 12); + + const T inverse_tgamma_series = z * ((a2 * z + a1) * z + a0); + + return 1 / inverse_tgamma_series; + } + + + + const int min_arg_for_recursion = minimum_argument_for_bernoulli_recursion(); + + int n_recur; + + if(zz < min_arg_for_recursion) + { + n_recur = boost::math::itrunc(min_arg_for_recursion - zz) + 1; + + zz += n_recur; + } + else + { + n_recur = 0; + } + if (!n_recur) + { + if (zz > tools::log_max_value()) + return policies::raise_overflow_error(function, 0, pol); + if (log(zz) * zz / 2 > tools::log_max_value()) + return policies::raise_overflow_error(function, 0, pol); + } + T gamma_value = scaled_tgamma_no_lanczos(zz, pol); + T power_term = pow(zz, zz / 2); + T exp_term = exp(-zz); + gamma_value *= (power_term * exp_term); + if(!n_recur && (tools::max_value() / power_term < gamma_value)) + return policies::raise_overflow_error(function, 0, pol); + gamma_value *= power_term; + + + if(n_recur) + { + + + + + + zz = fabs(z) + 1; + for(int k = 1; k < n_recur; ++k) + { + gamma_value /= zz; + zz += 1; + } + gamma_value /= fabs(z); + } + + + if(b_neg) + { + + + + + + if(floor_of_z_is_equal_to_z) + return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); + + gamma_value *= sinpx(z); + + ; + + const bool result_is_too_large_to_represent = ( (abs(gamma_value) < 1) + && ((tools::max_value() * abs(gamma_value)) < boost::math::constants::pi())); + + if(result_is_too_large_to_represent) + return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + + gamma_value = -boost::math::constants::pi() / gamma_value; + ; + + if(gamma_value == 0) + return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); + + if((boost::math::fpclassify)(gamma_value) == static_cast( +# 577 "../../../../boost/math/special_functions/gamma.hpp" 3 + (0x0400 | 0x4000) +# 577 "../../../../boost/math/special_functions/gamma.hpp" + )) + return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", gamma_value, pol); + } + + return gamma_value; +} + +template +inline T log_gamma_near_1(const T& z, Policy const& pol) +{ + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + +# 594 "../../../../boost/math/special_functions/gamma.hpp" 3 + (void) ((!!( +# 594 "../../../../boost/math/special_functions/gamma.hpp" + fabs(z) < 1 +# 594 "../../../../boost/math/special_functions/gamma.hpp" 3 + )) || (_assert( +# 594 "../../../../boost/math/special_functions/gamma.hpp" + "fabs(z) < 1" +# 594 "../../../../boost/math/special_functions/gamma.hpp" 3 + ,"../../../../boost/math/special_functions/gamma.hpp",594),0)) +# 594 "../../../../boost/math/special_functions/gamma.hpp" + ; + + T result = -constants::euler() * z; + + T power_term = z * z / 2; + int n = 2; + T term = 0; + + do + { + term = power_term * boost::math::polygamma(n - 1, T(1), pol); + result += term; + ++n; + power_term *= z / n; + } while (fabs(result) * tools::epsilon() < fabs(term)); + + return result; +} + +template +T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::lgamma<%1%>(%1%)"; + + + const bool is_at_zero = (z == 0); + + if(is_at_zero) + return policies::raise_domain_error(function, "Evaluation of lgamma at zero %1%.", z, pol); + if((boost::math::isnan)(z)) + return policies::raise_domain_error(function, "Evaluation of lgamma at %1%.", z, pol); + if((boost::math::isinf)(z)) + return policies::raise_overflow_error(function, 0, pol); + + const bool b_neg = (z < 0); + + const bool floor_of_z_is_equal_to_z = (floor(z) == z); + + + if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial::value)) + { + if (sign) + *sign = 1; + return log(boost::math::unchecked_factorial(itrunc(z) - 1)); + } + + + T zz((!b_neg) ? z : -z); + + const int min_arg_for_recursion = minimum_argument_for_bernoulli_recursion(); + + T log_gamma_value; + + if (zz < min_arg_for_recursion) + { + + + + if (sign) + * sign = 1; + if(fabs(z - 1) < 0.25) + { + log_gamma_value = log_gamma_near_1(T(zz - 1), pol); + } + else if(fabs(z - 2) < 0.25) + { + log_gamma_value = log_gamma_near_1(T(zz - 2), pol) + log(zz - 1); + } + else if (z > -tools::root_epsilon()) + { + + + if (sign) + *sign = z < 0 ? -1 : 1; + return log(abs(gamma_imp(z, pol, lanczos::undefined_lanczos()))); + } + else + { + + + T g = gamma_imp(zz, pol, lanczos::undefined_lanczos()); + if (sign) + { + *sign = g < 0 ? -1 : 1; + } + log_gamma_value = log(abs(g)); + } + } + else + { + + T sum = scaled_tgamma_no_lanczos(zz, pol, true); + log_gamma_value = zz * (log(zz) - 1) + sum; + } + + int sign_of_result = 1; + + if(b_neg) + { + + + + + if(floor_of_z_is_equal_to_z) + return policies::raise_pole_error(function, "Evaluation of lgamma at a negative integer %1%.", z, pol); + + T t = sinpx(z); + + if(t < 0) + { + t = -t; + } + else + { + sign_of_result = -sign_of_result; + } + + log_gamma_value = - log_gamma_value + + log(boost::math::constants::pi()) + - log(t); + } + + if(sign != static_cast(0U)) { *sign = sign_of_result; } + + return log_gamma_value; +} + + + + + +template +T tgammap1m1_imp(T dz, Policy const& pol, const Lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename policies::precision::type precision_type; + + typedef std::integral_constant tag_type; + + T result; + if(dz < 0) + { + if(dz < -0.5) + { + + result = boost::math::tgamma(1+dz, pol) - 1; + ; + } + else + { + + result = boost::math::expm1(-boost::math::log1p(dz, pol) + + lgamma_small_imp(dz+2, dz + 1, dz, tag_type(), pol, l), pol); + ; + } + } + else + { + if(dz < 2) + { + + result = boost::math::expm1(lgamma_small_imp(dz+1, dz, dz-1, tag_type(), pol, l), pol); + ; + } + else + { + + result = boost::math::tgamma(1+dz, pol) - 1; + ; + } + } + + return result; +} + +template +inline T tgammap1m1_imp(T z, Policy const& pol, + const ::boost::math::lanczos::undefined_lanczos&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if(fabs(z) < 0.55) + { + return boost::math::expm1(log_gamma_near_1(z, pol)); + } + return boost::math::expm1(boost::math::lgamma(1 + z, pol)); +} + + + + +template +struct small_gamma2_series +{ + typedef T result_type; + + small_gamma2_series(T a_, T x_) : result(-x_), x(-x_), apn(a_+1), n(1){} + + T operator()() + { + T r = result / (apn); + result *= x; + result /= ++n; + apn += 1; + return r; + } + +private: + T result, x, apn; + int n; +}; + + + + +template +T full_igamma_prefix(T a, T z, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T prefix; + if (z > tools::max_value()) + return 0; + T alz = a * log(z); + + if(z >= 1) + { + if((alz < tools::log_max_value()) && (-z > tools::log_min_value())) + { + prefix = pow(z, a) * exp(-z); + } + else if(a >= 1) + { + prefix = pow(z / exp(z/a), a); + } + else + { + prefix = exp(alz - z); + } + } + else + { + if(alz > tools::log_min_value()) + { + prefix = pow(z, a) * exp(-z); + } + else if(z/a < tools::log_max_value()) + { + prefix = pow(z / exp(z/a), a); + } + else + { + prefix = exp(alz - z); + } + } + + + + + if((boost::math::fpclassify)(prefix) == (int) +# 860 "../../../../boost/math/special_functions/gamma.hpp" 3 + (0x0100 | 0x0400) +# 860 "../../../../boost/math/special_functions/gamma.hpp" + ) + return policies::raise_overflow_error("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol); + + return prefix; +} + + + + +template +T regularised_gamma_prefix(T a, T z, const Policy& pol, const Lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if (z >= tools::max_value()) + return 0; + T agh = a + static_cast(Lanczos::g()) - T(0.5); + T prefix; + T d = ((z - a) - static_cast(Lanczos::g()) + T(0.5)) / agh; + + if(a < 1) + { +# 890 "../../../../boost/math/special_functions/gamma.hpp" + if(z <= tools::log_min_value()) + { + + return exp(a * log(z) - z - lgamma_imp(a, pol, l)); + } + else + { + + + return pow(z, a) * exp(-z) / gamma_imp(a, pol, l); + } + } + else if((fabs(d*d*a) <= 100) && (a > 150)) + { + + prefix = a * boost::math::log1pmx(d, pol) + z * static_cast(0.5 - Lanczos::g()) / agh; + prefix = exp(prefix); + } + else + { + + + + + + T alz = a * log(z / agh); + T amz = a - z; + if(((std::min)(alz, amz) <= tools::log_min_value()) || ((std::max)(alz, amz) >= tools::log_max_value())) + { + T amza = amz / a; + if(((std::min)(alz, amz)/2 > tools::log_min_value()) && ((std::max)(alz, amz)/2 < tools::log_max_value())) + { + + T sq = pow(z / agh, a / 2) * exp(amz / 2); + prefix = sq * sq; + } + else if(((std::min)(alz, amz)/4 > tools::log_min_value()) && ((std::max)(alz, amz)/4 < tools::log_max_value()) && (z > a)) + { + + T sq = pow(z / agh, a / 4) * exp(amz / 4); + prefix = sq * sq; + prefix *= prefix; + } + else if((amza > tools::log_min_value()) && (amza < tools::log_max_value())) + { + prefix = pow((z * exp(amza)) / agh, a); + } + else + { + prefix = exp(alz + amz); + } + } + else + { + prefix = pow(z / agh, a) * exp(amz); + } + } + prefix *= sqrt(agh / boost::math::constants::e()) / Lanczos::lanczos_sum_expG_scaled(a); + return prefix; +} + + + +template +T regularised_gamma_prefix(T a, T z, const Policy& pol, const lanczos::undefined_lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if((a < 1) && (z < 1)) + { + + return pow(z, a) * exp(-z) / boost::math::tgamma(a, pol); + } + else if(a > minimum_argument_for_bernoulli_recursion()) + { + T scaled_gamma = scaled_tgamma_no_lanczos(a, pol); + T power_term = pow(z / a, a / 2); + T a_minus_z = a - z; + if ((0 == power_term) || (fabs(a_minus_z) > tools::log_max_value())) + { + + return exp(a * log(z / a) + a_minus_z - log(scaled_gamma)); + } + return (power_term * exp(a_minus_z)) * (power_term / scaled_gamma); + } + else + { + + + + + const int min_z = minimum_argument_for_bernoulli_recursion(); + long shift = 1 + ltrunc(min_z - a); + T result = regularised_gamma_prefix(T(a + shift), z, pol, l); + if (result != 0) + { + for (long i = 0; i < shift; ++i) + { + result /= z; + result *= a + i; + } + return result; + } + else + { + + + + + + T scaled_gamma = scaled_tgamma_no_lanczos(T(a + shift), pol); + T power_term_1 = pow(z / (a + shift), a); + T power_term_2 = pow(a + shift, -shift); + T power_term_3 = exp(a + shift - z); + if ((0 == power_term_1) || (0 == power_term_2) || (0 == power_term_3) || (fabs(a + shift - z) > tools::log_max_value())) + { + + + return exp(a * log(z) - z - boost::math::lgamma(a, pol)); + } + result = power_term_1 * power_term_2 * power_term_3 / scaled_gamma; + for (long i = 0; i < shift; ++i) + { + result *= a + i; + } + return result; + } + } +} + + + +template +inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool invert = false, T* pderivative = 0) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + T result; + result = boost::math::tgamma1pm1(a, pol); + if(pgam) + *pgam = (result + 1) / a; + T p = boost::math::powm1(x, a, pol); + result -= p; + result /= a; + detail::small_gamma2_series s(a, x); + std::uintmax_t max_iter = policies::get_max_series_iterations() - 10; + p += 1; + if(pderivative) + *pderivative = p / (*pgam * exp(x)); + T init_value = invert ? *pgam : 0; + result = -p * tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, (init_value - result) / p); + policies::check_series_iterations("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol); + if(invert) + result = -result; + return result; +} + + + +template +inline T finite_gamma_q(T a, T x, Policy const& pol, T* pderivative = 0) +{ + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T e = exp(-x); + T sum = e; + if(sum != 0) + { + T term = sum; + for(unsigned n = 1; n < a; ++n) + { + term /= n; + term *= x; + sum += term; + } + } + if(pderivative) + { + *pderivative = e * pow(x, a) / boost::math::unchecked_factorial(itrunc(T(a - 1), pol)); + } + return sum; +} + + + +template +T finite_half_gamma_q(T a, T x, T* p_derivative, const Policy& pol) +{ + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T e = boost::math::erfc(sqrt(x), pol); + if((e != 0) && (a > 1)) + { + T term = exp(-x) / sqrt(constants::pi() * x); + term *= x; + static const T half = T(1) / 2; + term /= half; + T sum = term; + for(unsigned n = 2; n < a; ++n) + { + term /= n - half; + term *= x; + sum += term; + } + e += sum; + if(p_derivative) + { + *p_derivative = 0; + } + } + else if(p_derivative) + { + + *p_derivative = sqrt(x) * exp(-x) / constants::root_pi(); + } + return e; +} + + + +template +struct incomplete_tgamma_large_x_series +{ + typedef T result_type; + incomplete_tgamma_large_x_series(const T& a, const T& x) + : a_poch(a - 1), z(x), term(1) {} + T operator()() + { + T result = term; + term *= a_poch / z; + a_poch -= 1; + return result; + } + T a_poch, z, term; +}; + +template +T incomplete_tgamma_large_x(const T& a, const T& x, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + incomplete_tgamma_large_x_series s(a, x); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); + boost::math::policies::check_series_iterations("boost::math::tgamma<%1%>(%1%,%1%)", max_iter, pol); + return result; +} + + + + + +template +T gamma_incomplete_imp(T a, T x, bool normalised, bool invert, + const Policy& pol, T* p_derivative) +{ + static const char* function = "boost::math::gamma_p<%1%>(%1%, %1%)"; + if(a <= 0) + return policies::raise_domain_error(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol); + if(x < 0) + return policies::raise_domain_error(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol); + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename lanczos::lanczos::type lanczos_type; + + T result = 0; + + if(a >= max_factorial::value && !normalised) + { +# 1175 "../../../../boost/math/special_functions/gamma.hpp" + if(invert && (a * 4 < x)) + { + + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + result += log(upper_gamma_fraction(a, x, policies::get_epsilon())); + } + else if(!invert && (a > 4 * x)) + { + + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + T init_value = 0; + result += log(detail::lower_gamma_series(a, x, pol, init_value) / a); + } + else + { + result = gamma_incomplete_imp(a, x, true, invert, pol, p_derivative); + if(result == 0) + { + if(invert) + { + + result = 1 + 1 / (12 * a) + 1 / (288 * a * a); + result = log(result) - a + (a - 0.5f) * log(a) + log(boost::math::constants::root_two_pi()); + if(p_derivative) + *p_derivative = exp(a * log(x) - x); + } + else + { + + + + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + T init_value = 0; + result += log(detail::lower_gamma_series(a, x, pol, init_value) / a); + } + } + else + { + result = log(result) + boost::math::lgamma(a, pol); + } + } + if(result > tools::log_max_value()) + return policies::raise_overflow_error(function, 0, pol); + return exp(result); + } + + +# 1227 "../../../../boost/math/special_functions/gamma.hpp" 3 + (void) ((!!( +# 1227 "../../../../boost/math/special_functions/gamma.hpp" + (p_derivative == 0) || normalised +# 1227 "../../../../boost/math/special_functions/gamma.hpp" 3 + )) || (_assert( +# 1227 "../../../../boost/math/special_functions/gamma.hpp" + "(p_derivative == 0) || normalised" +# 1227 "../../../../boost/math/special_functions/gamma.hpp" 3 + ,"../../../../boost/math/special_functions/gamma.hpp",1227),0)) +# 1227 "../../../../boost/math/special_functions/gamma.hpp" + ; + + bool is_int, is_half_int; + bool is_small_a = (a < 30) && (a <= x + 1) && (x < tools::log_max_value()); + if(is_small_a) + { + T fa = floor(a); + is_int = (fa == a); + is_half_int = is_int ? false : (fabs(fa - a) == 0.5f); + } + else + { + is_int = is_half_int = false; + } + + int eval_method; + + if(is_int && (x > 0.6)) + { + + invert = !invert; + eval_method = 0; + } + else if(is_half_int && (x > 0.2)) + { + + invert = !invert; + eval_method = 1; + } + else if((x < tools::root_epsilon()) && (a > 1)) + { + eval_method = 6; + } + else if ((x > 1000) && ((a < x) || (fabs(a - 50) / x < 1))) + { + + invert = !invert; + eval_method = 7; + } + else if(x < 0.5) + { + + + + if(-0.4 / log(x) < a) + { + eval_method = 2; + } + else + { + eval_method = 3; + } + } + else if(x < 1.1) + { + + + + if(x * 0.75f < a) + { + eval_method = 2; + } + else + { + eval_method = 3; + } + } + else + { + + + + + + bool use_temme = false; + if(normalised && std::numeric_limits::is_specialized && (a > 20)) + { + T sigma = fabs((x-a)/a); + if((a > 200) && (policies::digits() <= 113)) + { +# 1315 "../../../../boost/math/special_functions/gamma.hpp" + if(20 / a > sigma * sigma) + use_temme = true; + } + else if(policies::digits() <= 64) + { + + + + if(sigma < 0.4) + use_temme = true; + } + } + if(use_temme) + { + eval_method = 5; + } + else + { +# 1341 "../../../../boost/math/special_functions/gamma.hpp" + if(x - (1 / (3 * x)) < a) + { + eval_method = 2; + } + else + { + eval_method = 4; + invert = !invert; + } + } + } + + switch(eval_method) + { + case 0: + { + result = finite_gamma_q(a, x, pol, p_derivative); + if(!normalised) + result *= boost::math::tgamma(a, pol); + break; + } + case 1: + { + result = finite_half_gamma_q(a, x, p_derivative, pol); + if(!normalised) + result *= boost::math::tgamma(a, pol); + if(p_derivative && (*p_derivative == 0)) + *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); + break; + } + case 2: + { + + result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol); + if(p_derivative) + *p_derivative = result; + if(result != 0) + { +# 1391 "../../../../boost/math/special_functions/gamma.hpp" + T init_value = 0; + bool optimised_invert = false; + if(invert) + { + init_value = (normalised ? 1 : boost::math::tgamma(a, pol)); + if(normalised || (result >= 1) || (tools::max_value() * result > init_value)) + { + init_value /= result; + if(normalised || (a < 1) || (tools::max_value() / a > init_value)) + { + init_value *= -a; + optimised_invert = true; + } + else + init_value = 0; + } + else + init_value = 0; + } + result *= detail::lower_gamma_series(a, x, pol, init_value) / a; + if(optimised_invert) + { + invert = false; + result = -result; + } + } + break; + } + case 3: + { + + invert = !invert; + T g; + result = tgamma_small_upper_part(a, x, pol, &g, invert, p_derivative); + invert = false; + if(normalised) + result /= g; + break; + } + case 4: + { + + result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol); + if(p_derivative) + *p_derivative = result; + if(result != 0) + result *= upper_gamma_fraction(a, x, policies::get_epsilon()); + break; + } + case 5: + { +# 1450 "../../../../boost/math/special_functions/gamma.hpp" + typedef typename policies::precision::type precision_type; + + typedef std::integral_constant tag_type; + + result = igamma_temme_large(a, x, pol, static_cast(0)); + if(x >= a) + invert = !invert; + if(p_derivative) + *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); + break; + } + case 6: + { + + + if(!normalised) + result = pow(x, a) / (a); + else + { + try + { + result = pow(x, a) / boost::math::tgamma(a + 1, pol); + } + catch (const std::overflow_error&) + { + result = 0; + } + } + result *= 1 - a * x / (a + 1); + if (p_derivative) + *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); + break; + } + case 7: + { + + + result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol); + if (p_derivative) + *p_derivative = result; + result /= x; + if (result != 0) + result *= incomplete_tgamma_large_x(a, x, pol); + break; + } + } + + if(normalised && (result > 1)) + result = 1; + if(invert) + { + T gam = normalised ? 1 : boost::math::tgamma(a, pol); + result = gam - result; + } + if(p_derivative) + { + + + + if((x < 1) && (tools::max_value() * x < *p_derivative)) + { + + *p_derivative = tools::max_value() / 2; + } + + *p_derivative /= x; + } + + return result; +} + + + + +template +T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const Lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if(z < tools::epsilon()) + { +# 1544 "../../../../boost/math/special_functions/gamma.hpp" + if(boost::math::max_factorial::value < delta) + { + T ratio = tgamma_delta_ratio_imp_lanczos(delta, T(boost::math::max_factorial::value - delta), pol, l); + ratio *= z; + ratio *= boost::math::unchecked_factorial(boost::math::max_factorial::value - 1); + return 1 / ratio; + } + else + { + return 1 / (z * boost::math::tgamma(z + delta, pol)); + } + } + T zgh = static_cast(z + Lanczos::g() - constants::half()); + T result; + if(z + delta == z) + { + if (fabs(delta / zgh) < boost::math::tools::epsilon()) + { + + + + + + result = exp(-delta); + } + else + + result = 1; + } + else + { + if(fabs(delta) < 10) + { + result = exp((constants::half() - z) * boost::math::log1p(delta / zgh, pol)); + } + else + { + result = pow(zgh / (zgh + delta), z - constants::half()); + } + + result *= Lanczos::lanczos_sum(z) / Lanczos::lanczos_sum(T(z + delta)); + } + result *= pow(constants::e() / (zgh + delta), delta); + return result; +} + + + +template +T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const lanczos::undefined_lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; +# 1604 "../../../../boost/math/special_functions/gamma.hpp" + long numerator_shift = 0; + long denominator_shift = 0; + const int min_z = minimum_argument_for_bernoulli_recursion(); + + if (min_z > z) + numerator_shift = 1 + ltrunc(min_z - z); + if (min_z > z + delta) + denominator_shift = 1 + ltrunc(min_z - z - delta); + + + + + if (numerator_shift == 0 && denominator_shift == 0) + { + T scaled_tgamma_num = scaled_tgamma_no_lanczos(z, pol); + T scaled_tgamma_denom = scaled_tgamma_no_lanczos(T(z + delta), pol); + T result = scaled_tgamma_num / scaled_tgamma_denom; + result *= exp(z * boost::math::log1p(-delta / (z + delta), pol)) * pow((delta + z) / constants::e(), -delta); + return result; + } + + + + + T zz = z + numerator_shift; + T dd = delta - (numerator_shift - denominator_shift); + T ratio = tgamma_delta_ratio_imp_lanczos(zz, dd, pol, l); + + + + + for (long long i = 0; i < numerator_shift; ++i) + { + ratio /= (z + i); + if (i < denominator_shift) + ratio *= (z + delta + i); + } + for (long long i = numerator_shift; i < denominator_shift; ++i) + { + ratio *= (z + delta + i); + } + return ratio; +} + +template +T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if((z <= 0) || (z + delta <= 0)) + { + + return boost::math::tgamma(z, pol) / boost::math::tgamma(z + delta, pol); + } + + if(floor(delta) == delta) + { + if(floor(z) == z) + { + + + + + if((z <= max_factorial::value) && (z + delta <= max_factorial::value)) + { + return unchecked_factorial((unsigned)itrunc(z, pol) - 1) / unchecked_factorial((unsigned)itrunc(T(z + delta), pol) - 1); + } + } + if(fabs(delta) < 20) + { + + + + if(delta == 0) + return 1; + if(delta < 0) + { + z -= 1; + T result = z; + while(0 != (delta += 1)) + { + z -= 1; + result *= z; + } + return result; + } + else + { + T result = 1 / z; + while(0 != (delta -= 1)) + { + z += 1; + result /= z; + } + return result; + } + } + } + typedef typename lanczos::lanczos::type lanczos_type; + return tgamma_delta_ratio_imp_lanczos(z, delta, pol, lanczos_type()); +} + +template +T tgamma_ratio_imp(T x, T y, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if((x <= 0) || (boost::math::isinf)(x)) + return policies::raise_domain_error("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got a=%1%).", x, pol); + if((y <= 0) || (boost::math::isinf)(y)) + return policies::raise_domain_error("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", y, pol); + + if(x <= tools::min_value()) + { + + T shift = ldexp(T(1), tools::digits()); + return shift * tgamma_ratio_imp(T(x * shift), y, pol); + } + + if((x < max_factorial::value) && (y < max_factorial::value)) + { + + return boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + } + T prefix = 1; + if(x < 1) + { + if(y < 2 * max_factorial::value) + { + + + prefix /= x; + x += 1; + while(y >= max_factorial::value) + { + y -= 1; + prefix /= y; + } + return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + } + + + + return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol)); + } + if(y < 1) + { + if(x < 2 * max_factorial::value) + { + + + prefix *= y; + y += 1; + while(x >= max_factorial::value) + { + x -= 1; + prefix *= x; + } + return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + } + + + + return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol)); + } + + + + return boost::math::tgamma_delta_ratio(x, y - x, pol); +} + +template +T gamma_p_derivative_imp(T a, T x, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + if(a <= 0) + return policies::raise_domain_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol); + if(x < 0) + return policies::raise_domain_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol); + + + + if(x == 0) + { + return (a > 1) ? 0 : + (a == 1) ? 1 : policies::raise_overflow_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol); + } + + + + typedef typename lanczos::lanczos::type lanczos_type; + T f1 = detail::regularised_gamma_prefix(a, x, pol, lanczos_type()); + if((x < 1) && (tools::max_value() * x < f1)) + { + + return policies::raise_overflow_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol); + } + if(f1 == 0) + { + + f1 = a * log(x) - x - lgamma(a, pol) - log(x); + f1 = exp(f1); + } + else + f1 /= x; + + return f1; +} + +template +inline typename tools::promote_args::type + tgamma(T z, const Policy& , const std::true_type) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename lanczos::lanczos::type evaluation_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + return policies::checked_narrowing_cast(detail::gamma_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)"); +} + +template +struct igamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + + typedef std::integral_constant tag_type; + + do_init(tag_type()); + } + template + static void do_init(const std::integral_constant&) + { + + + + + if(std::numeric_limits::digits) + { + boost::math::gamma_p(static_cast(400), static_cast(400), Policy()); + } + } + static void do_init(const std::integral_constant&){} + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename igamma_initializer::init igamma_initializer::initializer; + +template +struct lgamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + + do_init(tag_type()); + } + static void do_init(const std::integral_constant&) + { + boost::math::lgamma(static_cast(2.5), Policy()); + boost::math::lgamma(static_cast(1.25), Policy()); + boost::math::lgamma(static_cast(1.75), Policy()); + } + static void do_init(const std::integral_constant&) + { + boost::math::lgamma(static_cast(2.5), Policy()); + boost::math::lgamma(static_cast(1.25), Policy()); + boost::math::lgamma(static_cast(1.5), Policy()); + boost::math::lgamma(static_cast(1.75), Policy()); + } + static void do_init(const std::integral_constant&) + { + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename lgamma_initializer::init lgamma_initializer::initializer; + +template +inline typename tools::promote_args::type + tgamma(T1 a, T2 z, const Policy&, const std::false_type) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + igamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::gamma_incomplete_imp(static_cast(a), + static_cast(z), false, true, + forwarding_policy(), static_cast(0)), "boost::math::tgamma<%1%>(%1%, %1%)"); +} + +template +inline typename tools::promote_args::type + tgamma(T1 a, T2 z, const std::false_type& tag) +{ + return tgamma(a, z, policies::policy<>(), tag); +} + + +} + +export template +inline typename tools::promote_args::type + tgamma(T z) +{ + return tgamma(z, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + lgamma(T z, int* sign, const Policy&) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename lanczos::lanczos::type evaluation_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::lgamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::lgamma_imp(static_cast(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)"); +} + +export template +inline typename tools::promote_args::type + lgamma(T z, int* sign) +{ + return lgamma(z, sign, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + lgamma(T x, const Policy& pol) +{ + return ::boost::math::lgamma(x, 0, pol); +} + +export template +inline typename tools::promote_args::type + lgamma(T x) +{ + return ::boost::math::lgamma(x, 0, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + tgamma1pm1(T z, const Policy& ) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename lanczos::lanczos::type evaluation_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + return policies::checked_narrowing_cast::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)"); +} + +export template +inline typename tools::promote_args::type + tgamma1pm1(T z) +{ + return tgamma1pm1(z, policies::policy<>()); +} + + + + +export template +inline typename tools::promote_args::type + tgamma(T1 a, T2 z) +{ + + + + + typedef typename policies::is_policy::type maybe_policy; + return detail::tgamma(a, z, maybe_policy()); +} +export template +inline typename tools::promote_args::type + tgamma(T1 a, T2 z, const Policy& pol) +{ + return detail::tgamma(a, z, pol, std::false_type()); +} + + + +export template +inline typename tools::promote_args::type + tgamma_lower(T1 a, T2 z, const Policy&) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::igamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::gamma_incomplete_imp(static_cast(a), + static_cast(z), false, false, + forwarding_policy(), static_cast(0)), "tgamma_lower<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + tgamma_lower(T1 a, T2 z) +{ + return tgamma_lower(a, z, policies::policy<>()); +} + + + +export template +inline typename tools::promote_args::type + gamma_q(T1 a, T2 z, const Policy& ) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::igamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::gamma_incomplete_imp(static_cast(a), + static_cast(z), true, true, + forwarding_policy(), static_cast(0)), "gamma_q<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + gamma_q(T1 a, T2 z) +{ + return gamma_q(a, z, policies::policy<>()); +} + + + +export template +inline typename tools::promote_args::type + gamma_p(T1 a, T2 z, const Policy&) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::igamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::gamma_incomplete_imp(static_cast(a), + static_cast(z), true, false, + forwarding_policy(), static_cast(0)), "gamma_p<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + gamma_p(T1 a, T2 z) +{ + return gamma_p(a, z, policies::policy<>()); +} + + +export template +inline typename tools::promote_args::type + tgamma_delta_ratio(T1 z, T2 delta, const Policy& ) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + return policies::checked_narrowing_cast(detail::tgamma_delta_ratio_imp(static_cast(z), static_cast(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + tgamma_delta_ratio(T1 z, T2 delta) +{ + return tgamma_delta_ratio(z, delta, policies::policy<>()); +} +export template +inline typename tools::promote_args::type + tgamma_ratio(T1 a, T2 b, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + return policies::checked_narrowing_cast(detail::tgamma_ratio_imp(static_cast(a), static_cast(b), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + tgamma_ratio(T1 a, T2 b) +{ + return tgamma_ratio(a, b, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + gamma_p_derivative(T1 a, T2 x, const Policy&) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + return policies::checked_narrowing_cast(detail::gamma_p_derivative_imp(static_cast(a), static_cast(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + gamma_p_derivative(T1 a, T2 x) +{ + return gamma_p_derivative(a, x, policies::policy<>()); +} + +} +} + + + + + +# 1 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" 1 +# 13 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" +# 1 "../../../../boost/math/tools/tuple.hpp" 1 +# 9 "../../../../boost/math/tools/tuple.hpp" +# 1 "../../../../boost/math/tools/cxx03_warn.hpp" 1 +# 10 "../../../../boost/math/tools/tuple.hpp" 2 + + +namespace boost{ namespace math{ + +using ::std::tuple; + + +using ::std::ignore; +using ::std::make_tuple; +using ::std::tie; +using ::std::get; + + +using ::std::tuple_size; +using ::std::tuple_element; + +}} +# 14 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" 2 + + + + + + + +namespace boost{ namespace math{ + +namespace detail{ + +template +T find_inverse_s(T p, T q) +{ +# 36 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T t; + if(p < 0.5) + { + t = sqrt(-2 * log(p)); + } + else + { + t = sqrt(-2 * log(q)); + } + static const double a[4] = { 3.31125922108741, 11.6616720288968, 4.28342155967104, 0.213623493715853 }; + static const double b[5] = { 1, 6.61053765625462, 6.40691597760039, 1.27364489782223, 0.3611708101884203e-1 }; + T s = t - tools::evaluate_polynomial(a, t) / tools::evaluate_polynomial(b, t); + if(p < 0.5) + s = -s; + return s; +} + +template +T didonato_SN(T a, T x, unsigned N, T tolerance = 0) +{ +# 65 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + T sum = 1; + if(N >= 1) + { + T partial = x / (a + 1); + sum += partial; + for(unsigned i = 2; i <= N; ++i) + { + partial *= x / (a + i); + sum += partial; + if(partial < tolerance) + break; + } + } + return sum; +} + +template +inline T didonato_FN(T p, T a, T x, unsigned N, T tolerance, const Policy& pol) +{ +# 92 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T u = log(p) + boost::math::lgamma(a + 1, pol); + return exp((u + x - log(didonato_SN(a, x, N, tolerance))) / a); +} + +template +T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits) +{ +# 109 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result; + *p_has_10_digits = false; + + if(a == 1) + { + result = -log(q); + ; + } + else if(a < 1) + { + T g = boost::math::tgamma(a, pol); + T b = q * g; + ; + ; + if((b > 0.6) || ((b >= 0.45) && (a >= 0.3))) + { + + + + + + + + T u; + if((b * q > 1e-8) && (q > 1e-5)) + { + u = pow(p * g * a, 1 / a); + ; + } + else + { + u = exp((-q / a) - constants::euler()); + ; + } + result = u / (1 - (u / (a + 1))); + ; + } + else if((a < 0.3) && (b >= 0.35)) + { + + T t = exp(-constants::euler() - b); + T u = t * exp(t); + result = t * exp(u); + ; + } + else if((b > 0.15) || (a >= 0.3)) + { + + T y = -log(b); + T u = y - (1 - a) * log(y); + result = y - (1 - a) * log(u) - log(1 + (1 - a) / (1 + u)); + ; + } + else if (b > 0.1) + { + + T y = -log(b); + T u = y - (1 - a) * log(y); + result = y - (1 - a) * log(u) - log((u * u + 2 * (3 - a) * u + (2 - a) * (3 - a)) / (u * u + (5 - a) * u + 2)); + ; + } + else + { + + T y = -log(b); + T c1 = (a - 1) * log(y); + T c1_2 = c1 * c1; + T c1_3 = c1_2 * c1; + T c1_4 = c1_2 * c1_2; + T a_2 = a * a; + T a_3 = a_2 * a; + + T c2 = (a - 1) * (1 + c1); + T c3 = (a - 1) * (-(c1_2 / 2) + (a - 2) * c1 + (3 * a - 5) / 2); + T c4 = (a - 1) * ((c1_3 / 3) - (3 * a - 5) * c1_2 / 2 + (a_2 - 6 * a + 7) * c1 + (11 * a_2 - 46 * a + 47) / 6); + T c5 = (a - 1) * (-(c1_4 / 4) + + (11 * a - 17) * c1_3 / 6 + + (-3 * a_2 + 13 * a -13) * c1_2 + + (2 * a_3 - 25 * a_2 + 72 * a - 61) * c1 / 2 + + (25 * a_3 - 195 * a_2 + 477 * a - 379) / 12); + + T y_2 = y * y; + T y_3 = y_2 * y; + T y_4 = y_2 * y_2; + result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4); + ; + if(b < 1e-28f) + *p_has_10_digits = true; + } + } + else + { + + T s = find_inverse_s(p, q); + + ; + + T s_2 = s * s; + T s_3 = s_2 * s; + T s_4 = s_2 * s_2; + T s_5 = s_4 * s; + T ra = sqrt(a); + + ; + + T w = a + s * ra + (s * s -1) / 3; + w += (s_3 - 7 * s) / (36 * ra); + w -= (3 * s_4 + 7 * s_2 - 16) / (810 * a); + w += (9 * s_5 + 256 * s_3 - 433 * s) / (38880 * a * ra); + + ; + + if((a >= 500) && (fabs(1 - w / a) < 1e-6)) + { + result = w; + *p_has_10_digits = true; + ; + } + else if (p > 0.5) + { + if(w < 3 * a) + { + result = w; + ; + } + else + { + T D = (std::max)(T(2), T(a * (a - 1))); + T lg = boost::math::lgamma(a, pol); + T lb = log(q) + lg; + if(lb < -D * 2.3) + { + + T y = -lb; + T c1 = (a - 1) * log(y); + T c1_2 = c1 * c1; + T c1_3 = c1_2 * c1; + T c1_4 = c1_2 * c1_2; + T a_2 = a * a; + T a_3 = a_2 * a; + + T c2 = (a - 1) * (1 + c1); + T c3 = (a - 1) * (-(c1_2 / 2) + (a - 2) * c1 + (3 * a - 5) / 2); + T c4 = (a - 1) * ((c1_3 / 3) - (3 * a - 5) * c1_2 / 2 + (a_2 - 6 * a + 7) * c1 + (11 * a_2 - 46 * a + 47) / 6); + T c5 = (a - 1) * (-(c1_4 / 4) + + (11 * a - 17) * c1_3 / 6 + + (-3 * a_2 + 13 * a -13) * c1_2 + + (2 * a_3 - 25 * a_2 + 72 * a - 61) * c1 / 2 + + (25 * a_3 - 195 * a_2 + 477 * a - 379) / 12); + + T y_2 = y * y; + T y_3 = y_2 * y; + T y_4 = y_2 * y_2; + result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4); + ; + } + else + { + + T u = -lb + (a - 1) * log(w) - log(1 + (1 - a) / (1 + w)); + result = -lb + (a - 1) * log(u) - log(1 + (1 - a) / (1 + u)); + ; + } + } + } + else + { + T z = w; + T ap1 = a + 1; + T ap2 = a + 2; + if(w < 0.15f * ap1) + { + + T v = log(p) + boost::math::lgamma(ap1, pol); + z = exp((v + w) / a); + s = boost::math::log1p(z / ap1 * (1 + z / ap2), pol); + z = exp((v + z - s) / a); + s = boost::math::log1p(z / ap1 * (1 + z / ap2), pol); + z = exp((v + z - s) / a); + s = boost::math::log1p(z / ap1 * (1 + z / ap2 * (1 + z / (a + 3))), pol); + z = exp((v + z - s) / a); + ; + } + + if((z <= 0.01 * ap1) || (z > 0.7 * ap1)) + { + result = z; + if(z <= 0.002 * ap1) + *p_has_10_digits = true; + ; + } + else + { + + T ls = log(didonato_SN(a, z, 100, T(1e-4))); + T v = log(p) + boost::math::lgamma(ap1, pol); + z = exp((v + z - ls) / a); + result = z * (1 - (a * log(z) - z - v + ls) / (a - z)); + + ; + } + } + } + return result; +} + +template +struct gamma_p_inverse_func +{ + gamma_p_inverse_func(T a_, T p_, bool inv) : a(a_), p(p_), invert(inv) + { +# 331 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + if(p > 0.9) + { + p = 1 - p; + invert = !invert; + } + } + + boost::math::tuple operator()(const T& x)const + { + + + + + + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T f, f1; + value_type ft; + f = static_cast(boost::math::detail::gamma_incomplete_imp( + static_cast(a), + static_cast(x), + true, invert, + forwarding_policy(), &ft)); + f1 = static_cast(ft); + T f2; + T div = (a - x - 1) / x; + f2 = f1; + if((fabs(div) > 1) && (tools::max_value() / fabs(div) < f2)) + { + + f2 = -tools::max_value() / 2; + } + else + { + f2 *= div; + } + + if(invert) + { + f1 = -f1; + f2 = -f2; + } + + return boost::math::make_tuple(static_cast(f - p), f1, f2); + } +private: + T a, p; + bool invert; +}; + +template +T gamma_p_inv_imp(T a, T p, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::gamma_p_inv<%1%>(%1%, %1%)"; + + ; + ; + + if(a <= 0) + return policies::raise_domain_error(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol); + if((p < 0) || (p > 1)) + return policies::raise_domain_error(function, "Probability must be in the range [0,1] in the incomplete gamma function inverse (got p=%1%).", p, pol); + if(p == 1) + return policies::raise_overflow_error(function, 0, Policy()); + if(p == 0) + return 0; + bool has_10_digits; + T guess = detail::find_inverse_gamma(a, p, 1 - p, pol, &has_10_digits); + if((policies::digits() <= 36) && has_10_digits) + return guess; + T lower = tools::min_value(); + if(guess <= lower) + guess = tools::min_value(); + ; + + + + + + + unsigned digits = policies::digits(); + if(digits < 30) + { + digits *= 2; + digits /= 3; + } + else + { + digits /= 2; + digits -= 1; + } + if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon()))) + digits = policies::digits() - 2; + + + + std::uintmax_t max_iter = policies::get_max_root_iterations(); + guess = tools::halley_iterate( + detail::gamma_p_inverse_func(a, p, false), + guess, + lower, + tools::max_value(), + digits, + max_iter); + policies::check_root_iterations(function, max_iter, pol); + ; + if(guess == lower) + guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); + return guess; +} + +template +T gamma_q_inv_imp(T a, T q, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::gamma_q_inv<%1%>(%1%, %1%)"; + + if(a <= 0) + return policies::raise_domain_error(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol); + if((q < 0) || (q > 1)) + return policies::raise_domain_error(function, "Probability must be in the range [0,1] in the incomplete gamma function inverse (got q=%1%).", q, pol); + if(q == 0) + return policies::raise_overflow_error(function, 0, Policy()); + if(q == 1) + return 0; + bool has_10_digits; + T guess = detail::find_inverse_gamma(a, 1 - q, q, pol, &has_10_digits); + if((policies::digits() <= 36) && has_10_digits) + return guess; + T lower = tools::min_value(); + if(guess <= lower) + guess = tools::min_value(); + + + + + + + unsigned digits = policies::digits(); + if(digits < 30) + { + digits *= 2; + digits /= 3; + } + else + { + digits /= 2; + digits -= 1; + } + if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon()))) + digits = policies::digits(); + + + + std::uintmax_t max_iter = policies::get_max_root_iterations(); + guess = tools::halley_iterate( + detail::gamma_p_inverse_func(a, q, true), + guess, + lower, + tools::max_value(), + digits, + max_iter); + policies::check_root_iterations(function, max_iter, pol); + if(guess == lower) + guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); + return guess; +} + +} + +export template +inline typename tools::promote_args::type + gamma_p_inv(T1 a, T2 p, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::gamma_p_inv_imp( + static_cast(a), + static_cast(p), pol); +} + +export template +inline typename tools::promote_args::type + gamma_q_inv(T1 a, T2 p, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::gamma_q_inv_imp( + static_cast(a), + static_cast(p), pol); +} + +export template +inline typename tools::promote_args::type + gamma_p_inv(T1 a, T2 p) +{ + return gamma_p_inv(a, p, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + gamma_q_inv(T1 a, T2 p) +{ + return gamma_q_inv(a, p, policies::policy<>()); +} + +} +} +# 2216 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/detail/gamma_inva.hpp" 1 +# 25 "../../../../boost/math/special_functions/detail/gamma_inva.hpp" +namespace boost{ namespace math{ namespace detail{ + +template +struct gamma_inva_t +{ + gamma_inva_t(T z_, T p_, bool invert_) : z(z_), p(p_), invert(invert_) {} + T operator()(T a) + { + return invert ? p - boost::math::gamma_q(a, z, Policy()) : boost::math::gamma_p(a, z, Policy()) - p; + } +private: + T z, p; + bool invert; +}; + +template +T inverse_poisson_cornish_fisher(T lambda, T p, T q, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T m = lambda; + + T sigma = sqrt(lambda); + + T sk = 1 / sigma; + + + + T x = boost::math::erfc_inv(p > q ? 2 * q : 2 * p, pol) * constants::root_two(); + + if(p < 0.5) + x = -x; + T x2 = x * x; + + T w = x + sk * (x2 - 1) / 6; + + + + + + + + w = m + sigma * w; + return w > tools::min_value() ? w : tools::min_value(); +} + +template +T gamma_inva_imp(const T& z, const T& p, const T& q, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + if(p == 0) + { + return policies::raise_overflow_error("boost::math::gamma_p_inva<%1%>(%1%, %1%)", 0, Policy()); + } + if(q == 0) + { + return tools::min_value(); + } + + + + + gamma_inva_t f(z, (p < q) ? p : q, (p < q) ? false : true); + + + + tools::eps_tolerance tol(policies::digits()); + + + + + + + + T guess; + T factor = 8; + if(z >= 1) + { +# 114 "../../../../boost/math/special_functions/detail/gamma_inva.hpp" + guess = 1 + inverse_poisson_cornish_fisher(z, q, p, pol); + if(z > 5) + { + if(z > 1000) + factor = 1.01f; + else if(z > 50) + factor = 1.1f; + else if(guess > 10) + factor = 1.25f; + else + factor = 2; + if(guess < 1.1) + factor = 8; + } + } + else if(z > 0.5) + { + guess = z * 1.2f; + } + else + { + guess = -0.4f / log(z); + } + + + + std::uintmax_t max_iter = policies::get_max_root_iterations(); + + + + + + + std::pair r = bracket_and_solve_root(f, guess, factor, false, tol, max_iter, pol); + if(max_iter >= policies::get_max_root_iterations()) + return policies::raise_evaluation_error("boost::math::gamma_p_inva<%1%>(%1%, %1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol); + return (r.first + r.second) / 2; +} + +} + +export template +inline typename tools::promote_args::type + gamma_p_inva(T1 x, T2 p, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + if(p == 0) + { + policies::raise_overflow_error("boost::math::gamma_p_inva<%1%>(%1%, %1%)", 0, Policy()); + } + if(p == 1) + { + return tools::min_value(); + } + + return policies::checked_narrowing_cast( + detail::gamma_inva_imp( + static_cast(x), + static_cast(p), + static_cast(1 - static_cast(p)), + pol), "boost::math::gamma_p_inva<%1%>(%1%, %1%)"); +} + +export template +inline typename tools::promote_args::type + gamma_q_inva(T1 x, T2 q, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + if(q == 1) + { + policies::raise_overflow_error("boost::math::gamma_q_inva<%1%>(%1%, %1%)", 0, Policy()); + } + if(q == 0) + { + return tools::min_value(); + } + + return policies::checked_narrowing_cast( + detail::gamma_inva_imp( + static_cast(x), + static_cast(1 - static_cast(q)), + static_cast(q), + pol), "boost::math::gamma_q_inva<%1%>(%1%, %1%)"); +} + +export template +inline typename tools::promote_args::type + gamma_p_inva(T1 x, T2 p) +{ + return boost::math::gamma_p_inva(x, p, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + gamma_q_inva(T1 x, T2 q) +{ + return boost::math::gamma_q_inva(x, q, policies::policy<>()); +} + +} +} +# 2217 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/erf.hpp" 1 +# 32 "../../../../boost/math/special_functions/erf.hpp" +namespace boost{ namespace math{ + +namespace detail +{ + + + + +template +struct erf_asympt_series_t +{ + erf_asympt_series_t(T z) : xx(2 * -z * z), tk(1) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + result = -exp(-z * z) / sqrt(boost::math::constants::pi()); + result /= z; + } + + typedef T result_type; + + T operator()() + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T r = result; + result *= tk / xx; + tk += 2; + if( fabs(r) < fabs(result)) + result = 0; + return r; + } +private: + T result; + T xx; + int tk; +}; + + + +template +inline float erf_asymptotic_limit_N(const T&) +{ + return (std::numeric_limits::max)(); +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 2.8F; +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 4.3F; +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 4.8F; +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 6.5F; +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 6.8F; +} + +template +inline T erf_asymptotic_limit() +{ + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + return erf_asymptotic_limit_N(tag_type()); +} + +template +struct erf_series_near_zero +{ + typedef T result_type; + T term; + T zz; + int k; + erf_series_near_zero(const T& z) : term(z), zz(-z * z), k(0) {} + + T operator()() + { + T result = term / (2 * k + 1); + term *= zz / ++k; + return result; + } +}; + +template +T erf_series_near_zero_sum(const T& x, const Policy& pol) +{ + + + + + erf_series_near_zero sum(x); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + T result = constants::two_div_root_pi() * tools::kahan_sum_series(sum, tools::digits(), max_iter); + policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); + return result; +} + +template +T erf_imp(T z, bool invert, const Policy& pol, const Tag& t) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + ; + + if(z < 0) + { + if(!invert) + return -erf_imp(T(-z), invert, pol, t); + else + return 1 + erf_imp(T(-z), false, pol, t); + } + + T result; + + if(!invert && (z > detail::erf_asymptotic_limit())) + { + detail::erf_asympt_series_t s(z); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter, 1); + policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); + } + else + { + T x = z * z; + if(z < 1.3f) + { + + + + result = erf_series_near_zero_sum(z, pol); + } + else if(x > 1 / tools::epsilon()) + { + + invert = !invert; + result = exp(-x) / (constants::root_pi() * z); + } + else + { + + invert = !invert; + result = z * exp(-x); + result /= boost::math::constants::root_pi(); + result *= upper_gamma_fraction(T(0.5f), x, policies::get_epsilon()); + } + } + if(invert) + result = 1 - result; + return result; +} + +template +T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant& t) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + ; + + if ((boost::math::isnan)(z)) + return policies::raise_denorm_error("boost::math::erf<%1%>(%1%)", "Expected a finite argument but got %1%", z, pol); + + if(z < 0) + { + if(!invert) + return -erf_imp(T(-z), invert, pol, t); + else if(z < -0.5) + return 2 - erf_imp(T(-z), invert, pol, t); + else + return 1 + erf_imp(T(-z), false, pol, t); + } + + T result; + + + + + + + if(z < 0.5) + { + + + + if(z < 1e-10) + { + if(z == 0) + { + result = T(0); + } + else + { + static const T c = boost::math::tools::make_big_value( 0.003379167095512573896158903121545171688, "0.003379167095512573896158903121545171688", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + result = static_cast(z * 1.125f + z * c); + } + } + else + { + + + + + + static const T Y = 1.044948577880859375f; + static const T P[] = { + boost::math::tools::make_big_value( 0.0834305892146531832907, "0.0834305892146531832907", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.338165134459360935041, "-0.338165134459360935041", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0509990735146777432841, "-0.0509990735146777432841", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00772758345802133288487, "-0.00772758345802133288487", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000322780120964605683831, "-0.000322780120964605683831", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.455004033050794024546, "0.455004033050794024546", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0875222600142252549554, "0.0875222600142252549554", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00858571925074406212772, "0.00858571925074406212772", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000370900071787748000569, "0.000370900071787748000569", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + T zz = z * z; + result = z * (Y + tools::evaluate_polynomial(P, zz) / tools::evaluate_polynomial(Q, zz)); + } + } + else if(invert ? (z < 28) : (z < 5.93f)) + { + + + + invert = !invert; + if(z < 1.5f) + { + + + + + static const T Y = 0.405935764312744140625f; + static const T P[] = { + boost::math::tools::make_big_value( -0.098090592216281240205, "-0.098090592216281240205", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.178114665841120341155, "0.178114665841120341155", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.191003695796775433986, "0.191003695796775433986", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0888900368967884466578, "0.0888900368967884466578", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0195049001251218801359, "0.0195049001251218801359", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00180424538297014223957, "0.00180424538297014223957", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.84759070983002217845, "1.84759070983002217845", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.42628004845511324508, "1.42628004845511324508", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.578052804889902404909, "0.578052804889902404909", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.12385097467900864233, "0.12385097467900864233", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0113385233577001411017, "0.0113385233577001411017", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.337511472483094676155e-5, "0.337511472483094676155e-5", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + ; + ; + ; + ; + result = Y + tools::evaluate_polynomial(P, T(z - 0.5)) / tools::evaluate_polynomial(Q, T(z - 0.5)); + ; + result *= exp(-z * z) / z; + ; + } + else if(z < 2.5f) + { + + + + + static const T Y = 0.50672817230224609375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0243500476207698441272, "-0.0243500476207698441272", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0386540375035707201728, "0.0386540375035707201728", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.04394818964209516296, "0.04394818964209516296", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0175679436311802092299, "0.0175679436311802092299", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00323962406290842133584, "0.00323962406290842133584", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000235839115596880717416, "0.000235839115596880717416", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.53991494948552447182, "1.53991494948552447182", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.982403709157920235114, "0.982403709157920235114", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.325732924782444448493, "0.325732924782444448493", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0563921837420478160373, "0.0563921837420478160373", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00410369723978904575884, "0.00410369723978904575884", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 1.5)) / tools::evaluate_polynomial(Q, T(z - 1.5)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 26)); + hi = ldexp(hi, expon - 26); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 4.5f) + { + + + + + static const T Y = 0.5405750274658203125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.00295276716530971662634, "0.00295276716530971662634", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0137384425896355332126, "0.0137384425896355332126", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00840807615555585383007, "0.00840807615555585383007", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00212825620914618649141, "0.00212825620914618649141", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000250269961544794627958, "0.000250269961544794627958", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113212406648847561139e-4, "0.113212406648847561139e-4", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.04217814166938418171, "1.04217814166938418171", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.442597659481563127003, "0.442597659481563127003", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0958492726301061423444, "0.0958492726301061423444", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0105982906484876531489, "0.0105982906484876531489", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000479411269521714493907, "0.000479411269521714493907", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 3.5)) / tools::evaluate_polynomial(Q, T(z - 3.5)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 26)); + hi = ldexp(hi, expon - 26); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else + { + + + + + static const T Y = 0.5579090118408203125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.00628057170626964891937, "0.00628057170626964891937", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0175389834052493308818, "0.0175389834052493308818", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.212652252872804219852, "-0.212652252872804219852", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.687717681153649930619, "-0.687717681153649930619", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.5518551727311523996, "-2.5518551727311523996", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.22729451764143718517, "-3.22729451764143718517", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.8175401114513378771, "-2.8175401114513378771", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.79257750980575282228, "2.79257750980575282228", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 11.0567237927800161565, "11.0567237927800161565", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 15.930646027911794143, "15.930646027911794143", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 22.9367376522880577224, "22.9367376522880577224", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 13.5064170191802889145, "13.5064170191802889145", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 5.48409182238641741584, "5.48409182238641741584", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 26)); + hi = ldexp(hi, expon - 26); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + } + else + { + + + + result = 0; + invert = !invert; + } + + if(invert) + { + result = 1 - result; + } + + return result; +} + + +template +T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant& t) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + ; + + if(z < 0) + { + if(!invert) + return -erf_imp(T(-z), invert, pol, t); + else if(z < -0.5) + return 2 - erf_imp(T(-z), invert, pol, t); + else + return 1 + erf_imp(T(-z), false, pol, t); + } + + T result; + + + + + + + if(z < 0.5) + { + + + + if(z == 0) + { + result = 0; + } + else if(z < 1e-10) + { + static const T c = boost::math::tools::make_big_value( 0.003379167095512573896158903121545171688, "0.003379167095512573896158903121545171688", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + result = z * 1.125 + z * c; + } + else + { + + + + + static const T Y = 1.044948577880859375f; + static const T P[] = { + boost::math::tools::make_big_value( 0.0834305892146531988966, "0.0834305892146531988966", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.338097283075565413695, "-0.338097283075565413695", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0509602734406067204596, "-0.0509602734406067204596", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00904906346158537794396, "-0.00904906346158537794396", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000489468651464798669181, "-0.000489468651464798669181", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.200305626366151877759e-4, "-0.200305626366151877759e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.455817300515875172439, "0.455817300515875172439", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0916537354356241792007, "0.0916537354356241792007", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0102722652675910031202, "0.0102722652675910031202", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000650511752687851548735, "0.000650511752687851548735", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.189532519105655496778e-4, "0.189532519105655496778e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z))); + } + } + else if(invert ? (z < 110) : (z < 6.6f)) + { + + + + invert = !invert; + if(z < 1.5) + { + + + + + static const T Y = 0.405935764312744140625f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0980905922162812031672, "-0.0980905922162812031672", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.159989089922969141329, "0.159989089922969141329", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.222359821619935712378, "0.222359821619935712378", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.127303921703577362312, "0.127303921703577362312", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0384057530342762400273, "0.0384057530342762400273", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00628431160851156719325, "0.00628431160851156719325", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000441266654514391746428, "0.000441266654514391746428", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.266689068336295642561e-7, "0.266689068336295642561e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.03237474985469469291, "2.03237474985469469291", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.78355454954969405222, "1.78355454954969405222", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.867940326293760578231, "0.867940326293760578231", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.248025606990021698392, "0.248025606990021698392", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0396649631833002269861, "0.0396649631833002269861", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00279220237309449026796, "0.00279220237309449026796", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 32)); + hi = ldexp(hi, expon - 32); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 2.5) + { + + + + + static const T Y = 0.50672817230224609375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.024350047620769840217, "-0.024350047620769840217", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0343522687935671451309, "0.0343522687935671451309", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0505420824305544949541, "0.0505420824305544949541", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0257479325917757388209, "0.0257479325917757388209", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00669349844190354356118, "0.00669349844190354356118", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00090807914416099524444, "0.00090807914416099524444", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.515917266698050027934e-4, "0.515917266698050027934e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.71657861671930336344, "1.71657861671930336344", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.26409634824280366218, "1.26409634824280366218", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.512371437838969015941, "0.512371437838969015941", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.120902623051120950935, "0.120902623051120950935", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0158027197831887485261, "0.0158027197831887485261", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000897871370778031611439, "0.000897871370778031611439", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 32)); + hi = ldexp(hi, expon - 32); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 4.5) + { + + + + + static const T Y = 0.5405750274658203125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.0029527671653097284033, "0.0029527671653097284033", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0141853245895495604051, "0.0141853245895495604051", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0104959584626432293901, "0.0104959584626432293901", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00343963795976100077626, "0.00343963795976100077626", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00059065441194877637899, "0.00059065441194877637899", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.523435380636174008685e-4, "0.523435380636174008685e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.189896043050331257262e-5, "0.189896043050331257262e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.19352160185285642574, "1.19352160185285642574", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.603256964363454392857, "0.603256964363454392857", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.165411142458540585835, "0.165411142458540585835", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0259729870946203166468, "0.0259729870946203166468", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00221657568292893699158, "0.00221657568292893699158", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.804149464190309799804e-4, "0.804149464190309799804e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 3.5f)) / tools::evaluate_polynomial(Q, T(z - 3.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 32)); + hi = ldexp(hi, expon - 32); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else + { + + + + + static const T Y = 0.55825519561767578125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.00593438793008050214106, "0.00593438793008050214106", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0280666231009089713937, "0.0280666231009089713937", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.141597835204583050043, "-0.141597835204583050043", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.978088201154300548842, "-0.978088201154300548842", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -5.47351527796012049443, "-5.47351527796012049443", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -13.8677304660245326627, "-13.8677304660245326627", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -27.1274948720539821722, "-27.1274948720539821722", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -29.2545152747009461519, "-29.2545152747009461519", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -16.8865774499799676937, "-16.8865774499799676937", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.72948911186645394541, "4.72948911186645394541", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 23.6750543147695749212, "23.6750543147695749212", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 60.0021517335693186785, "60.0021517335693186785", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 131.766251645149522868, "131.766251645149522868", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 178.167924971283482513, "178.167924971283482513", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 182.499390505915222699, "182.499390505915222699", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 104.365251479578577989, "104.365251479578577989", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 30.8365511891224291717, "30.8365511891224291717", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 32)); + hi = ldexp(hi, expon - 32); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + } + else + { + + + + result = 0; + invert = !invert; + } + + if(invert) + { + result = 1 - result; + } + + return result; +} + + +template +T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant& t) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + ; + + if(z < 0) + { + if(!invert) + return -erf_imp(T(-z), invert, pol, t); + else if(z < -0.5) + return 2 - erf_imp(T(-z), invert, pol, t); + else + return 1 + erf_imp(T(-z), false, pol, t); + } + + T result; + + + + + + + if(z < 0.5) + { + + + + if(z == 0) + { + result = 0; + } + else if(z < 1e-20) + { + static const T c = boost::math::tools::make_big_value( 0.003379167095512573896158903121545171688, "0.003379167095512573896158903121545171688", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + result = z * 1.125 + z * c; + } + else + { + + + + + static const T Y = 1.0841522216796875f; + static const T P[] = { + boost::math::tools::make_big_value( 0.0442269454158250738961589031215451778, "0.0442269454158250738961589031215451778", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.35549265736002144875335323556961233, "-0.35549265736002144875335323556961233", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0582179564566667896225454670863270393, "-0.0582179564566667896225454670863270393", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0112694696904802304229950538453123925, "-0.0112694696904802304229950538453123925", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000805730648981801146251825329609079099, "-0.000805730648981801146251825329609079099", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.566304966591936566229702842075966273e-4, "-0.566304966591936566229702842075966273e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.169655010425186987820201021510002265e-5, "-0.169655010425186987820201021510002265e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.344448249920445916714548295433198544e-7, "-0.344448249920445916714548295433198544e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.466542092785657604666906909196052522, "0.466542092785657604666906909196052522", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.100005087012526447295176964142107611, "0.100005087012526447295176964142107611", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0128341535890117646540050072234142603, "0.0128341535890117646540050072234142603", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00107150448466867929159660677016658186, "0.00107150448466867929159660677016658186", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.586168368028999183607733369248338474e-4, "0.586168368028999183607733369248338474e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.196230608502104324965623171516808796e-5, "0.196230608502104324965623171516808796e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.313388521582925207734229967907890146e-7, "0.313388521582925207734229967907890146e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z))); + } + } + else if(invert ? (z < 110) : (z < 8.65f)) + { + + + + invert = !invert; + if(z < 1) + { + + + + + static const T Y = 0.371877193450927734375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0640320213544647969396032886581290455, "-0.0640320213544647969396032886581290455", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.200769874440155895637857443946706731, "0.200769874440155895637857443946706731", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.378447199873537170666487408805779826, "0.378447199873537170666487408805779826", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.30521399466465939450398642044975127, "0.30521399466465939450398642044975127", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.146890026406815277906781824723458196, "0.146890026406815277906781824723458196", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0464837937749539978247589252732769567, "0.0464837937749539978247589252732769567", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00987895759019540115099100165904822903, "0.00987895759019540115099100165904822903", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00137507575429025512038051025154301132, "0.00137507575429025512038051025154301132", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0001144764551085935580772512359680516, "0.0001144764551085935580772512359680516", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.436544865032836914773944382339900079e-5, "0.436544865032836914773944382339900079e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.47651182872457465043733800302427977, "2.47651182872457465043733800302427977", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.78706486002517996428836400245547955, "2.78706486002517996428836400245547955", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.87295924621659627926365005293130693, "1.87295924621659627926365005293130693", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.829375825174365625428280908787261065, "0.829375825174365625428280908787261065", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.251334771307848291593780143950311514, "0.251334771307848291593780143950311514", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0522110268876176186719436765734722473, "0.0522110268876176186719436765734722473", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00718332151250963182233267040106902368, "0.00718332151250963182233267040106902368", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000595279058621482041084986219276392459, "0.000595279058621482041084986219276392459", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.226988669466501655990637599399326874e-4, "0.226988669466501655990637599399326874e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.270666232259029102353426738909226413e-10, "0.270666232259029102353426738909226413e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 1.5) + { + + + + + static const T Y = 0.45658016204833984375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0289965858925328393392496555094848345, "-0.0289965858925328393392496555094848345", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0868181194868601184627743162571779226, "0.0868181194868601184627743162571779226", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.169373435121178901746317404936356745, "0.169373435121178901746317404936356745", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.13350446515949251201104889028133486, "0.13350446515949251201104889028133486", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0617447837290183627136837688446313313, "0.0617447837290183627136837688446313313", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0185618495228251406703152962489700468, "0.0185618495228251406703152962489700468", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00371949406491883508764162050169531013, "0.00371949406491883508764162050169531013", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000485121708792921297742105775823900772, "0.000485121708792921297742105775823900772", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.376494706741453489892108068231400061e-4, "0.376494706741453489892108068231400061e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.133166058052466262415271732172490045e-5, "0.133166058052466262415271732172490045e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.32970330146503867261275580968135126, "2.32970330146503867261275580968135126", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.46325715420422771961250513514928746, "2.46325715420422771961250513514928746", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.55307882560757679068505047390857842, "1.55307882560757679068505047390857842", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.644274289865972449441174485441409076, "0.644274289865972449441174485441409076", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.182609091063258208068606847453955649, "0.182609091063258208068606847453955649", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0354171651271241474946129665801606795, "0.0354171651271241474946129665801606795", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00454060370165285246451879969534083997, "0.00454060370165285246451879969534083997", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000349871943711566546821198612518656486, "0.000349871943711566546821198612518656486", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.123749319840299552925421880481085392e-4, "0.123749319840299552925421880481085392e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 1.0f)) / tools::evaluate_polynomial(Q, T(z - 1.0f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 2.25) + { + + + + + static const T Y = 0.50250148773193359375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0201233630504573402185161184151016606, "-0.0201233630504573402185161184151016606", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0331864357574860196516686996302305002, "0.0331864357574860196516686996302305002", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0716562720864787193337475444413405461, "0.0716562720864787193337475444413405461", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0545835322082103985114927569724880658, "0.0545835322082103985114927569724880658", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0236692635189696678976549720784989593, "0.0236692635189696678976549720784989593", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00656970902163248872837262539337601845, "0.00656970902163248872837262539337601845", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00120282643299089441390490459256235021, "0.00120282643299089441390490459256235021", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000142123229065182650020762792081622986, "0.000142123229065182650020762792081622986", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.991531438367015135346716277792989347e-5, "0.991531438367015135346716277792989347e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.312857043762117596999398067153076051e-6, "0.312857043762117596999398067153076051e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.13506082409097783827103424943508554, "2.13506082409097783827103424943508554", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.06399257267556230937723190496806215, "2.06399257267556230937723190496806215", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.18678481279932541314830499880691109, "1.18678481279932541314830499880691109", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.447733186643051752513538142316799562, "0.447733186643051752513538142316799562", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.11505680005657879437196953047542148, "0.11505680005657879437196953047542148", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.020163993632192726170219663831914034, "0.020163993632192726170219663831914034", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00232708971840141388847728782209730585, "0.00232708971840141388847728782209730585", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000160733201627963528519726484608224112, "0.000160733201627963528519726484608224112", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.507158721790721802724402992033269266e-5, "0.507158721790721802724402992033269266e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.18647774409821470950544212696270639e-12, "0.18647774409821470950544212696270639e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if (z < 3) + { + + + + + static const T Y = 0.52896785736083984375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.00902152521745813634562524098263360074, "-0.00902152521745813634562524098263360074", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0145207142776691539346923710537580927, "0.0145207142776691539346923710537580927", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0301681239582193983824211995978678571, "0.0301681239582193983824211995978678571", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0215548540823305814379020678660434461, "0.0215548540823305814379020678660434461", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00864683476267958365678294164340749949, "0.00864683476267958365678294164340749949", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00219693096885585491739823283511049902, "0.00219693096885585491739823283511049902", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000364961639163319762492184502159894371, "0.000364961639163319762492184502159894371", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.388174251026723752769264051548703059e-4, "0.388174251026723752769264051548703059e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.241918026931789436000532513553594321e-5, "0.241918026931789436000532513553594321e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.676586625472423508158937481943649258e-7, "0.676586625472423508158937481943649258e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.93669171363907292305550231764920001, "1.93669171363907292305550231764920001", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.69468476144051356810672506101377494, "1.69468476144051356810672506101377494", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.880023580986436640372794392579985511, "0.880023580986436640372794392579985511", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.299099106711315090710836273697708402, "0.299099106711315090710836273697708402", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0690593962363545715997445583603382337, "0.0690593962363545715997445583603382337", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0108427016361318921960863149875360222, "0.0108427016361318921960863149875360222", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00111747247208044534520499324234317695, "0.00111747247208044534520499324234317695", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.686843205749767250666787987163701209e-4, "0.686843205749767250666787987163701209e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.192093541425429248675532015101904262e-5, "0.192093541425429248675532015101904262e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 2.25f)) / tools::evaluate_polynomial(Q, T(z - 2.25f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 3.5) + { + + + + + static const T Y = 0.54037380218505859375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0033703486408887424921155540591370375, "-0.0033703486408887424921155540591370375", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0104948043110005245215286678898115811, "0.0104948043110005245215286678898115811", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0148530118504000311502310457390417795, "0.0148530118504000311502310457390417795", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00816693029245443090102738825536188916, "0.00816693029245443090102738825536188916", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00249716579989140882491939681805594585, "0.00249716579989140882491939681805594585", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0004655591010047353023978045800916647, "0.0004655591010047353023978045800916647", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.531129557920045295895085236636025323e-4, "0.531129557920045295895085236636025323e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.343526765122727069515775194111741049e-5, "0.343526765122727069515775194111741049e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.971120407556888763695313774578711839e-7, "0.971120407556888763695313774578711839e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.59911256167540354915906501335919317, "1.59911256167540354915906501335919317", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.136006830764025173864831382946934, "1.136006830764025173864831382946934", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.468565867990030871678574840738423023, "0.468565867990030871678574840738423023", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.122821824954470343413956476900662236, "0.122821824954470343413956476900662236", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0209670914950115943338996513330141633, "0.0209670914950115943338996513330141633", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00227845718243186165620199012883547257, "0.00227845718243186165620199012883547257", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000144243326443913171313947613547085553, "0.000144243326443913171313947613547085553", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.407763415954267700941230249989140046e-5, "0.407763415954267700941230249989140046e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 3.0f)) / tools::evaluate_polynomial(Q, T(z - 3.0f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 5.5) + { + + + + + static const T Y = 0.55000019073486328125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.00118142849742309772151454518093813615, "0.00118142849742309772151454518093813615", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0072201822885703318172366893469382745, "0.0072201822885703318172366893469382745", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0078782276276860110721875733778481505, "0.0078782276276860110721875733778481505", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00418229166204362376187593976656261146, "0.00418229166204362376187593976656261146", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00134198400587769200074194304298642705, "0.00134198400587769200074194304298642705", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000283210387078004063264777611497435572, "0.000283210387078004063264777611497435572", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.405687064094911866569295610914844928e-4, "0.405687064094911866569295610914844928e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.39348283801568113807887364414008292e-5, "0.39348283801568113807887364414008292e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.248798540917787001526976889284624449e-6, "0.248798540917787001526976889284624449e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.929502490223452372919607105387474751e-8, "0.929502490223452372919607105387474751e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.156161469668275442569286723236274457e-9, "0.156161469668275442569286723236274457e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.52955245103668419479878456656709381, "1.52955245103668419479878456656709381", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.06263944820093830054635017117417064, "1.06263944820093830054635017117417064", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.441684612681607364321013134378316463, "0.441684612681607364321013134378316463", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.121665258426166960049773715928906382, "0.121665258426166960049773715928906382", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0232134512374747691424978642874321434, "0.0232134512374747691424978642874321434", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00310778180686296328582860464875562636, "0.00310778180686296328582860464875562636", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000288361770756174705123674838640161693, "0.000288361770756174705123674838640161693", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.177529187194133944622193191942300132e-4, "0.177529187194133944622193191942300132e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.655068544833064069223029299070876623e-6, "0.655068544833064069223029299070876623e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.11005507545746069573608988651927452e-7, "0.11005507545746069573608988651927452e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 4.5f)) / tools::evaluate_polynomial(Q, T(z - 4.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 7.5) + { + + + + + static const T Y = 0.5574436187744140625f; + static const T P[] = { + boost::math::tools::make_big_value( 0.000293236907400849056269309713064107674, "0.000293236907400849056269309713064107674", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00225110719535060642692275221961480162, "0.00225110719535060642692275221961480162", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00190984458121502831421717207849429799, "0.00190984458121502831421717207849429799", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000747757733460111743833929141001680706, "0.000747757733460111743833929141001680706", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000170663175280949889583158597373928096, "0.000170663175280949889583158597373928096", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.246441188958013822253071608197514058e-4, "0.246441188958013822253071608197514058e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.229818000860544644974205957895688106e-5, "0.229818000860544644974205957895688106e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.134886977703388748488480980637704864e-6, "0.134886977703388748488480980637704864e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.454764611880548962757125070106650958e-8, "0.454764611880548962757125070106650958e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.673002744115866600294723141176820155e-10, "0.673002744115866600294723141176820155e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.12843690320861239631195353379313367, "1.12843690320861239631195353379313367", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.569900657061622955362493442186537259, "0.569900657061622955362493442186537259", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.169094404206844928112348730277514273, "0.169094404206844928112348730277514273", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0324887449084220415058158657252147063, "0.0324887449084220415058158657252147063", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00419252877436825753042680842608219552, "0.00419252877436825753042680842608219552", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00036344133176118603523976748563178578, "0.00036344133176118603523976748563178578", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.204123895931375107397698245752850347e-4, "0.204123895931375107397698245752850347e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.674128352521481412232785122943508729e-6, "0.674128352521481412232785122943508729e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.997637501418963696542159244436245077e-8, "0.997637501418963696542159244436245077e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 6.5f)) / tools::evaluate_polynomial(Q, T(z - 6.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 11.5) + { + + + + + static const T Y = 0.56083202362060546875f; + static const T P[] = { + boost::math::tools::make_big_value( 0.000282420728751494363613829834891390121, "0.000282420728751494363613829834891390121", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00175387065018002823433704079355125161, "0.00175387065018002823433704079355125161", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0021344978564889819420775336322920375, "0.0021344978564889819420775336322920375", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00124151356560137532655039683963075661, "0.00124151356560137532655039683963075661", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000423600733566948018555157026862139644, "0.000423600733566948018555157026862139644", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.914030340865175237133613697319509698e-4, "0.914030340865175237133613697319509698e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.126999927156823363353809747017945494e-4, "0.126999927156823363353809747017945494e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.110610959842869849776179749369376402e-5, "0.110610959842869849776179749369376402e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.55075079477173482096725348704634529e-7, "0.55075079477173482096725348704634529e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119735694018906705225870691331543806e-8, "0.119735694018906705225870691331543806e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.69889613396167354566098060039549882, "1.69889613396167354566098060039549882", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.28824647372749624464956031163282674, "1.28824647372749624464956031163282674", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.572297795434934493541628008224078717, "0.572297795434934493541628008224078717", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.164157697425571712377043857240773164, "0.164157697425571712377043857240773164", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0315311145224594430281219516531649562, "0.0315311145224594430281219516531649562", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00405588922155632380812945849777127458, "0.00405588922155632380812945849777127458", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000336929033691445666232029762868642417, "0.000336929033691445666232029762868642417", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.164033049810404773469413526427932109e-4, "0.164033049810404773469413526427932109e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.356615210500531410114914617294694857e-6, "0.356615210500531410114914617294694857e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z / 2 - 4.75f)) / tools::evaluate_polynomial(Q, T(z / 2 - 4.75f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else + { + + + + + static const T Y = 0.5632686614990234375f; + static const T P[] = { + boost::math::tools::make_big_value( 0.000920922048732849448079451574171836943, "0.000920922048732849448079451574171836943", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00321439044532288750501700028748922439, "0.00321439044532288750501700028748922439", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.250455263029390118657884864261823431, "-0.250455263029390118657884864261823431", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.906807635364090342031792404764598142, "-0.906807635364090342031792404764598142", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -8.92233572835991735876688745989985565, "-8.92233572835991735876688745989985565", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -21.7797433494422564811782116907878495, "-21.7797433494422564811782116907878495", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -91.1451915251976354349734589601171659, "-91.1451915251976354349734589601171659", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -144.1279109655993927069052125017673, "-144.1279109655993927069052125017673", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -313.845076581796338665519022313775589, "-313.845076581796338665519022313775589", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -273.11378811923343424081101235736475, "-273.11378811923343424081101235736475", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -271.651566205951067025696102600443452, "-271.651566205951067025696102600443452", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -60.0530577077238079968843307523245547, "-60.0530577077238079968843307523245547", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.49040448075464744191022350947892036, "3.49040448075464744191022350947892036", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 34.3563592467165971295915749548313227, "34.3563592467165971295915749548313227", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 84.4993232033879023178285731843850461, "84.4993232033879023178285731843850461", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 376.005865281206894120659401340373818, "376.005865281206894120659401340373818", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 629.95369438888946233003926191755125, "629.95369438888946233003926191755125", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1568.35771983533158591604513304269098, "1568.35771983533158591604513304269098", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1646.02452040831961063640827116581021, "1646.02452040831961063640827116581021", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2299.96860633240298708910425594484895, "2299.96860633240298708910425594484895", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1222.73204392037452750381340219906374, "1222.73204392037452750381340219906374", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 799.359797306084372350264298361110448, "799.359797306084372350264298361110448", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 72.7415265778588087243442792401576737, "72.7415265778588087243442792401576737", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + } + else + { + + + + result = 0; + invert = !invert; + } + + if(invert) + { + result = 1 - result; + } + + return result; +} + +template +struct erf_initializer +{ + struct init + { + init() + { + do_init(tag()); + } + static void do_init(const std::integral_constant&){} + static void do_init(const std::integral_constant&) + { + boost::math::erf(static_cast(1e-12), Policy()); + boost::math::erf(static_cast(0.25), Policy()); + boost::math::erf(static_cast(1.25), Policy()); + boost::math::erf(static_cast(2.25), Policy()); + boost::math::erf(static_cast(4.25), Policy()); + boost::math::erf(static_cast(5.25), Policy()); + } + static void do_init(const std::integral_constant&) + { + boost::math::erf(static_cast(1e-12), Policy()); + boost::math::erf(static_cast(0.25), Policy()); + boost::math::erf(static_cast(1.25), Policy()); + boost::math::erf(static_cast(2.25), Policy()); + boost::math::erf(static_cast(4.25), Policy()); + boost::math::erf(static_cast(5.25), Policy()); + } + static void do_init(const std::integral_constant&) + { + boost::math::erf(static_cast(1e-22), Policy()); + boost::math::erf(static_cast(0.25), Policy()); + boost::math::erf(static_cast(1.25), Policy()); + boost::math::erf(static_cast(2.125), Policy()); + boost::math::erf(static_cast(2.75), Policy()); + boost::math::erf(static_cast(3.25), Policy()); + boost::math::erf(static_cast(5.25), Policy()); + boost::math::erf(static_cast(7.25), Policy()); + boost::math::erf(static_cast(11.25), Policy()); + boost::math::erf(static_cast(12.5), Policy()); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename erf_initializer::init erf_initializer::initializer; + +} + +export template +inline typename tools::promote_args::type erf(T z, const Policy& ) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + ; + ; + ; + + typedef std::integral_constant tag_type; + + ; + + detail::erf_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::erf_imp( + static_cast(z), + false, + forwarding_policy(), + tag_type()), "boost::math::erf<%1%>(%1%, %1%)"); +} + +export template +inline typename tools::promote_args::type erfc(T z, const Policy& ) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + ; + ; + ; + + typedef std::integral_constant tag_type; + + ; + + detail::erf_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::erf_imp( + static_cast(z), + true, + forwarding_policy(), + tag_type()), "boost::math::erfc<%1%>(%1%, %1%)"); +} + +export template +inline typename tools::promote_args::type erf(T z) +{ + return boost::math::erf(z, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type erfc(T z) +{ + return boost::math::erfc(z, policies::policy<>()); +} + +} +} + +# 1 "../../../../boost/math/special_functions/detail/erf_inv.hpp" 1 +# 20 "../../../../boost/math/special_functions/detail/erf_inv.hpp" +namespace boost{ namespace math{ + +namespace detail{ + + + + +template +T erf_inv_imp(const T& p, const T& q, const Policy&, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 0; + + if(p <= 0.5) + { +# 48 "../../../../boost/math/special_functions/detail/erf_inv.hpp" + static const float Y = 0.0891314744949340820313f; + static const T P[] = { + boost::math::tools::make_big_value( -0.000508781949658280665617, "-0.000508781949658280665617", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00836874819741736770379, "-0.00836874819741736770379", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0334806625409744615033, "0.0334806625409744615033", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0126926147662974029034, "-0.0126926147662974029034", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0365637971411762664006, "-0.0365637971411762664006", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0219878681111168899165, "0.0219878681111168899165", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00822687874676915743155, "0.00822687874676915743155", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00538772965071242932965, "-0.00538772965071242932965", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.970005043303290640362, "-0.970005043303290640362", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.56574558234175846809, "-1.56574558234175846809", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.56221558398423026363, "1.56221558398423026363", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.662328840472002992063, "0.662328840472002992063", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.71228902341542847553, "-0.71228902341542847553", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0527396382340099713954, "-0.0527396382340099713954", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0795283687341571680018, "0.0795283687341571680018", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00233393759374190016776, "-0.00233393759374190016776", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000886216390456424707504, "0.000886216390456424707504", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T g = p * (p + 10); + T r = tools::evaluate_polynomial(P, p) / tools::evaluate_polynomial(Q, p); + result = g * Y + g * r; + } + else if(q >= 0.25) + { +# 89 "../../../../boost/math/special_functions/detail/erf_inv.hpp" + static const float Y = 2.249481201171875f; + static const T P[] = { + boost::math::tools::make_big_value( -0.202433508355938759655, "-0.202433508355938759655", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.105264680699391713268, "0.105264680699391713268", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.37050328343119927838, "8.37050328343119927838", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 17.6447298408374015486, "17.6447298408374015486", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -18.8510648058714251895, "-18.8510648058714251895", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -44.6382324441786960818, "-44.6382324441786960818", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 17.445385985570866523, "17.445385985570866523", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 21.1294655448340526258, "21.1294655448340526258", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.67192254707729348546, "-3.67192254707729348546", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 6.24264124854247537712, "6.24264124854247537712", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.9713437953343869095, "3.9713437953343869095", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -28.6608180499800029974, "-28.6608180499800029974", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -20.1432634680485188801, "-20.1432634680485188801", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 48.5609213108739935468, "48.5609213108739935468", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 10.8268667355460159008, "10.8268667355460159008", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -22.6436933413139721736, "-22.6436933413139721736", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.72114765761200282724, "1.72114765761200282724", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T g = sqrt(-2 * log(q)); + T xs = q - 0.25f; + T r = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = g / (Y + r); + } + else + { +# 138 "../../../../boost/math/special_functions/detail/erf_inv.hpp" + T x = sqrt(-log(q)); + if(x < 3) + { + + static const float Y = 0.807220458984375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.131102781679951906451, "-0.131102781679951906451", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.163794047193317060787, "-0.163794047193317060787", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.117030156341995252019, "0.117030156341995252019", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.387079738972604337464, "0.387079738972604337464", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.337785538912035898924, "0.337785538912035898924", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.142869534408157156766, "0.142869534408157156766", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0290157910005329060432, "0.0290157910005329060432", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00214558995388805277169, "0.00214558995388805277169", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.679465575181126350155e-6, "-0.679465575181126350155e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.285225331782217055858e-7, "0.285225331782217055858e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.681149956853776992068e-9, "-0.681149956853776992068e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.46625407242567245975, "3.46625407242567245975", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 5.38168345707006855425, "5.38168345707006855425", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.77846592945843778382, "4.77846592945843778382", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.59301921623620271374, "2.59301921623620271374", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.848854343457902036425, "0.848854343457902036425", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.152264338295331783612, "0.152264338295331783612", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.01105924229346489121, "0.01105924229346489121", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 1.125f; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 6) + { + + static const float Y = 0.93995571136474609375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0350353787183177984712, "-0.0350353787183177984712", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00222426529213447927281, "-0.00222426529213447927281", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0185573306514231072324, "0.0185573306514231072324", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00950804701325919603619, "0.00950804701325919603619", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00187123492819559223345, "0.00187123492819559223345", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000157544617424960554631, "0.000157544617424960554631", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.460469890584317994083e-5, "0.460469890584317994083e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.230404776911882601748e-9, "-0.230404776911882601748e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.266339227425782031962e-11, "0.266339227425782031962e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.3653349817554063097, "1.3653349817554063097", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.762059164553623404043, "0.762059164553623404043", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.220091105764131249824, "0.220091105764131249824", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0341589143670947727934, "0.0341589143670947727934", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00263861676657015992959, "0.00263861676657015992959", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.764675292302794483503e-4, "0.764675292302794483503e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 3; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 18) + { + + static const float Y = 0.98362827301025390625f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0167431005076633737133, "-0.0167431005076633737133", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00112951438745580278863, "-0.00112951438745580278863", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00105628862152492910091, "0.00105628862152492910091", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000209386317487588078668, "0.000209386317487588078668", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.149624783758342370182e-4, "0.149624783758342370182e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.449696789927706453732e-6, "0.449696789927706453732e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.462596163522878599135e-8, "0.462596163522878599135e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.281128735628831791805e-13, "-0.281128735628831791805e-13", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.99055709973310326855e-16, "0.99055709973310326855e-16", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.591429344886417493481, "0.591429344886417493481", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.138151865749083321638, "0.138151865749083321638", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0160746087093676504695, "0.0160746087093676504695", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000964011807005165528527, "0.000964011807005165528527", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.275335474764726041141e-4, "0.275335474764726041141e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.282243172016108031869e-6, "0.282243172016108031869e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 6; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 44) + { + + static const float Y = 0.99714565277099609375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0024978212791898131227, "-0.0024978212791898131227", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.779190719229053954292e-5, "-0.779190719229053954292e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.254723037413027451751e-4, "0.254723037413027451751e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.162397777342510920873e-5, "0.162397777342510920873e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.396341011304801168516e-7, "0.396341011304801168516e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.411632831190944208473e-9, "0.411632831190944208473e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.145596286718675035587e-11, "0.145596286718675035587e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.116765012397184275695e-17, "-0.116765012397184275695e-17", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.207123112214422517181, "0.207123112214422517181", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0169410838120975906478, "0.0169410838120975906478", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000690538265622684595676, "0.000690538265622684595676", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.145007359818232637924e-4, "0.145007359818232637924e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.144437756628144157666e-6, "0.144437756628144157666e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.509761276599778486139e-9, "0.509761276599778486139e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 18; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else + { + + static const float Y = 0.99941349029541015625f; + static const T P[] = { + boost::math::tools::make_big_value( -0.000539042911019078575891, "-0.000539042911019078575891", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.28398759004727721098e-6, "-0.28398759004727721098e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.899465114892291446442e-6, "0.899465114892291446442e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.229345859265920864296e-7, "0.229345859265920864296e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.225561444863500149219e-9, "0.225561444863500149219e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.947846627503022684216e-12, "0.947846627503022684216e-12", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.135880130108924861008e-14, "0.135880130108924861008e-14", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.348890393399948882918e-21, "-0.348890393399948882918e-21", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0845746234001899436914, "0.0845746234001899436914", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00282092984726264681981, "0.00282092984726264681981", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.468292921940894236786e-4, "0.468292921940894236786e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.399968812193862100054e-6, "0.399968812193862100054e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.161809290887904476097e-8, "0.161809290887904476097e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.231558608310259605225e-11, "0.231558608310259605225e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 44; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + } + return result; +} + +template +struct erf_roots +{ + boost::math::tuple operator()(const T& guess) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T derivative = sign * (2 / sqrt(constants::pi())) * exp(-(guess * guess)); + T derivative2 = -2 * guess * derivative; + return boost::math::make_tuple(((sign > 0) ? static_cast(boost::math::erf(guess, Policy()) - target) : static_cast(boost::math::erfc(guess, Policy())) - target), derivative, derivative2); + } + erf_roots(T z, int s) : target(z), sign(s) {} +private: + T target; + int sign; +}; + +template +T erf_inv_imp(const T& p, const T& q, const Policy& pol, const std::integral_constant*) +{ + + + + T guess = erf_inv_imp(p, q, pol, static_cast const*>(0)); + T result; + + + + + if(policies::digits() > 64) + { + std::uintmax_t max_iter = policies::get_max_root_iterations(); + if(p <= 0.5) + { + result = tools::halley_iterate(detail::erf_roots::type, Policy>(p, 1), guess, static_cast(0), tools::max_value(), (policies::digits() * 2) / 3, max_iter); + } + else + { + result = tools::halley_iterate(detail::erf_roots::type, Policy>(q, -1), guess, static_cast(0), tools::max_value(), (policies::digits() * 2) / 3, max_iter); + } + policies::check_root_iterations("boost::math::erf_inv<%1%>", max_iter, pol); + } + else + { + result = guess; + } + return result; +} + +template +struct erf_inv_initializer +{ + struct init + { + init() + { + do_init(); + } + static bool is_value_non_zero(T); + static void do_init() + { + + + + if(std::numeric_limits::digits) + { + boost::math::erf_inv(static_cast(0.25), Policy()); + boost::math::erf_inv(static_cast(0.55), Policy()); + boost::math::erf_inv(static_cast(0.95), Policy()); + boost::math::erfc_inv(static_cast(1e-15), Policy()); + + + + + + if(is_value_non_zero(static_cast(boost::math::tools::make_big_value( 1e-130, "1e-130", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())))) + boost::math::erfc_inv(static_cast(boost::math::tools::make_big_value( 1e-130, "1e-130", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), Policy()); +# 369 "../../../../boost/math/special_functions/detail/erf_inv.hpp" + if(is_value_non_zero(static_cast(boost::math::tools::make_big_value(0.0L, "1e-800", std::integral_constant::value || (boost::math::tools::numeric_traits::is_specialized && boost::math::tools::numeric_traits::max_exponent <= boost::math::tools::numeric_traits::max_exponent && boost::math::tools::numeric_traits::digits <= boost::math::tools::numeric_traits::digits)>(), std::is_constructible())))) + boost::math::erfc_inv(static_cast(boost::math::tools::make_big_value(0.0L, "1e-800", std::integral_constant::value || (boost::math::tools::numeric_traits::is_specialized && boost::math::tools::numeric_traits::max_exponent <= boost::math::tools::numeric_traits::max_exponent && boost::math::tools::numeric_traits::digits <= boost::math::tools::numeric_traits::digits)>(), std::is_constructible())), Policy()); + if(is_value_non_zero(static_cast(boost::math::tools::make_big_value(0.0L, "1e-900", std::integral_constant::value || (boost::math::tools::numeric_traits::is_specialized && boost::math::tools::numeric_traits::max_exponent <= boost::math::tools::numeric_traits::max_exponent && boost::math::tools::numeric_traits::digits <= boost::math::tools::numeric_traits::digits)>(), std::is_constructible())))) + boost::math::erfc_inv(static_cast(boost::math::tools::make_big_value(0.0L, "1e-900", std::integral_constant::value || (boost::math::tools::numeric_traits::is_specialized && boost::math::tools::numeric_traits::max_exponent <= boost::math::tools::numeric_traits::max_exponent && boost::math::tools::numeric_traits::digits <= boost::math::tools::numeric_traits::digits)>(), std::is_constructible())), Policy()); + + } + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename erf_inv_initializer::init erf_inv_initializer::initializer; + +template +bool erf_inv_initializer::init::is_value_non_zero(T v) +{ + + + + return v != 0; +} + +} + +export template +typename tools::promote_args::type erfc_inv(T z, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + + + + + static const char* function = "boost::math::erfc_inv<%1%>(%1%, %1%)"; + if((z < 0) || (z > 2)) + return policies::raise_domain_error(function, "Argument outside range [0,2] in inverse erfc function (got p=%1%).", z, pol); + if(z == 0) + return policies::raise_overflow_error(function, 0, pol); + if(z == 2) + return -policies::raise_overflow_error(function, 0, pol); + + + + + + result_type p, q, s; + if(z > 1) + { + q = 2 - z; + p = 1 - q; + s = -1; + } + else + { + p = 1 - z; + q = z; + s = 1; + } + + + + + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + + + + + typedef typename policies::evaluation::type eval_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::erf_inv_initializer::force_instantiate(); + + + + + return s * policies::checked_narrowing_cast( + detail::erf_inv_imp(static_cast(p), static_cast(q), forwarding_policy(), static_cast(0)), function); +} + +export template +typename tools::promote_args::type erf_inv(T z, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + + + + + static const char* function = "boost::math::erf_inv<%1%>(%1%, %1%)"; + if((z < -1) || (z > 1)) + return policies::raise_domain_error(function, "Argument outside range [-1, 1] in inverse erf function (got p=%1%).", z, pol); + if(z == 1) + return policies::raise_overflow_error(function, 0, pol); + if(z == -1) + return -policies::raise_overflow_error(function, 0, pol); + if(z == 0) + return 0; + + + + + + result_type p, q, s; + if(z < 0) + { + p = -z; + q = 1 - p; + s = -1; + } + else + { + p = z; + q = 1 - z; + s = 1; + } + + + + + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + + + + + typedef typename policies::evaluation::type eval_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + + + + typedef typename policies::evaluation::type eval_type; + + detail::erf_inv_initializer::force_instantiate(); + + + + return s * policies::checked_narrowing_cast( + detail::erf_inv_imp(static_cast(p), static_cast(q), forwarding_policy(), static_cast(0)), function); +} + +export template +inline typename tools::promote_args::type erfc_inv(T z) +{ + return erfc_inv(z, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type erf_inv(T z) +{ + return erf_inv(z, policies::policy<>()); +} + +} +} +# 1266 "../../../../boost/math/special_functions/erf.hpp" 2 +# 2218 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 198 "../../module/sf.cxx" 2 diff --git a/test/modules/sf_pp_2.cxx b/test/modules/sf_pp_2.cxx new file mode 100644 index 0000000000..4f33d51880 --- /dev/null +++ b/test/modules/sf_pp_2.cxx @@ -0,0 +1,91468 @@ +# 0 "../../module/sf.cxx" +# 0 "" +# 0 "" +# 1 "../../module/sf.cxx" + + + + + +module ; + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 1 3 +# 278 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 + +# 278 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 +namespace std +{ + typedef long long unsigned int size_t; + typedef long long int ptrdiff_t; + + + typedef decltype(nullptr) nullptr_t; + +} +# 300 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 +namespace std +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +namespace __gnu_cxx +{ + inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } +} +# 586 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/os_defines.h" 1 3 +# 587 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/cpu_defines.h" 1 3 +# 590 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 2 3 +# 777 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/pstl_config.h" 1 3 +# 778 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++config.h" 2 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 + +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 +extern "C++" { + +namespace std +{ + + + struct __true_type { }; + struct __false_type { }; + + template + struct __truth_type + { typedef __false_type __type; }; + + template<> + struct __truth_type + { typedef __true_type __type; }; + + + + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + + + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; +# 287 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + + + + + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + + + + + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + enum class byte : unsigned char; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template struct iterator_traits; + + + template + struct __is_nonvolatile_trivially_copyable + { + enum { __value = __is_trivially_copyable(_Tp) }; + }; + + + + + template + struct __is_nonvolatile_trivially_copyable + { + enum { __value = 0 }; + }; + + + template + struct __memcpyable + { + enum { __value = 0 }; + }; + + template + struct __memcpyable<_Tp*, _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcpyable<_Tp*, const _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + + + + + + template + struct __memcmpable + { + enum { __value = 0 }; + }; + + + template + struct __memcmpable<_Tp*, _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcmpable + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + template + struct __memcmpable<_Tp*, const _Tp*> + : __is_nonvolatile_trivially_copyable<_Tp> + { }; + + + + + + + + template::__value + + > + struct __is_memcmp_ordered + { + static const bool __value = _Tp(-1) > _Tp(1); + }; + + template + struct __is_memcmp_ordered<_Tp, false> + { + static const bool __value = false; + }; + + + template + struct __is_memcmp_ordered_with + { + static const bool __value = __is_memcmp_ordered<_Tp>::__value + && __is_memcmp_ordered<_Up>::__value; + }; + + template + struct __is_memcmp_ordered_with<_Tp, _Up, false> + { + static const bool __value = false; + }; +# 532 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cpp_type_traits.h" 3 + template<> + struct __is_memcmp_ordered_with + { static constexpr bool __value = true; }; + + template + struct __is_memcmp_ordered_with<_Tp, std::byte, _SameSize> + { static constexpr bool __value = false; }; + + template + struct __is_memcmp_ordered_with + { static constexpr bool __value = false; }; + + + + + + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + template + constexpr + inline _Iterator + __miter_base(_Iterator __it) + { return __it; } + + +} +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/type_traits.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/type_traits.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/type_traits.h" 3 + + + + +extern "C++" { + +namespace __gnu_cxx +{ + + + + template + struct __enable_if + { }; + + template + struct __enable_if + { typedef _Tp __type; }; + + + + template + struct __conditional_type + { typedef _Iftrue __type; }; + + template + struct __conditional_type + { typedef _Iffalse __type; }; + + + + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + + + template<> + struct __add_unsigned; + + template<> + struct __add_unsigned; + + + + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef short __type; }; + + template<> + struct __remove_unsigned + { typedef int __type; }; + + template<> + struct __remove_unsigned + { typedef long __type; }; + + template<> + struct __remove_unsigned + { typedef long long __type; }; + + + template<> + struct __remove_unsigned; + + template<> + struct __remove_unsigned; + + + + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + + template + inline bool + __is_null_pointer(_Type) + { return false; } + + + inline bool + __is_null_pointer(std::nullptr_t) + { return true; } + + + + template::__value> + struct __promote + { typedef double __type; }; + + + + + template + struct __promote<_Tp, false> + { }; + + template<> + struct __promote + { typedef long double __type; }; + + template<> + struct __promote + { typedef double __type; }; + + template<> + struct __promote + { typedef float __type; }; + + template::__type, + typename _Up2 = typename __promote<_Up>::__type> + struct __promote_2 + { + typedef __typeof__(_Tp2() + _Up2()) __type; + }; + + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type> + struct __promote_3 + { + typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; + }; + + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type, + typename _Wp2 = typename __promote<_Wp>::__type> + struct __promote_4 + { + typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; + }; + + +} +} +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h" 1 3 +# 98 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h" 3 + +# 107 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h" 3 + +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_secapi.h" 1 3 +# 44 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_secapi.h" 3 +extern "C++" { +template + struct __if_array; +template + struct __if_array { + typedef __dsttype __type; +}; +} +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 2 3 +# 287 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h" 1 3 +# 9 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 1 3 +# 621 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sdks/_mingw_ddk.h" 1 3 +# 622 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 2 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h" 2 3 + + + + +#pragma pack(push,_CRT_PACKING) + + + +extern "C" { + + + + + + typedef __builtin_va_list __gnuc_va_list; + + + + + + + typedef __gnuc_va_list va_list; +# 99 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/vadefs.h" 3 +} + + + +#pragma pack(pop) +# 288 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 2 3 +# 573 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +extern "C" { +# 584 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h" 3 +void __attribute__((__cdecl__)) __debugbreak(void); +extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) void __attribute__((__cdecl__)) __debugbreak(void) +{ + + __asm__ __volatile__("int {$}3":); + + + + + + + +} + + + + +const char *__mingw_get_crt_info (void); + + +} +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 2 3 + + + + +#pragma pack(push,_CRT_PACKING) +# 35 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef unsigned long long size_t; +# 45 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef long long ssize_t; + + + + + + +typedef size_t rsize_t; +# 62 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef long long intptr_t; +# 75 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef unsigned long long uintptr_t; +# 88 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +__extension__ typedef long long ptrdiff_t; +# 106 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +typedef unsigned short wint_t; +typedef unsigned short wctype_t; + + + + + +typedef int errno_t; + + + + +typedef long __time32_t; + + + + +__extension__ typedef long long __time64_t; +# 138 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +typedef __time64_t time_t; +# 430 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +struct threadlocaleinfostruct; +struct threadmbcinfostruct; +typedef struct threadlocaleinfostruct *pthreadlocinfo; +typedef struct threadmbcinfostruct *pthreadmbcinfo; +struct __lc_time_data; + +typedef struct localeinfo_struct { + pthreadlocinfo locinfo; + pthreadmbcinfo mbcinfo; +} _locale_tstruct,*_locale_t; + + + +typedef struct tagLC_ID { + unsigned short wLanguage; + unsigned short wCountry; + unsigned short wCodePage; +} LC_ID,*LPLC_ID; + + + + +typedef struct threadlocaleinfostruct { + + + + + + int refcount; + unsigned int lc_codepage; + unsigned int lc_collate_cp; + unsigned long lc_handle[6]; + LC_ID lc_id[6]; + struct { + char *locale; + wchar_t *wlocale; + int *refcount; + int *wrefcount; + } lc_category[6]; + int lc_clike; + int mb_cur_max; + int *lconv_intl_refcount; + int *lconv_num_refcount; + int *lconv_mon_refcount; + struct lconv *lconv; + int *ctype1_refcount; + unsigned short *ctype1; + const unsigned short *pctype; + const unsigned char *pclmap; + const unsigned char *pcumap; + struct __lc_time_data *lc_time_curr; + +} threadlocinfo; +# 501 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt.h" 3 +#pragma pack(pop) +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h" 2 3 +# 14 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 2 3 + +struct _exception; + +#pragma pack(push,_CRT_PACKING) +# 77 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 +extern "C++" { +template struct __mingw_types_compatible_p { + static const bool result = false; +}; + +template struct __mingw_types_compatible_p { + static const bool result = true; +}; + +template struct __mingw_types_compatible_p { + static const bool result = true; +}; + +template struct __mingw_types_compatible_p { + static const bool result = true; +}; +} +# 111 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 +extern "C" { + + + + + + + + typedef union __mingw_dbl_type_t { + double x; + unsigned long long val; + __extension__ struct { + unsigned int low, high; + } lh; + } __mingw_dbl_type_t; + + typedef union __mingw_flt_type_t { + float x; + unsigned int val; + } __mingw_flt_type_t; + + typedef union __mingw_ldbl_type_t + { + long double x; + __extension__ struct { + unsigned int low, high; + int sign_exponent : 16; + int res1 : 16; + int res0 : 32; + } lh; + } __mingw_ldbl_type_t; +# 150 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern double * __imp__HUGE; +# 163 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + struct _exception { + int type; + const char *name; + double arg1; + double arg2; + double retval; + }; + + void __mingw_raise_matherr (int typ, const char *name, double a1, double a2, + double rslt); + void __mingw_setusermatherr (int (__attribute__((__cdecl__)) *)(struct _exception *)); + __attribute__ ((__dllimport__)) void __setusermatherr(int (__attribute__((__cdecl__)) *)(struct _exception *)); + + + + double __attribute__((__cdecl__)) sin(double _X); + double __attribute__((__cdecl__)) cos(double _X); + double __attribute__((__cdecl__)) tan(double _X); + double __attribute__((__cdecl__)) sinh(double _X); + double __attribute__((__cdecl__)) cosh(double _X); + double __attribute__((__cdecl__)) tanh(double _X); + double __attribute__((__cdecl__)) asin(double _X); + double __attribute__((__cdecl__)) acos(double _X); + double __attribute__((__cdecl__)) atan(double _X); + double __attribute__((__cdecl__)) atan2(double _Y,double _X); + double __attribute__((__cdecl__)) exp(double _X); + double __attribute__((__cdecl__)) log(double _X); + double __attribute__((__cdecl__)) log10(double _X); + double __attribute__((__cdecl__)) pow(double _X,double _Y); + double __attribute__((__cdecl__)) sqrt(double _X); + double __attribute__((__cdecl__)) ceil(double _X); + double __attribute__((__cdecl__)) floor(double _X); + + + extern float __attribute__((__cdecl__)) fabsf (float x); + extern long double __attribute__((__cdecl__)) fabsl (long double); + extern double __attribute__((__cdecl__)) fabs (double _X); +# 238 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + double __attribute__((__cdecl__)) ldexp(double _X,int _Y); + double __attribute__((__cdecl__)) frexp(double _X,int *_Y); + double __attribute__((__cdecl__)) modf(double _X,double *_Y); + double __attribute__((__cdecl__)) fmod(double _X,double _Y); + + void __attribute__((__cdecl__)) sincos (double __x, double *p_sin, double *p_cos); + void __attribute__((__cdecl__)) sincosl (long double __x, long double *p_sin, long double *p_cos); + void __attribute__((__cdecl__)) sincosf (float __x, float *p_sin, float *p_cos); + + + + int __attribute__((__cdecl__)) abs(int _X); + long __attribute__((__cdecl__)) labs(long _X); + + + + double __attribute__((__cdecl__)) atof(const char *_String); + double __attribute__((__cdecl__)) _atof_l(const char *_String,_locale_t _Locale); +# 367 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 +typedef float float_t; +typedef double double_t; +# 402 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern int __attribute__((__cdecl__)) __fpclassifyl (long double); + extern int __attribute__((__cdecl__)) __fpclassifyf (float); + extern int __attribute__((__cdecl__)) __fpclassify (double); +# 515 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern int __attribute__((__cdecl__)) __isnan (double); + extern int __attribute__((__cdecl__)) __isnanf (float); + extern int __attribute__((__cdecl__)) __isnanl (long double); +# 602 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern int __attribute__((__cdecl__)) __signbit (double); + extern int __attribute__((__cdecl__)) __signbitf (float); + extern int __attribute__((__cdecl__)) __signbitl (long double); +# 659 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern float __attribute__((__cdecl__)) sinf(float _X); + extern long double __attribute__((__cdecl__)) sinl(long double); + + extern float __attribute__((__cdecl__)) cosf(float _X); + extern long double __attribute__((__cdecl__)) cosl(long double); + + extern float __attribute__((__cdecl__)) tanf(float _X); + extern long double __attribute__((__cdecl__)) tanl(long double); + extern float __attribute__((__cdecl__)) asinf(float _X); + extern long double __attribute__((__cdecl__)) asinl(long double); + + extern float __attribute__((__cdecl__)) acosf (float); + extern long double __attribute__((__cdecl__)) acosl (long double); + + extern float __attribute__((__cdecl__)) atanf (float); + extern long double __attribute__((__cdecl__)) atanl (long double); + + extern float __attribute__((__cdecl__)) atan2f (float, float); + extern long double __attribute__((__cdecl__)) atan2l (long double, long double); + + + extern float __attribute__((__cdecl__)) sinhf(float _X); + + + + extern long double __attribute__((__cdecl__)) sinhl(long double); + + extern float __attribute__((__cdecl__)) coshf(float _X); + + + + extern long double __attribute__((__cdecl__)) coshl(long double); + + extern float __attribute__((__cdecl__)) tanhf(float _X); + + + + extern long double __attribute__((__cdecl__)) tanhl(long double); + + + + extern double __attribute__((__cdecl__)) acosh (double); + extern float __attribute__((__cdecl__)) acoshf (float); + extern long double __attribute__((__cdecl__)) acoshl (long double); + + + extern double __attribute__((__cdecl__)) asinh (double); + extern float __attribute__((__cdecl__)) asinhf (float); + extern long double __attribute__((__cdecl__)) asinhl (long double); + + + extern double __attribute__((__cdecl__)) atanh (double); + extern float __attribute__((__cdecl__)) atanhf (float); + extern long double __attribute__((__cdecl__)) atanhl (long double); + + + + extern float __attribute__((__cdecl__)) expf(float _X); + + + + extern long double __attribute__((__cdecl__)) expl(long double); + + + extern double __attribute__((__cdecl__)) exp2(double); + extern float __attribute__((__cdecl__)) exp2f(float); + extern long double __attribute__((__cdecl__)) exp2l(long double); + + + + extern double __attribute__((__cdecl__)) expm1(double); + extern float __attribute__((__cdecl__)) expm1f(float); + extern long double __attribute__((__cdecl__)) expm1l(long double); + + + extern float frexpf(float _X,int *_Y); + + + + extern long double __attribute__((__cdecl__)) frexpl(long double,int *); + + + + + extern int __attribute__((__cdecl__)) ilogb (double); + extern int __attribute__((__cdecl__)) ilogbf (float); + extern int __attribute__((__cdecl__)) ilogbl (long double); + + + extern float __attribute__((__cdecl__)) ldexpf(float _X,int _Y); + + + + extern long double __attribute__((__cdecl__)) ldexpl (long double, int); + + + extern float __attribute__((__cdecl__)) logf (float); + extern long double __attribute__((__cdecl__)) logl(long double); + + + extern float __attribute__((__cdecl__)) log10f (float); + extern long double __attribute__((__cdecl__)) log10l(long double); + + + extern double __attribute__((__cdecl__)) log1p(double); + extern float __attribute__((__cdecl__)) log1pf(float); + extern long double __attribute__((__cdecl__)) log1pl(long double); + + + extern double __attribute__((__cdecl__)) log2 (double); + extern float __attribute__((__cdecl__)) log2f (float); + extern long double __attribute__((__cdecl__)) log2l (long double); + + + extern double __attribute__((__cdecl__)) logb (double); + extern float __attribute__((__cdecl__)) logbf (float); + extern long double __attribute__((__cdecl__)) logbl (long double); +# 862 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern float __attribute__((__cdecl__)) modff (float, float*); + extern long double __attribute__((__cdecl__)) modfl (long double, long double*); + + + extern double __attribute__((__cdecl__)) scalbn (double, int); + extern float __attribute__((__cdecl__)) scalbnf (float, int); + extern long double __attribute__((__cdecl__)) scalbnl (long double, int); + + extern double __attribute__((__cdecl__)) scalbln (double, long); + extern float __attribute__((__cdecl__)) scalblnf (float, long); + extern long double __attribute__((__cdecl__)) scalblnl (long double, long); + + + + extern double __attribute__((__cdecl__)) cbrt (double); + extern float __attribute__((__cdecl__)) cbrtf (float); + extern long double __attribute__((__cdecl__)) cbrtl (long double); + + + extern double __attribute__((__cdecl__)) hypot (double, double) ; + extern float __attribute__((__cdecl__)) hypotf (float x, float y); + + + + extern long double __attribute__((__cdecl__)) hypotl (long double, long double); + + + extern float __attribute__((__cdecl__)) powf(float _X,float _Y); + + + + extern long double __attribute__((__cdecl__)) powl (long double, long double); + + + extern float __attribute__((__cdecl__)) sqrtf (float); + extern long double sqrtl(long double); + + + extern double __attribute__((__cdecl__)) erf (double); + extern float __attribute__((__cdecl__)) erff (float); + extern long double __attribute__((__cdecl__)) erfl (long double); + + + extern double __attribute__((__cdecl__)) erfc (double); + extern float __attribute__((__cdecl__)) erfcf (float); + extern long double __attribute__((__cdecl__)) erfcl (long double); + + + extern double __attribute__((__cdecl__)) lgamma (double); + extern float __attribute__((__cdecl__)) lgammaf (float); + extern long double __attribute__((__cdecl__)) lgammal (long double); + + extern int signgam; + + + extern double __attribute__((__cdecl__)) tgamma (double); + extern float __attribute__((__cdecl__)) tgammaf (float); + extern long double __attribute__((__cdecl__)) tgammal (long double); + + + extern float __attribute__((__cdecl__)) ceilf (float); + extern long double __attribute__((__cdecl__)) ceill (long double); + + + extern float __attribute__((__cdecl__)) floorf (float); + extern long double __attribute__((__cdecl__)) floorl (long double); + + + extern double __attribute__((__cdecl__)) nearbyint ( double); + extern float __attribute__((__cdecl__)) nearbyintf (float); + extern long double __attribute__((__cdecl__)) nearbyintl (long double); + + + +extern double __attribute__((__cdecl__)) rint (double); +extern float __attribute__((__cdecl__)) rintf (float); +extern long double __attribute__((__cdecl__)) rintl (long double); + + +extern long __attribute__((__cdecl__)) lrint (double); +extern long __attribute__((__cdecl__)) lrintf (float); +extern long __attribute__((__cdecl__)) lrintl (long double); + +__extension__ long long __attribute__((__cdecl__)) llrint (double); +__extension__ long long __attribute__((__cdecl__)) llrintf (float); +__extension__ long long __attribute__((__cdecl__)) llrintl (long double); +# 1029 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern double __attribute__((__cdecl__)) round (double); + extern float __attribute__((__cdecl__)) roundf (float); + extern long double __attribute__((__cdecl__)) roundl (long double); + + + extern long __attribute__((__cdecl__)) lround (double); + extern long __attribute__((__cdecl__)) lroundf (float); + extern long __attribute__((__cdecl__)) lroundl (long double); + __extension__ long long __attribute__((__cdecl__)) llround (double); + __extension__ long long __attribute__((__cdecl__)) llroundf (float); + __extension__ long long __attribute__((__cdecl__)) llroundl (long double); + + + + extern double __attribute__((__cdecl__)) trunc (double); + extern float __attribute__((__cdecl__)) truncf (float); + extern long double __attribute__((__cdecl__)) truncl (long double); + + + extern float __attribute__((__cdecl__)) fmodf (float, float); + extern long double __attribute__((__cdecl__)) fmodl (long double, long double); + + + extern double __attribute__((__cdecl__)) remainder (double, double); + extern float __attribute__((__cdecl__)) remainderf (float, float); + extern long double __attribute__((__cdecl__)) remainderl (long double, long double); + + + extern double __attribute__((__cdecl__)) remquo(double, double, int *); + extern float __attribute__((__cdecl__)) remquof(float, float, int *); + extern long double __attribute__((__cdecl__)) remquol(long double, long double, int *); + + + extern double __attribute__((__cdecl__)) copysign (double, double); + extern float __attribute__((__cdecl__)) copysignf (float, float); + extern long double __attribute__((__cdecl__)) copysignl (long double, long double); +# 1086 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern double __attribute__((__cdecl__)) nan(const char *tagp); + extern float __attribute__((__cdecl__)) nanf(const char *tagp); + extern long double __attribute__((__cdecl__)) nanl(const char *tagp); +# 1097 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + extern double __attribute__((__cdecl__)) nextafter (double, double); + extern float __attribute__((__cdecl__)) nextafterf (float, float); + extern long double __attribute__((__cdecl__)) nextafterl (long double, long double); + + + extern double __attribute__((__cdecl__)) nexttoward (double, long double); + extern float __attribute__((__cdecl__)) nexttowardf (float, long double); + extern long double __attribute__((__cdecl__)) nexttowardl (long double, long double); + + + + extern double __attribute__((__cdecl__)) fdim (double x, double y); + extern float __attribute__((__cdecl__)) fdimf (float x, float y); + extern long double __attribute__((__cdecl__)) fdiml (long double x, long double y); + + + + + + + + extern double __attribute__((__cdecl__)) fmax (double, double); + extern float __attribute__((__cdecl__)) fmaxf (float, float); + extern long double __attribute__((__cdecl__)) fmaxl (long double, long double); + + + extern double __attribute__((__cdecl__)) fmin (double, double); + extern float __attribute__((__cdecl__)) fminf (float, float); + extern long double __attribute__((__cdecl__)) fminl (long double, long double); + + + + extern double __attribute__((__cdecl__)) fma (double, double, double); + extern float __attribute__((__cdecl__)) fmaf (float, float, float); + extern long double __attribute__((__cdecl__)) fmal (long double, long double, long double); +# 1180 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 + __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _copysignf (float _Number,float _Sign); + __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _chgsignf (float _X); + __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _logbf(float _X); + __attribute__ ((__dllimport__)) float __attribute__((__cdecl__)) _nextafterf(float _X,float _Y); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _finitef(float _X); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isnanf(float _X); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fpclassf(float _X); +# 1575 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/math.h" 3 +} + + + + +#pragma pack(pop) +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 3 + + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_wstdlib.h" 1 3 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_wstdlib.h" 3 +extern "C" { + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _itow_s(int _Val, wchar_t (&_DstBuf)[__size], int _Radix) { return _itow_s(_Val, _DstBuf, __size, _Radix); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _ltow_s(long _Val, wchar_t (&_DstBuf)[__size], int _Radix) { return _ltow_s(_Val, _DstBuf, __size, _Radix); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _ultow_s(unsigned long _Val, wchar_t (&_DstBuf)[__size], int _Radix) { return _ultow_s(_Val, _DstBuf, __size, _Radix); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wgetenv_s(size_t* _ReturnSize, wchar_t (&_DstBuf)[__size], const wchar_t* _VarName) { return _wgetenv_s(_ReturnSize, _DstBuf, __size, _VarName); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _i64tow_s(long long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ui64tow_s(unsigned long long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wmakepath_s(wchar_t (&_PathResult)[__size], const wchar_t* _Drive, const wchar_t* _Dir, const wchar_t* _Filename, const wchar_t* _Ext) { return _wmakepath_s(_PathResult,__size,_Drive,_Dir,_Filename,_Ext); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wputenv_s(const wchar_t *_Name,const wchar_t *_Value); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wsearchenv_s(const wchar_t* _Filename, const wchar_t* _EnvVar, wchar_t (&_ResultPath)[__size]) { return _wsearchenv_s(_Filename, _EnvVar, _ResultPath, __size); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wsplitpath_s(const wchar_t *_Dest, wchar_t (&__drive)[__drive_size], wchar_t (&__dir)[__dir_size], wchar_t (&__name)[__name_size], wchar_t (&__ext)[__ext_size]) { return _wsplitpath_s(_Dest, __drive, __drive_size, __dir, __dir_size, __name, __name_size, __ext, __ext_size); } } + + +} +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 1 3 4 +# 34 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/syslimits.h" 1 3 4 + + + + + + +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 1 3 4 +# 203 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/limits.h" 1 3 4 +# 204 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 2 3 4 +# 8 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/syslimits.h" 2 3 4 +# 35 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 2 3 4 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 2 3 +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 50 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + typedef int (__attribute__((__cdecl__)) *_onexit_t)(void); +# 60 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + typedef struct _div_t { + int quot; + int rem; + } div_t; + + typedef struct _ldiv_t { + long quot; + long rem; + } ldiv_t; + + + + + +#pragma pack(4) + typedef struct { + unsigned char ld[10]; + } _LDOUBLE; +#pragma pack() + + + + typedef struct { + double x; + } _CRT_DOUBLE; + + typedef struct { + float f; + } _CRT_FLOAT; + + + + + typedef struct { + long double x; + } _LONGDOUBLE; + + + +#pragma pack(4) + typedef struct { + unsigned char ld12[12]; + } _LDBL12; +#pragma pack() +# 116 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + extern int * __imp___mb_cur_max; + + + + +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) ___mb_cur_max_func(void); +# 143 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + typedef void (__attribute__((__cdecl__)) *_purecall_handler)(void); + + __attribute__ ((__dllimport__)) _purecall_handler __attribute__((__cdecl__)) _set_purecall_handler(_purecall_handler _Handler); + __attribute__ ((__dllimport__)) _purecall_handler __attribute__((__cdecl__)) _get_purecall_handler(void); + + typedef void (__attribute__((__cdecl__)) *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t); + __attribute__ ((__dllimport__)) _invalid_parameter_handler __attribute__((__cdecl__)) _set_invalid_parameter_handler(_invalid_parameter_handler _Handler); + __attribute__ ((__dllimport__)) _invalid_parameter_handler __attribute__((__cdecl__)) _get_invalid_parameter_handler(void); + + + + __attribute__ ((__dllimport__)) extern int *__attribute__((__cdecl__)) _errno(void); + + errno_t __attribute__((__cdecl__)) _set_errno(int _Value); + errno_t __attribute__((__cdecl__)) _get_errno(int *_Value); + + __attribute__ ((__dllimport__)) unsigned long *__attribute__((__cdecl__)) __doserrno(void); + + errno_t __attribute__((__cdecl__)) _set_doserrno(unsigned long _Value); + errno_t __attribute__((__cdecl__)) _get_doserrno(unsigned long *_Value); +# 173 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + extern __attribute__((dllimport)) char *_sys_errlist[1]; + extern __attribute__((dllimport)) int _sys_nerr; + + + + + + __attribute__ ((__dllimport__)) char ***__attribute__((__cdecl__)) __p___argv(void); + __attribute__ ((__dllimport__)) int *__attribute__((__cdecl__)) __p__fmode(void); +# 191 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + errno_t __attribute__((__cdecl__)) _get_pgmptr(char **_Value); + errno_t __attribute__((__cdecl__)) _get_wpgmptr(wchar_t **_Value); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _set_fmode(int _Mode); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_fmode(int *_PMode); +# 282 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + extern int * __imp___argc; + + + + extern char *** __imp___argv; + + + + extern wchar_t *** __imp___wargv; +# 322 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + extern char *** __imp__environ; + + + + + extern wchar_t *** __imp__wenviron; + + + + + + + extern char ** __imp__pgmptr; + + + + + extern wchar_t ** __imp__wpgmptr; + + + + + extern unsigned int * __imp__osplatform; + + + + + extern unsigned int * __imp__osver; + + + + + extern unsigned int * __imp__winver; + + + + + extern unsigned int * __imp__winmajor; + + + + + extern unsigned int * __imp__winminor; + + + + + + errno_t __attribute__((__cdecl__)) _get_osplatform(unsigned int *_Value); + errno_t __attribute__((__cdecl__)) _get_osver(unsigned int *_Value); + errno_t __attribute__((__cdecl__)) _get_winver(unsigned int *_Value); + errno_t __attribute__((__cdecl__)) _get_winmajor(unsigned int *_Value); + errno_t __attribute__((__cdecl__)) _get_winminor(unsigned int *_Value); + + + + + extern "C++" { + template char (*__countof_helper( _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray]; + + } + + + + + + void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) exit(int _Code) __attribute__ ((__noreturn__)); + void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _exit(int _Code) __attribute__ ((__noreturn__)); + + + + + + + void __attribute__((__cdecl__)) _Exit(int) __attribute__ ((__noreturn__)); + + + + + + + + + void __attribute__((__cdecl__)) __attribute__ ((__noreturn__)) abort(void); + + + + + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _set_abort_behavior(unsigned int _Flags,unsigned int _Mask); + + + + + + + + __extension__ long long __attribute__((__cdecl__)) _abs64(long long); + + extern __inline__ __attribute__((__always_inline__,__gnu_inline__)) long long __attribute__((__cdecl__)) _abs64(long long x) { + return __builtin_llabs(x); + } + + + int __attribute__((__cdecl__)) atexit(void (__attribute__((__cdecl__)) *)(void)); +# 434 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + int __attribute__((__cdecl__)) atoi(const char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoi_l(const char *_Str,_locale_t _Locale); + long __attribute__((__cdecl__)) atol(const char *_Str); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _atol_l(const char *_Str,_locale_t _Locale); + + + void *__attribute__((__cdecl__)) bsearch(const void *_Key,const void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(const void *,const void *)); + void __attribute__((__cdecl__)) qsort(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(const void *,const void *)); + + unsigned short __attribute__((__cdecl__)) _byteswap_ushort(unsigned short _Short); + unsigned long __attribute__((__cdecl__)) _byteswap_ulong (unsigned long _Long); + __extension__ unsigned long long __attribute__((__cdecl__)) _byteswap_uint64(unsigned long long _Int64); + div_t __attribute__((__cdecl__)) div(int _Numerator,int _Denominator); + char *__attribute__((__cdecl__)) getenv(const char *_VarName) ; + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _itoa(int _Value,char *_Dest,int _Radix); + __extension__ __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _i64toa(long long _Val,char *_DstBuf,int _Radix) ; + __extension__ __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ui64toa(unsigned long long _Val,char *_DstBuf,int _Radix) ; + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _atoi64(const char *_String); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _atoi64_l(const char *_String,_locale_t _Locale); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _strtoi64(const char *_String,char **_EndPtr,int _Radix); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _strtoi64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale); + __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _strtoui64(const char *_String,char **_EndPtr,int _Radix); + __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _strtoui64_l(const char *_String,char **_EndPtr,int _Radix,_locale_t _Locale); + ldiv_t __attribute__((__cdecl__)) ldiv(long _Numerator,long _Denominator); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ltoa(long _Value,char *_Dest,int _Radix) ; + int __attribute__((__cdecl__)) mblen(const char *_Ch,size_t _MaxCount); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _mblen_l(const char *_Ch,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrlen(const char *_Str); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrlen_l(const char *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrnlen(const char *_Str,size_t _MaxCount); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstrnlen_l(const char *_Str,size_t _MaxCount,_locale_t _Locale); + int __attribute__((__cdecl__)) mbtowc(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SrcSizeInBytes); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _mbtowc_l(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SrcSizeInBytes,_locale_t _Locale); + size_t __attribute__((__cdecl__)) mbstowcs(wchar_t * __restrict__ _Dest,const char * __restrict__ _Source,size_t _MaxCount); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _mbstowcs_l(wchar_t * __restrict__ _Dest,const char * __restrict__ _Source,size_t _MaxCount,_locale_t _Locale); + int __attribute__((__cdecl__)) mkstemp(char *template_name); + int __attribute__((__cdecl__)) rand(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_error_mode(int _Mode); + void __attribute__((__cdecl__)) srand(unsigned int _Seed); +# 483 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +inline __attribute__((__cdecl__)) +double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtod(const char * __restrict__ _Str,char ** __restrict__ _EndPtr) +{ + double __attribute__((__cdecl__)) __mingw_strtod (const char * __restrict__, char ** __restrict__); + return __mingw_strtod( _Str, _EndPtr); +} + +inline __attribute__((__cdecl__)) +float __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtof(const char * __restrict__ _Str,char ** __restrict__ _EndPtr) +{ + float __attribute__((__cdecl__)) __mingw_strtof (const char * __restrict__, char ** __restrict__); + return __mingw_strtof( _Str, _EndPtr); +} + + + + + + + long double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) strtold(const char * __restrict__ , char ** __restrict__ ); + + + extern double __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) + __strtod (const char * __restrict__ , char ** __restrict__); + + + + + + + + float __attribute__((__cdecl__)) __mingw_strtof (const char * __restrict__, char ** __restrict__); + double __attribute__((__cdecl__)) __mingw_strtod (const char * __restrict__, char ** __restrict__); + long double __attribute__((__cdecl__)) __mingw_strtold(const char * __restrict__, char ** __restrict__); + + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _strtod_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,_locale_t _Locale); + long __attribute__((__cdecl__)) strtol(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _strtol_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); + unsigned long __attribute__((__cdecl__)) strtoul(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix); + __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _strtoul_l(const char * __restrict__ _Str,char ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); + + + int __attribute__((__cdecl__)) system(const char *_Command); + + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ultoa(unsigned long _Value,char *_Dest,int _Radix) ; + int __attribute__((__cdecl__)) wctomb(char *_MbCh,wchar_t _WCh) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wctomb_l(char *_MbCh,wchar_t _WCh,_locale_t _Locale) ; + size_t __attribute__((__cdecl__)) wcstombs(char * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _MaxCount) ; + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _wcstombs_l(char * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _MaxCount,_locale_t _Locale) ; + + + + void *__attribute__((__cdecl__)) calloc(size_t _NumOfElements,size_t _SizeOfElements); + void __attribute__((__cdecl__)) free(void *_Memory); + void *__attribute__((__cdecl__)) malloc(size_t _Size); + void *__attribute__((__cdecl__)) realloc(void *_Memory,size_t _NewSize); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _recalloc(void *_Memory,size_t _Count,size_t _Size); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _aligned_free(void *_Memory); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_malloc(size_t _Size,size_t _Alignment); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset); + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); + + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _itow(int _Value,wchar_t *_Dest,int _Radix) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ltow(long _Value,wchar_t *_Dest,int _Radix) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ultow(unsigned long _Value,wchar_t *_Dest,int _Radix) ; + + double __attribute__((__cdecl__)) __mingw_wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr); + float __attribute__((__cdecl__)) __mingw_wcstof(const wchar_t * __restrict__ nptr, wchar_t ** __restrict__ endptr); + long double __attribute__((__cdecl__)) __mingw_wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__); + + + inline __attribute__((__cdecl__)) + double __attribute__((__cdecl__)) wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){ + return __mingw_wcstod(_Str,_EndPtr); + } + inline __attribute__((__cdecl__)) + float __attribute__((__cdecl__)) wcstof(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){ + return __mingw_wcstof(_Str,_EndPtr); + } + + + + + + + long double __attribute__((__cdecl__)) wcstold(const wchar_t * __restrict__, wchar_t ** __restrict__); + + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wcstod_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,_locale_t _Locale); + long __attribute__((__cdecl__)) wcstol(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wcstol_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); + unsigned long __attribute__((__cdecl__)) wcstoul(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix); + __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _wcstoul_l(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr,int _Radix,_locale_t _Locale); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wgetenv(const wchar_t *_VarName) ; + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wsystem(const wchar_t *_Command); + + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wtof(const wchar_t *_Str); + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _wtof_l(const wchar_t *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wtoi(const wchar_t *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wtoi_l(const wchar_t *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wtol(const wchar_t *_Str); + __attribute__ ((__dllimport__)) long __attribute__((__cdecl__)) _wtol_l(const wchar_t *_Str,_locale_t _Locale); + + __extension__ __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _i64tow(long long _Val,wchar_t *_DstBuf,int _Radix) ; + __extension__ __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _ui64tow(unsigned long long _Val,wchar_t *_DstBuf,int _Radix) ; + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wtoi64(const wchar_t *_Str); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wtoi64_l(const wchar_t *_Str,_locale_t _Locale); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wcstoi64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); + __extension__ __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _wcstoi64_l(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); + __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _wcstoui64(const wchar_t *_Str,wchar_t **_EndPtr,int _Radix); + __extension__ __attribute__ ((__dllimport__)) unsigned long long __attribute__((__cdecl__)) _wcstoui64_l(const wchar_t *_Str ,wchar_t **_EndPtr,int _Radix,_locale_t _Locale); + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putenv(const char *_EnvString); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wputenv(const wchar_t *_EnvString); + + + + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _fullpath(char *_FullPath,const char *_Path,size_t _SizeInBytes); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign) ; + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign) ; + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _gcvt(double _Val,int _NumOfDigits,char *_DstBuf) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atodbl(_CRT_DOUBLE *_Result,char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoldbl(_LDOUBLE *_Result,char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoflt(_CRT_FLOAT *_Result,char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atodbl_l(_CRT_DOUBLE *_Result,char *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoldbl_l(_LDOUBLE *_Result,char *_Str,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _atoflt_l(_CRT_FLOAT *_Result,char *_Str,_locale_t _Locale); +# 634 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +unsigned long __attribute__((__cdecl__)) _lrotl(unsigned long,int); +unsigned long __attribute__((__cdecl__)) _lrotr(unsigned long,int); + + + + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _makepath(char *_Path,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); + _onexit_t __attribute__((__cdecl__)) _onexit(_onexit_t _Func); + + + + void __attribute__((__cdecl__)) perror(const char *_ErrMsg); + + + + + + __extension__ unsigned long long __attribute__((__cdecl__)) _rotl64(unsigned long long _Val,int _Shift); + __extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long Value,int Shift); + + + + + + + unsigned int __attribute__((__cdecl__)) _rotr(unsigned int _Val,int _Shift); + unsigned int __attribute__((__cdecl__)) _rotl(unsigned int _Val,int _Shift); + + + __extension__ unsigned long long __attribute__((__cdecl__)) _rotr64(unsigned long long _Val,int _Shift); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _searchenv(const char *_Filename,const char *_EnvVar,char *_ResultPath) ; + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _splitpath(const char *_FullPath,char *_Drive,char *_Dir,char *_Filename,char *_Ext) ; + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _swab(char *_Buf1,char *_Buf2,int _SizeInBytes); + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wfullpath(wchar_t *_FullPath,const wchar_t *_Path,size_t _SizeInWords); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wmakepath(wchar_t *_ResultPath,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wperror(const wchar_t *_ErrMsg); + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wsearchenv(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath) ; + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext) ; + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _beep(unsigned _Frequency,unsigned _Duration) __attribute__ ((__deprecated__)); + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _seterrormode(int _Mode) __attribute__ ((__deprecated__)); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _sleep(unsigned long _Duration) __attribute__ ((__deprecated__)); +# 705 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 + char *__attribute__((__cdecl__)) ecvt(double _Val,int _NumOfDigits,int *_PtDec,int *_PtSign) ; + char *__attribute__((__cdecl__)) fcvt(double _Val,int _NumOfDec,int *_PtDec,int *_PtSign) ; + char *__attribute__((__cdecl__)) gcvt(double _Val,int _NumOfDigits,char *_DstBuf) ; + char *__attribute__((__cdecl__)) itoa(int _Val,char *_DstBuf,int _Radix) ; + char *__attribute__((__cdecl__)) ltoa(long _Val,char *_DstBuf,int _Radix) ; + int __attribute__((__cdecl__)) putenv(const char *_EnvString) ; + + + + void __attribute__((__cdecl__)) swab(char *_Buf1,char *_Buf2,int _SizeInBytes) ; + + + char *__attribute__((__cdecl__)) ultoa(unsigned long _Val,char *_Dstbuf,int _Radix) ; + _onexit_t __attribute__((__cdecl__)) onexit(_onexit_t _Func); + + + + + + typedef struct { __extension__ long long quot, rem; } lldiv_t; + + __extension__ lldiv_t __attribute__((__cdecl__)) lldiv(long long, long long); + + __extension__ long long __attribute__((__cdecl__)) llabs(long long); + + + + + __extension__ long long __attribute__((__cdecl__)) strtoll(const char * __restrict__, char ** __restrict, int); + __extension__ unsigned long long __attribute__((__cdecl__)) strtoull(const char * __restrict__, char ** __restrict__, int); + + + __extension__ long long __attribute__((__cdecl__)) atoll (const char *); +# 760 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 3 +} + + +#pragma pack(pop) + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h" 1 3 +# 9 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 1 3 +# 30 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 1 3 +# 31 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 2 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdlib_s.h" 2 3 + + +extern "C" { + + + __attribute__ ((__dllimport__)) void * __attribute__((__cdecl__)) bsearch_s(const void *_Key,const void *_Base,rsize_t _NumOfElements,rsize_t _SizeOfElements,int (__attribute__((__cdecl__)) * _PtFuncCompare)(void *, const void *, const void *), void *_Context); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) getenv_s(size_t *_ReturnSize,char *_DstBuf,rsize_t _DstSize,const char *_VarName); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) getenv_s(size_t * _ReturnSize, char (&_Dest)[__size], const char * _VarName) { return getenv_s(_ReturnSize, _Dest, __size, _VarName); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _itoa_s(int _Value, char (&_Dest)[__size], int _Radix) { return _itoa_s(_Value, _Dest, __size, _Radix); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _i64toa_s(long long _Val,char *_DstBuf,size_t _Size,int _Radix); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ui64toa_s(unsigned long long _Val,char *_DstBuf,size_t _Size,int _Radix); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _ltoa_s(long _Value, char (&_Dest)[__size], int _Radix) { return _ltoa_s(_Value, _Dest, __size, _Radix); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) mbstowcs_s(size_t * _PtNumOfCharConverted, wchar_t (&_Dest)[__size], const char * _Source, size_t _MaxCount) { return mbstowcs_s(_PtNumOfCharConverted, _Dest, __size, _Source, _MaxCount); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _mbstowcs_s_l(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount,_locale_t _Locale); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _mbstowcs_s_l(size_t * _PtNumOfCharConverted, wchar_t (&_Dest)[__size], const char * _Source, size_t _MaxCount, _locale_t _Locale) { return _mbstowcs_s_l(_PtNumOfCharConverted, _Dest, __size, _Source, _MaxCount, _Locale); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _ultoa_s(unsigned long _Value, char (&_Dest)[__size], int _Radix) { return _ultoa_s(_Value, _Dest, __size, _Radix); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wctomb_s(int *_SizeConverted,char *_MbCh,rsize_t _SizeInBytes,wchar_t _WCh); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcstombs_s(size_t* _PtNumOfCharConverted, char (&_Dst)[__size], const wchar_t* _Src, size_t _MaxCountInBytes) { return wcstombs_s(_PtNumOfCharConverted, _Dst, __size, _Src, _MaxCountInBytes); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcstombs_s_l(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes,_locale_t _Locale); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcstombs_s_l(size_t* _PtNumOfCharConverted, char (&_Dst)[__size], const wchar_t* _Src, size_t _MaxCountInBytes, _locale_t _Locale) { return _wcstombs_s_l(_PtNumOfCharConverted, _Dst, __size, _Src, _MaxCountInBytes, _Locale); } } + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _putenv_s(const char *_Name,const char *_Value); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _splitpath_s(const char *_FullPath,char *_Drive,size_t _DriveSize,char *_Dir,size_t _DirSize,char *_Filename,size_t _FilenameSize,char *_Ext,size_t _ExtSize); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _splitpath_s(const char *_Dest, char (&__drive)[__drive_size], char (&__dir)[__dir_size], char (&__name)[__name_size], char (&__ext)[__ext_size]) { return _splitpath_s(_Dest, __drive, __drive_size, __dir, __dir_size, __name, __name_size, __ext, __ext_size); } } + + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) qsort_s(void *_Base,size_t _NumOfElements,size_t _SizeOfElements,int (__attribute__((__cdecl__)) *_PtFuncCompare)(void *,const void *,const void *),void *_Context); + + + + + +} +# 766 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 46 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 + typedef struct _heapinfo { + int *_pentry; + size_t _size; + int _useflag; + } _HEAPINFO; + + + extern unsigned int _amblksiz; +# 74 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 +void * __mingw_aligned_malloc (size_t _Size, size_t _Alignment); +void __mingw_aligned_free (void *_Memory); +void * __mingw_aligned_offset_realloc (void *_Memory, size_t _Size, size_t _Alignment, size_t _Offset); +void * __mingw_aligned_realloc (void *_Memory, size_t _Size, size_t _Offset); + + +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mm_malloc.h" 1 3 4 +# 27 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mm_malloc.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 1 3 4 +# 28 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mm_malloc.h" 2 3 4 + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/errno.h" 1 3 4 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/errno.h" 3 4 +extern "C" { +# 239 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/errno.h" 3 4 +} +# 30 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mm_malloc.h" 2 3 4 + + +static __inline__ void * +_mm_malloc (size_t __size, size_t __align) +{ + void * __malloc_ptr; + void * __aligned_ptr; + + + if (__align & (__align - 1)) + { + + (*_errno()) = 22; + + return ((void *) 0); + } + + if (__size == 0) + return ((void *) 0); + + + + + + if (__align < 2 * sizeof (void *)) + __align = 2 * sizeof (void *); + + __malloc_ptr = malloc (__size + __align); + if (!__malloc_ptr) + return ((void *) 0); + + + __aligned_ptr = (void *) (((size_t) __malloc_ptr + __align) + & ~((size_t) (__align) - 1)); + + + ((void **) __aligned_ptr)[-1] = __malloc_ptr; + + return __aligned_ptr; +} + +static __inline__ void +_mm_free (void *__aligned_ptr) +{ + if (__aligned_ptr) + free (((void **) __aligned_ptr)[-1]); +} +# 81 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 2 3 + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _resetstkoflw (void); + + __attribute__ ((__dllimport__)) unsigned long __attribute__((__cdecl__)) _set_malloc_crt_max_wait(unsigned long _NewValue); + + __attribute__ ((__dllimport__)) void *__attribute__((__cdecl__)) _expand(void *_Memory,size_t _NewSize); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _msize(void *_Memory); + + + + + + + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _get_sbh_threshold(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_sbh_threshold(size_t _NewValue); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _set_amblksiz(size_t _Value); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_amblksiz(size_t *_Value); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapadd(void *_Memory,size_t _Size); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapchk(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapmin(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapset(unsigned int _Fill); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _heapwalk(_HEAPINFO *_EntryInfo); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _heapused(size_t *_Used,size_t *_Commit); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _get_heap_handle(void); +# 120 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 + static __inline void *_MarkAllocaS(void *_Ptr,unsigned int _Marker) { + if(_Ptr) { + *((unsigned int*)_Ptr) = _Marker; + _Ptr = (char*)_Ptr + 16; + } + return _Ptr; + } +# 139 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 + static __inline void __attribute__((__cdecl__)) _freea(void *_Memory) { + unsigned int _Marker; + if(_Memory) { + _Memory = (char*)_Memory - 16; + _Marker = *(unsigned int *)_Memory; + if(_Marker==0xDDDD) { + free(_Memory); + } + + + + + + } + } +# 182 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/malloc.h" 3 +} + + +#pragma pack(pop) +# 767 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdlib.h" 2 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 2 3 + + + + + + + +extern "C++" +{ +namespace std +{ + + + using ::abs; + + + inline long + abs(long __i) { return __builtin_labs(__i); } + + + + inline long long + abs(long long __x) { return __builtin_llabs (__x); } +# 70 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 3 + inline constexpr double + abs(double __x) + { return __builtin_fabs(__x); } + + inline constexpr float + abs(float __x) + { return __builtin_fabsf(__x); } + + inline constexpr long double + abs(long double __x) + { return __builtin_fabsl(__x); } +# 107 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_abs.h" 3 + +} +} +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 +# 77 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 +extern "C++" +{ +namespace std +{ + + + using ::acos; + + + inline constexpr float + acos(float __x) + { return __builtin_acosf(__x); } + + inline constexpr long double + acos(long double __x) + { return __builtin_acosl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acos(_Tp __x) + { return __builtin_acos(__x); } + + using ::asin; + + + inline constexpr float + asin(float __x) + { return __builtin_asinf(__x); } + + inline constexpr long double + asin(long double __x) + { return __builtin_asinl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asin(_Tp __x) + { return __builtin_asin(__x); } + + using ::atan; + + + inline constexpr float + atan(float __x) + { return __builtin_atanf(__x); } + + inline constexpr long double + atan(long double __x) + { return __builtin_atanl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atan(_Tp __x) + { return __builtin_atan(__x); } + + using ::atan2; + + + inline constexpr float + atan2(float __y, float __x) + { return __builtin_atan2f(__y, __x); } + + inline constexpr long double + atan2(long double __y, long double __x) + { return __builtin_atan2l(__y, __x); } + + + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + atan2(_Tp __y, _Up __x) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return atan2(__type(__y), __type(__x)); + } + + using ::ceil; + + + inline constexpr float + ceil(float __x) + { return __builtin_ceilf(__x); } + + inline constexpr long double + ceil(long double __x) + { return __builtin_ceill(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ceil(_Tp __x) + { return __builtin_ceil(__x); } + + using ::cos; + + + inline constexpr float + cos(float __x) + { return __builtin_cosf(__x); } + + inline constexpr long double + cos(long double __x) + { return __builtin_cosl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cos(_Tp __x) + { return __builtin_cos(__x); } + + using ::cosh; + + + inline constexpr float + cosh(float __x) + { return __builtin_coshf(__x); } + + inline constexpr long double + cosh(long double __x) + { return __builtin_coshl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cosh(_Tp __x) + { return __builtin_cosh(__x); } + + using ::exp; + + + inline constexpr float + exp(float __x) + { return __builtin_expf(__x); } + + inline constexpr long double + exp(long double __x) + { return __builtin_expl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp(_Tp __x) + { return __builtin_exp(__x); } + + using ::fabs; + + + inline constexpr float + fabs(float __x) + { return __builtin_fabsf(__x); } + + inline constexpr long double + fabs(long double __x) + { return __builtin_fabsl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + fabs(_Tp __x) + { return __builtin_fabs(__x); } + + using ::floor; + + + inline constexpr float + floor(float __x) + { return __builtin_floorf(__x); } + + inline constexpr long double + floor(long double __x) + { return __builtin_floorl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + floor(_Tp __x) + { return __builtin_floor(__x); } + + using ::fmod; + + + inline constexpr float + fmod(float __x, float __y) + { return __builtin_fmodf(__x, __y); } + + inline constexpr long double + fmod(long double __x, long double __y) + { return __builtin_fmodl(__x, __y); } + + + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmod(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmod(__type(__x), __type(__y)); + } + + using ::frexp; + + + inline float + frexp(float __x, int* __exp) + { return __builtin_frexpf(__x, __exp); } + + inline long double + frexp(long double __x, int* __exp) + { return __builtin_frexpl(__x, __exp); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + frexp(_Tp __x, int* __exp) + { return __builtin_frexp(__x, __exp); } + + using ::ldexp; + + + inline constexpr float + ldexp(float __x, int __exp) + { return __builtin_ldexpf(__x, __exp); } + + inline constexpr long double + ldexp(long double __x, int __exp) + { return __builtin_ldexpl(__x, __exp); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ldexp(_Tp __x, int __exp) + { return __builtin_ldexp(__x, __exp); } + + using ::log; + + + inline constexpr float + log(float __x) + { return __builtin_logf(__x); } + + inline constexpr long double + log(long double __x) + { return __builtin_logl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log(_Tp __x) + { return __builtin_log(__x); } + + using ::log10; + + + inline constexpr float + log10(float __x) + { return __builtin_log10f(__x); } + + inline constexpr long double + log10(long double __x) + { return __builtin_log10l(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log10(_Tp __x) + { return __builtin_log10(__x); } + + using ::modf; + + + inline float + modf(float __x, float* __iptr) + { return __builtin_modff(__x, __iptr); } + + inline long double + modf(long double __x, long double* __iptr) + { return __builtin_modfl(__x, __iptr); } + + + using ::pow; + + + inline constexpr float + pow(float __x, float __y) + { return __builtin_powf(__x, __y); } + + inline constexpr long double + pow(long double __x, long double __y) + { return __builtin_powl(__x, __y); } +# 412 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + template + inline constexpr + typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + pow(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return pow(__type(__x), __type(__y)); + } + + using ::sin; + + + inline constexpr float + sin(float __x) + { return __builtin_sinf(__x); } + + inline constexpr long double + sin(long double __x) + { return __builtin_sinl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sin(_Tp __x) + { return __builtin_sin(__x); } + + using ::sinh; + + + inline constexpr float + sinh(float __x) + { return __builtin_sinhf(__x); } + + inline constexpr long double + sinh(long double __x) + { return __builtin_sinhl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sinh(_Tp __x) + { return __builtin_sinh(__x); } + + using ::sqrt; + + + inline constexpr float + sqrt(float __x) + { return __builtin_sqrtf(__x); } + + inline constexpr long double + sqrt(long double __x) + { return __builtin_sqrtl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sqrt(_Tp __x) + { return __builtin_sqrt(__x); } + + using ::tan; + + + inline constexpr float + tan(float __x) + { return __builtin_tanf(__x); } + + inline constexpr long double + tan(long double __x) + { return __builtin_tanl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tan(_Tp __x) + { return __builtin_tan(__x); } + + using ::tanh; + + + inline constexpr float + tanh(float __x) + { return __builtin_tanhf(__x); } + + inline constexpr long double + tanh(long double __x) + { return __builtin_tanhl(__x); } + + + template + inline constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tanh(_Tp __x) + { return __builtin_tanh(__x); } +# 536 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + constexpr int + fpclassify(float __x) + { return __builtin_fpclassify(0x0100, (0x0100 | 0x0400), 0x0400, + (0x0400 | 0x4000), 0x4000, __x); } + + constexpr int + fpclassify(double __x) + { return __builtin_fpclassify(0x0100, (0x0100 | 0x0400), 0x0400, + (0x0400 | 0x4000), 0x4000, __x); } + + constexpr int + fpclassify(long double __x) + { return __builtin_fpclassify(0x0100, (0x0100 | 0x0400), 0x0400, + (0x0400 | 0x4000), 0x4000, __x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + int>::__type + fpclassify(_Tp __x) + { return __x != 0 ? 0x0400 : 0x4000; } + + + + constexpr bool + isfinite(float __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isfinite(double __x) + { return __builtin_isfinite(__x); } + + constexpr bool + isfinite(long double __x) + { return __builtin_isfinite(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isfinite(_Tp __x) + { return true; } + + + + constexpr bool + isinf(float __x) + { return __builtin_isinf(__x); } + + + + + + constexpr bool + isinf(double __x) + { return __builtin_isinf(__x); } + + + constexpr bool + isinf(long double __x) + { return __builtin_isinf(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isinf(_Tp __x) + { return false; } + + + + constexpr bool + isnan(float __x) + { return __builtin_isnan(__x); } + + + + + + constexpr bool + isnan(double __x) + { return __builtin_isnan(__x); } + + + constexpr bool + isnan(long double __x) + { return __builtin_isnan(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isnan(_Tp __x) + { return false; } + + + + constexpr bool + isnormal(float __x) + { return __builtin_isnormal(__x); } + + constexpr bool + isnormal(double __x) + { return __builtin_isnormal(__x); } + + constexpr bool + isnormal(long double __x) + { return __builtin_isnormal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + isnormal(_Tp __x) + { return __x != 0 ? true : false; } + + + + + constexpr bool + signbit(float __x) + { return __builtin_signbit(__x); } + + constexpr bool + signbit(double __x) + { return __builtin_signbit(__x); } + + constexpr bool + signbit(long double __x) + { return __builtin_signbit(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + bool>::__type + signbit(_Tp __x) + { return __x < 0 ? true : false; } + + + + constexpr bool + isgreater(float __x, float __y) + { return __builtin_isgreater(__x, __y); } + + constexpr bool + isgreater(double __x, double __y) + { return __builtin_isgreater(__x, __y); } + + constexpr bool + isgreater(long double __x, long double __y) + { return __builtin_isgreater(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isgreater(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isgreater(__type(__x), __type(__y)); + } + + + + constexpr bool + isgreaterequal(float __x, float __y) + { return __builtin_isgreaterequal(__x, __y); } + + constexpr bool + isgreaterequal(double __x, double __y) + { return __builtin_isgreaterequal(__x, __y); } + + constexpr bool + isgreaterequal(long double __x, long double __y) + { return __builtin_isgreaterequal(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isgreaterequal(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isgreaterequal(__type(__x), __type(__y)); + } + + + + constexpr bool + isless(float __x, float __y) + { return __builtin_isless(__x, __y); } + + constexpr bool + isless(double __x, double __y) + { return __builtin_isless(__x, __y); } + + constexpr bool + isless(long double __x, long double __y) + { return __builtin_isless(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isless(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isless(__type(__x), __type(__y)); + } + + + + constexpr bool + islessequal(float __x, float __y) + { return __builtin_islessequal(__x, __y); } + + constexpr bool + islessequal(double __x, double __y) + { return __builtin_islessequal(__x, __y); } + + constexpr bool + islessequal(long double __x, long double __y) + { return __builtin_islessequal(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + islessequal(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_islessequal(__type(__x), __type(__y)); + } + + + + constexpr bool + islessgreater(float __x, float __y) + { return __builtin_islessgreater(__x, __y); } + + constexpr bool + islessgreater(double __x, double __y) + { return __builtin_islessgreater(__x, __y); } + + constexpr bool + islessgreater(long double __x, long double __y) + { return __builtin_islessgreater(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + islessgreater(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_islessgreater(__type(__x), __type(__y)); + } + + + + constexpr bool + isunordered(float __x, float __y) + { return __builtin_isunordered(__x, __y); } + + constexpr bool + isunordered(double __x, double __y) + { return __builtin_isunordered(__x, __y); } + + constexpr bool + isunordered(long double __x, long double __y) + { return __builtin_isunordered(__x, __y); } + + + + template + constexpr typename + __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value), bool>::__type + isunordered(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return __builtin_isunordered(__type(__x), __type(__y)); + } +# 1065 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + using ::double_t; + using ::float_t; + + + using ::acosh; + using ::acoshf; + using ::acoshl; + + using ::asinh; + using ::asinhf; + using ::asinhl; + + using ::atanh; + using ::atanhf; + using ::atanhl; + + using ::cbrt; + using ::cbrtf; + using ::cbrtl; + + using ::copysign; + using ::copysignf; + using ::copysignl; + + using ::erf; + using ::erff; + using ::erfl; + + using ::erfc; + using ::erfcf; + using ::erfcl; + + using ::exp2; + using ::exp2f; + using ::exp2l; + + using ::expm1; + using ::expm1f; + using ::expm1l; + + using ::fdim; + using ::fdimf; + using ::fdiml; + + using ::fma; + using ::fmaf; + using ::fmal; + + using ::fmax; + using ::fmaxf; + using ::fmaxl; + + using ::fmin; + using ::fminf; + using ::fminl; + + using ::hypot; + using ::hypotf; + using ::hypotl; + + using ::ilogb; + using ::ilogbf; + using ::ilogbl; + + using ::lgamma; + using ::lgammaf; + using ::lgammal; + + + using ::llrint; + using ::llrintf; + using ::llrintl; + + using ::llround; + using ::llroundf; + using ::llroundl; + + + using ::log1p; + using ::log1pf; + using ::log1pl; + + using ::log2; + using ::log2f; + using ::log2l; + + using ::logb; + using ::logbf; + using ::logbl; + + using ::lrint; + using ::lrintf; + using ::lrintl; + + using ::lround; + using ::lroundf; + using ::lroundl; + + using ::nan; + using ::nanf; + using ::nanl; + + using ::nearbyint; + using ::nearbyintf; + using ::nearbyintl; + + using ::nextafter; + using ::nextafterf; + using ::nextafterl; + + using ::nexttoward; + using ::nexttowardf; + using ::nexttowardl; + + using ::remainder; + using ::remainderf; + using ::remainderl; + + using ::remquo; + using ::remquof; + using ::remquol; + + using ::rint; + using ::rintf; + using ::rintl; + + using ::round; + using ::roundf; + using ::roundl; + + using ::scalbln; + using ::scalblnf; + using ::scalblnl; + + using ::scalbn; + using ::scalbnf; + using ::scalbnl; + + using ::tgamma; + using ::tgammaf; + using ::tgammal; + + using ::trunc; + using ::truncf; + using ::truncl; + + + + constexpr float + acosh(float __x) + { return __builtin_acoshf(__x); } + + constexpr long double + acosh(long double __x) + { return __builtin_acoshl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acosh(_Tp __x) + { return __builtin_acosh(__x); } + + + + constexpr float + asinh(float __x) + { return __builtin_asinhf(__x); } + + constexpr long double + asinh(long double __x) + { return __builtin_asinhl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asinh(_Tp __x) + { return __builtin_asinh(__x); } + + + + constexpr float + atanh(float __x) + { return __builtin_atanhf(__x); } + + constexpr long double + atanh(long double __x) + { return __builtin_atanhl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atanh(_Tp __x) + { return __builtin_atanh(__x); } + + + + constexpr float + cbrt(float __x) + { return __builtin_cbrtf(__x); } + + constexpr long double + cbrt(long double __x) + { return __builtin_cbrtl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cbrt(_Tp __x) + { return __builtin_cbrt(__x); } + + + + constexpr float + copysign(float __x, float __y) + { return __builtin_copysignf(__x, __y); } + + constexpr long double + copysign(long double __x, long double __y) + { return __builtin_copysignl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + copysign(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return copysign(__type(__x), __type(__y)); + } + + + + constexpr float + erf(float __x) + { return __builtin_erff(__x); } + + constexpr long double + erf(long double __x) + { return __builtin_erfl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + erf(_Tp __x) + { return __builtin_erf(__x); } + + + + constexpr float + erfc(float __x) + { return __builtin_erfcf(__x); } + + constexpr long double + erfc(long double __x) + { return __builtin_erfcl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + erfc(_Tp __x) + { return __builtin_erfc(__x); } + + + + constexpr float + exp2(float __x) + { return __builtin_exp2f(__x); } + + constexpr long double + exp2(long double __x) + { return __builtin_exp2l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp2(_Tp __x) + { return __builtin_exp2(__x); } + + + + constexpr float + expm1(float __x) + { return __builtin_expm1f(__x); } + + constexpr long double + expm1(long double __x) + { return __builtin_expm1l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + expm1(_Tp __x) + { return __builtin_expm1(__x); } + + + + constexpr float + fdim(float __x, float __y) + { return __builtin_fdimf(__x, __y); } + + constexpr long double + fdim(long double __x, long double __y) + { return __builtin_fdiml(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fdim(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fdim(__type(__x), __type(__y)); + } + + + + constexpr float + fma(float __x, float __y, float __z) + { return __builtin_fmaf(__x, __y, __z); } + + constexpr long double + fma(long double __x, long double __y, long double __z) + { return __builtin_fmal(__x, __y, __z); } + + + + template + constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type + fma(_Tp __x, _Up __y, _Vp __z) + { + typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; + return fma(__type(__x), __type(__y), __type(__z)); + } + + + + constexpr float + fmax(float __x, float __y) + { return __builtin_fmaxf(__x, __y); } + + constexpr long double + fmax(long double __x, long double __y) + { return __builtin_fmaxl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmax(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmax(__type(__x), __type(__y)); + } + + + + constexpr float + fmin(float __x, float __y) + { return __builtin_fminf(__x, __y); } + + constexpr long double + fmin(long double __x, long double __y) + { return __builtin_fminl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + fmin(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return fmin(__type(__x), __type(__y)); + } + + + + constexpr float + hypot(float __x, float __y) + { return __builtin_hypotf(__x, __y); } + + constexpr long double + hypot(long double __x, long double __y) + { return __builtin_hypotl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + hypot(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return hypot(__type(__x), __type(__y)); + } + + + + constexpr int + ilogb(float __x) + { return __builtin_ilogbf(__x); } + + constexpr int + ilogb(long double __x) + { return __builtin_ilogbl(__x); } + + + + template + constexpr + typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + int>::__type + ilogb(_Tp __x) + { return __builtin_ilogb(__x); } + + + + constexpr float + lgamma(float __x) + { return __builtin_lgammaf(__x); } + + constexpr long double + lgamma(long double __x) + { return __builtin_lgammal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + lgamma(_Tp __x) + { return __builtin_lgamma(__x); } + + + + constexpr long long + llrint(float __x) + { return __builtin_llrintf(__x); } + + constexpr long long + llrint(long double __x) + { return __builtin_llrintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long long>::__type + llrint(_Tp __x) + { return __builtin_llrint(__x); } + + + + constexpr long long + llround(float __x) + { return __builtin_llroundf(__x); } + + constexpr long long + llround(long double __x) + { return __builtin_llroundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long long>::__type + llround(_Tp __x) + { return __builtin_llround(__x); } + + + + constexpr float + log1p(float __x) + { return __builtin_log1pf(__x); } + + constexpr long double + log1p(long double __x) + { return __builtin_log1pl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log1p(_Tp __x) + { return __builtin_log1p(__x); } + + + + + constexpr float + log2(float __x) + { return __builtin_log2f(__x); } + + constexpr long double + log2(long double __x) + { return __builtin_log2l(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log2(_Tp __x) + { return __builtin_log2(__x); } + + + + constexpr float + logb(float __x) + { return __builtin_logbf(__x); } + + constexpr long double + logb(long double __x) + { return __builtin_logbl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + logb(_Tp __x) + { return __builtin_logb(__x); } + + + + constexpr long + lrint(float __x) + { return __builtin_lrintf(__x); } + + constexpr long + lrint(long double __x) + { return __builtin_lrintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long>::__type + lrint(_Tp __x) + { return __builtin_lrint(__x); } + + + + constexpr long + lround(float __x) + { return __builtin_lroundf(__x); } + + constexpr long + lround(long double __x) + { return __builtin_lroundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + long>::__type + lround(_Tp __x) + { return __builtin_lround(__x); } + + + + constexpr float + nearbyint(float __x) + { return __builtin_nearbyintf(__x); } + + constexpr long double + nearbyint(long double __x) + { return __builtin_nearbyintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + nearbyint(_Tp __x) + { return __builtin_nearbyint(__x); } + + + + constexpr float + nextafter(float __x, float __y) + { return __builtin_nextafterf(__x, __y); } + + constexpr long double + nextafter(long double __x, long double __y) + { return __builtin_nextafterl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + nextafter(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return nextafter(__type(__x), __type(__y)); + } + + + + constexpr float + nexttoward(float __x, long double __y) + { return __builtin_nexttowardf(__x, __y); } + + constexpr long double + nexttoward(long double __x, long double __y) + { return __builtin_nexttowardl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + nexttoward(_Tp __x, long double __y) + { return __builtin_nexttoward(__x, __y); } + + + + constexpr float + remainder(float __x, float __y) + { return __builtin_remainderf(__x, __y); } + + constexpr long double + remainder(long double __x, long double __y) + { return __builtin_remainderl(__x, __y); } + + + + template + constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + remainder(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return remainder(__type(__x), __type(__y)); + } + + + + inline float + remquo(float __x, float __y, int* __pquo) + { return __builtin_remquof(__x, __y, __pquo); } + + inline long double + remquo(long double __x, long double __y, int* __pquo) + { return __builtin_remquol(__x, __y, __pquo); } + + + + template + inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type + remquo(_Tp __x, _Up __y, int* __pquo) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return remquo(__type(__x), __type(__y), __pquo); + } + + + + constexpr float + rint(float __x) + { return __builtin_rintf(__x); } + + constexpr long double + rint(long double __x) + { return __builtin_rintl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + rint(_Tp __x) + { return __builtin_rint(__x); } + + + + constexpr float + round(float __x) + { return __builtin_roundf(__x); } + + constexpr long double + round(long double __x) + { return __builtin_roundl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + round(_Tp __x) + { return __builtin_round(__x); } + + + + constexpr float + scalbln(float __x, long __ex) + { return __builtin_scalblnf(__x, __ex); } + + constexpr long double + scalbln(long double __x, long __ex) + { return __builtin_scalblnl(__x, __ex); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + scalbln(_Tp __x, long __ex) + { return __builtin_scalbln(__x, __ex); } + + + + constexpr float + scalbn(float __x, int __ex) + { return __builtin_scalbnf(__x, __ex); } + + constexpr long double + scalbn(long double __x, int __ex) + { return __builtin_scalbnl(__x, __ex); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + scalbn(_Tp __x, int __ex) + { return __builtin_scalbn(__x, __ex); } + + + + constexpr float + tgamma(float __x) + { return __builtin_tgammaf(__x); } + + constexpr long double + tgamma(long double __x) + { return __builtin_tgammal(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tgamma(_Tp __x) + { return __builtin_tgamma(__x); } + + + + constexpr float + trunc(float __x) + { return __builtin_truncf(__x); } + + constexpr long double + trunc(long double __x) + { return __builtin_truncl(__x); } + + + + template + constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + trunc(_Tp __x) + { return __builtin_trunc(__x); } +# 1852 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 3 + template + inline _Tp + __hypot3(_Tp __x, _Tp __y, _Tp __z) + { + __x = std::abs(__x); + __y = std::abs(__y); + __z = std::abs(__z); + if (_Tp __a = __x < __y ? __y < __z ? __z : __y : __x < __z ? __z : __x) + return __a * std::sqrt((__x / __a) * (__x / __a) + + (__y / __a) * (__y / __a) + + (__z / __a) * (__z / __a)); + else + return {}; + } + + inline float + hypot(float __x, float __y, float __z) + { return std::__hypot3(__x, __y, __z); } + + inline double + hypot(double __x, double __y, double __z) + { return std::__hypot3(__x, __y, __z); } + + inline long double + hypot(long double __x, long double __y, long double __z) + { return std::__hypot3(__x, __y, __z); } + + template + typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type + hypot(_Tp __x, _Up __y, _Vp __z) + { + using __type = typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type; + return std::__hypot3<__type>(__x, __y, __z); + } + + + + + + + template + constexpr _Fp + __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept + { + if ((__a <= 0 && __b >= 0) || (__a >= 0 && __b <= 0)) + return __t * __b + (1 - __t) * __a; + + if (__t == 1) + return __b; + + + + const _Fp __x = __a + __t * (__b - __a); + return (__t > 1) == (__b > __a) + ? (__b < __x ? __x : __b) + : (__b > __x ? __x : __b); + } + + constexpr float + lerp(float __a, float __b, float __t) noexcept + { return std::__lerp(__a, __b, __t); } + + constexpr double + lerp(double __a, double __b, double __t) noexcept + { return std::__lerp(__a, __b, __t); } + + constexpr long double + lerp(long double __a, long double __b, long double __t) noexcept + { return std::__lerp(__a, __b, __t); } + + + +} + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 +#pragma GCC visibility push(default) +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 1 3 +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functexcept.h" 1 3 +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functexcept.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_defines.h" 1 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functexcept.h" 2 3 + +namespace std +{ + + + + void + __throw_bad_exception(void) __attribute__((__noreturn__)); + + + void + __throw_bad_alloc(void) __attribute__((__noreturn__)); + + void + __throw_bad_array_new_length(void) __attribute__((__noreturn__)); + + + void + __throw_bad_cast(void) __attribute__((__noreturn__)); + + void + __throw_bad_typeid(void) __attribute__((__noreturn__)); + + + void + __throw_logic_error(const char*) __attribute__((__noreturn__)); + + void + __throw_domain_error(const char*) __attribute__((__noreturn__)); + + void + __throw_invalid_argument(const char*) __attribute__((__noreturn__)); + + void + __throw_length_error(const char*) __attribute__((__noreturn__)); + + void + __throw_out_of_range(const char*) __attribute__((__noreturn__)); + + void + __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__)) + __attribute__((__format__(__gnu_printf__, 1, 2))); + + void + __throw_runtime_error(const char*) __attribute__((__noreturn__)); + + void + __throw_range_error(const char*) __attribute__((__noreturn__)); + + void + __throw_overflow_error(const char*) __attribute__((__noreturn__)); + + void + __throw_underflow_error(const char*) __attribute__((__noreturn__)); + + + void + __throw_ios_failure(const char*) __attribute__((__noreturn__)); + + void + __throw_ios_failure(const char*, int) __attribute__((__noreturn__)); + + + void + __throw_system_error(int) __attribute__((__noreturn__)); + + + void + __throw_future_error(int) __attribute__((__noreturn__)); + + + void + __throw_bad_function_call() __attribute__((__noreturn__)); + + +} +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + + + + +namespace __gnu_cxx +{ + +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + template + struct __is_integer_nonstrict + : public std::__is_integer<_Tp> + { + using std::__is_integer<_Tp>::__value; + + + enum { __width = __value ? sizeof(_Tp) * 8 : 0 }; + }; + + template + struct __numeric_traits_integer + { + + static_assert(__is_integer_nonstrict<_Value>::__value, + "invalid specialization"); + + + + + static const bool __is_signed = (_Value)(-1) < 0; + static const int __digits + = __is_integer_nonstrict<_Value>::__width - __is_signed; + + + static const _Value __max = __is_signed + ? (((((_Value)1 << (__digits - 1)) - 1) << 1) + 1) + : ~(_Value)0; + static const _Value __min = __is_signed ? -__max - 1 : (_Value)0; + }; + + template + const _Value __numeric_traits_integer<_Value>::__min; + + template + const _Value __numeric_traits_integer<_Value>::__max; + + template + const bool __numeric_traits_integer<_Value>::__is_signed; + + template + const int __numeric_traits_integer<_Value>::__digits; +# 128 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + template<> struct __is_integer_nonstrict<__int128> { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; }; template<> struct __is_integer_nonstrict { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; }; + + + + + + + template + using __int_traits = __numeric_traits_integer<_Tp>; +# 155 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + template + struct __numeric_traits_floating + { + + static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136); + + + static const bool __is_signed = true; + static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); + static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); + }; + + template + const int __numeric_traits_floating<_Value>::__max_digits10; + + template + const bool __numeric_traits_floating<_Value>::__is_signed; + + template + const int __numeric_traits_floating<_Value>::__digits10; + + template + const int __numeric_traits_floating<_Value>::__max_exponent10; + + + + + + + template + struct __numeric_traits + : public __numeric_traits_integer<_Value> + { }; + + template<> + struct __numeric_traits + : public __numeric_traits_floating + { }; + + template<> + struct __numeric_traits + : public __numeric_traits_floating + { }; + + template<> + struct __numeric_traits + : public __numeric_traits_floating + { }; +# 236 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/numeric_traits.h" 3 + +} +# 64 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 1 3 +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 1 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 +namespace std +{ + + + + + + + + template + inline constexpr _Tp* + __addressof(_Tp& __r) noexcept + { return __builtin_addressof(__r); } + + + + +} + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + + + + + + + +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct integral_constant + { + static constexpr _Tp value = __v; + typedef _Tp value_type; + typedef integral_constant<_Tp, __v> type; + constexpr operator value_type() const noexcept { return value; } + + + + + constexpr value_type operator()() const noexcept { return value; } + + }; + + template + constexpr _Tp integral_constant<_Tp, __v>::value; + + + typedef integral_constant true_type; + + + typedef integral_constant false_type; + + template + using __bool_constant = integral_constant; + + + + template + using bool_constant = integral_constant; + + + + + template + struct conditional; + + template + struct __type_identity + { using type = _Type; }; + + template + using __type_identity_t = typename __type_identity<_Tp>::type; + + template + struct __or_; + + template<> + struct __or_<> + : public false_type + { }; + + template + struct __or_<_B1> + : public _B1 + { }; + + template + struct __or_<_B1, _B2> + : public conditional<_B1::value, _B1, _B2>::type + { }; + + template + struct __or_<_B1, _B2, _B3, _Bn...> + : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type + { }; + + template + struct __and_; + + template<> + struct __and_<> + : public true_type + { }; + + template + struct __and_<_B1> + : public _B1 + { }; + + template + struct __and_<_B1, _B2> + : public conditional<_B1::value, _B2, _B1>::type + { }; + + template + struct __and_<_B1, _B2, _B3, _Bn...> + : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type + { }; + + template + struct __not_ + : public __bool_constant + { }; + + + + template + inline constexpr bool __or_v = __or_<_Bn...>::value; + template + inline constexpr bool __and_v = __and_<_Bn...>::value; + + + + template + struct conjunction + : __and_<_Bn...> + { }; + + template + struct disjunction + : __or_<_Bn...> + { }; + + template + struct negation + : __not_<_Pp> + { }; + + template + inline constexpr bool conjunction_v = conjunction<_Bn...>::value; + + template + inline constexpr bool disjunction_v = disjunction<_Bn...>::value; + + template + inline constexpr bool negation_v = negation<_Pp>::value; + + + + + template + struct is_reference; + template + struct is_function; + template + struct is_void; + template + struct __is_array_unknown_bounds; + + + + + template + constexpr true_type __is_complete_or_unbounded(__type_identity<_Tp>) + { return {}; } + + template + constexpr typename __or_< + is_reference<_NestedType>, + is_function<_NestedType>, + is_void<_NestedType>, + __is_array_unknown_bounds<_NestedType> + >::type __is_complete_or_unbounded(_TypeIdentity) + { return {}; } + + + + + + + template + struct __success_type + { typedef _Tp type; }; + + struct __failure_type + { }; + + template + struct remove_cv; + + + template + using __remove_cv_t = typename remove_cv<_Tp>::type; + + template + struct is_const; + + + + template + struct __is_void_helper + : public false_type { }; + + template<> + struct __is_void_helper + : public true_type { }; + + + template + struct is_void + : public __is_void_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct __is_integral_helper + : public false_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + + + + + template<> + struct __is_integral_helper + : public true_type { }; + + + + template<> + struct __is_integral_helper + : public true_type { }; + + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; + + template<> + struct __is_integral_helper + : public true_type { }; +# 367 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct is_integral + : public __is_integral_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct __is_floating_point_helper + : public false_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; + + template<> + struct __is_floating_point_helper + : public true_type { }; +# 395 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct is_floating_point + : public __is_floating_point_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_array + : public false_type { }; + + template + struct is_array<_Tp[_Size]> + : public true_type { }; + + template + struct is_array<_Tp[]> + : public true_type { }; + + template + struct __is_pointer_helper + : public false_type { }; + + template + struct __is_pointer_helper<_Tp*> + : public true_type { }; + + + template + struct is_pointer + : public __is_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_lvalue_reference + : public false_type { }; + + template + struct is_lvalue_reference<_Tp&> + : public true_type { }; + + + template + struct is_rvalue_reference + : public false_type { }; + + template + struct is_rvalue_reference<_Tp&&> + : public true_type { }; + + template + struct __is_member_object_pointer_helper + : public false_type { }; + + template + struct __is_member_object_pointer_helper<_Tp _Cp::*> + : public __not_>::type { }; + + + template + struct is_member_object_pointer + : public __is_member_object_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct __is_member_function_pointer_helper + : public false_type { }; + + template + struct __is_member_function_pointer_helper<_Tp _Cp::*> + : public is_function<_Tp>::type { }; + + + template + struct is_member_function_pointer + : public __is_member_function_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct is_enum + : public integral_constant + { }; + + + template + struct is_union + : public integral_constant + { }; + + + template + struct is_class + : public integral_constant + { }; + + + template + struct is_function + : public __bool_constant::value> { }; + + template + struct is_function<_Tp&> + : public false_type { }; + + template + struct is_function<_Tp&&> + : public false_type { }; + + + + template + struct __is_null_pointer_helper + : public false_type { }; + + template<> + struct __is_null_pointer_helper + : public true_type { }; + + + template + struct is_null_pointer + : public __is_null_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + + template + struct __is_nullptr_t + : public is_null_pointer<_Tp> + { } __attribute__ ((__deprecated__ ("use '" "std::is_null_pointer" "' instead"))); + + + + + template + struct is_reference + : public __or_, + is_rvalue_reference<_Tp>>::type + { }; + + + template + struct is_arithmetic + : public __or_, is_floating_point<_Tp>>::type + { }; + + + template + struct is_fundamental + : public __or_, is_void<_Tp>, + is_null_pointer<_Tp>>::type + { }; + + + template + struct is_object + : public __not_<__or_, is_reference<_Tp>, + is_void<_Tp>>>::type + { }; + + template + struct is_member_pointer; + + + template + struct is_scalar + : public __or_, is_enum<_Tp>, is_pointer<_Tp>, + is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type + { }; + + + template + struct is_compound + : public __not_>::type { }; + + template + struct __is_member_pointer_helper + : public false_type { }; + + template + struct __is_member_pointer_helper<_Tp _Cp::*> + : public true_type { }; + + + template + struct is_member_pointer + : public __is_member_pointer_helper<__remove_cv_t<_Tp>>::type + { }; + + template + struct is_same; + + template + using __is_one_of = __or_...>; + + + template + using __is_signed_integer = __is_one_of<__remove_cv_t<_Tp>, + signed char, signed short, signed int, signed long, + signed long long +# 607 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + >; + + + template + using __is_unsigned_integer = __is_one_of<__remove_cv_t<_Tp>, + unsigned char, unsigned short, unsigned int, unsigned long, + unsigned long long +# 626 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + >; + + + template + using __is_standard_integer + = __or_<__is_signed_integer<_Tp>, __is_unsigned_integer<_Tp>>; + + + template using __void_t = void; + + + + template + struct __is_referenceable + : public false_type + { }; + + template + struct __is_referenceable<_Tp, __void_t<_Tp&>> + : public true_type + { }; + + + + + template + struct is_const + : public false_type { }; + + template + struct is_const<_Tp const> + : public true_type { }; + + + template + struct is_volatile + : public false_type { }; + + template + struct is_volatile<_Tp volatile> + : public true_type { }; + + + template + struct is_trivial + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_copyable + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_standard_layout + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + template + struct + [[deprecated("use is_standard_layout && is_trivial instead")]] + is_pod + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct + [[__deprecated__]] + is_literal_type + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_empty + : public integral_constant + { }; + + + template + struct is_polymorphic + : public integral_constant + { }; + + + + + template + struct is_final + : public integral_constant + { }; + + + + template + struct is_abstract + : public integral_constant + { }; + + template::value> + struct __is_signed_helper + : public false_type { }; + + template + struct __is_signed_helper<_Tp, true> + : public integral_constant + { }; + + + template + struct is_signed + : public __is_signed_helper<_Tp>::type + { }; + + + template + struct is_unsigned + : public __and_, __not_>> + { }; +# 775 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + _Up + __declval(int); + + template + _Tp + __declval(long); + + template + auto declval() noexcept -> decltype(__declval<_Tp>(0)); + + template + struct extent; + + template + struct remove_all_extents; + + template + struct __is_array_known_bounds + : public integral_constant::value > 0)> + { }; + + template + struct __is_array_unknown_bounds + : public __and_, __not_>> + { }; + + + + + + + struct __do_is_destructible_impl + { + template().~_Tp())> + static true_type __test(int); + + template + static false_type __test(...); + }; + + template + struct __is_destructible_impl + : public __do_is_destructible_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template, + __is_array_unknown_bounds<_Tp>, + is_function<_Tp>>::value, + bool = __or_, is_scalar<_Tp>>::value> + struct __is_destructible_safe; + + template + struct __is_destructible_safe<_Tp, false, false> + : public __is_destructible_impl::type>::type + { }; + + template + struct __is_destructible_safe<_Tp, true, false> + : public false_type { }; + + template + struct __is_destructible_safe<_Tp, false, true> + : public true_type { }; + + + template + struct is_destructible + : public __is_destructible_safe<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + + + struct __do_is_nt_destructible_impl + { + template + static __bool_constant().~_Tp())> + __test(int); + + template + static false_type __test(...); + }; + + template + struct __is_nt_destructible_impl + : public __do_is_nt_destructible_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template, + __is_array_unknown_bounds<_Tp>, + is_function<_Tp>>::value, + bool = __or_, is_scalar<_Tp>>::value> + struct __is_nt_destructible_safe; + + template + struct __is_nt_destructible_safe<_Tp, false, false> + : public __is_nt_destructible_impl::type>::type + { }; + + template + struct __is_nt_destructible_safe<_Tp, true, false> + : public false_type { }; + + template + struct __is_nt_destructible_safe<_Tp, false, true> + : public true_type { }; + + + template + struct is_nothrow_destructible + : public __is_nt_destructible_safe<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + struct __is_constructible_impl + : public __bool_constant<__is_constructible(_Tp, _Args...)> + { }; + + + template + struct is_constructible + : public __is_constructible_impl<_Tp, _Args...> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_default_constructible + : public __is_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_copy_constructible_impl; + + template + struct __is_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_copy_constructible_impl<_Tp, true> + : public __is_constructible_impl<_Tp, const _Tp&> + { }; + + + template + struct is_copy_constructible + : public __is_copy_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_move_constructible_impl; + + template + struct __is_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_move_constructible_impl<_Tp, true> + : public __is_constructible_impl<_Tp, _Tp&&> + { }; + + + template + struct is_move_constructible + : public __is_move_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + using __is_nothrow_constructible_impl + = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>; + + + template + struct is_nothrow_constructible + : public __is_nothrow_constructible_impl<_Tp, _Args...>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_default_constructible + : public __bool_constant<__is_nothrow_constructible(_Tp)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template::value> + struct __is_nothrow_copy_constructible_impl; + + template + struct __is_nothrow_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nothrow_copy_constructible_impl<_Tp, true> + : public __is_nothrow_constructible_impl<_Tp, const _Tp&> + { }; + + + template + struct is_nothrow_copy_constructible + : public __is_nothrow_copy_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_nothrow_move_constructible_impl; + + template + struct __is_nothrow_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nothrow_move_constructible_impl<_Tp, true> + : public __is_nothrow_constructible_impl<_Tp, _Tp&&> + { }; + + + template + struct is_nothrow_move_constructible + : public __is_nothrow_move_constructible_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_assignable + : public __bool_constant<__is_assignable(_Tp, _Up)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_copy_assignable_impl; + + template + struct __is_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_copy_assignable_impl<_Tp, true> + : public __bool_constant<__is_assignable(_Tp&, const _Tp&)> + { }; + + + template + struct is_copy_assignable + : public __is_copy_assignable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_move_assignable_impl; + + template + struct __is_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_move_assignable_impl<_Tp, true> + : public __bool_constant<__is_assignable(_Tp&, _Tp&&)> + { }; + + + template + struct is_move_assignable + : public __is_move_assignable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + using __is_nothrow_assignable_impl + = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>; + + + template + struct is_nothrow_assignable + : public __is_nothrow_assignable_impl<_Tp, _Up> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_nt_copy_assignable_impl; + + template + struct __is_nt_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nt_copy_assignable_impl<_Tp, true> + : public __is_nothrow_assignable_impl<_Tp&, const _Tp&> + { }; + + + template + struct is_nothrow_copy_assignable + : public __is_nt_copy_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_nt_move_assignable_impl; + + template + struct __is_nt_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_nt_move_assignable_impl<_Tp, true> + : public __is_nothrow_assignable_impl<_Tp&, _Tp&&> + { }; + + + template + struct is_nothrow_move_assignable + : public __is_nt_move_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_constructible + : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_default_constructible + : public __bool_constant<__is_trivially_constructible(_Tp)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + struct __do_is_implicitly_default_constructible_impl + { + template + static void __helper(const _Tp&); + + template + static true_type __test(const _Tp&, + decltype(__helper({}))* = 0); + + static false_type __test(...); + }; + + template + struct __is_implicitly_default_constructible_impl + : public __do_is_implicitly_default_constructible_impl + { + typedef decltype(__test(declval<_Tp>())) type; + }; + + template + struct __is_implicitly_default_constructible_safe + : public __is_implicitly_default_constructible_impl<_Tp>::type + { }; + + template + struct __is_implicitly_default_constructible + : public __and_<__is_constructible_impl<_Tp>, + __is_implicitly_default_constructible_safe<_Tp>> + { }; + + template::value> + struct __is_trivially_copy_constructible_impl; + + template + struct __is_trivially_copy_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_copy_constructible_impl<_Tp, true> + : public __and_<__is_copy_constructible_impl<_Tp>, + integral_constant> + { }; + + + template + struct is_trivially_copy_constructible + : public __is_trivially_copy_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_move_constructible_impl; + + template + struct __is_trivially_move_constructible_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_move_constructible_impl<_Tp, true> + : public __and_<__is_move_constructible_impl<_Tp>, + integral_constant> + { }; + + + template + struct is_trivially_move_constructible + : public __is_trivially_move_constructible_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_assignable + : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_copy_assignable_impl; + + template + struct __is_trivially_copy_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_copy_assignable_impl<_Tp, true> + : public __bool_constant<__is_trivially_assignable(_Tp&, const _Tp&)> + { }; + + + template + struct is_trivially_copy_assignable + : public __is_trivially_copy_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template::value> + struct __is_trivially_move_assignable_impl; + + template + struct __is_trivially_move_assignable_impl<_Tp, false> + : public false_type { }; + + template + struct __is_trivially_move_assignable_impl<_Tp, true> + : public __bool_constant<__is_trivially_assignable(_Tp&, _Tp&&)> + { }; + + + template + struct is_trivially_move_assignable + : public __is_trivially_move_assignable_impl<_Tp> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_trivially_destructible + : public __and_<__is_destructible_safe<_Tp>, + __bool_constant<__has_trivial_destructor(_Tp)>> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + template + struct has_virtual_destructor + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + + + template + struct alignment_of + : public integral_constant + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct rank + : public integral_constant { }; + + template + struct rank<_Tp[_Size]> + : public integral_constant::value> { }; + + template + struct rank<_Tp[]> + : public integral_constant::value> { }; + + + template + struct extent + : public integral_constant { }; + + template + struct extent<_Tp[_Size], _Uint> + : public integral_constant::value> + { }; + + template + struct extent<_Tp[], _Uint> + : public integral_constant::value> + { }; + + + + + + template + struct is_same + + : public integral_constant + + + + { }; +# 1370 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct is_base_of + : public integral_constant + { }; + + template, is_function<_To>, + is_array<_To>>::value> + struct __is_convertible_helper + { + typedef typename is_void<_To>::type type; + }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + template + class __is_convertible_helper<_From, _To, false> + { + template + static void __test_aux(_To1) noexcept; + + template(std::declval<_From1>()))> + static true_type + __test(int); + + template + static false_type + __test(...); + + public: + typedef decltype(__test<_From, _To>(0)) type; + }; +#pragma GCC diagnostic pop + + + template + struct is_convertible + : public __is_convertible_helper<_From, _To>::type + { }; + + + template + using __is_array_convertible + = is_convertible<_FromElementType(*)[], _ToElementType(*)[]>; + + template, is_function<_To>, + is_array<_To>>::value> + struct __is_nt_convertible_helper + : is_void<_To> + { }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + template + class __is_nt_convertible_helper<_From, _To, false> + { + template + static void __test_aux(_To1) noexcept; + + template + static + __bool_constant(std::declval<_From1>()))> + __test(int); + + template + static false_type + __test(...); + + public: + using type = decltype(__test<_From, _To>(0)); + }; +#pragma GCC diagnostic pop + + + template + struct __is_nothrow_convertible + : public __is_nt_convertible_helper<_From, _To>::type + { }; + + + + + template + struct is_nothrow_convertible + : public __is_nt_convertible_helper<_From, _To>::type + { }; + + + template + inline constexpr bool is_nothrow_convertible_v + = is_nothrow_convertible<_From, _To>::value; + + + + + + template + struct remove_const + { typedef _Tp type; }; + + template + struct remove_const<_Tp const> + { typedef _Tp type; }; + + + template + struct remove_volatile + { typedef _Tp type; }; + + template + struct remove_volatile<_Tp volatile> + { typedef _Tp type; }; + + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + template + struct remove_cv + { using type = _Tp; }; + + + template + struct add_const + { typedef _Tp const type; }; + + + template + struct add_volatile + { typedef _Tp volatile type; }; + + + template + struct add_cv + { + typedef typename + add_const::type>::type type; + }; + + + + + + + template + using remove_const_t = typename remove_const<_Tp>::type; + + + template + using remove_volatile_t = typename remove_volatile<_Tp>::type; + + + template + using remove_cv_t = typename remove_cv<_Tp>::type; + + + template + using add_const_t = typename add_const<_Tp>::type; + + + template + using add_volatile_t = typename add_volatile<_Tp>::type; + + + template + using add_cv_t = typename add_cv<_Tp>::type; + + + + + + template + struct remove_reference + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&> + { typedef _Tp type; }; + + template + struct remove_reference<_Tp&&> + { typedef _Tp type; }; + + template::value> + struct __add_lvalue_reference_helper + { typedef _Tp type; }; + + template + struct __add_lvalue_reference_helper<_Tp, true> + { typedef _Tp& type; }; + + + template + struct add_lvalue_reference + : public __add_lvalue_reference_helper<_Tp> + { }; + + template::value> + struct __add_rvalue_reference_helper + { typedef _Tp type; }; + + template + struct __add_rvalue_reference_helper<_Tp, true> + { typedef _Tp&& type; }; + + + template + struct add_rvalue_reference + : public __add_rvalue_reference_helper<_Tp> + { }; + + + + template + using remove_reference_t = typename remove_reference<_Tp>::type; + + + template + using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type; + + + template + using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type; + + + + + + template + struct __cv_selector; + + template + struct __cv_selector<_Unqualified, false, false> + { typedef _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, false, true> + { typedef volatile _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, true, false> + { typedef const _Unqualified __type; }; + + template + struct __cv_selector<_Unqualified, true, true> + { typedef const volatile _Unqualified __type; }; + + template::value, + bool _IsVol = is_volatile<_Qualified>::value> + class __match_cv_qualifiers + { + typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; + + public: + typedef typename __match::__type __type; + }; + + + template + struct __make_unsigned + { typedef _Tp __type; }; + + template<> + struct __make_unsigned + { typedef unsigned char __type; }; + + template<> + struct __make_unsigned + { typedef unsigned char __type; }; + + template<> + struct __make_unsigned + { typedef unsigned short __type; }; + + template<> + struct __make_unsigned + { typedef unsigned int __type; }; + + template<> + struct __make_unsigned + { typedef unsigned long __type; }; + + template<> + struct __make_unsigned + { typedef unsigned long long __type; }; +# 1690 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template::value, + bool _IsEnum = is_enum<_Tp>::value> + class __make_unsigned_selector; + + template + class __make_unsigned_selector<_Tp, true, false> + { + using __unsigned_type + = typename __make_unsigned<__remove_cv_t<_Tp>>::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; + }; + + class __make_unsigned_selector_base + { + protected: + template struct _List { }; + + template + struct _List<_Tp, _Up...> : _List<_Up...> + { static constexpr size_t __size = sizeof(_Tp); }; + + template + struct __select; + + template + struct __select<_Sz, _List<_Uint, _UInts...>, true> + { using __type = _Uint; }; + + template + struct __select<_Sz, _List<_Uint, _UInts...>, false> + : __select<_Sz, _List<_UInts...>> + { }; + }; + + + template + class __make_unsigned_selector<_Tp, false, true> + : __make_unsigned_selector_base + { + + using _UInts = _List; + + using __unsigned_type = typename __select::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __unsigned_type>::__type; + }; + + + + + + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + template<> + struct __make_unsigned + { + using __type + = typename __make_unsigned_selector::__type; + }; + + + + + + template + struct make_unsigned + { typedef typename __make_unsigned_selector<_Tp>::__type type; }; + + + template<> + struct make_unsigned; + + + + template + struct __make_signed + { typedef _Tp __type; }; + + template<> + struct __make_signed + { typedef signed char __type; }; + + template<> + struct __make_signed + { typedef signed char __type; }; + + template<> + struct __make_signed + { typedef signed short __type; }; + + template<> + struct __make_signed + { typedef signed int __type; }; + + template<> + struct __make_signed + { typedef signed long __type; }; + + template<> + struct __make_signed + { typedef signed long long __type; }; +# 1844 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template::value, + bool _IsEnum = is_enum<_Tp>::value> + class __make_signed_selector; + + template + class __make_signed_selector<_Tp, true, false> + { + using __signed_type + = typename __make_signed<__remove_cv_t<_Tp>>::__type; + + public: + using __type + = typename __match_cv_qualifiers<_Tp, __signed_type>::__type; + }; + + + template + class __make_signed_selector<_Tp, false, true> + { + typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; + + public: + typedef typename __make_signed_selector<__unsigned_type>::__type __type; + }; + + + + + + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + template<> + struct __make_signed + { + using __type + = typename __make_signed_selector::__type; + }; + + + + + + template + struct make_signed + { typedef typename __make_signed_selector<_Tp>::__type type; }; + + + template<> + struct make_signed; + + + + template + using make_signed_t = typename make_signed<_Tp>::type; + + + template + using make_unsigned_t = typename make_unsigned<_Tp>::type; + + + + + + template + struct remove_extent + { typedef _Tp type; }; + + template + struct remove_extent<_Tp[_Size]> + { typedef _Tp type; }; + + template + struct remove_extent<_Tp[]> + { typedef _Tp type; }; + + + template + struct remove_all_extents + { typedef _Tp type; }; + + template + struct remove_all_extents<_Tp[_Size]> + { typedef typename remove_all_extents<_Tp>::type type; }; + + template + struct remove_all_extents<_Tp[]> + { typedef typename remove_all_extents<_Tp>::type type; }; + + + + template + using remove_extent_t = typename remove_extent<_Tp>::type; + + + template + using remove_all_extents_t = typename remove_all_extents<_Tp>::type; + + + + + template + struct __remove_pointer_helper + { typedef _Tp type; }; + + template + struct __remove_pointer_helper<_Tp, _Up*> + { typedef _Up type; }; + + + template + struct remove_pointer + : public __remove_pointer_helper<_Tp, __remove_cv_t<_Tp>> + { }; + + + template, + is_void<_Tp>>::value> + struct __add_pointer_helper + { typedef _Tp type; }; + + template + struct __add_pointer_helper<_Tp, true> + { typedef typename remove_reference<_Tp>::type* type; }; + + template + struct add_pointer + : public __add_pointer_helper<_Tp> + { }; + + + + template + using remove_pointer_t = typename remove_pointer<_Tp>::type; + + + template + using add_pointer_t = typename add_pointer<_Tp>::type; + + + template + struct __aligned_storage_msa + { + union __type + { + unsigned char __data[_Len]; + struct __attribute__((__aligned__)) { } __align; + }; + }; +# 2027 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template::__type)> + struct aligned_storage + { + union type + { + unsigned char __data[_Len]; + struct __attribute__((__aligned__((_Align)))) { } __align; + }; + }; + + template + struct __strictest_alignment + { + static const size_t _S_alignment = 0; + static const size_t _S_size = 0; + }; + + template + struct __strictest_alignment<_Tp, _Types...> + { + static const size_t _S_alignment = + alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment + ? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment; + static const size_t _S_size = + sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size + ? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size; + }; +# 2066 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct aligned_union + { + private: + static_assert(sizeof...(_Types) != 0, "At least one type is required"); + + using __strictest = __strictest_alignment<_Types...>; + static const size_t _S_len = _Len > __strictest::_S_size + ? _Len : __strictest::_S_size; + public: + + static const size_t alignment_value = __strictest::_S_alignment; + + typedef typename aligned_storage<_S_len, alignment_value>::type type; + }; + + template + const size_t aligned_union<_Len, _Types...>::alignment_value; + + + + template::value, + bool _IsFunction = is_function<_Up>::value> + struct __decay_selector; + + + template + struct __decay_selector<_Up, false, false> + { typedef __remove_cv_t<_Up> __type; }; + + template + struct __decay_selector<_Up, true, false> + { typedef typename remove_extent<_Up>::type* __type; }; + + template + struct __decay_selector<_Up, false, true> + { typedef typename add_pointer<_Up>::type __type; }; + + + template + class decay + { + typedef typename remove_reference<_Tp>::type __remove_type; + + public: + typedef typename __decay_selector<__remove_type>::__type type; + }; + + + template + using __decay_t = typename decay<_Tp>::type; + + template + class reference_wrapper; + + + template + struct __strip_reference_wrapper + { + typedef _Tp __type; + }; + + template + struct __strip_reference_wrapper > + { + typedef _Tp& __type; + }; + + template + using __decay_and_strip = __strip_reference_wrapper<__decay_t<_Tp>>; + + + + + template + struct enable_if + { }; + + + template + struct enable_if + { typedef _Tp type; }; + + + template + using __enable_if_t = typename enable_if<_Cond, _Tp>::type; + + template + using _Require = __enable_if_t<__and_<_Cond...>::value>; + + + + template + struct conditional + { typedef _Iftrue type; }; + + + template + struct conditional + { typedef _Iffalse type; }; + + + template + using __remove_cvref_t + = typename remove_cv::type>::type; + + + template + struct common_type; + + + + struct __do_common_type_impl + { + template + using __cond_t + = decltype(true ? std::declval<_Tp>() : std::declval<_Up>()); + + + + template + static __success_type<__decay_t<__cond_t<_Tp, _Up>>> + _S_test(int); + + + + + template + static __success_type<__remove_cvref_t<__cond_t>> + _S_test_2(int); + + + template + static __failure_type + _S_test_2(...); + + template + static decltype(_S_test_2<_Tp, _Up>(0)) + _S_test(...); + }; + + + template<> + struct common_type<> + { }; + + + template + struct common_type<_Tp0> + : public common_type<_Tp0, _Tp0> + { }; + + + template, typename _Dp2 = __decay_t<_Tp2>> + struct __common_type_impl + { + + + using type = common_type<_Dp1, _Dp2>; + }; + + template + struct __common_type_impl<_Tp1, _Tp2, _Tp1, _Tp2> + : private __do_common_type_impl + { + + + using type = decltype(_S_test<_Tp1, _Tp2>(0)); + }; + + + template + struct common_type<_Tp1, _Tp2> + : public __common_type_impl<_Tp1, _Tp2>::type + { }; + + template + struct __common_type_pack + { }; + + template + struct __common_type_fold; + + + template + struct common_type<_Tp1, _Tp2, _Rp...> + : public __common_type_fold, + __common_type_pack<_Rp...>> + { }; + + + + + template + struct __common_type_fold<_CTp, __common_type_pack<_Rp...>, + __void_t> + : public common_type + { }; + + + template + struct __common_type_fold<_CTp, _Rp, void> + { }; + + template::value> + struct __underlying_type_impl + { + using type = __underlying_type(_Tp); + }; + + template + struct __underlying_type_impl<_Tp, false> + { }; + + + template + struct underlying_type + : public __underlying_type_impl<_Tp> + { }; + + template + struct __declval_protector + { + static const bool __stop = false; + }; + + template + auto declval() noexcept -> decltype(__declval<_Tp>(0)) + { + static_assert(__declval_protector<_Tp>::__stop, + "declval() must not be used!"); + return __declval<_Tp>(0); + } + + + template + struct result_of; + + + + + + struct __invoke_memfun_ref { }; + struct __invoke_memfun_deref { }; + struct __invoke_memobj_ref { }; + struct __invoke_memobj_deref { }; + struct __invoke_other { }; + + + template + struct __result_of_success : __success_type<_Tp> + { using __invoke_type = _Tag; }; + + + struct __result_of_memfun_ref_impl + { + template + static __result_of_success().*std::declval<_Fp>())(std::declval<_Args>()...) + ), __invoke_memfun_ref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memfun_ref + : private __result_of_memfun_ref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; + }; + + + struct __result_of_memfun_deref_impl + { + template + static __result_of_success()).*std::declval<_Fp>())(std::declval<_Args>()...) + ), __invoke_memfun_deref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memfun_deref + : private __result_of_memfun_deref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; + }; + + + struct __result_of_memobj_ref_impl + { + template + static __result_of_success().*std::declval<_Fp>() + ), __invoke_memobj_ref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memobj_ref + : private __result_of_memobj_ref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; + }; + + + struct __result_of_memobj_deref_impl + { + template + static __result_of_success()).*std::declval<_Fp>() + ), __invoke_memobj_deref> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_memobj_deref + : private __result_of_memobj_deref_impl + { + typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; + }; + + template + struct __result_of_memobj; + + template + struct __result_of_memobj<_Res _Class::*, _Arg> + { + typedef __remove_cvref_t<_Arg> _Argval; + typedef _Res _Class::* _MemPtr; + typedef typename conditional<__or_, + is_base_of<_Class, _Argval>>::value, + __result_of_memobj_ref<_MemPtr, _Arg>, + __result_of_memobj_deref<_MemPtr, _Arg> + >::type::type type; + }; + + template + struct __result_of_memfun; + + template + struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> + { + typedef typename remove_reference<_Arg>::type _Argval; + typedef _Res _Class::* _MemPtr; + typedef typename conditional::value, + __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, + __result_of_memfun_deref<_MemPtr, _Arg, _Args...> + >::type::type type; + }; + + + + + + + template> + struct __inv_unwrap + { + using type = _Tp; + }; + + template + struct __inv_unwrap<_Tp, reference_wrapper<_Up>> + { + using type = _Up&; + }; + + template + struct __result_of_impl + { + typedef __failure_type type; + }; + + template + struct __result_of_impl + : public __result_of_memobj<__decay_t<_MemPtr>, + typename __inv_unwrap<_Arg>::type> + { }; + + template + struct __result_of_impl + : public __result_of_memfun<__decay_t<_MemPtr>, + typename __inv_unwrap<_Arg>::type, _Args...> + { }; + + + struct __result_of_other_impl + { + template + static __result_of_success()(std::declval<_Args>()...) + ), __invoke_other> _S_test(int); + + template + static __failure_type _S_test(...); + }; + + template + struct __result_of_impl + : private __result_of_other_impl + { + typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; + }; + + + template + struct __invoke_result + : public __result_of_impl< + is_member_object_pointer< + typename remove_reference<_Functor>::type + >::value, + is_member_function_pointer< + typename remove_reference<_Functor>::type + >::value, + _Functor, _ArgTypes... + >::type + { }; + + template + struct result_of<_Functor(_ArgTypes...)> + : public __invoke_result<_Functor, _ArgTypes...> + { }; + + + + template::__type)> + using aligned_storage_t = typename aligned_storage<_Len, _Align>::type; + + template + using aligned_union_t = typename aligned_union<_Len, _Types...>::type; + + + template + using decay_t = typename decay<_Tp>::type; + + + template + using enable_if_t = typename enable_if<_Cond, _Tp>::type; + + + template + using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type; + + + template + using common_type_t = typename common_type<_Tp...>::type; + + + template + using underlying_type_t = typename underlying_type<_Tp>::type; + + + template + using result_of_t = typename result_of<_Tp>::type; + + + + + + template using void_t = void; + + + + template class _Op, typename... _Args> + struct __detector + { + using value_t = false_type; + using type = _Default; + }; + + + template class _Op, + typename... _Args> + struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> + { + using value_t = true_type; + using type = _Op<_Args...>; + }; + + + template class _Op, + typename... _Args> + using __detected_or = __detector<_Default, void, _Op, _Args...>; + + + template class _Op, + typename... _Args> + using __detected_or_t + = typename __detected_or<_Default, _Op, _Args...>::type; +# 2584 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + template + struct __is_swappable; + + template + struct __is_nothrow_swappable; + + template + class tuple; + + template + struct __is_tuple_like_impl : false_type + { }; + + template + struct __is_tuple_like_impl> : true_type + { }; + + + template + struct __is_tuple_like + : public __is_tuple_like_impl<__remove_cvref_t<_Tp>>::type + { }; + + template + constexpr + inline + _Require<__not_<__is_tuple_like<_Tp>>, + is_move_constructible<_Tp>, + is_move_assignable<_Tp>> + swap(_Tp&, _Tp&) + noexcept(__and_, + is_nothrow_move_assignable<_Tp>>::value); + + template + constexpr + inline + __enable_if_t<__is_swappable<_Tp>::value> + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + noexcept(__is_nothrow_swappable<_Tp>::value); + + namespace __swappable_details { + using std::swap; + + struct __do_is_swappable_impl + { + template(), std::declval<_Tp&>()))> + static true_type __test(int); + + template + static false_type __test(...); + }; + + struct __do_is_nothrow_swappable_impl + { + template + static __bool_constant< + noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) + > __test(int); + + template + static false_type __test(...); + }; + + } + + template + struct __is_swappable_impl + : public __swappable_details::__do_is_swappable_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template + struct __is_nothrow_swappable_impl + : public __swappable_details::__do_is_nothrow_swappable_impl + { + typedef decltype(__test<_Tp>(0)) type; + }; + + template + struct __is_swappable + : public __is_swappable_impl<_Tp>::type + { }; + + template + struct __is_nothrow_swappable + : public __is_nothrow_swappable_impl<_Tp>::type + { }; + + + + + + + template + struct is_swappable + : public __is_swappable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_swappable + : public __is_nothrow_swappable_impl<_Tp>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + + + template + inline constexpr bool is_swappable_v = + is_swappable<_Tp>::value; + + + template + inline constexpr bool is_nothrow_swappable_v = + is_nothrow_swappable<_Tp>::value; + + + namespace __swappable_with_details { + using std::swap; + + struct __do_is_swappable_with_impl + { + template(), std::declval<_Up>())), + typename + = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))> + static true_type __test(int); + + template + static false_type __test(...); + }; + + struct __do_is_nothrow_swappable_with_impl + { + template + static __bool_constant< + noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())) + && + noexcept(swap(std::declval<_Up>(), std::declval<_Tp>())) + > __test(int); + + template + static false_type __test(...); + }; + + } + + template + struct __is_swappable_with_impl + : public __swappable_with_details::__do_is_swappable_with_impl + { + typedef decltype(__test<_Tp, _Up>(0)) type; + }; + + + template + struct __is_swappable_with_impl<_Tp&, _Tp&> + : public __swappable_details::__do_is_swappable_impl + { + typedef decltype(__test<_Tp&>(0)) type; + }; + + template + struct __is_nothrow_swappable_with_impl + : public __swappable_with_details::__do_is_nothrow_swappable_with_impl + { + typedef decltype(__test<_Tp, _Up>(0)) type; + }; + + + template + struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&> + : public __swappable_details::__do_is_nothrow_swappable_impl + { + typedef decltype(__test<_Tp&>(0)) type; + }; + + + template + struct is_swappable_with + : public __is_swappable_with_impl<_Tp, _Up>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "first template argument must be a complete class or an unbounded array"); + static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}), + "second template argument must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_swappable_with + : public __is_nothrow_swappable_with_impl<_Tp, _Up>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "first template argument must be a complete class or an unbounded array"); + static_assert(std::__is_complete_or_unbounded(__type_identity<_Up>{}), + "second template argument must be a complete class or an unbounded array"); + }; + + + + template + inline constexpr bool is_swappable_with_v = + is_swappable_with<_Tp, _Up>::value; + + + template + inline constexpr bool is_nothrow_swappable_with_v = + is_nothrow_swappable_with<_Tp, _Up>::value; + + + + + + + + template::value, typename = void> + struct __is_invocable_impl : false_type { }; + + + template + struct __is_invocable_impl<_Result, _Ret, + true, + __void_t> + : true_type + { }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + + template + struct __is_invocable_impl<_Result, _Ret, + false, + __void_t> + { + private: + + + static typename _Result::type _S_get(); + + template + static void _S_conv(_Tp); + + + template(_S_get()))> + static true_type + _S_test(int); + + template + static false_type + _S_test(...); + + public: + using type = decltype(_S_test<_Ret>(1)); + }; +#pragma GCC diagnostic pop + + template + struct __is_invocable + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type + { }; + + template + constexpr bool __call_is_nt(__invoke_memfun_ref) + { + using _Up = typename __inv_unwrap<_Tp>::type; + return noexcept((std::declval<_Up>().*std::declval<_Fn>())( + std::declval<_Args>()...)); + } + + template + constexpr bool __call_is_nt(__invoke_memfun_deref) + { + return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( + std::declval<_Args>()...)); + } + + template + constexpr bool __call_is_nt(__invoke_memobj_ref) + { + using _Up = typename __inv_unwrap<_Tp>::type; + return noexcept(std::declval<_Up>().*std::declval<_Fn>()); + } + + template + constexpr bool __call_is_nt(__invoke_memobj_deref) + { + return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); + } + + template + constexpr bool __call_is_nt(__invoke_other) + { + return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); + } + + template + struct __call_is_nothrow + : __bool_constant< + std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) + > + { }; + + template + using __call_is_nothrow_ + = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; + + + template + struct __is_nothrow_invocable + : __and_<__is_invocable<_Fn, _Args...>, + __call_is_nothrow_<_Fn, _Args...>>::type + { }; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wctor-dtor-privacy" + struct __nonesuchbase {}; + struct __nonesuch : private __nonesuchbase { + ~__nonesuch() = delete; + __nonesuch(__nonesuch const&) = delete; + void operator=(__nonesuch const&) = delete; + }; +#pragma GCC diagnostic pop + + + + + + template + struct invoke_result + : public __invoke_result<_Functor, _ArgTypes...> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Functor>{}), + "_Functor must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + }; + + + template + using invoke_result_t = typename invoke_result<_Fn, _Args...>::type; + + + template + struct is_invocable + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), + "_Fn must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + }; + + + template + struct is_invocable_r + : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), + "_Fn must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}), + "_Ret must be a complete class or an unbounded array"); + }; + + + template + struct is_nothrow_invocable + : __and_<__is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>, + __call_is_nothrow_<_Fn, _ArgTypes...>>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), + "_Fn must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + }; + + template + struct __is_nt_invocable_impl : false_type { }; + + template + struct __is_nt_invocable_impl<_Result, _Ret, + __void_t> + : __or_, + __is_nothrow_convertible> + { }; + + + template + struct is_nothrow_invocable_r + : __and_<__is_nt_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, _Ret>, + __call_is_nothrow_<_Fn, _ArgTypes...>>::type + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Fn>{}), + "_Fn must be a complete class or an unbounded array"); + static_assert((std::__is_complete_or_unbounded( + __type_identity<_ArgTypes>{}) && ...), + "each argument type must be a complete class or an unbounded array"); + static_assert(std::__is_complete_or_unbounded(__type_identity<_Ret>{}), + "_Ret must be a complete class or an unbounded array"); + }; + + + template + inline constexpr bool is_invocable_v = is_invocable<_Fn, _Args...>::value; + + + template + inline constexpr bool is_nothrow_invocable_v + = is_nothrow_invocable<_Fn, _Args...>::value; + + + template + inline constexpr bool is_invocable_r_v + = is_invocable_r<_Ret, _Fn, _Args...>::value; + + + template + inline constexpr bool is_nothrow_invocable_r_v + = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value; + + + + +template + inline constexpr bool is_void_v = is_void<_Tp>::value; +template + inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value; +template + inline constexpr bool is_integral_v = is_integral<_Tp>::value; +template + inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value; +template + inline constexpr bool is_array_v = is_array<_Tp>::value; +template + inline constexpr bool is_pointer_v = is_pointer<_Tp>::value; +template + inline constexpr bool is_lvalue_reference_v = + is_lvalue_reference<_Tp>::value; +template + inline constexpr bool is_rvalue_reference_v = + is_rvalue_reference<_Tp>::value; +template + inline constexpr bool is_member_object_pointer_v = + is_member_object_pointer<_Tp>::value; +template + inline constexpr bool is_member_function_pointer_v = + is_member_function_pointer<_Tp>::value; +template + inline constexpr bool is_enum_v = is_enum<_Tp>::value; +template + inline constexpr bool is_union_v = is_union<_Tp>::value; +template + inline constexpr bool is_class_v = is_class<_Tp>::value; +template + inline constexpr bool is_function_v = is_function<_Tp>::value; +template + inline constexpr bool is_reference_v = is_reference<_Tp>::value; +template + inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value; +template + inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value; +template + inline constexpr bool is_object_v = is_object<_Tp>::value; +template + inline constexpr bool is_scalar_v = is_scalar<_Tp>::value; +template + inline constexpr bool is_compound_v = is_compound<_Tp>::value; +template + inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value; +template + inline constexpr bool is_const_v = is_const<_Tp>::value; +template + inline constexpr bool is_volatile_v = is_volatile<_Tp>::value; +template + inline constexpr bool is_trivial_v = is_trivial<_Tp>::value; +template + inline constexpr bool is_trivially_copyable_v = + is_trivially_copyable<_Tp>::value; +template + inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +template + [[deprecated("use is_standard_layout_v && is_trivial_v instead")]] + inline constexpr bool is_pod_v = is_pod<_Tp>::value; +template + [[__deprecated__]] + inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value; +#pragma GCC diagnostic pop + template + inline constexpr bool is_empty_v = is_empty<_Tp>::value; +template + inline constexpr bool is_polymorphic_v = is_polymorphic<_Tp>::value; +template + inline constexpr bool is_abstract_v = is_abstract<_Tp>::value; +template + inline constexpr bool is_final_v = is_final<_Tp>::value; +template + inline constexpr bool is_signed_v = is_signed<_Tp>::value; +template + inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value; +template + inline constexpr bool is_constructible_v = + is_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_default_constructible_v = + is_default_constructible<_Tp>::value; +template + inline constexpr bool is_copy_constructible_v = + is_copy_constructible<_Tp>::value; +template + inline constexpr bool is_move_constructible_v = + is_move_constructible<_Tp>::value; +template + inline constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value; +template + inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value; +template + inline constexpr bool is_destructible_v = is_destructible<_Tp>::value; +template + inline constexpr bool is_trivially_constructible_v = + is_trivially_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_trivially_default_constructible_v = + is_trivially_default_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_copy_constructible_v = + is_trivially_copy_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_move_constructible_v = + is_trivially_move_constructible<_Tp>::value; +template + inline constexpr bool is_trivially_assignable_v = + is_trivially_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_trivially_copy_assignable_v = + is_trivially_copy_assignable<_Tp>::value; +template + inline constexpr bool is_trivially_move_assignable_v = + is_trivially_move_assignable<_Tp>::value; +template + inline constexpr bool is_trivially_destructible_v = + is_trivially_destructible<_Tp>::value; +template + inline constexpr bool is_nothrow_constructible_v = + is_nothrow_constructible<_Tp, _Args...>::value; +template + inline constexpr bool is_nothrow_default_constructible_v = + is_nothrow_default_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_copy_constructible_v = + is_nothrow_copy_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_move_constructible_v = + is_nothrow_move_constructible<_Tp>::value; +template + inline constexpr bool is_nothrow_assignable_v = + is_nothrow_assignable<_Tp, _Up>::value; +template + inline constexpr bool is_nothrow_copy_assignable_v = + is_nothrow_copy_assignable<_Tp>::value; +template + inline constexpr bool is_nothrow_move_assignable_v = + is_nothrow_move_assignable<_Tp>::value; +template + inline constexpr bool is_nothrow_destructible_v = + is_nothrow_destructible<_Tp>::value; +template + inline constexpr bool has_virtual_destructor_v = + has_virtual_destructor<_Tp>::value; +template + inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value; +template + inline constexpr size_t rank_v = rank<_Tp>::value; +template + inline constexpr size_t extent_v = extent<_Tp, _Idx>::value; + +template + inline constexpr bool is_same_v = __is_same(_Tp, _Up); + + + + +template + inline constexpr bool is_base_of_v = is_base_of<_Base, _Derived>::value; +template + inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value; + + + + + template + struct has_unique_object_representations + : bool_constant<__has_unique_object_representations( + remove_cv_t> + )> + { + static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), + "template argument must be a complete class or an unbounded array"); + }; + + template + inline constexpr bool has_unique_object_representations_v + = has_unique_object_representations<_Tp>::value; + + + + + + template + struct is_aggregate + : bool_constant<__is_aggregate(remove_cv_t<_Tp>)> + { }; + + + template + inline constexpr bool is_aggregate_v = is_aggregate<_Tp>::value; + + + + + + + + template + struct remove_cvref + : remove_cv<_Tp> + { }; + + template + struct remove_cvref<_Tp&> + : remove_cv<_Tp> + { }; + + template + struct remove_cvref<_Tp&&> + : remove_cv<_Tp> + { }; + + template + using remove_cvref_t = typename remove_cvref<_Tp>::type; + + + + template + struct type_identity { using type = _Tp; }; + + template + using type_identity_t = typename type_identity<_Tp>::type; + + + + + template + struct unwrap_reference { using type = _Tp; }; + + template + struct unwrap_reference> { using type = _Tp&; }; + + template + using unwrap_reference_t = typename unwrap_reference<_Tp>::type; + + + template + struct unwrap_ref_decay { using type = unwrap_reference_t>; }; + + template + using unwrap_ref_decay_t = typename unwrap_ref_decay<_Tp>::type; + + + + + template + struct is_bounded_array + : public __is_array_known_bounds<_Tp> + { }; + + + template + struct is_unbounded_array + : public __is_array_unknown_bounds<_Tp> + { }; + + template + inline constexpr bool is_bounded_array_v + = is_bounded_array<_Tp>::value; + + template + inline constexpr bool is_unbounded_array_v + = is_unbounded_array<_Tp>::value; +# 3323 "D:/compilers/msys64/mingw64/include/c++/11.2.0/type_traits" 3 + constexpr inline bool + is_constant_evaluated() noexcept + { return __builtin_is_constant_evaluated(); } + + + template + using __copy_cv = typename __match_cv_qualifiers<_From, _To>::__type; + + template + using __cond_res + = decltype(false ? declval<_Xp(&)()>()() : declval<_Yp(&)()>()()); + + template + struct __common_ref_impl + { }; + + + template + using __common_ref = typename __common_ref_impl<_Ap, _Bp>::type; + + + template + using __condres_cvref + = __cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>&>; + + + template + struct __common_ref_impl<_Xp&, _Yp&, __void_t<__condres_cvref<_Xp, _Yp>>> + : enable_if>, + __condres_cvref<_Xp, _Yp>> + { }; + + + template + using __common_ref_C = remove_reference_t<__common_ref<_Xp&, _Yp&>>&&; + + + template + struct __common_ref_impl<_Xp&&, _Yp&&, + _Require>, + is_convertible<_Yp&&, __common_ref_C<_Xp, _Yp>>>> + { using type = __common_ref_C<_Xp, _Yp>; }; + + + template + using __common_ref_D = __common_ref; + + + template + struct __common_ref_impl<_Xp&&, _Yp&, + _Require>>> + { using type = __common_ref_D<_Xp, _Yp>; }; + + + template + struct __common_ref_impl<_Xp&, _Yp&&> + : __common_ref_impl<_Yp&&, _Xp&> + { }; + + template class _TQual, template class _UQual> + struct basic_common_reference + { }; + + template + struct __xref + { template using __type = __copy_cv<_Tp, _Up>; }; + + template + struct __xref<_Tp&> + { template using __type = __copy_cv<_Tp, _Up>&; }; + + template + struct __xref<_Tp&&> + { template using __type = __copy_cv<_Tp, _Up>&&; }; + + template + using __basic_common_ref + = typename basic_common_reference, + remove_cvref_t<_Tp2>, + __xref<_Tp1>::template __type, + __xref<_Tp2>::template __type>::type; + + template + struct common_reference; + + template + using common_reference_t = typename common_reference<_Tp...>::type; + + + template<> + struct common_reference<> + { }; + + + template + struct common_reference<_Tp0> + { using type = _Tp0; }; + + template + struct __common_reference_impl + : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1> + { }; + + + template + struct common_reference<_Tp1, _Tp2> + : __common_reference_impl<_Tp1, _Tp2> + { }; + + + template + struct __common_reference_impl<_Tp1&, _Tp2&, 1, + void_t<__common_ref<_Tp1&, _Tp2&>>> + { using type = __common_ref<_Tp1&, _Tp2&>; }; + + template + struct __common_reference_impl<_Tp1&&, _Tp2&&, 1, + void_t<__common_ref<_Tp1&&, _Tp2&&>>> + { using type = __common_ref<_Tp1&&, _Tp2&&>; }; + + template + struct __common_reference_impl<_Tp1&, _Tp2&&, 1, + void_t<__common_ref<_Tp1&, _Tp2&&>>> + { using type = __common_ref<_Tp1&, _Tp2&&>; }; + + template + struct __common_reference_impl<_Tp1&&, _Tp2&, 1, + void_t<__common_ref<_Tp1&&, _Tp2&>>> + { using type = __common_ref<_Tp1&&, _Tp2&>; }; + + + template + struct __common_reference_impl<_Tp1, _Tp2, 2, + void_t<__basic_common_ref<_Tp1, _Tp2>>> + { using type = __basic_common_ref<_Tp1, _Tp2>; }; + + + template + struct __common_reference_impl<_Tp1, _Tp2, 3, + void_t<__cond_res<_Tp1, _Tp2>>> + { using type = __cond_res<_Tp1, _Tp2>; }; + + + template + struct __common_reference_impl<_Tp1, _Tp2, 4, + void_t>> + { using type = common_type_t<_Tp1, _Tp2>; }; + + + template + struct __common_reference_impl<_Tp1, _Tp2, 5, void> + { }; + + + template + struct common_reference<_Tp1, _Tp2, _Rest...> + : __common_type_fold, + __common_type_pack<_Rest...>> + { }; + + + template + struct __common_type_fold, + __common_type_pack<_Rest...>, + void_t>> + : public common_reference, _Rest...> + { }; + + + + +} +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 2 3 + +namespace std +{ + +# 74 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 + template + [[__nodiscard__]] + constexpr _Tp&& + forward(typename std::remove_reference<_Tp>::type& __t) noexcept + { return static_cast<_Tp&&>(__t); } + + + + + + + + template + [[__nodiscard__]] + constexpr _Tp&& + forward(typename std::remove_reference<_Tp>::type&& __t) noexcept + { + static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" + " substituting _Tp must not be an lvalue reference type"); + return static_cast<_Tp&&>(__t); + } + + + + + + + template + [[__nodiscard__]] + constexpr typename std::remove_reference<_Tp>::type&& + move(_Tp&& __t) noexcept + { return static_cast::type&&>(__t); } + + + template + struct __move_if_noexcept_cond + : public __and_<__not_>, + is_copy_constructible<_Tp>>::type { }; +# 121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 + template + [[__nodiscard__]] + constexpr typename + conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type + move_if_noexcept(_Tp& __x) noexcept + { return std::move(__x); } +# 142 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 + template + [[__nodiscard__]] + inline constexpr _Tp* + addressof(_Tp& __r) noexcept + { return std::__addressof(__r); } + + + + template + const _Tp* addressof(const _Tp&&) = delete; + + + template + constexpr + inline _Tp + __exchange(_Tp& __obj, _Up&& __new_val) + { + _Tp __old_val = std::move(__obj); + __obj = std::forward<_Up>(__new_val); + return __old_val; + } +# 186 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/move.h" 3 + template + constexpr + inline + + typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, + is_move_constructible<_Tp>, + is_move_assignable<_Tp>>::value>::type + + + + swap(_Tp& __a, _Tp& __b) + noexcept(__and_, is_nothrow_move_assignable<_Tp>>::value) + + { + + + + + _Tp __tmp = std::move(__a); + __a = std::move(__b); + __b = std::move(__tmp); + } + + + + + template + constexpr + inline + + typename enable_if<__is_swappable<_Tp>::value>::type + + + + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + noexcept(__is_nothrow_swappable<_Tp>::value) + { + for (size_t __n = 0; __n < _Nm; ++__n) + swap(__a[__n], __b[__n]); + } + + + +} +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 2 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/compare" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/compare" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/compare" 3 + + + +#pragma GCC visibility push(default) + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/concepts" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/concepts" 3 + +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/concepts" 3 +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/concepts" 3 +namespace std +{ + + + + + + + namespace __detail + { + template + concept __same_as = std::is_same_v<_Tp, _Up>; + } + + + template + concept same_as + = __detail::__same_as<_Tp, _Up> && __detail::__same_as<_Up, _Tp>; + + + template + concept derived_from = __is_base_of(_Base, _Derived) + && is_convertible_v; + + + template + concept convertible_to = is_convertible_v<_From, _To> + && requires(add_rvalue_reference_t<_From> (&__f)()) { + static_cast<_To>(__f()); + }; + + + template + concept common_reference_with + = same_as, common_reference_t<_Up, _Tp>> + && convertible_to<_Tp, common_reference_t<_Tp, _Up>> + && convertible_to<_Up, common_reference_t<_Tp, _Up>>; + + + template + concept common_with + = same_as, common_type_t<_Up, _Tp>> + && requires { + static_cast>(std::declval<_Tp>()); + static_cast>(std::declval<_Up>()); + } + && common_reference_with, + add_lvalue_reference_t> + && common_reference_with>, + common_reference_t< + add_lvalue_reference_t, + add_lvalue_reference_t>>; + + + + template + concept integral = is_integral_v<_Tp>; + + template + concept signed_integral = integral<_Tp> && is_signed_v<_Tp>; + + template + concept unsigned_integral = integral<_Tp> && !signed_integral<_Tp>; + + template + concept floating_point = is_floating_point_v<_Tp>; + + namespace __detail + { + template + using __cref = const remove_reference_t<_Tp>&; + + template + concept __class_or_enum + = is_class_v<_Tp> || is_union_v<_Tp> || is_enum_v<_Tp>; + } + + + template + concept assignable_from + = is_lvalue_reference_v<_Lhs> + && common_reference_with<__detail::__cref<_Lhs>, __detail::__cref<_Rhs>> + && requires(_Lhs __lhs, _Rhs&& __rhs) { + { __lhs = static_cast<_Rhs&&>(__rhs) } -> same_as<_Lhs>; + }; + + + template + concept destructible = is_nothrow_destructible_v<_Tp>; + + + template + concept constructible_from + = destructible<_Tp> && is_constructible_v<_Tp, _Args...>; + + + template + concept default_initializable = constructible_from<_Tp> + && requires + { + _Tp{}; + (void) ::new _Tp; + }; + + + template + concept move_constructible + = constructible_from<_Tp, _Tp> && convertible_to<_Tp, _Tp>; + + + template + concept copy_constructible + = move_constructible<_Tp> + && constructible_from<_Tp, _Tp&> && convertible_to<_Tp&, _Tp> + && constructible_from<_Tp, const _Tp&> && convertible_to + && constructible_from<_Tp, const _Tp> && convertible_to; + + + + namespace ranges + { + namespace __cust_swap + { + template void swap(_Tp&, _Tp&) = delete; + + template + concept __adl_swap + = (__detail::__class_or_enum> + || __detail::__class_or_enum>) + && requires(_Tp&& __t, _Up&& __u) { + swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); + }; + + struct _Swap + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__adl_swap<_Tp, _Up>) + return noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())); + else + return is_nothrow_move_constructible_v> + && is_nothrow_move_assignable_v>; + } + + public: + template + requires __adl_swap<_Tp, _Up> + || (same_as<_Tp, _Up> && is_lvalue_reference_v<_Tp> + && move_constructible> + && assignable_from<_Tp, remove_reference_t<_Tp>>) + constexpr void + operator()(_Tp&& __t, _Up&& __u) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + if constexpr (__adl_swap<_Tp, _Up>) + swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); + else + { + auto __tmp = static_cast&&>(__t); + __t = static_cast&&>(__u); + __u = static_cast&&>(__tmp); + } + } + + template + requires requires(const _Swap& __swap, _Tp& __e1, _Up& __e2) { + __swap(__e1, __e2); + } + constexpr void + operator()(_Tp (&__e1)[_Num], _Up (&__e2)[_Num]) const + noexcept(noexcept(std::declval()(*__e1, *__e2))) + { + for (size_t __n = 0; __n < _Num; ++__n) + (*this)(__e1[__n], __e2[__n]); + } + }; + } + + inline namespace __cust + { + inline constexpr __cust_swap::_Swap swap{}; + } + } + + template + concept swappable + = requires(_Tp& __a, _Tp& __b) { ranges::swap(__a, __b); }; + + template + concept swappable_with = common_reference_with<_Tp, _Up> + && requires(_Tp&& __t, _Up&& __u) { + ranges::swap(static_cast<_Tp&&>(__t), static_cast<_Tp&&>(__t)); + ranges::swap(static_cast<_Up&&>(__u), static_cast<_Up&&>(__u)); + ranges::swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); + ranges::swap(static_cast<_Up&&>(__u), static_cast<_Tp&&>(__t)); + }; + + + + template + concept movable = is_object_v<_Tp> && move_constructible<_Tp> + && assignable_from<_Tp&, _Tp> && swappable<_Tp>; + + template + concept copyable = copy_constructible<_Tp> && movable<_Tp> + && assignable_from<_Tp&, _Tp&> && assignable_from<_Tp&, const _Tp&> + && assignable_from<_Tp&, const _Tp>; + + template + concept semiregular = copyable<_Tp> && default_initializable<_Tp>; + + + + + namespace __detail + { + template + concept __boolean_testable_impl = convertible_to<_Tp, bool>; + + template + concept __boolean_testable + = __boolean_testable_impl<_Tp> + && requires(_Tp&& __t) + { { !static_cast<_Tp&&>(__t) } -> __boolean_testable_impl; }; + } + + + + namespace __detail + { + template + concept __weakly_eq_cmp_with + = requires(__detail::__cref<_Tp> __t, __detail::__cref<_Up> __u) { + { __t == __u } -> __boolean_testable; + { __t != __u } -> __boolean_testable; + { __u == __t } -> __boolean_testable; + { __u != __t } -> __boolean_testable; + }; + } + + template + concept equality_comparable = __detail::__weakly_eq_cmp_with<_Tp, _Tp>; + + template + concept equality_comparable_with + = equality_comparable<_Tp> && equality_comparable<_Up> + && common_reference_with<__detail::__cref<_Tp>, __detail::__cref<_Up>> + && equality_comparable, + __detail::__cref<_Up>>> + && __detail::__weakly_eq_cmp_with<_Tp, _Up>; + + namespace __detail + { + template + concept __partially_ordered_with + = requires(const remove_reference_t<_Tp>& __t, + const remove_reference_t<_Up>& __u) { + { __t < __u } -> __boolean_testable; + { __t > __u } -> __boolean_testable; + { __t <= __u } -> __boolean_testable; + { __t >= __u } -> __boolean_testable; + { __u < __t } -> __boolean_testable; + { __u > __t } -> __boolean_testable; + { __u <= __t } -> __boolean_testable; + { __u >= __t } -> __boolean_testable; + }; + } + + + template + concept totally_ordered + = equality_comparable<_Tp> + && __detail::__partially_ordered_with<_Tp, _Tp>; + + template + concept totally_ordered_with + = totally_ordered<_Tp> && totally_ordered<_Up> + && equality_comparable_with<_Tp, _Up> + && totally_ordered, + __detail::__cref<_Up>>> + && __detail::__partially_ordered_with<_Tp, _Up>; + + template + concept regular = semiregular<_Tp> && equality_comparable<_Tp>; + + + + + template + concept invocable = is_invocable_v<_Fn, _Args...>; + + + template + concept regular_invocable = invocable<_Fn, _Args...>; + + + template + concept predicate = regular_invocable<_Fn, _Args...> + && __detail::__boolean_testable>; + + + template + concept relation + = predicate<_Rel, _Tp, _Tp> && predicate<_Rel, _Up, _Up> + && predicate<_Rel, _Tp, _Up> && predicate<_Rel, _Up, _Tp>; + + + template + concept equivalence_relation = relation<_Rel, _Tp, _Up>; + + + template + concept strict_weak_order = relation<_Rel, _Tp, _Up>; + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/compare" 2 3 + + + + + +namespace std +{ + + + namespace __cmp_cat + { + using type = signed char; + + enum class _Ord : type { equivalent = 0, less = -1, greater = 1 }; + + enum class _Ncmp : type { _Unordered = 2 }; + + struct __unspec + { + constexpr __unspec(__unspec*) noexcept { } + }; + } + + class partial_ordering + { + + __cmp_cat::type _M_value; + + constexpr explicit + partial_ordering(__cmp_cat::_Ord __v) noexcept + : _M_value(__cmp_cat::type(__v)) + { } + + constexpr explicit + partial_ordering(__cmp_cat::_Ncmp __v) noexcept + : _M_value(__cmp_cat::type(__v)) + { } + + friend class weak_ordering; + friend class strong_ordering; + + public: + + static const partial_ordering less; + static const partial_ordering equivalent; + static const partial_ordering greater; + static const partial_ordering unordered; + + + friend constexpr bool + operator==(partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == 0; } + + friend constexpr bool + operator==(partial_ordering, partial_ordering) noexcept = default; + + friend constexpr bool + operator< (partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == -1; } + + friend constexpr bool + operator> (partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == 1; } + + friend constexpr bool + operator<=(partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value <= 0; } + + friend constexpr bool + operator>=(partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __cmp_cat::type(__v._M_value & 1) == __v._M_value; } + + friend constexpr bool + operator< (__cmp_cat::__unspec, partial_ordering __v) noexcept + { return __v._M_value == 1; } + + friend constexpr bool + operator> (__cmp_cat::__unspec, partial_ordering __v) noexcept + { return __v._M_value == -1; } + + friend constexpr bool + operator<=(__cmp_cat::__unspec, partial_ordering __v) noexcept + { return __cmp_cat::type(__v._M_value & 1) == __v._M_value; } + + friend constexpr bool + operator>=(__cmp_cat::__unspec, partial_ordering __v) noexcept + { return 0 >= __v._M_value; } + + friend constexpr partial_ordering + operator<=>(partial_ordering __v, __cmp_cat::__unspec) noexcept + { return __v; } + + friend constexpr partial_ordering + operator<=>(__cmp_cat::__unspec, partial_ordering __v) noexcept + { + if (__v._M_value & 1) + return partial_ordering(__cmp_cat::_Ord(-__v._M_value)); + else + return __v; + } + }; + + + inline constexpr partial_ordering + partial_ordering::less(__cmp_cat::_Ord::less); + + inline constexpr partial_ordering + partial_ordering::equivalent(__cmp_cat::_Ord::equivalent); + + inline constexpr partial_ordering + partial_ordering::greater(__cmp_cat::_Ord::greater); + + inline constexpr partial_ordering + partial_ordering::unordered(__cmp_cat::_Ncmp::_Unordered); + + class weak_ordering + { + __cmp_cat::type _M_value; + + constexpr explicit + weak_ordering(__cmp_cat::_Ord __v) noexcept : _M_value(__cmp_cat::type(__v)) + { } + + friend class strong_ordering; + + public: + + static const weak_ordering less; + static const weak_ordering equivalent; + static const weak_ordering greater; + + constexpr operator partial_ordering() const noexcept + { return partial_ordering(__cmp_cat::_Ord(_M_value)); } + + + friend constexpr bool + operator==(weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == 0; } + + friend constexpr bool + operator==(weak_ordering, weak_ordering) noexcept = default; + + friend constexpr bool + operator< (weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value < 0; } + + friend constexpr bool + operator> (weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value > 0; } + + friend constexpr bool + operator<=(weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value <= 0; } + + friend constexpr bool + operator>=(weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value >= 0; } + + friend constexpr bool + operator< (__cmp_cat::__unspec, weak_ordering __v) noexcept + { return 0 < __v._M_value; } + + friend constexpr bool + operator> (__cmp_cat::__unspec, weak_ordering __v) noexcept + { return 0 > __v._M_value; } + + friend constexpr bool + operator<=(__cmp_cat::__unspec, weak_ordering __v) noexcept + { return 0 <= __v._M_value; } + + friend constexpr bool + operator>=(__cmp_cat::__unspec, weak_ordering __v) noexcept + { return 0 >= __v._M_value; } + + friend constexpr weak_ordering + operator<=>(weak_ordering __v, __cmp_cat::__unspec) noexcept + { return __v; } + + friend constexpr weak_ordering + operator<=>(__cmp_cat::__unspec, weak_ordering __v) noexcept + { return weak_ordering(__cmp_cat::_Ord(-__v._M_value)); } + }; + + + inline constexpr weak_ordering + weak_ordering::less(__cmp_cat::_Ord::less); + + inline constexpr weak_ordering + weak_ordering::equivalent(__cmp_cat::_Ord::equivalent); + + inline constexpr weak_ordering + weak_ordering::greater(__cmp_cat::_Ord::greater); + + class strong_ordering + { + __cmp_cat::type _M_value; + + constexpr explicit + strong_ordering(__cmp_cat::_Ord __v) noexcept + : _M_value(__cmp_cat::type(__v)) + { } + + public: + + static const strong_ordering less; + static const strong_ordering equal; + static const strong_ordering equivalent; + static const strong_ordering greater; + + constexpr operator partial_ordering() const noexcept + { return partial_ordering(__cmp_cat::_Ord(_M_value)); } + + constexpr operator weak_ordering() const noexcept + { return weak_ordering(__cmp_cat::_Ord(_M_value)); } + + + friend constexpr bool + operator==(strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value == 0; } + + friend constexpr bool + operator==(strong_ordering, strong_ordering) noexcept = default; + + friend constexpr bool + operator< (strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value < 0; } + + friend constexpr bool + operator> (strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value > 0; } + + friend constexpr bool + operator<=(strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value <= 0; } + + friend constexpr bool + operator>=(strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v._M_value >= 0; } + + friend constexpr bool + operator< (__cmp_cat::__unspec, strong_ordering __v) noexcept + { return 0 < __v._M_value; } + + friend constexpr bool + operator> (__cmp_cat::__unspec, strong_ordering __v) noexcept + { return 0 > __v._M_value; } + + friend constexpr bool + operator<=(__cmp_cat::__unspec, strong_ordering __v) noexcept + { return 0 <= __v._M_value; } + + friend constexpr bool + operator>=(__cmp_cat::__unspec, strong_ordering __v) noexcept + { return 0 >= __v._M_value; } + + friend constexpr strong_ordering + operator<=>(strong_ordering __v, __cmp_cat::__unspec) noexcept + { return __v; } + + friend constexpr strong_ordering + operator<=>(__cmp_cat::__unspec, strong_ordering __v) noexcept + { return strong_ordering(__cmp_cat::_Ord(-__v._M_value)); } + }; + + + inline constexpr strong_ordering + strong_ordering::less(__cmp_cat::_Ord::less); + + inline constexpr strong_ordering + strong_ordering::equal(__cmp_cat::_Ord::equivalent); + + inline constexpr strong_ordering + strong_ordering::equivalent(__cmp_cat::_Ord::equivalent); + + inline constexpr strong_ordering + strong_ordering::greater(__cmp_cat::_Ord::greater); + + + + constexpr bool + is_eq(partial_ordering __cmp) noexcept + { return __cmp == 0; } + + constexpr bool + is_neq(partial_ordering __cmp) noexcept + { return __cmp != 0; } + + constexpr bool + is_lt (partial_ordering __cmp) noexcept + { return __cmp < 0; } + + constexpr bool + is_lteq(partial_ordering __cmp) noexcept + { return __cmp <= 0; } + + constexpr bool + is_gt (partial_ordering __cmp) noexcept + { return __cmp > 0; } + + constexpr bool + is_gteq(partial_ordering __cmp) noexcept + { return __cmp >= 0; } + + namespace __detail + { + template + inline constexpr unsigned __cmp_cat_id = 1; + template<> + inline constexpr unsigned __cmp_cat_id = 2; + template<> + inline constexpr unsigned __cmp_cat_id = 4; + template<> + inline constexpr unsigned __cmp_cat_id = 8; + + template + constexpr auto __common_cmp_cat() + { + constexpr unsigned __cats = (__cmp_cat_id<_Ts> | ...); + + if constexpr (__cats & 1) + return; + + + else if constexpr (bool(__cats & __cmp_cat_id)) + return partial_ordering::equivalent; + + + else if constexpr (bool(__cats & __cmp_cat_id)) + return weak_ordering::equivalent; + + else + return strong_ordering::equivalent; + } + } + + + template + struct common_comparison_category + { + using type = decltype(__detail::__common_cmp_cat<_Ts...>()); + }; + + + + template + struct common_comparison_category<_Tp> + { using type = void; }; + + template<> + struct common_comparison_category + { using type = partial_ordering; }; + + template<> + struct common_comparison_category + { using type = weak_ordering; }; + + template<> + struct common_comparison_category + { using type = strong_ordering; }; + + template<> + struct common_comparison_category<> + { using type = strong_ordering; }; + + template + using common_comparison_category_t + = typename common_comparison_category<_Ts...>::type; + + + namespace __detail + { + template + concept __compares_as + = same_as, _Cat>; + } + + + template + concept three_way_comparable + = __detail::__weakly_eq_cmp_with<_Tp, _Tp> + && __detail::__partially_ordered_with<_Tp, _Tp> + && requires(const remove_reference_t<_Tp>& __a, + const remove_reference_t<_Tp>& __b) + { + { __a <=> __b } -> __detail::__compares_as<_Cat>; + }; + + template + concept three_way_comparable_with + = three_way_comparable<_Tp, _Cat> + && three_way_comparable<_Up, _Cat> + && common_reference_with&, + const remove_reference_t<_Up>&> + && three_way_comparable< + common_reference_t&, + const remove_reference_t<_Up>&>, _Cat> + && __detail::__weakly_eq_cmp_with<_Tp, _Up> + && __detail::__partially_ordered_with<_Tp, _Up> + && requires(const remove_reference_t<_Tp>& __t, + const remove_reference_t<_Up>& __u) + { + { __t <=> __u } -> __detail::__compares_as<_Cat>; + { __u <=> __t } -> __detail::__compares_as<_Cat>; + }; + + namespace __detail + { + template + using __cmp3way_res_t + = decltype(std::declval<_Tp>() <=> std::declval<_Up>()); + + + + + + + template + struct __cmp3way_res_impl + { }; + + template + requires requires { typename __cmp3way_res_t<__cref<_Tp>, __cref<_Up>>; } + struct __cmp3way_res_impl<_Tp, _Up> + { + using type = __cmp3way_res_t<__cref<_Tp>, __cref<_Up>>; + }; + } + + + template + struct compare_three_way_result + : __detail::__cmp3way_res_impl<_Tp, _Up> + { }; + + + template + using compare_three_way_result_t + = typename __detail::__cmp3way_res_impl<_Tp, _Up>::type; + + namespace __detail + { + + + + + template + concept __3way_builtin_ptr_cmp + = requires(_Tp&& __t, _Up&& __u) + { static_cast<_Tp&&>(__t) <=> static_cast<_Up&&>(__u); } + && convertible_to<_Tp, const volatile void*> + && convertible_to<_Up, const volatile void*> + && ! requires(_Tp&& __t, _Up&& __u) + { operator<=>(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); } + && ! requires(_Tp&& __t, _Up&& __u) + { static_cast<_Tp&&>(__t).operator<=>(static_cast<_Up&&>(__u)); }; + } + + + + + + struct compare_three_way + { + template + requires three_way_comparable_with<_Tp, _Up> + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Tp>() <=> std::declval<_Up>())) + { + if constexpr (__detail::__3way_builtin_ptr_cmp<_Tp, _Up>) + { + auto __pt = static_cast(__t); + auto __pu = static_cast(__u); + if (__builtin_is_constant_evaluated()) + return __pt <=> __pu; + auto __it = reinterpret_cast(__pt); + auto __iu = reinterpret_cast(__pu); + return __it <=> __iu; + } + else + return static_cast<_Tp&&>(__t) <=> static_cast<_Up&&>(__u); + } + + using is_transparent = void; + }; + + namespace __cmp_cust + { + template + constexpr weak_ordering + __fp_weak_ordering(_Tp __e, _Tp __f) + { + + + auto __cat = [](_Tp __fp) -> int { + const int __sign = __builtin_signbit(__fp) ? -1 : 1; + if (__builtin_isnormal(__fp)) + return (__fp == 0 ? 1 : 3) * __sign; + if (__builtin_isnan(__fp)) + return 5 * __sign; + if (int __inf = __builtin_isinf_sign(__fp)) + return 4 * __inf; + return 2 * __sign; + }; + + auto __po = __e <=> __f; + if (is_lt(__po)) + return weak_ordering::less; + else if (is_gt(__po)) + return weak_ordering::greater; + else if (__po == partial_ordering::equivalent) + return weak_ordering::equivalent; + else + { + + auto __isnan_sign = [](_Tp __fp) -> int { + return __builtin_isnan(__fp) + ? __builtin_signbit(__fp) ? -1 : 1 + : 0; + }; + auto __ord = __isnan_sign(__e) <=> __isnan_sign(__f); + if (is_eq(__ord)) + return weak_ordering::equivalent; + else if (is_lt(__ord)) + return weak_ordering::less; + else + return weak_ordering::greater; + } + } + + template + concept __adl_strong = requires(_Tp&& __t, _Up&& __u) + { + strong_ordering(strong_order(static_cast<_Tp&&>(__t), + static_cast<_Up&&>(__u))); + }; + + template + concept __adl_weak = requires(_Tp&& __t, _Up&& __u) + { + weak_ordering(weak_order(static_cast<_Tp&&>(__t), + static_cast<_Up&&>(__u))); + }; + + template + concept __adl_partial = requires(_Tp&& __t, _Up&& __u) + { + partial_ordering(partial_order(static_cast<_Tp&&>(__t), + static_cast<_Up&&>(__u))); + }; + + template + concept __cmp3way = requires(_Tp&& __t, _Up&& __u, compare_three_way __c) + { + _Ord(__c(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u))); + }; + + template + concept __strongly_ordered + = __adl_strong<_Tp, _Up> + + || __cmp3way; + + class _Strong_order + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (floating_point>) + return true; + else if constexpr (__adl_strong<_Tp, _Up>) + return noexcept(strong_ordering(strong_order(std::declval<_Tp>(), + std::declval<_Up>()))); + else if constexpr (__cmp3way) + return noexcept(compare_three_way()(std::declval<_Tp>(), + std::declval<_Up>())); + } + + friend class _Weak_order; + friend class _Strong_fallback; + + public: + template + requires __strongly_ordered<_Tp, _Up> + constexpr strong_ordering + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + + + + if constexpr (__adl_strong<_Tp, _Up>) + return strong_ordering(strong_order(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f))); + else if constexpr (__cmp3way) + return compare_three_way()(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + } + }; + + template + concept __weakly_ordered + = floating_point> + || __adl_weak<_Tp, _Up> + || __cmp3way + || __strongly_ordered<_Tp, _Up>; + + class _Weak_order + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (floating_point>) + return true; + else if constexpr (__adl_weak<_Tp, _Up>) + return noexcept(weak_ordering(weak_order(std::declval<_Tp>(), + std::declval<_Up>()))); + else if constexpr (__cmp3way) + return noexcept(compare_three_way()(std::declval<_Tp>(), + std::declval<_Up>())); + else if constexpr (__strongly_ordered<_Tp, _Up>) + return _Strong_order::_S_noexcept<_Tp, _Up>(); + } + + friend class _Partial_order; + friend class _Weak_fallback; + + public: + template + requires __weakly_ordered<_Tp, _Up> + constexpr weak_ordering + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (floating_point>) + return __cmp_cust::__fp_weak_ordering(__e, __f); + else if constexpr (__adl_weak<_Tp, _Up>) + return weak_ordering(weak_order(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f))); + else if constexpr (__cmp3way) + return compare_three_way()(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__strongly_ordered<_Tp, _Up>) + return _Strong_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + } + }; + + template + concept __partially_ordered + = __adl_partial<_Tp, _Up> + || __cmp3way + || __weakly_ordered<_Tp, _Up>; + + class _Partial_order + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (__adl_partial<_Tp, _Up>) + return noexcept(partial_ordering(partial_order(std::declval<_Tp>(), + std::declval<_Up>()))); + else if constexpr (__cmp3way) + return noexcept(compare_three_way()(std::declval<_Tp>(), + std::declval<_Up>())); + else if constexpr (__weakly_ordered<_Tp, _Up>) + return _Weak_order::_S_noexcept<_Tp, _Up>(); + } + + friend class _Partial_fallback; + + public: + template + requires __partially_ordered<_Tp, _Up> + constexpr partial_ordering + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (__adl_partial<_Tp, _Up>) + return partial_ordering(partial_order(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f))); + else if constexpr (__cmp3way) + return compare_three_way()(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__weakly_ordered<_Tp, _Up>) + return _Weak_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + } + }; + + template + concept __op_eq_lt = requires(_Tp&& __t, _Up&& __u) + { + { static_cast<_Tp&&>(__t) == static_cast<_Up&&>(__u) } + -> convertible_to; + { static_cast<_Tp&&>(__t) < static_cast<_Up&&>(__u) } + -> convertible_to; + }; + + class _Strong_fallback + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (__strongly_ordered<_Tp, _Up>) + return _Strong_order::_S_noexcept<_Tp, _Up>(); + else + return noexcept(bool(std::declval<_Tp>() == std::declval<_Up>())) + && noexcept(bool(std::declval<_Tp>() < std::declval<_Up>())); + } + + public: + template + requires __strongly_ordered<_Tp, _Up> || __op_eq_lt<_Tp, _Up> + constexpr decltype(auto) + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (__strongly_ordered<_Tp, _Up>) + return _Strong_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__op_eq_lt<_Tp, _Up>) + return static_cast<_Tp&&>(__e) == static_cast<_Up&&>(__f) + ? strong_ordering::equal + : static_cast<_Tp&&>(__e) < static_cast<_Up&&>(__f) + ? strong_ordering::less + : strong_ordering::greater; + } + }; + + class _Weak_fallback + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (__weakly_ordered<_Tp, _Up>) + return _Weak_order::_S_noexcept<_Tp, _Up>(); + else + return noexcept(bool(std::declval<_Tp>() == std::declval<_Up>())) + && noexcept(bool(std::declval<_Tp>() < std::declval<_Up>())); + } + + public: + template + requires __weakly_ordered<_Tp, _Up> || __op_eq_lt<_Tp, _Up> + constexpr decltype(auto) + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (__weakly_ordered<_Tp, _Up>) + return _Weak_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__op_eq_lt<_Tp, _Up>) + return static_cast<_Tp&&>(__e) == static_cast<_Up&&>(__f) + ? weak_ordering::equivalent + : static_cast<_Tp&&>(__e) < static_cast<_Up&&>(__f) + ? weak_ordering::less + : weak_ordering::greater; + } + }; + + class _Partial_fallback + { + template + static constexpr bool + _S_noexcept() + { + if constexpr (__partially_ordered<_Tp, _Up>) + return _Partial_order::_S_noexcept<_Tp, _Up>(); + else + return noexcept(bool(std::declval<_Tp>() == std::declval<_Up>())) + && noexcept(bool(std::declval<_Tp>() < std::declval<_Up>())); + } + + public: + template + requires __partially_ordered<_Tp, _Up> || __op_eq_lt<_Tp, _Up> + constexpr decltype(auto) + operator()(_Tp&& __e, _Up&& __f) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + static_assert(same_as, decay_t<_Up>>); + + if constexpr (__partially_ordered<_Tp, _Up>) + return _Partial_order{}(static_cast<_Tp&&>(__e), + static_cast<_Up&&>(__f)); + else if constexpr (__op_eq_lt<_Tp, _Up>) + return static_cast<_Tp&&>(__e) == static_cast<_Up&&>(__f) + ? partial_ordering::equivalent + : static_cast<_Tp&&>(__e) < static_cast<_Up&&>(__f) + ? partial_ordering::less + : static_cast<_Up&&>(__f) < static_cast<_Tp&&>(__e) + ? partial_ordering::greater + : partial_ordering::unordered; + } + }; + } + + + inline namespace __cmp_alg + { + inline constexpr __cmp_cust::_Strong_order strong_order{}; + + inline constexpr __cmp_cust::_Weak_order weak_order{}; + + inline constexpr __cmp_cust::_Partial_order partial_order{}; + + inline constexpr __cmp_cust::_Strong_fallback + compare_strong_order_fallback{}; + + inline constexpr __cmp_cust::_Weak_fallback + compare_weak_order_fallback{}; + + inline constexpr __cmp_cust::_Partial_fallback + compare_partial_order_fallback{}; + } + + namespace __detail + { + + inline constexpr struct _Synth3way + { + template + static constexpr bool + _S_noexcept(const _Tp* __t = nullptr, const _Up* __u = nullptr) + { + if constexpr (three_way_comparable_with<_Tp, _Up>) + return noexcept(*__t <=> *__u); + else + return noexcept(*__t < *__u) && noexcept(*__u < *__t); + } + + template + constexpr auto + operator()(const _Tp& __t, const _Up& __u) const + noexcept(_S_noexcept<_Tp, _Up>()) + requires requires + { + { __t < __u } -> __boolean_testable; + { __u < __t } -> __boolean_testable; + } + { + if constexpr (three_way_comparable_with<_Tp, _Up>) + return __t <=> __u; + else + { + if (__t < __u) + return weak_ordering::less; + else if (__u < __t) + return weak_ordering::greater; + else + return weak_ordering::equivalent; + } + } + } __synth3way = {}; + + + template + using __synth3way_t + = decltype(__detail::__synth3way(std::declval<_Tp&>(), + std::declval<_Up&>())); + } + +} + +#pragma GCC visibility pop +# 66 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 2 3 + + + +namespace std +{ + +# 80 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; + + + inline constexpr piecewise_construct_t piecewise_construct = + piecewise_construct_t(); + + + + + template + class tuple; + + template + struct _Index_tuple; + + + + + + + template + struct _PCC + { + template + static constexpr bool _ConstructiblePair() + { + return __and_, + is_constructible<_T2, const _U2&>>::value; + } + + template + static constexpr bool _ImplicitlyConvertiblePair() + { + return __and_, + is_convertible>::value; + } + + template + static constexpr bool _MoveConstructiblePair() + { + return __and_, + is_constructible<_T2, _U2&&>>::value; + } + + template + static constexpr bool _ImplicitlyMoveConvertiblePair() + { + return __and_, + is_convertible<_U2&&, _T2>>::value; + } + + template + static constexpr bool _CopyMovePair() + { + using __do_converts = __and_, + is_convertible<_U2&&, _T2>>; + using __converts = typename conditional<__implicit, + __do_converts, + __not_<__do_converts>>::type; + return __and_, + is_constructible<_T2, _U2&&>, + __converts + >::value; + } + + template + static constexpr bool _MoveCopyPair() + { + using __do_converts = __and_, + is_convertible>; + using __converts = typename conditional<__implicit, + __do_converts, + __not_<__do_converts>>::type; + return __and_, + is_constructible<_T2, const _U2&&>, + __converts + >::value; + } + }; + + template + struct _PCC + { + template + static constexpr bool _ConstructiblePair() + { + return false; + } + + template + static constexpr bool _ImplicitlyConvertiblePair() + { + return false; + } + + template + static constexpr bool _MoveConstructiblePair() + { + return false; + } + + template + static constexpr bool _ImplicitlyMoveConvertiblePair() + { + return false; + } + }; + + + template class __pair_base + { + + template friend struct pair; + __pair_base() = default; + ~__pair_base() = default; + __pair_base(const __pair_base&) = default; + __pair_base& operator=(const __pair_base&) = delete; + + }; +# 210 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + template + struct pair + : private __pair_base<_T1, _T2> + { + typedef _T1 first_type; + typedef _T2 second_type; + + _T1 first; + _T2 second; + + + + + + + template , + __is_implicitly_default_constructible<_U2>> + ::value, bool>::type = true> + + constexpr pair() + : first(), second() { } + + + template , + is_default_constructible<_U2>, + __not_< + __and_<__is_implicitly_default_constructible<_U1>, + __is_implicitly_default_constructible<_U2>>>> + ::value, bool>::type = false> + explicit constexpr pair() + : first(), second() { } +# 256 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + using _PCCP = _PCC; + + + + template() + && _PCCP::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } + + + template() + && !_PCCP::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } +# 288 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + template + using _PCCFP = _PCC::value + || !is_same<_T2, _U2>::value, + _T1, _T2>; + + + template::template + _ConstructiblePair<_U1, _U2>() + && _PCCFP<_U1, _U2>::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } + + template::template + _ConstructiblePair<_U1, _U2>() + && !_PCCFP<_U1, _U2>::template + _ImplicitlyConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } + + + + constexpr pair(const pair&) = default; + constexpr pair(pair&&) = default; + + + template(), + bool>::type=true> + constexpr pair(_U1&& __x, const _T2& __y) + : first(std::forward<_U1>(__x)), second(__y) { } + + template(), + bool>::type=false> + explicit constexpr pair(_U1&& __x, const _T2& __y) + : first(std::forward<_U1>(__x)), second(__y) { } + + template(), + bool>::type=true> + constexpr pair(const _T1& __x, _U2&& __y) + : first(__x), second(std::forward<_U2>(__y)) { } + + template(), + bool>::type=false> + explicit pair(const _T1& __x, _U2&& __y) + : first(__x), second(std::forward<_U2>(__y)) { } + + template() + && _PCCP::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(_U1&& __x, _U2&& __y) + : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } + + template() + && !_PCCP::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(_U1&& __x, _U2&& __y) + : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } + + + template::template + _MoveConstructiblePair<_U1, _U2>() + && _PCCFP<_U1, _U2>::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=true> + constexpr pair(pair<_U1, _U2>&& __p) + : first(std::forward<_U1>(__p.first)), + second(std::forward<_U2>(__p.second)) { } + + template::template + _MoveConstructiblePair<_U1, _U2>() + && !_PCCFP<_U1, _U2>::template + _ImplicitlyMoveConvertiblePair<_U1, _U2>(), + bool>::type=false> + explicit constexpr pair(pair<_U1, _U2>&& __p) + : first(std::forward<_U1>(__p.first)), + second(std::forward<_U2>(__p.second)) { } + + template + constexpr + pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); + + constexpr pair& + operator=(typename conditional< + __and_, + is_copy_assignable<_T2>>::value, + const pair&, const __nonesuch&>::type __p) + { + first = __p.first; + second = __p.second; + return *this; + } + + constexpr pair& + operator=(typename conditional< + __and_, + is_move_assignable<_T2>>::value, + pair&&, __nonesuch&&>::type __p) + noexcept(__and_, + is_nothrow_move_assignable<_T2>>::value) + { + first = std::forward(__p.first); + second = std::forward(__p.second); + return *this; + } + + template + constexpr + typename enable_if<__and_, + is_assignable<_T2&, const _U2&>>::value, + pair&>::type + operator=(const pair<_U1, _U2>& __p) + { + first = __p.first; + second = __p.second; + return *this; + } + + template + constexpr + typename enable_if<__and_, + is_assignable<_T2&, _U2&&>>::value, + pair&>::type + operator=(pair<_U1, _U2>&& __p) + { + first = std::forward<_U1>(__p.first); + second = std::forward<_U2>(__p.second); + return *this; + } + + + constexpr void + swap(pair& __p) + noexcept(__and_<__is_nothrow_swappable<_T1>, + __is_nothrow_swappable<_T2>>::value) + { + using std::swap; + swap(first, __p.first); + swap(second, __p.second); + } + + private: + template + constexpr + pair(tuple<_Args1...>&, tuple<_Args2...>&, + _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); + + }; + + + + + template pair(_T1, _T2) -> pair<_T1, _T2>; + + + + template + inline constexpr bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + + + template + constexpr common_comparison_category_t<__detail::__synth3way_t<_T1>, + __detail::__synth3way_t<_T2>> + operator<=>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { + if (auto __c = __detail::__synth3way(__x.first, __y.first); __c != 0) + return __c; + return __detail::__synth3way(__x.second, __y.second); + } +# 524 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + template + constexpr inline + + + typename enable_if<__and_<__is_swappable<_T1>, + __is_swappable<_T2>>::value>::type + + + + swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + + template + typename enable_if, + __is_swappable<_T2>>::value>::type + swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; +# 564 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + template + constexpr pair::__type, + typename __decay_and_strip<_T2>::__type> + make_pair(_T1&& __x, _T2&& __y) + { + typedef typename __decay_and_strip<_T1>::__type __ds_type1; + typedef typename __decay_and_strip<_T2>::__type __ds_type2; + typedef pair<__ds_type1, __ds_type2> __pair_type; + return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); + } +# 583 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_pair.h" 3 + +} +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 +# 71 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ptr_traits.h" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ptr_traits.h" 3 +namespace __gnu_debug { struct _Safe_iterator_base; } + + +namespace std +{ + + + class __undefined; + + + template + struct __get_first_arg + { using type = __undefined; }; + + template class _Template, typename _Tp, + typename... _Types> + struct __get_first_arg<_Template<_Tp, _Types...>> + { using type = _Tp; }; + + template + using __get_first_arg_t = typename __get_first_arg<_Tp>::type; + + + template + struct __replace_first_arg + { }; + + template class _Template, typename _Up, + typename _Tp, typename... _Types> + struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> + { using type = _Template<_Up, _Types...>; }; + + template + using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; + + template + using __make_not_void + = typename conditional::value, __undefined, _Tp>::type; + + + + + + template + struct pointer_traits + { + private: + template + using __element_type = typename _Tp::element_type; + + template + using __difference_type = typename _Tp::difference_type; + + template + struct __rebind : __replace_first_arg<_Tp, _Up> { }; + + template + struct __rebind<_Tp, _Up, __void_t>> + { using type = typename _Tp::template rebind<_Up>; }; + + public: + + using pointer = _Ptr; + + + using element_type + = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; + + + using difference_type + = __detected_or_t; + + + template + using rebind = typename __rebind<_Ptr, _Up>::type; + + static _Ptr + pointer_to(__make_not_void& __e) + { return _Ptr::pointer_to(__e); } + + static_assert(!is_same::value, + "pointer type defines element_type or is like SomePointer"); + }; + + + + + + template + struct pointer_traits<_Tp*> + { + + typedef _Tp* pointer; + + typedef _Tp element_type; + + typedef ptrdiff_t difference_type; + + template + using rebind = _Up*; + + + + + + + static constexpr pointer + pointer_to(__make_not_void& __r) noexcept + { return std::addressof(__r); } + }; + + + template + using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; + + template + constexpr _Tp* + __to_address(_Tp* __ptr) noexcept + { + static_assert(!std::is_function<_Tp>::value, "not a function pointer"); + return __ptr; + } + + + + + + + + template + constexpr auto + __to_address(const _Ptr& __ptr) noexcept + -> decltype(std::pointer_traits<_Ptr>::to_address(__ptr)) + { return std::pointer_traits<_Ptr>::to_address(__ptr); } + + template + constexpr auto + __to_address(const _Ptr& __ptr, _None...) noexcept + { + if constexpr (is_base_of_v<__gnu_debug::_Safe_iterator_base, _Ptr>) + return std::__to_address(__ptr.base().operator->()); + else + return std::__to_address(__ptr.operator->()); + } +# 192 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ptr_traits.h" 3 + template + constexpr _Tp* + to_address(_Tp* __ptr) noexcept + { return std::__to_address(__ptr); } +# 204 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ptr_traits.h" 3 + template + constexpr auto + to_address(const _Ptr& __ptr) noexcept + { return std::__to_address(__ptr); } + + + +} +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_cmp.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_cmp.h" 3 +namespace std +{ + + + struct __is_transparent; + + + + + + struct identity + { + template + [[nodiscard]] + constexpr _Tp&& + operator()(_Tp&& __t) const noexcept + { return std::forward<_Tp>(__t); } + + using is_transparent = __is_transparent; + }; + + + + + +namespace ranges +{ + namespace __detail + { + + + + template + concept __less_builtin_ptr_cmp + = requires (_Tp&& __t, _Up&& __u) { { __t < __u } -> same_as; } + && convertible_to<_Tp, const volatile void*> + && convertible_to<_Up, const volatile void*> + && (! requires(_Tp&& __t, _Up&& __u) + { operator<(std::forward<_Tp>(__t), std::forward<_Up>(__u)); } + && ! requires(_Tp&& __t, _Up&& __u) + { std::forward<_Tp>(__t).operator<(std::forward<_Up>(__u)); }); + } + + + + + + + + struct equal_to + { + template + requires equality_comparable_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Tp>() == std::declval<_Up>())) + { return std::forward<_Tp>(__t) == std::forward<_Up>(__u); } + + using is_transparent = __is_transparent; + }; + + + struct not_equal_to + { + template + requires equality_comparable_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Up>() == std::declval<_Tp>())) + { return !equal_to{}(std::forward<_Tp>(__t), std::forward<_Up>(__u)); } + + using is_transparent = __is_transparent; + }; + + + struct less + { + template + requires totally_ordered_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Tp>() < std::declval<_Up>())) + { + if constexpr (__detail::__less_builtin_ptr_cmp<_Tp, _Up>) + { + + if (std::is_constant_evaluated()) + return __t < __u; + + auto __x = reinterpret_cast( + static_cast(std::forward<_Tp>(__t))); + auto __y = reinterpret_cast( + static_cast(std::forward<_Up>(__u))); + return __x < __y; + } + else + return std::forward<_Tp>(__t) < std::forward<_Up>(__u); + } + + using is_transparent = __is_transparent; + }; + + + struct greater + { + template + requires totally_ordered_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Up>() < std::declval<_Tp>())) + { return less{}(std::forward<_Up>(__u), std::forward<_Tp>(__t)); } + + using is_transparent = __is_transparent; + }; + + + struct greater_equal + { + template + requires totally_ordered_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Tp>() < std::declval<_Up>())) + { return !less{}(std::forward<_Tp>(__t), std::forward<_Up>(__u)); } + + using is_transparent = __is_transparent; + }; + + + struct less_equal + { + template + requires totally_ordered_with<_Tp, _Up> + constexpr bool + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::declval<_Up>() < std::declval<_Tp>())) + { return !less{}(std::forward<_Up>(__u), std::forward<_Tp>(__t)); } + + using is_transparent = __is_transparent; + }; + +} + + +} +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/iterator_concepts.h" 2 3 + + +namespace std +{ + + + struct input_iterator_tag; + struct output_iterator_tag; + struct forward_iterator_tag; + struct bidirectional_iterator_tag; + struct random_access_iterator_tag; + struct contiguous_iterator_tag; + + template + struct iterator_traits; + + template requires is_object_v<_Tp> + struct iterator_traits<_Tp*>; + + template + struct __iterator_traits; + + namespace __detail + { + template + using __with_ref = _Tp&; + + template + concept __can_reference = requires { typename __with_ref<_Tp>; }; + + template + concept __dereferenceable = requires(_Tp& __t) + { + { *__t } -> __can_reference; + }; + } + + template<__detail::__dereferenceable _Tp> + using iter_reference_t = decltype(*std::declval<_Tp&>()); + + namespace ranges + { + namespace __cust_imove + { + void iter_move(); + + template + concept __adl_imove + = (std::__detail::__class_or_enum>) + && requires(_Tp&& __t) { iter_move(static_cast<_Tp&&>(__t)); }; + + struct _IMove + { + private: + template + struct __result + { using type = iter_reference_t<_Tp>; }; + + template + requires __adl_imove<_Tp> + struct __result<_Tp> + { using type = decltype(iter_move(std::declval<_Tp>())); }; + + template + requires (!__adl_imove<_Tp>) + && is_lvalue_reference_v> + struct __result<_Tp> + { using type = remove_reference_t>&&; }; + + template + static constexpr bool + _S_noexcept() + { + if constexpr (__adl_imove<_Tp>) + return noexcept(iter_move(std::declval<_Tp>())); + else + return noexcept(*std::declval<_Tp>()); + } + + public: + + template + using __type = typename __result<_Tp>::type; + + template + constexpr __type<_Tp> + operator()(_Tp&& __e) const + noexcept(_S_noexcept<_Tp>()) + { + if constexpr (__adl_imove<_Tp>) + return iter_move(static_cast<_Tp&&>(__e)); + else if constexpr (is_lvalue_reference_v>) + return static_cast<__type<_Tp>>(*__e); + else + return *__e; + } + }; + } + + inline namespace __cust + { + inline constexpr __cust_imove::_IMove iter_move{}; + } + } + + template<__detail::__dereferenceable _Tp> + requires __detail:: + __can_reference> + using iter_rvalue_reference_t + = ranges::__cust_imove::_IMove::__type<_Tp&>; + + template struct incrementable_traits { }; + + template requires is_object_v<_Tp> + struct incrementable_traits<_Tp*> + { using difference_type = ptrdiff_t; }; + + template + struct incrementable_traits + : incrementable_traits<_Iter> { }; + + template requires requires { typename _Tp::difference_type; } + struct incrementable_traits<_Tp> + { using difference_type = typename _Tp::difference_type; }; + + template + requires (!requires { typename _Tp::difference_type; } + && requires(const _Tp& __a, const _Tp& __b) + { { __a - __b } -> integral; }) + struct incrementable_traits<_Tp> + { + using difference_type + = make_signed_t() - std::declval<_Tp>())>; + }; + + + + template<> + struct incrementable_traits<__int128> + { using difference_type = __int128; }; + + template<> + struct incrementable_traits + { using difference_type = __int128; }; + + + namespace __detail + { + + + template + concept __primary_traits_iter + = __is_base_of(__iterator_traits<_Iter, void>, iterator_traits<_Iter>); + + template + struct __iter_traits_impl + { using type = iterator_traits<_Iter>; }; + + template + requires __primary_traits_iter<_Iter> + struct __iter_traits_impl<_Iter, _Tp> + { using type = _Tp; }; + + + template + using __iter_traits = typename __iter_traits_impl<_Iter, _Tp>::type; + + template + using __iter_diff_t = typename + __iter_traits<_Tp, incrementable_traits<_Tp>>::difference_type; + } + + template + using iter_difference_t = __detail::__iter_diff_t>; + + namespace __detail + { + template struct __cond_value_type { }; + + template requires is_object_v<_Tp> + struct __cond_value_type<_Tp> + { using value_type = remove_cv_t<_Tp>; }; + + template + concept __has_member_value_type + = requires { typename _Tp::value_type; }; + + template + concept __has_member_element_type + = requires { typename _Tp::element_type; }; + + } + + template struct indirectly_readable_traits { }; + + template + struct indirectly_readable_traits<_Tp*> + : __detail::__cond_value_type<_Tp> + { }; + + template requires is_array_v<_Iter> + struct indirectly_readable_traits<_Iter> + { using value_type = remove_cv_t>; }; + + template + struct indirectly_readable_traits + : indirectly_readable_traits<_Iter> + { }; + + template<__detail::__has_member_value_type _Tp> + struct indirectly_readable_traits<_Tp> + : __detail::__cond_value_type + { }; + + template<__detail::__has_member_element_type _Tp> + struct indirectly_readable_traits<_Tp> + : __detail::__cond_value_type + { }; + + + + template<__detail::__has_member_value_type _Tp> + requires __detail::__has_member_element_type<_Tp> + && same_as, + remove_cv_t> + struct indirectly_readable_traits<_Tp> + : __detail::__cond_value_type + { }; + + + + template<__detail::__has_member_value_type _Tp> + requires __detail::__has_member_element_type<_Tp> + struct indirectly_readable_traits<_Tp> + { }; + + namespace __detail + { + template + using __iter_value_t = typename + __iter_traits<_Tp, indirectly_readable_traits<_Tp>>::value_type; + } + + template + using iter_value_t = __detail::__iter_value_t>; + + namespace __detail + { + + + template + concept __cpp17_iterator = requires(_Iter __it) + { + { *__it } -> __can_reference; + { ++__it } -> same_as<_Iter&>; + { *__it++ } -> __can_reference; + } && copyable<_Iter>; + + template + concept __cpp17_input_iterator = __cpp17_iterator<_Iter> + && equality_comparable<_Iter> + && requires(_Iter __it) + { + typename incrementable_traits<_Iter>::difference_type; + typename indirectly_readable_traits<_Iter>::value_type; + typename common_reference_t&&, + typename indirectly_readable_traits<_Iter>::value_type&>; + typename common_reference_t::value_type&>; + requires signed_integral< + typename incrementable_traits<_Iter>::difference_type>; + }; + + template + concept __cpp17_fwd_iterator = __cpp17_input_iterator<_Iter> + && constructible_from<_Iter> + && is_lvalue_reference_v> + && same_as>, + typename indirectly_readable_traits<_Iter>::value_type> + && requires(_Iter __it) + { + { __it++ } -> convertible_to; + { *__it++ } -> same_as>; + }; + + template + concept __cpp17_bidi_iterator = __cpp17_fwd_iterator<_Iter> + && requires(_Iter __it) + { + { --__it } -> same_as<_Iter&>; + { __it-- } -> convertible_to; + { *__it-- } -> same_as>; + }; + + template + concept __cpp17_randacc_iterator = __cpp17_bidi_iterator<_Iter> + && totally_ordered<_Iter> + && requires(_Iter __it, + typename incrementable_traits<_Iter>::difference_type __n) + { + { __it += __n } -> same_as<_Iter&>; + { __it -= __n } -> same_as<_Iter&>; + { __it + __n } -> same_as<_Iter>; + { __n + __it } -> same_as<_Iter>; + { __it - __n } -> same_as<_Iter>; + { __it - __it } -> same_as; + { __it[__n] } -> convertible_to>; + }; + + template + concept __iter_with_nested_types = requires { + typename _Iter::iterator_category; + typename _Iter::value_type; + typename _Iter::difference_type; + typename _Iter::reference; + }; + + template + concept __iter_without_nested_types = !__iter_with_nested_types<_Iter>; + + template + concept __iter_without_category + = !requires { typename _Iter::iterator_category; }; + + } + + template + requires __detail::__iter_with_nested_types<_Iterator> + struct __iterator_traits<_Iterator, void> + { + private: + template + struct __ptr + { using type = void; }; + + template requires requires { typename _Iter::pointer; } + struct __ptr<_Iter> + { using type = typename _Iter::pointer; }; + + public: + using iterator_category = typename _Iterator::iterator_category; + using value_type = typename _Iterator::value_type; + using difference_type = typename _Iterator::difference_type; + using pointer = typename __ptr<_Iterator>::type; + using reference = typename _Iterator::reference; + }; + + template + requires __detail::__iter_without_nested_types<_Iterator> + && __detail::__cpp17_input_iterator<_Iterator> + struct __iterator_traits<_Iterator, void> + { + private: + template + struct __cat + { using type = input_iterator_tag; }; + + template + requires requires { typename _Iter::iterator_category; } + struct __cat<_Iter> + { using type = typename _Iter::iterator_category; }; + + template + requires __detail::__iter_without_category<_Iter> + && __detail::__cpp17_randacc_iterator<_Iter> + struct __cat<_Iter> + { using type = random_access_iterator_tag; }; + + template + requires __detail::__iter_without_category<_Iter> + && __detail::__cpp17_bidi_iterator<_Iter> + struct __cat<_Iter> + { using type = bidirectional_iterator_tag; }; + + template + requires __detail::__iter_without_category<_Iter> + && __detail::__cpp17_fwd_iterator<_Iter> + struct __cat<_Iter> + { using type = forward_iterator_tag; }; + + template + struct __ptr + { using type = void; }; + + template requires requires { typename _Iter::pointer; } + struct __ptr<_Iter> + { using type = typename _Iter::pointer; }; + + template + requires (!requires { typename _Iter::pointer; } + && requires(_Iter& __it) { __it.operator->(); }) + struct __ptr<_Iter> + { using type = decltype(std::declval<_Iter&>().operator->()); }; + + template + struct __ref + { using type = iter_reference_t<_Iter>; }; + + template requires requires { typename _Iter::reference; } + struct __ref<_Iter> + { using type = typename _Iter::reference; }; + + public: + using iterator_category = typename __cat<_Iterator>::type; + using value_type + = typename indirectly_readable_traits<_Iterator>::value_type; + using difference_type + = typename incrementable_traits<_Iterator>::difference_type; + using pointer = typename __ptr<_Iterator>::type; + using reference = typename __ref<_Iterator>::type; + }; + + template + requires __detail::__iter_without_nested_types<_Iterator> + && __detail::__cpp17_iterator<_Iterator> + struct __iterator_traits<_Iterator, void> + { + private: + template + struct __diff + { using type = void; }; + + template + requires requires + { typename incrementable_traits<_Iter>::difference_type; } + struct __diff<_Iter> + { + using type = typename incrementable_traits<_Iter>::difference_type; + }; + + public: + using iterator_category = output_iterator_tag; + using value_type = void; + using difference_type = typename __diff<_Iterator>::type; + using pointer = void; + using reference = void; + }; + + namespace __detail + { + template + struct __iter_concept_impl; + + + template + requires requires { typename __iter_traits<_Iter>::iterator_concept; } + struct __iter_concept_impl<_Iter> + { using type = typename __iter_traits<_Iter>::iterator_concept; }; + + + template + requires (!requires { typename __iter_traits<_Iter>::iterator_concept; } + && requires { typename __iter_traits<_Iter>::iterator_category; }) + struct __iter_concept_impl<_Iter> + { using type = typename __iter_traits<_Iter>::iterator_category; }; + + + template + requires (!requires { typename __iter_traits<_Iter>::iterator_concept; } + && !requires { typename __iter_traits<_Iter>::iterator_category; } + && __primary_traits_iter<_Iter>) + struct __iter_concept_impl<_Iter> + { using type = random_access_iterator_tag; }; + + + template + struct __iter_concept_impl + { }; + + + template + using __iter_concept = typename __iter_concept_impl<_Iter>::type; + + template + concept __indirectly_readable_impl = requires + { + typename iter_value_t<_In>; + typename iter_reference_t<_In>; + typename iter_rvalue_reference_t<_In>; + requires same_as, + iter_reference_t<_In>>; + requires same_as, + iter_rvalue_reference_t<_In>>; + } + && common_reference_with&&, iter_value_t<_In>&> + && common_reference_with&&, + iter_rvalue_reference_t<_In>&&> + && common_reference_with&&, + const iter_value_t<_In>&>; + + } + + + template + concept indirectly_readable + = __detail::__indirectly_readable_impl>; + + template + using iter_common_reference_t + = common_reference_t, iter_value_t<_Tp>&>; + + + template + concept indirectly_writable = requires(_Out&& __o, _Tp&& __t) + { + *__o = std::forward<_Tp>(__t); + *std::forward<_Out>(__o) = std::forward<_Tp>(__t); + const_cast&&>(*__o) + = std::forward<_Tp>(__t); + const_cast&&>(*std::forward<_Out>(__o)) + = std::forward<_Tp>(__t); + }; + + namespace ranges::__detail + { + class __max_diff_type; + class __max_size_type; + + template + concept __is_signed_int128 + + = same_as<_Tp, __int128>; + + + + + template + concept __is_unsigned_int128 + + = same_as<_Tp, unsigned __int128>; + + + + + template + concept __cv_bool = same_as; + + template + concept __integral_nonbool = integral<_Tp> && !__cv_bool<_Tp>; + + template + concept __is_int128 = __is_signed_int128<_Tp> || __is_unsigned_int128<_Tp>; + + template + concept __is_integer_like = __integral_nonbool<_Tp> + || __is_int128<_Tp> + || same_as<_Tp, __max_diff_type> || same_as<_Tp, __max_size_type>; + + template + concept __is_signed_integer_like = signed_integral<_Tp> + || __is_signed_int128<_Tp> + || same_as<_Tp, __max_diff_type>; + + } + + namespace __detail { using ranges::__detail::__is_signed_integer_like; } + + + template + concept weakly_incrementable = default_initializable<_Iter> + && movable<_Iter> + && requires(_Iter __i) + { + typename iter_difference_t<_Iter>; + requires __detail::__is_signed_integer_like>; + { ++__i } -> same_as<_Iter&>; + __i++; + }; + + template + concept incrementable = regular<_Iter> && weakly_incrementable<_Iter> + && requires(_Iter __i) { { __i++ } -> same_as<_Iter>; }; + + template + concept input_or_output_iterator + = requires(_Iter __i) { { *__i } -> __detail::__can_reference; } + && weakly_incrementable<_Iter>; + + template + concept sentinel_for = semiregular<_Sent> + && input_or_output_iterator<_Iter> + && __detail::__weakly_eq_cmp_with<_Sent, _Iter>; + + template + inline constexpr bool disable_sized_sentinel_for = false; + + template + concept sized_sentinel_for = sentinel_for<_Sent, _Iter> + && !disable_sized_sentinel_for, remove_cv_t<_Iter>> + && requires(const _Iter& __i, const _Sent& __s) + { + { __s - __i } -> same_as>; + { __i - __s } -> same_as>; + }; + + template + concept input_iterator = input_or_output_iterator<_Iter> + && indirectly_readable<_Iter> + && requires { typename __detail::__iter_concept<_Iter>; } + && derived_from<__detail::__iter_concept<_Iter>, input_iterator_tag>; + + template + concept output_iterator = input_or_output_iterator<_Iter> + && indirectly_writable<_Iter, _Tp> + && requires(_Iter __i, _Tp&& __t) { *__i++ = std::forward<_Tp>(__t); }; + + template + concept forward_iterator = input_iterator<_Iter> + && derived_from<__detail::__iter_concept<_Iter>, forward_iterator_tag> + && incrementable<_Iter> && sentinel_for<_Iter, _Iter>; + + template + concept bidirectional_iterator = forward_iterator<_Iter> + && derived_from<__detail::__iter_concept<_Iter>, + bidirectional_iterator_tag> + && requires(_Iter __i) + { + { --__i } -> same_as<_Iter&>; + { __i-- } -> same_as<_Iter>; + }; + + template + concept random_access_iterator = bidirectional_iterator<_Iter> + && derived_from<__detail::__iter_concept<_Iter>, + random_access_iterator_tag> + && totally_ordered<_Iter> && sized_sentinel_for<_Iter, _Iter> + && requires(_Iter __i, const _Iter __j, + const iter_difference_t<_Iter> __n) + { + { __i += __n } -> same_as<_Iter&>; + { __j + __n } -> same_as<_Iter>; + { __n + __j } -> same_as<_Iter>; + { __i -= __n } -> same_as<_Iter&>; + { __j - __n } -> same_as<_Iter>; + { __j[__n] } -> same_as>; + }; + + template + concept contiguous_iterator = random_access_iterator<_Iter> + && derived_from<__detail::__iter_concept<_Iter>, contiguous_iterator_tag> + && is_lvalue_reference_v> + && same_as, remove_cvref_t>> + && requires(const _Iter& __i) + { + { std::to_address(__i) } + -> same_as>>; + }; + + + + + + template + concept indirectly_unary_invocable = indirectly_readable<_Iter> + && copy_constructible<_Fn> && invocable<_Fn&, iter_value_t<_Iter>&> + && invocable<_Fn&, iter_reference_t<_Iter>> + && invocable<_Fn&, iter_common_reference_t<_Iter>> + && common_reference_with&>, + invoke_result_t<_Fn&, iter_reference_t<_Iter>>>; + + template + concept indirectly_regular_unary_invocable = indirectly_readable<_Iter> + && copy_constructible<_Fn> + && regular_invocable<_Fn&, iter_value_t<_Iter>&> + && regular_invocable<_Fn&, iter_reference_t<_Iter>> + && regular_invocable<_Fn&, iter_common_reference_t<_Iter>> + && common_reference_with&>, + invoke_result_t<_Fn&, iter_reference_t<_Iter>>>; + + template + concept indirect_unary_predicate = indirectly_readable<_Iter> + && copy_constructible<_Fn> && predicate<_Fn&, iter_value_t<_Iter>&> + && predicate<_Fn&, iter_reference_t<_Iter>> + && predicate<_Fn&, iter_common_reference_t<_Iter>>; + + template + concept indirect_binary_predicate + = indirectly_readable<_I1> && indirectly_readable<_I2> + && copy_constructible<_Fn> + && predicate<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> + && predicate<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> + && predicate<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> + && predicate<_Fn&, iter_reference_t<_I1>, iter_reference_t<_I2>> + && predicate<_Fn&, iter_common_reference_t<_I1>, + iter_common_reference_t<_I2>>; + + template + concept indirect_equivalence_relation + = indirectly_readable<_I1> && indirectly_readable<_I2> + && copy_constructible<_Fn> + && equivalence_relation<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> + && equivalence_relation<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> + && equivalence_relation<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> + && equivalence_relation<_Fn&, iter_reference_t<_I1>, + iter_reference_t<_I2>> + && equivalence_relation<_Fn&, iter_common_reference_t<_I1>, + iter_common_reference_t<_I2>>; + + template + concept indirect_strict_weak_order + = indirectly_readable<_I1> && indirectly_readable<_I2> + && copy_constructible<_Fn> + && strict_weak_order<_Fn&, iter_value_t<_I1>&, iter_value_t<_I2>&> + && strict_weak_order<_Fn&, iter_value_t<_I1>&, iter_reference_t<_I2>> + && strict_weak_order<_Fn&, iter_reference_t<_I1>, iter_value_t<_I2>&> + && strict_weak_order<_Fn&, iter_reference_t<_I1>, iter_reference_t<_I2>> + && strict_weak_order<_Fn&, iter_common_reference_t<_I1>, + iter_common_reference_t<_I2>>; + + template + requires (indirectly_readable<_Is> && ...) + && invocable<_Fn, iter_reference_t<_Is>...> + using indirect_result_t = invoke_result_t<_Fn, iter_reference_t<_Is>...>; + + + template _Proj> + struct projected + { + using value_type = remove_cvref_t>; + + indirect_result_t<_Proj&, _Iter> operator*() const; + }; + + template + struct incrementable_traits> + { using difference_type = iter_difference_t<_Iter>; }; + + + + + + template + concept indirectly_movable = indirectly_readable<_In> + && indirectly_writable<_Out, iter_rvalue_reference_t<_In>>; + + template + concept indirectly_movable_storable = indirectly_movable<_In, _Out> + && indirectly_writable<_Out, iter_value_t<_In>> + && movable> + && constructible_from, iter_rvalue_reference_t<_In>> + && assignable_from&, iter_rvalue_reference_t<_In>>; + + + template + concept indirectly_copyable = indirectly_readable<_In> + && indirectly_writable<_Out, iter_reference_t<_In>>; + + template + concept indirectly_copyable_storable = indirectly_copyable<_In, _Out> + && indirectly_writable<_Out, iter_value_t<_In>&> + && indirectly_writable<_Out, const iter_value_t<_In>&> + && indirectly_writable<_Out, iter_value_t<_In>&&> + && indirectly_writable<_Out, const iter_value_t<_In>&&> + && copyable> + && constructible_from, iter_reference_t<_In>> + && assignable_from&, iter_reference_t<_In>>; + +namespace ranges +{ + namespace __cust_iswap + { + template + void iter_swap(_It1, _It2) = delete; + + template + concept __adl_iswap + = (std::__detail::__class_or_enum> + || std::__detail::__class_or_enum>) + && requires(_Tp&& __t, _Up&& __u) { + iter_swap(static_cast<_Tp&&>(__t), static_cast<_Up&&>(__u)); + }; + + template + constexpr iter_value_t<_Xp> + __iter_exchange_move(_Xp&& __x, _Yp&& __y) + noexcept(noexcept(iter_value_t<_Xp>(iter_move(__x))) + && noexcept(*__x = iter_move(__y))) + { + iter_value_t<_Xp> __old_value(iter_move(__x)); + *__x = iter_move(__y); + return __old_value; + } + + struct _IterSwap + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__adl_iswap<_Tp, _Up>) + return noexcept(iter_swap(std::declval<_Tp>(), + std::declval<_Up>())); + else if constexpr (indirectly_readable<_Tp> + && indirectly_readable<_Up> + && swappable_with, iter_reference_t<_Up>>) + return noexcept(ranges::swap(*std::declval<_Tp>(), + *std::declval<_Up>())); + else + return noexcept(*std::declval<_Tp>() + = __iter_exchange_move(std::declval<_Up>(), + std::declval<_Tp>())); + } + + public: + template + requires __adl_iswap<_Tp, _Up> + || (indirectly_readable> + && indirectly_readable> + && swappable_with, iter_reference_t<_Up>>) + || (indirectly_movable_storable<_Tp, _Up> + && indirectly_movable_storable<_Up, _Tp>) + constexpr void + operator()(_Tp&& __e1, _Up&& __e2) const + noexcept(_S_noexcept<_Tp, _Up>()) + { + if constexpr (__adl_iswap<_Tp, _Up>) + iter_swap(static_cast<_Tp&&>(__e1), static_cast<_Up&&>(__e2)); + else if constexpr (indirectly_readable<_Tp> + && indirectly_readable<_Up> + && swappable_with, iter_reference_t<_Up>>) + ranges::swap(*__e1, *__e2); + else + *__e1 = __iter_exchange_move(__e2, __e1); + } + }; + } + + inline namespace __cust + { + inline constexpr __cust_iswap::_IterSwap iter_swap{}; + } + +} + + + template + concept indirectly_swappable + = indirectly_readable<_I1> && indirectly_readable<_I2> + && requires(const _I1 __i1, const _I2 __i2) + { + ranges::iter_swap(__i1, __i1); + ranges::iter_swap(__i2, __i2); + ranges::iter_swap(__i1, __i2); + ranges::iter_swap(__i2, __i1); + }; + + + template + concept indirectly_comparable + = indirect_binary_predicate<_Rel, projected<_I1, _P1>, + projected<_I2, _P2>>; + + + template + concept permutable = forward_iterator<_Iter> + && indirectly_movable_storable<_Iter, _Iter> + && indirectly_swappable<_Iter, _Iter>; + + + template + concept mergeable = input_iterator<_I1> && input_iterator<_I2> + && weakly_incrementable<_Out> && indirectly_copyable<_I1, _Out> + && indirectly_copyable<_I2, _Out> + && indirect_strict_weak_order<_Rel, projected<_I1, _P1>, + projected<_I2, _P2>>; + + + template + concept sortable = permutable<_Iter> + && indirect_strict_weak_order<_Rel, projected<_Iter, _Proj>>; + + struct unreachable_sentinel_t + { + template + friend constexpr bool + operator==(unreachable_sentinel_t, const _It&) noexcept + { return false; } + }; + + inline constexpr unreachable_sentinel_t unreachable_sentinel{}; + + struct default_sentinel_t { }; + inline constexpr default_sentinel_t default_sentinel{}; + + + namespace ranges::__cust_access + { + using std::__detail::__class_or_enum; + + struct _Decay_copy final + { + template + constexpr decay_t<_Tp> + operator()(_Tp&& __t) const + noexcept(is_nothrow_convertible_v<_Tp, decay_t<_Tp>>) + { return std::forward<_Tp>(__t); } + } inline constexpr __decay_copy{}; + + template + concept __member_begin = requires(_Tp& __t) + { + { __decay_copy(__t.begin()) } -> input_or_output_iterator; + }; + + + void begin(auto&) = delete; + void begin(const auto&) = delete; + + template + concept __adl_begin = __class_or_enum> + && requires(_Tp& __t) + { + { __decay_copy(begin(__t)) } -> input_or_output_iterator; + }; + + + + template + requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&> + auto + __begin(_Tp& __t) + { + if constexpr (is_array_v<_Tp>) + return __t + 0; + else if constexpr (__member_begin<_Tp&>) + return __t.begin(); + else + return begin(__t); + } + } + + namespace __detail + { + + template + using __range_iter_t + = decltype(ranges::__cust_access::__begin(std::declval<_Tp&>())); + + } + + +} +# 72 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 2 3 + + +namespace std +{ + +# 93 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + struct input_iterator_tag { }; + + + struct output_iterator_tag { }; + + + struct forward_iterator_tag : public input_iterator_tag { }; + + + + struct bidirectional_iterator_tag : public forward_iterator_tag { }; + + + + struct random_access_iterator_tag : public bidirectional_iterator_tag { }; + + + + struct contiguous_iterator_tag : public random_access_iterator_tag { }; +# 125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + struct iterator + { + + typedef _Category iterator_category; + + typedef _Tp value_type; + + typedef _Distance difference_type; + + typedef _Pointer pointer; + + typedef _Reference reference; + }; +# 149 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + struct iterator_traits; + + + + + template> + struct __iterator_traits { }; +# 176 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + struct iterator_traits + : public __iterator_traits<_Iterator> { }; +# 194 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + + requires is_object_v<_Tp> + + struct iterator_traits<_Tp*> + { + using iterator_concept = contiguous_iterator_tag; + using iterator_category = random_access_iterator_tag; + using value_type = remove_cv_t<_Tp>; + using difference_type = ptrdiff_t; + using pointer = _Tp*; + using reference = _Tp&; + }; +# 235 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_types.h" 3 + template + inline constexpr + typename iterator_traits<_Iter>::iterator_category + __iterator_category(const _Iter&) + { return typename iterator_traits<_Iter>::iterator_category(); } + + + + + template + using __iterator_category_t + = typename iterator_traits<_Iter>::iterator_category; + + template + using _RequireInputIter = + __enable_if_t, + input_iterator_tag>::value>; + + template> + struct __is_random_access_iter + : is_base_of + { + typedef is_base_of _Base; + enum { __value = _Base::value }; + }; + + + + + + + + +} +# 66 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 3 + +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/concept_check.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/concept_check.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/concept_check.h" 3 +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/debug/assertions.h" 1 3 +# 66 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 2 3 + +namespace std +{ + + + + + template struct _List_iterator; + template struct _List_const_iterator; + + + template + inline constexpr + typename iterator_traits<_InputIterator>::difference_type + __distance(_InputIterator __first, _InputIterator __last, + input_iterator_tag) + { + + + + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + + template + inline constexpr + typename iterator_traits<_RandomAccessIterator>::difference_type + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + return __last - __first; + } + + + + template + ptrdiff_t + __distance(std::_List_iterator<_Tp>, + std::_List_iterator<_Tp>, + input_iterator_tag); + + template + ptrdiff_t + __distance(std::_List_const_iterator<_Tp>, + std::_List_const_iterator<_Tp>, + input_iterator_tag); +# 135 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 3 + template + inline constexpr + typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + + return std::__distance(__first, __last, + std::__iterator_category(__first)); + } + + template + inline constexpr void + __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) + { + + + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + while (__n--) + ++__i; + } + + template + inline constexpr void + __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) + { + + + + if (__n > 0) + while (__n--) + ++__i; + else + while (__n++) + --__i; + } + + template + inline constexpr void + __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) + { + + + + if (__builtin_constant_p(__n) && __n == 1) + ++__i; + else if (__builtin_constant_p(__n) && __n == -1) + --__i; + else + __i += __n; + } +# 200 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator_base_funcs.h" 3 + template + inline constexpr void + advance(_InputIterator& __i, _Distance __n) + { + + typename iterator_traits<_InputIterator>::difference_type __d = __n; + std::__advance(__i, __d, std::__iterator_category(__i)); + } + + + + template + inline constexpr _InputIterator + next(_InputIterator __x, typename + iterator_traits<_InputIterator>::difference_type __n = 1) + { + + + std::advance(__x, __n); + return __x; + } + + template + inline constexpr _BidirectionalIterator + prev(_BidirectionalIterator __x, typename + iterator_traits<_BidirectionalIterator>::difference_type __n = 1) + { + + + + std::advance(__x, -__n); + return __x; + } + + + + +} +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 1 3 +# 82 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 1 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 3 + +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception.h" 3 + +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception.h" 3 + +#pragma GCC visibility push(default) + + + +extern "C++" { + +namespace std +{ +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception.h" 3 + class exception + { + public: + exception() noexcept { } + virtual ~exception() noexcept; + + exception(const exception&) = default; + exception& operator=(const exception&) = default; + exception(exception&&) = default; + exception& operator=(exception&&) = default; + + + + + virtual const char* + what() const noexcept; + }; + + + +} + +} + +#pragma GCC visibility pop +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 2 3 + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace std +{ + + + + + + + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + + + bad_alloc(const bad_alloc&) = default; + bad_alloc& operator=(const bad_alloc&) = default; + + + + + virtual ~bad_alloc() throw(); + + + virtual const char* what() const throw(); + }; + + + class bad_array_new_length : public bad_alloc + { + public: + bad_array_new_length() throw() { } + + + + virtual ~bad_array_new_length() throw(); + + + virtual const char* what() const throw(); + }; + + + + enum class align_val_t: size_t {}; + + + struct nothrow_t + { + + explicit nothrow_t() = default; + + }; + + extern const nothrow_t nothrow; + + + + typedef void (*new_handler)(); + + + + new_handler set_new_handler(new_handler) throw(); + + + + new_handler get_new_handler() noexcept; + +} +# 126 "D:/compilers/msys64/mingw64/include/c++/11.2.0/new" 3 +[[__nodiscard__]] void* operator new(std::size_t) + __attribute__((__externally_visible__)); +[[__nodiscard__]] void* operator new[](std::size_t) + __attribute__((__externally_visible__)); +void operator delete(void*) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*) noexcept + __attribute__((__externally_visible__)); + +void operator delete(void*, std::size_t) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*, std::size_t) noexcept + __attribute__((__externally_visible__)); + +[[__nodiscard__]] void* operator new(std::size_t, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +[[__nodiscard__]] void* operator new[](std::size_t, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +void operator delete(void*, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__)); +void operator delete[](void*, const std::nothrow_t&) noexcept + __attribute__((__externally_visible__)); + +[[__nodiscard__]] void* operator new(std::size_t, std::align_val_t) + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +[[__nodiscard__]] void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) + noexcept __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +void operator delete(void*, std::align_val_t) + noexcept __attribute__((__externally_visible__)); +void operator delete(void*, std::align_val_t, const std::nothrow_t&) + noexcept __attribute__((__externally_visible__)); +[[__nodiscard__]] void* operator new[](std::size_t, std::align_val_t) + __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +[[__nodiscard__]] void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) + noexcept __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); +void operator delete[](void*, std::align_val_t) + noexcept __attribute__((__externally_visible__)); +void operator delete[](void*, std::align_val_t, const std::nothrow_t&) + noexcept __attribute__((__externally_visible__)); + +void operator delete(void*, std::size_t, std::align_val_t) + noexcept __attribute__((__externally_visible__)); +void operator delete[](void*, std::size_t, std::align_val_t) + noexcept __attribute__((__externally_visible__)); + + + + +[[__nodiscard__]] inline void* operator new(std::size_t, void* __p) noexcept +{ return __p; } +[[__nodiscard__]] inline void* operator new[](std::size_t, void* __p) noexcept +{ return __p; } + + +inline void operator delete (void*, void*) noexcept { } +inline void operator delete[](void*, void*) noexcept { } + +} + + + +namespace std +{ + + + template + [[nodiscard]] constexpr _Tp* + launder(_Tp* __p) noexcept + { return __builtin_launder(__p); } + + + + + template + void launder(_Ret (*)(_Args...) noexcept (_NE)) = delete; + template + void launder(_Ret (*)(_Args......) noexcept (_NE)) = delete; + + void launder(void*) = delete; + void launder(const void*) = delete; + void launder(volatile void*) = delete; + void launder(const volatile void*) = delete; +} + + + + +namespace std +{ + + + struct destroying_delete_t + { + explicit destroying_delete_t() = default; + }; + + inline constexpr destroying_delete_t destroying_delete{}; +} + + + + + + +#pragma GCC visibility pop +# 83 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 2 3 + + + + +namespace std +{ + + + + + + + + + namespace __detail + { + + + template + using __clamp_iter_cat + = conditional_t, _Limit, _Otherwise>; + } +# 126 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class reverse_iterator + : public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> + { + template + friend class reverse_iterator; + + + + + template + static constexpr bool __convertible = !is_same_v<_Iter, _Iterator> + && convertible_to; + + + protected: + _Iterator current; + + typedef iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::pointer pointer; + + + + + using iterator_concept + = conditional_t, + random_access_iterator_tag, + bidirectional_iterator_tag>; + using iterator_category + = __detail::__clamp_iter_cat; + using value_type = iter_value_t<_Iterator>; + using difference_type = iter_difference_t<_Iterator>; + using reference = iter_reference_t<_Iterator>; +# 176 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + reverse_iterator() : current() { } + + + + + explicit constexpr + reverse_iterator(iterator_type __x) : current(__x) { } + + + + + constexpr + reverse_iterator(const reverse_iterator& __x) + : current(__x.current) { } + + + reverse_iterator& operator=(const reverse_iterator&) = default; + + + + + + + template + + requires __convertible<_Iter> + + constexpr + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.current) { } + + + template + + requires __convertible<_Iter> + && assignable_from<_Iterator&, const _Iter&> + + constexpr + reverse_iterator& + operator=(const reverse_iterator<_Iter>& __x) + { + current = __x.current; + return *this; + } + + + + + + constexpr iterator_type + base() const + { return current; } +# 240 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr reference + operator*() const + { + _Iterator __tmp = current; + return *--__tmp; + } + + + + + + + constexpr pointer + operator->() const + + requires is_pointer_v<_Iterator> + || requires(const _Iterator __i) { __i.operator->(); } + + { + + + _Iterator __tmp = current; + --__tmp; + return _S_to_pointer(__tmp); + } + + + + + + + constexpr reverse_iterator& + operator++() + { + --current; + return *this; + } + + + + + + + constexpr reverse_iterator + operator++(int) + { + reverse_iterator __tmp = *this; + --current; + return __tmp; + } + + + + + + + constexpr reverse_iterator& + operator--() + { + ++current; + return *this; + } + + + + + + + constexpr reverse_iterator + operator--(int) + { + reverse_iterator __tmp = *this; + ++current; + return __tmp; + } + + + + + + + constexpr reverse_iterator + operator+(difference_type __n) const + { return reverse_iterator(current - __n); } + + + + + + + + constexpr reverse_iterator& + operator+=(difference_type __n) + { + current -= __n; + return *this; + } + + + + + + + constexpr reverse_iterator + operator-(difference_type __n) const + { return reverse_iterator(current + __n); } + + + + + + + + constexpr reverse_iterator& + operator-=(difference_type __n) + { + current += __n; + return *this; + } + + + + + + + constexpr reference + operator[](difference_type __n) const + { return *(*this + __n); } + + + friend constexpr iter_rvalue_reference_t<_Iterator> + iter_move(const reverse_iterator& __i) + noexcept(is_nothrow_copy_constructible_v<_Iterator> + && noexcept(ranges::iter_move(--std::declval<_Iterator&>()))) + { + auto __tmp = __i.base(); + return ranges::iter_move(--__tmp); + } + + template _Iter2> + friend constexpr void + iter_swap(const reverse_iterator& __x, + const reverse_iterator<_Iter2>& __y) + noexcept(is_nothrow_copy_constructible_v<_Iterator> + && is_nothrow_copy_constructible_v<_Iter2> + && noexcept(ranges::iter_swap(--std::declval<_Iterator&>(), + --std::declval<_Iter2&>()))) + { + auto __xtmp = __x.base(); + auto __ytmp = __y.base(); + ranges::iter_swap(--__xtmp, --__ytmp); + } + + + private: + template + static constexpr _Tp* + _S_to_pointer(_Tp* __p) + { return __p; } + + template + static constexpr pointer + _S_to_pointer(_Tp __t) + { return __t.operator->(); } + }; +# 492 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + constexpr bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() == __y.base() } -> convertible_to; } + { return __x.base() == __y.base(); } + + template + constexpr bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() != __y.base() } -> convertible_to; } + { return __x.base() != __y.base(); } + + template + constexpr bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() > __y.base() } -> convertible_to; } + { return __x.base() > __y.base(); } + + template + constexpr bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() < __y.base() } -> convertible_to; } + { return __x.base() < __y.base(); } + + template + constexpr bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() >= __y.base() } -> convertible_to; } + { return __x.base() >= __y.base(); } + + template + constexpr bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + requires requires { { __x.base() <= __y.base() } -> convertible_to; } + { return __x.base() <= __y.base(); } + + template _IteratorR> + constexpr compare_three_way_result_t<_IteratorL, _IteratorR> + operator<=>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() <=> __x.base(); } +# 558 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + inline constexpr auto + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + -> decltype(__y.base() - __x.base()) + { return __y.base() - __x.base(); } + + + template + inline constexpr reverse_iterator<_Iterator> + operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) + { return reverse_iterator<_Iterator>(__x.base() - __n); } + + + + template + inline constexpr reverse_iterator<_Iterator> + __make_reverse_iterator(_Iterator __i) + { return reverse_iterator<_Iterator>(__i); } + + + + + + + + template + inline constexpr reverse_iterator<_Iterator> + make_reverse_iterator(_Iterator __i) + { return reverse_iterator<_Iterator>(__i); } + + + template + requires (!sized_sentinel_for<_Iterator1, _Iterator2>) + inline constexpr bool + disable_sized_sentinel_for, + reverse_iterator<_Iterator2>> = true; + + + + template + constexpr + auto + __niter_base(reverse_iterator<_Iterator> __it) + -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) + { return __make_reverse_iterator(__niter_base(__it.base())); } + + template + struct __is_move_iterator > + : __is_move_iterator<_Iterator> + { }; + + template + constexpr + auto + __miter_base(reverse_iterator<_Iterator> __it) + -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) + { return __make_reverse_iterator(__miter_base(__it.base())); } +# 630 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class back_insert_iterator + : public iterator + { + protected: + _Container* container; + + public: + + typedef _Container container_type; + + using difference_type = ptrdiff_t; + + constexpr back_insert_iterator() noexcept : container(nullptr) { } + + + + explicit constexpr + back_insert_iterator(_Container& __x) + : container(std::__addressof(__x)) { } +# 670 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + back_insert_iterator& + operator=(const typename _Container::value_type& __value) + { + container->push_back(__value); + return *this; + } + + constexpr + back_insert_iterator& + operator=(typename _Container::value_type&& __value) + { + container->push_back(std::move(__value)); + return *this; + } + + + + constexpr + back_insert_iterator& + operator*() + { return *this; } + + + constexpr + back_insert_iterator& + operator++() + { return *this; } + + + constexpr + back_insert_iterator + operator++(int) + { return *this; } + }; +# 717 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + constexpr + inline back_insert_iterator<_Container> + back_inserter(_Container& __x) + { return back_insert_iterator<_Container>(__x); } +# 733 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class front_insert_iterator + : public iterator + { + protected: + _Container* container; + + public: + + typedef _Container container_type; + + using difference_type = ptrdiff_t; + + constexpr front_insert_iterator() noexcept : container(nullptr) { } + + + + explicit constexpr + front_insert_iterator(_Container& __x) + : container(std::__addressof(__x)) { } +# 773 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + front_insert_iterator& + operator=(const typename _Container::value_type& __value) + { + container->push_front(__value); + return *this; + } + + constexpr + front_insert_iterator& + operator=(typename _Container::value_type&& __value) + { + container->push_front(std::move(__value)); + return *this; + } + + + + constexpr + front_insert_iterator& + operator*() + { return *this; } + + + constexpr + front_insert_iterator& + operator++() + { return *this; } + + + constexpr + front_insert_iterator + operator++(int) + { return *this; } + }; +# 820 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + constexpr + inline front_insert_iterator<_Container> + front_inserter(_Container& __x) + { return front_insert_iterator<_Container>(__x); } +# 840 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class insert_iterator + : public iterator + { + + using _Iter = std::__detail::__range_iter_t<_Container>; + + protected: + _Container* container = nullptr; + _Iter iter = _Iter(); +# 858 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + public: + + typedef _Container container_type; + + + using difference_type = ptrdiff_t; + + insert_iterator() = default; + + + + + + + constexpr + insert_iterator(_Container& __x, _Iter __i) + : container(std::__addressof(__x)), iter(__i) {} +# 908 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + insert_iterator& + operator=(const typename _Container::value_type& __value) + { + iter = container->insert(iter, __value); + ++iter; + return *this; + } + + constexpr + insert_iterator& + operator=(typename _Container::value_type&& __value) + { + iter = container->insert(iter, std::move(__value)); + ++iter; + return *this; + } + + + + constexpr + insert_iterator& + operator*() + { return *this; } + + + constexpr + insert_iterator& + operator++() + { return *this; } + + + constexpr + insert_iterator& + operator++(int) + { return *this; } + }; +# 959 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + constexpr insert_iterator<_Container> + inserter(_Container& __x, std::__detail::__range_iter_t<_Container> __i) + { return insert_iterator<_Container>(__x, __i); } +# 972 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + +} + +namespace __gnu_cxx +{ + +# 986 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class __normal_iterator + { + protected: + _Iterator _M_current; + + typedef std::iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::iterator_category iterator_category; + typedef typename __traits_type::value_type value_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::reference reference; + typedef typename __traits_type::pointer pointer; + + + using iterator_concept = std::__detail::__iter_concept<_Iterator>; + + + constexpr __normal_iterator() noexcept + : _M_current(_Iterator()) { } + + explicit constexpr + __normal_iterator(const _Iterator& __i) noexcept + : _M_current(__i) { } + + + template + constexpr + __normal_iterator(const __normal_iterator<_Iter, + typename __enable_if< + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) noexcept + : _M_current(__i.base()) { } + + + constexpr + reference + operator*() const noexcept + { return *_M_current; } + + constexpr + pointer + operator->() const noexcept + { return _M_current; } + + constexpr + __normal_iterator& + operator++() noexcept + { + ++_M_current; + return *this; + } + + constexpr + __normal_iterator + operator++(int) noexcept + { return __normal_iterator(_M_current++); } + + + constexpr + __normal_iterator& + operator--() noexcept + { + --_M_current; + return *this; + } + + constexpr + __normal_iterator + operator--(int) noexcept + { return __normal_iterator(_M_current--); } + + + constexpr + reference + operator[](difference_type __n) const noexcept + { return _M_current[__n]; } + + constexpr + __normal_iterator& + operator+=(difference_type __n) noexcept + { _M_current += __n; return *this; } + + constexpr + __normal_iterator + operator+(difference_type __n) const noexcept + { return __normal_iterator(_M_current + __n); } + + constexpr + __normal_iterator& + operator-=(difference_type __n) noexcept + { _M_current -= __n; return *this; } + + constexpr + __normal_iterator + operator-(difference_type __n) const noexcept + { return __normal_iterator(_M_current - __n); } + + constexpr + const _Iterator& + base() const noexcept + { return _M_current; } + }; +# 1101 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + requires requires (_IteratorL __lhs, _IteratorR __rhs) + { { __lhs == __rhs } -> std::convertible_to; } + constexpr bool + operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + noexcept(noexcept(__lhs.base() == __rhs.base())) + { return __lhs.base() == __rhs.base(); } + + template + constexpr std::__detail::__synth3way_t<_IteratorR, _IteratorL> + operator<=>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + noexcept(noexcept(std::__detail::__synth3way(__lhs.base(), __rhs.base()))) + { return std::__detail::__synth3way(__lhs.base(), __rhs.base()); } +# 1216 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + + + constexpr + inline auto + operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept + -> decltype(__lhs.base() - __rhs.base()) + + + + + + { return __lhs.base() - __rhs.base(); } + + template + constexpr + inline typename __normal_iterator<_Iterator, _Container>::difference_type + operator-(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + noexcept + { return __lhs.base() - __rhs.base(); } + + template + constexpr + inline __normal_iterator<_Iterator, _Container> + operator+(typename __normal_iterator<_Iterator, _Container>::difference_type + __n, const __normal_iterator<_Iterator, _Container>& __i) + noexcept + { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } + + +} + +namespace std +{ + + + template + constexpr + _Iterator + __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) + noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) + { return __it.base(); } +# 1268 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class move_sentinel + { + public: + constexpr + move_sentinel() + noexcept(is_nothrow_default_constructible_v<_Sent>) + : _M_last() { } + + constexpr explicit + move_sentinel(_Sent __s) + noexcept(is_nothrow_move_constructible_v<_Sent>) + : _M_last(std::move(__s)) { } + + template requires convertible_to + constexpr + move_sentinel(const move_sentinel<_S2>& __s) + noexcept(is_nothrow_constructible_v<_Sent, const _S2&>) + : _M_last(__s.base()) + { } + + template requires assignable_from<_Sent&, const _S2&> + constexpr move_sentinel& + operator=(const move_sentinel<_S2>& __s) + noexcept(is_nothrow_assignable_v<_Sent, const _S2&>) + { + _M_last = __s.base(); + return *this; + } + + constexpr _Sent + base() const + noexcept(is_nothrow_copy_constructible_v<_Sent>) + { return _M_last; } + + private: + _Sent _M_last; + }; + + + namespace __detail + { + + template + struct __move_iter_cat + { }; + + template + requires requires { typename iterator_traits<_Iterator>::iterator_category; } + struct __move_iter_cat<_Iterator> + { + using iterator_category + = __clamp_iter_cat::iterator_category, + random_access_iterator_tag>; + }; + + } +# 1335 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + class move_iterator + + : public __detail::__move_iter_cat<_Iterator> + + { + _Iterator _M_current; + + using __traits_type = iterator_traits<_Iterator>; + + + + + template + friend class move_iterator; + + + + + template + static constexpr bool __convertible = !is_same_v<_Iter2, _Iterator> + && convertible_to; + + + public: + using iterator_type = _Iterator; + + + using iterator_concept = input_iterator_tag; + + using value_type = iter_value_t<_Iterator>; + using difference_type = iter_difference_t<_Iterator>; + using pointer = _Iterator; + using reference = iter_rvalue_reference_t<_Iterator>; +# 1382 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + constexpr + move_iterator() + : _M_current() { } + + explicit constexpr + move_iterator(iterator_type __i) + : _M_current(std::move(__i)) { } + + template + + requires __convertible<_Iter> + + constexpr + move_iterator(const move_iterator<_Iter>& __i) + : _M_current(__i._M_current) { } + + template + + requires __convertible<_Iter> + && assignable_from<_Iterator&, const _Iter&> + + constexpr + move_iterator& operator=(const move_iterator<_Iter>& __i) + { + _M_current = __i._M_current; + return *this; + } + + + + + + + constexpr const iterator_type& + base() const & noexcept + { return _M_current; } + + constexpr iterator_type + base() && + { return std::move(_M_current); } + + + constexpr reference + operator*() const + + { return ranges::iter_move(_M_current); } + + + + + constexpr pointer + operator->() const + { return _M_current; } + + constexpr move_iterator& + operator++() + { + ++_M_current; + return *this; + } + + constexpr move_iterator + operator++(int) + { + move_iterator __tmp = *this; + ++_M_current; + return __tmp; + } + + + constexpr void + operator++(int) requires (!forward_iterator<_Iterator>) + { ++_M_current; } + + + constexpr move_iterator& + operator--() + { + --_M_current; + return *this; + } + + constexpr move_iterator + operator--(int) + { + move_iterator __tmp = *this; + --_M_current; + return __tmp; + } + + constexpr move_iterator + operator+(difference_type __n) const + { return move_iterator(_M_current + __n); } + + constexpr move_iterator& + operator+=(difference_type __n) + { + _M_current += __n; + return *this; + } + + constexpr move_iterator + operator-(difference_type __n) const + { return move_iterator(_M_current - __n); } + + constexpr move_iterator& + operator-=(difference_type __n) + { + _M_current -= __n; + return *this; + } + + constexpr reference + operator[](difference_type __n) const + + { return ranges::iter_move(_M_current + __n); } + + + + + + template _Sent> + friend constexpr bool + operator==(const move_iterator& __x, const move_sentinel<_Sent>& __y) + { return __x.base() == __y.base(); } + + template _Sent> + friend constexpr iter_difference_t<_Iterator> + operator-(const move_sentinel<_Sent>& __x, const move_iterator& __y) + { return __x.base() - __y.base(); } + + template _Sent> + friend constexpr iter_difference_t<_Iterator> + operator-(const move_iterator& __x, const move_sentinel<_Sent>& __y) + { return __x.base() - __y.base(); } + + friend constexpr iter_rvalue_reference_t<_Iterator> + iter_move(const move_iterator& __i) + noexcept(noexcept(ranges::iter_move(__i._M_current))) + { return ranges::iter_move(__i._M_current); } + + template _Iter2> + friend constexpr void + iter_swap(const move_iterator& __x, const move_iterator<_Iter2>& __y) + noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current))) + { return ranges::iter_swap(__x._M_current, __y._M_current); } + + }; + + template + inline constexpr bool + operator==(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __x.base() == __y.base() } -> convertible_to; } + + { return __x.base() == __y.base(); } + + + template _IteratorR> + constexpr compare_three_way_result_t<_IteratorL, _IteratorR> + operator<=>(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + { return __x.base() <=> __y.base(); } +# 1555 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + inline constexpr bool + operator<(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __x.base() < __y.base() } -> convertible_to; } + + { return __x.base() < __y.base(); } + + template + inline constexpr bool + operator<=(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __y.base() < __x.base() } -> convertible_to; } + + { return !(__y < __x); } + + template + inline constexpr bool + operator>(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __y.base() < __x.base() } -> convertible_to; } + + { return __y < __x; } + + template + inline constexpr bool + operator>=(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + + requires requires { { __x.base() < __y.base() } -> convertible_to; } + + { return !(__x < __y); } +# 1637 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + inline constexpr auto + operator-(const move_iterator<_IteratorL>& __x, + const move_iterator<_IteratorR>& __y) + -> decltype(__x.base() - __y.base()) + { return __x.base() - __y.base(); } + + template + inline constexpr move_iterator<_Iterator> + operator+(typename move_iterator<_Iterator>::difference_type __n, + const move_iterator<_Iterator>& __x) + { return __x + __n; } + + template + inline constexpr move_iterator<_Iterator> + make_move_iterator(_Iterator __i) + { return move_iterator<_Iterator>(std::move(__i)); } + + template::value_type>::value, + _Iterator, move_iterator<_Iterator>>::type> + inline constexpr _ReturnType + __make_move_if_noexcept_iterator(_Iterator __i) + { return _ReturnType(__i); } + + + + template::value, + const _Tp*, move_iterator<_Tp*>>::type> + inline constexpr _ReturnType + __make_move_if_noexcept_iterator(_Tp* __i) + { return _ReturnType(__i); } + + + + + namespace __detail + { + template + concept __common_iter_has_arrow = indirectly_readable + && (requires(const _It& __it) { __it.operator->(); } + || is_reference_v> + || constructible_from, iter_reference_t<_It>>); + + template + concept __common_iter_use_postfix_proxy + = (!requires (_It& __i) { { *__i++ } -> __can_reference; }) + && constructible_from, iter_reference_t<_It>>; + } + + + template _Sent> + requires (!same_as<_It, _Sent>) && copyable<_It> + class common_iterator + { + template + static constexpr bool + _S_noexcept1() + { + if constexpr (is_trivially_default_constructible_v<_Tp>) + return is_nothrow_assignable_v<_Tp, _Up>; + else + return is_nothrow_constructible_v<_Tp, _Up>; + } + + template + static constexpr bool + _S_noexcept() + { return _S_noexcept1<_It, _It2>() && _S_noexcept1<_Sent, _Sent2>(); } + + class __arrow_proxy + { + iter_value_t<_It> _M_keep; + + __arrow_proxy(iter_reference_t<_It>&& __x) + : _M_keep(std::move(__x)) { } + + friend class common_iterator; + + public: + const iter_value_t<_It>* + operator->() const + { return std::__addressof(_M_keep); } + }; + + class __postfix_proxy + { + iter_value_t<_It> _M_keep; + + __postfix_proxy(iter_reference_t<_It>&& __x) + : _M_keep(std::move(__x)) { } + + friend class common_iterator; + + public: + const iter_value_t<_It>& + operator*() const + { return _M_keep; } + }; + + public: + constexpr + common_iterator() + noexcept(is_nothrow_default_constructible_v<_It>) + : _M_it(), _M_index(0) + { } + + constexpr + common_iterator(_It __i) + noexcept(is_nothrow_move_constructible_v<_It>) + : _M_it(std::move(__i)), _M_index(0) + { } + + constexpr + common_iterator(_Sent __s) + noexcept(is_nothrow_move_constructible_v<_Sent>) + : _M_sent(std::move(__s)), _M_index(1) + { } + + template + requires convertible_to + && convertible_to + constexpr + common_iterator(const common_iterator<_It2, _Sent2>& __x) + noexcept(_S_noexcept()) + : _M_valueless(), _M_index(__x._M_index) + { + if (_M_index == 0) + { + if constexpr (is_trivially_default_constructible_v<_It>) + _M_it = std::move(__x._M_it); + else + ::new((void*)std::__addressof(_M_it)) _It(__x._M_it); + } + else if (_M_index == 1) + { + if constexpr (is_trivially_default_constructible_v<_Sent>) + _M_sent = std::move(__x._M_sent); + else + ::new((void*)std::__addressof(_M_sent)) _Sent(__x._M_sent); + } + } + + constexpr + common_iterator(const common_iterator& __x) + noexcept(_S_noexcept()) + : _M_valueless(), _M_index(__x._M_index) + { + if (_M_index == 0) + { + if constexpr (is_trivially_default_constructible_v<_It>) + _M_it = std::move(__x._M_it); + else + ::new((void*)std::__addressof(_M_it)) _It(__x._M_it); + } + else if (_M_index == 1) + { + if constexpr (is_trivially_default_constructible_v<_Sent>) + _M_sent = std::move(__x._M_sent); + else + ::new((void*)std::__addressof(_M_sent)) _Sent(__x._M_sent); + } + } + + common_iterator& + operator=(const common_iterator& __x) + noexcept(is_nothrow_copy_assignable_v<_It> + && is_nothrow_copy_assignable_v<_Sent> + && is_nothrow_copy_constructible_v<_It> + && is_nothrow_copy_constructible_v<_Sent>) + { + return this->operator=<_It, _Sent>(__x); + } + + template + requires convertible_to + && convertible_to + && assignable_from<_It&, const _It2&> + && assignable_from<_Sent&, const _Sent2&> + common_iterator& + operator=(const common_iterator<_It2, _Sent2>& __x) + noexcept(is_nothrow_constructible_v<_It, const _It2&> + && is_nothrow_constructible_v<_Sent, const _Sent2&> + && is_nothrow_assignable_v<_It, const _It2&> + && is_nothrow_assignable_v<_Sent, const _Sent2&>) + { + switch(_M_index << 2 | __x._M_index) + { + case 0b0000: + _M_it = __x._M_it; + break; + case 0b0101: + _M_sent = __x._M_sent; + break; + case 0b0001: + _M_it.~_It(); + _M_index = -1; + [[fallthrough]]; + case 0b1001: + ::new((void*)std::__addressof(_M_sent)) _Sent(__x._M_sent); + _M_index = 1; + break; + case 0b0100: + _M_sent.~_Sent(); + _M_index = -1; + [[fallthrough]]; + case 0b1000: + ::new((void*)std::__addressof(_M_it)) _It(__x._M_it); + _M_index = 0; + break; + default: + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); + __builtin_unreachable(); + } + return *this; + } + + ~common_iterator() + { + switch (_M_index) + { + case 0: + _M_it.~_It(); + break; + case 1: + _M_sent.~_Sent(); + break; + } + } + + decltype(auto) + operator*() + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + return *_M_it; + } + + decltype(auto) + operator*() const requires __detail::__dereferenceable + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + return *_M_it; + } + + decltype(auto) + operator->() const requires __detail::__common_iter_has_arrow<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + if constexpr (is_pointer_v<_It> || requires { _M_it.operator->(); }) + return _M_it; + else if constexpr (is_reference_v>) + { + auto&& __tmp = *_M_it; + return std::__addressof(__tmp); + } + else + return __arrow_proxy{*_M_it}; + } + + common_iterator& + operator++() + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + ++_M_it; + return *this; + } + + decltype(auto) + operator++(int) + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_index == 0)) __builtin_unreachable(); } while (false); + if constexpr (forward_iterator<_It>) + { + common_iterator __tmp = *this; + ++*this; + return __tmp; + } + else if constexpr (!__detail::__common_iter_use_postfix_proxy<_It>) + return _M_it++; + else + { + __postfix_proxy __p(**this); + ++*this; + return __p; + } + } + + template _Sent2> + requires sentinel_for<_Sent, _It2> + friend bool + operator==(const common_iterator& __x, + const common_iterator<_It2, _Sent2>& __y) + { + switch(__x._M_index << 2 | __y._M_index) + { + case 0b0000: + case 0b0101: + return true; + case 0b0001: + return __x._M_it == __y._M_sent; + case 0b0100: + return __x._M_sent == __y._M_it; + default: + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); + __builtin_unreachable(); + } + } + + template _Sent2> + requires sentinel_for<_Sent, _It2> && equality_comparable_with<_It, _It2> + friend bool + operator==(const common_iterator& __x, + const common_iterator<_It2, _Sent2>& __y) + { + switch(__x._M_index << 2 | __y._M_index) + { + case 0b0101: + return true; + case 0b0000: + return __x._M_it == __y._M_it; + case 0b0001: + return __x._M_it == __y._M_sent; + case 0b0100: + return __x._M_sent == __y._M_it; + default: + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); + __builtin_unreachable(); + } + } + + template _It2, sized_sentinel_for<_It> _Sent2> + requires sized_sentinel_for<_Sent, _It2> + friend iter_difference_t<_It2> + operator-(const common_iterator& __x, + const common_iterator<_It2, _Sent2>& __y) + { + switch(__x._M_index << 2 | __y._M_index) + { + case 0b0101: + return 0; + case 0b0000: + return __x._M_it - __y._M_it; + case 0b0001: + return __x._M_it - __y._M_sent; + case 0b0100: + return __x._M_sent - __y._M_it; + default: + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_has_value())) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__y._M_has_value())) __builtin_unreachable(); } while (false); + __builtin_unreachable(); + } + } + + friend iter_rvalue_reference_t<_It> + iter_move(const common_iterator& __i) + noexcept(noexcept(ranges::iter_move(std::declval()))) + requires input_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(__i._M_index == 0)) __builtin_unreachable(); } while (false); + return ranges::iter_move(__i._M_it); + } + + template _It2, typename _Sent2> + friend void + iter_swap(const common_iterator& __x, + const common_iterator<_It2, _Sent2>& __y) + noexcept(noexcept(ranges::iter_swap(std::declval(), + std::declval()))) + { + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_index == 0)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__y._M_index == 0)) __builtin_unreachable(); } while (false); + return ranges::iter_swap(__x._M_it, __y._M_it); + } + + private: + template _Sent2> + friend class common_iterator; + + bool _M_has_value() const noexcept { return _M_index < 2; } + + union + { + _It _M_it; + _Sent _M_sent; + unsigned char _M_valueless; + }; + unsigned char _M_index; + }; + + template + struct incrementable_traits> + { + using difference_type = iter_difference_t<_It>; + }; + + template + struct iterator_traits> + { + private: + template + struct __ptr + { + using type = void; + }; + + template + requires __detail::__common_iter_has_arrow<_Iter> + struct __ptr<_Iter> + { + using _CIter = common_iterator<_Iter, _Sent>; + using type = decltype(std::declval().operator->()); + }; + + static auto + _S_iter_cat() + { + using _Traits = iterator_traits<_It>; + if constexpr (requires { requires derived_from; }) + return forward_iterator_tag{}; + else + return input_iterator_tag{}; + } + + public: + using iterator_concept = conditional_t, + forward_iterator_tag, input_iterator_tag>; + using iterator_category = decltype(_S_iter_cat()); + using value_type = iter_value_t<_It>; + using difference_type = iter_difference_t<_It>; + using pointer = typename __ptr<_It>::type; + using reference = iter_reference_t<_It>; + }; + + + + namespace __detail + { + template + struct __counted_iter_value_type + { }; + + template + struct __counted_iter_value_type<_It> + { using value_type = iter_value_t<_It>; }; + + template + struct __counted_iter_concept + { }; + + template + requires requires { typename _It::iterator_concept; } + struct __counted_iter_concept<_It> + { using iterator_concept = typename _It::iterator_concept; }; + + template + struct __counted_iter_cat + { }; + + template + requires requires { typename _It::iterator_category; } + struct __counted_iter_cat<_It> + { using iterator_category = typename _It::iterator_category; }; + } + + + template + class counted_iterator + : public __detail::__counted_iter_value_type<_It>, + public __detail::__counted_iter_concept<_It>, + public __detail::__counted_iter_cat<_It> + { + public: + using iterator_type = _It; + + using difference_type = iter_difference_t<_It>; + + + + constexpr counted_iterator() = default; + + constexpr + counted_iterator(_It __i, iter_difference_t<_It> __n) + : _M_current(std::move(__i)), _M_length(__n) + { do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); } + + template + requires convertible_to + constexpr + counted_iterator(const counted_iterator<_It2>& __x) + : _M_current(__x._M_current), _M_length(__x._M_length) + { } + + template + requires assignable_from<_It&, const _It2&> + constexpr counted_iterator& + operator=(const counted_iterator<_It2>& __x) + { + _M_current = __x._M_current; + _M_length = __x._M_length; + return *this; + } + + constexpr const _It& + base() const & noexcept + { return _M_current; } + + constexpr _It + base() && + noexcept(is_nothrow_move_constructible_v<_It>) + { return std::move(_M_current); } + + constexpr iter_difference_t<_It> + count() const noexcept { return _M_length; } + + constexpr decltype(auto) + operator*() + noexcept(noexcept(*_M_current)) + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_length > 0)) __builtin_unreachable(); } while (false); + return *_M_current; + } + + constexpr decltype(auto) + operator*() const + noexcept(noexcept(*_M_current)) + requires __detail::__dereferenceable + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_length > 0)) __builtin_unreachable(); } while (false); + return *_M_current; + } + + constexpr auto + operator->() const noexcept + requires contiguous_iterator<_It> + { return std::to_address(_M_current); } + + constexpr counted_iterator& + operator++() + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_length > 0)) __builtin_unreachable(); } while (false); + ++_M_current; + --_M_length; + return *this; + } + + decltype(auto) + operator++(int) + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_length > 0)) __builtin_unreachable(); } while (false); + --_M_length; + try + { + return _M_current++; + } catch(...) { + ++_M_length; + throw; + } + + } + + constexpr counted_iterator + operator++(int) requires forward_iterator<_It> + { + auto __tmp = *this; + ++*this; + return __tmp; + } + + constexpr counted_iterator& + operator--() requires bidirectional_iterator<_It> + { + --_M_current; + ++_M_length; + return *this; + } + + constexpr counted_iterator + operator--(int) requires bidirectional_iterator<_It> + { + auto __tmp = *this; + --*this; + return __tmp; + } + + constexpr counted_iterator + operator+(iter_difference_t<_It> __n) const + requires random_access_iterator<_It> + { return counted_iterator(_M_current + __n, _M_length - __n); } + + friend constexpr counted_iterator + operator+(iter_difference_t<_It> __n, const counted_iterator& __x) + requires random_access_iterator<_It> + { return __x + __n; } + + constexpr counted_iterator& + operator+=(iter_difference_t<_It> __n) + requires random_access_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(__n <= _M_length)) __builtin_unreachable(); } while (false); + _M_current += __n; + _M_length -= __n; + return *this; + } + + constexpr counted_iterator + operator-(iter_difference_t<_It> __n) const + requires random_access_iterator<_It> + { return counted_iterator(_M_current - __n, _M_length + __n); } + + template _It2> + friend constexpr iter_difference_t<_It2> + operator-(const counted_iterator& __x, + const counted_iterator<_It2>& __y) + { return __y._M_length - __x._M_length; } + + friend constexpr iter_difference_t<_It> + operator-(const counted_iterator& __x, default_sentinel_t) + { return -__x._M_length; } + + friend constexpr iter_difference_t<_It> + operator-(default_sentinel_t, const counted_iterator& __y) + { return __y._M_length; } + + constexpr counted_iterator& + operator-=(iter_difference_t<_It> __n) + requires random_access_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(-__n <= _M_length)) __builtin_unreachable(); } while (false); + _M_current -= __n; + _M_length += __n; + return *this; + } + + constexpr decltype(auto) + operator[](iter_difference_t<_It> __n) const + noexcept(noexcept(_M_current[__n])) + requires random_access_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(__n < _M_length)) __builtin_unreachable(); } while (false); + return _M_current[__n]; + } + + template _It2> + friend constexpr bool + operator==(const counted_iterator& __x, + const counted_iterator<_It2>& __y) + { return __x._M_length == __y._M_length; } + + friend constexpr bool + operator==(const counted_iterator& __x, default_sentinel_t) + { return __x._M_length == 0; } + + template _It2> + friend constexpr strong_ordering + operator<=>(const counted_iterator& __x, + const counted_iterator<_It2>& __y) + { return __y._M_length <=> __x._M_length; } + + friend constexpr iter_rvalue_reference_t<_It> + iter_move(const counted_iterator& __i) + noexcept(noexcept(ranges::iter_move(__i._M_current))) + requires input_iterator<_It> + { + do { if (__builtin_is_constant_evaluated() && !bool(__i._M_length > 0)) __builtin_unreachable(); } while (false); + return ranges::iter_move(__i._M_current); + } + + template _It2> + friend constexpr void + iter_swap(const counted_iterator& __x, + const counted_iterator<_It2>& __y) + noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current))) + { + do { if (__builtin_is_constant_evaluated() && !bool(__x._M_length > 0 && __y._M_length > 0)) __builtin_unreachable(); } while (false); + ranges::iter_swap(__x._M_current, __y._M_current); + } + + private: + template friend class counted_iterator; + + _It _M_current = _It(); + iter_difference_t<_It> _M_length = 0; + }; + + template + requires same_as<__detail::__iter_traits<_It>, iterator_traits<_It>> + struct iterator_traits> : iterator_traits<_It> + { + using pointer = conditional_t, + add_pointer_t>, + void>; + }; + + + + + template + auto + __niter_base(move_iterator<_Iterator> __it) + -> decltype(make_move_iterator(__niter_base(__it.base()))) + { return make_move_iterator(__niter_base(__it.base())); } + + template + struct __is_move_iterator > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template + auto + __miter_base(move_iterator<_Iterator> __it) + -> decltype(__miter_base(__it.base())) + { return __miter_base(__it.base()); } +# 2368 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_iterator.h" 3 + template + using __iter_key_t = remove_const_t< + typename iterator_traits<_InputIterator>::value_type::first_type>; + + template + using __iter_val_t = + typename iterator_traits<_InputIterator>::value_type::second_type; + + template + struct pair; + + template + using __iter_to_alloc_t = + pair>, + __iter_val_t<_InputIterator>>; + + + +} +# 68 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/debug/debug.h" 1 3 +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/debug/debug.h" 3 +namespace std +{ + namespace __debug { } +} + + + + +namespace __gnu_debug +{ + using namespace std::__debug; + + template + struct _Safe_iterator; +} +# 70 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/predefined_ops.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/predefined_ops.h" 3 +namespace __gnu_cxx +{ +namespace __ops +{ + struct _Iter_less_iter + { + template + constexpr + bool + operator()(_Iterator1 __it1, _Iterator2 __it2) const + { return *__it1 < *__it2; } + }; + + constexpr + inline _Iter_less_iter + __iter_less_iter() + { return _Iter_less_iter(); } + + struct _Iter_less_val + { + + constexpr _Iter_less_val() = default; + + + + + constexpr + explicit + _Iter_less_val(_Iter_less_iter) { } + + template + constexpr + bool + operator()(_Iterator __it, _Value& __val) const + { return *__it < __val; } + }; + + constexpr + inline _Iter_less_val + __iter_less_val() + { return _Iter_less_val(); } + + constexpr + inline _Iter_less_val + __iter_comp_val(_Iter_less_iter) + { return _Iter_less_val(); } + + struct _Val_less_iter + { + + constexpr _Val_less_iter() = default; + + + + + constexpr + explicit + _Val_less_iter(_Iter_less_iter) { } + + template + constexpr + bool + operator()(_Value& __val, _Iterator __it) const + { return __val < *__it; } + }; + + constexpr + inline _Val_less_iter + __val_less_iter() + { return _Val_less_iter(); } + + constexpr + inline _Val_less_iter + __val_comp_iter(_Iter_less_iter) + { return _Val_less_iter(); } + + struct _Iter_equal_to_iter + { + template + constexpr + bool + operator()(_Iterator1 __it1, _Iterator2 __it2) const + { return *__it1 == *__it2; } + }; + + constexpr + inline _Iter_equal_to_iter + __iter_equal_to_iter() + { return _Iter_equal_to_iter(); } + + struct _Iter_equal_to_val + { + template + constexpr + bool + operator()(_Iterator __it, _Value& __val) const + { return *__it == __val; } + }; + + constexpr + inline _Iter_equal_to_val + __iter_equal_to_val() + { return _Iter_equal_to_val(); } + + constexpr + inline _Iter_equal_to_val + __iter_comp_val(_Iter_equal_to_iter) + { return _Iter_equal_to_val(); } + + template + struct _Iter_comp_iter + { + _Compare _M_comp; + + explicit constexpr + _Iter_comp_iter(_Compare __comp) + : _M_comp(std::move(__comp)) + { } + + template + constexpr + bool + operator()(_Iterator1 __it1, _Iterator2 __it2) + { return bool(_M_comp(*__it1, *__it2)); } + }; + + template + constexpr + inline _Iter_comp_iter<_Compare> + __iter_comp_iter(_Compare __comp) + { return _Iter_comp_iter<_Compare>(std::move(__comp)); } + + template + struct _Iter_comp_val + { + _Compare _M_comp; + + constexpr + explicit + _Iter_comp_val(_Compare __comp) + : _M_comp(std::move(__comp)) + { } + + constexpr + explicit + _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) + : _M_comp(__comp._M_comp) + { } + + + constexpr + explicit + _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) + : _M_comp(std::move(__comp._M_comp)) + { } + + + template + constexpr + bool + operator()(_Iterator __it, _Value& __val) + { return bool(_M_comp(*__it, __val)); } + }; + + template + constexpr + inline _Iter_comp_val<_Compare> + __iter_comp_val(_Compare __comp) + { return _Iter_comp_val<_Compare>(std::move(__comp)); } + + template + constexpr + inline _Iter_comp_val<_Compare> + __iter_comp_val(_Iter_comp_iter<_Compare> __comp) + { return _Iter_comp_val<_Compare>(std::move(__comp)); } + + template + struct _Val_comp_iter + { + _Compare _M_comp; + + constexpr + explicit + _Val_comp_iter(_Compare __comp) + : _M_comp(std::move(__comp)) + { } + + constexpr + explicit + _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) + : _M_comp(__comp._M_comp) + { } + + + constexpr + explicit + _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) + : _M_comp(std::move(__comp._M_comp)) + { } + + + template + constexpr + bool + operator()(_Value& __val, _Iterator __it) + { return bool(_M_comp(__val, *__it)); } + }; + + template + constexpr + inline _Val_comp_iter<_Compare> + __val_comp_iter(_Compare __comp) + { return _Val_comp_iter<_Compare>(std::move(__comp)); } + + template + constexpr + inline _Val_comp_iter<_Compare> + __val_comp_iter(_Iter_comp_iter<_Compare> __comp) + { return _Val_comp_iter<_Compare>(std::move(__comp)); } + + template + struct _Iter_equals_val + { + _Value& _M_value; + + constexpr + explicit + _Iter_equals_val(_Value& __value) + : _M_value(__value) + { } + + template + constexpr + bool + operator()(_Iterator __it) + { return *__it == _M_value; } + }; + + template + constexpr + inline _Iter_equals_val<_Value> + __iter_equals_val(_Value& __val) + { return _Iter_equals_val<_Value>(__val); } + + template + struct _Iter_equals_iter + { + _Iterator1 _M_it1; + + constexpr + explicit + _Iter_equals_iter(_Iterator1 __it1) + : _M_it1(__it1) + { } + + template + constexpr + bool + operator()(_Iterator2 __it2) + { return *__it2 == *_M_it1; } + }; + + template + constexpr + inline _Iter_equals_iter<_Iterator> + __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) + { return _Iter_equals_iter<_Iterator>(__it); } + + template + struct _Iter_pred + { + _Predicate _M_pred; + + constexpr + explicit + _Iter_pred(_Predicate __pred) + : _M_pred(std::move(__pred)) + { } + + template + constexpr + bool + operator()(_Iterator __it) + { return bool(_M_pred(*__it)); } + }; + + template + constexpr + inline _Iter_pred<_Predicate> + __pred_iter(_Predicate __pred) + { return _Iter_pred<_Predicate>(std::move(__pred)); } + + template + struct _Iter_comp_to_val + { + _Compare _M_comp; + _Value& _M_value; + + constexpr + _Iter_comp_to_val(_Compare __comp, _Value& __value) + : _M_comp(std::move(__comp)), _M_value(__value) + { } + + template + constexpr + bool + operator()(_Iterator __it) + { return bool(_M_comp(*__it, _M_value)); } + }; + + template + _Iter_comp_to_val<_Compare, _Value> + constexpr + __iter_comp_val(_Compare __comp, _Value &__val) + { + return _Iter_comp_to_val<_Compare, _Value>(std::move(__comp), __val); + } + + template + struct _Iter_comp_to_iter + { + _Compare _M_comp; + _Iterator1 _M_it1; + + constexpr + _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) + : _M_comp(std::move(__comp)), _M_it1(__it1) + { } + + template + constexpr + bool + operator()(_Iterator2 __it2) + { return bool(_M_comp(*__it2, *_M_it1)); } + }; + + template + constexpr + inline _Iter_comp_to_iter<_Compare, _Iterator> + __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) + { + return _Iter_comp_to_iter<_Compare, _Iterator>( + std::move(__comp._M_comp), __it); + } + + template + struct _Iter_negate + { + _Predicate _M_pred; + + constexpr + explicit + _Iter_negate(_Predicate __pred) + : _M_pred(std::move(__pred)) + { } + + template + constexpr + bool + operator()(_Iterator __it) + { return !bool(_M_pred(*__it)); } + }; + + template + constexpr + inline _Iter_negate<_Predicate> + __negate(_Iter_pred<_Predicate> __pred) + { return _Iter_negate<_Predicate>(std::move(__pred._M_pred)); } + +} +} +# 72 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 2 3 + + + + + + + +namespace std +{ + + + + + + + template + constexpr + inline int + __memcmp(const _Tp* __first1, const _Up* __first2, size_t __num) + { + + static_assert(sizeof(_Tp) == sizeof(_Up), "can be compared with memcmp"); + + + if (std::is_constant_evaluated()) + { + for(; __num > 0; ++__first1, ++__first2, --__num) + if (*__first1 != *__first2) + return *__first1 < *__first2 ? -1 : 1; + return 0; + } + else + + return __builtin_memcmp(__first1, __first2, sizeof(_Tp) * __num); + } +# 149 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + + + + +# 182 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + swap(*__a, *__b); + + } +# 198 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + _ForwardIterator2 + swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + + + + ; + + for (; __first1 != __last1; ++__first1, (void)++__first2) + std::iter_swap(__first1, __first2); + return __first2; + } +# 227 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline const _Tp& + min(const _Tp& __a, const _Tp& __b) + { + + + + if (__b < __a) + return __b; + return __a; + } +# 251 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline const _Tp& + max(const _Tp& __a, const _Tp& __b) + { + + + + if (__a < __b) + return __b; + return __a; + } +# 275 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline const _Tp& + min(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__b, __a)) + return __b; + return __a; + } +# 297 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline const _Tp& + max(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__a, __b)) + return __b; + return __a; + } + + + + template + constexpr + inline _Iterator + __niter_base(_Iterator __it) + noexcept(std::is_nothrow_copy_constructible<_Iterator>::value) + { return __it; } + + template + _Ite + __niter_base(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, + std::random_access_iterator_tag>&); + + + + + template + constexpr + inline _From + __niter_wrap(_From __from, _To __res) + { return __from + (__res - std::__niter_base(__from)); } + + + template + constexpr + inline _Iterator + __niter_wrap(const _Iterator&, _Iterator __res) + { return __res; } + + + + + + + + template + struct __copy_move + { + template + constexpr + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, (void)++__first) + *__result = *__first; + return __result; + } + }; + + + template + struct __copy_move + { + template + constexpr + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, (void)++__first) + *__result = std::move(*__first); + return __result; + } + }; + + + template<> + struct __copy_move + { + template + constexpr + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = *__first; + ++__first; + ++__result; + } + return __result; + } + }; + + + template<> + struct __copy_move + { + template + constexpr + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = std::move(*__first); + ++__first; + ++__result; + } + return __result; + } + }; + + + template + struct __copy_move<_IsMove, true, random_access_iterator_tag> + { + template + constexpr + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + + using __assignable = conditional<_IsMove, + is_move_assignable<_Tp>, + is_copy_assignable<_Tp>>; + + static_assert( __assignable::type::value, "type is not assignable" ); + + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); + return __result + _Num; + } + }; + + + + template + struct _Deque_iterator; + + struct _Bit_iterator; + + + + + + template + struct char_traits; + + template + class istreambuf_iterator; + + template + class ostreambuf_iterator; + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); + + template + typename __gnu_cxx::__enable_if< + __is_char<_CharT>::__value, + std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type + __copy_move_a2( + istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, + std::_Deque_iterator<_CharT, _CharT&, _CharT*>); + + template + constexpr + inline _OI + __copy_move_a2(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::iterator_category _Category; + + if (std::is_constant_evaluated()) + return std::__copy_move<_IsMove, false, _Category>:: + __copy_m(__first, __last, __result); + + return std::__copy_move<_IsMove, __memcpyable<_OI, _II>::__value, + _Category>::__copy_m(__first, __last, __result); + } + + template + _OI + __copy_move_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, + std::_Deque_iterator<_Tp, _Ref, _Ptr>, + _OI); + + template + std::_Deque_iterator<_OTp, _OTp&, _OTp*> + __copy_move_a1(std::_Deque_iterator<_ITp, _IRef, _IPtr>, + std::_Deque_iterator<_ITp, _IRef, _IPtr>, + std::_Deque_iterator<_OTp, _OTp&, _OTp*>); + + template + typename __gnu_cxx::__enable_if< + __is_random_access_iter<_II>::__value, + std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type + __copy_move_a1(_II, _II, std::_Deque_iterator<_Tp, _Tp&, _Tp*>); + + template + constexpr + inline _OI + __copy_move_a1(_II __first, _II __last, _OI __result) + { return std::__copy_move_a2<_IsMove>(__first, __last, __result); } + + template + constexpr + inline _OI + __copy_move_a(_II __first, _II __last, _OI __result) + { + return std::__niter_wrap(__result, + std::__copy_move_a1<_IsMove>(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result))); + } + + template + _OI + __copy_move_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + _OI); + + template + __gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> + __copy_move_a(_II, _II, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&); + + template + ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat> + __copy_move_a(const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, + const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, + const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); + + template + constexpr + _OutputIterator + __copy_n_a(_InputIterator __first, _Size __n, _OutputIterator __result, + bool) + { + if (__n > 0) + { + while (true) + { + *__result = *__first; + ++__result; + if (--__n > 0) + ++__first; + else + break; + } + } + return __result; + } + + template + typename __gnu_cxx::__enable_if< + __is_char<_CharT>::__value, _CharT*>::__type + __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT> >, + _Size, _CharT*, bool); + + template + typename __gnu_cxx::__enable_if< + __is_char<_CharT>::__value, + std::_Deque_iterator<_CharT, _CharT&, _CharT*> >::__type + __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT> >, _Size, + std::_Deque_iterator<_CharT, _CharT&, _CharT*>, + bool); +# 608 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _OI + copy(_II __first, _II __last, _OI __result) + { + + + + + ; + + return std::__copy_move_a<__is_move_iterator<_II>::__value> + (std::__miter_base(__first), std::__miter_base(__last), __result); + } +# 641 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _OI + move(_II __first, _II __last, _OI __result) + { + + + + + ; + + return std::__copy_move_a(std::__miter_base(__first), + std::__miter_base(__last), __result); + } + + + + + + + template + struct __copy_move_backward + { + template + constexpr + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = *--__last; + return __result; + } + }; + + + template + struct __copy_move_backward + { + template + constexpr + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = std::move(*--__last); + return __result; + } + }; + + + template<> + struct __copy_move_backward + { + template + constexpr + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type + __n = __last - __first; + for (; __n > 0; --__n) + *--__result = *--__last; + return __result; + } + }; + + + template<> + struct __copy_move_backward + { + template + constexpr + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type + __n = __last - __first; + for (; __n > 0; --__n) + *--__result = std::move(*--__last); + return __result; + } + }; + + + template + struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> + { + template + constexpr + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + + using __assignable = conditional<_IsMove, + is_move_assignable<_Tp>, + is_copy_assignable<_Tp>>; + + static_assert( __assignable::type::value, "type is not assignable" ); + + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } + }; + + template + constexpr + inline _BI2 + __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) + { + typedef typename iterator_traits<_BI1>::iterator_category _Category; + + if (std::is_constant_evaluated()) + return std::__copy_move_backward<_IsMove, false, _Category>:: + __copy_move_b(__first, __last, __result); + + return std::__copy_move_backward<_IsMove, + __memcpyable<_BI2, _BI1>::__value, + _Category>::__copy_move_b(__first, + __last, + __result); + } + + template + constexpr + inline _BI2 + __copy_move_backward_a1(_BI1 __first, _BI1 __last, _BI2 __result) + { return std::__copy_move_backward_a2<_IsMove>(__first, __last, __result); } + + template + _OI + __copy_move_backward_a1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, + std::_Deque_iterator<_Tp, _Ref, _Ptr>, + _OI); + + template + std::_Deque_iterator<_OTp, _OTp&, _OTp*> + __copy_move_backward_a1( + std::_Deque_iterator<_ITp, _IRef, _IPtr>, + std::_Deque_iterator<_ITp, _IRef, _IPtr>, + std::_Deque_iterator<_OTp, _OTp&, _OTp*>); + + template + typename __gnu_cxx::__enable_if< + __is_random_access_iter<_II>::__value, + std::_Deque_iterator<_Tp, _Tp&, _Tp*> >::__type + __copy_move_backward_a1(_II, _II, + std::_Deque_iterator<_Tp, _Tp&, _Tp*>); + + template + constexpr + inline _OI + __copy_move_backward_a(_II __first, _II __last, _OI __result) + { + return std::__niter_wrap(__result, + std::__copy_move_backward_a1<_IsMove> + (std::__niter_base(__first), std::__niter_base(__last), + std::__niter_base(__result))); + } + + template + _OI + __copy_move_backward_a( + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + _OI); + + template + __gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> + __copy_move_backward_a(_II, _II, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&); + + template + ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat> + __copy_move_backward_a( + const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, + const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, + const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); +# 845 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _BI2 + copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + + + + ; + + return std::__copy_move_backward_a<__is_move_iterator<_BI1>::__value> + (std::__miter_base(__first), std::__miter_base(__last), __result); + } +# 881 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _BI2 + move_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + + + + ; + + return std::__copy_move_backward_a(std::__miter_base(__first), + std::__miter_base(__last), + __result); + } + + + + + + + template + constexpr + inline typename + __gnu_cxx::__enable_if::__value, void>::__type + __fill_a1(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + for (; __first != __last; ++__first) + *__first = __value; + } + + template + constexpr + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type + __fill_a1(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + } + + + template + constexpr + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type + __fill_a1(_Tp* __first, _Tp* __last, const _Tp& __c) + { + const _Tp __tmp = __c; + + if (std::is_constant_evaluated()) + { + for (; __first != __last; ++__first) + *__first = __tmp; + return; + } + + if (const size_t __len = __last - __first) + __builtin_memset(__first, static_cast(__tmp), __len); + } + + template + constexpr + inline void + __fill_a1(::__gnu_cxx::__normal_iterator<_Ite, _Cont> __first, + ::__gnu_cxx::__normal_iterator<_Ite, _Cont> __last, + const _Tp& __value) + { std::__fill_a1(__first.base(), __last.base(), __value); } + + template + void + __fill_a1(const std::_Deque_iterator<_Tp, _Tp&, _Tp*>&, + const std::_Deque_iterator<_Tp, _Tp&, _Tp*>&, + const _VTp&); + + void + __fill_a1(std::_Bit_iterator, std::_Bit_iterator, + const bool&); + + template + constexpr + inline void + __fill_a(_FIte __first, _FIte __last, const _Tp& __value) + { std::__fill_a1(__first, __last, __value); } + + template + void + __fill_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>&, + const _Tp&); +# 989 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline void + fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) + { + + + + ; + + std::__fill_a(__first, __last, __value); + } + + + inline constexpr int + __size_to_integer(int __n) { return __n; } + inline constexpr unsigned + __size_to_integer(unsigned __n) { return __n; } + inline constexpr long + __size_to_integer(long __n) { return __n; } + inline constexpr unsigned long + __size_to_integer(unsigned long __n) { return __n; } + inline constexpr long long + __size_to_integer(long long __n) { return __n; } + inline constexpr unsigned long long + __size_to_integer(unsigned long long __n) { return __n; } +# 1041 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + inline constexpr long long + __size_to_integer(float __n) { return (long long)__n; } + inline constexpr long long + __size_to_integer(double __n) { return (long long)__n; } + inline constexpr long long + __size_to_integer(long double __n) { return (long long)__n; } + + + + + + template + constexpr + inline typename + __gnu_cxx::__enable_if::__value, _OutputIterator>::__type + __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) + { + for (; __n > 0; --__n, (void) ++__first) + *__first = __value; + return __first; + } + + template + constexpr + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type + __fill_n_a1(_OutputIterator __first, _Size __n, const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __n > 0; --__n, (void) ++__first) + *__first = __tmp; + return __first; + } + + template + ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat> + __fill_n_a(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, _Cat>& __first, + _Size __n, const _Tp& __value, + std::input_iterator_tag); + + template + constexpr + inline _OutputIterator + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, + std::output_iterator_tag) + { + + static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); + + return __fill_n_a1(__first, __n, __value); + } + + template + constexpr + inline _OutputIterator + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, + std::input_iterator_tag) + { + + static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); + + return __fill_n_a1(__first, __n, __value); + } + + template + constexpr + inline _OutputIterator + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value, + std::random_access_iterator_tag) + { + + static_assert(is_integral<_Size>{}, "fill_n must pass integral size"); + + if (__n <= 0) + return __first; + + ; + + std::__fill_a(__first, __first + __n, __value); + return __first + __n; + } +# 1141 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _OI + fill_n(_OI __first, _Size __n, const _Tp& __value) + { + + + + return std::__fill_n_a(__first, std::__size_to_integer(__n), __value, + std::__iterator_category(__first)); + } + + template + struct __equal + { + template + constexpr + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + for (; __first1 != __last1; ++__first1, (void) ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; + } + }; + + template<> + struct __equal + { + template + constexpr + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { + if (const size_t __len = (__last1 - __first1)) + return !std::__memcmp(__first1, __first2, __len); + return true; + } + }; + + template + typename __gnu_cxx::__enable_if< + __is_random_access_iter<_II>::__value, bool>::__type + __equal_aux1(std::_Deque_iterator<_Tp, _Ref, _Ptr>, + std::_Deque_iterator<_Tp, _Ref, _Ptr>, + _II); + + template + bool + __equal_aux1(std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); + + template + typename __gnu_cxx::__enable_if< + __is_random_access_iter<_II>::__value, bool>::__type + __equal_aux1(_II, _II, + std::_Deque_iterator<_Tp, _Ref, _Ptr>); + + template + constexpr + inline bool + __equal_aux1(_II1 __first1, _II1 __last1, _II2 __first2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + const bool __simple = ((__is_integer<_ValueType1>::__value + || __is_pointer<_ValueType1>::__value) + && __memcmpable<_II1, _II2>::__value); + return std::__equal<__simple>::equal(__first1, __last1, __first2); + } + + template + constexpr + inline bool + __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) + { + return std::__equal_aux1(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2)); + } + + template + bool + __equal_aux(const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, + _II2); + + template + bool + __equal_aux(_II1, _II1, + const ::__gnu_debug::_Safe_iterator<_II2, _Seq2, _Cat2>&); + + template + bool + __equal_aux(const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_II1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_II2, _Seq2, _Cat2>&); + + template + struct __lc_rai + { + template + constexpr + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } + + template + constexpr + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } + }; + + template<> + struct __lc_rai + { + template + constexpr + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, + _RAI2 __first2, _RAI2 __last2) + { + const typename iterator_traits<_RAI1>::difference_type + __diff1 = __last1 - __first1; + const typename iterator_traits<_RAI2>::difference_type + __diff2 = __last2 - __first2; + return __diff2 < __diff1 ? __first1 + __diff2 : __last1; + } + + template + static constexpr bool + __cnd2(_RAI, _RAI) + { return true; } + }; + + template + constexpr + bool + __lexicographical_compare_impl(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, + _Compare __comp) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, (void)++__first2) + { + if (__comp(__first1, __first2)) + return true; + if (__comp(__first2, __first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + + template + struct __lexicographical_compare + { + template + constexpr + static bool + __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + using __gnu_cxx::__ops::__iter_less_iter; + return std::__lexicographical_compare_impl(__first1, __last1, + __first2, __last2, + __iter_less_iter()); + } + + template + constexpr + static int + __3way(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + while (__first1 != __last1) + { + if (__first2 == __last2) + return +1; + if (*__first1 < *__first2) + return -1; + if (*__first2 < *__first1) + return +1; + ++__first1; + ++__first2; + } + return int(__first2 == __last2) - 1; + } + }; + + template<> + struct __lexicographical_compare + { + template + constexpr + static bool + __lc(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { return __3way(__first1, __last1, __first2, __last2) < 0; } + + template + constexpr + static ptrdiff_t + __3way(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + if (const size_t __len = std::min(__len1, __len2)) + if (int __result = std::__memcmp(__first1, __first2, __len)) + return __result; + return ptrdiff_t(__len1 - __len2); + } + }; + + template + constexpr + inline bool + __lexicographical_compare_aux1(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = + (__is_memcmp_ordered_with<_ValueType1, _ValueType2>::__value + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + + + + + && !is_volatile_v>> + && !is_volatile_v>> + + ); + + return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, + __first2, __last2); + } + + template + bool + __lexicographical_compare_aux1( + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + _Tp2*, _Tp2*); + + template + bool + __lexicographical_compare_aux1(_Tp1*, _Tp1*, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); + + template + bool + __lexicographical_compare_aux1( + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp1, _Ref1, _Ptr1>, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>, + std::_Deque_iterator<_Tp2, _Ref2, _Ptr2>); + + template + constexpr + inline bool + __lexicographical_compare_aux(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + return std::__lexicographical_compare_aux1(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2), + std::__niter_base(__last2)); + } + + template + bool + __lexicographical_compare_aux( + const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, + _II2, _II2); + + template + bool + __lexicographical_compare_aux( + _II1, _II1, + const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&, + const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&); + + template + bool + __lexicographical_compare_aux( + const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_Iter1, _Seq1, _Cat1>&, + const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&, + const ::__gnu_debug::_Safe_iterator<_Iter2, _Seq2, _Cat2>&); + + template + constexpr + _ForwardIterator + __lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } +# 1487 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + + + + + ; + + return std::__lower_bound(__first, __last, __val, + __gnu_cxx::__ops::__iter_less_val()); + } + + + + inline constexpr int + __lg(int __n) + { return (int)sizeof(int) * 8 - 1 - __builtin_clz(__n); } + + inline constexpr unsigned + __lg(unsigned __n) + { return (int)sizeof(int) * 8 - 1 - __builtin_clz(__n); } + + inline constexpr long + __lg(long __n) + { return (int)sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + + inline constexpr unsigned long + __lg(unsigned long __n) + { return (int)sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + + inline constexpr long long + __lg(long long __n) + { return (int)sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + + inline constexpr unsigned long long + __lg(unsigned long long __n) + { return (int)sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + + +# 1543 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + + + + + + + ; + + return std::__equal_aux(__first1, __last1, __first2); + } +# 1574 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + for (; __first1 != __last1; ++__first1, (void)++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return true; + } + + + + template + constexpr + inline bool + __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + using _RATag = random_access_iterator_tag; + using _Cat1 = typename iterator_traits<_II1>::iterator_category; + using _Cat2 = typename iterator_traits<_II2>::iterator_category; + using _RAIters = __and_, is_same<_Cat2, _RATag>>; + if (_RAIters()) + { + auto __d1 = std::distance(__first1, __last1); + auto __d2 = std::distance(__first2, __last2); + if (__d1 != __d2) + return false; + return std::equal(__first1, __last1, __first2); + } + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!(*__first1 == *__first2)) + return false; + return __first1 == __last1 && __first2 == __last2; + } + + + template + constexpr + inline bool + __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, + _BinaryPredicate __binary_pred) + { + using _RATag = random_access_iterator_tag; + using _Cat1 = typename iterator_traits<_II1>::iterator_category; + using _Cat2 = typename iterator_traits<_II2>::iterator_category; + using _RAIters = __and_, is_same<_Cat2, _RATag>>; + if (_RAIters()) + { + auto __d1 = std::distance(__first1, __last1); + auto __d2 = std::distance(__first2, __last2); + if (__d1 != __d2) + return false; + return std::equal(__first1, __last1, __first2, + __binary_pred); + } + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return __first1 == __last1 && __first2 == __last2; + } +# 1664 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + + + + + + + ; + ; + + return std::__equal4(__first1, __last1, __first2, __last2); + } +# 1697 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _IIter2 __last2, _BinaryPredicate __binary_pred) + { + + + + ; + ; + + return std::__equal4(__first1, __last1, __first2, __last2, + __binary_pred); + } +# 1729 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + + + + + + + + + + ; + ; + + return std::__lexicographical_compare_aux(__first1, __last1, + __first2, __last2); + } +# 1764 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, _Compare __comp) + { + + + + ; + ; + + return std::__lexicographical_compare_impl + (__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + + + template + concept __is_byte_iter = contiguous_iterator<_Iter> + && __is_memcmp_ordered>::__value; + + + + template + constexpr auto + __min_cmp(_Tp __x, _Tp __y) + { + struct _Res { + _Tp _M_min; + decltype(__x <=> __y) _M_cmp; + }; + auto __c = __x <=> __y; + if (__c > 0) + return _Res{__y, __c}; + return _Res{__x, __c}; + } +# 1815 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr auto + lexicographical_compare_three_way(_InputIter1 __first1, + _InputIter1 __last1, + _InputIter2 __first2, + _InputIter2 __last2, + _Comp __comp) + -> decltype(__comp(*__first1, *__first2)) + { + + + + ; + ; + + + using _Cat = decltype(__comp(*__first1, *__first2)); + static_assert(same_as, _Cat>); + + if (!std::is_constant_evaluated()) + if constexpr (same_as<_Comp, __detail::_Synth3way> + || same_as<_Comp, compare_three_way>) + if constexpr (__is_byte_iter<_InputIter1>) + if constexpr (__is_byte_iter<_InputIter2>) + { + const auto [__len, __lencmp] = std:: + __min_cmp(__last1 - __first1, __last2 - __first2); + if (__len) + { + const auto __c + = __builtin_memcmp(&*__first1, &*__first2, __len) <=> 0; + if (__c != 0) + return __c; + } + return __lencmp; + } + + while (__first1 != __last1) + { + if (__first2 == __last2) + return strong_ordering::greater; + if (auto __cmp = __comp(*__first1, *__first2); __cmp != 0) + return __cmp; + ++__first1; + ++__first2; + } + return (__first2 == __last2) <=> true; + } + + template + constexpr auto + lexicographical_compare_three_way(_InputIter1 __first1, + _InputIter1 __last1, + _InputIter2 __first2, + _InputIter2 __last2) + { + return std:: + lexicographical_compare_three_way(__first1, __last1, __first2, __last2, + compare_three_way{}); + } + + + template + constexpr + pair<_InputIterator1, _InputIterator2> + __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + while (__first1 != __last1 && __binary_pred(__first1, __first2)) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +# 1905 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2) + { + + + + + + + ; + + return std::__mismatch(__first1, __last1, __first2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 1939 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + return std::__mismatch(__first1, __last1, __first2, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); + } + + + + template + constexpr + pair<_InputIterator1, _InputIterator2> + __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _BinaryPredicate __binary_pred) + { + while (__first1 != __last1 && __first2 != __last2 + && __binary_pred(__first1, __first2)) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +# 1988 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + + + + + + + ; + ; + + return std::__mismatch(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 2024 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _BinaryPredicate __binary_pred) + { + + + + ; + ; + + return std::__mismatch(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); + } + + + + + + template + constexpr + inline _InputIterator + __find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred, input_iterator_tag) + { + while (__first != __last && !__pred(__first)) + ++__first; + return __first; + } + + + template + constexpr + _RandomAccessIterator + __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Predicate __pred, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + + for (; __trip_count > 0; --__trip_count) + { + if (__pred(__first)) + return __first; + ++__first; + + if (__pred(__first)) + return __first; + ++__first; + + if (__pred(__first)) + return __first; + ++__first; + + if (__pred(__first)) + return __first; + ++__first; + } + + switch (__last - __first) + { + case 3: + if (__pred(__first)) + return __first; + ++__first; + + case 2: + if (__pred(__first)) + return __first; + ++__first; + + case 1: + if (__pred(__first)) + return __first; + ++__first; + + case 0: + default: + return __last; + } + } + + template + constexpr + inline _Iterator + __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) + { + return __find_if(__first, __last, __pred, + std::__iterator_category(__first)); + } + + template + constexpr + typename iterator_traits<_InputIterator>::difference_type + __count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (__pred(__first)) + ++__n; + return __n; + } + + + template + constexpr + bool + __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _BinaryPredicate __pred) + { + + + for (; __first1 != __last1; ++__first1, (void)++__first2) + if (!__pred(__first1, __first2)) + break; + + if (__first1 == __last1) + return true; + + + + _ForwardIterator2 __last2 = __first2; + std::advance(__last2, std::distance(__first1, __last1)); + for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) + { + if (__scan != std::__find_if(__first1, __scan, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) + continue; + + auto __matches + = std::__count_if(__first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); + if (0 == __matches || + std::__count_if(__scan, __last1, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) + != __matches) + return false; + } + return true; + } +# 2181 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h" 3 + template + constexpr + inline bool + is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + + + + + ; + + return std::__is_permutation(__first1, __last1, __first2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } + + + +} +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 1 3 +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 +# 158 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 +namespace std +{ + + + + + + + + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + + + + + + + enum float_denorm_style + { + + denorm_indeterminate = -1, + + denorm_absent = 0, + + denorm_present = 1 + }; +# 202 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + struct __numeric_limits_base + { + + + static constexpr bool is_specialized = false; + + + + + static constexpr int digits = 0; + + + static constexpr int digits10 = 0; + + + + + static constexpr int max_digits10 = 0; + + + + static constexpr bool is_signed = false; + + + static constexpr bool is_integer = false; + + + + + static constexpr bool is_exact = false; + + + + static constexpr int radix = 0; + + + + static constexpr int min_exponent = 0; + + + + static constexpr int min_exponent10 = 0; + + + + + static constexpr int max_exponent = 0; + + + + static constexpr int max_exponent10 = 0; + + + static constexpr bool has_infinity = false; + + + + static constexpr bool has_quiet_NaN = false; + + + + static constexpr bool has_signaling_NaN = false; + + + static constexpr float_denorm_style has_denorm = denorm_absent; + + + + static constexpr bool has_denorm_loss = false; + + + + static constexpr bool is_iec559 = false; + + + + + static constexpr bool is_bounded = false; +# 288 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + static constexpr bool is_modulo = false; + + + static constexpr bool traps = false; + + + static constexpr bool tinyness_before = false; + + + + + static constexpr float_round_style round_style = + round_toward_zero; + }; +# 311 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + template + struct numeric_limits : public __numeric_limits_base + { + + + static constexpr _Tp + min() noexcept { return _Tp(); } + + + static constexpr _Tp + max() noexcept { return _Tp(); } + + + + + static constexpr _Tp + lowest() noexcept { return _Tp(); } + + + + + static constexpr _Tp + epsilon() noexcept { return _Tp(); } + + + static constexpr _Tp + round_error() noexcept { return _Tp(); } + + + static constexpr _Tp + infinity() noexcept { return _Tp(); } + + + + static constexpr _Tp + quiet_NaN() noexcept { return _Tp(); } + + + + static constexpr _Tp + signaling_NaN() noexcept { return _Tp(); } + + + + + static constexpr _Tp + denorm_min() noexcept { return _Tp(); } + }; + + + + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; + + template + struct numeric_limits + : public numeric_limits<_Tp> { }; +# 383 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr bool + min() noexcept { return false; } + + static constexpr bool + max() noexcept { return true; } + + + static constexpr bool + lowest() noexcept { return min(); } + + static constexpr int digits = 1; + static constexpr int digits10 = 0; + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr bool + epsilon() noexcept { return false; } + + static constexpr bool + round_error() noexcept { return false; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr bool + infinity() noexcept { return false; } + + static constexpr bool + quiet_NaN() noexcept { return false; } + + static constexpr bool + signaling_NaN() noexcept { return false; } + + static constexpr bool + denorm_min() noexcept { return false; } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + + + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char + min() noexcept { return (((char)(-1) < 0) ? -(((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0) - 1 : (char)0); } + + static constexpr char + max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + + + static constexpr char + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = ((char)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char + epsilon() noexcept { return 0; } + + static constexpr char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr + char infinity() noexcept { return char(); } + + static constexpr char + quiet_NaN() noexcept { return char(); } + + static constexpr char + signaling_NaN() noexcept { return char(); } + + static constexpr char + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr signed char + min() noexcept { return -0x7f - 1; } + + static constexpr signed char + max() noexcept { return 0x7f; } + + + static constexpr signed char + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr signed char + epsilon() noexcept { return 0; } + + static constexpr signed char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr signed char + infinity() noexcept { return static_cast(0); } + + static constexpr signed char + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr signed char + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr signed char + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned char + min() noexcept { return 0; } + + static constexpr unsigned char + max() noexcept { return 0x7f * 2U + 1; } + + + static constexpr unsigned char + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned char + epsilon() noexcept { return 0; } + + static constexpr unsigned char + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned char + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned char + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned char + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned char + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr wchar_t + min() noexcept { return (((wchar_t)(-1) < 0) ? -(((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0) - 1 : (wchar_t)0); } + + static constexpr wchar_t + max() noexcept { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + + + static constexpr wchar_t + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = ((wchar_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr wchar_t + epsilon() noexcept { return 0; } + + static constexpr wchar_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr wchar_t + infinity() noexcept { return wchar_t(); } + + static constexpr wchar_t + quiet_NaN() noexcept { return wchar_t(); } + + static constexpr wchar_t + signaling_NaN() noexcept { return wchar_t(); } + + static constexpr wchar_t + denorm_min() noexcept { return wchar_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char8_t + min() noexcept { return (((char8_t)(-1) < 0) ? -(((char8_t)(-1) < 0) ? (((((char8_t)1 << ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char8_t)0) - 1 : (char8_t)0); } + + static constexpr char8_t + max() noexcept { return (((char8_t)(-1) < 0) ? (((((char8_t)1 << ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char8_t)0); } + + static constexpr char8_t + lowest() noexcept { return min(); } + + static constexpr int digits = (sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char8_t) * 8 - ((char8_t)(-1) < 0)) * 643L / 2136); + static constexpr int max_digits10 = 0; + static constexpr bool is_signed = ((char8_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char8_t + epsilon() noexcept { return 0; } + + static constexpr char8_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr char8_t + infinity() noexcept { return char8_t(); } + + static constexpr char8_t + quiet_NaN() noexcept { return char8_t(); } + + static constexpr char8_t + signaling_NaN() noexcept { return char8_t(); } + + static constexpr char8_t + denorm_min() noexcept { return char8_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char16_t + min() noexcept { return (((char16_t)(-1) < 0) ? -(((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0) - 1 : (char16_t)0); } + + static constexpr char16_t + max() noexcept { return (((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0); } + + static constexpr char16_t + lowest() noexcept { return min(); } + + static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); + static constexpr int max_digits10 = 0; + static constexpr bool is_signed = ((char16_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char16_t + epsilon() noexcept { return 0; } + + static constexpr char16_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr char16_t + infinity() noexcept { return char16_t(); } + + static constexpr char16_t + quiet_NaN() noexcept { return char16_t(); } + + static constexpr char16_t + signaling_NaN() noexcept { return char16_t(); } + + static constexpr char16_t + denorm_min() noexcept { return char16_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr char32_t + min() noexcept { return (((char32_t)(-1) < 0) ? -(((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0) - 1 : (char32_t)0); } + + static constexpr char32_t + max() noexcept { return (((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0); } + + static constexpr char32_t + lowest() noexcept { return min(); } + + static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); + static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); + static constexpr int max_digits10 = 0; + static constexpr bool is_signed = ((char32_t)(-1) < 0); + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr char32_t + epsilon() noexcept { return 0; } + + static constexpr char32_t + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr char32_t + infinity() noexcept { return char32_t(); } + + static constexpr char32_t + quiet_NaN() noexcept { return char32_t(); } + + static constexpr char32_t + signaling_NaN() noexcept { return char32_t(); } + + static constexpr char32_t + denorm_min() noexcept { return char32_t(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = !is_signed; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style = round_toward_zero; + }; + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr short + min() noexcept { return -0x7fff - 1; } + + static constexpr short + max() noexcept { return 0x7fff; } + + + static constexpr short + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr short + epsilon() noexcept { return 0; } + + static constexpr short + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr short + infinity() noexcept { return short(); } + + static constexpr short + quiet_NaN() noexcept { return short(); } + + static constexpr short + signaling_NaN() noexcept { return short(); } + + static constexpr short + denorm_min() noexcept { return short(); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned short + min() noexcept { return 0; } + + static constexpr unsigned short + max() noexcept { return 0x7fff * 2U + 1; } + + + static constexpr unsigned short + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned short + epsilon() noexcept { return 0; } + + static constexpr unsigned short + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned short + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned short + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned short + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned short + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr int + min() noexcept { return -0x7fffffff - 1; } + + static constexpr int + max() noexcept { return 0x7fffffff; } + + + static constexpr int + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr int + epsilon() noexcept { return 0; } + + static constexpr int + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr int + infinity() noexcept { return static_cast(0); } + + static constexpr int + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr int + signaling_NaN() noexcept { return static_cast(0); } + + static constexpr int + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned int + min() noexcept { return 0; } + + static constexpr unsigned int + max() noexcept { return 0x7fffffff * 2U + 1; } + + + static constexpr unsigned int + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned int + epsilon() noexcept { return 0; } + + static constexpr unsigned int + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned int + infinity() noexcept { return static_cast(0); } + + static constexpr unsigned int + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned int + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned int + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long + min() noexcept { return -0x7fffffffL - 1; } + + static constexpr long + max() noexcept { return 0x7fffffffL; } + + + static constexpr long + lowest() noexcept { return min(); } + + + static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr long + epsilon() noexcept { return 0; } + + static constexpr long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr long + infinity() noexcept { return static_cast(0); } + + static constexpr long + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr long + signaling_NaN() noexcept { return static_cast(0); } + + static constexpr long + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned long + min() noexcept { return 0; } + + static constexpr unsigned long + max() noexcept { return 0x7fffffffL * 2UL + 1; } + + + static constexpr unsigned long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned long + epsilon() noexcept { return 0; } + + static constexpr unsigned long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned long + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned long + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long long + min() noexcept { return -0x7fffffffffffffffLL - 1; } + + static constexpr long long + max() noexcept { return 0x7fffffffffffffffLL; } + + + static constexpr long long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr long long + epsilon() noexcept { return 0; } + + static constexpr long long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr long long + infinity() noexcept { return static_cast(0); } + + static constexpr long long + quiet_NaN() noexcept { return static_cast(0); } + + static constexpr long long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr long long + denorm_min() noexcept { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr unsigned long long + min() noexcept { return 0; } + + static constexpr unsigned long long + max() noexcept { return 0x7fffffffffffffffLL * 2ULL + 1; } + + + static constexpr unsigned long long + lowest() noexcept { return min(); } + + + static constexpr int digits + = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static constexpr int digits10 + = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); + + static constexpr int max_digits10 = 0; + + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int radix = 2; + + static constexpr unsigned long long + epsilon() noexcept { return 0; } + + static constexpr unsigned long long + round_error() noexcept { return 0; } + + static constexpr int min_exponent = 0; + static constexpr int min_exponent10 = 0; + static constexpr int max_exponent = 0; + static constexpr int max_exponent10 = 0; + + static constexpr bool has_infinity = false; + static constexpr bool has_quiet_NaN = false; + static constexpr bool has_signaling_NaN = false; + static constexpr float_denorm_style has_denorm + = denorm_absent; + static constexpr bool has_denorm_loss = false; + + static constexpr unsigned long long + infinity() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + quiet_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + signaling_NaN() noexcept + { return static_cast(0); } + + static constexpr unsigned long long + denorm_min() noexcept + { return static_cast(0); } + + static constexpr bool is_iec559 = false; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = true; + + static constexpr bool traps = true; + static constexpr bool tinyness_before = false; + static constexpr float_round_style round_style + = round_toward_zero; + }; +# 1656 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + template<> struct numeric_limits<__int128> { static constexpr bool is_specialized = true; static constexpr __int128 min() noexcept { return (((__int128)(-1) < 0) ? -(((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0) - 1 : (__int128)0); } static constexpr __int128 max() noexcept { return (((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0); } static constexpr int digits = 128 - 1; static constexpr int digits10 = (128 - 1) * 643L / 2136; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr __int128 epsilon() noexcept { return 0; } static constexpr __int128 round_error() noexcept { return 0; } static constexpr __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr __int128 infinity() noexcept { return static_cast<__int128>(0); } static constexpr __int128 quiet_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 signaling_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 denorm_min() noexcept { return static_cast<__int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned __int128 min() noexcept { return 0; } static constexpr unsigned __int128 max() noexcept { return (((unsigned __int128)(-1) < 0) ? (((((unsigned __int128)1 << ((128 - ((unsigned __int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(unsigned __int128)0); } static constexpr unsigned __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int digits = 128; static constexpr int digits10 = 128 * 643L / 2136; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned __int128 epsilon() noexcept { return 0; } static constexpr unsigned __int128 round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned __int128 infinity() noexcept { return static_cast(0); } static constexpr unsigned __int128 quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; +# 1667 "D:/compilers/msys64/mingw64/include/c++/11.2.0/limits" 3 + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr float + min() noexcept { return 1.17549435082228750796873653722224568e-38F; } + + static constexpr float + max() noexcept { return 3.40282346638528859811704183484516925e+38F; } + + + static constexpr float + lowest() noexcept { return -3.40282346638528859811704183484516925e+38F; } + + + static constexpr int digits = 24; + static constexpr int digits10 = 6; + + static constexpr int max_digits10 + = (2 + (24) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr float + epsilon() noexcept { return 1.19209289550781250000000000000000000e-7F; } + + static constexpr float + round_error() noexcept { return 0.5F; } + + static constexpr int min_exponent = (-125); + static constexpr int min_exponent10 = (-37); + static constexpr int max_exponent = 128; + static constexpr int max_exponent10 = 38; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr float + infinity() noexcept { return __builtin_huge_valf(); } + + static constexpr float + quiet_NaN() noexcept { return __builtin_nanf(""); } + + static constexpr float + signaling_NaN() noexcept { return __builtin_nansf(""); } + + static constexpr float + denorm_min() noexcept { return 1.40129846432481707092372958328991613e-45F; } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before + = false; + static constexpr float_round_style round_style + = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr double + min() noexcept { return double(2.22507385850720138309023271733240406e-308L); } + + static constexpr double + max() noexcept { return double(1.79769313486231570814527423731704357e+308L); } + + + static constexpr double + lowest() noexcept { return -double(1.79769313486231570814527423731704357e+308L); } + + + static constexpr int digits = 53; + static constexpr int digits10 = 15; + + static constexpr int max_digits10 + = (2 + (53) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr double + epsilon() noexcept { return double(2.22044604925031308084726333618164062e-16L); } + + static constexpr double + round_error() noexcept { return 0.5; } + + static constexpr int min_exponent = (-1021); + static constexpr int min_exponent10 = (-307); + static constexpr int max_exponent = 1024; + static constexpr int max_exponent10 = 308; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr double + infinity() noexcept { return __builtin_huge_val(); } + + static constexpr double + quiet_NaN() noexcept { return __builtin_nan(""); } + + static constexpr double + signaling_NaN() noexcept { return __builtin_nans(""); } + + static constexpr double + denorm_min() noexcept { return double(4.94065645841246544176568792868221372e-324L); } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before + = false; + static constexpr float_round_style round_style + = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static constexpr bool is_specialized = true; + + static constexpr long double + min() noexcept { return 3.36210314311209350626267781732175260e-4932L; } + + static constexpr long double + max() noexcept { return 1.18973149535723176502126385303097021e+4932L; } + + + static constexpr long double + lowest() noexcept { return -1.18973149535723176502126385303097021e+4932L; } + + + static constexpr int digits = 64; + static constexpr int digits10 = 18; + + static constexpr int max_digits10 + = (2 + (64) * 643L / 2136); + + static constexpr bool is_signed = true; + static constexpr bool is_integer = false; + static constexpr bool is_exact = false; + static constexpr int radix = 2; + + static constexpr long double + epsilon() noexcept { return 1.08420217248550443400745280086994171e-19L; } + + static constexpr long double + round_error() noexcept { return 0.5L; } + + static constexpr int min_exponent = (-16381); + static constexpr int min_exponent10 = (-4931); + static constexpr int max_exponent = 16384; + static constexpr int max_exponent10 = 4932; + + static constexpr bool has_infinity = 1; + static constexpr bool has_quiet_NaN = 1; + static constexpr bool has_signaling_NaN = has_quiet_NaN; + static constexpr float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static constexpr bool has_denorm_loss + = false; + + static constexpr long double + infinity() noexcept { return __builtin_huge_vall(); } + + static constexpr long double + quiet_NaN() noexcept { return __builtin_nanl(""); } + + static constexpr long double + signaling_NaN() noexcept { return __builtin_nansl(""); } + + static constexpr long double + denorm_min() noexcept { return 3.64519953188247460252840593361941982e-4951L; } + + static constexpr bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static constexpr bool is_bounded = true; + static constexpr bool is_modulo = false; + + static constexpr bool traps = false; + static constexpr bool tinyness_before = + false; + static constexpr float_round_style round_style = + round_to_nearest; + }; + + + + + + +} +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 1 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 3 +namespace std +{ + +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 3 + namespace __detail + { + + + + template + struct __floating_point_constant + { + static const _Tp __value; + }; + + + + template + struct __numeric_constants + { + + static _Tp __pi() throw() + { return static_cast<_Tp>(3.1415926535897932384626433832795029L); } + + static _Tp __pi_2() throw() + { return static_cast<_Tp>(1.5707963267948966192313216916397514L); } + + static _Tp __pi_3() throw() + { return static_cast<_Tp>(1.0471975511965977461542144610931676L); } + + static _Tp __pi_4() throw() + { return static_cast<_Tp>(0.7853981633974483096156608458198757L); } + + static _Tp __1_pi() throw() + { return static_cast<_Tp>(0.3183098861837906715377675267450287L); } + + static _Tp __2_sqrtpi() throw() + { return static_cast<_Tp>(1.1283791670955125738961589031215452L); } + + static _Tp __sqrt2() throw() + { return static_cast<_Tp>(1.4142135623730950488016887242096981L); } + + static _Tp __sqrt3() throw() + { return static_cast<_Tp>(1.7320508075688772935274463415058723L); } + + static _Tp __sqrtpio2() throw() + { return static_cast<_Tp>(1.2533141373155002512078826424055226L); } + + static _Tp __sqrt1_2() throw() + { return static_cast<_Tp>(0.7071067811865475244008443621048490L); } + + static _Tp __lnpi() throw() + { return static_cast<_Tp>(1.1447298858494001741434273513530587L); } + + static _Tp __gamma_e() throw() + { return static_cast<_Tp>(0.5772156649015328606065120900824024L); } + + static _Tp __euler() throw() + { return static_cast<_Tp>(2.7182818284590452353602874713526625L); } + }; +# 114 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 3 + template + inline bool __isnan(_Tp __x) + { return std::isnan(__x); } +# 133 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/special_function_util.h" 3 + } + + + + + +} +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 2 3 + +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + namespace __detail + { +# 76 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __bernoulli_series(unsigned int __n) + { + + static const _Tp __num[28] = { + _Tp(1UL), -_Tp(1UL) / _Tp(2UL), + _Tp(1UL) / _Tp(6UL), _Tp(0UL), + -_Tp(1UL) / _Tp(30UL), _Tp(0UL), + _Tp(1UL) / _Tp(42UL), _Tp(0UL), + -_Tp(1UL) / _Tp(30UL), _Tp(0UL), + _Tp(5UL) / _Tp(66UL), _Tp(0UL), + -_Tp(691UL) / _Tp(2730UL), _Tp(0UL), + _Tp(7UL) / _Tp(6UL), _Tp(0UL), + -_Tp(3617UL) / _Tp(510UL), _Tp(0UL), + _Tp(43867UL) / _Tp(798UL), _Tp(0UL), + -_Tp(174611) / _Tp(330UL), _Tp(0UL), + _Tp(854513UL) / _Tp(138UL), _Tp(0UL), + -_Tp(236364091UL) / _Tp(2730UL), _Tp(0UL), + _Tp(8553103UL) / _Tp(6UL), _Tp(0UL) + }; + + if (__n == 0) + return _Tp(1); + + if (__n == 1) + return -_Tp(1) / _Tp(2); + + + if (__n % 2 == 1) + return _Tp(0); + + + if (__n < 28) + return __num[__n]; + + + _Tp __fact = _Tp(1); + if ((__n / 2) % 2 == 0) + __fact *= _Tp(-1); + for (unsigned int __k = 1; __k <= __n; ++__k) + __fact *= __k / (_Tp(2) * __numeric_constants<_Tp>::__pi()); + __fact *= _Tp(2); + + _Tp __sum = _Tp(0); + for (unsigned int __i = 1; __i < 1000; ++__i) + { + _Tp __term = std::pow(_Tp(__i), -_Tp(__n)); + if (__term < std::numeric_limits<_Tp>::epsilon()) + break; + __sum += __term; + } + + return __fact * __sum; + } +# 139 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + inline _Tp + __bernoulli(int __n) + { return __bernoulli_series<_Tp>(__n); } +# 153 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_gamma_bernoulli(_Tp __x) + { + _Tp __lg = (__x - _Tp(0.5L)) * std::log(__x) - __x + + _Tp(0.5L) * std::log(_Tp(2) + * __numeric_constants<_Tp>::__pi()); + + const _Tp __xx = __x * __x; + _Tp __help = _Tp(1) / __x; + for ( unsigned int __i = 1; __i < 20; ++__i ) + { + const _Tp __2i = _Tp(2 * __i); + __help /= __2i * (__2i - _Tp(1)) * __xx; + __lg += __bernoulli<_Tp>(2 * __i) * __help; + } + + return __lg; + } +# 181 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_gamma_lanczos(_Tp __x) + { + const _Tp __xm1 = __x - _Tp(1); + + static const _Tp __lanczos_cheb_7[9] = { + _Tp( 0.99999999999980993227684700473478L), + _Tp( 676.520368121885098567009190444019L), + _Tp(-1259.13921672240287047156078755283L), + _Tp( 771.3234287776530788486528258894L), + _Tp(-176.61502916214059906584551354L), + _Tp( 12.507343278686904814458936853L), + _Tp(-0.13857109526572011689554707L), + _Tp( 9.984369578019570859563e-6L), + _Tp( 1.50563273514931155834e-7L) + }; + + static const _Tp __LOGROOT2PI + = _Tp(0.9189385332046727417803297364056176L); + + _Tp __sum = __lanczos_cheb_7[0]; + for(unsigned int __k = 1; __k < 9; ++__k) + __sum += __lanczos_cheb_7[__k] / (__xm1 + __k); + + const _Tp __term1 = (__xm1 + _Tp(0.5L)) + * std::log((__xm1 + _Tp(7.5L)) + / __numeric_constants<_Tp>::__euler()); + const _Tp __term2 = __LOGROOT2PI + std::log(__sum); + const _Tp __result = __term1 + (__term2 - _Tp(7)); + + return __result; + } +# 225 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_gamma(_Tp __x) + { + if (__x > _Tp(0.5L)) + return __log_gamma_lanczos(__x); + else + { + const _Tp __sin_fact + = std::abs(std::sin(__numeric_constants<_Tp>::__pi() * __x)); + if (__sin_fact == _Tp(0)) + std::__throw_domain_error(("Argument is nonpositive integer " "in __log_gamma") + ); + return __numeric_constants<_Tp>::__lnpi() + - std::log(__sin_fact) + - __log_gamma_lanczos(_Tp(1) - __x); + } + } +# 252 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_gamma_sign(_Tp __x) + { + if (__x > _Tp(0)) + return _Tp(1); + else + { + const _Tp __sin_fact + = std::sin(__numeric_constants<_Tp>::__pi() * __x); + if (__sin_fact > _Tp(0)) + return (1); + else if (__sin_fact < _Tp(0)) + return -_Tp(1); + else + return _Tp(0); + } + } +# 283 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __log_bincoef(unsigned int __n, unsigned int __k) + { + + static const _Tp __max_bincoeff + = std::numeric_limits<_Tp>::max_exponent10 + * std::log(_Tp(10)) - _Tp(1); + + _Tp __coeff = ::std::lgamma(_Tp(1 + __n)) + - ::std::lgamma(_Tp(1 + __k)) + - ::std::lgamma(_Tp(1 + __n - __k)); + + + + + + } +# 314 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __bincoef(unsigned int __n, unsigned int __k) + { + + static const _Tp __max_bincoeff + = std::numeric_limits<_Tp>::max_exponent10 + * std::log(_Tp(10)) - _Tp(1); + + const _Tp __log_coeff = __log_bincoef<_Tp>(__n, __k); + if (__log_coeff > __max_bincoeff) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return std::exp(__log_coeff); + } +# 337 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + inline _Tp + __gamma(_Tp __x) + { return std::exp(__log_gamma(__x)); } +# 356 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __psi_series(_Tp __x) + { + _Tp __sum = -__numeric_constants<_Tp>::__gamma_e() - _Tp(1) / __x; + const unsigned int __max_iter = 100000; + for (unsigned int __k = 1; __k < __max_iter; ++__k) + { + const _Tp __term = __x / (__k * (__k + __x)); + __sum += __term; + if (std::abs(__term / __sum) < std::numeric_limits<_Tp>::epsilon()) + break; + } + return __sum; + } +# 386 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __psi_asymp(_Tp __x) + { + _Tp __sum = std::log(__x) - _Tp(0.5L) / __x; + const _Tp __xx = __x * __x; + _Tp __xp = __xx; + const unsigned int __max_iter = 100; + for (unsigned int __k = 1; __k < __max_iter; ++__k) + { + const _Tp __term = __bernoulli<_Tp>(2 * __k) / (2 * __k * __xp); + __sum -= __term; + if (std::abs(__term / __sum) < std::numeric_limits<_Tp>::epsilon()) + break; + __xp *= __xx; + } + return __sum; + } +# 417 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __psi(_Tp __x) + { + const int __n = static_cast(__x + 0.5L); + const _Tp __eps = _Tp(4) * std::numeric_limits<_Tp>::epsilon(); + if (__n <= 0 && std::abs(__x - _Tp(__n)) < __eps) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x < _Tp(0)) + { + const _Tp __pi = __numeric_constants<_Tp>::__pi(); + return __psi(_Tp(1) - __x) + - __pi * std::cos(__pi * __x) / std::sin(__pi * __x); + } + else if (__x > _Tp(100)) + return __psi_asymp(__x); + else + return __psi_series(__x); + } +# 446 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/gamma.tcc" 3 + template + _Tp + __psi(unsigned int __n, _Tp __x) + { + if (__x <= _Tp(0)) + std::__throw_domain_error(("Argument out of range " "in __psi") + ); + else if (__n == 0) + return __psi(__x); + else + { + const _Tp __hzeta = __hurwitz_zeta(_Tp(__n + 1), __x); + + const _Tp __ln_nfact = ::std::lgamma(_Tp(__n + 1)); + + + + _Tp __result = std::exp(__ln_nfact) * __hzeta; + if (__n % 2 == 1) + __result = -__result; + return __result; + } + } + } + + + + + + +} +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 1 3 +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 +namespace std +{ + +# 71 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + namespace __detail + { +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + void + __gamma_temme(_Tp __mu, + _Tp & __gam1, _Tp & __gam2, _Tp & __gampl, _Tp & __gammi) + { + + __gampl = _Tp(1) / ::std::tgamma(_Tp(1) + __mu); + __gammi = _Tp(1) / ::std::tgamma(_Tp(1) - __mu); + + + + + + if (std::abs(__mu) < std::numeric_limits<_Tp>::epsilon()) + __gam1 = -_Tp(__numeric_constants<_Tp>::__gamma_e()); + else + __gam1 = (__gammi - __gampl) / (_Tp(2) * __mu); + + __gam2 = (__gammi + __gampl) / (_Tp(2)); + + return; + } +# 136 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + void + __bessel_jn(_Tp __nu, _Tp __x, + _Tp & __Jnu, _Tp & __Nnu, _Tp & __Jpnu, _Tp & __Npnu) + { + if (__x == _Tp(0)) + { + if (__nu == _Tp(0)) + { + __Jnu = _Tp(1); + __Jpnu = _Tp(0); + } + else if (__nu == _Tp(1)) + { + __Jnu = _Tp(0); + __Jpnu = _Tp(0.5L); + } + else + { + __Jnu = _Tp(0); + __Jpnu = _Tp(0); + } + __Nnu = -std::numeric_limits<_Tp>::infinity(); + __Npnu = std::numeric_limits<_Tp>::infinity(); + return; + } + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + + + + const _Tp __fp_min = std::sqrt(std::numeric_limits<_Tp>::min()); + const int __max_iter = 15000; + const _Tp __x_min = _Tp(2); + + const int __nl = (__x < __x_min + ? static_cast(__nu + _Tp(0.5L)) + : std::max(0, static_cast(__nu - __x + _Tp(1.5L)))); + + const _Tp __mu = __nu - __nl; + const _Tp __mu2 = __mu * __mu; + const _Tp __xi = _Tp(1) / __x; + const _Tp __xi2 = _Tp(2) * __xi; + _Tp __w = __xi2 / __numeric_constants<_Tp>::__pi(); + int __isign = 1; + _Tp __h = __nu * __xi; + if (__h < __fp_min) + __h = __fp_min; + _Tp __b = __xi2 * __nu; + _Tp __d = _Tp(0); + _Tp __c = __h; + int __i; + for (__i = 1; __i <= __max_iter; ++__i) + { + __b += __xi2; + __d = __b - __d; + if (std::abs(__d) < __fp_min) + __d = __fp_min; + __c = __b - _Tp(1) / __c; + if (std::abs(__c) < __fp_min) + __c = __fp_min; + __d = _Tp(1) / __d; + const _Tp __del = __c * __d; + __h *= __del; + if (__d < _Tp(0)) + __isign = -__isign; + if (std::abs(__del - _Tp(1)) < __eps) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Argument x too large in __bessel_jn; " "try asymptotic expansion.") + ); + _Tp __Jnul = __isign * __fp_min; + _Tp __Jpnul = __h * __Jnul; + _Tp __Jnul1 = __Jnul; + _Tp __Jpnu1 = __Jpnul; + _Tp __fact = __nu * __xi; + for ( int __l = __nl; __l >= 1; --__l ) + { + const _Tp __Jnutemp = __fact * __Jnul + __Jpnul; + __fact -= __xi; + __Jpnul = __fact * __Jnutemp - __Jnul; + __Jnul = __Jnutemp; + } + if (__Jnul == _Tp(0)) + __Jnul = __eps; + _Tp __f= __Jpnul / __Jnul; + _Tp __Nmu, __Nnu1, __Npmu, __Jmu; + if (__x < __x_min) + { + const _Tp __x2 = __x / _Tp(2); + const _Tp __pimu = __numeric_constants<_Tp>::__pi() * __mu; + _Tp __fact = (std::abs(__pimu) < __eps + ? _Tp(1) : __pimu / std::sin(__pimu)); + _Tp __d = -std::log(__x2); + _Tp __e = __mu * __d; + _Tp __fact2 = (std::abs(__e) < __eps + ? _Tp(1) : std::sinh(__e) / __e); + _Tp __gam1, __gam2, __gampl, __gammi; + __gamma_temme(__mu, __gam1, __gam2, __gampl, __gammi); + _Tp __ff = (_Tp(2) / __numeric_constants<_Tp>::__pi()) + * __fact * (__gam1 * std::cosh(__e) + __gam2 * __fact2 * __d); + __e = std::exp(__e); + _Tp __p = __e / (__numeric_constants<_Tp>::__pi() * __gampl); + _Tp __q = _Tp(1) / (__e * __numeric_constants<_Tp>::__pi() * __gammi); + const _Tp __pimu2 = __pimu / _Tp(2); + _Tp __fact3 = (std::abs(__pimu2) < __eps + ? _Tp(1) : std::sin(__pimu2) / __pimu2 ); + _Tp __r = __numeric_constants<_Tp>::__pi() * __pimu2 * __fact3 * __fact3; + _Tp __c = _Tp(1); + __d = -__x2 * __x2; + _Tp __sum = __ff + __r * __q; + _Tp __sum1 = __p; + for (__i = 1; __i <= __max_iter; ++__i) + { + __ff = (__i * __ff + __p + __q) / (__i * __i - __mu2); + __c *= __d / _Tp(__i); + __p /= _Tp(__i) - __mu; + __q /= _Tp(__i) + __mu; + const _Tp __del = __c * (__ff + __r * __q); + __sum += __del; + const _Tp __del1 = __c * __p - __i * __del; + __sum1 += __del1; + if ( std::abs(__del) < __eps * (_Tp(1) + std::abs(__sum)) ) + break; + } + if ( __i > __max_iter ) + std::__throw_runtime_error(("Bessel y series failed to converge " "in __bessel_jn.") + ); + __Nmu = -__sum; + __Nnu1 = -__sum1 * __xi2; + __Npmu = __mu * __xi * __Nmu - __Nnu1; + __Jmu = __w / (__Npmu - __f * __Nmu); + } + else + { + _Tp __a = _Tp(0.25L) - __mu2; + _Tp __q = _Tp(1); + _Tp __p = -__xi / _Tp(2); + _Tp __br = _Tp(2) * __x; + _Tp __bi = _Tp(2); + _Tp __fact = __a * __xi / (__p * __p + __q * __q); + _Tp __cr = __br + __q * __fact; + _Tp __ci = __bi + __p * __fact; + _Tp __den = __br * __br + __bi * __bi; + _Tp __dr = __br / __den; + _Tp __di = -__bi / __den; + _Tp __dlr = __cr * __dr - __ci * __di; + _Tp __dli = __cr * __di + __ci * __dr; + _Tp __temp = __p * __dlr - __q * __dli; + __q = __p * __dli + __q * __dlr; + __p = __temp; + int __i; + for (__i = 2; __i <= __max_iter; ++__i) + { + __a += _Tp(2 * (__i - 1)); + __bi += _Tp(2); + __dr = __a * __dr + __br; + __di = __a * __di + __bi; + if (std::abs(__dr) + std::abs(__di) < __fp_min) + __dr = __fp_min; + __fact = __a / (__cr * __cr + __ci * __ci); + __cr = __br + __cr * __fact; + __ci = __bi - __ci * __fact; + if (std::abs(__cr) + std::abs(__ci) < __fp_min) + __cr = __fp_min; + __den = __dr * __dr + __di * __di; + __dr /= __den; + __di /= -__den; + __dlr = __cr * __dr - __ci * __di; + __dli = __cr * __di + __ci * __dr; + __temp = __p * __dlr - __q * __dli; + __q = __p * __dli + __q * __dlr; + __p = __temp; + if (std::abs(__dlr - _Tp(1)) + std::abs(__dli) < __eps) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Lentz's method failed " "in __bessel_jn.") + ); + const _Tp __gam = (__p - __f) / __q; + __Jmu = std::sqrt(__w / ((__p - __f) * __gam + __q)); + + __Jmu = ::std::copysign(__Jmu, __Jnul); + + + + + __Nmu = __gam * __Jmu; + __Npmu = (__p + __q / __gam) * __Nmu; + __Nnu1 = __mu * __xi * __Nmu - __Npmu; + } + __fact = __Jmu / __Jnul; + __Jnu = __fact * __Jnul1; + __Jpnu = __fact * __Jpnu1; + for (__i = 1; __i <= __nl; ++__i) + { + const _Tp __Nnutemp = (__mu + __i) * __xi2 * __Nnu1 - __Nmu; + __Nmu = __Nnu1; + __Nnu1 = __Nnutemp; + } + __Nnu = __Nmu; + __Npnu = __nu * __xi * __Nmu - __Nnu1; + + return; + } +# 361 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + void + __cyl_bessel_jn_asymp(_Tp __nu, _Tp __x, _Tp & __Jnu, _Tp & __Nnu) + { + const _Tp __mu = _Tp(4) * __nu * __nu; + const _Tp __8x = _Tp(8) * __x; + + _Tp __P = _Tp(0); + _Tp __Q = _Tp(0); + + _Tp __k = _Tp(0); + _Tp __term = _Tp(1); + + int __epsP = 0; + int __epsQ = 0; + + _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + do + { + __term *= (__k == 0 + ? _Tp(1) + : -(__mu - (2 * __k - 1) * (2 * __k - 1)) / (__k * __8x)); + + __epsP = std::abs(__term) < __eps * std::abs(__P); + __P += __term; + + __k++; + + __term *= (__mu - (2 * __k - 1) * (2 * __k - 1)) / (__k * __8x); + __epsQ = std::abs(__term) < __eps * std::abs(__Q); + __Q += __term; + + if (__epsP && __epsQ && __k > (__nu / 2.)) + break; + + __k++; + } + while (__k < 1000); + + const _Tp __chi = __x - (__nu + _Tp(0.5L)) + * __numeric_constants<_Tp>::__pi_2(); + + const _Tp __c = std::cos(__chi); + const _Tp __s = std::sin(__chi); + + const _Tp __coef = std::sqrt(_Tp(2) + / (__numeric_constants<_Tp>::__pi() * __x)); + + __Jnu = __coef * (__c * __P - __s * __Q); + __Nnu = __coef * (__s * __P + __c * __Q); + + return; + } +# 444 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __cyl_bessel_ij_series(_Tp __nu, _Tp __x, _Tp __sgn, + unsigned int __max_iter) + { + if (__x == _Tp(0)) + return __nu == _Tp(0) ? _Tp(1) : _Tp(0); + + const _Tp __x2 = __x / _Tp(2); + _Tp __fact = __nu * std::log(__x2); + + __fact -= ::std::lgamma(__nu + _Tp(1)); + + + + __fact = std::exp(__fact); + const _Tp __xx4 = __sgn * __x2 * __x2; + _Tp __Jn = _Tp(1); + _Tp __term = _Tp(1); + + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + __term *= __xx4 / (_Tp(__i) * (__nu + _Tp(__i))); + __Jn += __term; + if (std::abs(__term / __Jn) < std::numeric_limits<_Tp>::epsilon()) + break; + } + + return __fact * __Jn; + } +# 490 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __cyl_bessel_j(_Tp __nu, _Tp __x) + { + if (__nu < _Tp(0) || __x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __cyl_bessel_j.") + ); + else if (__isnan(__nu) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x * __x < _Tp(10) * (__nu + _Tp(1))) + return __cyl_bessel_ij_series(__nu, __x, -_Tp(1), 200); + else if (__x > _Tp(1000)) + { + _Tp __J_nu, __N_nu; + __cyl_bessel_jn_asymp(__nu, __x, __J_nu, __N_nu); + return __J_nu; + } + else + { + _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; + __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); + return __J_nu; + } + } +# 532 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __cyl_neumann_n(_Tp __nu, _Tp __x) + { + if (__nu < _Tp(0) || __x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __cyl_neumann_n.") + ); + else if (__isnan(__nu) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x > _Tp(1000)) + { + _Tp __J_nu, __N_nu; + __cyl_bessel_jn_asymp(__nu, __x, __J_nu, __N_nu); + return __N_nu; + } + else + { + _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; + __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); + return __N_nu; + } + } +# 569 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + void + __sph_bessel_jn(unsigned int __n, _Tp __x, + _Tp & __j_n, _Tp & __n_n, _Tp & __jp_n, _Tp & __np_n) + { + const _Tp __nu = _Tp(__n) + _Tp(0.5L); + + _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu; + __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu); + + const _Tp __factor = __numeric_constants<_Tp>::__sqrtpio2() + / std::sqrt(__x); + + __j_n = __factor * __J_nu; + __n_n = __factor * __N_nu; + __jp_n = __factor * __Jp_nu - __j_n / (_Tp(2) * __x); + __np_n = __factor * __Np_nu - __n_n / (_Tp(2) * __x); + + return; + } +# 604 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __sph_bessel(unsigned int __n, _Tp __x) + { + if (__x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __sph_bessel.") + ); + else if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x == _Tp(0)) + { + if (__n == 0) + return _Tp(1); + else + return _Tp(0); + } + else + { + _Tp __j_n, __n_n, __jp_n, __np_n; + __sph_bessel_jn(__n, __x, __j_n, __n_n, __jp_n, __np_n); + return __j_n; + } + } +# 642 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/bessel_function.tcc" 3 + template + _Tp + __sph_neumann(unsigned int __n, _Tp __x) + { + if (__x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __sph_neumann.") + ); + else if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x == _Tp(0)) + return -std::numeric_limits<_Tp>::infinity(); + else + { + _Tp __j_n, __n_n, __jp_n, __np_n; + __sph_bessel_jn(__n, __x, __j_n, __n_n, __jp_n, __np_n); + return __n_n; + } + } + } + + + + + + +} +# 51 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 1 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + namespace __detail + { +# 79 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + template + _Tp + __beta_gamma(_Tp __x, _Tp __y) + { + + _Tp __bet; + + if (__x > __y) + { + __bet = ::std::tgamma(__x) + / ::std::tgamma(__x + __y); + __bet *= ::std::tgamma(__y); + } + else + { + __bet = ::std::tgamma(__y) + / ::std::tgamma(__x + __y); + __bet *= ::std::tgamma(__x); + } +# 111 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + return __bet; + } +# 127 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + template + _Tp + __beta_lgamma(_Tp __x, _Tp __y) + { + + _Tp __bet = ::std::lgamma(__x) + + ::std::lgamma(__y) + - ::std::lgamma(__x + __y); + + + + + + __bet = std::exp(__bet); + return __bet; + } +# 158 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + template + _Tp + __beta_product(_Tp __x, _Tp __y) + { + + _Tp __bet = (__x + __y) / (__x * __y); + + unsigned int __max_iter = 1000000; + for (unsigned int __k = 1; __k < __max_iter; ++__k) + { + _Tp __term = (_Tp(1) + (__x + __y) / __k) + / ((_Tp(1) + __x / __k) * (_Tp(1) + __y / __k)); + __bet *= __term; + } + + return __bet; + } +# 189 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/beta_function.tcc" 3 + template + inline _Tp + __beta(_Tp __x, _Tp __y) + { + if (__isnan(__x) || __isnan(__y)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return __beta_lgamma(__x, __y); + } + } + + + + + + +} +# 52 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 1 3 +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 +namespace std +{ + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + namespace __detail + { +# 76 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_rf(_Tp __x, _Tp __y, _Tp __z) + { + const _Tp __min = std::numeric_limits<_Tp>::min(); + const _Tp __lolim = _Tp(5) * __min; + + if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0)) + std::__throw_domain_error(("Argument less than zero " "in __ellint_rf.") + ); + else if (__x + __y < __lolim || __x + __z < __lolim + || __y + __z < __lolim) + std::__throw_domain_error(("Argument too small in __ellint_rf")); + else + { + const _Tp __c0 = _Tp(1) / _Tp(4); + const _Tp __c1 = _Tp(1) / _Tp(24); + const _Tp __c2 = _Tp(1) / _Tp(10); + const _Tp __c3 = _Tp(3) / _Tp(44); + const _Tp __c4 = _Tp(1) / _Tp(14); + + _Tp __xn = __x; + _Tp __yn = __y; + _Tp __zn = __z; + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __errtol = std::pow(__eps, _Tp(1) / _Tp(6)); + _Tp __mu; + _Tp __xndev, __yndev, __zndev; + + const unsigned int __max_iter = 100; + for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) + { + __mu = (__xn + __yn + __zn) / _Tp(3); + __xndev = 2 - (__mu + __xn) / __mu; + __yndev = 2 - (__mu + __yn) / __mu; + __zndev = 2 - (__mu + __zn) / __mu; + _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); + __epsilon = std::max(__epsilon, std::abs(__zndev)); + if (__epsilon < __errtol) + break; + const _Tp __xnroot = std::sqrt(__xn); + const _Tp __ynroot = std::sqrt(__yn); + const _Tp __znroot = std::sqrt(__zn); + const _Tp __lambda = __xnroot * (__ynroot + __znroot) + + __ynroot * __znroot; + __xn = __c0 * (__xn + __lambda); + __yn = __c0 * (__yn + __lambda); + __zn = __c0 * (__zn + __lambda); + } + + const _Tp __e2 = __xndev * __yndev - __zndev * __zndev; + const _Tp __e3 = __xndev * __yndev * __zndev; + const _Tp __s = _Tp(1) + (__c1 * __e2 - __c2 - __c3 * __e3) * __e2 + + __c4 * __e3; + + return __s / std::sqrt(__mu); + } + } +# 153 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_1_series(_Tp __k) + { + + const _Tp __kk = __k * __k; + + _Tp __term = __kk / _Tp(4); + _Tp __sum = _Tp(1) + __term; + + const unsigned int __max_iter = 1000; + for (unsigned int __i = 2; __i < __max_iter; ++__i) + { + __term *= (2 * __i - 1) * __kk / (2 * __i); + if (__term < std::numeric_limits<_Tp>::epsilon()) + break; + __sum += __term; + } + + return __numeric_constants<_Tp>::__pi_2() * __sum; + } +# 191 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_1(_Tp __k) + { + + if (__isnan(__k)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) >= _Tp(1)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return __ellint_rf(_Tp(0), _Tp(1) - __k * __k, _Tp(1)); + } +# 219 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_1(_Tp __k, _Tp __phi) + { + + if (__isnan(__k) || __isnan(__phi)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __ellint_1.")); + else + { + + const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() + + _Tp(0.5L)); + const _Tp __phi_red = __phi + - __n * __numeric_constants<_Tp>::__pi(); + + const _Tp __s = std::sin(__phi_red); + const _Tp __c = std::cos(__phi_red); + + const _Tp __F = __s + * __ellint_rf(__c * __c, + _Tp(1) - __k * __k * __s * __s, _Tp(1)); + + if (__n == 0) + return __F; + else + return __F + _Tp(2) * __n * __comp_ellint_1(__k); + } + } +# 266 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_2_series(_Tp __k) + { + + const _Tp __kk = __k * __k; + + _Tp __term = __kk; + _Tp __sum = __term; + + const unsigned int __max_iter = 1000; + for (unsigned int __i = 2; __i < __max_iter; ++__i) + { + const _Tp __i2m = 2 * __i - 1; + const _Tp __i2 = 2 * __i; + __term *= __i2m * __i2m * __kk / (__i2 * __i2); + if (__term < std::numeric_limits<_Tp>::epsilon()) + break; + __sum += __term / __i2m; + } + + return __numeric_constants<_Tp>::__pi_2() * (_Tp(1) - __sum); + } +# 314 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_rd(_Tp __x, _Tp __y, _Tp __z) + { + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __errtol = std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6)); + const _Tp __max = std::numeric_limits<_Tp>::max(); + const _Tp __lolim = _Tp(2) / std::pow(__max, _Tp(2) / _Tp(3)); + + if (__x < _Tp(0) || __y < _Tp(0)) + std::__throw_domain_error(("Argument less than zero " "in __ellint_rd.") + ); + else if (__x + __y < __lolim || __z < __lolim) + std::__throw_domain_error(("Argument too small " "in __ellint_rd.") + ); + else + { + const _Tp __c0 = _Tp(1) / _Tp(4); + const _Tp __c1 = _Tp(3) / _Tp(14); + const _Tp __c2 = _Tp(1) / _Tp(6); + const _Tp __c3 = _Tp(9) / _Tp(22); + const _Tp __c4 = _Tp(3) / _Tp(26); + + _Tp __xn = __x; + _Tp __yn = __y; + _Tp __zn = __z; + _Tp __sigma = _Tp(0); + _Tp __power4 = _Tp(1); + + _Tp __mu; + _Tp __xndev, __yndev, __zndev; + + const unsigned int __max_iter = 100; + for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) + { + __mu = (__xn + __yn + _Tp(3) * __zn) / _Tp(5); + __xndev = (__mu - __xn) / __mu; + __yndev = (__mu - __yn) / __mu; + __zndev = (__mu - __zn) / __mu; + _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); + __epsilon = std::max(__epsilon, std::abs(__zndev)); + if (__epsilon < __errtol) + break; + _Tp __xnroot = std::sqrt(__xn); + _Tp __ynroot = std::sqrt(__yn); + _Tp __znroot = std::sqrt(__zn); + _Tp __lambda = __xnroot * (__ynroot + __znroot) + + __ynroot * __znroot; + __sigma += __power4 / (__znroot * (__zn + __lambda)); + __power4 *= __c0; + __xn = __c0 * (__xn + __lambda); + __yn = __c0 * (__yn + __lambda); + __zn = __c0 * (__zn + __lambda); + } + + _Tp __ea = __xndev * __yndev; + _Tp __eb = __zndev * __zndev; + _Tp __ec = __ea - __eb; + _Tp __ed = __ea - _Tp(6) * __eb; + _Tp __ef = __ed + __ec + __ec; + _Tp __s1 = __ed * (-__c1 + __c3 * __ed + / _Tp(3) - _Tp(3) * __c4 * __zndev * __ef + / _Tp(2)); + _Tp __s2 = __zndev + * (__c2 * __ef + + __zndev * (-__c3 * __ec - __zndev * __c4 - __ea)); + + return _Tp(3) * __sigma + __power4 * (_Tp(1) + __s1 + __s2) + / (__mu * std::sqrt(__mu)); + } + } +# 399 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_2(_Tp __k) + { + + if (__isnan(__k)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) == 1) + return _Tp(1); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __comp_ellint_2.")); + else + { + const _Tp __kk = __k * __k; + + return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1)) + - __kk * __ellint_rd(_Tp(0), _Tp(1) - __kk, _Tp(1)) / _Tp(3); + } + } +# 433 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_2(_Tp __k, _Tp __phi) + { + + if (__isnan(__k) || __isnan(__phi)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __ellint_2.")); + else + { + + const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() + + _Tp(0.5L)); + const _Tp __phi_red = __phi + - __n * __numeric_constants<_Tp>::__pi(); + + const _Tp __kk = __k * __k; + const _Tp __s = std::sin(__phi_red); + const _Tp __ss = __s * __s; + const _Tp __sss = __ss * __s; + const _Tp __c = std::cos(__phi_red); + const _Tp __cc = __c * __c; + + const _Tp __E = __s + * __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1)) + - __kk * __sss + * __ellint_rd(__cc, _Tp(1) - __kk * __ss, _Tp(1)) + / _Tp(3); + + if (__n == 0) + return __E; + else + return __E + _Tp(2) * __n * __comp_ellint_2(__k); + } + } +# 492 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_rc(_Tp __x, _Tp __y) + { + const _Tp __min = std::numeric_limits<_Tp>::min(); + const _Tp __lolim = _Tp(5) * __min; + + if (__x < _Tp(0) || __y < _Tp(0) || __x + __y < __lolim) + std::__throw_domain_error(("Argument less than zero " "in __ellint_rc.") + ); + else + { + const _Tp __c0 = _Tp(1) / _Tp(4); + const _Tp __c1 = _Tp(1) / _Tp(7); + const _Tp __c2 = _Tp(9) / _Tp(22); + const _Tp __c3 = _Tp(3) / _Tp(10); + const _Tp __c4 = _Tp(3) / _Tp(8); + + _Tp __xn = __x; + _Tp __yn = __y; + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __errtol = std::pow(__eps / _Tp(30), _Tp(1) / _Tp(6)); + _Tp __mu; + _Tp __sn; + + const unsigned int __max_iter = 100; + for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) + { + __mu = (__xn + _Tp(2) * __yn) / _Tp(3); + __sn = (__yn + __mu) / __mu - _Tp(2); + if (std::abs(__sn) < __errtol) + break; + const _Tp __lambda = _Tp(2) * std::sqrt(__xn) * std::sqrt(__yn) + + __yn; + __xn = __c0 * (__xn + __lambda); + __yn = __c0 * (__yn + __lambda); + } + + _Tp __s = __sn * __sn + * (__c3 + __sn*(__c1 + __sn * (__c4 + __sn * __c2))); + + return (_Tp(1) + __s) / std::sqrt(__mu); + } + } +# 561 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_rj(_Tp __x, _Tp __y, _Tp __z, _Tp __p) + { + const _Tp __min = std::numeric_limits<_Tp>::min(); + const _Tp __lolim = std::pow(_Tp(5) * __min, _Tp(1)/_Tp(3)); + + if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0)) + std::__throw_domain_error(("Argument less than zero " "in __ellint_rj.") + ); + else if (__x + __y < __lolim || __x + __z < __lolim + || __y + __z < __lolim || __p < __lolim) + std::__throw_domain_error(("Argument too small " "in __ellint_rj") + ); + else + { + const _Tp __c0 = _Tp(1) / _Tp(4); + const _Tp __c1 = _Tp(3) / _Tp(14); + const _Tp __c2 = _Tp(1) / _Tp(3); + const _Tp __c3 = _Tp(3) / _Tp(22); + const _Tp __c4 = _Tp(3) / _Tp(26); + + _Tp __xn = __x; + _Tp __yn = __y; + _Tp __zn = __z; + _Tp __pn = __p; + _Tp __sigma = _Tp(0); + _Tp __power4 = _Tp(1); + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __errtol = std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6)); + + _Tp __mu; + _Tp __xndev, __yndev, __zndev, __pndev; + + const unsigned int __max_iter = 100; + for (unsigned int __iter = 0; __iter < __max_iter; ++__iter) + { + __mu = (__xn + __yn + __zn + _Tp(2) * __pn) / _Tp(5); + __xndev = (__mu - __xn) / __mu; + __yndev = (__mu - __yn) / __mu; + __zndev = (__mu - __zn) / __mu; + __pndev = (__mu - __pn) / __mu; + _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev)); + __epsilon = std::max(__epsilon, std::abs(__zndev)); + __epsilon = std::max(__epsilon, std::abs(__pndev)); + if (__epsilon < __errtol) + break; + const _Tp __xnroot = std::sqrt(__xn); + const _Tp __ynroot = std::sqrt(__yn); + const _Tp __znroot = std::sqrt(__zn); + const _Tp __lambda = __xnroot * (__ynroot + __znroot) + + __ynroot * __znroot; + const _Tp __alpha1 = __pn * (__xnroot + __ynroot + __znroot) + + __xnroot * __ynroot * __znroot; + const _Tp __alpha2 = __alpha1 * __alpha1; + const _Tp __beta = __pn * (__pn + __lambda) + * (__pn + __lambda); + __sigma += __power4 * __ellint_rc(__alpha2, __beta); + __power4 *= __c0; + __xn = __c0 * (__xn + __lambda); + __yn = __c0 * (__yn + __lambda); + __zn = __c0 * (__zn + __lambda); + __pn = __c0 * (__pn + __lambda); + } + + _Tp __ea = __xndev * (__yndev + __zndev) + __yndev * __zndev; + _Tp __eb = __xndev * __yndev * __zndev; + _Tp __ec = __pndev * __pndev; + _Tp __e2 = __ea - _Tp(3) * __ec; + _Tp __e3 = __eb + _Tp(2) * __pndev * (__ea - __ec); + _Tp __s1 = _Tp(1) + __e2 * (-__c1 + _Tp(3) * __c3 * __e2 / _Tp(4) + - _Tp(3) * __c4 * __e3 / _Tp(2)); + _Tp __s2 = __eb * (__c2 / _Tp(2) + + __pndev * (-__c3 - __c3 + __pndev * __c4)); + _Tp __s3 = __pndev * __ea * (__c2 - __pndev * __c3) + - __c2 * __pndev * __ec; + + return _Tp(3) * __sigma + __power4 * (__s1 + __s2 + __s3) + / (__mu * std::sqrt(__mu)); + } + } +# 661 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __comp_ellint_3(_Tp __k, _Tp __nu) + { + + if (__isnan(__k) || __isnan(__nu)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__nu == _Tp(1)) + return std::numeric_limits<_Tp>::infinity(); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __comp_ellint_3.")); + else + { + const _Tp __kk = __k * __k; + + return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1)) + + __nu + * __ellint_rj(_Tp(0), _Tp(1) - __kk, _Tp(1), _Tp(1) - __nu) + / _Tp(3); + } + } +# 701 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/ell_integral.tcc" 3 + template + _Tp + __ellint_3(_Tp __k, _Tp __nu, _Tp __phi) + { + + if (__isnan(__k) || __isnan(__nu) || __isnan(__phi)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (std::abs(__k) > _Tp(1)) + std::__throw_domain_error(("Bad argument in __ellint_3.")); + else + { + + const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi() + + _Tp(0.5L)); + const _Tp __phi_red = __phi + - __n * __numeric_constants<_Tp>::__pi(); + + const _Tp __kk = __k * __k; + const _Tp __s = std::sin(__phi_red); + const _Tp __ss = __s * __s; + const _Tp __sss = __ss * __s; + const _Tp __c = std::cos(__phi_red); + const _Tp __cc = __c * __c; + + const _Tp __Pi = __s + * __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1)) + + __nu * __sss + * __ellint_rj(__cc, _Tp(1) - __kk * __ss, _Tp(1), + _Tp(1) - __nu * __ss) / _Tp(3); + + if (__n == 0) + return __Pi; + else + return __Pi + _Tp(2) * __n * __comp_ellint_3(__k, __nu); + } + } + } + + + + + +} +# 53 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 1 3 +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 +namespace std +{ + +# 64 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + namespace __detail + { + template _Tp __expint_E1(_Tp); +# 81 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_E1_series(_Tp __x) + { + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + _Tp __term = _Tp(1); + _Tp __esum = _Tp(0); + _Tp __osum = _Tp(0); + const unsigned int __max_iter = 1000; + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + __term *= - __x / __i; + if (std::abs(__term) < __eps) + break; + if (__term >= _Tp(0)) + __esum += __term / __i; + else + __osum += __term / __i; + } + + return - __esum - __osum + - __numeric_constants<_Tp>::__gamma_e() - std::log(__x); + } +# 118 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_E1_asymp(_Tp __x) + { + _Tp __term = _Tp(1); + _Tp __esum = _Tp(1); + _Tp __osum = _Tp(0); + const unsigned int __max_iter = 1000; + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + _Tp __prev = __term; + __term *= - __i / __x; + if (std::abs(__term) > std::abs(__prev)) + break; + if (__term >= _Tp(0)) + __esum += __term; + else + __osum += __term; + } + + return std::exp(- __x) * (__esum + __osum) / __x; + } +# 155 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_En_series(unsigned int __n, _Tp __x) + { + const unsigned int __max_iter = 1000; + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const int __nm1 = __n - 1; + _Tp __ans = (__nm1 != 0 + ? _Tp(1) / __nm1 : -std::log(__x) + - __numeric_constants<_Tp>::__gamma_e()); + _Tp __fact = _Tp(1); + for (int __i = 1; __i <= __max_iter; ++__i) + { + __fact *= -__x / _Tp(__i); + _Tp __del; + if ( __i != __nm1 ) + __del = -__fact / _Tp(__i - __nm1); + else + { + _Tp __psi = -__numeric_constants<_Tp>::gamma_e(); + for (int __ii = 1; __ii <= __nm1; ++__ii) + __psi += _Tp(1) / _Tp(__ii); + __del = __fact * (__psi - std::log(__x)); + } + __ans += __del; + if (std::abs(__del) < __eps * std::abs(__ans)) + return __ans; + } + std::__throw_runtime_error(("Series summation failed " "in __expint_En_series.") + ); + } +# 201 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_En_cont_frac(unsigned int __n, _Tp __x) + { + const unsigned int __max_iter = 1000; + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __fp_min = std::numeric_limits<_Tp>::min(); + const int __nm1 = __n - 1; + _Tp __b = __x + _Tp(__n); + _Tp __c = _Tp(1) / __fp_min; + _Tp __d = _Tp(1) / __b; + _Tp __h = __d; + for ( unsigned int __i = 1; __i <= __max_iter; ++__i ) + { + _Tp __a = -_Tp(__i * (__nm1 + __i)); + __b += _Tp(2); + __d = _Tp(1) / (__a * __d + __b); + __c = __b + __a / __c; + const _Tp __del = __c * __d; + __h *= __del; + if (std::abs(__del - _Tp(1)) < __eps) + { + const _Tp __ans = __h * std::exp(-__x); + return __ans; + } + } + std::__throw_runtime_error(("Continued fraction failed " "in __expint_En_cont_frac.") + ); + } +# 246 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_En_recursion(unsigned int __n, _Tp __x) + { + _Tp __En; + _Tp __E1 = __expint_E1(__x); + if (__x < _Tp(__n)) + { + + __En = __E1; + for (unsigned int __j = 2; __j < __n; ++__j) + __En = (std::exp(-__x) - __x * __En) / _Tp(__j - 1); + } + else + { + + __En = _Tp(1); + const int __N = __n + 20; + _Tp __save = _Tp(0); + for (int __j = __N; __j > 0; --__j) + { + __En = (std::exp(-__x) - __j * __En) / __x; + if (__j == __n) + __save = __En; + } + _Tp __norm = __En / __E1; + __En /= __norm; + } + + return __En; + } +# 290 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_Ei_series(_Tp __x) + { + _Tp __term = _Tp(1); + _Tp __sum = _Tp(0); + const unsigned int __max_iter = 1000; + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + __term *= __x / __i; + __sum += __term / __i; + if (__term < std::numeric_limits<_Tp>::epsilon() * __sum) + break; + } + + return __numeric_constants<_Tp>::__gamma_e() + __sum + std::log(__x); + } +# 321 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_Ei_asymp(_Tp __x) + { + _Tp __term = _Tp(1); + _Tp __sum = _Tp(1); + const unsigned int __max_iter = 1000; + for (unsigned int __i = 1; __i < __max_iter; ++__i) + { + _Tp __prev = __term; + __term *= __i / __x; + if (__term < std::numeric_limits<_Tp>::epsilon()) + break; + if (__term >= __prev) + break; + __sum += __term; + } + + return std::exp(__x) * __sum / __x; + } +# 354 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_Ei(_Tp __x) + { + if (__x < _Tp(0)) + return -__expint_E1(-__x); + else if (__x < -std::log(std::numeric_limits<_Tp>::epsilon())) + return __expint_Ei_series(__x); + else + return __expint_Ei_asymp(__x); + } +# 378 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_E1(_Tp __x) + { + if (__x < _Tp(0)) + return -__expint_Ei(-__x); + else if (__x < _Tp(1)) + return __expint_E1_series(__x); + else if (__x < _Tp(100)) + return __expint_En_cont_frac(1, __x); + else + return __expint_E1_asymp(__x); + } +# 408 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_asymp(unsigned int __n, _Tp __x) + { + _Tp __term = _Tp(1); + _Tp __sum = _Tp(1); + for (unsigned int __i = 1; __i <= __n; ++__i) + { + _Tp __prev = __term; + __term *= -(__n - __i + 1) / __x; + if (std::abs(__term) > std::abs(__prev)) + break; + __sum += __term; + } + + return std::exp(-__x) * __sum / __x; + } +# 442 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint_large_n(unsigned int __n, _Tp __x) + { + const _Tp __xpn = __x + __n; + const _Tp __xpn2 = __xpn * __xpn; + _Tp __term = _Tp(1); + _Tp __sum = _Tp(1); + for (unsigned int __i = 1; __i <= __n; ++__i) + { + _Tp __prev = __term; + __term *= (__n - 2 * (__i - 1) * __x) / __xpn2; + if (std::abs(__term) < std::numeric_limits<_Tp>::epsilon()) + break; + __sum += __term; + } + + return std::exp(-__x) * __sum / __xpn; + } +# 476 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + _Tp + __expint(unsigned int __n, _Tp __x) + { + + if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__n <= 1 && __x == _Tp(0)) + return std::numeric_limits<_Tp>::infinity(); + else + { + _Tp __E0 = std::exp(__x) / __x; + if (__n == 0) + return __E0; + + _Tp __E1 = __expint_E1(__x); + if (__n == 1) + return __E1; + + if (__x == _Tp(0)) + return _Tp(1) / static_cast<_Tp>(__n - 1); + + _Tp __En = __expint_En_recursion(__n, __x); + + return __En; + } + } +# 516 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/exp_integral.tcc" 3 + template + inline _Tp + __expint(_Tp __x) + { + if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return __expint_Ei(__x); + } + } + + + + + +} +# 54 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 1 3 +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 +namespace std +{ + +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + namespace __detail + { +# 83 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __conf_hyperg_series(_Tp __a, _Tp __c, _Tp __x) + { + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + _Tp __term = _Tp(1); + _Tp __Fac = _Tp(1); + const unsigned int __max_iter = 100000; + unsigned int __i; + for (__i = 0; __i < __max_iter; ++__i) + { + __term *= (__a + _Tp(__i)) * __x + / ((__c + _Tp(__i)) * _Tp(1 + __i)); + if (std::abs(__term) < __eps) + { + break; + } + __Fac += __term; + } + if (__i == __max_iter) + std::__throw_runtime_error(("Series failed to converge " "in __conf_hyperg_series.") + ); + + return __Fac; + } +# 120 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __conf_hyperg_luke(_Tp __a, _Tp __c, _Tp __xin) + { + const _Tp __big = std::pow(std::numeric_limits<_Tp>::max(), _Tp(0.16L)); + const int __nmax = 20000; + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __x = -__xin; + const _Tp __x3 = __x * __x * __x; + const _Tp __t0 = __a / __c; + const _Tp __t1 = (__a + _Tp(1)) / (_Tp(2) * __c); + const _Tp __t2 = (__a + _Tp(2)) / (_Tp(2) * (__c + _Tp(1))); + _Tp __F = _Tp(1); + _Tp __prec; + + _Tp __Bnm3 = _Tp(1); + _Tp __Bnm2 = _Tp(1) + __t1 * __x; + _Tp __Bnm1 = _Tp(1) + __t2 * __x * (_Tp(1) + __t1 / _Tp(3) * __x); + + _Tp __Anm3 = _Tp(1); + _Tp __Anm2 = __Bnm2 - __t0 * __x; + _Tp __Anm1 = __Bnm1 - __t0 * (_Tp(1) + __t2 * __x) * __x + + __t0 * __t1 * (__c / (__c + _Tp(1))) * __x * __x; + + int __n = 3; + while(1) + { + _Tp __npam1 = _Tp(__n - 1) + __a; + _Tp __npcm1 = _Tp(__n - 1) + __c; + _Tp __npam2 = _Tp(__n - 2) + __a; + _Tp __npcm2 = _Tp(__n - 2) + __c; + _Tp __tnm1 = _Tp(2 * __n - 1); + _Tp __tnm3 = _Tp(2 * __n - 3); + _Tp __tnm5 = _Tp(2 * __n - 5); + _Tp __F1 = (_Tp(__n - 2) - __a) / (_Tp(2) * __tnm3 * __npcm1); + _Tp __F2 = (_Tp(__n) + __a) * __npam1 + / (_Tp(4) * __tnm1 * __tnm3 * __npcm2 * __npcm1); + _Tp __F3 = -__npam2 * __npam1 * (_Tp(__n - 2) - __a) + / (_Tp(8) * __tnm3 * __tnm3 * __tnm5 + * (_Tp(__n - 3) + __c) * __npcm2 * __npcm1); + _Tp __E = -__npam1 * (_Tp(__n - 1) - __c) + / (_Tp(2) * __tnm3 * __npcm2 * __npcm1); + + _Tp __An = (_Tp(1) + __F1 * __x) * __Anm1 + + (__E + __F2 * __x) * __x * __Anm2 + __F3 * __x3 * __Anm3; + _Tp __Bn = (_Tp(1) + __F1 * __x) * __Bnm1 + + (__E + __F2 * __x) * __x * __Bnm2 + __F3 * __x3 * __Bnm3; + _Tp __r = __An / __Bn; + + __prec = std::abs((__F - __r) / __F); + __F = __r; + + if (__prec < __eps || __n > __nmax) + break; + + if (std::abs(__An) > __big || std::abs(__Bn) > __big) + { + __An /= __big; + __Bn /= __big; + __Anm1 /= __big; + __Bnm1 /= __big; + __Anm2 /= __big; + __Bnm2 /= __big; + __Anm3 /= __big; + __Bnm3 /= __big; + } + else if (std::abs(__An) < _Tp(1) / __big + || std::abs(__Bn) < _Tp(1) / __big) + { + __An *= __big; + __Bn *= __big; + __Anm1 *= __big; + __Bnm1 *= __big; + __Anm2 *= __big; + __Bnm2 *= __big; + __Anm3 *= __big; + __Bnm3 *= __big; + } + + ++__n; + __Bnm3 = __Bnm2; + __Bnm2 = __Bnm1; + __Bnm1 = __Bn; + __Anm3 = __Anm2; + __Anm2 = __Anm1; + __Anm1 = __An; + } + + if (__n >= __nmax) + std::__throw_runtime_error(("Iteration failed to converge " "in __conf_hyperg_luke.") + ); + + return __F; + } +# 227 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __conf_hyperg(_Tp __a, _Tp __c, _Tp __x) + { + + const _Tp __c_nint = ::std::nearbyint(__c); + + + + if (__isnan(__a) || __isnan(__c) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__c_nint == __c && __c_nint <= 0) + return std::numeric_limits<_Tp>::infinity(); + else if (__a == _Tp(0)) + return _Tp(1); + else if (__c == __a) + return std::exp(__x); + else if (__x < _Tp(0)) + return __conf_hyperg_luke(__a, __c, __x); + else + return __conf_hyperg_series(__a, __c, __x); + } +# 271 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __hyperg_series(_Tp __a, _Tp __b, _Tp __c, _Tp __x) + { + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + _Tp __term = _Tp(1); + _Tp __Fabc = _Tp(1); + const unsigned int __max_iter = 100000; + unsigned int __i; + for (__i = 0; __i < __max_iter; ++__i) + { + __term *= (__a + _Tp(__i)) * (__b + _Tp(__i)) * __x + / ((__c + _Tp(__i)) * _Tp(1 + __i)); + if (std::abs(__term) < __eps) + { + break; + } + __Fabc += __term; + } + if (__i == __max_iter) + std::__throw_runtime_error(("Series failed to converge " "in __hyperg_series.") + ); + + return __Fabc; + } + + + + + + + + template + _Tp + __hyperg_luke(_Tp __a, _Tp __b, _Tp __c, _Tp __xin) + { + const _Tp __big = std::pow(std::numeric_limits<_Tp>::max(), _Tp(0.16L)); + const int __nmax = 20000; + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __x = -__xin; + const _Tp __x3 = __x * __x * __x; + const _Tp __t0 = __a * __b / __c; + const _Tp __t1 = (__a + _Tp(1)) * (__b + _Tp(1)) / (_Tp(2) * __c); + const _Tp __t2 = (__a + _Tp(2)) * (__b + _Tp(2)) + / (_Tp(2) * (__c + _Tp(1))); + + _Tp __F = _Tp(1); + + _Tp __Bnm3 = _Tp(1); + _Tp __Bnm2 = _Tp(1) + __t1 * __x; + _Tp __Bnm1 = _Tp(1) + __t2 * __x * (_Tp(1) + __t1 / _Tp(3) * __x); + + _Tp __Anm3 = _Tp(1); + _Tp __Anm2 = __Bnm2 - __t0 * __x; + _Tp __Anm1 = __Bnm1 - __t0 * (_Tp(1) + __t2 * __x) * __x + + __t0 * __t1 * (__c / (__c + _Tp(1))) * __x * __x; + + int __n = 3; + while (1) + { + const _Tp __npam1 = _Tp(__n - 1) + __a; + const _Tp __npbm1 = _Tp(__n - 1) + __b; + const _Tp __npcm1 = _Tp(__n - 1) + __c; + const _Tp __npam2 = _Tp(__n - 2) + __a; + const _Tp __npbm2 = _Tp(__n - 2) + __b; + const _Tp __npcm2 = _Tp(__n - 2) + __c; + const _Tp __tnm1 = _Tp(2 * __n - 1); + const _Tp __tnm3 = _Tp(2 * __n - 3); + const _Tp __tnm5 = _Tp(2 * __n - 5); + const _Tp __n2 = __n * __n; + const _Tp __F1 = (_Tp(3) * __n2 + (__a + __b - _Tp(6)) * __n + + _Tp(2) - __a * __b - _Tp(2) * (__a + __b)) + / (_Tp(2) * __tnm3 * __npcm1); + const _Tp __F2 = -(_Tp(3) * __n2 - (__a + __b + _Tp(6)) * __n + + _Tp(2) - __a * __b) * __npam1 * __npbm1 + / (_Tp(4) * __tnm1 * __tnm3 * __npcm2 * __npcm1); + const _Tp __F3 = (__npam2 * __npam1 * __npbm2 * __npbm1 + * (_Tp(__n - 2) - __a) * (_Tp(__n - 2) - __b)) + / (_Tp(8) * __tnm3 * __tnm3 * __tnm5 + * (_Tp(__n - 3) + __c) * __npcm2 * __npcm1); + const _Tp __E = -__npam1 * __npbm1 * (_Tp(__n - 1) - __c) + / (_Tp(2) * __tnm3 * __npcm2 * __npcm1); + + _Tp __An = (_Tp(1) + __F1 * __x) * __Anm1 + + (__E + __F2 * __x) * __x * __Anm2 + __F3 * __x3 * __Anm3; + _Tp __Bn = (_Tp(1) + __F1 * __x) * __Bnm1 + + (__E + __F2 * __x) * __x * __Bnm2 + __F3 * __x3 * __Bnm3; + const _Tp __r = __An / __Bn; + + const _Tp __prec = std::abs((__F - __r) / __F); + __F = __r; + + if (__prec < __eps || __n > __nmax) + break; + + if (std::abs(__An) > __big || std::abs(__Bn) > __big) + { + __An /= __big; + __Bn /= __big; + __Anm1 /= __big; + __Bnm1 /= __big; + __Anm2 /= __big; + __Bnm2 /= __big; + __Anm3 /= __big; + __Bnm3 /= __big; + } + else if (std::abs(__An) < _Tp(1) / __big + || std::abs(__Bn) < _Tp(1) / __big) + { + __An *= __big; + __Bn *= __big; + __Anm1 *= __big; + __Bnm1 *= __big; + __Anm2 *= __big; + __Bnm2 *= __big; + __Anm3 *= __big; + __Bnm3 *= __big; + } + + ++__n; + __Bnm3 = __Bnm2; + __Bnm2 = __Bnm1; + __Bnm1 = __Bn; + __Anm3 = __Anm2; + __Anm2 = __Anm1; + __Anm1 = __An; + } + + if (__n >= __nmax) + std::__throw_runtime_error(("Iteration failed to converge " "in __hyperg_luke.") + ); + + return __F; + } +# 438 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __hyperg_reflect(_Tp __a, _Tp __b, _Tp __c, _Tp __x) + { + const _Tp __d = __c - __a - __b; + const int __intd = std::floor(__d + _Tp(0.5L)); + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __toler = _Tp(1000) * __eps; + const _Tp __log_max = std::log(std::numeric_limits<_Tp>::max()); + const bool __d_integer = (std::abs(__d - __intd) < __toler); + + if (__d_integer) + { + const _Tp __ln_omx = std::log(_Tp(1) - __x); + const _Tp __ad = std::abs(__d); + _Tp __F1, __F2; + + _Tp __d1, __d2; + if (__d >= _Tp(0)) + { + __d1 = __d; + __d2 = _Tp(0); + } + else + { + __d1 = _Tp(0); + __d2 = __d; + } + + const _Tp __lng_c = __log_gamma(__c); + + + if (__ad < __eps) + { + + __F1 = _Tp(0); + } + else + { + + bool __ok_d1 = true; + _Tp __lng_ad, __lng_ad1, __lng_bd1; + try + { + __lng_ad = __log_gamma(__ad); + __lng_ad1 = __log_gamma(__a + __d1); + __lng_bd1 = __log_gamma(__b + __d1); + } + catch(...) + { + __ok_d1 = false; + } + + if (__ok_d1) + { + + + + _Tp __sum1 = _Tp(1); + _Tp __term = _Tp(1); + _Tp __ln_pre1 = __lng_ad + __lng_c + __d2 * __ln_omx + - __lng_ad1 - __lng_bd1; + + + + for (int __i = 1; __i < __ad; ++__i) + { + const int __j = __i - 1; + __term *= (__a + __d2 + __j) * (__b + __d2 + __j) + / (_Tp(1) + __d2 + __j) / __i * (_Tp(1) - __x); + __sum1 += __term; + } + + if (__ln_pre1 > __log_max) + std::__throw_runtime_error(("Overflow of gamma functions" " in __hyperg_luke.") + ); + else + __F1 = std::exp(__ln_pre1) * __sum1; + } + else + { + + + __F1 = _Tp(0); + } + } + + + bool __ok_d2 = true; + _Tp __lng_ad2, __lng_bd2; + try + { + __lng_ad2 = __log_gamma(__a + __d2); + __lng_bd2 = __log_gamma(__b + __d2); + } + catch(...) + { + __ok_d2 = false; + } + + if (__ok_d2) + { + + + const int __maxiter = 2000; + const _Tp __psi_1 = -__numeric_constants<_Tp>::__gamma_e(); + const _Tp __psi_1pd = __psi(_Tp(1) + __ad); + const _Tp __psi_apd1 = __psi(__a + __d1); + const _Tp __psi_bpd1 = __psi(__b + __d1); + + _Tp __psi_term = __psi_1 + __psi_1pd - __psi_apd1 + - __psi_bpd1 - __ln_omx; + _Tp __fact = _Tp(1); + _Tp __sum2 = __psi_term; + _Tp __ln_pre2 = __lng_c + __d1 * __ln_omx + - __lng_ad2 - __lng_bd2; + + + int __j; + for (__j = 1; __j < __maxiter; ++__j) + { + + + const _Tp __term1 = _Tp(1) / _Tp(__j) + + _Tp(1) / (__ad + __j); + const _Tp __term2 = _Tp(1) / (__a + __d1 + _Tp(__j - 1)) + + _Tp(1) / (__b + __d1 + _Tp(__j - 1)); + __psi_term += __term1 - __term2; + __fact *= (__a + __d1 + _Tp(__j - 1)) + * (__b + __d1 + _Tp(__j - 1)) + / ((__ad + __j) * __j) * (_Tp(1) - __x); + const _Tp __delta = __fact * __psi_term; + __sum2 += __delta; + if (std::abs(__delta) < __eps * std::abs(__sum2)) + break; + } + if (__j == __maxiter) + std::__throw_runtime_error(("Sum F2 failed to converge " "in __hyperg_reflect") + ); + + if (__sum2 == _Tp(0)) + __F2 = _Tp(0); + else + __F2 = std::exp(__ln_pre2) * __sum2; + } + else + { + + + __F2 = _Tp(0); + } + + const _Tp __sgn_2 = (__intd % 2 == 1 ? -_Tp(1) : _Tp(1)); + const _Tp __F = __F1 + __sgn_2 * __F2; + + return __F; + } + else + { + + + + + bool __ok1 = true; + _Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0); + _Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0); + try + { + __sgn_g1ca = __log_gamma_sign(__c - __a); + __ln_g1ca = __log_gamma(__c - __a); + __sgn_g1cb = __log_gamma_sign(__c - __b); + __ln_g1cb = __log_gamma(__c - __b); + } + catch(...) + { + __ok1 = false; + } + + bool __ok2 = true; + _Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0); + _Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0); + try + { + __sgn_g2a = __log_gamma_sign(__a); + __ln_g2a = __log_gamma(__a); + __sgn_g2b = __log_gamma_sign(__b); + __ln_g2b = __log_gamma(__b); + } + catch(...) + { + __ok2 = false; + } + + const _Tp __sgn_gc = __log_gamma_sign(__c); + const _Tp __ln_gc = __log_gamma(__c); + const _Tp __sgn_gd = __log_gamma_sign(__d); + const _Tp __ln_gd = __log_gamma(__d); + const _Tp __sgn_gmd = __log_gamma_sign(-__d); + const _Tp __ln_gmd = __log_gamma(-__d); + + const _Tp __sgn1 = __sgn_gc * __sgn_gd * __sgn_g1ca * __sgn_g1cb; + const _Tp __sgn2 = __sgn_gc * __sgn_gmd * __sgn_g2a * __sgn_g2b; + + _Tp __pre1, __pre2; + if (__ok1 && __ok2) + { + _Tp __ln_pre1 = __ln_gc + __ln_gd - __ln_g1ca - __ln_g1cb; + _Tp __ln_pre2 = __ln_gc + __ln_gmd - __ln_g2a - __ln_g2b + + __d * std::log(_Tp(1) - __x); + if (__ln_pre1 < __log_max && __ln_pre2 < __log_max) + { + __pre1 = std::exp(__ln_pre1); + __pre2 = std::exp(__ln_pre2); + __pre1 *= __sgn1; + __pre2 *= __sgn2; + } + else + { + std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") + ); + } + } + else if (__ok1 && !__ok2) + { + _Tp __ln_pre1 = __ln_gc + __ln_gd - __ln_g1ca - __ln_g1cb; + if (__ln_pre1 < __log_max) + { + __pre1 = std::exp(__ln_pre1); + __pre1 *= __sgn1; + __pre2 = _Tp(0); + } + else + { + std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") + ); + } + } + else if (!__ok1 && __ok2) + { + _Tp __ln_pre2 = __ln_gc + __ln_gmd - __ln_g2a - __ln_g2b + + __d * std::log(_Tp(1) - __x); + if (__ln_pre2 < __log_max) + { + __pre1 = _Tp(0); + __pre2 = std::exp(__ln_pre2); + __pre2 *= __sgn2; + } + else + { + std::__throw_runtime_error(("Overflow of gamma functions " "in __hyperg_reflect") + ); + } + } + else + { + __pre1 = _Tp(0); + __pre2 = _Tp(0); + std::__throw_runtime_error(("Underflow of gamma functions " "in __hyperg_reflect") + ); + } + + const _Tp __F1 = __hyperg_series(__a, __b, _Tp(1) - __d, + _Tp(1) - __x); + const _Tp __F2 = __hyperg_series(__c - __a, __c - __b, _Tp(1) + __d, + _Tp(1) - __x); + + const _Tp __F = __pre1 * __F1 + __pre2 * __F2; + + return __F; + } + } +# 728 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/hypergeometric.tcc" 3 + template + _Tp + __hyperg(_Tp __a, _Tp __b, _Tp __c, _Tp __x) + { + + const _Tp __a_nint = ::std::nearbyint(__a); + const _Tp __b_nint = ::std::nearbyint(__b); + const _Tp __c_nint = ::std::nearbyint(__c); + + + + + + const _Tp __toler = _Tp(1000) * std::numeric_limits<_Tp>::epsilon(); + if (std::abs(__x) >= _Tp(1)) + std::__throw_domain_error(("Argument outside unit circle " "in __hyperg.") + ); + else if (__isnan(__a) || __isnan(__b) + || __isnan(__c) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__c_nint == __c && __c_nint <= _Tp(0)) + return std::numeric_limits<_Tp>::infinity(); + else if (std::abs(__c - __b) < __toler || std::abs(__c - __a) < __toler) + return std::pow(_Tp(1) - __x, __c - __a - __b); + else if (__a >= _Tp(0) && __b >= _Tp(0) && __c >= _Tp(0) + && __x >= _Tp(0) && __x < _Tp(0.995L)) + return __hyperg_series(__a, __b, __c, __x); + else if (std::abs(__a) < _Tp(10) && std::abs(__b) < _Tp(10)) + { + + + if (__a < _Tp(0) && std::abs(__a - __a_nint) < __toler) + return __hyperg_series(__a_nint, __b, __c, __x); + else if (__b < _Tp(0) && std::abs(__b - __b_nint) < __toler) + return __hyperg_series(__a, __b_nint, __c, __x); + else if (__x < -_Tp(0.25L)) + return __hyperg_luke(__a, __b, __c, __x); + else if (__x < _Tp(0.5L)) + return __hyperg_series(__a, __b, __c, __x); + else + if (std::abs(__c) > _Tp(10)) + return __hyperg_series(__a, __b, __c, __x); + else + return __hyperg_reflect(__a, __b, __c, __x); + } + else + return __hyperg_luke(__a, __b, __c, __x); + } + } + + + + + + +} +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 1 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 + namespace __detail + { +# 80 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 + template + _Tp + __poly_legendre_p(unsigned int __l, _Tp __x) + { + + if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x == +_Tp(1)) + return +_Tp(1); + else if (__x == -_Tp(1)) + return (__l % 2 == 1 ? -_Tp(1) : +_Tp(1)); + else + { + _Tp __p_lm2 = _Tp(1); + if (__l == 0) + return __p_lm2; + + _Tp __p_lm1 = __x; + if (__l == 1) + return __p_lm1; + + _Tp __p_l = 0; + for (unsigned int __ll = 2; __ll <= __l; ++__ll) + { + + + __p_l = _Tp(2) * __x * __p_lm1 - __p_lm2 + - (__x * __p_lm1 - __p_lm2) / _Tp(__ll); + __p_lm2 = __p_lm1; + __p_lm1 = __p_l; + } + + return __p_l; + } + } +# 136 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 + template + _Tp + __assoc_legendre_p(unsigned int __l, unsigned int __m, _Tp __x, + _Tp __phase = _Tp(+1)) + { + + if (__m > __l) + return _Tp(0); + else if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__m == 0) + return __poly_legendre_p(__l, __x); + else + { + _Tp __p_mm = _Tp(1); + if (__m > 0) + { + + + _Tp __root = std::sqrt(_Tp(1) - __x) * std::sqrt(_Tp(1) + __x); + _Tp __fact = _Tp(1); + for (unsigned int __i = 1; __i <= __m; ++__i) + { + __p_mm *= __phase * __fact * __root; + __fact += _Tp(2); + } + } + if (__l == __m) + return __p_mm; + + _Tp __p_mp1m = _Tp(2 * __m + 1) * __x * __p_mm; + if (__l == __m + 1) + return __p_mp1m; + + _Tp __p_lm2m = __p_mm; + _Tp __P_lm1m = __p_mp1m; + _Tp __p_lm = _Tp(0); + for (unsigned int __j = __m + 2; __j <= __l; ++__j) + { + __p_lm = (_Tp(2 * __j - 1) * __x * __P_lm1m + - _Tp(__j + __m - 1) * __p_lm2m) / _Tp(__j - __m); + __p_lm2m = __P_lm1m; + __P_lm1m = __p_lm; + } + + return __p_lm; + } + } +# 214 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/legendre_function.tcc" 3 + template + _Tp + __sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta) + { + if (__isnan(__theta)) + return std::numeric_limits<_Tp>::quiet_NaN(); + + const _Tp __x = std::cos(__theta); + + if (__m > __l) + return _Tp(0); + else if (__m == 0) + { + _Tp __P = __poly_legendre_p(__l, __x); + _Tp __fact = std::sqrt(_Tp(2 * __l + 1) + / (_Tp(4) * __numeric_constants<_Tp>::__pi())); + __P *= __fact; + return __P; + } + else if (__x == _Tp(1) || __x == -_Tp(1)) + { + + return _Tp(0); + } + else + { + + + + + + const _Tp __sgn = ( __m % 2 == 1 ? -_Tp(1) : _Tp(1)); + const _Tp __y_mp1m_factor = __x * std::sqrt(_Tp(2 * __m + 3)); + + const _Tp __lncirc = ::std::log1p(-__x * __x); + + + + + + const _Tp __lnpoch = ::std::lgamma(_Tp(__m + _Tp(0.5L))) + - ::std::lgamma(_Tp(__m)); + + + + + const _Tp __lnpre_val = + -_Tp(0.25L) * __numeric_constants<_Tp>::__lnpi() + + _Tp(0.5L) * (__lnpoch + __m * __lncirc); + const _Tp __sr = std::sqrt((_Tp(2) + _Tp(1) / __m) + / (_Tp(4) * __numeric_constants<_Tp>::__pi())); + _Tp __y_mm = __sgn * __sr * std::exp(__lnpre_val); + _Tp __y_mp1m = __y_mp1m_factor * __y_mm; + + if (__l == __m) + return __y_mm; + else if (__l == __m + 1) + return __y_mp1m; + else + { + _Tp __y_lm = _Tp(0); + + + for (unsigned int __ll = __m + 2; __ll <= __l; ++__ll) + { + const _Tp __rat1 = _Tp(__ll - __m) / _Tp(__ll + __m); + const _Tp __rat2 = _Tp(__ll - __m - 1) / _Tp(__ll + __m - 1); + const _Tp __fact1 = std::sqrt(__rat1 * _Tp(2 * __ll + 1) + * _Tp(2 * __ll - 1)); + const _Tp __fact2 = std::sqrt(__rat1 * __rat2 * _Tp(2 * __ll + 1) + / _Tp(2 * __ll - 3)); + __y_lm = (__x * __y_mp1m * __fact1 + - (__ll + __m - 1) * __y_mm * __fact2) / _Tp(__ll - __m); + __y_mm = __y_mp1m; + __y_mp1m = __y_lm; + } + + return __y_lm; + } + } + } + } + + + + + + +} +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 1 3 +# 51 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + namespace __detail + { +# 83 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + void + __bessel_ik(_Tp __nu, _Tp __x, + _Tp & __Inu, _Tp & __Knu, _Tp & __Ipnu, _Tp & __Kpnu) + { + if (__x == _Tp(0)) + { + if (__nu == _Tp(0)) + { + __Inu = _Tp(1); + __Ipnu = _Tp(0); + } + else if (__nu == _Tp(1)) + { + __Inu = _Tp(0); + __Ipnu = _Tp(0.5L); + } + else + { + __Inu = _Tp(0); + __Ipnu = _Tp(0); + } + __Knu = std::numeric_limits<_Tp>::infinity(); + __Kpnu = -std::numeric_limits<_Tp>::infinity(); + return; + } + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + const _Tp __fp_min = _Tp(10) * std::numeric_limits<_Tp>::epsilon(); + const int __max_iter = 15000; + const _Tp __x_min = _Tp(2); + + const int __nl = static_cast(__nu + _Tp(0.5L)); + + const _Tp __mu = __nu - __nl; + const _Tp __mu2 = __mu * __mu; + const _Tp __xi = _Tp(1) / __x; + const _Tp __xi2 = _Tp(2) * __xi; + _Tp __h = __nu * __xi; + if ( __h < __fp_min ) + __h = __fp_min; + _Tp __b = __xi2 * __nu; + _Tp __d = _Tp(0); + _Tp __c = __h; + int __i; + for ( __i = 1; __i <= __max_iter; ++__i ) + { + __b += __xi2; + __d = _Tp(1) / (__b + __d); + __c = __b + _Tp(1) / __c; + const _Tp __del = __c * __d; + __h *= __del; + if (std::abs(__del - _Tp(1)) < __eps) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Argument x too large " "in __bessel_ik; " "try asymptotic expansion.") + + ); + _Tp __Inul = __fp_min; + _Tp __Ipnul = __h * __Inul; + _Tp __Inul1 = __Inul; + _Tp __Ipnu1 = __Ipnul; + _Tp __fact = __nu * __xi; + for (int __l = __nl; __l >= 1; --__l) + { + const _Tp __Inutemp = __fact * __Inul + __Ipnul; + __fact -= __xi; + __Ipnul = __fact * __Inutemp + __Inul; + __Inul = __Inutemp; + } + _Tp __f = __Ipnul / __Inul; + _Tp __Kmu, __Knu1; + if (__x < __x_min) + { + const _Tp __x2 = __x / _Tp(2); + const _Tp __pimu = __numeric_constants<_Tp>::__pi() * __mu; + const _Tp __fact = (std::abs(__pimu) < __eps + ? _Tp(1) : __pimu / std::sin(__pimu)); + _Tp __d = -std::log(__x2); + _Tp __e = __mu * __d; + const _Tp __fact2 = (std::abs(__e) < __eps + ? _Tp(1) : std::sinh(__e) / __e); + _Tp __gam1, __gam2, __gampl, __gammi; + __gamma_temme(__mu, __gam1, __gam2, __gampl, __gammi); + _Tp __ff = __fact + * (__gam1 * std::cosh(__e) + __gam2 * __fact2 * __d); + _Tp __sum = __ff; + __e = std::exp(__e); + _Tp __p = __e / (_Tp(2) * __gampl); + _Tp __q = _Tp(1) / (_Tp(2) * __e * __gammi); + _Tp __c = _Tp(1); + __d = __x2 * __x2; + _Tp __sum1 = __p; + int __i; + for (__i = 1; __i <= __max_iter; ++__i) + { + __ff = (__i * __ff + __p + __q) / (__i * __i - __mu2); + __c *= __d / __i; + __p /= __i - __mu; + __q /= __i + __mu; + const _Tp __del = __c * __ff; + __sum += __del; + const _Tp __del1 = __c * (__p - __i * __ff); + __sum1 += __del1; + if (std::abs(__del) < __eps * std::abs(__sum)) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Bessel k series failed to converge " "in __bessel_ik.") + ); + __Kmu = __sum; + __Knu1 = __sum1 * __xi2; + } + else + { + _Tp __b = _Tp(2) * (_Tp(1) + __x); + _Tp __d = _Tp(1) / __b; + _Tp __delh = __d; + _Tp __h = __delh; + _Tp __q1 = _Tp(0); + _Tp __q2 = _Tp(1); + _Tp __a1 = _Tp(0.25L) - __mu2; + _Tp __q = __c = __a1; + _Tp __a = -__a1; + _Tp __s = _Tp(1) + __q * __delh; + int __i; + for (__i = 2; __i <= __max_iter; ++__i) + { + __a -= 2 * (__i - 1); + __c = -__a * __c / __i; + const _Tp __qnew = (__q1 - __b * __q2) / __a; + __q1 = __q2; + __q2 = __qnew; + __q += __c * __qnew; + __b += _Tp(2); + __d = _Tp(1) / (__b + __a * __d); + __delh = (__b * __d - _Tp(1)) * __delh; + __h += __delh; + const _Tp __dels = __q * __delh; + __s += __dels; + if ( std::abs(__dels / __s) < __eps ) + break; + } + if (__i > __max_iter) + std::__throw_runtime_error(("Steed's method failed " "in __bessel_ik.") + ); + __h = __a1 * __h; + __Kmu = std::sqrt(__numeric_constants<_Tp>::__pi() / (_Tp(2) * __x)) + * std::exp(-__x) / __s; + __Knu1 = __Kmu * (__mu + __x + _Tp(0.5L) - __h) * __xi; + } + + _Tp __Kpmu = __mu * __xi * __Kmu - __Knu1; + _Tp __Inumu = __xi / (__f * __Kmu - __Kpmu); + __Inu = __Inumu * __Inul1 / __Inul; + __Ipnu = __Inumu * __Ipnu1 / __Inul; + for ( __i = 1; __i <= __nl; ++__i ) + { + const _Tp __Knutemp = (__mu + __i) * __xi2 * __Knu1 + __Kmu; + __Kmu = __Knu1; + __Knu1 = __Knutemp; + } + __Knu = __Kmu; + __Kpnu = __nu * __xi * __Kmu - __Knu1; + + return; + } +# 267 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + _Tp + __cyl_bessel_i(_Tp __nu, _Tp __x) + { + if (__nu < _Tp(0) || __x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __cyl_bessel_i.") + ); + else if (__isnan(__nu) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__x * __x < _Tp(10) * (__nu + _Tp(1))) + return __cyl_bessel_ij_series(__nu, __x, +_Tp(1), 200); + else + { + _Tp __I_nu, __K_nu, __Ip_nu, __Kp_nu; + __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + return __I_nu; + } + } +# 303 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + _Tp + __cyl_bessel_k(_Tp __nu, _Tp __x) + { + if (__nu < _Tp(0) || __x < _Tp(0)) + std::__throw_domain_error(("Bad argument " "in __cyl_bessel_k.") + ); + else if (__isnan(__nu) || __isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + { + _Tp __I_nu, __K_nu, __Ip_nu, __Kp_nu; + __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + return __K_nu; + } + } +# 337 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + void + __sph_bessel_ik(unsigned int __n, _Tp __x, + _Tp & __i_n, _Tp & __k_n, _Tp & __ip_n, _Tp & __kp_n) + { + const _Tp __nu = _Tp(__n) + _Tp(0.5L); + + _Tp __I_nu, __Ip_nu, __K_nu, __Kp_nu; + __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + + const _Tp __factor = __numeric_constants<_Tp>::__sqrtpio2() + / std::sqrt(__x); + + __i_n = __factor * __I_nu; + __k_n = __factor * __K_nu; + __ip_n = __factor * __Ip_nu - __i_n / (_Tp(2) * __x); + __kp_n = __factor * __Kp_nu - __k_n / (_Tp(2) * __x); + + return; + } +# 373 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/modified_bessel_func.tcc" 3 + template + void + __airy(_Tp __x, _Tp & __Ai, _Tp & __Bi, _Tp & __Aip, _Tp & __Bip) + { + const _Tp __absx = std::abs(__x); + const _Tp __rootx = std::sqrt(__absx); + const _Tp __z = _Tp(2) * __absx * __rootx / _Tp(3); + const _Tp _S_inf = std::numeric_limits<_Tp>::infinity(); + + if (__isnan(__x)) + __Bip = __Aip = __Bi = __Ai = std::numeric_limits<_Tp>::quiet_NaN(); + else if (__z == _S_inf) + { + __Aip = __Ai = _Tp(0); + __Bip = __Bi = _S_inf; + } + else if (__z == -_S_inf) + __Bip = __Aip = __Bi = __Ai = _Tp(0); + else if (__x > _Tp(0)) + { + _Tp __I_nu, __Ip_nu, __K_nu, __Kp_nu; + + __bessel_ik(_Tp(1) / _Tp(3), __z, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + __Ai = __rootx * __K_nu + / (__numeric_constants<_Tp>::__sqrt3() + * __numeric_constants<_Tp>::__pi()); + __Bi = __rootx * (__K_nu / __numeric_constants<_Tp>::__pi() + + _Tp(2) * __I_nu / __numeric_constants<_Tp>::__sqrt3()); + + __bessel_ik(_Tp(2) / _Tp(3), __z, __I_nu, __K_nu, __Ip_nu, __Kp_nu); + __Aip = -__x * __K_nu + / (__numeric_constants<_Tp>::__sqrt3() + * __numeric_constants<_Tp>::__pi()); + __Bip = __x * (__K_nu / __numeric_constants<_Tp>::__pi() + + _Tp(2) * __I_nu + / __numeric_constants<_Tp>::__sqrt3()); + } + else if (__x < _Tp(0)) + { + _Tp __J_nu, __Jp_nu, __N_nu, __Np_nu; + + __bessel_jn(_Tp(1) / _Tp(3), __z, __J_nu, __N_nu, __Jp_nu, __Np_nu); + __Ai = __rootx * (__J_nu + - __N_nu / __numeric_constants<_Tp>::__sqrt3()) / _Tp(2); + __Bi = -__rootx * (__N_nu + + __J_nu / __numeric_constants<_Tp>::__sqrt3()) / _Tp(2); + + __bessel_jn(_Tp(2) / _Tp(3), __z, __J_nu, __N_nu, __Jp_nu, __Np_nu); + __Aip = __absx * (__N_nu / __numeric_constants<_Tp>::__sqrt3() + + __J_nu) / _Tp(2); + __Bip = __absx * (__J_nu / __numeric_constants<_Tp>::__sqrt3() + - __N_nu) / _Tp(2); + } + else + { + + + + __Ai = _Tp(0.35502805388781723926L); + __Bi = __Ai * __numeric_constants<_Tp>::__sqrt3(); + + + + + __Aip = -_Tp(0.25881940379280679840L); + __Bip = -__Aip * __numeric_constants<_Tp>::__sqrt3(); + } + + return; + } + } + + + + + +} +# 57 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 1 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 3 +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 3 + namespace __detail + { +# 72 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 3 + template + _Tp + __poly_hermite_recursion(unsigned int __n, _Tp __x) + { + + _Tp __H_0 = 1; + if (__n == 0) + return __H_0; + + + _Tp __H_1 = 2 * __x; + if (__n == 1) + return __H_1; + + + _Tp __H_n, __H_nm1, __H_nm2; + unsigned int __i; + for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i) + { + __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2); + __H_nm2 = __H_nm1; + __H_nm1 = __H_n; + } + + return __H_n; + } +# 114 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_hermite.tcc" 3 + template + inline _Tp + __poly_hermite(unsigned int __n, _Tp __x) + { + if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else + return __poly_hermite_recursion(__n, __x); + } + } + + + + + +} +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 1 3 +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 +namespace std +{ + +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + namespace __detail + { +# 75 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + _Tp + __poly_laguerre_large_n(unsigned __n, _Tpa __alpha1, _Tp __x) + { + const _Tp __a = -_Tp(__n); + const _Tp __b = _Tp(__alpha1) + _Tp(1); + const _Tp __eta = _Tp(2) * __b - _Tp(4) * __a; + const _Tp __cos2th = __x / __eta; + const _Tp __sin2th = _Tp(1) - __cos2th; + const _Tp __th = std::acos(std::sqrt(__cos2th)); + const _Tp __pre_h = __numeric_constants<_Tp>::__pi_2() + * __numeric_constants<_Tp>::__pi_2() + * __eta * __eta * __cos2th * __sin2th; + + + const _Tp __lg_b = ::std::lgamma(_Tp(__n) + __b); + const _Tp __lnfact = ::std::lgamma(_Tp(__n + 1)); + + + + + + _Tp __pre_term1 = _Tp(0.5L) * (_Tp(1) - __b) + * std::log(_Tp(0.25L) * __x * __eta); + _Tp __pre_term2 = _Tp(0.25L) * std::log(__pre_h); + _Tp __lnpre = __lg_b - __lnfact + _Tp(0.5L) * __x + + __pre_term1 - __pre_term2; + _Tp __ser_term1 = std::sin(__a * __numeric_constants<_Tp>::__pi()); + _Tp __ser_term2 = std::sin(_Tp(0.25L) * __eta + * (_Tp(2) * __th + - std::sin(_Tp(2) * __th)) + + __numeric_constants<_Tp>::__pi_4()); + _Tp __ser = __ser_term1 + __ser_term2; + + return std::exp(__lnpre) * __ser; + } +# 129 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + _Tp + __poly_laguerre_hyperg(unsigned int __n, _Tpa __alpha1, _Tp __x) + { + const _Tp __b = _Tp(__alpha1) + _Tp(1); + const _Tp __mx = -__x; + const _Tp __tc_sgn = (__x < _Tp(0) ? _Tp(1) + : ((__n % 2 == 1) ? -_Tp(1) : _Tp(1))); + + _Tp __tc = _Tp(1); + const _Tp __ax = std::abs(__x); + for (unsigned int __k = 1; __k <= __n; ++__k) + __tc *= (__ax / __k); + + _Tp __term = __tc * __tc_sgn; + _Tp __sum = __term; + for (int __k = int(__n) - 1; __k >= 0; --__k) + { + __term *= ((__b + _Tp(__k)) / _Tp(int(__n) - __k)) + * _Tp(__k + 1) / __mx; + __sum += __term; + } + + return __sum; + } +# 185 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + _Tp + __poly_laguerre_recursion(unsigned int __n, _Tpa __alpha1, _Tp __x) + { + + _Tp __l_0 = _Tp(1); + if (__n == 0) + return __l_0; + + + _Tp __l_1 = -__x + _Tp(1) + _Tp(__alpha1); + if (__n == 1) + return __l_1; + + + _Tp __l_n2 = __l_0; + _Tp __l_n1 = __l_1; + _Tp __l_n = _Tp(0); + for (unsigned int __nn = 2; __nn <= __n; ++__nn) + { + __l_n = (_Tp(2 * __nn - 1) + _Tp(__alpha1) - __x) + * __l_n1 / _Tp(__nn) + - (_Tp(__nn - 1) + _Tp(__alpha1)) * __l_n2 / _Tp(__nn); + __l_n2 = __l_n1; + __l_n1 = __l_n; + } + + return __l_n; + } +# 244 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + _Tp + __poly_laguerre(unsigned int __n, _Tpa __alpha1, _Tp __x) + { + if (__x < _Tp(0)) + std::__throw_domain_error(("Negative argument " "in __poly_laguerre.") + ); + + else if (__isnan(__x)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__n == 0) + return _Tp(1); + else if (__n == 1) + return _Tp(1) + _Tp(__alpha1) - __x; + else if (__x == _Tp(0)) + { + _Tp __prod = _Tp(__alpha1) + _Tp(1); + for (unsigned int __k = 2; __k <= __n; ++__k) + __prod *= (_Tp(__alpha1) + _Tp(__k)) / _Tp(__k); + return __prod; + } + else if (__n > 10000000 && _Tp(__alpha1) > -_Tp(1) + && __x < _Tp(2) * (_Tp(__alpha1) + _Tp(1)) + _Tp(4 * __n)) + return __poly_laguerre_large_n(__n, __alpha1, __x); + else if (_Tp(__alpha1) >= _Tp(0) + || (__x > _Tp(0) && _Tp(__alpha1) < -_Tp(__n + 1))) + return __poly_laguerre_recursion(__n, __alpha1, __x); + else + return __poly_laguerre_hyperg(__n, __alpha1, __x); + } +# 296 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + inline _Tp + __assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x) + { return __poly_laguerre(__n, __m, __x); } +# 316 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/poly_laguerre.tcc" 3 + template + inline _Tp + __laguerre(unsigned int __n, _Tp __x) + { return __poly_laguerre(__n, 0, __x); } + } + + + + + + +} +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 1 3 +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 +namespace std +{ + +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + namespace __detail + { +# 78 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta_sum(_Tp __s) + { + + if (__s < _Tp(1)) + std::__throw_domain_error(("Bad argument in zeta sum.")); + + const unsigned int max_iter = 10000; + _Tp __zeta = _Tp(0); + for (unsigned int __k = 1; __k < max_iter; ++__k) + { + _Tp __term = std::pow(static_cast<_Tp>(__k), -__s); + if (__term < std::numeric_limits<_Tp>::epsilon()) + { + break; + } + __zeta += __term; + } + + return __zeta; + } +# 115 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta_alt(_Tp __s) + { + _Tp __sgn = _Tp(1); + _Tp __zeta = _Tp(0); + for (unsigned int __i = 1; __i < 10000000; ++__i) + { + _Tp __term = __sgn / std::pow(__i, __s); + if (std::abs(__term) < std::numeric_limits<_Tp>::epsilon()) + break; + __zeta += __term; + __sgn *= _Tp(-1); + } + __zeta /= _Tp(1) - std::pow(_Tp(2), _Tp(1) - __s); + + return __zeta; + } +# 157 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta_glob(_Tp __s) + { + _Tp __zeta = _Tp(0); + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + const _Tp __max_bincoeff = std::numeric_limits<_Tp>::max_exponent10 + * std::log(_Tp(10)) - _Tp(1); + + + + if (__s < _Tp(0)) + { + + if (::std::fmod(__s,_Tp(2)) == _Tp(0)) + return _Tp(0); + else + + { + _Tp __zeta = __riemann_zeta_glob(_Tp(1) - __s); + __zeta *= std::pow(_Tp(2) + * __numeric_constants<_Tp>::__pi(), __s) + * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) + + * std::exp(::std::lgamma(_Tp(1) - __s)) + + + + / __numeric_constants<_Tp>::__pi(); + return __zeta; + } + } + + _Tp __num = _Tp(0.5L); + const unsigned int __maxit = 10000; + for (unsigned int __i = 0; __i < __maxit; ++__i) + { + bool __punt = false; + _Tp __sgn = _Tp(1); + _Tp __term = _Tp(0); + for (unsigned int __j = 0; __j <= __i; ++__j) + { + + _Tp __bincoeff = ::std::lgamma(_Tp(1 + __i)) + - ::std::lgamma(_Tp(1 + __j)) + - ::std::lgamma(_Tp(1 + __i - __j)); + + + + + + if (__bincoeff > __max_bincoeff) + { + + __punt = true; + break; + } + __bincoeff = std::exp(__bincoeff); + __term += __sgn * __bincoeff * std::pow(_Tp(1 + __j), -__s); + __sgn *= _Tp(-1); + } + if (__punt) + break; + __term *= __num; + __zeta += __term; + if (std::abs(__term/__zeta) < __eps) + break; + __num *= _Tp(0.5L); + } + + __zeta /= _Tp(1) - std::pow(_Tp(2), _Tp(1) - __s); + + return __zeta; + } +# 252 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta_product(_Tp __s) + { + static const _Tp __prime[] = { + _Tp(2), _Tp(3), _Tp(5), _Tp(7), _Tp(11), _Tp(13), _Tp(17), _Tp(19), + _Tp(23), _Tp(29), _Tp(31), _Tp(37), _Tp(41), _Tp(43), _Tp(47), + _Tp(53), _Tp(59), _Tp(61), _Tp(67), _Tp(71), _Tp(73), _Tp(79), + _Tp(83), _Tp(89), _Tp(97), _Tp(101), _Tp(103), _Tp(107), _Tp(109) + }; + static const unsigned int __num_primes = sizeof(__prime) / sizeof(_Tp); + + _Tp __zeta = _Tp(1); + for (unsigned int __i = 0; __i < __num_primes; ++__i) + { + const _Tp __fact = _Tp(1) - std::pow(__prime[__i], -__s); + __zeta *= __fact; + if (_Tp(1) - __fact < std::numeric_limits<_Tp>::epsilon()) + break; + } + + __zeta = _Tp(1) / __zeta; + + return __zeta; + } +# 293 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __riemann_zeta(_Tp __s) + { + if (__isnan(__s)) + return std::numeric_limits<_Tp>::quiet_NaN(); + else if (__s == _Tp(1)) + return std::numeric_limits<_Tp>::infinity(); + else if (__s < -_Tp(19)) + { + _Tp __zeta = __riemann_zeta_product(_Tp(1) - __s); + __zeta *= std::pow(_Tp(2) * __numeric_constants<_Tp>::__pi(), __s) + * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) + + * std::exp(::std::lgamma(_Tp(1) - __s)) + + + + / __numeric_constants<_Tp>::__pi(); + return __zeta; + } + else if (__s < _Tp(20)) + { + + bool __glob = true; + if (__glob) + return __riemann_zeta_glob(__s); + else + { + if (__s > _Tp(1)) + return __riemann_zeta_sum(__s); + else + { + _Tp __zeta = std::pow(_Tp(2) + * __numeric_constants<_Tp>::__pi(), __s) + * std::sin(__numeric_constants<_Tp>::__pi_2() * __s) + + * ::std::tgamma(_Tp(1) - __s) + + + + * __riemann_zeta_sum(_Tp(1) - __s); + return __zeta; + } + } + } + else + return __riemann_zeta_product(__s); + } +# 365 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + _Tp + __hurwitz_zeta_glob(_Tp __a, _Tp __s) + { + _Tp __zeta = _Tp(0); + + const _Tp __eps = std::numeric_limits<_Tp>::epsilon(); + + const _Tp __max_bincoeff = std::numeric_limits<_Tp>::max_exponent10 + * std::log(_Tp(10)) - _Tp(1); + + const unsigned int __maxit = 10000; + for (unsigned int __i = 0; __i < __maxit; ++__i) + { + bool __punt = false; + _Tp __sgn = _Tp(1); + _Tp __term = _Tp(0); + for (unsigned int __j = 0; __j <= __i; ++__j) + { + + _Tp __bincoeff = ::std::lgamma(_Tp(1 + __i)) + - ::std::lgamma(_Tp(1 + __j)) + - ::std::lgamma(_Tp(1 + __i - __j)); + + + + + + if (__bincoeff > __max_bincoeff) + { + + __punt = true; + break; + } + __bincoeff = std::exp(__bincoeff); + __term += __sgn * __bincoeff * std::pow(_Tp(__a + __j), -__s); + __sgn *= _Tp(-1); + } + if (__punt) + break; + __term /= _Tp(__i + 1); + if (std::abs(__term / __zeta) < __eps) + break; + __zeta += __term; + } + + __zeta /= __s - _Tp(1); + + return __zeta; + } +# 430 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tr1/riemann_zeta.tcc" 3 + template + inline _Tp + __hurwitz_zeta(_Tp __a, _Tp __s) + { return __hurwitz_zeta_glob(__a, __s); } + } + + + + + + +} +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 2 3 + +namespace std +{ + +# 205 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + assoc_laguerref(unsigned int __n, unsigned int __m, float __x) + { return __detail::__assoc_laguerre(__n, __m, __x); } + + + + + + + + inline long double + assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x) + { return __detail::__assoc_laguerre(__n, __m, __x); } +# 250 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__assoc_laguerre<__type>(__n, __m, __x); + } +# 266 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + assoc_legendref(unsigned int __l, unsigned int __m, float __x) + { return __detail::__assoc_legendre_p(__l, __m, __x); } + + + + + + + inline long double + assoc_legendrel(unsigned int __l, unsigned int __m, long double __x) + { return __detail::__assoc_legendre_p(__l, __m, __x); } +# 296 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__assoc_legendre_p<__type>(__l, __m, __x); + } +# 311 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + betaf(float __a, float __b) + { return __detail::__beta(__a, __b); } + + + + + + + + inline long double + betal(long double __a, long double __b) + { return __detail::__beta(__a, __b); } +# 341 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type + beta(_Tpa __a, _Tpb __b) + { + typedef typename __gnu_cxx::__promote_2<_Tpa, _Tpb>::__type __type; + return __detail::__beta<__type>(__a, __b); + } +# 357 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + comp_ellint_1f(float __k) + { return __detail::__comp_ellint_1(__k); } + + + + + + + + inline long double + comp_ellint_1l(long double __k) + { return __detail::__comp_ellint_1(__k); } +# 389 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + comp_ellint_1(_Tp __k) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__comp_ellint_1<__type>(__k); + } +# 405 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + comp_ellint_2f(float __k) + { return __detail::__comp_ellint_2(__k); } + + + + + + + + inline long double + comp_ellint_2l(long double __k) + { return __detail::__comp_ellint_2(__k); } +# 436 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + comp_ellint_2(_Tp __k) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__comp_ellint_2<__type>(__k); + } +# 452 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + comp_ellint_3f(float __k, float __nu) + { return __detail::__comp_ellint_3(__k, __nu); } + + + + + + + + inline long double + comp_ellint_3l(long double __k, long double __nu) + { return __detail::__comp_ellint_3(__k, __nu); } +# 487 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type + comp_ellint_3(_Tp __k, _Tpn __nu) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type; + return __detail::__comp_ellint_3<__type>(__k, __nu); + } +# 503 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + cyl_bessel_if(float __nu, float __x) + { return __detail::__cyl_bessel_i(__nu, __x); } + + + + + + + + inline long double + cyl_bessel_il(long double __nu, long double __x) + { return __detail::__cyl_bessel_i(__nu, __x); } +# 533 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type + cyl_bessel_i(_Tpnu __nu, _Tp __x) + { + typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; + return __detail::__cyl_bessel_i<__type>(__nu, __x); + } +# 549 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + cyl_bessel_jf(float __nu, float __x) + { return __detail::__cyl_bessel_j(__nu, __x); } + + + + + + + + inline long double + cyl_bessel_jl(long double __nu, long double __x) + { return __detail::__cyl_bessel_j(__nu, __x); } +# 579 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type + cyl_bessel_j(_Tpnu __nu, _Tp __x) + { + typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; + return __detail::__cyl_bessel_j<__type>(__nu, __x); + } +# 595 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + cyl_bessel_kf(float __nu, float __x) + { return __detail::__cyl_bessel_k(__nu, __x); } + + + + + + + + inline long double + cyl_bessel_kl(long double __nu, long double __x) + { return __detail::__cyl_bessel_k(__nu, __x); } +# 631 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type + cyl_bessel_k(_Tpnu __nu, _Tp __x) + { + typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; + return __detail::__cyl_bessel_k<__type>(__nu, __x); + } +# 647 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + cyl_neumannf(float __nu, float __x) + { return __detail::__cyl_neumann_n(__nu, __x); } + + + + + + + + inline long double + cyl_neumannl(long double __nu, long double __x) + { return __detail::__cyl_neumann_n(__nu, __x); } +# 679 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type + cyl_neumann(_Tpnu __nu, _Tp __x) + { + typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type; + return __detail::__cyl_neumann_n<__type>(__nu, __x); + } +# 695 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + ellint_1f(float __k, float __phi) + { return __detail::__ellint_1(__k, __phi); } + + + + + + + + inline long double + ellint_1l(long double __k, long double __phi) + { return __detail::__ellint_1(__k, __phi); } +# 727 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type + ellint_1(_Tp __k, _Tpp __phi) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type; + return __detail::__ellint_1<__type>(__k, __phi); + } +# 743 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + ellint_2f(float __k, float __phi) + { return __detail::__ellint_2(__k, __phi); } + + + + + + + + inline long double + ellint_2l(long double __k, long double __phi) + { return __detail::__ellint_2(__k, __phi); } +# 775 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type + ellint_2(_Tp __k, _Tpp __phi) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type; + return __detail::__ellint_2<__type>(__k, __phi); + } +# 791 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + ellint_3f(float __k, float __nu, float __phi) + { return __detail::__ellint_3(__k, __nu, __phi); } + + + + + + + + inline long double + ellint_3l(long double __k, long double __nu, long double __phi) + { return __detail::__ellint_3(__k, __nu, __phi); } +# 828 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type + ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi) + { + typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type; + return __detail::__ellint_3<__type>(__k, __nu, __phi); + } +# 843 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + expintf(float __x) + { return __detail::__expint(__x); } + + + + + + + + inline long double + expintl(long double __x) + { return __detail::__expint(__x); } +# 868 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + expint(_Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__expint<__type>(__x); + } +# 884 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + hermitef(unsigned int __n, float __x) + { return __detail::__poly_hermite(__n, __x); } + + + + + + + + inline long double + hermitel(unsigned int __n, long double __x) + { return __detail::__poly_hermite(__n, __x); } +# 916 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + hermite(unsigned int __n, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__poly_hermite<__type>(__n, __x); + } +# 932 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + laguerref(unsigned int __n, float __x) + { return __detail::__laguerre(__n, __x); } + + + + + + + + inline long double + laguerrel(unsigned int __n, long double __x) + { return __detail::__laguerre(__n, __x); } +# 960 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + laguerre(unsigned int __n, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__laguerre<__type>(__n, __x); + } +# 976 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + legendref(unsigned int __l, float __x) + { return __detail::__poly_legendre_p(__l, __x); } + + + + + + + + inline long double + legendrel(unsigned int __l, long double __x) + { return __detail::__poly_legendre_p(__l, __x); } +# 1005 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + legendre(unsigned int __l, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__poly_legendre_p<__type>(__l, __x); + } +# 1021 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + riemann_zetaf(float __s) + { return __detail::__riemann_zeta(__s); } + + + + + + + + inline long double + riemann_zetal(long double __s) + { return __detail::__riemann_zeta(__s); } +# 1056 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + riemann_zeta(_Tp __s) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__riemann_zeta<__type>(__s); + } +# 1072 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + sph_besself(unsigned int __n, float __x) + { return __detail::__sph_bessel(__n, __x); } + + + + + + + + inline long double + sph_bessell(unsigned int __n, long double __x) + { return __detail::__sph_bessel(__n, __x); } +# 1100 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + sph_bessel(unsigned int __n, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__sph_bessel<__type>(__n, __x); + } +# 1116 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + sph_legendref(unsigned int __l, unsigned int __m, float __theta) + { return __detail::__sph_legendre(__l, __m, __theta); } +# 1127 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline long double + sph_legendrel(unsigned int __l, unsigned int __m, long double __theta) + { return __detail::__sph_legendre(__l, __m, __theta); } +# 1147 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__sph_legendre<__type>(__l, __m, __theta); + } +# 1163 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + inline float + sph_neumannf(unsigned int __n, float __x) + { return __detail::__sph_neumann(__n, __x); } + + + + + + + + inline long double + sph_neumannl(unsigned int __n, long double __x) + { return __detail::__sph_neumann(__n, __x); } +# 1191 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 + template + inline typename __gnu_cxx::__promote<_Tp>::__type + sph_neumann(unsigned int __n, _Tp __x) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __detail::__sph_neumann<__type>(__n, __x); + } + + + + +} +# 1388 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/specfun.h" 3 +#pragma GCC visibility pop +# 1928 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cmath" 2 3 + + +} +# 13 "../../module/sf.cxx" 2 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 1 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 3 + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 1 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 +# 69 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 1 3 +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 +namespace std +{ + + + namespace rel_ops + { +# 85 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 + template + inline bool + operator!=(const _Tp& __x, const _Tp& __y) + { return !(__x == __y); } +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 + template + inline bool + operator>(const _Tp& __x, const _Tp& __y) + { return __y < __x; } +# 111 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 + template + inline bool + operator<=(const _Tp& __x, const _Tp& __y) + { return !(__y < __x); } +# 124 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_relops.h" 3 + template + inline bool + operator>=(const _Tp& __x, const _Tp& __y) + { return !(__x < __y); } + } + + +} +# 70 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 2 3 + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/initializer_list" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/initializer_list" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/initializer_list" 3 + + + + + +#pragma GCC visibility push(default) + + + +namespace std +{ + + template + class initializer_list + { + public: + typedef _E value_type; + typedef const _E& reference; + typedef const _E& const_reference; + typedef size_t size_type; + typedef const _E* iterator; + typedef const _E* const_iterator; + + private: + iterator _M_array; + size_type _M_len; + + + constexpr initializer_list(const_iterator __a, size_type __l) + : _M_array(__a), _M_len(__l) { } + + public: + constexpr initializer_list() noexcept + : _M_array(0), _M_len(0) { } + + + constexpr size_type + size() const noexcept { return _M_len; } + + + constexpr const_iterator + begin() const noexcept { return _M_array; } + + + constexpr const_iterator + end() const noexcept { return begin() + size(); } + }; + + + + + + + + template + constexpr const _Tp* + begin(initializer_list<_Tp> __ils) noexcept + { return __ils.begin(); } + + + + + + + + template + constexpr const _Tp* + end(initializer_list<_Tp> __ils) noexcept + { return __ils.end(); } +} + +#pragma GCC visibility pop +# 77 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 2 3 + + + + + +namespace std +{ + + + + template + struct tuple_size; + + + + + + template::type, + typename = typename enable_if::value>::type, + size_t = tuple_size<_Tp>::value> + using __enable_if_has_tuple_size = _Tp; + + template + struct tuple_size> + : public tuple_size<_Tp> { }; + + template + struct tuple_size> + : public tuple_size<_Tp> { }; + + template + struct tuple_size> + : public tuple_size<_Tp> { }; + + + template + struct tuple_element; + + + template + using __tuple_element_t = typename tuple_element<__i, _Tp>::type; + + template + struct tuple_element<__i, const _Tp> + { + typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; + }; + + template + struct tuple_element<__i, volatile _Tp> + { + typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; + }; + + template + struct tuple_element<__i, const volatile _Tp> + { + typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; + }; + + + + + + + + template + using tuple_element_t = typename tuple_element<__i, _Tp>::type; + + + + + + template + struct __is_tuple_like_impl> : true_type + { }; + + + template + struct tuple_size> + : public integral_constant { }; + + + template + struct tuple_element<0, pair<_Tp1, _Tp2>> + { typedef _Tp1 type; }; + + + template + struct tuple_element<1, pair<_Tp1, _Tp2>> + { typedef _Tp2 type; }; + + template + struct __pair_get; + + template<> + struct __pair_get<0> + { + template + static constexpr _Tp1& + __get(pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.first; } + + template + static constexpr _Tp1&& + __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward<_Tp1>(__pair.first); } + + template + static constexpr const _Tp1& + __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.first; } + + template + static constexpr const _Tp1&& + __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward(__pair.first); } + }; + + template<> + struct __pair_get<1> + { + template + static constexpr _Tp2& + __get(pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.second; } + + template + static constexpr _Tp2&& + __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward<_Tp2>(__pair.second); } + + template + static constexpr const _Tp2& + __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.second; } + + template + static constexpr const _Tp2&& + __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward(__pair.second); } + }; + + template + constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& + get(pair<_Tp1, _Tp2>& __in) noexcept + { return __pair_get<_Int>::__get(__in); } + + template + constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& + get(pair<_Tp1, _Tp2>&& __in) noexcept + { return __pair_get<_Int>::__move_get(std::move(__in)); } + + template + constexpr const typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& + get(const pair<_Tp1, _Tp2>& __in) noexcept + { return __pair_get<_Int>::__const_get(__in); } + + template + constexpr const typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& + get(const pair<_Tp1, _Tp2>&& __in) noexcept + { return __pair_get<_Int>::__const_move_get(std::move(__in)); } + + + + + + template + constexpr _Tp& + get(pair<_Tp, _Up>& __p) noexcept + { return __p.first; } + + template + constexpr const _Tp& + get(const pair<_Tp, _Up>& __p) noexcept + { return __p.first; } + + template + constexpr _Tp&& + get(pair<_Tp, _Up>&& __p) noexcept + { return std::move(__p.first); } + + template + constexpr const _Tp&& + get(const pair<_Tp, _Up>&& __p) noexcept + { return std::move(__p.first); } + + template + constexpr _Tp& + get(pair<_Up, _Tp>& __p) noexcept + { return __p.second; } + + template + constexpr const _Tp& + get(const pair<_Up, _Tp>& __p) noexcept + { return __p.second; } + + template + constexpr _Tp&& + get(pair<_Up, _Tp>&& __p) noexcept + { return std::move(__p.second); } + + template + constexpr const _Tp&& + get(const pair<_Up, _Tp>&& __p) noexcept + { return std::move(__p.second); } + + + + + template + constexpr + inline _Tp + exchange(_Tp& __obj, _Up&& __new_val) + { return std::__exchange(__obj, std::forward<_Up>(__new_val)); } + + + + + + template struct _Index_tuple { }; + + + template + struct _Build_index_tuple + { +# 312 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 + using __type = _Index_tuple<__integer_pack(_Num)...>; + + }; + + + + + + + template + struct integer_sequence + { + typedef _Tp value_type; + static constexpr size_t size() noexcept { return sizeof...(_Idx); } + }; + + + template + using make_integer_sequence + + + + = integer_sequence<_Tp, __integer_pack(_Num)...>; + + + + template + using index_sequence = integer_sequence; + + + template + using make_index_sequence = make_integer_sequence; + + + template + using index_sequence_for = make_index_sequence; + + + + + struct in_place_t { + explicit in_place_t() = default; + }; + + inline constexpr in_place_t in_place{}; + + template struct in_place_type_t + { + explicit in_place_type_t() = default; + }; + + template + inline constexpr in_place_type_t<_Tp> in_place_type{}; + + template struct in_place_index_t + { + explicit in_place_index_t() = default; + }; + + template + inline constexpr in_place_index_t<_Idx> in_place_index{}; + + template + struct __is_in_place_type_impl : false_type + { }; + + template + struct __is_in_place_type_impl> : true_type + { }; + + template + struct __is_in_place_type + : public __is_in_place_type_impl<_Tp> + { }; + + + template + [[nodiscard]] + constexpr add_const_t<_Tp>& + as_const(_Tp& __t) noexcept + { return __t; } + + template + void as_const(const _Tp&&) = delete; + + + + + template + constexpr bool + cmp_equal(_Tp __t, _Up __u) noexcept + { + static_assert(__is_standard_integer<_Tp>::value); + static_assert(__is_standard_integer<_Up>::value); + + if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>) + return __t == __u; + else if constexpr (is_signed_v<_Tp>) + return __t >= 0 && make_unsigned_t<_Tp>(__t) == __u; + else + return __u >= 0 && __t == make_unsigned_t<_Up>(__u); + } + + template + constexpr bool + cmp_not_equal(_Tp __t, _Up __u) noexcept + { return !std::cmp_equal(__t, __u); } + + template + constexpr bool + cmp_less(_Tp __t, _Up __u) noexcept + { + static_assert(__is_standard_integer<_Tp>::value); + static_assert(__is_standard_integer<_Up>::value); + + if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>) + return __t < __u; + else if constexpr (is_signed_v<_Tp>) + return __t < 0 || make_unsigned_t<_Tp>(__t) < __u; + else + return __u >= 0 && __t < make_unsigned_t<_Up>(__u); + } + + template + constexpr bool + cmp_greater(_Tp __t, _Up __u) noexcept + { return std::cmp_less(__u, __t); } + + template + constexpr bool + cmp_less_equal(_Tp __t, _Up __u) noexcept + { return !std::cmp_less(__u, __t); } + + template + constexpr bool + cmp_greater_equal(_Tp __t, _Up __u) noexcept + { return !std::cmp_less(__t, __u); } + + template + constexpr bool + in_range(_Tp __t) noexcept + { + static_assert(__is_standard_integer<_Up>::value); + static_assert(__is_standard_integer<_Tp>::value); + using __gnu_cxx::__int_traits; + + if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>) + return __int_traits<_Up>::__min <= __t + && __t <= __int_traits<_Up>::__max; + else if constexpr (is_signed_v<_Tp>) + return __t >= 0 + && make_unsigned_t<_Tp>(__t) <= __int_traits<_Up>::__max; + else + return __t <= make_unsigned_t<_Up>(__int_traits<_Up>::__max); + } +# 480 "D:/compilers/msys64/mingw64/include/c++/11.2.0/utility" 3 + +} +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 1 3 +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +# 121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +extern "C++" +{ +namespace std +{ + + + using ::div_t; + using ::ldiv_t; + + using ::abort; + + + + using ::atexit; + + + + + + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + + using ::qsort; + + + + + + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + + using ::wcstombs; + using ::wctomb; + + + + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } + + + + +} +# 195 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +namespace __gnu_cxx +{ + + + + using ::lldiv_t; + + + + + + using ::_Exit; + + + + using ::llabs; + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + using ::lldiv; +# 227 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 + using ::atoll; + using ::strtoll; + using ::strtoull; + + using ::strtof; + using ::strtold; + + +} + +namespace std +{ + + using ::__gnu_cxx::lldiv_t; + + using ::__gnu_cxx::_Exit; + + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; +} + + + +} +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 +namespace std +{ + +# 199 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 + template + constexpr + bool + all_of(_IIter, _IIter, _Predicate); + + template + constexpr + bool + any_of(_IIter, _IIter, _Predicate); + + + template + constexpr + bool + binary_search(_FIter, _FIter, const _Tp&); + + template + constexpr + bool + binary_search(_FIter, _FIter, const _Tp&, _Compare); + + + template + constexpr + const _Tp& + clamp(const _Tp&, const _Tp&, const _Tp&); + + template + constexpr + const _Tp& + clamp(const _Tp&, const _Tp&, const _Tp&, _Compare); + + + template + constexpr + _OIter + copy(_IIter, _IIter, _OIter); + + template + constexpr + _BIter2 + copy_backward(_BIter1, _BIter1, _BIter2); + + + template + constexpr + _OIter + copy_if(_IIter, _IIter, _OIter, _Predicate); + + template + constexpr + _OIter + copy_n(_IIter, _Size, _OIter); + + + + + + template + constexpr + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&); + + template + constexpr + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&, _Compare); + + template + constexpr + void + fill(_FIter, _FIter, const _Tp&); + + template + constexpr + _OIter + fill_n(_OIter, _Size, const _Tp&); + + + + template + constexpr + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2); + + template + constexpr + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + + + + + template + constexpr + _IIter + find_if_not(_IIter, _IIter, _Predicate); + + + + + + + template + constexpr + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2); + + template + constexpr + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + + template + void + inplace_merge(_BIter, _BIter, _BIter); + + template + void + inplace_merge(_BIter, _BIter, _BIter, _Compare); + + + template + constexpr + bool + is_heap(_RAIter, _RAIter); + + template + constexpr + bool + is_heap(_RAIter, _RAIter, _Compare); + + template + constexpr + _RAIter + is_heap_until(_RAIter, _RAIter); + + template + constexpr + _RAIter + is_heap_until(_RAIter, _RAIter, _Compare); + + template + constexpr + bool + is_partitioned(_IIter, _IIter, _Predicate); + + template + constexpr + bool + is_permutation(_FIter1, _FIter1, _FIter2); + + template + constexpr + bool + is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); + + template + constexpr + bool + is_sorted(_FIter, _FIter); + + template + constexpr + bool + is_sorted(_FIter, _FIter, _Compare); + + template + constexpr + _FIter + is_sorted_until(_FIter, _FIter); + + template + constexpr + _FIter + is_sorted_until(_FIter, _FIter, _Compare); + + + template + constexpr + void + iter_swap(_FIter1, _FIter2); + + template + constexpr + _FIter + lower_bound(_FIter, _FIter, const _Tp&); + + template + constexpr + _FIter + lower_bound(_FIter, _FIter, const _Tp&, _Compare); + + template + constexpr + void + make_heap(_RAIter, _RAIter); + + template + constexpr + void + make_heap(_RAIter, _RAIter, _Compare); + + template + constexpr + const _Tp& + max(const _Tp&, const _Tp&); + + template + constexpr + const _Tp& + max(const _Tp&, const _Tp&, _Compare); + + + + + template + constexpr + const _Tp& + min(const _Tp&, const _Tp&); + + template + constexpr + const _Tp& + min(const _Tp&, const _Tp&, _Compare); + + + + + template + constexpr + pair + minmax(const _Tp&, const _Tp&); + + template + constexpr + pair + minmax(const _Tp&, const _Tp&, _Compare); + + template + constexpr + pair<_FIter, _FIter> + minmax_element(_FIter, _FIter); + + template + constexpr + pair<_FIter, _FIter> + minmax_element(_FIter, _FIter, _Compare); + + template + constexpr + _Tp + min(initializer_list<_Tp>); + + template + constexpr + _Tp + min(initializer_list<_Tp>, _Compare); + + template + constexpr + _Tp + max(initializer_list<_Tp>); + + template + constexpr + _Tp + max(initializer_list<_Tp>, _Compare); + + template + constexpr + pair<_Tp, _Tp> + minmax(initializer_list<_Tp>); + + template + constexpr + pair<_Tp, _Tp> + minmax(initializer_list<_Tp>, _Compare); + + + + + template + constexpr + bool + next_permutation(_BIter, _BIter); + + template + constexpr + bool + next_permutation(_BIter, _BIter, _Compare); + + + template + constexpr + bool + none_of(_IIter, _IIter, _Predicate); + + + + + + template + constexpr + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); + + template + constexpr + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); + + + + + template + constexpr + pair<_OIter1, _OIter2> + partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); + + template + constexpr + _FIter + partition_point(_FIter, _FIter, _Predicate); + + + template + constexpr + void + pop_heap(_RAIter, _RAIter); + + template + constexpr + void + pop_heap(_RAIter, _RAIter, _Compare); + + template + constexpr + bool + prev_permutation(_BIter, _BIter); + + template + constexpr + bool + prev_permutation(_BIter, _BIter, _Compare); + + template + constexpr + void + push_heap(_RAIter, _RAIter); + + template + constexpr + void + push_heap(_RAIter, _RAIter, _Compare); + + + + template + constexpr + _FIter + remove(_FIter, _FIter, const _Tp&); + + template + constexpr + _FIter + remove_if(_FIter, _FIter, _Predicate); + + template + constexpr + _OIter + remove_copy(_IIter, _IIter, _OIter, const _Tp&); + + template + constexpr + _OIter + remove_copy_if(_IIter, _IIter, _OIter, _Predicate); + + + + template + constexpr + _OIter + replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); + + template + constexpr + _OIter + replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); + + + + template + constexpr + void + reverse(_BIter, _BIter); + + template + constexpr + _OIter + reverse_copy(_BIter, _BIter, _OIter); + + inline namespace _V2 + { + template + constexpr + _FIter + rotate(_FIter, _FIter, _FIter); + } + + template + constexpr + _OIter + rotate_copy(_FIter, _FIter, _FIter, _OIter); +# 625 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 + template + void + shuffle(_RAIter, _RAIter, _UGenerator&&); + + + template + constexpr + void + sort_heap(_RAIter, _RAIter); + + template + constexpr + void + sort_heap(_RAIter, _RAIter, _Compare); + + template + _BIter + stable_partition(_BIter, _BIter, _Predicate); +# 658 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/algorithmfwd.h" 3 + template + constexpr + _FIter2 + swap_ranges(_FIter1, _FIter1, _FIter2); + + + + template + constexpr + _FIter + unique(_FIter, _FIter); + + template + constexpr + _FIter + unique(_FIter, _FIter, _BinaryPredicate); + + + + template + constexpr + _FIter + upper_bound(_FIter, _FIter, const _Tp&); + + template + constexpr + _FIter + upper_bound(_FIter, _FIter, const _Tp&, _Compare); + + + + template + constexpr + _FIter + adjacent_find(_FIter, _FIter); + + template + constexpr + _FIter + adjacent_find(_FIter, _FIter, _BinaryPredicate); + + template + constexpr + typename iterator_traits<_IIter>::difference_type + count(_IIter, _IIter, const _Tp&); + + template + constexpr + typename iterator_traits<_IIter>::difference_type + count_if(_IIter, _IIter, _Predicate); + + template + constexpr + bool + equal(_IIter1, _IIter1, _IIter2); + + template + constexpr + bool + equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + + template + constexpr + _IIter + find(_IIter, _IIter, const _Tp&); + + template + constexpr + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); + + template + constexpr + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + template + constexpr + _IIter + find_if(_IIter, _IIter, _Predicate); + + template + constexpr + _Funct + for_each(_IIter, _IIter, _Funct); + + template + constexpr + void + generate(_FIter, _FIter, _Generator); + + template + constexpr + _OIter + generate_n(_OIter, _Size, _Generator); + + template + constexpr + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); + + template + constexpr + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + + template + constexpr + _FIter + max_element(_FIter, _FIter); + + template + constexpr + _FIter + max_element(_FIter, _FIter, _Compare); + + template + constexpr + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + constexpr + _FIter + min_element(_FIter, _FIter); + + template + constexpr + _FIter + min_element(_FIter, _FIter, _Compare); + + template + constexpr + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2); + + template + constexpr + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + + template + constexpr + void + nth_element(_RAIter, _RAIter, _RAIter); + + template + constexpr + void + nth_element(_RAIter, _RAIter, _RAIter, _Compare); + + template + constexpr + void + partial_sort(_RAIter, _RAIter, _RAIter); + + template + constexpr + void + partial_sort(_RAIter, _RAIter, _RAIter, _Compare); + + template + constexpr + _BIter + partition(_BIter, _BIter, _Predicate); + + template + void + random_shuffle(_RAIter, _RAIter); + + template + void + random_shuffle(_RAIter, _RAIter, + + _Generator&&); + + + + + template + constexpr + void + replace(_FIter, _FIter, const _Tp&, const _Tp&); + + template + constexpr + void + replace_if(_FIter, _FIter, _Predicate, const _Tp&); + + template + constexpr + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2); + + template + constexpr + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + template + constexpr + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&); + + template + constexpr + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); + + template + constexpr + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + constexpr + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + constexpr + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + _OIter, _Compare); + + template + constexpr + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + constexpr + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + constexpr + void + sort(_RAIter, _RAIter); + + template + constexpr + void + sort(_RAIter, _RAIter, _Compare); + + template + void + stable_sort(_RAIter, _RAIter); + + template + void + stable_sort(_RAIter, _RAIter, _Compare); + + template + constexpr + _OIter + transform(_IIter, _IIter, _OIter, _UnaryOperation); + + template + constexpr + _OIter + transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); + + template + constexpr + _OIter + unique_copy(_IIter, _IIter, _OIter); + + template + constexpr + _OIter + unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); + + + +} +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 +namespace std +{ + + + + + + + + template + constexpr + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n, + _Compare& __comp) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__comp(__first + __parent, __first + __child)) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + + + + template + constexpr + inline bool + __is_heap(_RandomAccessIterator __first, _Distance __n) + { + __gnu_cxx::__ops::_Iter_less_iter __comp; + return std::__is_heap_until(__first, __n, __comp) == __n; + } + + template + constexpr + inline bool + __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) + { + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + return std::__is_heap_until(__first, __n, __cmp) == __n; + } + + template + constexpr + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::__is_heap(__first, std::distance(__first, __last)); } + + template + constexpr + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + return std::__is_heap(__first, std::move(__comp), + std::distance(__first, __last)); + } + + + + + template + constexpr + void + __push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value, + _Compare& __comp) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) + { + *(__first + __holeIndex) = std::move(*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = std::move(__value); + } +# 158 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + ; + ; + + __gnu_cxx::__ops::_Iter_less_val __comp; + _ValueType __value = std::move(*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), std::move(__value), __comp); + } +# 194 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + ; + ; + + __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) + __cmp(std::move(__comp)); + _ValueType __value = std::move(*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), std::move(__value), __cmp); + } + + template + constexpr + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (__comp(__first + __secondChild, + __first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = std::move(*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) + __cmp(std::move(__comp)); + std::__push_heap(__first, __holeIndex, __topIndex, + std::move(__value), __cmp); + } + + template + constexpr + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Compare& __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + _ValueType __value = std::move(*__result); + *__result = std::move(*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + std::move(__value), __comp); + } +# 279 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + ; + ; + + if (__last - __first > 1) + { + --__last; + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__pop_heap(__first, __last, __last, __comp); + } + } +# 313 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + + + + ; + ; + ; + ; + + if (__last - __first > 1) + { + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + --__last; + std::__pop_heap(__first, __last, __last, __cmp); + } + } + + template + constexpr + void + __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare& __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + if (__last - __first < 2) + return; + + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = std::move(*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, std::move(__value), + __comp); + if (__parent == 0) + return; + __parent--; + } + } +# 371 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__make_heap(__first, __last, __comp); + } +# 398 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + std::__make_heap(__first, __last, __cmp); + } + + template + constexpr + void + __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare& __comp) + { + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + } +# 436 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + ; + + __gnu_cxx::__ops::_Iter_less_iter __comp; + std::__sort_heap(__first, __last, __comp); + } +# 464 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + ; + + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + std::__sort_heap(__first, __last, __cmp); + } +# 493 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline _RandomAccessIterator + is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + __gnu_cxx::__ops::_Iter_less_iter __comp; + return __first + + std::__is_heap_until(__first, std::distance(__first, __last), __comp); + } +# 522 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline _RandomAccessIterator + is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + return __first + + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); + } +# 547 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline bool + is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::is_heap_until(__first, __last) == __last; } +# 561 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_heap.h" 3 + template + constexpr + inline bool + is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + const auto __dist = std::distance(__first, __last); + typedef __decltype(__comp) _Cmp; + __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); + return std::__is_heap_until(__first, __dist, __cmp) == __dist; + } + + + +} +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 1 3 +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_construct.h" 1 3 +# 73 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_construct.h" 3 +namespace std +{ + + + + template + constexpr inline void + destroy_at(_Tp* __location) + { + if constexpr (202002L > 201703L && is_array_v<_Tp>) + { + for (auto& __x : *__location) + std::destroy_at(std::__addressof(__x)); + } + else + __location->~_Tp(); + } + + + template + constexpr auto + construct_at(_Tp* __location, _Args&&... __args) + noexcept(noexcept(::new((void*)0) _Tp(std::declval<_Args>()...))) + -> decltype(::new((void*)0) _Tp(std::declval<_Args>()...)) + { return ::new((void*)__location) _Tp(std::forward<_Args>(__args)...); } +# 106 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_construct.h" 3 + template + inline void + _Construct(_Tp* __p, _Args&&... __args) + { ::new(static_cast(__p)) _Tp(std::forward<_Args>(__args)...); } +# 121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_construct.h" 3 + template + inline void + _Construct_novalue(_T1* __p) + { ::new(static_cast(__p)) _T1; } + + template + constexpr void + _Destroy(_ForwardIterator __first, _ForwardIterator __last); + + + + + template + constexpr inline void + _Destroy(_Tp* __pointer) + { + + std::destroy_at(__pointer); + + + + } + + template + struct _Destroy_aux + { + template + static constexpr void + __destroy(_ForwardIterator __first, _ForwardIterator __last) + { + for (; __first != __last; ++__first) + std::_Destroy(std::__addressof(*__first)); + } + }; + + template<> + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator, _ForwardIterator) { } + }; + + + + + + + template + constexpr inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + + + static_assert(is_destructible<_Value_type>::value, + "value type is destructible"); + + + if (std::is_constant_evaluated()) + return _Destroy_aux::__destroy(__first, __last); + + std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: + __destroy(__first, __last); + } + + template + struct _Destroy_n_aux + { + template + static constexpr _ForwardIterator + __destroy_n(_ForwardIterator __first, _Size __count) + { + for (; __count > 0; (void)++__first, --__count) + std::_Destroy(std::__addressof(*__first)); + return __first; + } + }; + + template<> + struct _Destroy_n_aux + { + template + static _ForwardIterator + __destroy_n(_ForwardIterator __first, _Size __count) + { + std::advance(__first, __count); + return __first; + } + }; + + + + + + + template + constexpr inline _ForwardIterator + _Destroy_n(_ForwardIterator __first, _Size __count) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + + + static_assert(is_destructible<_Value_type>::value, + "value type is destructible"); + + + if (std::is_constant_evaluated()) + return _Destroy_n_aux::__destroy_n(__first, __count); + + return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: + __destroy_n(__first, __count); + } + + + template + constexpr inline void + destroy(_ForwardIterator __first, _ForwardIterator __last) + { + std::_Destroy(__first, __last); + } + + template + constexpr inline _ForwardIterator + destroy_n(_ForwardIterator __first, _Size __count) + { + return std::_Destroy_n(__first, __count); + } + + + +} +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 2 3 + +namespace std +{ + + + namespace __detail + { + template + inline void + __return_temporary_buffer(_Tp* __p, + size_t __len __attribute__((__unused__))) + { + + ::operator delete(__p, __len * sizeof(_Tp)); + + + + } + } +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 3 + template + pair<_Tp*, ptrdiff_t> + get_temporary_buffer(ptrdiff_t __len) noexcept + { + const ptrdiff_t __max = + __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + if (__len > __max) + __len = __max; + + while (__len > 0) + { + _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), + std::nothrow)); + if (__tmp != 0) + return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len = __len == 1 ? 0 : ((__len + 1) / 2); + } + return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); + } +# 125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 3 + template + inline void + return_temporary_buffer(_Tp* __p) + { ::operator delete(__p); } + + + + + + + template + class _Temporary_buffer + { + + + + public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef pointer iterator; + typedef ptrdiff_t size_type; + + protected: + size_type _M_original_len; + size_type _M_len; + pointer _M_buffer; + + public: + + size_type + size() const + { return _M_len; } + + + size_type + requested_size() const + { return _M_original_len; } + + + iterator + begin() + { return _M_buffer; } + + + iterator + end() + { return _M_buffer + _M_len; } + + + + + + _Temporary_buffer(_ForwardIterator __seed, size_type __original_len); + + ~_Temporary_buffer() + { + std::_Destroy(_M_buffer, _M_buffer + _M_len); + std::__detail::__return_temporary_buffer(_M_buffer, _M_len); + } + + private: + + _Temporary_buffer(const _Temporary_buffer&); + + void + operator=(const _Temporary_buffer&); + }; + + + template + struct __uninitialized_construct_buf_dispatch + { + template + static void + __ucr(_Pointer __first, _Pointer __last, + _ForwardIterator __seed) + { + if (__first == __last) + return; + + _Pointer __cur = __first; + try + { + std::_Construct(std::__addressof(*__first), + std::move(*__seed)); + _Pointer __prev = __cur; + ++__cur; + for(; __cur != __last; ++__cur, ++__prev) + std::_Construct(std::__addressof(*__cur), + std::move(*__prev)); + *__seed = std::move(*__prev); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_construct_buf_dispatch + { + template + static void + __ucr(_Pointer, _Pointer, _ForwardIterator) { } + }; +# 243 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_tempbuf.h" 3 + template + inline void + __uninitialized_construct_buf(_Pointer __first, _Pointer __last, + _ForwardIterator __seed) + { + typedef typename std::iterator_traits<_Pointer>::value_type + _ValueType; + + std::__uninitialized_construct_buf_dispatch< + __has_trivial_constructor(_ValueType)>:: + __ucr(__first, __last, __seed); + } + + template + _Temporary_buffer<_ForwardIterator, _Tp>:: + _Temporary_buffer(_ForwardIterator __seed, size_type __original_len) + : _M_original_len(__original_len), _M_len(0), _M_buffer(0) + { + std::pair __p( + std::get_temporary_buffer(_M_original_len)); + + if (__p.first) + { + try + { + std::__uninitialized_construct_buf(__p.first, __p.first + __p.second, + __seed); + _M_buffer = __p.first; + _M_len = __p.second; + } + catch(...) + { + std::__detail::__return_temporary_buffer(__p.first, __p.second); + throw; + } + } + } + + +} +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uniform_int_dist.h" 1 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uniform_int_dist.h" 3 +namespace std +{ + + + + + template + concept uniform_random_bit_generator + = invocable<_Gen&> && unsigned_integral> + && requires + { + { _Gen::min() } -> same_as>; + { _Gen::max() } -> same_as>; + requires bool_constant<(_Gen::min() < _Gen::max())>::value; + }; + + + namespace __detail + { + + + + template + constexpr bool + _Power_of_2(_Tp __x) + { + return ((__x - 1) & __x) == 0; + } + } + + + + + + + template + class uniform_int_distribution + { + static_assert(std::is_integral<_IntType>::value, + "template argument must be an integral type"); + + public: + + typedef _IntType result_type; + + struct param_type + { + typedef uniform_int_distribution<_IntType> distribution_type; + + param_type() : param_type(0) { } + + explicit + param_type(_IntType __a, + _IntType __b = __gnu_cxx::__int_traits<_IntType>::__max) + : _M_a(__a), _M_b(__b) + { + do { if (__builtin_is_constant_evaluated() && !bool(_M_a <= _M_b)) __builtin_unreachable(); } while (false); + } + + result_type + a() const + { return _M_a; } + + result_type + b() const + { return _M_b; } + + friend bool + operator==(const param_type& __p1, const param_type& __p2) + { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } + + friend bool + operator!=(const param_type& __p1, const param_type& __p2) + { return !(__p1 == __p2); } + + private: + _IntType _M_a; + _IntType _M_b; + }; + + public: + + + + uniform_int_distribution() : uniform_int_distribution(0) { } + + + + + explicit + uniform_int_distribution(_IntType __a, + _IntType __b + = __gnu_cxx::__int_traits<_IntType>::__max) + : _M_param(__a, __b) + { } + + explicit + uniform_int_distribution(const param_type& __p) + : _M_param(__p) + { } + + + + + + + void + reset() { } + + result_type + a() const + { return _M_param.a(); } + + result_type + b() const + { return _M_param.b(); } + + + + + param_type + param() const + { return _M_param; } + + + + + + void + param(const param_type& __param) + { _M_param = __param; } + + + + + result_type + min() const + { return this->a(); } + + + + + result_type + max() const + { return this->b(); } + + + + + template + result_type + operator()(_UniformRandomBitGenerator& __urng) + { return this->operator()(__urng, _M_param); } + + template + result_type + operator()(_UniformRandomBitGenerator& __urng, + const param_type& __p); + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomBitGenerator& __urng) + { this->__generate(__f, __t, __urng, _M_param); } + + template + void + __generate(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomBitGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + template + void + __generate(result_type* __f, result_type* __t, + _UniformRandomBitGenerator& __urng, + const param_type& __p) + { this->__generate_impl(__f, __t, __urng, __p); } + + + + + + friend bool + operator==(const uniform_int_distribution& __d1, + const uniform_int_distribution& __d2) + { return __d1._M_param == __d2._M_param; } + + private: + template + void + __generate_impl(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomBitGenerator& __urng, + const param_type& __p); + + param_type _M_param; + + + + + template + static _Up + _S_nd(_Urbg& __g, _Up __range) + { + using _Up_traits = __gnu_cxx::__int_traits<_Up>; + using _Wp_traits = __gnu_cxx::__int_traits<_Wp>; + static_assert(!_Up_traits::__is_signed, "U must be unsigned"); + static_assert(!_Wp_traits::__is_signed, "W must be unsigned"); + static_assert(_Wp_traits::__digits == (2 * _Up_traits::__digits), + "W must be twice as wide as U"); + + + + + _Wp __product = _Wp(__g()) * _Wp(__range); + _Up __low = _Up(__product); + if (__low < __range) + { + _Up __threshold = -__range % __range; + while (__low < __threshold) + { + __product = _Wp(__g()) * _Wp(__range); + __low = _Up(__product); + } + } + return __product >> _Up_traits::__digits; + } + }; + + template + template + typename uniform_int_distribution<_IntType>::result_type + uniform_int_distribution<_IntType>:: + operator()(_UniformRandomBitGenerator& __urng, + const param_type& __param) + { + typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; + typedef typename make_unsigned::type __utype; + typedef typename common_type<_Gresult_type, __utype>::type __uctype; + + constexpr __uctype __urngmin = _UniformRandomBitGenerator::min(); + constexpr __uctype __urngmax = _UniformRandomBitGenerator::max(); + static_assert( __urngmin < __urngmax, + "Uniform random bit generator must define min() < max()"); + constexpr __uctype __urngrange = __urngmax - __urngmin; + + const __uctype __urange + = __uctype(__param.b()) - __uctype(__param.a()); + + __uctype __ret; + if (__urngrange > __urange) + { + + + const __uctype __uerange = __urange + 1; + + + + if constexpr (__urngrange == 0xffffffffffffffffULL) + { + + + long long unsigned int __u64erange = __uerange; + __ret = _S_nd(__urng, __u64erange); + } + else + + if constexpr (__urngrange == 0xffffffffU) + { + + + unsigned int __u32erange = __uerange; + __ret = _S_nd(__urng, __u32erange); + } + else + + { + + const __uctype __scaling = __urngrange / __uerange; + const __uctype __past = __uerange * __scaling; + do + __ret = __uctype(__urng()) - __urngmin; + while (__ret >= __past); + __ret /= __scaling; + } + } + else if (__urngrange < __urange) + { +# 347 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uniform_int_dist.h" 3 + __uctype __tmp; + do + { + const __uctype __uerngrange = __urngrange + 1; + __tmp = (__uerngrange * operator() + (__urng, param_type(0, __urange / __uerngrange))); + __ret = __tmp + (__uctype(__urng()) - __urngmin); + } + while (__ret > __urange || __ret < __tmp); + } + else + __ret = __uctype(__urng()) - __urngmin; + + return __ret + __param.a(); + } + + + template + template + void + uniform_int_distribution<_IntType>:: + __generate_impl(_ForwardIterator __f, _ForwardIterator __t, + _UniformRandomBitGenerator& __urng, + const param_type& __param) + { + + typedef typename _UniformRandomBitGenerator::result_type _Gresult_type; + typedef typename make_unsigned::type __utype; + typedef typename common_type<_Gresult_type, __utype>::type __uctype; + + static_assert( __urng.min() < __urng.max(), + "Uniform random bit generator must define min() < max()"); + + constexpr __uctype __urngmin = __urng.min(); + constexpr __uctype __urngmax = __urng.max(); + constexpr __uctype __urngrange = __urngmax - __urngmin; + const __uctype __urange + = __uctype(__param.b()) - __uctype(__param.a()); + + __uctype __ret; + + if (__urngrange > __urange) + { + if (__detail::_Power_of_2(__urngrange + 1) + && __detail::_Power_of_2(__urange + 1)) + { + while (__f != __t) + { + __ret = __uctype(__urng()) - __urngmin; + *__f++ = (__ret & __urange) + __param.a(); + } + } + else + { + + const __uctype __uerange = __urange + 1; + const __uctype __scaling = __urngrange / __uerange; + const __uctype __past = __uerange * __scaling; + while (__f != __t) + { + do + __ret = __uctype(__urng()) - __urngmin; + while (__ret >= __past); + *__f++ = __ret / __scaling + __param.a(); + } + } + } + else if (__urngrange < __urange) + { +# 432 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uniform_int_dist.h" 3 + __uctype __tmp; + while (__f != __t) + { + do + { + constexpr __uctype __uerngrange = __urngrange + 1; + __tmp = (__uerngrange * operator() + (__urng, param_type(0, __urange / __uerngrange))); + __ret = __tmp + (__uctype(__urng()) - __urngmin); + } + while (__ret > __urange || __ret < __tmp); + *__f++ = __ret; + } + } + else + while (__f != __t) + *__f++ = __uctype(__urng()) - __urngmin + __param.a(); + } + + + + +} +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 2 3 + + + + +namespace std +{ + + + + template + constexpr + void + __move_median_to_first(_Iterator __result,_Iterator __a, _Iterator __b, + _Iterator __c, _Compare __comp) + { + if (__comp(__a, __b)) + { + if (__comp(__b, __c)) + std::iter_swap(__result, __b); + else if (__comp(__a, __c)) + std::iter_swap(__result, __c); + else + std::iter_swap(__result, __a); + } + else if (__comp(__a, __c)) + std::iter_swap(__result, __a); + else if (__comp(__b, __c)) + std::iter_swap(__result, __c); + else + std::iter_swap(__result, __b); + } + + + template + constexpr + inline _InputIterator + __find_if_not(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + return std::__find_if(__first, __last, + __gnu_cxx::__ops::__negate(__pred), + std::__iterator_category(__first)); + } + + + + + template + constexpr + _InputIterator + __find_if_not_n(_InputIterator __first, _Distance& __len, _Predicate __pred) + { + for (; __len; --__len, (void) ++__first) + if (!__pred(__first)) + break; + return __first; + } +# 138 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _ForwardIterator1 + __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + return std::__find_if(__first1, __last1, + __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); + + + _ForwardIterator1 __current = __first1; + + for (;;) + { + __first1 = + std::__find_if(__first1, __last1, + __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); + + if (__first1 == __last1) + return __last1; + + _ForwardIterator2 __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + + while (__predicate(__current, __p)) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } + + + + + + + template + constexpr + _ForwardIterator + __search_n_aux(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, _UnaryPredicate __unary_pred, + std::forward_iterator_tag) + { + __first = std::__find_if(__first, __last, __unary_pred); + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && __unary_pred(__i)) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = std::__find_if(++__i, __last, __unary_pred); + } + return __last; + } + + + + + + template + constexpr + _RandomAccessIter + __search_n_aux(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, _UnaryPredicate __unary_pred, + std::random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + + _DistanceType __tailSize = __last - __first; + _DistanceType __remainder = __count; + + while (__remainder <= __tailSize) + { + __first += __remainder; + __tailSize -= __remainder; + + + _RandomAccessIter __backTrack = __first; + while (__unary_pred(--__backTrack)) + { + if (--__remainder == 0) + return (__first - __count); + } + __remainder = __count + 1 - (__first - __backTrack); + } + return __last; + } + + template + constexpr + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, + _UnaryPredicate __unary_pred) + { + if (__count <= 0) + return __first; + + if (__count == 1) + return std::__find_if(__first, __last, __unary_pred); + + return std::__search_n_aux(__first, __last, __count, __unary_pred, + std::__iterator_category(__first)); + } + + + template + constexpr + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag, + _BinaryPredicate __comp) + { + if (__first2 == __last2) + return __last1; + + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::__search(__first1, __last1, __first2, __last2, __comp); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + + + template + constexpr + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag, + _BinaryPredicate __comp) + { + + + + + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::__search(_RevIterator1(__last1), __rlast1, + _RevIterator2(__last2), __rlast2, + __comp); + + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } +# 364 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + + + + ; + ; + + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 413 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __comp) + { + + + + + + + ; + ; + + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 449 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { return __last == std::find_if_not(__first, __last, __pred); } +# 467 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { return __last == std::find_if(__first, __last, __pred); } +# 486 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { return !std::none_of(__first, __last, __pred); } +# 502 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _InputIterator + find_if_not(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + + + + + ; + return std::__find_if_not(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } +# 527 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_partitioned(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + __first = std::find_if_not(__first, __last, __pred); + if (__first == __last) + return true; + ++__first; + return std::none_of(__first, __last, __pred); + } +# 549 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _ForwardIterator + partition_point(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + + ; + + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__pred(*__middle)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + + template + constexpr + _OutputIterator + __remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + for (; __first != __last; ++__first) + if (!__pred(__first)) + { + *__result = *__first; + ++__result; + } + return __result; + } +# 616 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + remove_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, const _Tp& __value) + { + + + + + + + ; + + return std::__remove_copy_if(__first, __last, __result, + __gnu_cxx::__ops::__iter_equals_val(__value)); + } +# 649 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + + + + + + + ; + + return std::__remove_copy_if(__first, __last, __result, + __gnu_cxx::__ops::__pred_iter(__pred)); + } +# 684 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + + + + + + + ; + + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__result = *__first; + ++__result; + } + return __result; + } + + template + constexpr + _OutputIterator + __copy_n(_InputIterator __first, _Size __n, + _OutputIterator __result, input_iterator_tag) + { + return std::__niter_wrap(__result, + __copy_n_a(__first, __n, + std::__niter_base(__result), true)); + } + + template + constexpr + inline _OutputIterator + __copy_n(_RandomAccessIterator __first, _Size __n, + _OutputIterator __result, random_access_iterator_tag) + { return std::copy(__first, __first + __n, __result); } +# 740 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) + { + + + + + + const auto __n2 = std::__size_to_integer(__n); + if (__n2 <= 0) + return __result; + + ; + ; + + return std::__copy_n(__first, __n2, __result, + std::__iterator_category(__first)); + } +# 776 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + pair<_OutputIterator1, _OutputIterator2> + partition_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator1 __out_true, _OutputIterator2 __out_false, + _Predicate __pred) + { + + + + + + + + + ; + + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__out_true = *__first; + ++__out_true; + } + else + { + *__out_false = *__first; + ++__out_false; + } + + return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); + } + + + template + constexpr + _ForwardIterator + __remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + __first = std::__find_if(__first, __last, __pred); + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for (; __first != __last; ++__first) + if (!__pred(__first)) + { + *__result = std::move(*__first); + ++__result; + } + return __result; + } +# 847 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + remove(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + + + + + + ; + + return std::__remove_if(__first, __last, + __gnu_cxx::__ops::__iter_equals_val(__value)); + } +# 881 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + return std::__remove_if(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } + + template + constexpr + _ForwardIterator + __adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while (++__next != __last) + { + if (__binary_pred(__first, __next)) + return __first; + __first = __next; + } + return __last; + } + + template + constexpr + _ForwardIterator + __unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + __first = std::__adjacent_find(__first, __last, __binary_pred); + if (__first == __last) + return __last; + + + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!__binary_pred(__dest, __first)) + *++__dest = std::move(*__first); + return ++__dest; + } +# 950 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + + ; + + return std::__unique(__first, __last, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 981 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + + + + + ; + + return std::__unique(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); + } + + + + + + + + template + constexpr + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + forward_iterator_tag, output_iterator_tag) + { + + + + + + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!__binary_pred(__first, __next)) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + + + + + + + + template + constexpr + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, output_iterator_tag) + { + + + + + + typename iterator_traits<_InputIterator>::value_type __value = *__first; + __decltype(__gnu_cxx::__ops::__iter_comp_val(__binary_pred)) + __rebound_pred + = __gnu_cxx::__ops::__iter_comp_val(__binary_pred); + *__result = __value; + while (++__first != __last) + if (!__rebound_pred(__first, __value)) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + + + + + + + + template + constexpr + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, forward_iterator_tag) + { + + + + + *__result = *__first; + while (++__first != __last) + if (!__binary_pred(__result, __first)) + *++__result = *__first; + return ++__result; + } + + + + + + + template + constexpr + void + __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + while (true) + if (__first == __last || __first == --__last) + return; + else + { + std::iter_swap(__first, __last); + ++__first; + } + } + + + + + + + template + constexpr + void + __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + if (__first == __last) + return; + --__last; + while (__first < __last) + { + std::iter_swap(__first, __last); + ++__first; + --__last; + } + } +# 1142 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) + { + + + + ; + std::__reverse(__first, __last, std::__iterator_category(__first)); + } +# 1170 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, + _OutputIterator __result) + { + + + + + + ; + + while (__first != __last) + { + --__last; + *__result = *__last; + ++__result; + } + return __result; + } + + + + + + template + constexpr + _EuclideanRingElement + __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) + { + while (__n != 0) + { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; + } + + inline namespace _V2 + { + + + template + constexpr + _ForwardIterator + __rotate(_ForwardIterator __first, + _ForwardIterator __middle, + _ForwardIterator __last, + forward_iterator_tag) + { + if (__first == __middle) + return __last; + else if (__last == __middle) + return __first; + + _ForwardIterator __first2 = __middle; + do + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } + while (__first2 != __last); + + _ForwardIterator __ret = __first; + + __first2 = __middle; + + while (__first2 != __last) + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + return __ret; + } + + + template + constexpr + _BidirectionalIterator + __rotate(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + + + + + if (__first == __middle) + return __last; + else if (__last == __middle) + return __first; + + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + + while (__first != __middle && __middle != __last) + { + std::iter_swap(__first, --__last); + ++__first; + } + + if (__first == __middle) + { + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + return __last; + } + else + { + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + return __first; + } + } + + + template + constexpr + _RandomAccessIterator + __rotate(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + + if (__first == __middle) + return __last; + else if (__last == __middle) + return __first; + + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + _Distance __n = __last - __first; + _Distance __k = __middle - __first; + + if (__k == __n - __k) + { + std::swap_ranges(__first, __middle, __middle); + return __middle; + } + + _RandomAccessIterator __p = __first; + _RandomAccessIterator __ret = __first + (__last - __middle); + + for (;;) + { + if (__k < __n - __k) + { + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = std::move(*__p); + std::move(__p + 1, __p + __n, __p); + *(__p + __n - 1) = std::move(__t); + return __ret; + } + _RandomAccessIterator __q = __p + __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + std::iter_swap(__p, __q); + ++__p; + ++__q; + } + __n %= __k; + if (__n == 0) + return __ret; + std::swap(__n, __k); + __k = __n - __k; + } + else + { + __k = __n - __k; + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = std::move(*(__p + __n - 1)); + std::move_backward(__p, __p + __n - 1, __p + __n); + *__p = std::move(__t); + return __ret; + } + _RandomAccessIterator __q = __p + __n; + __p = __q - __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + --__p; + --__q; + std::iter_swap(__p, __q); + } + __n %= __k; + if (__n == 0) + return __ret; + std::swap(__n, __k); + } + } + } +# 1402 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + rotate(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last) + { + + + + ; + ; + + return std::__rotate(__first, __middle, __last, + std::__iterator_category(__first)); + } + + } +# 1440 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last, _OutputIterator __result) + { + + + + + ; + ; + + return std::copy(__first, __middle, + std::copy(__middle, __last, __result)); + } + + + template + constexpr + _ForwardIterator + __partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, forward_iterator_tag) + { + if (__first == __last) + return __first; + + while (__pred(*__first)) + if (++__first == __last) + return __first; + + _ForwardIterator __next = __first; + + while (++__next != __last) + if (__pred(*__next)) + { + std::iter_swap(__first, __next); + ++__first; + } + + return __first; + } + + + template + constexpr + _BidirectionalIterator + __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, + _Predicate __pred, bidirectional_iterator_tag) + { + while (true) + { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!bool(__pred(*__last))) + --__last; + else + break; + std::iter_swap(__first, __last); + ++__first; + } + } +# 1520 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + _ForwardIterator + __stable_partition_adaptive(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) + { + if (__len == 1) + return __first; + + if (__len <= __buffer_size) + { + _ForwardIterator __result1 = __first; + _Pointer __result2 = __buffer; + + + + + *__result2 = std::move(*__first); + ++__result2; + ++__first; + for (; __first != __last; ++__first) + if (__pred(__first)) + { + *__result1 = std::move(*__first); + ++__result1; + } + else + { + *__result2 = std::move(*__first); + ++__result2; + } + + std::move(__buffer, __result2, __result1); + return __result1; + } + + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __left_split = + std::__stable_partition_adaptive(__first, __middle, __pred, + __len / 2, __buffer, + __buffer_size); + + + + _Distance __right_len = __len - __len / 2; + _ForwardIterator __right_split = + std::__find_if_not_n(__middle, __right_len, __pred); + + if (__right_len) + __right_split = + std::__stable_partition_adaptive(__right_split, __last, __pred, + __right_len, + __buffer, __buffer_size); + + return std::rotate(__left_split, __middle, __right_split); + } + + template + _ForwardIterator + __stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + __first = std::__find_if_not(__first, __last, __pred); + + if (__first == __last) + return __first; + + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _Temporary_buffer<_ForwardIterator, _ValueType> + __buf(__first, std::distance(__first, __last)); + return + std::__stable_partition_adaptive(__first, __last, __pred, + _DistanceType(__buf.requested_size()), + __buf.begin(), + _DistanceType(__buf.size())); + } +# 1622 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline _ForwardIterator + stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + return std::__stable_partition(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } + + + template + constexpr + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp) + { + std::__make_heap(__first, __middle, __comp); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (__comp(__i, __first)) + std::__pop_heap(__first, __middle, __i, __comp); + } + + + + template + constexpr + _RandomAccessIterator + __partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef iterator_traits<_RandomAccessIterator> _RItTraits; + typedef typename _RItTraits::difference_type _DistanceType; + + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while (__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + + std::__make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) + { + if (__comp(__first, __result_first)) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first), __comp); + ++__first; + } + std::__sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; + } +# 1710 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last) + { +# 1725 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + + + + + + + ; + ; + ; + + return std::__partial_sort_copy(__first, __last, + __result_first, __result_last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 1760 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { +# 1777 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + + + + + + + + + + ; + ; + ; + + return std::__partial_sort_copy(__first, __last, + __result_first, __result_last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + template + constexpr + void + __unguarded_linear_insert(_RandomAccessIterator __last, + _Compare __comp) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = std::move(*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__comp(__val, __next)) + { + *__last = std::move(*__next); + __last = __next; + --__next; + } + *__last = std::move(__val); + } + + + template + constexpr + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__first == __last) return; + + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (__comp(__i, __first)) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = std::move(*__i); + std::move_backward(__first, __i, __i + 1); + *__first = std::move(__val); + } + else + std::__unguarded_linear_insert(__i, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + } + } + + + template + constexpr + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + } + + + + + + enum { _S_threshold = 16 }; + + + template + constexpr + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold), __comp); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, + __comp); + } + else + std::__insertion_sort(__first, __last, __comp); + } + + + template + constexpr + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _RandomAccessIterator __pivot, _Compare __comp) + { + while (true) + { + while (__comp(__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, __last)) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + + + template + constexpr + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_to_first(__first, __first + 1, __mid, __last - 1, + __comp); + return std::__unguarded_partition(__first + 1, __last, __first, __comp); + } + + template + constexpr + inline void + __partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + std::__heap_select(__first, __middle, __last, __comp); + std::__sort_heap(__first, __middle, __comp); + } + + + template + constexpr + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit, _Compare __comp) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::__partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + std::__introsort_loop(__cut, __last, __depth_limit, __comp); + __last = __cut; + } + } + + + + template + constexpr + inline void + __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2, + __comp); + std::__final_insertion_sort(__first, __last, __comp); + } + } + + template + constexpr + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit, + _Compare __comp) + { + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last, __comp); + + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last, __comp); + } +# 2008 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + + + + + + ; + + return std::__lower_bound(__first, __last, __val, + __gnu_cxx::__ops::__iter_comp_val(__comp)); + } + + template + constexpr + _ForwardIterator + __upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(__val, __middle)) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } +# 2064 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + + + + + ; + + return std::__upper_bound(__first, __last, __val, + __gnu_cxx::__ops::__val_less_iter()); + } +# 2095 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + + + + + + ; + + return std::__upper_bound(__first, __last, __val, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + } + + template + constexpr + pair<_ForwardIterator, _ForwardIterator> + __equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, + _CompareItTp __comp_it_val, _CompareTpIt __comp_val_it) + { + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp_it_val(__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp_val_it(__val, __middle)) + __len = __half; + else + { + _ForwardIterator __left + = std::__lower_bound(__first, __middle, __val, __comp_it_val); + std::advance(__first, __len); + _ForwardIterator __right + = std::__upper_bound(++__middle, __first, __val, __comp_val_it); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } +# 2168 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + + + + + + + ; + ; + + return std::__equal_range(__first, __last, __val, + __gnu_cxx::__ops::__iter_less_val(), + __gnu_cxx::__ops::__val_less_iter()); + } +# 2205 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + + + + + + + + ; + + ; + + return std::__equal_range(__first, __last, __val, + __gnu_cxx::__ops::__iter_comp_val(__comp), + __gnu_cxx::__ops::__val_comp_iter(__comp)); + } +# 2239 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + + + + + ; + ; + + _ForwardIterator __i + = std::__lower_bound(__first, __last, __val, + __gnu_cxx::__ops::__iter_less_val()); + return __i != __last && !(__val < *__i); + } +# 2273 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + + + + + + ; + + ; + + _ForwardIterator __i + = std::__lower_bound(__first, __last, __val, + __gnu_cxx::__ops::__iter_comp_val(__comp)); + return __i != __last && !bool(__comp(__val, *__i)); + } + + + + + template + void + __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first2, __first1)) + { + *__result = std::move(*__first2); + ++__first2; + } + else + { + *__result = std::move(*__first1); + ++__first1; + } + ++__result; + } + if (__first1 != __last1) + std::move(__first1, __last1, __result); + } + + + template + void + __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result, + _Compare __comp) + { + if (__first1 == __last1) + { + std::move_backward(__first2, __last2, __result); + return; + } + else if (__first2 == __last2) + return; + + --__last1; + --__last2; + while (true) + { + if (__comp(__last2, __last1)) + { + *--__result = std::move(*__last1); + if (__first1 == __last1) + { + std::move_backward(__first2, ++__last2, __result); + return; + } + --__last1; + } + else + { + *--__result = std::move(*__last2); + if (__first2 == __last2) + return; + --__last2; + } + } + } + + + template + _BidirectionalIterator1 + __rotate_adaptive(_BidirectionalIterator1 __first, + _BidirectionalIterator1 __middle, + _BidirectionalIterator1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIterator2 __buffer, + _Distance __buffer_size) + { + _BidirectionalIterator2 __buffer_end; + if (__len1 > __len2 && __len2 <= __buffer_size) + { + if (__len2) + { + __buffer_end = std::move(__middle, __last, __buffer); + std::move_backward(__first, __middle, __last); + return std::move(__buffer, __buffer_end, __first); + } + else + return __first; + } + else if (__len1 <= __buffer_size) + { + if (__len1) + { + __buffer_end = std::move(__first, __middle, __buffer); + std::move(__middle, __last, __first); + return std::move_backward(__buffer, __buffer_end, __last); + } + else + return __last; + } + else + return std::rotate(__first, __middle, __last); + } + + + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::move(__first, __middle, __buffer); + std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, + __first, __comp); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::move(__middle, __last, __buffer); + std::__move_merge_adaptive_backward(__first, __middle, __buffer, + __buffer_end, __last, __comp); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut + = std::__lower_bound(__middle, __last, *__first_cut, + __gnu_cxx::__ops::__iter_comp_val(__comp)); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut + = std::__upper_bound(__first, __middle, *__second_cut, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + __len11 = std::distance(__first, __first_cut); + } + + _BidirectionalIterator __new_middle + = std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, + __buffer_size, __comp); + } + } + + + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Compare __comp) + { + if (__len1 == 0 || __len2 == 0) + return; + + if (__len1 + __len2 == 2) + { + if (__comp(__middle, __first)) + std::iter_swap(__first, __middle); + return; + } + + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut + = std::__lower_bound(__middle, __last, *__first_cut, + __gnu_cxx::__ops::__iter_comp_val(__comp)); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut + = std::__upper_bound(__first, __middle, *__second_cut, + __gnu_cxx::__ops::__val_comp_iter(__comp)); + __len11 = std::distance(__first, __first_cut); + } + + _BidirectionalIterator __new_middle + = std::rotate(__first_cut, __middle, __second_cut); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22, __comp); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22, __comp); + } + + template + void + __inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + typedef _Temporary_buffer<_BidirectionalIterator, _ValueType> _TmpBuf; + + if (__first == __middle || __middle == __last) + return; + + const _DistanceType __len1 = std::distance(__first, __middle); + const _DistanceType __len2 = std::distance(__middle, __last); + + + + _TmpBuf __buf(__first, std::min(__len1, __len2)); + + if (__buf.begin() == 0) + std::__merge_without_buffer + (__first, __middle, __last, __len1, __len2, __comp); + else + std::__merge_adaptive + (__first, __middle, __last, __len1, __len2, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } +# 2565 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last) + { + + + + + + ; + ; + ; + + std::__inplace_merge(__first, __middle, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 2606 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + + + + + + + ; + ; + ; + + std::__inplace_merge(__first, __middle, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + + template + _OutputIterator + __move_merge(_InputIterator __first1, _InputIterator __last1, + _InputIterator __first2, _InputIterator __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first2, __first1)) + { + *__result = std::move(*__first2); + ++__first2; + } + else + { + *__result = std::move(*__first1); + ++__first1; + } + ++__result; + } + return std::move(__first2, __last2, std::move(__first1, __last1, __result)) + + ; + } + + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, _Distance __step_size, + _Compare __comp) + { + const _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) + { + __result = std::__move_merge(__first, __first + __step_size, + __first + __step_size, + __first + __two_step, + __result, __comp); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + + std::__move_merge(__first, __first + __step_size, + __first + __step_size, __last, __result, __comp); + } + + template + constexpr + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size, _Compare __comp) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last, __comp); + } + + enum { _S_chunk_size = 7 }; + + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size, __comp); + + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, + __step_size, __comp); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, + __step_size, __comp); + __step_size *= 2; + } + } + + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, __buffer, + __buffer_size, __comp); + std::__stable_sort_adaptive(__middle, __last, __buffer, + __buffer_size, __comp); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); + std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); + } + + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size, + __comp); + } + + + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle, __comp); + std::__inplace_stable_sort(__middle, __last, __comp); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); + } +# 2780 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + bool + __includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first2, __first1)) + return false; + if (!__comp(__first1, __first2)) + ++__first2; + ++__first1; + } + + return __first2 == __last2; + } +# 2818 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + + + + + + + + + + ; + ; + ; + ; + + return std::__includes(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 2863 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + + + + + + + + + + ; + ; + ; + ; + + return std::__includes(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 2899 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + bool + __next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(__i, __ii)) + { + _BidirectionalIterator __j = __last; + while (!__comp(__i, --__j)) + {} + std::iter_swap(__i, __j); + std::__reverse(__ii, __last, + std::__iterator_category(__first)); + return true; + } + if (__i == __first) + { + std::__reverse(__first, __last, + std::__iterator_category(__first)); + return false; + } + } + } +# 2949 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + + + + ; + ; + + return std::__next_permutation + (__first, __last, __gnu_cxx::__ops::__iter_less_iter()); + } +# 2982 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + + + + + ; + ; + + return std::__next_permutation + (__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + bool + __prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(__ii, __i)) + { + _BidirectionalIterator __j = __last; + while (!__comp(--__j, __i)) + {} + std::iter_swap(__i, __j); + std::__reverse(__ii, __last, + std::__iterator_category(__first)); + return true; + } + if (__i == __first) + { + std::__reverse(__first, __last, + std::__iterator_category(__first)); + return false; + } + } + } +# 3052 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + + + + ; + ; + + return std::__prev_permutation(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 3085 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + + + + + ; + ; + + return std::__prev_permutation(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + + + template + constexpr + _OutputIterator + __replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + for (; __first != __last; ++__first, (void)++__result) + if (__pred(__first)) + *__result = __new_value; + else + *__result = *__first; + return __result; + } +# 3137 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + replace_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + + + + ; + + return std::__replace_copy_if(__first, __last, __result, + __gnu_cxx::__ops::__iter_equals_val(__old_value), + __new_value); + } +# 3172 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + + + + + + + ; + + return std::__replace_copy_if(__first, __last, __result, + __gnu_cxx::__ops::__pred_iter(__pred), + __new_value); + } +# 3201 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_sorted(_ForwardIterator __first, _ForwardIterator __last) + { return std::is_sorted_until(__first, __last) == __last; } +# 3216 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_sorted(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { return std::is_sorted_until(__first, __last, __comp) == __last; } + + template + constexpr + _ForwardIterator + __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + if (__first == __last) + return __last; + + _ForwardIterator __next = __first; + for (++__next; __next != __last; __first = __next, (void)++__next) + if (__comp(__next, __first)) + return __next; + return __next; + } +# 3247 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + ; + + return std::__is_sorted_until(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 3272 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + ; + + return std::__is_sorted_until(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 3298 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair + minmax(const _Tp& __a, const _Tp& __b) + { + + + + return __b < __a ? pair(__b, __a) + : pair(__a, __b); + } +# 3319 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair + minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + return __comp(__b, __a) ? pair(__b, __a) + : pair(__a, __b); + } + + template + constexpr + pair<_ForwardIterator, _ForwardIterator> + __minmax_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + _ForwardIterator __next = __first; + if (__first == __last + || ++__next == __last) + return std::make_pair(__first, __first); + + _ForwardIterator __min{}, __max{}; + if (__comp(__next, __first)) + { + __min = __next; + __max = __first; + } + else + { + __min = __first; + __max = __next; + } + + __first = __next; + ++__first; + + while (__first != __last) + { + __next = __first; + if (++__next == __last) + { + if (__comp(__first, __min)) + __min = __first; + else if (!__comp(__first, __max)) + __max = __first; + break; + } + + if (__comp(__next, __first)) + { + if (__comp(__next, __min)) + __min = __next; + if (!__comp(__first, __max)) + __max = __first; + } + else + { + if (__comp(__first, __min)) + __min = __first; + if (!__comp(__next, __max)) + __max = __next; + } + + __first = __next; + ++__first; + } + + return std::make_pair(__min, __max); + } +# 3399 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair<_ForwardIterator, _ForwardIterator> + minmax_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + ; + + return std::__minmax_element(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 3427 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline pair<_ForwardIterator, _ForwardIterator> + minmax_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + ; + + return std::__minmax_element(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + template + constexpr + inline _Tp + min(initializer_list<_Tp> __l) + { return *std::min_element(__l.begin(), __l.end()); } + + template + constexpr + inline _Tp + min(initializer_list<_Tp> __l, _Compare __comp) + { return *std::min_element(__l.begin(), __l.end(), __comp); } + + template + constexpr + inline _Tp + max(initializer_list<_Tp> __l) + { return *std::max_element(__l.begin(), __l.end()); } + + template + constexpr + inline _Tp + max(initializer_list<_Tp> __l, _Compare __comp) + { return *std::max_element(__l.begin(), __l.end(), __comp); } + + template + constexpr + inline pair<_Tp, _Tp> + minmax(initializer_list<_Tp> __l) + { + pair __p = + std::minmax_element(__l.begin(), __l.end()); + return std::make_pair(*__p.first, *__p.second); + } + + template + constexpr + inline pair<_Tp, _Tp> + minmax(initializer_list<_Tp> __l, _Compare __comp) + { + pair __p = + std::minmax_element(__l.begin(), __l.end(), __comp); + return std::make_pair(*__p.first, *__p.second); + } +# 3504 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _BinaryPredicate __pred) + { + + + + + + + ; + + return std::__is_permutation(__first1, __last1, __first2, + __gnu_cxx::__ops::__iter_comp_iter(__pred)); + } + + + template + constexpr + bool + __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __pred) + { + using _Cat1 + = typename iterator_traits<_ForwardIterator1>::iterator_category; + using _Cat2 + = typename iterator_traits<_ForwardIterator2>::iterator_category; + using _It1_is_RA = is_same<_Cat1, random_access_iterator_tag>; + using _It2_is_RA = is_same<_Cat2, random_access_iterator_tag>; + constexpr bool __ra_iters = _It1_is_RA() && _It2_is_RA(); + if (__ra_iters) + { + auto __d1 = std::distance(__first1, __last1); + auto __d2 = std::distance(__first2, __last2); + if (__d1 != __d2) + return false; + } + + + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!__pred(__first1, __first2)) + break; + + if (__ra_iters) + { + if (__first1 == __last1) + return true; + } + else + { + auto __d1 = std::distance(__first1, __last1); + auto __d2 = std::distance(__first2, __last2); + if (__d1 == 0 && __d2 == 0) + return true; + if (__d1 != __d2) + return false; + } + + for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) + { + if (__scan != std::__find_if(__first1, __scan, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) + continue; + + auto __matches = std::__count_if(__first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); + if (0 == __matches + || std::__count_if(__scan, __last1, + __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) + != __matches) + return false; + } + return true; + } +# 3599 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + ; + ; + + return + std::__is_permutation(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 3627 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline bool + is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __pred) + { + ; + ; + + return std::__is_permutation(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__pred)); + } +# 3654 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr const _Tp& + clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi) + { + do { if (__builtin_is_constant_evaluated() && !bool(!(__hi < __lo))) __builtin_unreachable(); } while (false); + return (__val < __lo) ? __lo : (__hi < __val) ? __hi : __val; + } +# 3672 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr const _Tp& + clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, _Compare __comp) + { + do { if (__builtin_is_constant_evaluated() && !bool(!__comp(__hi, __lo))) __builtin_unreachable(); } while (false); + return __comp(__val, __lo) ? __lo : __comp(__hi, __val) ? __hi : __val; + } +# 3704 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + pair<_IntType, _IntType> + __gen_two_uniform_ints(_IntType __b0, _IntType __b1, + _UniformRandomBitGenerator&& __g) + { + _IntType __x + = uniform_int_distribution<_IntType>{0, (__b0 * __b1) - 1}(__g); + return std::make_pair(__x / __b1, __x % __b1); + } +# 3726 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + void + shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + _UniformRandomNumberGenerator&& __g) + { + + + + ; + + if (__first == __last) + return; + + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + typedef typename std::make_unsigned<_DistanceType>::type __ud_type; + typedef typename std::uniform_int_distribution<__ud_type> __distr_type; + typedef typename __distr_type::param_type __p_type; + + typedef typename remove_reference<_UniformRandomNumberGenerator>::type + _Gen; + typedef typename common_type::type + __uc_type; + + const __uc_type __urngrange = __g.max() - __g.min(); + const __uc_type __urange = __uc_type(__last - __first); + + if (__urngrange / __urange >= __urange) + + { + _RandomAccessIterator __i = __first + 1; + + + + + + if ((__urange % 2) == 0) + { + __distr_type __d{0, 1}; + std::iter_swap(__i++, __first + __d(__g)); + } + + + + + + while (__i != __last) + { + const __uc_type __swap_range = __uc_type(__i - __first) + 1; + + const pair<__uc_type, __uc_type> __pospos = + __gen_two_uniform_ints(__swap_range, __swap_range + 1, __g); + + std::iter_swap(__i++, __first + __pospos.first); + std::iter_swap(__i++, __first + __pospos.second); + } + + return; + } + + __distr_type __d; + + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); + } + + + + + +# 3811 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _Function + for_each(_InputIterator __first, _InputIterator __last, _Function __f) + { + + + ; + for (; __first != __last; ++__first) + __f(*__first); + return __f; + } +# 3837 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _InputIterator + for_each_n(_InputIterator __first, _Size __n, _Function __f) + { + auto __n2 = std::__size_to_integer(__n); + using _Cat = typename iterator_traits<_InputIterator>::iterator_category; + if constexpr (is_base_of_v) + { + if (__n2 <= 0) + return __first; + auto __last = __first + __n2; + std::for_each(__first, __last, std::move(__f)); + return __last; + } + else + { + while (__n2-->0) + { + __f(*__first); + ++__first; + } + return __first; + } + } +# 3873 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _InputIterator + find(_InputIterator __first, _InputIterator __last, + const _Tp& __val) + { + + + + + ; + return std::__find_if(__first, __last, + __gnu_cxx::__ops::__iter_equals_val(__val)); + } +# 3898 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _InputIterator + find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + + + + + ; + + return std::__find_if(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } +# 3930 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2) + { + + + + + + + ; + ; + + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (*__first1 == *__iter) + return __first1; + return __last1; + } +# 3971 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2, + _BinaryPredicate __comp) + { + + + + + + + ; + ; + + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; + } +# 4004 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + + return std::__adjacent_find(__first, __last, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 4030 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + + + + ; + + return std::__adjacent_find(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); + } +# 4056 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline typename iterator_traits<_InputIterator>::difference_type + count(_InputIterator __first, _InputIterator __last, const _Tp& __value) + { + + + + + ; + + return std::__count_if(__first, __last, + __gnu_cxx::__ops::__iter_equals_val(__value)); + } +# 4080 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline typename iterator_traits<_InputIterator>::difference_type + count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + + + + + ; + + return std::__count_if(__first, __last, + __gnu_cxx::__ops::__pred_iter(__pred)); + } +# 4121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + + + + ; + ; + + return std::__search(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_equal_to_iter()); + } +# 4161 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + + + + + + + ; + ; + + return std::__search(__first1, __last1, __first2, __last2, + __gnu_cxx::__ops::__iter_comp_iter(__predicate)); + } +# 4197 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val) + { + + + + + ; + + return std::__search_n(__first, __last, __count, + __gnu_cxx::__ops::__iter_equals_val(__val)); + } +# 4231 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred) + { + + + + + ; + + return std::__search_n(__first, __last, __count, + __gnu_cxx::__ops::__iter_comp_val(__binary_pred, __val)); + } +# 4257 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + search(_ForwardIterator __first, _ForwardIterator __last, + const _Searcher& __searcher) + { return __searcher(__first, __last).first; } +# 4281 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + transform(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _UnaryOperation __unary_op) + { + + + + + + ; + + for (; __first != __last; ++__first, (void)++__result) + *__result = __unary_op(*__first); + return __result; + } +# 4319 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + transform(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _OutputIterator __result, + _BinaryOperation __binary_op) + { + + + + + + + ; + + for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; + } +# 4353 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + void + replace(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + + + + + ; + + for (; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; + } +# 4386 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + void + replace_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, const _Tp& __new_value) + { + + + + + + + + ; + + for (; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; + } +# 4419 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + void + generate(_ForwardIterator __first, _ForwardIterator __last, + _Generator __gen) + { + + + + + ; + + for (; __first != __last; ++__first) + *__first = __gen(); + } +# 4453 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _OutputIterator + generate_n(_OutputIterator __first, _Size __n, _Generator __gen) + { + + + + + + typedef __decltype(std::__size_to_integer(__n)) _IntSize; + for (_IntSize __niter = std::__size_to_integer(__n); + __niter > 0; --__niter, (void) ++__first) + *__first = __gen(); + return __first; + } +# 4491 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) + { + + + + + + + ; + + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + __gnu_cxx::__ops::__iter_equal_to_iter(), + std::__iterator_category(__first), + std::__iterator_category(__result)); + } +# 4532 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _BinaryPredicate __binary_pred) + { + + + + + ; + + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + __gnu_cxx::__ops::__iter_comp_iter(__binary_pred), + std::__iterator_category(__first), + std::__iterator_category(__result)); + } +# 4566 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + ; + + if (__first != __last) + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + + _RandomAccessIterator __j = __first + + std::rand() % ((__i - __first) + 1); + if (__i != __j) + std::iter_swap(__i, __j); + } + } +# 4601 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + + _RandomNumberGenerator&& __rand) + + + + { + + + + ; + + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + _RandomAccessIterator __j = __first + __rand((__i - __first) + 1); + if (__i != __j) + std::iter_swap(__i, __j); + } + } +# 4641 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + return std::__partition(__first, __last, __pred, + std::__iterator_category(__first)); + } +# 4675 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + + + + + + ; + ; + ; + + std::__partial_sort(__first, __middle, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 4714 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + + + + + + + ; + ; + ; + + std::__partial_sort(__first, __middle, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 4751 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last) + { + + + + + + ; + ; + ; + + if (__first == __last || __nth == __last) + return; + + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 4791 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp) + { + + + + + + + ; + ; + ; + + if (__first == __last || __nth == __last) + return; + + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } +# 4829 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); + } +# 4860 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + + + + ; + ; + + std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first2, __first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } +# 4923 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + ; + ; + ; + ; + + return std::__merge(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 4974 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + + + + + + + + + + + ; + ; + ; + ; + + return std::__merge(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + inline void + __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + typedef _Temporary_buffer<_RandomAccessIterator, _ValueType> _TmpBuf; + + if (__first == __last) + return; + + + + _TmpBuf __buf(__first, (__last - __first + 1) / 2); + + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last, __comp); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } +# 5044 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + std::__stable_sort(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5078 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + + + + ; + ; + + std::__stable_sort(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(__first1, __first2)) + { + *__result = *__first1; + ++__first1; + } + else if (__comp(__first2, __first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } +# 5148 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_union(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5199 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + + + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_union(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + if (__comp(__first1, __first2)) + ++__first1; + else if (__comp(__first2, __first1)) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } +# 5272 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_intersection(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5322 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_intersection(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + if (__comp(__first1, __first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(__first2, __first1)) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } +# 5397 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_difference(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5449 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_difference(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _OutputIterator + __set_symmetric_difference(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + if (__comp(__first1, __first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(__first2, __first1)) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } +# 5530 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + + + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_symmetric_difference(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5582 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + + + + + + + + + + + + + + ; + ; + ; + ; + + return std::__set_symmetric_difference(__first1, __last1, + __first2, __last2, __result, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _ForwardIterator + __min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(__first, __result)) + __result = __first; + return __result; + } +# 5636 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + _ForwardIterator + inline min_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + ; + + return std::__min_element(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5661 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + ; + + return std::__min_element(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + template + constexpr + _ForwardIterator + __max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + if (__first == __last) return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(__result, __first)) + __result = __first; + return __result; + } +# 5700 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + ; + + return std::__max_element(__first, __last, + __gnu_cxx::__ops::__iter_less_iter()); + } +# 5725 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_algo.h" 3 + template + constexpr + inline _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + ; + + return std::__max_element(__first, __last, + __gnu_cxx::__ops::__iter_comp_iter(__comp)); + } + + + + template + _RandomAccessIterator + __sample(_InputIterator __first, _InputIterator __last, input_iterator_tag, + _RandomAccessIterator __out, random_access_iterator_tag, + _Size __n, _UniformRandomBitGenerator&& __g) + { + using __distrib_type = uniform_int_distribution<_Size>; + using __param_type = typename __distrib_type::param_type; + __distrib_type __d{}; + _Size __sample_sz = 0; + while (__first != __last && __sample_sz != __n) + { + __out[__sample_sz++] = *__first; + ++__first; + } + for (auto __pop_sz = __sample_sz; __first != __last; + ++__first, (void) ++__pop_sz) + { + const auto __k = __d(__g, __param_type{0, __pop_sz}); + if (__k < __n) + __out[__k] = *__first; + } + return __out + __sample_sz; + } + + + template + _OutputIterator + __sample(_ForwardIterator __first, _ForwardIterator __last, + forward_iterator_tag, + _OutputIterator __out, _Cat, + _Size __n, _UniformRandomBitGenerator&& __g) + { + using __distrib_type = uniform_int_distribution<_Size>; + using __param_type = typename __distrib_type::param_type; + using _USize = make_unsigned_t<_Size>; + using _Gen = remove_reference_t<_UniformRandomBitGenerator>; + using __uc_type = common_type_t; + + if (__first == __last) + return __out; + + __distrib_type __d{}; + _Size __unsampled_sz = std::distance(__first, __last); + __n = std::min(__n, __unsampled_sz); + + + + + const __uc_type __urngrange = __g.max() - __g.min(); + if (__urngrange / __uc_type(__unsampled_sz) >= __uc_type(__unsampled_sz)) + + + { + while (__n != 0 && __unsampled_sz >= 2) + { + const pair<_Size, _Size> __p = + __gen_two_uniform_ints(__unsampled_sz, __unsampled_sz - 1, __g); + + --__unsampled_sz; + if (__p.first < __n) + { + *__out++ = *__first; + --__n; + } + + ++__first; + + if (__n == 0) break; + + --__unsampled_sz; + if (__p.second < __n) + { + *__out++ = *__first; + --__n; + } + + ++__first; + } + } + + + + for (; __n != 0; ++__first) + if (__d(__g, __param_type{0, --__unsampled_sz}) < __n) + { + *__out++ = *__first; + --__n; + } + return __out; + } + + + + + template + _SampleIterator + sample(_PopulationIterator __first, _PopulationIterator __last, + _SampleIterator __out, _Distance __n, + _UniformRandomBitGenerator&& __g) + { + using __pop_cat = typename + std::iterator_traits<_PopulationIterator>::iterator_category; + using __samp_cat = typename + std::iterator_traits<_SampleIterator>::iterator_category; + + static_assert( + __or_, + is_convertible<__samp_cat, random_access_iterator_tag>>::value, + "output range must use a RandomAccessIterator when input range" + " does not meet the ForwardIterator requirements"); + + static_assert(is_integral<_Distance>::value, + "sample size must be an integer type"); + + typename iterator_traits<_PopulationIterator>::difference_type __d = __n; + return std:: + __sample(__first, __last, __pop_cat{}, __out, __samp_cat{}, __d, + std::forward<_UniformRandomBitGenerator>(__g)); + } + + + + + +} +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algobase.h" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algobase.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 1 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 3 + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/memoryfwd.h" 1 3 +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/memoryfwd.h" 3 + +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/memoryfwd.h" 3 + + + +namespace std +{ + +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/memoryfwd.h" 3 + template + class allocator; + + template<> + class allocator; + + + + template + struct uses_allocator; + + template + struct allocator_traits; + + + + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h" 2 3 + +namespace std +{ + + + + + + + + + template + struct char_traits; + + template<> struct char_traits; + + + template<> struct char_traits; + + + + template<> struct char_traits; + + + + template<> struct char_traits; + template<> struct char_traits; + + +namespace __cxx11 { + + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + +} + + + typedef basic_string string; + + + + typedef basic_string wstring; + + + + + typedef basic_string u8string; + + + + + typedef basic_string u16string; + + + typedef basic_string u32string; + + + + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 1 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_stdio_config.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 42 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + int _flag; + int _file; + int _charbuf; + int _bufsiz; + char *_tmpfname; + }; + typedef struct _iobuf FILE; + + + +__attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __acrt_iob_func(unsigned index); + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __iob_func(void); +# 82 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + typedef unsigned long _fsize_t; + + + + + struct _wfinddata32_t { + unsigned attrib; + __time32_t time_create; + __time32_t time_access; + __time32_t time_write; + _fsize_t size; + wchar_t name[260]; + }; + + struct _wfinddata32i64_t { + unsigned attrib; + __time32_t time_create; + __time32_t time_access; + __time32_t time_write; + __extension__ long long size; + wchar_t name[260]; + }; + + struct _wfinddata64i32_t { + unsigned attrib; + __time64_t time_create; + __time64_t time_access; + __time64_t time_write; + _fsize_t size; + wchar_t name[260]; + }; + + struct _wfinddata64_t { + unsigned attrib; + __time64_t time_create; + __time64_t time_access; + __time64_t time_write; + __extension__ long long size; + wchar_t name[260]; + }; +# 187 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + extern unsigned short ** __imp__pctype; +# 202 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + extern unsigned short ** __imp__wctype; +# 217 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + extern unsigned short ** __imp__pwctype; +# 241 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + int __attribute__((__cdecl__)) iswalpha(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswalpha_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswupper(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswupper_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswlower(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswlower_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswdigit(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswdigit_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswxdigit(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswxdigit_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswspace(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswspace_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswpunct(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswpunct_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswalnum(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswalnum_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswprint(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswprint_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswgraph(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswgraph_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswcntrl(wint_t _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iswcntrl_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswascii(wint_t _C); + + int __attribute__((__cdecl__)) isleadbyte(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isleadbyte_l(int _C,_locale_t _Locale); + + wint_t __attribute__((__cdecl__)) towupper(wint_t _C); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _towupper_l(wint_t _C,_locale_t _Locale); + wint_t __attribute__((__cdecl__)) towlower(wint_t _C); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _towlower_l(wint_t _C,_locale_t _Locale); + int __attribute__((__cdecl__)) iswctype(wint_t _C,wctype_t _Type); +# 281 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + int __attribute__((__cdecl__)) is_wctype(wint_t _C,wctype_t _Type); + + + + int __attribute__((__cdecl__)) iswblank(wint_t _C); + + + + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wgetcwd(wchar_t *_DstBuf,int _SizeInWords); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords); + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wchdir(const wchar_t *_Path); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wmkdir(const wchar_t *_Path); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wrmdir(const wchar_t *_Path); + + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _waccess(const wchar_t *_Filename,int _AccessMode); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wchmod(const wchar_t *_Filename,int _Mode); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcreat(const wchar_t *_Filename,int _PermissionMode) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wunlink(const wchar_t *_Filename); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wrename(const wchar_t *_OldFilename,const wchar_t *_NewFilename); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wmktemp(wchar_t *_TemplateName) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData); + intptr_t __attribute__((__cdecl__)) _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData); + int __attribute__((__cdecl__)) _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wopen(const wchar_t *_Filename,int _OpenFlag,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,...) ; + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wsetlocale(int _Category,const wchar_t *_Locale); + + + + + + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); + + + + + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); +# 398 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + typedef unsigned short _ino_t; + + typedef unsigned short ino_t; + + + + + + typedef unsigned int _dev_t; + + typedef unsigned int dev_t; + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_off_t.h" 1 3 + + + + + typedef long _off_t; + + typedef long off32_t; + + + + + + __extension__ typedef long long _off64_t; + + __extension__ typedef long long off64_t; +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_off_t.h" 3 +typedef off32_t off_t; +# 413 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_stat64.h" 1 3 +# 25 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_stat64.h" 3 + struct _stat32 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + __time32_t st_atime; + __time32_t st_mtime; + __time32_t st_ctime; + }; + + + struct stat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; + + + struct _stat32i64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __extension__ long long st_size; + __time32_t st_atime; + __time32_t st_mtime; + __time32_t st_ctime; + }; + + struct _stat64i32 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + __time64_t st_atime; + __time64_t st_mtime; + __time64_t st_ctime; + }; + + struct _stat64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __extension__ long long st_size; + __time64_t st_atime; + __time64_t st_mtime; + __time64_t st_ctime; + }; +# 414 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wstat32(const wchar_t *_Name,struct _stat32 *_Stat); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat); + int __attribute__((__cdecl__)) _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wstat64(const wchar_t *_Name,struct _stat64 *_Stat); +# 432 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) wchar_t *_cgetws(wchar_t *_Buffer) ; + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _getwch(void); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _getwche(void); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _putwch(wchar_t _WCh); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _ungetwch(wint_t _WCh); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cputws(const wchar_t *_String); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwscanf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwscanf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vcwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwprintf_p(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vcwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vcwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vcwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); +# 465 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vswscanf (const wchar_t * __restrict__ _Str,const wchar_t * __restrict__ Format,va_list argp); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_wscanf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list argp); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * __restrict__ Format,va_list argp); + + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_wprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...); + __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_wscanf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_wprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...); + __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list); +# 541 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int swscanf(const wchar_t *__source, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vswscanf( __source, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) +int wscanf(const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfwscanf( (__acrt_iob_func(0)), __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int fwscanf(FILE *__stream, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfwscanf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int vswscanf (const wchar_t *__source, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vswscanf( __source, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) +int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfwscanf( (__acrt_iob_func(0)), __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfwscanf( __stream, __format, __local_argv ); +} + + + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int fwprintf (FILE *__stream, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfwprintf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) +int wprintf (const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfwprintf( (__acrt_iob_func(1)), __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int vfwprintf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfwprintf( __stream, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (1))) +int vwprintf (const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfwprintf( (__acrt_iob_func(1)), __format, __local_argv ); +} + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return __mingw_vsnwprintf( __stream, __n, __format, __local_argv ); +} +# 784 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag); + + + wint_t __attribute__((__cdecl__)) fgetwc(FILE *_File); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fgetwchar(void); + wint_t __attribute__((__cdecl__)) fputwc(wchar_t _Ch,FILE *_File); + __attribute__ ((__dllimport__)) wint_t __attribute__((__cdecl__)) _fputwchar(wchar_t _Ch); + wint_t __attribute__((__cdecl__)) getwc(FILE *_File); + wint_t __attribute__((__cdecl__)) getwchar(void); + wint_t __attribute__((__cdecl__)) putwc(wchar_t _Ch,FILE *_File); + wint_t __attribute__((__cdecl__)) putwchar(wchar_t _Ch); + wint_t __attribute__((__cdecl__)) ungetwc(wint_t _Ch,FILE *_File); + wchar_t *__attribute__((__cdecl__)) fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File); + int __attribute__((__cdecl__)) fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _getws(wchar_t *_String) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putws(const wchar_t *_Str); +# 848 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_l(wchar_t * __restrict__ ,size_t _SizeInWords,const wchar_t * __restrict__ _Format,_locale_t _Locale,... ) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) ; +# 1159 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_p(const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_p(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vswprintf_p(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_p(const wchar_t * __restrict__ _Format,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vscwprintf_p(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_p_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_c_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_p_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf_p_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_l(wchar_t * __restrict__ _DstBuf,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __swprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_l(wchar_t * __restrict__ _Dest,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __vswprintf_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,_locale_t _Plocinfo,va_list _Args) ; + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/swprintf.inl" 1 3 +# 25 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/swprintf.inl" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int vswprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, __builtin_va_list __local_argv) +{ + return vsnwprintf( __stream, __count, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (3))) +int swprintf (wchar_t *__stream, size_t __count, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; + + __builtin_va_start( __local_argv, __format ); + __retval = vswprintf( __stream, __count, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + + +extern "C++" { + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int vswprintf (wchar_t *__stream, const wchar_t *__format, __builtin_va_list __local_argv) +{ + + return __mingw_vswprintf( __stream, __format, __local_argv ); + + + +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) + __attribute__ ((__nonnull__ (2))) +int swprintf (wchar_t *__stream, const wchar_t *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; + + __builtin_va_start( __local_argv, __format ); + __retval = vswprintf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +} +# 1193 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 +# 1202 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscwprintf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwscanf_l(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swscanf_l(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_l(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wscanf_l(const wchar_t * __restrict__ _Format,_locale_t _Locale,...) ; + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfdopen(int _FileHandle ,const wchar_t *_Mode); + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode) ; + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) ; + + + + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _wpopen(const wchar_t *_Command,const wchar_t *_Mode); + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wremove(const wchar_t *_Filename); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wtmpnam(wchar_t *_Buffer); +# 1322 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsdup(const wchar_t *_Str); + wchar_t *__attribute__((__cdecl__)) wcscat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) ; + wchar_t *__attribute__((__cdecl__)) wcschr(const wchar_t *_Str,wchar_t _Ch); + int __attribute__((__cdecl__)) wcscmp(const wchar_t *_Str1,const wchar_t *_Str2); + wchar_t *__attribute__((__cdecl__)) wcscpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source) ; + size_t __attribute__((__cdecl__)) wcscspn(const wchar_t *_Str,const wchar_t *_Control); + size_t __attribute__((__cdecl__)) wcslen(const wchar_t *_Str); + size_t __attribute__((__cdecl__)) wcsnlen(const wchar_t *_Src,size_t _MaxCount); + wchar_t *__attribute__((__cdecl__)) wcsncat(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) ; + int __attribute__((__cdecl__)) wcsncmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); + wchar_t *__attribute__((__cdecl__)) wcsncpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) ; + wchar_t *__attribute__((__cdecl__)) _wcsncpy_l(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count,_locale_t _Locale) ; + wchar_t *__attribute__((__cdecl__)) wcspbrk(const wchar_t *_Str,const wchar_t *_Control); + wchar_t *__attribute__((__cdecl__)) wcsrchr(const wchar_t *_Str,wchar_t _Ch); + size_t __attribute__((__cdecl__)) wcsspn(const wchar_t *_Str,const wchar_t *_Control); + wchar_t *__attribute__((__cdecl__)) wcsstr(const wchar_t *_Str,const wchar_t *_SubStr); + + + + wchar_t *__attribute__((__cdecl__)) wcstok(wchar_t * __restrict__ _Str,const wchar_t * __restrict__ _Delim) ; + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcserror(int _ErrNum) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) __wcserror(const wchar_t *_Str) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicmp_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsrev(wchar_t *_Str); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsset(wchar_t *_Str,wchar_t _Val) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcslwr(wchar_t *_String) ; + __attribute__ ((__dllimport__)) wchar_t *_wcslwr_l(wchar_t *_String,_locale_t _Locale) ; + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcsupr(wchar_t *_String) ; + __attribute__ ((__dllimport__)) wchar_t *_wcsupr_l(wchar_t *_String,_locale_t _Locale) ; + size_t __attribute__((__cdecl__)) wcsxfrm(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _wcsxfrm_l(wchar_t * __restrict__ _Dst,const wchar_t * __restrict__ _Src,size_t _MaxCount,_locale_t _Locale); + int __attribute__((__cdecl__)) wcscoll(const wchar_t *_Str1,const wchar_t *_Str2); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcscoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsncoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsncoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicoll(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wcsnicoll_l(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount,_locale_t _Locale); + + + wchar_t *__attribute__((__cdecl__)) wcsdup(const wchar_t *_Str) ; + + int __attribute__((__cdecl__)) wcsicmp(const wchar_t *_Str1,const wchar_t *_Str2) ; + int __attribute__((__cdecl__)) wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount) ; + wchar_t *__attribute__((__cdecl__)) wcsnset(wchar_t *_Str,wchar_t _Val,size_t _MaxCount) ; + wchar_t *__attribute__((__cdecl__)) wcsrev(wchar_t *_Str) ; + wchar_t *__attribute__((__cdecl__)) wcsset(wchar_t *_Str,wchar_t _Val) ; + wchar_t *__attribute__((__cdecl__)) wcslwr(wchar_t *_Str) ; + wchar_t *__attribute__((__cdecl__)) wcsupr(wchar_t *_Str) ; + int __attribute__((__cdecl__)) wcsicoll(const wchar_t *_Str1,const wchar_t *_Str2) ; + + + + + + struct tm { + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + }; + + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wasctime(const struct tm *_Tm); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); + wchar_t *__attribute__((__cdecl__)) _wctime32(const __time32_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); + size_t __attribute__((__cdecl__)) wcsftime(wchar_t * __restrict__ _Buf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,const struct tm * __restrict__ _Tm); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _wcsftime_l(wchar_t * __restrict__ _Buf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,const struct tm * __restrict__ _Tm,_locale_t _Locale); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wstrdate(wchar_t *_Buffer) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wstrtime(wchar_t *_Buffer) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wctime64(const __time64_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); + + + + wchar_t *__attribute__((__cdecl__)) _wctime(const time_t *_Time) ; +# 1426 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + errno_t __attribute__((__cdecl__)) _wctime_s(wchar_t *, size_t, const time_t *); +# 1445 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 + typedef int mbstate_t; + + typedef wchar_t _Wint_t; + + wint_t __attribute__((__cdecl__)) btowc(int); + size_t __attribute__((__cdecl__)) mbrlen(const char * __restrict__ _Ch,size_t _SizeInBytes,mbstate_t * __restrict__ _State); + size_t __attribute__((__cdecl__)) mbrtowc(wchar_t * __restrict__ _DstCh,const char * __restrict__ _SrcCh,size_t _SizeInBytes,mbstate_t * __restrict__ _State); + size_t __attribute__((__cdecl__)) mbsrtowcs(wchar_t * __restrict__ _Dest,const char ** __restrict__ _PSrc,size_t _Count,mbstate_t * __restrict__ _State) ; + size_t __attribute__((__cdecl__)) wcrtomb(char * __restrict__ _Dest,wchar_t _Source,mbstate_t * __restrict__ _State) ; + size_t __attribute__((__cdecl__)) wcsrtombs(char * __restrict__ _Dest,const wchar_t ** __restrict__ _PSource,size_t _Count,mbstate_t * __restrict__ _State) ; + int __attribute__((__cdecl__)) wctob(wint_t _WCh); + + + wchar_t *__attribute__((__cdecl__)) wmemset(wchar_t *s, wchar_t c, size_t n); + wchar_t *__attribute__((__cdecl__)) wmemchr(const wchar_t *s, wchar_t c, size_t n); + int __attribute__((__cdecl__)) wmemcmp(const wchar_t *s1, const wchar_t *s2,size_t n); + wchar_t *__attribute__((__cdecl__)) wmemcpy(wchar_t * __restrict__ s1,const wchar_t * __restrict__ s2,size_t n) ; + wchar_t * __attribute__((__cdecl__)) wmempcpy (wchar_t *_Dst, const wchar_t *_Src, size_t _Size); + wchar_t *__attribute__((__cdecl__)) wmemmove(wchar_t *s1, const wchar_t *s2, size_t n) ; + int __attribute__((__cdecl__)) fwide(FILE *stream,int mode); + + + + + int __attribute__((__cdecl__)) mbsinit(const mbstate_t *ps); + + __extension__ long long __attribute__((__cdecl__)) wcstoll(const wchar_t * __restrict__ nptr,wchar_t ** __restrict__ endptr, int base); + __extension__ unsigned long long __attribute__((__cdecl__)) wcstoull(const wchar_t * __restrict__ nptr,wchar_t ** __restrict__ endptr, int base); + + + void *__attribute__((__cdecl__)) memmove(void *_Dst,const void *_Src,size_t _MaxCount); + void *__attribute__((__cdecl__)) memcpy(void * __restrict__ _Dst,const void * __restrict__ _Src,size_t _MaxCount) ; +# 1528 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +int __attribute__((__cdecl__)) __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen); +# 1542 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +int __attribute__((__cdecl__)) __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen); +# 1551 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 3 +void __attribute__((__cdecl__)) __mingw_str_free(void *ptr); + + + + +} + + +#pragma pack(pop) + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 1 3 +# 9 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 2 3 +# 21 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 3 +extern "C" { + + + + + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _waccess_s (const wchar_t *_Filename,int _AccessMode); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wmktemp_s (wchar_t *_TemplateName,size_t _SizeInWords); + + + + + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _cgetws_s (wchar_t *_Buffer,size_t _SizeInWords,size_t *_SizeRead); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _cwprintf_s (const wchar_t *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwscanf_s(const wchar_t *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _cwscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vcwprintf_s (const wchar_t *_Format,va_list _ArgList); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _cwprintf_s_l (const wchar_t *_Format,_locale_t _Locale,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vcwprintf_s_l (const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _getws_s(wchar_t *_Str,size_t _SizeInWords); + extern "C++" { template inline wchar_t* __attribute__((__cdecl__)) _getws_s(wchar_t (&_DstBuf)[__size]) { return _getws_s(_DstBuf,__size); } } +# 249 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 3 + int __attribute__((__cdecl__)) fwprintf_s(FILE *_File,const wchar_t *_Format,...); + int __attribute__((__cdecl__)) wprintf_s(const wchar_t *_Format,...); + int __attribute__((__cdecl__)) vfwprintf_s(FILE *_File,const wchar_t *_Format,va_list _ArgList); + int __attribute__((__cdecl__)) vwprintf_s(const wchar_t *_Format,va_list _ArgList); + + int __attribute__((__cdecl__)) vswprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); + + int __attribute__((__cdecl__)) swprintf_s(wchar_t *_Dst,size_t _SizeInWords,const wchar_t *_Format,...); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_s(wchar_t *_DstBuf,size_t _DstSizeInWords,size_t _MaxCount,const wchar_t *_Format,...); + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wprintf_s_l(const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vwprintf_s_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfwprintf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vswprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnwprintf_s_l(wchar_t *_DstBuf,size_t _DstSize,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fwscanf_s_l(FILE *_File,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) fwscanf_s(FILE *_File, const wchar_t *_Format, ...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _swscanf_s_l(const wchar_t *_Src,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) swscanf_s(const wchar_t *_Src,const wchar_t *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_s(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snwscanf_s_l(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _wscanf_s_l(const wchar_t *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) wscanf_s(const wchar_t *_Format, ...); + + + extern "C++" { template inline int __attribute__((__cdecl__)) vswprintf_s(wchar_t (&_Dst)[__size], const wchar_t* _Format, va_list _ArgList) { return vswprintf_s(_Dst,__size,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) swprintf_s(wchar_t (&_Dst)[__size], const wchar_t* _Format, ...) { va_list __vaargs; __builtin_va_start(__vaargs,_Format); int __retval = vswprintf_s(_Dst,__size,_Format,__vaargs); __builtin_va_end(__vaargs); return __retval; } } + extern "C++" { template inline int __attribute__((__cdecl__)) _vsnwprintf_s(wchar_t (&_DstBuf)[__size], size_t _MaxCount, const wchar_t* _Format, va_list _ArgList) { return _vsnwprintf_s(_DstBuf,__size,_MaxCount,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) _snwprintf_s(wchar_t (&_DstBuf)[__size], size_t _MaxCount, const wchar_t* _Format, ...) { va_list __vaargs; __builtin_va_start(__vaargs,_Format); int __retval = _vsnwprintf_s(_DstBuf,__size,_MaxCount,_Format,__vaargs); __builtin_va_end(__vaargs); return __retval; } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wfopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wfreopen_s(FILE **_File,const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wtmpnam_s(wchar_t *_DstBuf,size_t _SizeInWords); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wtmpnam_s(wchar_t (&_DstBuf)[__size]) { return _wtmpnam_s(_DstBuf,__size); } } + + + + + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) wcstok_s(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcserror_s(wchar_t *_Buf,size_t _SizeInWords,int _ErrNum); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) __wcserror_s(wchar_t *_Buffer,size_t _SizeInWords,const wchar_t *_ErrMsg); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsnset_s(wchar_t *_Dst,size_t _DstSizeInWords,wchar_t _Val,size_t _MaxCount); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsset_s(wchar_t *_Str,size_t _SizeInWords,wchar_t _Val); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcslwr_s(wchar_t *_Str,size_t _SizeInWords); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcslwr_s(wchar_t (&_Str)[__size]) { return _wcslwr_s(_Str,__size); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcslwr_s_l(wchar_t *_Str,size_t _SizeInWords,_locale_t _Locale); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcslwr_s_l(wchar_t (&_Str)[__size], _locale_t _Locale) { return _wcslwr_s_l(_Str,__size,_Locale); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsupr_s(wchar_t *_Str,size_t _Size); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcsupr_s(wchar_t (&_Str)[__size]) { return _wcsupr_s(_Str,__size); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsupr_s_l(wchar_t *_Str,size_t _Size,_locale_t _Locale); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) _wcsupr_s_l(wchar_t (&_Str)[__size], _locale_t _Locale) { return _wcsupr_s_l(_Str,__size,_Locale); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcscat_s(wchar_t *_Dst, rsize_t _DstSize, const wchar_t *_Src); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcscat_s(wchar_t (&_Dest)[__size], const wchar_t * _Source) { return wcscat_s(_Dest,__size,_Source); } } + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcscpy_s(wchar_t *_Dst, rsize_t _DstSize, const wchar_t *_Src); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcscpy_s(wchar_t (&_Dest)[__size], const wchar_t * _Source) { return wcscpy_s(_Dest,__size,_Source); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsncat_s(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsncat_s_l(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsncpy_s(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsncpy_s_l(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount,_locale_t _Locale); + __attribute__ ((__dllimport__)) wchar_t *__attribute__((__cdecl__)) _wcstok_s_l(wchar_t *_Str,const wchar_t *_Delim,wchar_t **_Context,_locale_t _Locale); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val,_locale_t _Locale); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _wcsnset_s_l(wchar_t *_Str,size_t _SizeInChars,unsigned int _Val, size_t _Count,_locale_t _Locale); + + inline __attribute__((__always_inline__)) size_t __attribute__((__cdecl__)) wcsnlen_s(const wchar_t * _src, size_t _count) { + return _src ? wcsnlen(_src, _count) : 0; + } + + + + + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wasctime_s (wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wctime32_s (wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wstrdate_s (wchar_t *_Buf,size_t _SizeInWords); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wstrtime_s (wchar_t *_Buf,size_t _SizeInWords); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _wctime64_s (wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time); +# 344 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/wchar_s.h" 3 + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) mbsrtowcs_s(size_t *_Retval,wchar_t *_Dst,size_t _SizeInWords,const char **_PSrc,size_t _N,mbstate_t *_State); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) mbsrtowcs_s(size_t* _Retval, wchar_t (&_Dst)[__size], const char** _PSrc, size_t _N, mbstate_t _State) { return mbsrtowcs_s(_Retval, _Dst, __size, _PSrc, _N, _State); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcrtomb_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,wchar_t _Ch,mbstate_t *_State); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcrtomb_s(size_t* _Retval, char (&_Dst)[__size], wchar_t _Ch, mbstate_t _State) { return wcrtomb_s(_Retval, _Dst, __size, _Ch, _State); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) wcsrtombs_s(size_t *_Retval,char *_Dst,size_t _SizeInBytes,const wchar_t **_Src,size_t _Size,mbstate_t *_State); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) wcsrtombs_s(size_t _Retval, char (&_Dst)[__size], const wchar_t** _Src, size_t _Size, mbstate_t _State) { return wcsrtombs_s(_Retval, _Dst, __size, _Src, _Size, _State); } } + + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) wmemcpy_s (wchar_t *_dest,size_t _numberOfElements,const wchar_t *_src,size_t _count); + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) wmemmove_s(wchar_t *_dest,size_t _numberOfElements,const wchar_t *_src,size_t _count); + + + +} +# 1562 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/wchar.h" 2 3 +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 2 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +namespace std +{ + using ::mbstate_t; +} +# 135 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +extern "C++" +{ +namespace std +{ + + + using ::wint_t; + + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + + using ::swprintf; + + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + + using ::vfwscanf; + + + using ::vswprintf; + + + using ::vswscanf; + + using ::vwprintf; + + using ::vwscanf; + + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + + using ::wcstof; + + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; + + + inline wchar_t* + wcschr(wchar_t* __p, wchar_t __c) + { return wcschr(const_cast(__p), __c); } + + inline wchar_t* + wcspbrk(wchar_t* __s1, const wchar_t* __s2) + { return wcspbrk(const_cast(__s1), __s2); } + + inline wchar_t* + wcsrchr(wchar_t* __p, wchar_t __c) + { return wcsrchr(const_cast(__p), __c); } + + inline wchar_t* + wcsstr(wchar_t* __s1, const wchar_t* __s2) + { return wcsstr(const_cast(__s1), __s2); } + + inline wchar_t* + wmemchr(wchar_t* __p, wchar_t __c, size_t __n) + { return wmemchr(const_cast(__p), __c, __n); } + + + +} +} + + + + + + + +namespace __gnu_cxx +{ + + + + + + using ::wcstold; +# 260 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + using ::wcstoll; + using ::wcstoull; + +} + +namespace std +{ + using ::__gnu_cxx::wcstold; + using ::__gnu_cxx::wcstoll; + using ::__gnu_cxx::wcstoull; +} +# 280 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +namespace std +{ + + using std::wcstof; + + + using std::vfwscanf; + + + using std::vswscanf; + + + using std::vwscanf; + + + + using std::wcstold; + using std::wcstoll; + using std::wcstoull; + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 2 3 +# 68 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 +namespace std +{ + +# 90 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + typedef long long streamoff; + + + + + + + + typedef ptrdiff_t streamsize; +# 111 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + template + class fpos + { + private: + streamoff _M_off; + _StateT _M_state; + + public: + + + + + fpos() + : _M_off(0), _M_state() { } +# 133 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/postypes.h" 3 + fpos(streamoff __off) + : _M_off(__off), _M_state() { } + + + fpos(const fpos&) = default; + fpos& operator=(const fpos&) = default; + ~fpos() = default; + + + + operator streamoff() const { return _M_off; } + + + void + state(_StateT __st) + { _M_state = __st; } + + + _StateT + state() const + { return _M_state; } + + + + + + fpos& + operator+=(streamoff __off) + { + _M_off += __off; + return *this; + } + + + + + + fpos& + operator-=(streamoff __off) + { + _M_off -= __off; + return *this; + } + + + + + + + + fpos + operator+(streamoff __off) const + { + fpos __pos(*this); + __pos += __off; + return __pos; + } + + + + + + + + fpos + operator-(streamoff __off) const + { + fpos __pos(*this); + __pos -= __off; + return __pos; + } + + + + + + + streamoff + operator-(const fpos& __other) const + { return _M_off - __other._M_off; } + }; + + + + + + + template + inline bool + operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) == streamoff(__rhs); } + + template + inline bool + operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) != streamoff(__rhs); } + + + + + + typedef fpos streampos; + + typedef fpos wstreampos; + + + + typedef fpos u8streampos; + + + + + typedef fpos u16streampos; + + typedef fpos u32streampos; + + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 2 3 + +namespace std +{ + +# 74 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iosfwd" 3 + class ios_base; + + template > + class basic_ios; + + template > + class basic_streambuf; + + template > + class basic_istream; + + template > + class basic_ostream; + + template > + class basic_iostream; + + +namespace __cxx11 { + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + +} + + template > + class basic_filebuf; + + template > + class basic_ifstream; + + template > + class basic_ofstream; + + template > + class basic_fstream; + + template > + class istreambuf_iterator; + + template > + class ostreambuf_iterator; + + + + typedef basic_ios ios; + + + typedef basic_streambuf streambuf; + + + typedef basic_istream istream; + + + typedef basic_ostream ostream; + + + typedef basic_iostream iostream; + + + typedef basic_stringbuf stringbuf; + + + typedef basic_istringstream istringstream; + + + typedef basic_ostringstream ostringstream; + + + typedef basic_stringstream stringstream; + + + typedef basic_filebuf filebuf; + + + typedef basic_ifstream ifstream; + + + typedef basic_ofstream ofstream; + + + typedef basic_fstream fstream; + + + + typedef basic_ios wios; + + + typedef basic_streambuf wstreambuf; + + + typedef basic_istream wistream; + + + typedef basic_ostream wostream; + + + typedef basic_iostream wiostream; + + + typedef basic_stringbuf wstringbuf; + + + typedef basic_istringstream wistringstream; + + + typedef basic_ostringstream wostringstream; + + + typedef basic_stringstream wstringstream; + + + typedef basic_filebuf wfilebuf; + + + typedef basic_ifstream wifstream; + + + typedef basic_ofstream wofstream; + + + typedef basic_fstream wfstream; + + + + +} +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 3 + + + +namespace std +{ + + + + + + + + + template, typename _Dist = ptrdiff_t> + class istream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + private: + istream_type* _M_stream; + _Tp _M_value; + + + + bool _M_ok; + + public: + + constexpr istream_iterator() + : _M_stream(0), _M_value(), _M_ok(false) {} + + + istream_iterator(istream_type& __s) + : _M_stream(std::__addressof(__s)), _M_ok(true) + { _M_read(); } + + istream_iterator(const istream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_value(__obj._M_value), + _M_ok(__obj._M_ok) + { } + + + constexpr + istream_iterator(default_sentinel_t) + noexcept(is_nothrow_default_constructible_v<_Tp>) + : istream_iterator() { } + + + + istream_iterator& operator=(const istream_iterator&) = default; + ~istream_iterator() = default; + + + const _Tp& + operator*() const + { + + + ; + return _M_value; + } + + const _Tp* + operator->() const { return std::__addressof((operator*())); } + + istream_iterator& + operator++() + { + + + ; + _M_read(); + return *this; + } + + istream_iterator + operator++(int) + { + + + ; + istream_iterator __tmp = *this; + _M_read(); + return __tmp; + } + + private: + bool + _M_equal(const istream_iterator& __x) const + { + + + return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); + } + + void + _M_read() + { + if (_M_stream && !(*_M_stream >> _M_value)) + { + _M_stream = 0; + _M_ok = false; + } + } + + + + friend bool + operator==(const istream_iterator& __x, const istream_iterator& __y) + { return __x._M_equal(__y); } + + + + friend bool + operator!=(const istream_iterator& __x, const istream_iterator& __y) + { return !__x._M_equal(__y); } + + + friend bool + operator==(const istream_iterator& __i, default_sentinel_t) + { return !__i._M_stream; } + + }; +# 174 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 3 + template > + class ostream_iterator + : public iterator + { + public: + + + + using difference_type = ptrdiff_t; + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + private: + ostream_type* _M_stream; + const _CharT* _M_string; + + public: + + constexpr ostream_iterator() noexcept + : _M_stream(nullptr), _M_string(nullptr) { } + + + + ostream_iterator(ostream_type& __s) + : _M_stream(std::__addressof(__s)), _M_string(0) {} +# 214 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stream_iterator.h" 3 + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(std::__addressof(__s)), _M_string(__c) { } + + + ostream_iterator(const ostream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } + + + ostream_iterator& operator=(const ostream_iterator&) = default; + + + + + ostream_iterator& + operator=(const _Tp& __value) + { + + + ; + *_M_stream << __value; + if (_M_string) + *_M_stream << _M_string; + return *this; + } + + ostream_iterator& + operator*() + { return *this; } + + ostream_iterator& + operator++() + { return *this; } + + ostream_iterator& + operator++(int) + { return *this; } + }; + + + + +} +# 66 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++locale.h" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++locale.h" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++locale.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 3 + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 1 3 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +#pragma pack(push,_CRT_PACKING) + + + + + + + + + + + +extern "C" { +# 93 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +__attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __acrt_iob_func(unsigned index); + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) __iob_func(void); +# 115 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __extension__ typedef long long fpos_t; +# 156 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +extern + __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp); +extern + __attribute__((__format__ (gnu_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_scanf(const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vscanf(const char * __restrict__ Format, va_list argp); +extern + __attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp); + +extern + __attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_vsnprintf(char * __restrict__ _DstBuf,size_t _MaxCount,const char * __restrict__ _Format, + va_list _ArgList); +extern + __attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) + int __attribute__((__cdecl__)) __mingw_snprintf(char * __restrict__ s, size_t n, const char * __restrict__ format, ...); +extern + __attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __mingw_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __mingw_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__((nonnull (1,2))) + int __attribute__((__cdecl__)) __mingw_asprintf(char ** __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__((nonnull (1,2))) + int __attribute__((__cdecl__)) __mingw_vasprintf(char ** __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); + +extern + __attribute__((__format__ (ms_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (ms_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_scanf(const char * __restrict__ _Format,...); +extern + __attribute__((__format__ (ms_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...); + +extern + __attribute__((__format__ (ms_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) + int __attribute__((__cdecl__)) __ms_vprintf (const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_sprintf (char * __restrict__ , const char * __restrict__ , ...) __attribute__ ((__nothrow__)); +extern + __attribute__((__format__ (ms_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) + int __attribute__((__cdecl__)) __ms_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __attribute__ ((__nothrow__)); +# 285 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +extern "C++" { + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) +int sscanf(const char *__source, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsscanf( __source, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 1, 2))) __attribute__ ((__nonnull__ (1))) +int scanf(const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfscanf( (__acrt_iob_func(0)), __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 2, 3))) __attribute__ ((__nonnull__ (2))) +int fscanf(FILE *__stream, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfscanf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) +int vsscanf (const char *__source, const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vsscanf( __source, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 1, 0))) __attribute__ ((__nonnull__ (1))) +int vscanf(const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfscanf( (__acrt_iob_func(0)), __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_scanf, 2, 0))) __attribute__ ((__nonnull__ (2))) +int vfscanf (FILE *__stream, const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfscanf( __stream, __format, __local_argv ); +} + + +#pragma GCC diagnostic pop + + + + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) +int fprintf (FILE *__stream, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfprintf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1))) +int printf (const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vfprintf( (__acrt_iob_func(1)), __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} +# 394 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 2, 3))) __attribute__ ((__nonnull__ (2))) +int sprintf (char *__stream, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsprintf( __stream, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) +int vfprintf (FILE *__stream, const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfprintf( __stream, __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 1, 0))) __attribute__ ((__nonnull__ (1))) +int vprintf (const char *__format, __builtin_va_list __local_argv) +{ + return __mingw_vfprintf( (__acrt_iob_func(1)), __format, __local_argv ); +} + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 2, 0))) __attribute__ ((__nonnull__ (2))) +int vsprintf (char *__stream, const char *__format, __builtin_va_list __local_argv) +{ +# 433 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + return __mingw_vsprintf( __stream, __format, __local_argv ); +} +# 449 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) +int snprintf (char *__stream, size_t __n, const char *__format, ...) +{ + int __retval; + __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format ); + __retval = __mingw_vsnprintf( __stream, __n, __format, __local_argv ); + __builtin_va_end( __local_argv ); + return __retval; +} + + + +static __attribute__ ((__unused__)) __inline__ __attribute__((__cdecl__)) +__attribute__((__format__ (gnu_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) +int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_list __local_argv) +{ + + + + return __mingw_vsnprintf( __stream, __n, __format, __local_argv ); +} +# 479 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 +} +# 603 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _filbuf(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _flsbuf(int _Ch,FILE *_File); + + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fsopen(const char *_Filename,const char *_Mode,int _ShFlag); + + void __attribute__((__cdecl__)) clearerr(FILE *_File); + int __attribute__((__cdecl__)) fclose(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fcloseall(void); + + + + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _fdopen(int _FileHandle,const char *_Mode); + + int __attribute__((__cdecl__)) feof(FILE *_File); + int __attribute__((__cdecl__)) ferror(FILE *_File); + int __attribute__((__cdecl__)) fflush(FILE *_File); + int __attribute__((__cdecl__)) fgetc(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fgetchar(void); + int __attribute__((__cdecl__)) fgetpos(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); + int __attribute__((__cdecl__)) fgetpos64(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); + char *__attribute__((__cdecl__)) fgets(char * __restrict__ _Buf,int _MaxCount,FILE * __restrict__ _File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fileno(FILE *_File); + + + + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _tempnam(const char *_DirName,const char *_FilePrefix); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _flushall(void); + FILE *__attribute__((__cdecl__)) fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) ; + FILE *fopen64(const char * __restrict__ filename,const char * __restrict__ mode); + int __attribute__((__cdecl__)) fputc(int _Ch,FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fputchar(int _Ch); + int __attribute__((__cdecl__)) fputs(const char * __restrict__ _Str,FILE * __restrict__ _File); + size_t __attribute__((__cdecl__)) fread(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File); + FILE *__attribute__((__cdecl__)) freopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode,FILE * __restrict__ _File) ; + int __attribute__((__cdecl__)) fsetpos(FILE *_File,const fpos_t *_Pos); + int __attribute__((__cdecl__)) fsetpos64(FILE *_File,const fpos_t *_Pos); + int __attribute__((__cdecl__)) fseek(FILE *_File,long _Offset,int _Origin); + long __attribute__((__cdecl__)) ftell(FILE *_File); + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fseeki64(FILE *_File,long long _Offset,int _Origin); + __attribute__ ((__dllimport__)) long long __attribute__((__cdecl__)) _ftelli64(FILE *_File); +# 662 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + int fseeko64(FILE* stream, _off64_t offset, int whence); + int fseeko(FILE* stream, _off_t offset, int whence); + + _off_t ftello(FILE * stream); + _off64_t ftello64(FILE * stream); +# 683 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + size_t __attribute__((__cdecl__)) fwrite(const void * __restrict__ _Str,size_t _Size,size_t _Count,FILE * __restrict__ _File); + int __attribute__((__cdecl__)) getc(FILE *_File); + int __attribute__((__cdecl__)) getchar(void); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _getmaxstdio(void); + char *__attribute__((__cdecl__)) gets(char *_Buffer) ; + int __attribute__((__cdecl__)) _getw(FILE *_File); + + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _pclose(FILE *_File); + __attribute__ ((__dllimport__)) FILE *__attribute__((__cdecl__)) _popen(const char *_Command,const char *_Mode); + + + + + + int __attribute__((__cdecl__)) putc(int _Ch,FILE *_File); + int __attribute__((__cdecl__)) putchar(int _Ch); + int __attribute__((__cdecl__)) puts(const char *_Str); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _putw(int _Word,FILE *_File); + + + int __attribute__((__cdecl__)) remove(const char *_Filename); + int __attribute__((__cdecl__)) rename(const char *_OldFilename,const char *_NewFilename); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _unlink(const char *_Filename); + + int __attribute__((__cdecl__)) unlink(const char *_Filename) ; + + + void __attribute__((__cdecl__)) rewind(FILE *_File); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _rmtmp(void); + void __attribute__((__cdecl__)) setbuf(FILE * __restrict__ _File,char * __restrict__ _Buffer) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _setmaxstdio(int _Max); + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _set_output_format(unsigned int _Format); + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) _get_output_format(void); + int __attribute__((__cdecl__)) setvbuf(FILE * __restrict__ _File,char * __restrict__ _Buf,int _Mode,size_t _Size); +# 743 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf(const char * __restrict__ _Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const char * __restrict__ _Format,...) ; + + FILE *__attribute__((__cdecl__)) tmpfile(void) ; + char *__attribute__((__cdecl__)) tmpnam(char *_Buffer); + int __attribute__((__cdecl__)) ungetc(int _Ch,FILE *_File); +# 765 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__((__format__ (ms_printf, 3, 4))) __attribute__ ((__nonnull__ (3))) + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...) ; + __attribute__((__format__ (ms_printf, 3, 0))) __attribute__ ((__nonnull__ (3))) + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) ; +# 924 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf(const char * __restrict__ _Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _set_printf_count_output(int _Value); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _get_printf_count_output(void); +# 1442 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _lock_file(FILE *_File); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _unlock_file(FILE *_File); +# 1460 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + char *__attribute__((__cdecl__)) tempnam(const char *_Directory,const char *_FilePrefix) ; + int __attribute__((__cdecl__)) fcloseall(void) ; + FILE *__attribute__((__cdecl__)) fdopen(int _FileHandle,const char *_Format) ; + int __attribute__((__cdecl__)) fgetchar(void) ; + int __attribute__((__cdecl__)) fileno(FILE *_File) ; + int __attribute__((__cdecl__)) flushall(void) ; + int __attribute__((__cdecl__)) fputchar(int _Ch) ; + int __attribute__((__cdecl__)) getw(FILE *_File) ; + int __attribute__((__cdecl__)) putw(int _Ch,FILE *_File) ; + int __attribute__((__cdecl__)) rmtmp(void) ; +# 1540 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 3 + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); + + + + +} + + + + + + + +#pragma pack(pop) + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 1 3 +# 9 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 2 3 +# 21 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 3 +extern "C" { + + + + + + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) clearerr_s(FILE *_File); + + size_t __attribute__((__cdecl__)) fread_s(void *_DstBuf,size_t _DstSize,size_t _ElementSize,size_t _Count,FILE *_File); +# 494 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 3 + int __attribute__((__cdecl__)) fprintf_s(FILE *_File,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fscanf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) fscanf_s(FILE *_File, const char *_Format, ...); + int __attribute__((__cdecl__)) printf_s(const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scanf_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scanf_s_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) scanf_s(const char *_Format, ...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_c(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fscanf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sscanf_l(const char *_Src,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sscanf_s_l(const char *_Src,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) sscanf_s(const char *_Src,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_s(const char *_Src,size_t _MaxCount,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snscanf_s_l(const char *_Src,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + int __attribute__((__cdecl__)) vfprintf_s(FILE *_File,const char *_Format,va_list _ArgList); + int __attribute__((__cdecl__)) vprintf_s(const char *_Format,va_list _ArgList); + + int __attribute__((__cdecl__)) vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,va_list _ArgList); + + __attribute__((dllimport)) int __attribute__((__cdecl__)) vsprintf_s(char *_DstBuf,size_t _Size,const char *_Format,va_list _ArgList); + + __attribute__((dllimport)) int __attribute__((__cdecl__)) sprintf_s(char *_DstBuf,size_t _DstSize,const char *_Format,...); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_s(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,...); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_p(FILE *_File,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_p(const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_p(FILE *_File,const char *_Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_p(const char *_Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_p(char *_Dst,size_t _MaxCount,const char *_Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_p(const char *_Format,...); + __attribute__((dllimport)) int __attribute__((__cdecl__)) _vscprintf_p(const char *_Format,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_p_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_p_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_l(char *_DstBuf,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_l(char *_DstBuf,const char *_Format,_locale_t,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_p_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _scprintf_p_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vscprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _printf_s_l(const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vprintf_s_l(const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _fprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vfprintf_s_l(FILE *_File,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _sprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsprintf_s_l(char *_DstBuf,size_t _DstSize,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_s_l(char *_DstBuf,size_t _DstSize,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _snprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,...); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_l(char *_DstBuf,size_t _MaxCount,const char *_Format,_locale_t _Locale,va_list _ArgList); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _vsnprintf_c_l(char *_DstBuf,size_t _MaxCount,const char *,_locale_t _Locale,va_list _ArgList); + + + extern "C++" { template inline int __attribute__((__cdecl__)) vsnprintf_s(char (&_DstBuf)[__size], size_t _MaxCount, const char* _Format, va_list _ArgList) { return vsnprintf_s(_DstBuf,__size,_MaxCount,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) _vsnprintf_s(char (&_DstBuf)[__size], size_t _MaxCount, const char* _Format, va_list _ArgList) { return _vsnprintf_s(_DstBuf,__size,_MaxCount,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) vsprintf_s(char (&_DstBuf)[__size], const char* _Format, va_list _ArgList) { return vsprintf_s(_DstBuf,__size,_Format,_ArgList); } } + extern "C++" { template inline int __attribute__((__cdecl__)) sprintf_s(char (&_DstBuf)[__size], const char* _Format, ...) { va_list __vaargs; __builtin_va_start(__vaargs,_Format); int __retval = vsprintf_s(_DstBuf,__size,_Format,__vaargs); __builtin_va_end(__vaargs); return __retval; } } + extern "C++" { template inline int __attribute__((__cdecl__)) _snprintf_s(char (&_DstBuf)[__size], size_t _MaxCount, const char* _Format, ...) { va_list __vaargs; __builtin_va_start(__vaargs,_Format); int __retval = _vsnprintf_s(_DstBuf,__size,_MaxCount,_Format,__vaargs); __builtin_va_end(__vaargs); return __retval; } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) fopen_s(FILE **_File,const char *_Filename,const char *_Mode); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) freopen_s(FILE** _File, const char *_Filename, const char *_Mode, FILE *_Stream); + + __attribute__ ((__dllimport__)) char* __attribute__((__cdecl__)) gets_s(char*,rsize_t); + extern "C++" { template inline char* __attribute__((__cdecl__)) get_s(char (&_DstBuf)[__size]) { return get_s(_DstBuf,__size); } } + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) tmpnam_s(char*,rsize_t); + extern "C++" { template inline errno_t __attribute__((__cdecl__)) tmpnam_s(char (&_DstBuf)[__size]) { return tmpnam_s(_DstBuf,__size); } } +# 872 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/stdio_s.h" 3 +} +# 1559 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdio.h" 2 3 +# 13 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 2 3 + + +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 45 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 3 + struct lconv { + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + + wchar_t* _W_decimal_point; + wchar_t* _W_thousands_sep; + wchar_t* _W_int_curr_symbol; + wchar_t* _W_currency_symbol; + wchar_t* _W_mon_decimal_point; + wchar_t* _W_mon_thousands_sep; + wchar_t* _W_positive_sign; + wchar_t* _W_negative_sign; + + }; +# 89 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 3 + int __attribute__((__cdecl__)) _configthreadlocale(int _Flag); + char *__attribute__((__cdecl__)) setlocale(int _Category,const char *_Locale); + __attribute__ ((__dllimport__)) struct lconv *__attribute__((__cdecl__)) localeconv(void); + __attribute__ ((__dllimport__)) _locale_t __attribute__((__cdecl__)) _get_current_locale(void); + __attribute__ ((__dllimport__)) _locale_t __attribute__((__cdecl__)) _create_locale(int _Category,const char *_Locale); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _free_locale(_locale_t _Locale); + _locale_t __attribute__((__cdecl__)) __get_current_locale(void); + _locale_t __attribute__((__cdecl__)) __create_locale(int _Category,const char *_Locale); + void __attribute__((__cdecl__)) __free_locale(_locale_t _Locale); + + __attribute__ ((__dllimport__)) unsigned int __attribute__((__cdecl__)) ___lc_codepage_func(void); +# 113 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/locale.h" 3 +} + + +#pragma pack(pop) +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 2 3 +# 51 "D:/compilers/msys64/mingw64/include/c++/11.2.0/clocale" 3 +namespace std +{ + using ::lconv; + using ::setlocale; + using ::localeconv; +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++locale.h" 2 3 + + + +namespace std +{ + + + typedef int* __c_locale; + + + + + + inline int + __convert_from_v(const __c_locale&, char* __out, + const int __size __attribute__((__unused__)), + const char* __fmt, ...) + { + char* __old = std::setlocale(4, 0); + char* __sav = 0; + if (__builtin_strcmp(__old, "C")) + { + const size_t __len = __builtin_strlen(__old) + 1; + __sav = new char[__len]; + __builtin_memcpy(__sav, __old, __len); + std::setlocale(4, "C"); + } + + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + + + const int __ret = __mingw_vsnprintf(__out, __size, __fmt, __args); + + + + + __builtin_va_end(__args); + + if (__sav) + { + std::setlocale(4, __sav); + delete [] __sav; + } + return __ret; + } + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 3 + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 1 3 +# 12 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 3 +extern "C" { +# 80 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 3 + extern const unsigned char __newclmap[]; + extern const unsigned char __newcumap[]; + extern pthreadlocinfo __ptlocinfo; + extern pthreadmbcinfo __ptmbcinfo; + extern int __globallocalestatus; + extern int __locale_changed; + extern struct threadlocaleinfostruct __initiallocinfo; + extern _locale_tstruct __initiallocalestructinfo; + pthreadlocinfo __attribute__((__cdecl__)) __updatetlocinfo(void); + pthreadmbcinfo __attribute__((__cdecl__)) __updatetmbcinfo(void); +# 108 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 3 + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isctype(int _C,int _Type); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isctype_l(int _C,int _Type,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isalpha(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isalpha_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isupper(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isupper_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) islower(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _islower_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isdigit(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isdigit_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isxdigit(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isxdigit_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isspace(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isspace_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) ispunct(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _ispunct_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isalnum(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isalnum_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isprint(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isprint_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) isgraph(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _isgraph_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) iscntrl(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _iscntrl_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) toupper(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) tolower(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _tolower(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _tolower_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _toupper(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _toupper_l(int _C,_locale_t _Locale); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __isascii(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __toascii(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __iscsymf(int _C); + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) __iscsym(int _C); + + +int __attribute__((__cdecl__)) isblank(int _C); +# 297 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/ctype.h" 3 +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 2 3 +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cctype" 3 +namespace std +{ + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; +} + + + + + + + +namespace std +{ + using ::isblank; +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 2 3 + +namespace std +{ + +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/localefwd.h" 3 + class locale; + + template + bool + has_facet(const locale&) throw(); + + template + const _Facet& + use_facet(const locale&); + + + template + bool + isspace(_CharT, const locale&); + + template + bool + isprint(_CharT, const locale&); + + template + bool + iscntrl(_CharT, const locale&); + + template + bool + isupper(_CharT, const locale&); + + template + bool + islower(_CharT, const locale&); + + template + bool + isalpha(_CharT, const locale&); + + template + bool + isdigit(_CharT, const locale&); + + template + bool + ispunct(_CharT, const locale&); + + template + bool + isxdigit(_CharT, const locale&); + + template + bool + isalnum(_CharT, const locale&); + + template + bool + isgraph(_CharT, const locale&); + + + template + bool + isblank(_CharT, const locale&); + + + template + _CharT + toupper(_CharT, const locale&); + + template + _CharT + tolower(_CharT, const locale&); + + + struct ctype_base; + template + class ctype; + template<> class ctype; + + template<> class ctype; + + template + class ctype_byname; + + + class codecvt_base; + template + class codecvt; + template<> class codecvt; + + template<> class codecvt; + + + template<> class codecvt; + template<> class codecvt; + + template<> class codecvt; + template<> class codecvt; + + + template + class codecvt_byname; + + + + template > + class num_get; + template > + class num_put; + +namespace __cxx11 { + template class numpunct; + template class numpunct_byname; +} + +namespace __cxx11 { + + template + class collate; + template + class collate_byname; +} + + + class time_base; +namespace __cxx11 { + template > + class time_get; + template > + class time_get_byname; +} + template > + class time_put; + template > + class time_put_byname; + + + class money_base; +namespace __cxx11 { + template > + class money_get; + template > + class money_put; +} +namespace __cxx11 { + template + class moneypunct; + template + class moneypunct_byname; +} + + + struct messages_base; +namespace __cxx11 { + template + class messages; + template + class messages_byname; +} + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr.h" 1 3 +# 30 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr.h" 3 +#pragma GCC visibility push(default) +# 148 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 1 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 1 3 4 +# 13 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 3 4 +extern "C" { +# 24 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 3 4 + __attribute__ ((__dllimport__)) extern unsigned long __attribute__((__cdecl__)) __threadid(void); + + __attribute__ ((__dllimport__)) extern uintptr_t __attribute__((__cdecl__)) __threadhandle(void); + + +} +# 424 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 3 4 +typedef struct { + long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); + long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); +} max_align_t; +# 2 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 2 3 4 +# 63 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/types.h" 1 3 +# 62 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/types.h" 3 +__extension__ +typedef long long _pid_t; + + + + +typedef _pid_t pid_t; + + + + + +typedef unsigned short _mode_t; + + +typedef _mode_t mode_t; + + + + + + +typedef unsigned int useconds_t; + + + + +struct timespec { + time_t tv_sec; + long tv_nsec; +}; + +struct itimerspec { + struct timespec it_interval; + struct timespec it_value; +}; + + + + + +__extension__ +typedef unsigned long long _sigset_t; +# 65 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_startup.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/corecrt_startup.h" 3 +extern "C" { + + +__attribute__ ((__dllimport__)) char **__attribute__((__cdecl__)) __p__acmdln(void); + + +__attribute__ ((__dllimport__)) wchar_t **__attribute__((__cdecl__)) __p__wcmdln(void); + + +typedef void (__attribute__((__cdecl__)) *_PVFV)(void); +typedef int (__attribute__((__cdecl__)) *_PIFV)(void); +typedef void (__attribute__((__cdecl__)) *_PVFI)(int); + +typedef struct _onexit_table_t { + _PVFV* _first; + _PVFV* _last; + _PVFV* _end; +} _onexit_table_t; + +typedef int (__attribute__((__cdecl__)) *_onexit_t)(void); + +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _initialize_onexit_table(_onexit_table_t*); +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _register_onexit_function(_onexit_table_t*,_onexit_t); +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _execute_onexit_table(_onexit_table_t*); +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _crt_atexit(_PVFV func); +__attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _crt_at_quick_exit(_PVFV func); + + +} +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 2 3 + + + + + + +extern "C" { +# 32 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 + typedef void (__attribute__((__cdecl__)) *_beginthread_proc_type)(void *); + typedef unsigned ( *_beginthreadex_proc_type)(void *); + + __attribute__ ((__dllimport__)) uintptr_t __attribute__((__cdecl__)) _beginthread(_beginthread_proc_type _StartAddress,unsigned _StackSize,void *_ArgList); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _endthread(void) __attribute__ ((__noreturn__)); + __attribute__ ((__dllimport__)) uintptr_t __attribute__((__cdecl__)) _beginthreadex(void *_Security,unsigned _StackSize,_beginthreadex_proc_type _StartAddress,void *_ArgList,unsigned _InitFlag,unsigned *_ThrdAddr); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _endthreadex(unsigned _Retval) __attribute__ ((__noreturn__)); +# 64 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 + typedef void ( *_tls_callback_type)(void*,unsigned long,void*); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _register_thread_local_exe_atexit_callback(_tls_callback_type callback); + + void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _cexit(void); + void __attribute__((__cdecl__)) __attribute__ ((__nothrow__)) _c_exit(void); + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) _getpid(void); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _cwait(int *_TermStat,intptr_t _ProcHandle,int _Action); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execl(const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execle(const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execlp(const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execlpe(const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execv(const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execve(const char *_Filename,const char *const *_ArgList,const char *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execvp(const char *_Filename,const char *const *_ArgList); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _execvpe(const char *_Filename,const char *const *_ArgList,const char *const *_Env); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnl(int _Mode,const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnle(int _Mode,const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnlp(int _Mode,const char *_Filename,const char *_ArgList,...); + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) _spawnlpe(int _Mode,const char *_Filename,const char *_ArgList,...); +# 129 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 + intptr_t __attribute__((__cdecl__)) _loaddll(char *_Filename); + int __attribute__((__cdecl__)) _unloaddll(intptr_t _Handle); + int (__attribute__((__cdecl__)) *__attribute__((__cdecl__)) _getdllprocaddr(intptr_t _Handle,char *_ProcedureName,intptr_t _Ordinal))(void); +# 161 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/process.h" 3 + int __attribute__((__cdecl__)) getpid(void) ; + + + + intptr_t __attribute__((__cdecl__)) cwait(int *_TermStat,intptr_t _ProcHandle,int _Action) ; + + int __attribute__((__cdecl__)) execl(const char *_Filename,const char *_ArgList,...) ; + int __attribute__((__cdecl__)) execle(const char *_Filename,const char *_ArgList,...) ; + int __attribute__((__cdecl__)) execlp(const char *_Filename,const char *_ArgList,...) ; + int __attribute__((__cdecl__)) execlpe(const char *_Filename,const char *_ArgList,...) ; + + + + + + + intptr_t __attribute__((__cdecl__)) spawnl(int,const char *_Filename,const char *_ArgList,...) ; + intptr_t __attribute__((__cdecl__)) spawnle(int,const char *_Filename,const char *_ArgList,...) ; + intptr_t __attribute__((__cdecl__)) spawnlp(int,const char *_Filename,const char *_ArgList,...) ; + intptr_t __attribute__((__cdecl__)) spawnlpe(int,const char *_Filename,const char *_ArgList,...) ; + + + + + + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) execv(const char *_Filename,char *const _ArgList[]) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) execve(const char *_Filename,char *const _ArgList[],char *const _Env[]) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) execvp(const char *_Filename,char *const _ArgList[]) ; + __attribute__ ((__dllimport__)) int __attribute__((__cdecl__)) execvpe(const char *_Filename,char *const _ArgList[],char *const _Env[]) ; + + + + + + + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) spawnv(int,const char *_Filename,char *const _ArgList[]) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) spawnve(int,const char *_Filename,char *const _ArgList[],char *const _Env[]) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) spawnvp(int,const char *_Filename,char *const _ArgList[]) ; + __attribute__ ((__dllimport__)) intptr_t __attribute__((__cdecl__)) spawnvpe(int,const char *_Filename,char *const _ArgList[],char *const _Env[]) ; + + + + +} +# 67 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed/limits.h" 1 3 4 +# 68 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_signal.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 2 3 + + +extern "C" { + + + + + typedef int sig_atomic_t; +# 48 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 3 + typedef void (*__p_sig_fn_t)(int); +# 57 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/signal.h" 3 + extern void **__attribute__((__cdecl__)) __pxcptinfoptrs(void); + + + __p_sig_fn_t __attribute__((__cdecl__)) signal(int _SigNum,__p_sig_fn_t _Func); + int __attribute__((__cdecl__)) raise(int _SigNum); + + +} +# 69 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 1 3 +# 25 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 1 3 +# 15 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 53 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 + struct __timeb32 { + __time32_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + + + struct timeb { + time_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + + + struct __timeb64 { + __time64_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + + + + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _ftime64(struct __timeb64 *_Time); + __attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _ftime32(struct __timeb32 *_Time); +# 89 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 +struct _timespec32 { + __time32_t tv_sec; + long tv_nsec; +}; + +struct _timespec64 { + __time64_t tv_sec; + long tv_nsec; +}; +# 113 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 + void __attribute__((__cdecl__)) ftime (struct timeb *); +# 130 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 3 +} + + +#pragma pack(pop) + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 1 3 +# 11 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h" 2 3 + + +extern "C" { + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ftime32_s(struct __timeb32 *_Time); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _ftime64_s(struct __timeb64 *_Time); +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h" 3 +} +# 136 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/sys/timeb.h" 2 3 +# 26 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 2 3 + +#pragma pack(push,_CRT_PACKING) + + +extern "C" { +# 63 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 + typedef long clock_t; +# 129 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 + extern __attribute__ ((__dllimport__)) int _daylight; + extern __attribute__ ((__dllimport__)) long _dstbias; + extern __attribute__ ((__dllimport__)) long _timezone; + extern __attribute__ ((__dllimport__)) char * _tzname[2]; + + + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_daylight(int *_Daylight); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_dstbias(long *_Daylight_savings_bias); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_timezone(long *_Timezone); + __attribute__ ((__dllimport__)) errno_t __attribute__((__cdecl__)) _get_tzname(size_t *_ReturnValue,char *_Buffer,size_t _SizeInBytes,int _Index); + char *__attribute__((__cdecl__)) asctime(const struct tm *_Tm) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) asctime_s (char *_Buf,size_t _SizeInWords,const struct tm *_Tm); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ctime32(const __time32_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _ctime32_s (char *_Buf,size_t _SizeInBytes,const __time32_t *_Time); + clock_t __attribute__((__cdecl__)) clock(void); + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _difftime32(__time32_t _Time1,__time32_t _Time2); + __attribute__ ((__dllimport__)) struct tm *__attribute__((__cdecl__)) _gmtime32(const __time32_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _gmtime32_s (struct tm *_Tm,const __time32_t *_Time); + __attribute__ ((__dllimport__)) struct tm *__attribute__((__cdecl__)) _localtime32(const __time32_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _localtime32_s (struct tm *_Tm,const __time32_t *_Time); + size_t __attribute__((__cdecl__)) strftime(char * __restrict__ _Buf,size_t _SizeInBytes,const char * __restrict__ _Format,const struct tm * __restrict__ _Tm); + __attribute__ ((__dllimport__)) size_t __attribute__((__cdecl__)) _strftime_l(char * __restrict__ _Buf,size_t _Max_size,const char * __restrict__ _Format,const struct tm * __restrict__ _Tm,_locale_t _Locale); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strdate(char *_Buffer) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _strdate_s (char *_Buf,size_t _SizeInBytes); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _strtime(char *_Buffer) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _strtime_s (char *_Buf ,size_t _SizeInBytes); + __attribute__ ((__dllimport__)) __time32_t __attribute__((__cdecl__)) _time32(__time32_t *_Time); + + + + __attribute__ ((__dllimport__)) __time32_t __attribute__((__cdecl__)) _mktime32(struct tm *_Tm); + __attribute__ ((__dllimport__)) __time32_t __attribute__((__cdecl__)) _mkgmtime32(struct tm *_Tm); + + + void __attribute__((__cdecl__)) tzset(void) ; + + + + __attribute__ ((__dllimport__)) + + void __attribute__((__cdecl__)) _tzset(void); + + + __attribute__ ((__dllimport__)) double __attribute__((__cdecl__)) _difftime64(__time64_t _Time1,__time64_t _Time2); + __attribute__ ((__dllimport__)) char *__attribute__((__cdecl__)) _ctime64(const __time64_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _ctime64_s (char *_Buf,size_t _SizeInBytes,const __time64_t *_Time); + __attribute__ ((__dllimport__)) struct tm *__attribute__((__cdecl__)) _gmtime64(const __time64_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _gmtime64_s (struct tm *_Tm,const __time64_t *_Time); + __attribute__ ((__dllimport__)) struct tm *__attribute__((__cdecl__)) _localtime64(const __time64_t *_Time) ; + __attribute__((dllimport)) errno_t __attribute__((__cdecl__)) _localtime64_s (struct tm *_Tm,const __time64_t *_Time); + __attribute__ ((__dllimport__)) __time64_t __attribute__((__cdecl__)) _mktime64(struct tm *_Tm); + __attribute__ ((__dllimport__)) __time64_t __attribute__((__cdecl__)) _mkgmtime64(struct tm *_Tm); + __attribute__ ((__dllimport__)) __time64_t __attribute__((__cdecl__)) _time64(__time64_t *_Time); + + + + unsigned __attribute__((__cdecl__)) _getsystime(struct tm *_Tm); + unsigned __attribute__((__cdecl__)) _setsystime(struct tm *_Tm,unsigned _MilliSec); +# 246 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 +static __inline time_t __attribute__((__cdecl__)) time(time_t *_Time) { return _time64(_Time); } + + + +static __inline double __attribute__((__cdecl__)) difftime(time_t _Time1,time_t _Time2) { return _difftime64(_Time1,_Time2); } +static __inline struct tm *__attribute__((__cdecl__)) localtime(const time_t *_Time) { return _localtime64(_Time); } +static __inline errno_t __attribute__((__cdecl__)) localtime_s(struct tm *_Tm,const time_t *_Time) { return _localtime64_s(_Tm,_Time); } +static __inline struct tm *__attribute__((__cdecl__)) gmtime(const time_t *_Time) { return _gmtime64(_Time); } +static __inline errno_t __attribute__((__cdecl__)) gmtime_s(struct tm *_Tm, const time_t *_Time) { return _gmtime64_s(_Tm, _Time); } +static __inline char *__attribute__((__cdecl__)) ctime(const time_t *_Time) { return _ctime64(_Time); } +static __inline errno_t __attribute__((__cdecl__)) ctime_s(char *_Buf,size_t _SizeInBytes,const time_t *_Time) { return _ctime64_s(_Buf,_SizeInBytes,_Time); } +static __inline time_t __attribute__((__cdecl__)) mktime(struct tm *_Tm) { return _mktime64(_Tm); } +static __inline time_t __attribute__((__cdecl__)) _mkgmtime(struct tm *_Tm) { return _mkgmtime64(_Tm); } +# 275 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 + __attribute__ ((__dllimport__)) extern int daylight ; + __attribute__ ((__dllimport__)) extern long timezone ; + __attribute__ ((__dllimport__)) extern char *tzname[2] ; + void __attribute__((__cdecl__)) tzset(void) ; + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_timeval.h" 1 3 +# 10 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/_timeval.h" 3 +struct timeval +{ + long tv_sec; + long tv_usec; +}; +# 282 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 2 3 + + + +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; + + extern int __attribute__((__cdecl__)) mingw_gettimeofday (struct timeval *p, struct timezone *z); + + +#pragma pack(pop) +# 315 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 +} +# 324 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_time.h" 1 3 +# 49 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_time.h" 3 +typedef int clockid_t; +# 78 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_time.h" 3 +extern "C" { + + + + + + + + + +int __attribute__((__cdecl__)) nanosleep(const struct timespec *request, struct timespec *remain); + +int __attribute__((__cdecl__)) clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *request, struct timespec *remain); +int __attribute__((__cdecl__)) clock_getres(clockid_t clock_id, struct timespec *res); +int __attribute__((__cdecl__)) clock_gettime(clockid_t clock_id, struct timespec *tp); +int __attribute__((__cdecl__)) clock_settime(clockid_t clock_id, const struct timespec *tp); + + + + +} +# 325 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/time.h" 2 3 +# 70 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_compat.h" 1 3 +# 74 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 + + +extern "C" { +# 161 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +void * pthread_timechange_handler_np(void * dummy); +int pthread_delay_np (const struct timespec *interval); +int pthread_num_processors_np(void); +int pthread_set_num_processors_np(int n); +# 181 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +typedef long pthread_once_t; +typedef unsigned pthread_mutexattr_t; +typedef unsigned pthread_key_t; +typedef void *pthread_barrierattr_t; +typedef int pthread_condattr_t; +typedef int pthread_rwlockattr_t; +# 197 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +typedef uintptr_t pthread_t; + +typedef struct _pthread_cleanup _pthread_cleanup; +struct _pthread_cleanup +{ + void (*func)(void *); + void *arg; + _pthread_cleanup *next; +}; +# 226 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +struct sched_param { + int sched_priority; +}; + +int sched_yield(void); +int sched_get_priority_min(int pol); +int sched_get_priority_max(int pol); +int sched_getscheduler(pid_t pid); +int sched_setscheduler(pid_t pid, int pol, const struct sched_param *param); + + + +typedef struct pthread_attr_t pthread_attr_t; +struct pthread_attr_t +{ + unsigned p_state; + void *stack; + size_t s_size; + struct sched_param param; +}; + +int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param); +int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param); +int pthread_getschedparam(pthread_t thread, int *pol, struct sched_param *param); +int pthread_setschedparam(pthread_t thread, int pol, const struct sched_param *param); +int pthread_attr_setschedpolicy (pthread_attr_t *attr, int pol); +int pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *pol); + + +typedef intptr_t pthread_spinlock_t; +typedef intptr_t pthread_mutex_t; +typedef intptr_t pthread_cond_t; +typedef intptr_t pthread_rwlock_t; +typedef void *pthread_barrier_t; +# 278 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +extern void (**_pthread_key_dest)(void *); +int pthread_key_create(pthread_key_t *key, void (* dest)(void *)); +int pthread_key_delete(pthread_key_t key); +void * pthread_getspecific(pthread_key_t key); +int pthread_setspecific(pthread_key_t key, const void *value); + +pthread_t pthread_self(void); +int pthread_once(pthread_once_t *o, void (*func)(void)); +void pthread_testcancel(void); +int pthread_equal(pthread_t t1, pthread_t t2); +void pthread_tls_init(void); +void _pthread_cleanup_dest(pthread_t t); +int pthread_get_concurrency(int *val); +int pthread_set_concurrency(int val); +void pthread_exit(void *res); +void _pthread_invoke_cancel(void); +int pthread_cancel(pthread_t t); +int pthread_kill(pthread_t t, int sig); +unsigned _pthread_get_state(const pthread_attr_t *attr, unsigned flag); +int _pthread_set_state(pthread_attr_t *attr, unsigned flag, unsigned val); +int pthread_setcancelstate(int state, int *oldstate); +int pthread_setcanceltype(int type, int *oldtype); +int pthread_create_wrapper(void *args); +int pthread_create(pthread_t *th, const pthread_attr_t *attr, void *(* func)(void *), void *arg); +int pthread_join(pthread_t t, void **res); +int pthread_detach(pthread_t t); +int pthread_setname_np(pthread_t thread, const char *name); +int pthread_getname_np(pthread_t thread, char *name, size_t len); + + +int pthread_rwlock_init(pthread_rwlock_t *rwlock_, const pthread_rwlockattr_t *attr); +int pthread_rwlock_wrlock(pthread_rwlock_t *l); +int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, const struct timespec *ts); +int pthread_rwlock_rdlock(pthread_rwlock_t *l); +int pthread_rwlock_timedrdlock(pthread_rwlock_t *l, const struct timespec *ts); +int pthread_rwlock_unlock(pthread_rwlock_t *l); +int pthread_rwlock_tryrdlock(pthread_rwlock_t *l); +int pthread_rwlock_trywrlock(pthread_rwlock_t *l); +int pthread_rwlock_destroy (pthread_rwlock_t *l); + +int pthread_cond_init(pthread_cond_t *cv, const pthread_condattr_t *a); +int pthread_cond_destroy(pthread_cond_t *cv); +int pthread_cond_signal (pthread_cond_t *cv); +int pthread_cond_broadcast (pthread_cond_t *cv); +int pthread_cond_wait (pthread_cond_t *cv, pthread_mutex_t *external_mutex); +int pthread_cond_timedwait(pthread_cond_t *cv, pthread_mutex_t *external_mutex, const struct timespec *t); +int pthread_cond_timedwait_relative_np(pthread_cond_t *cv, pthread_mutex_t *external_mutex, const struct timespec *t); + +int pthread_mutex_lock(pthread_mutex_t *m); +int pthread_mutex_timedlock(pthread_mutex_t *m, const struct timespec *ts); +int pthread_mutex_unlock(pthread_mutex_t *m); +int pthread_mutex_trylock(pthread_mutex_t *m); +int pthread_mutex_init(pthread_mutex_t *m, const pthread_mutexattr_t *a); +int pthread_mutex_destroy(pthread_mutex_t *m); + +int pthread_barrier_destroy(pthread_barrier_t *b); +int pthread_barrier_init(pthread_barrier_t *b, const void *attr, unsigned int count); +int pthread_barrier_wait(pthread_barrier_t *b); + +int pthread_spin_init(pthread_spinlock_t *l, int pshared); +int pthread_spin_destroy(pthread_spinlock_t *l); + +int pthread_spin_lock(pthread_spinlock_t *l); +int pthread_spin_trylock(pthread_spinlock_t *l); +int pthread_spin_unlock(pthread_spinlock_t *l); + +int pthread_attr_init(pthread_attr_t *attr); +int pthread_attr_destroy(pthread_attr_t *attr); +int pthread_attr_setdetachstate(pthread_attr_t *a, int flag); +int pthread_attr_getdetachstate(const pthread_attr_t *a, int *flag); +int pthread_attr_setinheritsched(pthread_attr_t *a, int flag); +int pthread_attr_getinheritsched(const pthread_attr_t *a, int *flag); +int pthread_attr_setscope(pthread_attr_t *a, int flag); +int pthread_attr_getscope(const pthread_attr_t *a, int *flag); +int pthread_attr_getstack(const pthread_attr_t *attr, void **stack, size_t *size); +int pthread_attr_setstack(pthread_attr_t *attr, void *stack, size_t size); +int pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stack); +int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stack); +int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *size); +int pthread_attr_setstacksize(pthread_attr_t *attr, size_t size); + +int pthread_mutexattr_init(pthread_mutexattr_t *a); +int pthread_mutexattr_destroy(pthread_mutexattr_t *a); +int pthread_mutexattr_gettype(const pthread_mutexattr_t *a, int *type); +int pthread_mutexattr_settype(pthread_mutexattr_t *a, int type); +int pthread_mutexattr_getpshared(const pthread_mutexattr_t *a, int *type); +int pthread_mutexattr_setpshared(pthread_mutexattr_t * a, int type); +int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *a, int *type); +int pthread_mutexattr_setprotocol(pthread_mutexattr_t *a, int type); +int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *a, int * prio); +int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *a, int prio); +int pthread_getconcurrency(void); +int pthread_setconcurrency(int new_level); + +int pthread_condattr_destroy(pthread_condattr_t *a); +int pthread_condattr_init(pthread_condattr_t *a); +int pthread_condattr_getpshared(const pthread_condattr_t *a, int *s); +int pthread_condattr_setpshared(pthread_condattr_t *a, int s); + + + + + + +int pthread_condattr_getclock (const pthread_condattr_t *attr, + clockid_t *clock_id); +int pthread_condattr_setclock(pthread_condattr_t *attr, + clockid_t clock_id); +int __pthread_clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); + +int pthread_barrierattr_init(void **attr); +int pthread_barrierattr_destroy(void **attr); +int pthread_barrierattr_setpshared(void **attr, int s); +int pthread_barrierattr_getpshared(void **attr, int *s); + + +struct _pthread_cleanup ** pthread_getclean (void); +void * pthread_gethandle (pthread_t t); +void * pthread_getevent (); + +unsigned long long _pthread_rel_time_in_ms(const struct timespec *ts); +unsigned long long _pthread_time_in_ms(void); +unsigned long long _pthread_time_in_ms_from_timespec(const struct timespec *ts); +int _pthread_tryjoin (pthread_t t, void **res); +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *a); +int pthread_rwlockattr_getpshared(pthread_rwlockattr_t *a, int *s); +int pthread_rwlockattr_init(pthread_rwlockattr_t *a); +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *a, int s); +# 417 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread_unistd.h" 1 3 +# 418 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 2 3 +# 678 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/pthread.h" 3 +} +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 2 3 +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; +# 102 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# 299 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +static inline int +__gthread_active_p (void) +{ + return 1; +} +# 659 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return pthread_create (__threadid, __null, __func, __args); +} + +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return pthread_join (__threadid, __value_ptr); +} + +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return pthread_detach (__threadid); +} + +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return pthread_equal (__t1, __t2); +} + +static inline __gthread_t +__gthread_self (void) +{ + return pthread_self (); +} + +static inline int +__gthread_yield (void) +{ + return sched_yield (); +} + +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return pthread_once (__once, __func); + else + return -1; +} + +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return pthread_key_create (__key, __dtor); +} + +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return pthread_key_delete (__key); +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return pthread_getspecific (__key); +} + +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return pthread_setspecific (__key, __ptr); +} + +static inline void +__gthread_mutex_init_function (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + pthread_mutex_init (__mutex, __null); +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return pthread_mutex_destroy (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return pthread_mutex_lock (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return pthread_mutex_trylock (__mutex); + else + return 0; +} + + +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return pthread_mutex_timedlock (__mutex, __abs_timeout); + else + return 0; +} + + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return pthread_mutex_unlock (__mutex); + else + return 0; +} + + + +static inline int +__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + { + pthread_mutexattr_t __attr; + int __r; + + __r = pthread_mutexattr_init (&__attr); + if (!__r) + __r = pthread_mutexattr_settype (&__attr, + 2); + if (!__r) + __r = pthread_mutex_init (__mutex, &__attr); + if (!__r) + __r = pthread_mutexattr_destroy (&__attr); + return __r; + } + return 0; +} + + +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + + +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} + + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} +# 850 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr-default.h" 3 +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return pthread_cond_broadcast (__cond); +} + +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return pthread_cond_signal (__cond); +} + +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return pthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return pthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return pthread_cond_destroy (__cond); +} +# 149 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/gthr.h" 2 3 + + +#pragma GCC visibility pop +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/atomic_word.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/atomic_word.h" 3 +typedef int _Atomic_word; +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 2 3 + + + + +namespace __gnu_cxx +{ + + + __attribute__((__always_inline__)) + inline bool + __is_single_threaded() noexcept + { + + + + + + return !__gthread_active_p(); + + } + + + + + + + inline _Atomic_word + __attribute__((__always_inline__)) + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __atomic_fetch_add(__mem, __val, 4); } + + inline void + __attribute__((__always_inline__)) + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __atomic_fetch_add(__mem, __val, 4); } +# 80 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/atomicity.h" 3 + inline _Atomic_word + __attribute__((__always_inline__)) + __exchange_and_add_single(_Atomic_word* __mem, int __val) + { + _Atomic_word __result = *__mem; + *__mem += __val; + return __result; + } + + inline void + __attribute__((__always_inline__)) + __atomic_add_single(_Atomic_word* __mem, int __val) + { *__mem += __val; } + + inline _Atomic_word + __attribute__ ((__always_inline__)) + __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__is_single_threaded()) + return __exchange_and_add_single(__mem, __val); + else + return __exchange_and_add(__mem, __val); + } + + inline void + __attribute__ ((__always_inline__)) + __atomic_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__is_single_threaded()) + __atomic_add_single(__mem, __val); + else + __atomic_add(__mem, __val); + } + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 2 3 +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 +namespace __gnu_cxx +{ + +# 64 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + struct _Char_types + { + typedef unsigned long int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + typedef std::mbstate_t state_type; + }; +# 89 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + struct char_traits + { + typedef _CharT char_type; + typedef typename _Char_types<_CharT>::int_type int_type; + typedef typename _Char_types<_CharT>::pos_type pos_type; + typedef typename _Char_types<_CharT>::off_type off_type; + typedef typename _Char_types<_CharT>::state_type state_type; + + using comparison_category = std::strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + + static constexpr std::size_t + length(const char_type* __s); + + static constexpr const char_type* + find(const char_type* __s, std::size_t __n, const char_type& __a); + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, std::size_t __n); + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, std::size_t __n); + + static constexpr char_type* + assign(char_type* __s, std::size_t __n, char_type __a); + + static constexpr char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) + { return static_cast(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static constexpr int_type + eof() + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) + { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } + }; + + template + constexpr int + char_traits<_CharT>:: + compare(const char_type* __s1, const char_type* __s2, std::size_t __n) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + template + constexpr std::size_t + char_traits<_CharT>:: + length(const char_type* __p) + { + std::size_t __i = 0; + while (!eq(__p[__i], char_type())) + ++__i; + return __i; + } + + template + constexpr const typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + find(const char_type* __s, std::size_t __n, const char_type& __a) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + template + constexpr + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + move(char_type* __s1, const char_type* __s2, std::size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + { + if (__s1 > __s2 && __s1 < __s2 + __n) + std::copy_backward(__s2, __s2 + __n, __s1 + __n); + else + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + + return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, + __n * sizeof(char_type))); + } + + template + constexpr + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + copy(char_type* __s1, const char_type* __s2, std::size_t __n) + { + + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + + template + constexpr + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + assign(char_type* __s, std::size_t __n, char_type __a) + { + + std::fill_n(__s, __n, __a); + return __s; + } + + +} + +namespace std +{ + +# 255 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + inline __attribute__((__always_inline__)) constexpr bool + __constant_string_p(const _CharT* __s) + { + + (void) __s; + + return __builtin_is_constant_evaluated(); + + + + + + } +# 278 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + inline __attribute__((__always_inline__)) constexpr bool + __constant_char_array_p(const _CharT* __a, size_t __n) + { + + (void) __a; + (void) __n; + + return __builtin_is_constant_evaluated(); + + + + + + + } +# 309 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 3 + template + struct char_traits : public __gnu_cxx::char_traits<_CharT> + { }; + + + + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { + + return (static_cast(__c1) + < static_cast(__c2)); + } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __constant_char_array_p(__s1, __n) + && __constant_char_array_p(__s2, __n)) + { + for (size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + return __builtin_memcmp(__s1, __s2, __n); + } + + static constexpr size_t + length(const char_type* __s) + { + + if (__constant_string_p(__s)) + return __gnu_cxx::char_traits::length(__s); + + return __builtin_strlen(__s); + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __builtin_constant_p(__a) + && __constant_char_array_p(__s, __n)) + return __gnu_cxx::char_traits::find(__s, __n, __a); + + return static_cast(__builtin_memchr(__s, __a, __n)); + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return static_cast(__builtin_memmove(__s1, __s2, __n)); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return static_cast(__builtin_memcpy(__s1, __s2, __n)); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + if (__n == 0) + return __s; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::assign(__s, __n, __a); + + return static_cast(__builtin_memset(__s, __a, __n)); + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return static_cast(__c); } + + + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return static_cast(static_cast(__c)); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return (__c == eof()) ? 0 : __c; } + }; + + + + + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __constant_char_array_p(__s1, __n) + && __constant_char_array_p(__s2, __n)) + return __gnu_cxx::char_traits::compare(__s1, __s2, __n); + + return wmemcmp(__s1, __s2, __n); + } + + static constexpr size_t + length(const char_type* __s) + { + + if (__constant_string_p(__s)) + return __gnu_cxx::char_traits::length(__s); + + return wcslen(__s); + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __builtin_constant_p(__a) + && __constant_char_array_p(__s, __n)) + return __gnu_cxx::char_traits::find(__s, __n, __a); + + return wmemchr(__s, __a, __n); + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return wmemmove(__s1, __s2, __n); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return wmemcpy(__s1, __s2, __n); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + if (__n == 0) + return __s; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::assign(__s, __n, __a); + + return wmemset(__s, __a, __n); + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return char_type(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return int_type(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast((wint_t)(0xFFFF)); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + + + template<> + struct char_traits + { + typedef char8_t char_type; + typedef unsigned int int_type; + typedef u8streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __constant_char_array_p(__s1, __n) + && __constant_char_array_p(__s2, __n)) + return __gnu_cxx::char_traits::compare(__s1, __s2, __n); + + return __builtin_memcmp(__s1, __s2, __n); + } + + static constexpr size_t + length(const char_type* __s) + { + + if (__constant_string_p(__s)) + return __gnu_cxx::char_traits::length(__s); + + size_t __i = 0; + while (!eq(__s[__i], char_type())) + ++__i; + return __i; + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + if (__n == 0) + return 0; + + if (__builtin_constant_p(__n) + && __builtin_constant_p(__a) + && __constant_char_array_p(__s, __n)) + return __gnu_cxx::char_traits::find(__s, __n, __a); + + return static_cast(__builtin_memchr(__s, __a, __n)); + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return static_cast(__builtin_memmove(__s1, __s2, __n)); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return static_cast(__builtin_memcpy(__s1, __s2, __n)); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + if (__n == 0) + return __s; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::assign(__s, __n, __a); + + return static_cast(__builtin_memset(__s, __a, __n)); + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return char_type(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return int_type(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + + +} + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 3 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stdint.h" 1 3 4 +# 9 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stdint.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdint.h" 1 3 4 +# 32 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdint.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 1 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 1 3 4 +# 2 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 2 3 4 +# 33 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stdint.h" 2 3 4 + + +typedef signed char int8_t; +typedef unsigned char uint8_t; +typedef short int16_t; +typedef unsigned short uint16_t; +typedef int int32_t; +typedef unsigned uint32_t; +__extension__ typedef long long int64_t; +__extension__ typedef unsigned long long uint64_t; + + +typedef signed char int_least8_t; +typedef unsigned char uint_least8_t; +typedef short int_least16_t; +typedef unsigned short uint_least16_t; +typedef int int_least32_t; +typedef unsigned uint_least32_t; +__extension__ typedef long long int_least64_t; +__extension__ typedef unsigned long long uint_least64_t; + + + + + +typedef signed char int_fast8_t; +typedef unsigned char uint_fast8_t; +typedef short int_fast16_t; +typedef unsigned short uint_fast16_t; +typedef int int_fast32_t; +typedef unsigned int uint_fast32_t; +__extension__ typedef long long int_fast64_t; +__extension__ typedef unsigned long long uint_fast64_t; + + +__extension__ typedef long long intmax_t; +__extension__ typedef unsigned long long uintmax_t; +# 10 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stdint.h" 2 3 4 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdint" 2 3 + + +namespace std +{ + + using ::int8_t; + using ::int16_t; + using ::int32_t; + using ::int64_t; + + using ::int_fast8_t; + using ::int_fast16_t; + using ::int_fast32_t; + using ::int_fast64_t; + + using ::int_least8_t; + using ::int_least16_t; + using ::int_least32_t; + using ::int_least64_t; + + using ::intmax_t; + using ::intptr_t; + + using ::uint8_t; + using ::uint16_t; + using ::uint32_t; + using ::uint64_t; + + using ::uint_fast8_t; + using ::uint_fast16_t; + using ::uint_fast32_t; + using ::uint_fast64_t; + + using ::uint_least8_t; + using ::uint_least16_t; + using ::uint_least32_t; + using ::uint_least64_t; + + using ::uintmax_t; + using ::uintptr_t; + + + + + +} +# 700 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h" 2 3 + +namespace std +{ + + + template<> + struct char_traits + { + typedef char16_t char_type; + + typedef uint_least16_t int_type; + + + + + + typedef streamoff off_type; + typedef u16streampos pos_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + for (size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + static constexpr size_t + length(const char_type* __s) + { + size_t __i = 0; + while (!eq(__s[__i], char_type())) + ++__i; + return __i; + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + for (size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return (static_cast + (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return (static_cast + (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + for (size_t __i = 0; __i < __n; ++__i) + assign(__s[__i], __a); + return __s; + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return char_type(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return __c == eof() ? int_type(0xfffd) : int_type(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + template<> + struct char_traits + { + typedef char32_t char_type; + + typedef uint_least32_t int_type; + + + + + + typedef streamoff off_type; + typedef u32streampos pos_type; + typedef mbstate_t state_type; + + using comparison_category = strong_ordering; + + + static constexpr void + assign(char_type& __c1, const char_type& __c2) noexcept + { __c1 = __c2; } + + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept + { return __c1 < __c2; } + + static constexpr int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { + for (size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + static constexpr size_t + length(const char_type* __s) + { + size_t __i = 0; + while (!eq(__s[__i], char_type())) + ++__i; + return __i; + } + + static constexpr const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { + for (size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + static constexpr char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::move(__s1, __s2, __n); + + return (static_cast + (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); + } + + static constexpr char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { + if (__n == 0) + return __s1; + + if (std::is_constant_evaluated()) + return __gnu_cxx::char_traits::copy(__s1, __s2, __n); + + return (static_cast + (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); + } + + static constexpr char_type* + assign(char_type* __s, size_t __n, char_type __a) + { + for (size_t __i = 0; __i < __n; ++__i) + assign(__s[__i], __a); + return __s; + } + + static constexpr char_type + to_char_type(const int_type& __c) noexcept + { return char_type(__c); } + + static constexpr int_type + to_int_type(const char_type& __c) noexcept + { return int_type(__c); } + + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept + { return __c1 == __c2; } + + static constexpr int_type + eof() noexcept + { return static_cast(-1); } + + static constexpr int_type + not_eof(const int_type& __c) noexcept + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + + namespace __detail + { + template + constexpr auto + __char_traits_cmp_cat(int __cmp) noexcept + { + if constexpr (requires { typename _ChTraits::comparison_category; }) + { + using _Cat = typename _ChTraits::comparison_category; + static_assert( !is_void_v> ); + return static_cast<_Cat>(__cmp <=> 0); + } + else + return static_cast(__cmp <=> 0); + } + } + + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 1 3 +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++allocator.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++allocator.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 1 3 +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 +namespace __gnu_cxx +{ + +# 54 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + template + class new_allocator + { + public: + typedef _Tp value_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; +# 75 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + typedef std::true_type propagate_on_container_move_assignment; + + + constexpr + new_allocator() noexcept { } + + constexpr + new_allocator(const new_allocator&) noexcept { } + + template + constexpr + new_allocator(const new_allocator<_Tp1>&) noexcept { } +# 102 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + [[__nodiscard__]] _Tp* + allocate(size_type __n, const void* = static_cast(0)) + { + + + + static_assert(sizeof(_Tp) != 0, "cannot allocate incomplete types"); + + + if (__builtin_expect(__n > this->_M_max_size(), false)) + { + + + if (__n > (std::size_t(-1) / sizeof(_Tp))) + std::__throw_bad_array_new_length(); + std::__throw_bad_alloc(); + } + + + if (alignof(_Tp) > 16) + { + std::align_val_t __al = std::align_val_t(alignof(_Tp)); + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), __al)); + } + + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + } + + + void + deallocate(_Tp* __p, size_type __t __attribute__ ((__unused__))) + { + + if (alignof(_Tp) > 16) + { + ::operator delete(__p, + + __t * sizeof(_Tp), + + std::align_val_t(alignof(_Tp))); + return; + } + + ::operator delete(__p + + , __t * sizeof(_Tp) + + ); + } +# 181 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + template + friend constexpr bool + operator==(const new_allocator&, const new_allocator<_Up>&) + noexcept + { return true; } +# 195 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/new_allocator.h" 3 + private: + constexpr size_type + _M_max_size() const noexcept + { + + return std::size_t(0x7fffffffffffffffLL) / sizeof(_Tp); + + + + } + }; + + +} +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++allocator.h" 2 3 + + +namespace std +{ +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/c++allocator.h" 3 + template + using __allocator_base = __gnu_cxx::new_allocator<_Tp>; +} +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 2 3 + + + + + + + +namespace std +{ + +# 71 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + template<> + class allocator + { + public: + typedef void value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; +# 92 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + typedef true_type propagate_on_container_move_assignment; + + typedef true_type is_always_equal; + + + allocator() = default; + + template + constexpr + allocator(const allocator<_Up>&) noexcept { } +# 126 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + }; +# 137 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + template + class allocator : public __allocator_base<_Tp> + { + public: + typedef _Tp value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; +# 160 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + typedef true_type propagate_on_container_move_assignment; + + typedef true_type is_always_equal; + + + + + constexpr + allocator() noexcept { } + + constexpr + allocator(const allocator& __a) noexcept + : __allocator_base<_Tp>(__a) { } + + + + allocator& operator=(const allocator&) = default; + + + template + constexpr + allocator(const allocator<_Tp1>&) noexcept { } + + + constexpr + + ~allocator() noexcept { } + + + [[nodiscard,__gnu__::__always_inline__]] + constexpr _Tp* + allocate(size_t __n) + { + + if (std::is_constant_evaluated()) + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + + return __allocator_base<_Tp>::allocate(__n, 0); + } + + [[__gnu__::__always_inline__]] + constexpr void + deallocate(_Tp* __p, size_t __n) + { + + if (std::is_constant_evaluated()) + { + ::operator delete(__p); + return; + } + + __allocator_base<_Tp>::deallocate(__p, __n); + } + + + friend constexpr bool + operator==(const allocator&, const allocator&) noexcept + { return true; } +# 226 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + }; + + template + inline constexpr bool + operator==(const allocator<_T1>&, const allocator<_T2>&) + noexcept + { return true; } +# 244 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/allocator.h" 3 + template + class allocator + { + public: + typedef _Tp value_type; + template allocator(const allocator<_Up>&) { } + }; + + template + class allocator + { + public: + typedef _Tp value_type; + template allocator(const allocator<_Up>&) { } + }; + + template + class allocator + { + public: + typedef _Tp value_type; + template allocator(const allocator<_Up>&) { } + }; + + + + + + + extern template class allocator; + extern template class allocator; + + + + + + + template + struct __alloc_swap + { static void _S_do_it(_Alloc&, _Alloc&) noexcept { } }; + + template + struct __alloc_swap<_Alloc, false> + { + static void + _S_do_it(_Alloc& __one, _Alloc& __two) noexcept + { + + if (__one != __two) + swap(__one, __two); + } + }; + + + template + struct __alloc_neq + { + static bool + _S_do_it(const _Alloc&, const _Alloc&) + { return false; } + }; + + template + struct __alloc_neq<_Alloc, false> + { + static bool + _S_do_it(const _Alloc& __one, const _Alloc& __two) + { return __one != __two; } + }; + + + template, + is_nothrow_move_constructible>::value> + struct __shrink_to_fit_aux + { static bool _S_do_it(_Tp&) noexcept { return false; } }; + + template + struct __shrink_to_fit_aux<_Tp, true> + { + static bool + _S_do_it(_Tp& __c) noexcept + { + + try + { + _Tp(__make_move_if_noexcept_iterator(__c.begin()), + __make_move_if_noexcept_iterator(__c.end()), + __c.get_allocator()).swap(__c); + return true; + } + catch(...) + { return false; } + + + + } + }; + + + +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ostream_insert.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ostream_insert.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ostream_insert.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_forced.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_forced.h" 3 + +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_forced.h" 3 + +#pragma GCC visibility push(default) + + +namespace __cxxabiv1 +{ + + + + + + + + class __forced_unwind + { + virtual ~__forced_unwind() throw(); + + + virtual void __pure_dummy() = 0; + }; +} + + +#pragma GCC visibility pop +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ostream_insert.h" 2 3 + + +namespace std +{ + + + template + inline void + __ostream_write(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const streamsize __put = __out.rdbuf()->sputn(__s, __n); + if (__put != __n) + __out.setstate(__ios_base::badbit); + } + + template + inline void + __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const _CharT __c = __out.fill(); + for (; __n > 0; --__n) + { + const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); + if (_Traits::eq_int_type(__put, _Traits::eof())) + { + __out.setstate(__ios_base::badbit); + break; + } + } + } + + template + basic_ostream<_CharT, _Traits>& + __ostream_insert(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + const streamsize __w = __out.width(); + if (__w > __n) + { + const bool __left = ((__out.flags() + & __ios_base::adjustfield) + == __ios_base::left); + if (!__left) + __ostream_fill(__out, __w - __n); + if (__out.good()) + __ostream_write(__out, __s, __n); + if (__left && __out.good()) + __ostream_fill(__out, __w - __n); + } + else + __ostream_write(__out, __s, __n); + __out.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(__ios_base::badbit); } + } + return __out; + } + + + + + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + + + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); + + + + +} +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 1 3 +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 +namespace std +{ + +# 104 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + struct unary_function + { + + typedef _Arg argument_type; + + + typedef _Result result_type; + }; + + + + + template + struct binary_function + { + + typedef _Arg1 first_argument_type; + + + typedef _Arg2 second_argument_type; + + + typedef _Result result_type; + }; +# 144 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + struct __is_transparent; + + template + struct plus; + + template + struct minus; + + template + struct multiplies; + + template + struct divides; + + template + struct modulus; + + template + struct negate; + + + + template + struct plus : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x + __y; } + }; + + + template + struct minus : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x - __y; } + }; + + + template + struct multiplies : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x * __y; } + }; + + + template + struct divides : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x / __y; } + }; + + + template + struct modulus : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x % __y; } + }; + + + template + struct negate : public unary_function<_Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x) const + { return -__x; } + }; + + + + + + template<> + struct plus + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) + std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) + std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) + std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct minus + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) - std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) - std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) - std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct multiplies + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) * std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) * std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) * std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct divides + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) / std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) / std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) / std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct modulus + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) % std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) % std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) % std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct negate + { + template + constexpr + auto + operator()(_Tp&& __t) const + noexcept(noexcept(-std::forward<_Tp>(__t))) + -> decltype(-std::forward<_Tp>(__t)) + { return -std::forward<_Tp>(__t); } + + typedef __is_transparent is_transparent; + }; +# 330 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + struct equal_to; + + template + struct not_equal_to; + + template + struct greater; + + template + struct less; + + template + struct greater_equal; + + template + struct less_equal; + + + + template + struct equal_to : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x == __y; } + }; + + + template + struct not_equal_to : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x != __y; } + }; + + + template + struct greater : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x > __y; } + }; + + + template + struct less : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x < __y; } + }; + + + template + struct greater_equal : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x >= __y; } + }; + + + template + struct less_equal : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x <= __y; } + }; + + + template + struct greater<_Tp*> : public binary_function<_Tp*, _Tp*, bool> + { + constexpr bool + operator()(_Tp* __x, _Tp* __y) const noexcept + { + + + if (__builtin_is_constant_evaluated()) + + + + return __x > __y; + + return (long long unsigned int)__x > (long long unsigned int)__y; + } + }; + + + template + struct less<_Tp*> : public binary_function<_Tp*, _Tp*, bool> + { + constexpr bool + operator()(_Tp* __x, _Tp* __y) const noexcept + { + + + if (__builtin_is_constant_evaluated()) + + + + return __x < __y; + + return (long long unsigned int)__x < (long long unsigned int)__y; + } + }; + + + template + struct greater_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> + { + constexpr bool + operator()(_Tp* __x, _Tp* __y) const noexcept + { + + + if (__builtin_is_constant_evaluated()) + + + + return __x >= __y; + + return (long long unsigned int)__x >= (long long unsigned int)__y; + } + }; + + + template + struct less_equal<_Tp*> : public binary_function<_Tp*, _Tp*, bool> + { + constexpr bool + operator()(_Tp* __x, _Tp* __y) const noexcept + { + + + if (__builtin_is_constant_evaluated()) + + + + return __x <= __y; + + return (long long unsigned int)__x <= (long long unsigned int)__y; + } + }; + + + + template<> + struct equal_to + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) == std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) == std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) == std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct not_equal_to + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) != std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) != std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) != std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct greater + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) > std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) > std::forward<_Up>(__u)) + { + return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), + __ptr_cmp<_Tp, _Up>{}); + } + + template + constexpr bool + operator()(_Tp* __t, _Up* __u) const noexcept + { return greater>{}(__t, __u); } + + typedef __is_transparent is_transparent; + + private: + template + static constexpr decltype(auto) + _S_cmp(_Tp&& __t, _Up&& __u, false_type) + { return std::forward<_Tp>(__t) > std::forward<_Up>(__u); } + + template + static constexpr bool + _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept + { + return greater{}( + static_cast(std::forward<_Tp>(__t)), + static_cast(std::forward<_Up>(__u))); + } + + + template + struct __not_overloaded2 : true_type { }; + + + template + struct __not_overloaded2<_Tp, _Up, __void_t< + decltype(std::declval<_Tp>().operator>(std::declval<_Up>()))>> + : false_type { }; + + + template + struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; + + + template + struct __not_overloaded<_Tp, _Up, __void_t< + decltype(operator>(std::declval<_Tp>(), std::declval<_Up>()))>> + : false_type { }; + + template + using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, + is_convertible<_Tp, const volatile void*>, + is_convertible<_Up, const volatile void*>>; + }; + + + template<> + struct less + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) < std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) < std::forward<_Up>(__u)) + { + return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), + __ptr_cmp<_Tp, _Up>{}); + } + + template + constexpr bool + operator()(_Tp* __t, _Up* __u) const noexcept + { return less>{}(__t, __u); } + + typedef __is_transparent is_transparent; + + private: + template + static constexpr decltype(auto) + _S_cmp(_Tp&& __t, _Up&& __u, false_type) + { return std::forward<_Tp>(__t) < std::forward<_Up>(__u); } + + template + static constexpr bool + _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept + { + return less{}( + static_cast(std::forward<_Tp>(__t)), + static_cast(std::forward<_Up>(__u))); + } + + + template + struct __not_overloaded2 : true_type { }; + + + template + struct __not_overloaded2<_Tp, _Up, __void_t< + decltype(std::declval<_Tp>().operator<(std::declval<_Up>()))>> + : false_type { }; + + + template + struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; + + + template + struct __not_overloaded<_Tp, _Up, __void_t< + decltype(operator<(std::declval<_Tp>(), std::declval<_Up>()))>> + : false_type { }; + + template + using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, + is_convertible<_Tp, const volatile void*>, + is_convertible<_Up, const volatile void*>>; + }; + + + template<> + struct greater_equal + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) >= std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) >= std::forward<_Up>(__u)) + { + return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), + __ptr_cmp<_Tp, _Up>{}); + } + + template + constexpr bool + operator()(_Tp* __t, _Up* __u) const noexcept + { return greater_equal>{}(__t, __u); } + + typedef __is_transparent is_transparent; + + private: + template + static constexpr decltype(auto) + _S_cmp(_Tp&& __t, _Up&& __u, false_type) + { return std::forward<_Tp>(__t) >= std::forward<_Up>(__u); } + + template + static constexpr bool + _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept + { + return greater_equal{}( + static_cast(std::forward<_Tp>(__t)), + static_cast(std::forward<_Up>(__u))); + } + + + template + struct __not_overloaded2 : true_type { }; + + + template + struct __not_overloaded2<_Tp, _Up, __void_t< + decltype(std::declval<_Tp>().operator>=(std::declval<_Up>()))>> + : false_type { }; + + + template + struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; + + + template + struct __not_overloaded<_Tp, _Up, __void_t< + decltype(operator>=(std::declval<_Tp>(), std::declval<_Up>()))>> + : false_type { }; + + template + using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, + is_convertible<_Tp, const volatile void*>, + is_convertible<_Up, const volatile void*>>; + }; + + + template<> + struct less_equal + { + template + constexpr auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) <= std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) <= std::forward<_Up>(__u)) + { + return _S_cmp(std::forward<_Tp>(__t), std::forward<_Up>(__u), + __ptr_cmp<_Tp, _Up>{}); + } + + template + constexpr bool + operator()(_Tp* __t, _Up* __u) const noexcept + { return less_equal>{}(__t, __u); } + + typedef __is_transparent is_transparent; + + private: + template + static constexpr decltype(auto) + _S_cmp(_Tp&& __t, _Up&& __u, false_type) + { return std::forward<_Tp>(__t) <= std::forward<_Up>(__u); } + + template + static constexpr bool + _S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept + { + return less_equal{}( + static_cast(std::forward<_Tp>(__t)), + static_cast(std::forward<_Up>(__u))); + } + + + template + struct __not_overloaded2 : true_type { }; + + + template + struct __not_overloaded2<_Tp, _Up, __void_t< + decltype(std::declval<_Tp>().operator<=(std::declval<_Up>()))>> + : false_type { }; + + + template + struct __not_overloaded : __not_overloaded2<_Tp, _Up> { }; + + + template + struct __not_overloaded<_Tp, _Up, __void_t< + decltype(operator<=(std::declval<_Tp>(), std::declval<_Up>()))>> + : false_type { }; + + template + using __ptr_cmp = __and_<__not_overloaded<_Tp, _Up>, + is_convertible<_Tp, const volatile void*>, + is_convertible<_Up, const volatile void*>>; + }; +# 774 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + struct logical_and; + + template + struct logical_or; + + template + struct logical_not; + + + + template + struct logical_and : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x && __y; } + }; + + + template + struct logical_or : public binary_function<_Tp, _Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x || __y; } + }; + + + template + struct logical_not : public unary_function<_Tp, bool> + { + constexpr + bool + operator()(const _Tp& __x) const + { return !__x; } + }; + + + + template<> + struct logical_and + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) && std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) && std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) && std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct logical_or + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) || std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) || std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) || std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + + template<> + struct logical_not + { + template + constexpr + auto + operator()(_Tp&& __t) const + noexcept(noexcept(!std::forward<_Tp>(__t))) + -> decltype(!std::forward<_Tp>(__t)) + { return !std::forward<_Tp>(__t); } + + typedef __is_transparent is_transparent; + }; + + + + + template + struct bit_and; + + template + struct bit_or; + + template + struct bit_xor; + + template + struct bit_not; + + + + + template + struct bit_and : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x & __y; } + }; + + template + struct bit_or : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x | __y; } + }; + + template + struct bit_xor : public binary_function<_Tp, _Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x ^ __y; } + }; + + template + struct bit_not : public unary_function<_Tp, _Tp> + { + constexpr + _Tp + operator()(const _Tp& __x) const + { return ~__x; } + }; + + + template <> + struct bit_and + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) & std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) & std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) & std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + template <> + struct bit_or + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) | std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) | std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) | std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + template <> + struct bit_xor + { + template + constexpr + auto + operator()(_Tp&& __t, _Up&& __u) const + noexcept(noexcept(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u))) + -> decltype(std::forward<_Tp>(__t) ^ std::forward<_Up>(__u)) + { return std::forward<_Tp>(__t) ^ std::forward<_Up>(__u); } + + typedef __is_transparent is_transparent; + }; + + template <> + struct bit_not + { + template + constexpr + auto + operator()(_Tp&& __t) const + noexcept(noexcept(~std::forward<_Tp>(__t))) + -> decltype(~std::forward<_Tp>(__t)) + { return ~std::forward<_Tp>(__t); } + + typedef __is_transparent is_transparent; + }; +# 1002 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + class unary_negate + : public unary_function + { + protected: + _Predicate _M_pred; + + public: + constexpr + explicit + unary_negate(const _Predicate& __x) : _M_pred(__x) { } + + constexpr + bool + operator()(const typename _Predicate::argument_type& __x) const + { return !_M_pred(__x); } + }; + + + template + constexpr + inline unary_negate<_Predicate> + not1(const _Predicate& __pred) + { return unary_negate<_Predicate>(__pred); } + + + template + class binary_negate + : public binary_function + { + protected: + _Predicate _M_pred; + + public: + constexpr + explicit + binary_negate(const _Predicate& __x) : _M_pred(__x) { } + + constexpr + bool + operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { return !_M_pred(__x, __y); } + }; + + + template + constexpr + inline binary_negate<_Predicate> + not2(const _Predicate& __pred) + { return binary_negate<_Predicate>(__pred); } +# 1079 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + class pointer_to_unary_function : public unary_function<_Arg, _Result> + { + protected: + _Result (*_M_ptr)(_Arg); + + public: + pointer_to_unary_function() { } + + explicit + pointer_to_unary_function(_Result (*__x)(_Arg)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg __x) const + { return _M_ptr(__x); } + }; + + + template + inline pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (*__x)(_Arg)) + { return pointer_to_unary_function<_Arg, _Result>(__x); } + + + template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { + protected: + _Result (*_M_ptr)(_Arg1, _Arg2); + + public: + pointer_to_binary_function() { } + + explicit + pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg1 __x, _Arg2 __y) const + { return _M_ptr(__x, __y); } + }; + + + template + inline pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (*__x)(_Arg1, _Arg2)) + { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } + + + template + struct _Identity + : public unary_function<_Tp, _Tp> + { + _Tp& + operator()(_Tp& __x) const + { return __x; } + + const _Tp& + operator()(const _Tp& __x) const + { return __x; } + }; + + + template struct _Identity : _Identity<_Tp> { }; + + template + struct _Select1st + : public unary_function<_Pair, typename _Pair::first_type> + { + typename _Pair::first_type& + operator()(_Pair& __x) const + { return __x.first; } + + const typename _Pair::first_type& + operator()(const _Pair& __x) const + { return __x.first; } + + + template + typename _Pair2::first_type& + operator()(_Pair2& __x) const + { return __x.first; } + + template + const typename _Pair2::first_type& + operator()(const _Pair2& __x) const + { return __x.first; } + + }; + + template + struct _Select2nd + : public unary_function<_Pair, typename _Pair::second_type> + { + typename _Pair::second_type& + operator()(_Pair& __x) const + { return __x.second; } + + const typename _Pair::second_type& + operator()(const _Pair& __x) const + { return __x.second; } + }; +# 1202 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 3 + template + class mem_fun_t : public unary_function<_Tp*, _Ret> + { + public: + explicit + mem_fun_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_t : public unary_function + { + public: + explicit + const_mem_fun_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + mem_fun_ref_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> + { + public: + explicit + mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_t : public binary_function + { + public: + explicit + const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + inline mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret, _Tp>(__f); } + + template + inline mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + + + + template> + struct __has_is_transparent + { }; + + template + struct __has_is_transparent<_Func, _SfinaeType, + __void_t> + { typedef void type; }; + + template + using __has_is_transparent_t + = typename __has_is_transparent<_Func, _SfinaeType>::type; + + + +} + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/backward/binders.h" 1 3 +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/backward/binders.h" 3 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +namespace std +{ + +# 107 "D:/compilers/msys64/mingw64/include/c++/11.2.0/backward/binders.h" 3 + template + class binder1st + : public unary_function + { + protected: + _Operation op; + typename _Operation::first_argument_type value; + + public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + + + + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + } __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))); + + + template + inline binder1st<_Operation> + bind1st(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); + } + + + template + class binder2nd + : public unary_function + { + protected: + _Operation op; + typename _Operation::second_argument_type value; + + public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + + + + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + } __attribute__ ((__deprecated__ ("use '" "std::bind" "' instead"))); + + + template + inline binder2nd<_Operation> + bind2nd(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); + } + + + +} + +#pragma GCC diagnostic pop +# 1408 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_function.h" 2 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/range_access.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/range_access.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/range_access.h" 3 + + + + + + +namespace std +{ + + + + + + + + template + inline constexpr auto + begin(_Container& __cont) -> decltype(__cont.begin()) + { return __cont.begin(); } + + + + + + + template + inline constexpr auto + begin(const _Container& __cont) -> decltype(__cont.begin()) + { return __cont.begin(); } + + + + + + + template + inline constexpr auto + end(_Container& __cont) -> decltype(__cont.end()) + { return __cont.end(); } + + + + + + + template + inline constexpr auto + end(const _Container& __cont) -> decltype(__cont.end()) + { return __cont.end(); } + + + + + + template + inline constexpr _Tp* + begin(_Tp (&__arr)[_Nm]) noexcept + { return __arr; } + + + + + + + template + inline constexpr _Tp* + end(_Tp (&__arr)[_Nm]) noexcept + { return __arr + _Nm; } + + + + template class valarray; + + template _Tp* begin(valarray<_Tp>&); + template const _Tp* begin(const valarray<_Tp>&); + template _Tp* end(valarray<_Tp>&); + template const _Tp* end(const valarray<_Tp>&); + + + + + + + template + inline constexpr auto + cbegin(const _Container& __cont) noexcept(noexcept(std::begin(__cont))) + -> decltype(std::begin(__cont)) + { return std::begin(__cont); } + + + + + + + template + inline constexpr auto + cend(const _Container& __cont) noexcept(noexcept(std::end(__cont))) + -> decltype(std::end(__cont)) + { return std::end(__cont); } + + + + + + + template + inline constexpr auto + rbegin(_Container& __cont) -> decltype(__cont.rbegin()) + { return __cont.rbegin(); } + + + + + + + template + inline constexpr auto + rbegin(const _Container& __cont) -> decltype(__cont.rbegin()) + { return __cont.rbegin(); } + + + + + + + template + inline constexpr auto + rend(_Container& __cont) -> decltype(__cont.rend()) + { return __cont.rend(); } + + + + + + + template + inline constexpr auto + rend(const _Container& __cont) -> decltype(__cont.rend()) + { return __cont.rend(); } + + + + + + + template + inline constexpr reverse_iterator<_Tp*> + rbegin(_Tp (&__arr)[_Nm]) noexcept + { return reverse_iterator<_Tp*>(__arr + _Nm); } + + + + + + + template + inline constexpr reverse_iterator<_Tp*> + rend(_Tp (&__arr)[_Nm]) noexcept + { return reverse_iterator<_Tp*>(__arr); } + + + + + + + template + inline constexpr reverse_iterator + rbegin(initializer_list<_Tp> __il) noexcept + { return reverse_iterator(__il.end()); } + + + + + + + template + inline constexpr reverse_iterator + rend(initializer_list<_Tp> __il) noexcept + { return reverse_iterator(__il.begin()); } + + + + + + + template + inline constexpr auto + crbegin(const _Container& __cont) -> decltype(std::rbegin(__cont)) + { return std::rbegin(__cont); } + + + + + + + template + inline constexpr auto + crend(const _Container& __cont) -> decltype(std::rend(__cont)) + { return std::rend(__cont); } +# 243 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/range_access.h" 3 + template + constexpr auto + size(const _Container& __cont) noexcept(noexcept(__cont.size())) + -> decltype(__cont.size()) + { return __cont.size(); } + + + + + template + constexpr size_t + size(const _Tp (&)[_Nm]) noexcept + { return _Nm; } + + + + + + template + [[nodiscard]] constexpr auto + empty(const _Container& __cont) noexcept(noexcept(__cont.empty())) + -> decltype(__cont.empty()) + { return __cont.empty(); } + + + + + template + [[nodiscard]] constexpr bool + empty(const _Tp (&)[_Nm]) noexcept + { return false; } + + + + + + template + [[nodiscard]] constexpr bool + empty(initializer_list<_Tp> __il) noexcept + { return __il.size() == 0;} + + + + + + template + constexpr auto + data(_Container& __cont) noexcept(noexcept(__cont.data())) + -> decltype(__cont.data()) + { return __cont.data(); } + + + + + + template + constexpr auto + data(const _Container& __cont) noexcept(noexcept(__cont.data())) + -> decltype(__cont.data()) + { return __cont.data(); } + + + + + + template + constexpr _Tp* + data(_Tp (&__array)[_Nm]) noexcept + { return __array; } + + + + + + template + constexpr const _Tp* + data(initializer_list<_Tp> __il) noexcept + { return __il.begin(); } + + + + template + constexpr auto + ssize(const _Container& __cont) + noexcept(noexcept(__cont.size())) + -> common_type_t> + { + using type = make_signed_t; + return static_cast>(__cont.size()); + } + + template + constexpr ptrdiff_t + ssize(const _Tp (&)[_Num]) noexcept + { return _Num; } + + + + +} +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 1 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 +namespace std +{ + + + + + + struct __allocator_traits_base + { + template + struct __rebind : __replace_first_arg<_Tp, _Up> { }; + + template + struct __rebind<_Tp, _Up, + __void_t::other>> + { using type = typename _Tp::template rebind<_Up>::other; }; + + protected: + template + using __pointer = typename _Tp::pointer; + template + using __c_pointer = typename _Tp::const_pointer; + template + using __v_pointer = typename _Tp::void_pointer; + template + using __cv_pointer = typename _Tp::const_void_pointer; + template + using __pocca = typename _Tp::propagate_on_container_copy_assignment; + template + using __pocma = typename _Tp::propagate_on_container_move_assignment; + template + using __pocs = typename _Tp::propagate_on_container_swap; + template + using __equal = typename _Tp::is_always_equal; + }; + + template + using __alloc_rebind + = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; + + + + + + template + struct allocator_traits : __allocator_traits_base + { + + typedef _Alloc allocator_type; + + typedef typename _Alloc::value_type value_type; + + + + + + + using pointer = __detected_or_t; + + private: + + template class _Func, typename _Tp, typename = void> + struct _Ptr + { + using type = typename pointer_traits::template rebind<_Tp>; + }; + + template class _Func, typename _Tp> + struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>> + { + using type = _Func<_Alloc>; + }; + + + template + struct _Diff + { using type = typename pointer_traits<_PtrT>::difference_type; }; + + template + struct _Diff<_A2, _PtrT, __void_t> + { using type = typename _A2::difference_type; }; + + + template + struct _Size : make_unsigned<_DiffT> { }; + + template + struct _Size<_A2, _DiffT, __void_t> + { using type = typename _A2::size_type; }; + + public: + + + + + + + using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; + + + + + + + + using void_pointer = typename _Ptr<__v_pointer, void>::type; + + + + + + + + using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; + + + + + + + + using difference_type = typename _Diff<_Alloc, pointer>::type; + + + + + + + + using size_type = typename _Size<_Alloc, difference_type>::type; + + + + + + + + using propagate_on_container_copy_assignment + = __detected_or_t; + + + + + + + + using propagate_on_container_move_assignment + = __detected_or_t; + + + + + + + + using propagate_on_container_swap + = __detected_or_t; + + + + + + + + using is_always_equal + = __detected_or_t::type, __equal, _Alloc>; + + template + using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; + template + using rebind_traits = allocator_traits>; + + private: + template + static constexpr auto + _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) + -> decltype(__a.allocate(__n, __hint)) + { return __a.allocate(__n, __hint); } + + template + static constexpr pointer + _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) + { return __a.allocate(__n); } + + template + struct __construct_helper + { + template()->construct( + std::declval<_Tp*>(), std::declval<_Args>()...))> + static true_type __test(int); + + template + static false_type __test(...); + + using type = decltype(__test<_Alloc>(0)); + }; + + template + using __has_construct + = typename __construct_helper<_Tp, _Args...>::type; + + template + static constexpr _Require<__has_construct<_Tp, _Args...>> + _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) + noexcept(noexcept(__a.construct(__p, std::forward<_Args>(__args)...))) + { __a.construct(__p, std::forward<_Args>(__args)...); } + + template + static constexpr + _Require<__and_<__not_<__has_construct<_Tp, _Args...>>, + is_constructible<_Tp, _Args...>>> + _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) + noexcept(std::is_nothrow_constructible<_Tp, _Args...>::value) + { + + + + std::construct_at(__p, std::forward<_Args>(__args)...); + + } + + template + static constexpr auto + _S_destroy(_Alloc2& __a, _Tp* __p, int) + noexcept(noexcept(__a.destroy(__p))) + -> decltype(__a.destroy(__p)) + { __a.destroy(__p); } + + template + static constexpr void + _S_destroy(_Alloc2&, _Tp* __p, ...) + noexcept(std::is_nothrow_destructible<_Tp>::value) + { std::_Destroy(__p); } + + template + static constexpr auto + _S_max_size(_Alloc2& __a, int) + -> decltype(__a.max_size()) + { return __a.max_size(); } + + template + static constexpr size_type + _S_max_size(_Alloc2&, ...) + { + + + return __gnu_cxx::__numeric_traits::__max + / sizeof(value_type); + } + + template + static constexpr auto + _S_select(_Alloc2& __a, int) + -> decltype(__a.select_on_container_copy_construction()) + { return __a.select_on_container_copy_construction(); } + + template + static constexpr _Alloc2 + _S_select(_Alloc2& __a, ...) + { return __a; } + + public: +# 312 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + [[__nodiscard__]] static constexpr pointer + allocate(_Alloc& __a, size_type __n) + { return __a.allocate(__n); } +# 327 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + [[__nodiscard__]] static constexpr pointer + allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) + { return _S_allocate(__a, __n, __hint, 0); } +# 339 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + static constexpr void + deallocate(_Alloc& __a, pointer __p, size_type __n) + { __a.deallocate(__p, __n); } +# 354 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + static constexpr auto + construct(_Alloc& __a, _Tp* __p, _Args&&... __args) + noexcept(noexcept(_S_construct(__a, __p, + std::forward<_Args>(__args)...))) + -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) + { _S_construct(__a, __p, std::forward<_Args>(__args)...); } +# 370 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + static constexpr void + destroy(_Alloc& __a, _Tp* __p) + noexcept(noexcept(_S_destroy(__a, __p, 0))) + { _S_destroy(__a, __p, 0); } +# 384 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + static constexpr size_type + max_size(const _Alloc& __a) noexcept + { return _S_max_size(__a, 0); } +# 396 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + static constexpr _Alloc + select_on_container_copy_construction(const _Alloc& __rhs) + { return _S_select(__rhs, 0); } + }; + + + + + + + template + struct allocator_traits> + { + + using allocator_type = allocator<_Tp>; + + + using value_type = _Tp; + + + using pointer = _Tp*; + + + using const_pointer = const _Tp*; + + + using void_pointer = void*; + + + using const_void_pointer = const void*; + + + using difference_type = std::ptrdiff_t; + + + using size_type = std::size_t; + + + using propagate_on_container_copy_assignment = false_type; + + + using propagate_on_container_move_assignment = true_type; + + + using propagate_on_container_swap = false_type; + + + using is_always_equal = true_type; + + template + using rebind_alloc = allocator<_Up>; + + template + using rebind_traits = allocator_traits>; +# 458 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + [[__nodiscard__]] static constexpr pointer + allocate(allocator_type& __a, size_type __n) + { return __a.allocate(__n); } +# 472 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + [[__nodiscard__]] static constexpr pointer + allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) + { + + + + return __a.allocate(__n); + + } +# 490 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + static constexpr void + deallocate(allocator_type& __a, pointer __p, size_type __n) + { __a.deallocate(__p, __n); } +# 505 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + static constexpr void + construct(allocator_type& __a __attribute__((__unused__)), _Up* __p, + _Args&&... __args) + noexcept(std::is_nothrow_constructible<_Up, _Args...>::value) + { + + + + std::construct_at(__p, std::forward<_Args>(__args)...); + + } +# 525 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + static constexpr void + destroy(allocator_type& __a __attribute__((__unused__)), _Up* __p) + noexcept(is_nothrow_destructible<_Up>::value) + { + + + + std::destroy_at(__p); + + } + + + + + + + static constexpr size_type + max_size(const allocator_type& __a __attribute__((__unused__))) noexcept + { + + + + return size_t(-1) / sizeof(value_type); + + } + + + + + + + static constexpr allocator_type + select_on_container_copy_construction(const allocator_type& __rhs) + { return __rhs; } + }; +# 574 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + constexpr inline void + __alloc_on_copy(_Alloc& __one, const _Alloc& __two) + { + typedef allocator_traits<_Alloc> __traits; + typedef typename __traits::propagate_on_container_copy_assignment __pocca; + + if constexpr (__pocca::value) + __one = __two; + + + + } + + template + constexpr _Alloc + __alloc_on_copy(const _Alloc& __a) + { + typedef allocator_traits<_Alloc> __traits; + return __traits::select_on_container_copy_construction(__a); + } +# 606 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + constexpr inline void + __alloc_on_move(_Alloc& __one, _Alloc& __two) + { + typedef allocator_traits<_Alloc> __traits; + typedef typename __traits::propagate_on_container_move_assignment __pocma; + + if constexpr (__pocma::value) + __one = std::move(__two); + + + + } +# 633 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + constexpr inline void + __alloc_on_swap(_Alloc& __one, _Alloc& __two) + { + typedef allocator_traits<_Alloc> __traits; + typedef typename __traits::propagate_on_container_swap __pocs; + + if constexpr (__pocs::value) + { + using std::swap; + swap(__one, __two); + } + + + + } + + template, + typename = void> + struct __is_alloc_insertable_impl + : false_type + { }; + + template + struct __is_alloc_insertable_impl<_Alloc, _Tp, _ValueT, + __void_t::construct( + std::declval<_Alloc&>(), std::declval<_ValueT*>(), + std::declval<_Tp>()))>> + : true_type + { }; + + + + + template + struct __is_copy_insertable + : __is_alloc_insertable_impl<_Alloc, + typename _Alloc::value_type const&>::type + { }; + + + template + struct __is_copy_insertable> + : is_copy_constructible<_Tp> + { }; + + + + + template + struct __is_move_insertable + : __is_alloc_insertable_impl<_Alloc, typename _Alloc::value_type>::type + { }; + + + template + struct __is_move_insertable> + : is_move_constructible<_Tp> + { }; + + + template + struct __is_allocator : false_type { }; + + template + struct __is_allocator<_Alloc, + __void_t().allocate(size_t{}))>> + : true_type { }; + + template + using _RequireAllocator + = typename enable_if<__is_allocator<_Alloc>::value, _Alloc>::type; + + template + using _RequireNotAllocator + = typename enable_if::value, _Alloc>::type; + + + template + concept __allocator_like = requires (_Alloc& __a) { + typename _Alloc::value_type; + __a.deallocate(__a.allocate(1u), 1u); + }; +# 727 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/alloc_traits.h" 3 + template + void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + _Allocator& __alloc) + { + for (; __first != __last; ++__first) + + + + allocator_traits<_Allocator>::destroy(__alloc, + std::__addressof(*__first)); + + } + + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + allocator<_Tp>&) + { + _Destroy(__first, __last); + } + + +} +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 2 3 + + + + +namespace __gnu_cxx +{ + + + + + + +template + struct __alloc_traits + + : std::allocator_traits<_Alloc> + + { + typedef _Alloc allocator_type; + + typedef std::allocator_traits<_Alloc> _Base_type; + typedef typename _Base_type::value_type value_type; + typedef typename _Base_type::pointer pointer; + typedef typename _Base_type::const_pointer const_pointer; + typedef typename _Base_type::size_type size_type; + typedef typename _Base_type::difference_type difference_type; + + typedef value_type& reference; + typedef const value_type& const_reference; + using _Base_type::allocate; + using _Base_type::deallocate; + using _Base_type::construct; + using _Base_type::destroy; + using _Base_type::max_size; + + private: + template + using __is_custom_pointer + = std::__and_, + std::__not_>>; + + public: + + template + static constexpr + std::__enable_if_t<__is_custom_pointer<_Ptr>::value> + construct(_Alloc& __a, _Ptr __p, _Args&&... __args) + noexcept(noexcept(_Base_type::construct(__a, std::__to_address(__p), + std::forward<_Args>(__args)...))) + { + _Base_type::construct(__a, std::__to_address(__p), + std::forward<_Args>(__args)...); + } + + + template + static constexpr + std::__enable_if_t<__is_custom_pointer<_Ptr>::value> + destroy(_Alloc& __a, _Ptr __p) + noexcept(noexcept(_Base_type::destroy(__a, std::__to_address(__p)))) + { _Base_type::destroy(__a, std::__to_address(__p)); } + + static constexpr _Alloc _S_select_on_copy(const _Alloc& __a) + { return _Base_type::select_on_container_copy_construction(__a); } + + static constexpr void _S_on_swap(_Alloc& __a, _Alloc& __b) + { std::__alloc_on_swap(__a, __b); } + + static constexpr bool _S_propagate_on_copy_assign() + { return _Base_type::propagate_on_container_copy_assignment::value; } + + static constexpr bool _S_propagate_on_move_assign() + { return _Base_type::propagate_on_container_move_assignment::value; } + + static constexpr bool _S_propagate_on_swap() + { return _Base_type::propagate_on_container_swap::value; } + + static constexpr bool _S_always_equal() + { return _Base_type::is_always_equal::value; } + + static constexpr bool _S_nothrow_move() + { return _S_propagate_on_move_assign() || _S_always_equal(); } + + template + struct rebind + { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; +# 166 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/alloc_traits.h" 3 + }; + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 2 3 + + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hash_bytes.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hash_bytes.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hash_bytes.h" 3 + + + +namespace std +{ + + + + + + + + size_t + _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); + + + + + + size_t + _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); + + +} +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 2 3 + +namespace std +{ + +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + template + struct __hash_base + { + typedef _Result result_type [[__deprecated__]]; + typedef _Arg argument_type [[__deprecated__]]; + }; + + + template + struct hash; + + template + struct __poison_hash + { + static constexpr bool __enable_hash_call = false; + private: + + __poison_hash(__poison_hash&&); + ~__poison_hash(); + }; + + template + struct __poison_hash<_Tp, __void_t()(declval<_Tp>()))>> + { + static constexpr bool __enable_hash_call = true; + }; + + + template::value> + struct __hash_enum + { + private: + + __hash_enum(__hash_enum&&); + ~__hash_enum(); + }; + + + template + struct __hash_enum<_Tp, true> : public __hash_base + { + size_t + operator()(_Tp __val) const noexcept + { + using __type = typename underlying_type<_Tp>::type; + return hash<__type>{}(static_cast<__type>(__val)); + } + }; + + + + template + struct hash : __hash_enum<_Tp> + { }; + + + template + struct hash<_Tp*> : public __hash_base + { + size_t + operator()(_Tp* __p) const noexcept + { return reinterpret_cast(__p); } + }; +# 125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + template<> struct hash : public __hash_base { size_t operator()(bool __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(char __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(signed char __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned char __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(wchar_t __val) const noexcept { return static_cast(__val); } }; + + + + template<> struct hash : public __hash_base { size_t operator()(char8_t __val) const noexcept { return static_cast(__val); } }; + + + + template<> struct hash : public __hash_base { size_t operator()(char16_t __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(char32_t __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(short __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(int __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(long __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(long long __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned short __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned int __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned long __val) const noexcept { return static_cast(__val); } }; + + + template<> struct hash : public __hash_base { size_t operator()(unsigned long long __val) const noexcept { return static_cast(__val); } }; +# 193 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + struct _Hash_impl + { + static size_t + hash(const void* __ptr, size_t __clength, + size_t __seed = static_cast(0xc70f6907UL)) + { return _Hash_bytes(__ptr, __clength, __seed); } + + template + static size_t + hash(const _Tp& __val) + { return hash(&__val, sizeof(__val)); } + + template + static size_t + __hash_combine(const _Tp& __val, size_t __hash) + { return hash(&__val, sizeof(__val), __hash); } + }; + + + struct _Fnv_hash_impl + { + static size_t + hash(const void* __ptr, size_t __clength, + size_t __seed = static_cast(2166136261UL)) + { return _Fnv_hash_bytes(__ptr, __clength, __seed); } + + template + static size_t + hash(const _Tp& __val) + { return hash(&__val, sizeof(__val)); } + + template + static size_t + __hash_combine(const _Tp& __val, size_t __hash) + { return hash(&__val, sizeof(__val), __hash); } + }; + + + template<> + struct hash : public __hash_base + { + size_t + operator()(float __val) const noexcept + { + + return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; + } + }; + + + template<> + struct hash : public __hash_base + { + size_t + operator()(double __val) const noexcept + { + + return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; + } + }; + + + template<> + struct hash + : public __hash_base + { + __attribute__ ((__pure__)) size_t + operator()(long double __val) const noexcept; + }; + + + template<> + struct hash : public __hash_base + { + size_t + operator()(nullptr_t) const noexcept + { return 0; } + }; +# 279 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/functional_hash.h" 3 + template + struct __is_fast_hash : public std::true_type + { }; + + template<> + struct __is_fast_hash> : public std::false_type + { }; + + +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 2 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_base.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_base.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_base.h" 3 + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/numbers" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/numbers" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/numbers" 3 + + + + + +namespace std +{ + + + + + + + + +namespace numbers +{ + + + + template + using _Enable_if_floating = enable_if_t, _Tp>; + + + + template + inline constexpr _Tp e_v + = _Enable_if_floating<_Tp>(2.718281828459045235360287471352662498L); + + + template + inline constexpr _Tp log2e_v + = _Enable_if_floating<_Tp>(1.442695040888963407359924681001892137L); + + + template + inline constexpr _Tp log10e_v + = _Enable_if_floating<_Tp>(0.434294481903251827651128918916605082L); + + + template + inline constexpr _Tp pi_v + = _Enable_if_floating<_Tp>(3.141592653589793238462643383279502884L); + + + template + inline constexpr _Tp inv_pi_v + = _Enable_if_floating<_Tp>(0.318309886183790671537767526745028724L); + + + template + inline constexpr _Tp inv_sqrtpi_v + = _Enable_if_floating<_Tp>(0.564189583547756286948079451560772586L); + + + template + inline constexpr _Tp ln2_v + = _Enable_if_floating<_Tp>(0.693147180559945309417232121458176568L); + + + template + inline constexpr _Tp ln10_v + = _Enable_if_floating<_Tp>(2.302585092994045684017991454684364208L); + + + template + inline constexpr _Tp sqrt2_v + = _Enable_if_floating<_Tp>(1.414213562373095048801688724209698079L); + + + template + inline constexpr _Tp sqrt3_v + = _Enable_if_floating<_Tp>(1.732050807568877293527446341505872367L); + + + template + inline constexpr _Tp inv_sqrt3_v + = _Enable_if_floating<_Tp>(0.577350269189625764509148780501957456L); + + + template + inline constexpr _Tp egamma_v + = _Enable_if_floating<_Tp>(0.577215664901532860606512090082402431L); + + + template + inline constexpr _Tp phi_v + = _Enable_if_floating<_Tp>(1.618033988749894848204586834365638118L); + + inline constexpr double e = e_v; + inline constexpr double log2e = log2e_v; + inline constexpr double log10e = log10e_v; + inline constexpr double pi = pi_v; + inline constexpr double inv_pi = inv_pi_v; + inline constexpr double inv_sqrtpi = inv_sqrtpi_v; + inline constexpr double ln2 = ln2_v; + inline constexpr double ln10 = ln10_v; + inline constexpr double sqrt2 = sqrt2_v; + inline constexpr double sqrt3 = sqrt3_v; + inline constexpr double inv_sqrt3 = inv_sqrt3_v; + inline constexpr double egamma = egamma_v; + inline constexpr double phi = phi_v; +# 202 "D:/compilers/msys64/mingw64/include/c++/11.2.0/numbers" 3 +} + + +} +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 2 3 +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 +namespace std +{ + + +template + struct numeric_limits; + +namespace ranges +{ + namespace __detail + { + class __max_size_type + { + public: + __max_size_type() = default; + + template requires integral<_Tp> || __is_int128<_Tp> + constexpr + __max_size_type(_Tp __i) noexcept + : _M_val(__i), _M_msb(__i < 0) + { } + + constexpr explicit + __max_size_type(const __max_diff_type& __d) noexcept; + + template requires integral<_Tp> || __is_int128<_Tp> + constexpr explicit + operator _Tp() const noexcept + { return _M_val; } + + constexpr explicit + operator bool() const noexcept + { return _M_val != 0 || _M_msb != 0; } + + constexpr __max_size_type + operator+() const noexcept + { return *this; } + + constexpr __max_size_type + operator~() const noexcept + { return __max_size_type{~_M_val, !_M_msb}; } + + constexpr __max_size_type + operator-() const noexcept + { return operator~() + 1; } + + constexpr __max_size_type& + operator++() noexcept + { return *this += 1; } + + constexpr __max_size_type + operator++(int) noexcept + { + auto __tmp = *this; + ++*this; + return __tmp; + } + + constexpr __max_size_type& + operator--() noexcept + { return *this -= 1; } + + constexpr __max_size_type + operator--(int) noexcept + { + auto __tmp = *this; + --*this; + return __tmp; + } + + constexpr __max_size_type& + operator+=(const __max_size_type& __r) noexcept + { + const auto __sum = _M_val + __r._M_val; + const bool __overflow = (__sum < _M_val); + _M_msb = _M_msb ^ __r._M_msb ^ __overflow; + _M_val = __sum; + return *this; + } + + constexpr __max_size_type& + operator-=(const __max_size_type& __r) noexcept + { return *this += -__r; } + + constexpr __max_size_type& + operator*=(__max_size_type __r) noexcept + { + constexpr __max_size_type __threshold + = __rep(1) << (_S_rep_bits / 2 - 1); + if (_M_val < __threshold && __r < __threshold) + + + _M_val = _M_val * __r._M_val; + else + { + + + + const bool __lsb = _M_val & 1; + const bool __rlsb = __r._M_val & 1; + *this >>= 1; + __r >>= 1; + _M_val = (2 * _M_val * __r._M_val + + _M_val * __rlsb + __r._M_val * __lsb); + *this <<= 1; + *this += __rlsb * __lsb; + } + + return *this; + } + + constexpr __max_size_type& + operator/=(const __max_size_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r != 0)) __builtin_unreachable(); } while (false); + + if (!_M_msb && !__r._M_msb) [[likely]] + _M_val /= __r._M_val; + else if (_M_msb && __r._M_msb) + { + _M_val = (_M_val >= __r._M_val); + _M_msb = 0; + } + else if (!_M_msb && __r._M_msb) + _M_val = 0; + else if (_M_msb && !__r._M_msb) + { + + + + + const auto __orig = *this; + *this >>= 1; + _M_val /= __r._M_val; + *this <<= 1; + if (__orig - *this * __r >= __r) + ++_M_val; + } + return *this; + } + + constexpr __max_size_type& + operator%=(const __max_size_type& __r) noexcept + { + if (!_M_msb && !__r._M_msb) [[likely]] + _M_val %= __r._M_val; + else + *this -= (*this / __r) * __r; + return *this; + } + + constexpr __max_size_type& + operator<<=(const __max_size_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r <= _S_rep_bits)) __builtin_unreachable(); } while (false); + if (__r != 0) + { + _M_msb = (_M_val >> (_S_rep_bits - __r._M_val)) & 1; + + if (__r._M_val == _S_rep_bits) [[unlikely]] + _M_val = 0; + else + _M_val <<= __r._M_val; + } + return *this; + } + + constexpr __max_size_type& + operator>>=(const __max_size_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r <= _S_rep_bits)) __builtin_unreachable(); } while (false); + if (__r != 0) + { + if (__r._M_val == _S_rep_bits) [[unlikely]] + _M_val = 0; + else + _M_val >>= __r._M_val; + + if (_M_msb) [[unlikely]] + { + _M_val |= __rep(1) << (_S_rep_bits - __r._M_val); + _M_msb = 0; + } + } + return *this; + } + + constexpr __max_size_type& + operator&=(const __max_size_type& __r) noexcept + { + _M_val &= __r._M_val; + _M_msb &= __r._M_msb; + return *this; + } + + constexpr __max_size_type& + operator|=(const __max_size_type& __r) noexcept + { + _M_val |= __r._M_val; + _M_msb |= __r._M_msb; + return *this; + } + + constexpr __max_size_type& + operator^=(const __max_size_type& __r) noexcept + { + _M_val ^= __r._M_val; + _M_msb ^= __r._M_msb; + return *this; + } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator+=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a + __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator-=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a - __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator*=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a * __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator/=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a / __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator%=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a % __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator&=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a & __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator|=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a | __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator^=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a ^ __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator<<=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a << __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator>>=(_Tp& __a, const __max_size_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a >> __b)); } + + friend constexpr __max_size_type + operator+(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l += __r; + return __l; + } + + friend constexpr __max_size_type + operator-(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l -= __r; + return __l; + } + + friend constexpr __max_size_type + operator*(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l *= __r; + return __l; + } + + friend constexpr __max_size_type + operator/(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l /= __r; + return __l; + } + + friend constexpr __max_size_type + operator%(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l %= __r; + return __l; + } + + friend constexpr __max_size_type + operator<<(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l <<= __r; + return __l; + } + + friend constexpr __max_size_type + operator>>(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l >>= __r; + return __l; + } + + friend constexpr __max_size_type + operator&(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l &= __r; + return __l; + } + + friend constexpr __max_size_type + operator|(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l |= __r; + return __l; + } + + friend constexpr __max_size_type + operator^(__max_size_type __l, const __max_size_type& __r) noexcept + { + __l ^= __r; + return __l; + } + + friend constexpr bool + operator==(const __max_size_type& __l, const __max_size_type& __r) noexcept + { return __l._M_val == __r._M_val && __l._M_msb == __r._M_msb; } + + + friend constexpr strong_ordering + operator<=>(const __max_size_type& __l, const __max_size_type& __r) noexcept + { + if (__l._M_msb ^ __r._M_msb) + return __l._M_msb ? strong_ordering::greater : strong_ordering::less; + else + return __l._M_val <=> __r._M_val; + } +# 420 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 + using __rep = unsigned __int128; + + + + static constexpr size_t _S_rep_bits = sizeof(__rep) * 8; + private: + __rep _M_val = 0; + unsigned _M_msb:1 = 0; + + constexpr explicit + __max_size_type(__rep __val, int __msb) noexcept + : _M_val(__val), _M_msb(__msb) + { } + + friend __max_diff_type; + friend std::numeric_limits<__max_size_type>; + friend std::numeric_limits<__max_diff_type>; + }; + + class __max_diff_type + { + public: + __max_diff_type() = default; + + template requires integral<_Tp> || __is_int128<_Tp> + constexpr + __max_diff_type(_Tp __i) noexcept + : _M_rep(__i) + { } + + constexpr explicit + __max_diff_type(const __max_size_type& __d) noexcept + : _M_rep(__d) + { } + + template requires integral<_Tp> || __is_int128<_Tp> + constexpr explicit + operator _Tp() const noexcept + { return static_cast<_Tp>(_M_rep); } + + constexpr explicit + operator bool() const noexcept + { return _M_rep != 0; } + + constexpr __max_diff_type + operator+() const noexcept + { return *this; } + + constexpr __max_diff_type + operator-() const noexcept + { return __max_diff_type(-_M_rep); } + + constexpr __max_diff_type + operator~() const noexcept + { return __max_diff_type(~_M_rep); } + + constexpr __max_diff_type& + operator++() noexcept + { return *this += 1; } + + constexpr __max_diff_type + operator++(int) noexcept + { + auto __tmp = *this; + ++*this; + return __tmp; + } + + constexpr __max_diff_type& + operator--() noexcept + { return *this -= 1; } + + constexpr __max_diff_type + operator--(int) noexcept + { + auto __tmp = *this; + --*this; + return __tmp; + } + + constexpr __max_diff_type& + operator+=(const __max_diff_type& __r) noexcept + { + _M_rep += __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator-=(const __max_diff_type& __r) noexcept + { + _M_rep -= __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator*=(const __max_diff_type& __r) noexcept + { + _M_rep *= __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator/=(const __max_diff_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r != 0)) __builtin_unreachable(); } while (false); + const bool __neg = *this < 0; + const bool __rneg = __r < 0; + if (!__neg && !__rneg) + _M_rep = _M_rep / __r._M_rep; + else if (__neg && __rneg) + _M_rep = -_M_rep / -__r._M_rep; + else if (__neg && !__rneg) + _M_rep = -(-_M_rep / __r._M_rep); + else + _M_rep = -(_M_rep / -__r._M_rep); + return *this ; + } + + constexpr __max_diff_type& + operator%=(const __max_diff_type& __r) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__r != 0)) __builtin_unreachable(); } while (false); + if (*this >= 0 && __r > 0) + _M_rep %= __r._M_rep; + else + *this -= (*this / __r) * __r; + return *this; + } + + constexpr __max_diff_type& + operator<<=(const __max_diff_type& __r) noexcept + { + _M_rep.operator<<=(__r._M_rep); + return *this; + } + + constexpr __max_diff_type& + operator>>=(const __max_diff_type& __r) noexcept + { + + const auto __msb = _M_rep._M_msb; + _M_rep >>= __r._M_rep; + _M_rep._M_msb |= __msb; + return *this; + } + + constexpr __max_diff_type& + operator&=(const __max_diff_type& __r) noexcept + { + _M_rep &= __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator|=(const __max_diff_type& __r) noexcept + { + _M_rep |= __r._M_rep; + return *this; + } + + constexpr __max_diff_type& + operator^=(const __max_diff_type& __r) noexcept + { + _M_rep ^= __r._M_rep; + return *this; + } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator+=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a + __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator-=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a - __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator*=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a * __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator/=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a / __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator%=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a % __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator&=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a & __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator|=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a | __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator^=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a ^ __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator<<=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a << __b)); } + + template requires integral<_Tp> || __is_int128<_Tp> + friend constexpr _Tp& + operator>>=(_Tp& __a, const __max_diff_type& __b) noexcept + { return (__a = static_cast<_Tp>(__a >> __b)); } + + friend constexpr __max_diff_type + operator+(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l += __r; + return __l; + } + + friend constexpr __max_diff_type + operator-(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l -= __r; + return __l; + } + + friend constexpr __max_diff_type + operator*(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l *= __r; + return __l; + } + + friend constexpr __max_diff_type + operator/(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l /= __r; + return __l; + } + + friend constexpr __max_diff_type + operator%(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l %= __r; + return __l; + } + + friend constexpr __max_diff_type + operator<<(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l <<= __r; + return __l; + } + + friend constexpr __max_diff_type + operator>>(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l >>= __r; + return __l; + } + + friend constexpr __max_diff_type + operator&(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l &= __r; + return __l; + } + + friend constexpr __max_diff_type + operator|(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l |= __r; + return __l; + } + + friend constexpr __max_diff_type + operator^(__max_diff_type __l, const __max_diff_type& __r) noexcept + { + __l ^= __r; + return __l; + } + + friend constexpr bool + operator==(const __max_diff_type& __l, const __max_diff_type& __r) noexcept + { return __l._M_rep == __r._M_rep; } + + + constexpr strong_ordering + operator<=>(const __max_diff_type& __r) const noexcept + { + const auto __lsign = _M_rep._M_msb; + const auto __rsign = __r._M_rep._M_msb; + if (__lsign ^ __rsign) + return __lsign ? strong_ordering::less : strong_ordering::greater; + else + return _M_rep <=> __r._M_rep; + } +# 751 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/max_size_type.h" 3 + private: + __max_size_type _M_rep = 0; + + friend class __max_size_type; + }; + + constexpr + __max_size_type::__max_size_type(const __max_diff_type& __d) noexcept + : __max_size_type(__d._M_rep) + { } + + } +} + + template<> + struct numeric_limits + { + using _Sp = ranges::__detail::__max_size_type; + static constexpr bool is_specialized = true; + static constexpr bool is_signed = false; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + + static_assert(same_as<_Sp::__rep, unsigned __int128>); + static constexpr int digits = 129; + + + + + + static constexpr int digits10 + = static_cast(digits * numbers::ln2 / numbers::ln10); + + static constexpr _Sp + min() noexcept + { return 0; } + + static constexpr _Sp + max() noexcept + { return _Sp(static_cast<_Sp::__rep>(-1), 1); } + + static constexpr _Sp + lowest() noexcept + { return min(); } + }; + + template<> + struct numeric_limits + { + using _Dp = ranges::__detail::__max_diff_type; + using _Sp = ranges::__detail::__max_size_type; + static constexpr bool is_specialized = true; + static constexpr bool is_signed = true; + static constexpr bool is_integer = true; + static constexpr bool is_exact = true; + static constexpr int digits = numeric_limits<_Sp>::digits - 1; + static constexpr int digits10 + = static_cast(digits * numbers::ln2 / numbers::ln10); + + static constexpr _Dp + min() noexcept + { return _Dp(_Sp(0, 1)); } + + static constexpr _Dp + max() noexcept + { return _Dp(_Sp(static_cast<_Sp::__rep>(-1), 0)); } + + static constexpr _Dp + lowest() noexcept + { return min(); } + }; + + +} +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_base.h" 2 3 + + +namespace std +{ + +namespace ranges +{ + template + inline constexpr bool disable_sized_range = false; + + template + inline constexpr bool enable_borrowed_range = false; + + namespace __detail + { + constexpr __max_size_type + __to_unsigned_like(__max_size_type __t) noexcept + { return __t; } + + constexpr __max_size_type + __to_unsigned_like(__max_diff_type __t) noexcept + { return __max_size_type(__t); } + + template + constexpr auto + __to_unsigned_like(_Tp __t) noexcept + { return static_cast>(__t); } + + + constexpr unsigned __int128 + __to_unsigned_like(__int128 __t) noexcept + { return __t; } + + constexpr unsigned __int128 + __to_unsigned_like(unsigned __int128 __t) noexcept + { return __t; } + + + template + using __make_unsigned_like_t + = decltype(__detail::__to_unsigned_like(std::declval<_Tp>())); + + + template + concept __maybe_borrowed_range + = is_lvalue_reference_v<_Tp> + || enable_borrowed_range>; + + } + + namespace __cust_access + { + using std::ranges::__detail::__maybe_borrowed_range; + using std::__detail::__range_iter_t; + + struct _Begin + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (is_array_v>) + return true; + else if constexpr (__member_begin<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().begin())); + else + return noexcept(__decay_copy(begin(std::declval<_Tp&>()))); + } + + public: + template<__maybe_borrowed_range _Tp> + requires is_array_v> || __member_begin<_Tp> + || __adl_begin<_Tp> + constexpr auto + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (is_array_v>) + { + static_assert(is_lvalue_reference_v<_Tp>); + return __t + 0; + } + else if constexpr (__member_begin<_Tp>) + return __t.begin(); + else + return begin(__t); + } + }; + + template + concept __member_end = requires(_Tp& __t) + { + { __decay_copy(__t.end()) } -> sentinel_for<__range_iter_t<_Tp>>; + }; + + + void end(auto&) = delete; + void end(const auto&) = delete; + + template + concept __adl_end = __class_or_enum> + && requires(_Tp& __t) + { + { __decay_copy(end(__t)) } -> sentinel_for<__range_iter_t<_Tp>>; + }; + + struct _End + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (is_bounded_array_v>) + return true; + else if constexpr (__member_end<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().end())); + else + return noexcept(__decay_copy(end(std::declval<_Tp&>()))); + } + + public: + template<__maybe_borrowed_range _Tp> + requires is_bounded_array_v> + || __member_end<_Tp> || __adl_end<_Tp> + constexpr auto + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (is_bounded_array_v>) + { + static_assert(is_lvalue_reference_v<_Tp>); + return __t + extent_v>; + } + else if constexpr (__member_end<_Tp>) + return __t.end(); + else + return end(__t); + } + }; + + + template + constexpr decltype(auto) + __as_const(_Tp& __t) noexcept + { + static_assert(std::is_same_v<_To&, _Tp&>); + + if constexpr (is_lvalue_reference_v<_To>) + return const_cast(__t); + else + return static_cast(__t); + } + + struct _CBegin + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_Begin{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _Begin{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _Begin{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + struct _CEnd + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_End{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _End{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _End{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + template + concept __member_rbegin = requires(_Tp& __t) + { + { __decay_copy(__t.rbegin()) } -> input_or_output_iterator; + }; + + void rbegin(auto&) = delete; + void rbegin(const auto&) = delete; + + template + concept __adl_rbegin = __class_or_enum> + && requires(_Tp& __t) + { + { __decay_copy(rbegin(__t)) } -> input_or_output_iterator; + }; + + template + concept __reversable = requires(_Tp& __t) + { + { _Begin{}(__t) } -> bidirectional_iterator; + { _End{}(__t) } -> same_as; + }; + + struct _RBegin + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__member_rbegin<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().rbegin())); + else if constexpr (__adl_rbegin<_Tp>) + return noexcept(__decay_copy(rbegin(std::declval<_Tp&>()))); + else + { + if constexpr (noexcept(_End{}(std::declval<_Tp&>()))) + { + using _It = decltype(_End{}(std::declval<_Tp&>())); + + return is_nothrow_copy_constructible_v<_It>; + } + else + return false; + } + } + + public: + template<__maybe_borrowed_range _Tp> + requires __member_rbegin<_Tp> || __adl_rbegin<_Tp> || __reversable<_Tp> + constexpr auto + operator()(_Tp&& __t) const + noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (__member_rbegin<_Tp>) + return __t.rbegin(); + else if constexpr (__adl_rbegin<_Tp>) + return rbegin(__t); + else + return std::make_reverse_iterator(_End{}(__t)); + } + }; + + template + concept __member_rend = requires(_Tp& __t) + { + { __decay_copy(__t.rend()) } + -> sentinel_for(__t)))>; + }; + + void rend(auto&) = delete; + void rend(const auto&) = delete; + + template + concept __adl_rend = __class_or_enum> + && requires(_Tp& __t) + { + { __decay_copy(rend(__t)) } + -> sentinel_for(__t)))>; + }; + + struct _REnd + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__member_rend<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().rend())); + else if constexpr (__adl_rend<_Tp>) + return noexcept(__decay_copy(rend(std::declval<_Tp&>()))); + else + { + if constexpr (noexcept(_Begin{}(std::declval<_Tp&>()))) + { + using _It = decltype(_Begin{}(std::declval<_Tp&>())); + + return is_nothrow_copy_constructible_v<_It>; + } + else + return false; + } + } + + public: + template<__maybe_borrowed_range _Tp> + requires __member_rend<_Tp> || __adl_rend<_Tp> || __reversable<_Tp> + constexpr auto + operator()(_Tp&& __t) const + noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (__member_rend<_Tp>) + return __t.rend(); + else if constexpr (__adl_rend<_Tp>) + return rend(__t); + else + return std::make_reverse_iterator(_Begin{}(__t)); + } + }; + + struct _CRBegin + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_RBegin{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _RBegin{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _RBegin{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + struct _CREnd + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_REnd{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _REnd{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _REnd{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + template + concept __member_size = !disable_sized_range> + && requires(_Tp& __t) + { + { __decay_copy(__t.size()) } -> __detail::__is_integer_like; + }; + + void size(auto&) = delete; + void size(const auto&) = delete; + + template + concept __adl_size = __class_or_enum> + && !disable_sized_range> + && requires(_Tp& __t) + { + { __decay_copy(size(__t)) } -> __detail::__is_integer_like; + }; + + template + concept __sentinel_size = requires(_Tp& __t) + { + { _Begin{}(__t) } -> forward_iterator; + + { _End{}(__t) } -> sized_sentinel_for; + + __detail::__to_unsigned_like(_End{}(__t) - _Begin{}(__t)); + }; + + struct _Size + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (is_bounded_array_v>) + return true; + else if constexpr (__member_size<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().size())); + else if constexpr (__adl_size<_Tp>) + return noexcept(__decay_copy(size(std::declval<_Tp&>()))); + else if constexpr (__sentinel_size<_Tp>) + return noexcept(_End{}(std::declval<_Tp&>()) + - _Begin{}(std::declval<_Tp&>())); + } + + public: + template + requires is_bounded_array_v> + || __member_size<_Tp> || __adl_size<_Tp> || __sentinel_size<_Tp> + constexpr auto + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (is_bounded_array_v>) + return extent_v>; + else if constexpr (__member_size<_Tp>) + return __t.size(); + else if constexpr (__adl_size<_Tp>) + return size(__t); + else if constexpr (__sentinel_size<_Tp>) + return __detail::__to_unsigned_like(_End{}(__t) - _Begin{}(__t)); + } + }; + + struct _SSize + { + + + template + requires requires (_Tp& __t) { _Size{}(__t); } + constexpr auto + operator()(_Tp&& __t) const noexcept(noexcept(_Size{}(__t))) + { + auto __size = _Size{}(__t); + using __size_type = decltype(__size); + + if constexpr (integral<__size_type>) + { + using __gnu_cxx::__int_traits; + if constexpr (__int_traits<__size_type>::__digits + < __int_traits::__digits) + return static_cast(__size); + else + return static_cast>(__size); + } + + + else if constexpr (__detail::__is_int128<__size_type>) + return static_cast<__int128>(__size); + + else + return __detail::__max_diff_type(__size); + } + }; + + template + concept __member_empty = requires(_Tp& __t) { bool(__t.empty()); }; + + template + concept __size0_empty = requires(_Tp& __t) { _Size{}(__t) == 0; }; + + template + concept __eq_iter_empty = requires(_Tp& __t) + { + { _Begin{}(__t) } -> forward_iterator; + + bool(_Begin{}(__t) == _End{}(__t)); + }; + + struct _Empty + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__member_empty<_Tp>) + return noexcept(bool(std::declval<_Tp&>().empty())); + else if constexpr (__size0_empty<_Tp>) + return noexcept(_Size{}(std::declval<_Tp&>()) == 0); + else + return noexcept(bool(_Begin{}(std::declval<_Tp&>()) + == _End{}(std::declval<_Tp&>()))); + } + + public: + template + requires __member_empty<_Tp> || __size0_empty<_Tp> + || __eq_iter_empty<_Tp> + constexpr bool + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp&>()) + { + if constexpr (__member_empty<_Tp>) + return bool(__t.empty()); + else if constexpr (__size0_empty<_Tp>) + return _Size{}(__t) == 0; + else + return bool(_Begin{}(__t) == _End{}(__t)); + } + }; + + template + concept __pointer_to_object = is_pointer_v<_Tp> + && is_object_v>; + + template + concept __member_data = requires(_Tp& __t) + { + { __decay_copy(__t.data()) } -> __pointer_to_object; + }; + + template + concept __begin_data = contiguous_iterator<__range_iter_t<_Tp>>; + + struct _Data + { + private: + template + static constexpr bool + _S_noexcept() + { + if constexpr (__member_data<_Tp>) + return noexcept(__decay_copy(std::declval<_Tp&>().data())); + else + return noexcept(_Begin{}(std::declval<_Tp&>())); + } + + public: + template<__maybe_borrowed_range _Tp> + requires __member_data<_Tp> || __begin_data<_Tp> + constexpr auto + operator()(_Tp&& __t) const noexcept(_S_noexcept<_Tp>()) + { + if constexpr (__member_data<_Tp>) + return __t.data(); + else + return std::to_address(_Begin{}(__t)); + } + }; + + struct _CData + { + template + constexpr auto + operator()(_Tp&& __e) const + noexcept(noexcept(_Data{}(__cust_access::__as_const<_Tp>(__e)))) + requires requires { _Data{}(__cust_access::__as_const<_Tp>(__e)); } + { + return _Data{}(__cust_access::__as_const<_Tp>(__e)); + } + }; + + } + + inline namespace __cust + { + inline constexpr __cust_access::_Begin begin{}; + inline constexpr __cust_access::_End end{}; + inline constexpr __cust_access::_CBegin cbegin{}; + inline constexpr __cust_access::_CEnd cend{}; + inline constexpr __cust_access::_RBegin rbegin{}; + inline constexpr __cust_access::_REnd rend{}; + inline constexpr __cust_access::_CRBegin crbegin{}; + inline constexpr __cust_access::_CREnd crend{}; + inline constexpr __cust_access::_Size size{}; + inline constexpr __cust_access::_SSize ssize{}; + inline constexpr __cust_access::_Empty empty{}; + inline constexpr __cust_access::_Data data{}; + inline constexpr __cust_access::_CData cdata{}; + } + + + template + concept range = requires(_Tp& __t) + { + ranges::begin(__t); + ranges::end(__t); + }; + + + template + concept borrowed_range + = range<_Tp> && __detail::__maybe_borrowed_range<_Tp>; + + template + using iterator_t = std::__detail::__range_iter_t<_Tp>; + + template + using sentinel_t = decltype(ranges::end(std::declval<_Range&>())); + + template + using range_difference_t = iter_difference_t>; + + template + using range_value_t = iter_value_t>; + + template + using range_reference_t = iter_reference_t>; + + template + using range_rvalue_reference_t + = iter_rvalue_reference_t>; + + + template + concept sized_range = range<_Tp> + && requires(_Tp& __t) { ranges::size(__t); }; + + template + using range_size_t = decltype(ranges::size(std::declval<_Range&>())); + + + struct view_base { }; + + + template + inline constexpr bool enable_view = derived_from<_Tp, view_base>; + + + template + concept view + = range<_Tp> && movable<_Tp> && default_initializable<_Tp> + && enable_view<_Tp>; + + + + + template + concept output_range + = range<_Range> && output_iterator, _Tp>; + + + template + concept input_range = range<_Tp> && input_iterator>; + + + template + concept forward_range + = input_range<_Tp> && forward_iterator>; + + + template + concept bidirectional_range + = forward_range<_Tp> && bidirectional_iterator>; + + + template + concept random_access_range + = bidirectional_range<_Tp> && random_access_iterator>; + + + template + concept contiguous_range + = random_access_range<_Tp> && contiguous_iterator> + && requires(_Tp& __t) + { + { ranges::data(__t) } -> same_as>>; + }; + + + template + concept common_range + = range<_Tp> && same_as, sentinel_t<_Tp>>; + + + template + concept viewable_range = range<_Tp> + && (borrowed_range<_Tp> || view>); + + + + struct __advance_fn + { + template + constexpr void + operator()(_It& __it, iter_difference_t<_It> __n) const + { + if constexpr (random_access_iterator<_It>) + __it += __n; + else if constexpr (bidirectional_iterator<_It>) + { + if (__n > 0) + { + do + { + ++__it; + } + while (--__n); + } + else if (__n < 0) + { + do + { + --__it; + } + while (++__n); + } + } + else + { + + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + while (__n-- > 0) + ++__it; + } + } + + template _Sent> + constexpr void + operator()(_It& __it, _Sent __bound) const + { + if constexpr (assignable_from<_It&, _Sent>) + __it = std::move(__bound); + else if constexpr (sized_sentinel_for<_Sent, _It>) + (*this)(__it, __bound - __it); + else + { + while (__it != __bound) + ++__it; + } + } + + template _Sent> + constexpr iter_difference_t<_It> + operator()(_It& __it, iter_difference_t<_It> __n, _Sent __bound) const + { + if constexpr (sized_sentinel_for<_Sent, _It>) + { + const auto __diff = __bound - __it; + + + do { if (__builtin_is_constant_evaluated() && !bool(__n == 0 || __diff == 0 || (__n < 0 == __diff < 0))) __builtin_unreachable(); } while (false); + const auto __absdiff = __diff < 0 ? -__diff : __diff; + const auto __absn = __n < 0 ? -__n : __n;; + if (__absn >= __absdiff) + { + (*this)(__it, __bound); + return __n - __diff; + } + else + { + (*this)(__it, __n); + return 0; + } + } + else if (__it == __bound || __n == 0) + return __n; + else if (__n > 0) + { + iter_difference_t<_It> __m = 0; + do + { + ++__it; + ++__m; + } + while (__m != __n && __it != __bound); + return __n - __m; + } + else if constexpr (bidirectional_iterator<_It> && same_as<_It, _Sent>) + { + iter_difference_t<_It> __m = 0; + do + { + --__it; + --__m; + } + while (__m != __n && __it != __bound); + return __n - __m; + } + else + { + + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + return __n; + } + } + }; + + inline constexpr __advance_fn advance{}; + + struct __distance_fn + { + template _Sent> + constexpr iter_difference_t<_It> + operator()(_It __first, _Sent __last) const + { + if constexpr (sized_sentinel_for<_Sent, _It>) + return __last - __first; + else + { + iter_difference_t<_It> __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + } + + template + constexpr range_difference_t<_Range> + operator()(_Range&& __r) const + { + if constexpr (sized_range<_Range>) + return static_cast>(ranges::size(__r)); + else + return (*this)(ranges::begin(__r), ranges::end(__r)); + } + }; + + inline constexpr __distance_fn distance{}; + + struct __next_fn + { + template + constexpr _It + operator()(_It __x) const + { + ++__x; + return __x; + } + + template + constexpr _It + operator()(_It __x, iter_difference_t<_It> __n) const + { + ranges::advance(__x, __n); + return __x; + } + + template _Sent> + constexpr _It + operator()(_It __x, _Sent __bound) const + { + ranges::advance(__x, __bound); + return __x; + } + + template _Sent> + constexpr _It + operator()(_It __x, iter_difference_t<_It> __n, _Sent __bound) const + { + ranges::advance(__x, __n, __bound); + return __x; + } + }; + + inline constexpr __next_fn next{}; + + struct __prev_fn + { + template + constexpr _It + operator()(_It __x) const + { + --__x; + return __x; + } + + template + constexpr _It + operator()(_It __x, iter_difference_t<_It> __n) const + { + ranges::advance(__x, -__n); + return __x; + } + + template + constexpr _It + operator()(_It __x, iter_difference_t<_It> __n, _It __bound) const + { + ranges::advance(__x, -__n, __bound); + return __x; + } + }; + + inline constexpr __prev_fn prev{}; + + + struct dangling + { + constexpr dangling() noexcept = default; + template + constexpr dangling(_Args&&...) noexcept { } + }; + + template + using borrowed_iterator_t = conditional_t, + iterator_t<_Range>, + dangling>; + +} + +} +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 2 3 + + +namespace std +{ + + + + + + + + + constexpr size_t + __sv_check(size_t __size, size_t __pos, const char* __s) + { + if (__pos > __size) + __throw_out_of_range_fmt(("%s: __pos (which is %zu) > __size " "(which is %zu)") + , __s, __pos, __size); + return __pos; + } + + + + constexpr size_t + __sv_limit(size_t __size, size_t __pos, size_t __off) noexcept + { + const bool __testoff = __off < __size - __pos; + return __testoff ? __off : __size - __pos; + } +# 97 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + template> + class basic_string_view + { + static_assert(!is_array_v<_CharT>); + static_assert(is_trivial_v<_CharT> && is_standard_layout_v<_CharT>); + static_assert(is_same_v<_CharT, typename _Traits::char_type>); + + public: + + + using traits_type = _Traits; + using value_type = _CharT; + using pointer = value_type*; + using const_pointer = const value_type*; + using reference = value_type&; + using const_reference = const value_type&; + using const_iterator = const value_type*; + using iterator = const_iterator; + using const_reverse_iterator = std::reverse_iterator; + using reverse_iterator = const_reverse_iterator; + using size_type = size_t; + using difference_type = ptrdiff_t; + static constexpr size_type npos = size_type(-1); + + + + constexpr + basic_string_view() noexcept + : _M_len{0}, _M_str{nullptr} + { } + + constexpr basic_string_view(const basic_string_view&) noexcept = default; + + __attribute__((__nonnull__)) constexpr + basic_string_view(const _CharT* __str) noexcept + : _M_len{traits_type::length(__str)}, + _M_str{__str} + { } + + constexpr + basic_string_view(const _CharT* __str, size_type __len) noexcept + : _M_len{__len}, _M_str{__str} + { } + + + template _End> + requires same_as, _CharT> + && (!convertible_to<_End, size_type>) + constexpr + basic_string_view(_It __first, _End __last) + : _M_len(__last - __first), _M_str(std::to_address(__first)) + { } +# 170 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + constexpr basic_string_view& + operator=(const basic_string_view&) noexcept = default; + + + + constexpr const_iterator + begin() const noexcept + { return this->_M_str; } + + constexpr const_iterator + end() const noexcept + { return this->_M_str + this->_M_len; } + + constexpr const_iterator + cbegin() const noexcept + { return this->_M_str; } + + constexpr const_iterator + cend() const noexcept + { return this->_M_str + this->_M_len; } + + constexpr const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + constexpr const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(this->begin()); } + + constexpr const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + constexpr const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(this->begin()); } + + + + constexpr size_type + size() const noexcept + { return this->_M_len; } + + constexpr size_type + length() const noexcept + { return _M_len; } + + constexpr size_type + max_size() const noexcept + { + return (npos - sizeof(size_type) - sizeof(void*)) + / sizeof(value_type) / 4; + } + + [[nodiscard]] constexpr bool + empty() const noexcept + { return this->_M_len == 0; } + + + + constexpr const_reference + operator[](size_type __pos) const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__pos < this->_M_len)) __builtin_unreachable(); } while (false); + return *(this->_M_str + __pos); + } + + constexpr const_reference + at(size_type __pos) const + { + if (__pos >= _M_len) + __throw_out_of_range_fmt(("basic_string_view::at: __pos " "(which is %zu) >= this->size() " "(which is %zu)") + + , __pos, this->size()); + return *(this->_M_str + __pos); + } + + constexpr const_reference + front() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(this->_M_len > 0)) __builtin_unreachable(); } while (false); + return *this->_M_str; + } + + constexpr const_reference + back() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(this->_M_len > 0)) __builtin_unreachable(); } while (false); + return *(this->_M_str + this->_M_len - 1); + } + + constexpr const_pointer + data() const noexcept + { return this->_M_str; } + + + + constexpr void + remove_prefix(size_type __n) noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(this->_M_len >= __n)) __builtin_unreachable(); } while (false); + this->_M_str += __n; + this->_M_len -= __n; + } + + constexpr void + remove_suffix(size_type __n) noexcept + { this->_M_len -= __n; } + + constexpr void + swap(basic_string_view& __sv) noexcept + { + auto __tmp = *this; + *this = __sv; + __sv = __tmp; + } + + + + constexpr + size_type + copy(_CharT* __str, size_type __n, size_type __pos = 0) const + { + ; + __pos = std::__sv_check(size(), __pos, "basic_string_view::copy"); + const size_type __rlen = std::min(__n, _M_len - __pos); + + + traits_type::copy(__str, data() + __pos, __rlen); + return __rlen; + } + + constexpr basic_string_view + substr(size_type __pos = 0, size_type __n = npos) const noexcept(false) + { + __pos = std::__sv_check(size(), __pos, "basic_string_view::substr"); + const size_type __rlen = std::min(__n, _M_len - __pos); + return basic_string_view{_M_str + __pos, __rlen}; + } + + constexpr int + compare(basic_string_view __str) const noexcept + { + const size_type __rlen = std::min(this->_M_len, __str._M_len); + int __ret = traits_type::compare(this->_M_str, __str._M_str, __rlen); + if (__ret == 0) + __ret = _S_compare(this->_M_len, __str._M_len); + return __ret; + } + + constexpr int + compare(size_type __pos1, size_type __n1, basic_string_view __str) const + { return this->substr(__pos1, __n1).compare(__str); } + + constexpr int + compare(size_type __pos1, size_type __n1, + basic_string_view __str, size_type __pos2, size_type __n2) const + { + return this->substr(__pos1, __n1).compare(__str.substr(__pos2, __n2)); + } + + __attribute__((__nonnull__)) constexpr int + compare(const _CharT* __str) const noexcept + { return this->compare(basic_string_view{__str}); } + + __attribute__((__nonnull__)) constexpr int + compare(size_type __pos1, size_type __n1, const _CharT* __str) const + { return this->substr(__pos1, __n1).compare(basic_string_view{__str}); } + + constexpr int + compare(size_type __pos1, size_type __n1, + const _CharT* __str, size_type __n2) const noexcept(false) + { + return this->substr(__pos1, __n1) + .compare(basic_string_view(__str, __n2)); + } + + + + constexpr bool + starts_with(basic_string_view __x) const noexcept + { return this->substr(0, __x.size()) == __x; } + + constexpr bool + starts_with(_CharT __x) const noexcept + { return !this->empty() && traits_type::eq(this->front(), __x); } + + constexpr bool + starts_with(const _CharT* __x) const noexcept + { return this->starts_with(basic_string_view(__x)); } + + constexpr bool + ends_with(basic_string_view __x) const noexcept + { + const auto __len = this->size(); + const auto __xlen = __x.size(); + return __len >= __xlen + && traits_type::compare(end() - __xlen, __x.data(), __xlen) == 0; + } + + constexpr bool + ends_with(_CharT __x) const noexcept + { return !this->empty() && traits_type::eq(this->back(), __x); } + + constexpr bool + ends_with(const _CharT* __x) const noexcept + { return this->ends_with(basic_string_view(__x)); } +# 396 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + constexpr size_type + find(basic_string_view __str, size_type __pos = 0) const noexcept + { return this->find(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find(_CharT __c, size_type __pos = 0) const noexcept; + + constexpr size_type + find(const _CharT* __str, size_type __pos, size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find(const _CharT* __str, size_type __pos = 0) const noexcept + { return this->find(__str, __pos, traits_type::length(__str)); } + + constexpr size_type + rfind(basic_string_view __str, size_type __pos = npos) const noexcept + { return this->rfind(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + rfind(_CharT __c, size_type __pos = npos) const noexcept; + + constexpr size_type + rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + rfind(const _CharT* __str, size_type __pos = npos) const noexcept + { return this->rfind(__str, __pos, traits_type::length(__str)); } + + constexpr size_type + find_first_of(basic_string_view __str, size_type __pos = 0) const noexcept + { return this->find_first_of(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find_first_of(_CharT __c, size_type __pos = 0) const noexcept + { return this->find(__c, __pos); } + + constexpr size_type + find_first_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find_first_of(const _CharT* __str, size_type __pos = 0) const noexcept + { return this->find_first_of(__str, __pos, traits_type::length(__str)); } + + constexpr size_type + find_last_of(basic_string_view __str, + size_type __pos = npos) const noexcept + { return this->find_last_of(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find_last_of(_CharT __c, size_type __pos=npos) const noexcept + { return this->rfind(__c, __pos); } + + constexpr size_type + find_last_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find_last_of(const _CharT* __str, size_type __pos = npos) const noexcept + { return this->find_last_of(__str, __pos, traits_type::length(__str)); } + + constexpr size_type + find_first_not_of(basic_string_view __str, + size_type __pos = 0) const noexcept + { return this->find_first_not_of(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const noexcept; + + constexpr size_type + find_first_not_of(const _CharT* __str, + size_type __pos, size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find_first_not_of(const _CharT* __str, size_type __pos = 0) const noexcept + { + return this->find_first_not_of(__str, __pos, + traits_type::length(__str)); + } + + constexpr size_type + find_last_not_of(basic_string_view __str, + size_type __pos = npos) const noexcept + { return this->find_last_not_of(__str._M_str, __pos, __str._M_len); } + + constexpr size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const noexcept; + + constexpr size_type + find_last_not_of(const _CharT* __str, + size_type __pos, size_type __n) const noexcept; + + __attribute__((__nonnull__)) constexpr size_type + find_last_not_of(const _CharT* __str, + size_type __pos = npos) const noexcept + { + return this->find_last_not_of(__str, __pos, + traits_type::length(__str)); + } + + private: + + static constexpr int + _S_compare(size_type __n1, size_type __n2) noexcept + { + using __limits = __gnu_cxx::__int_traits; + const difference_type __diff = __n1 - __n2; + if (__diff > __limits::__max) + return __limits::__max; + if (__diff < __limits::__min) + return __limits::__min; + return static_cast(__diff); + } + + size_t _M_len; + const _CharT* _M_str; + }; + + + template _End> + basic_string_view(_It, _End) -> basic_string_view>; +# 532 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + template + constexpr bool + operator==(basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + { return __x.size() == __y.size() && __x.compare(__y) == 0; } + + template + constexpr bool + operator==(basic_string_view<_CharT, _Traits> __x, + __type_identity_t> __y) + noexcept + { return __x.size() == __y.size() && __x.compare(__y) == 0; } + + + template + constexpr auto + operator<=>(basic_string_view<_CharT, _Traits> __x, + basic_string_view<_CharT, _Traits> __y) noexcept + -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) + { return __detail::__char_traits_cmp_cat<_Traits>(__x.compare(__y)); } + + template + constexpr auto + operator<=>(basic_string_view<_CharT, _Traits> __x, + __type_identity_t> __y) + noexcept + -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) + { return __detail::__char_traits_cmp_cat<_Traits>(__x.compare(__y)); } +# 664 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + basic_string_view<_CharT,_Traits> __str) + { return __ostream_insert(__os, __str.data(), __str.size()); } + + + + + using string_view = basic_string_view; + + using wstring_view = basic_string_view; + + + using u8string_view = basic_string_view; + + using u16string_view = basic_string_view; + using u32string_view = basic_string_view; + + + + template + struct hash; + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const string_view& __str) const noexcept + { return std::_Hash_impl::hash(__str.data(), __str.length()); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const wstring_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(wchar_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u8string_view& __str) const noexcept + { return std::_Hash_impl::hash(__str.data(), __str.length()); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u16string_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char16_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u32string_view& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char32_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + inline namespace literals + { + inline namespace string_view_literals + { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wliteral-suffix" + inline constexpr basic_string_view + operator""sv(const char* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + + + inline constexpr basic_string_view + operator""sv(const wchar_t* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + + + + inline constexpr basic_string_view + operator""sv(const char8_t* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + + + inline constexpr basic_string_view + operator""sv(const char16_t* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + + inline constexpr basic_string_view + operator""sv(const char32_t* __str, size_t __len) noexcept + { return basic_string_view{__str, __len}; } + +#pragma GCC diagnostic pop + } + } + + + namespace ranges + { + + template + inline constexpr bool + enable_borrowed_range> = true; + + + template + inline constexpr bool + enable_view> = true; + } + + +} + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/string_view.tcc" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/string_view.tcc" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/string_view.tcc" 3 + + + +namespace std +{ + + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find(const _CharT* __str, size_type __pos, size_type __n) const noexcept + { + ; + + if (__n == 0) + return __pos <= _M_len ? __pos : npos; + if (__pos >= _M_len) + return npos; + + const _CharT __elem0 = __str[0]; + const _CharT* __first = _M_str + __pos; + const _CharT* const __last = _M_str + _M_len; + size_type __len = _M_len - __pos; + + while (__len >= __n) + { + + __first = traits_type::find(__first, __len - __n + 1, __elem0); + if (!__first) + return npos; + + + + if (traits_type::compare(__first, __str, __n) == 0) + return __first - _M_str; + __len = __last - ++__first; + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find(_CharT __c, size_type __pos) const noexcept + { + size_type __ret = npos; + if (__pos < this->_M_len) + { + const size_type __n = this->_M_len - __pos; + const _CharT* __p = traits_type::find(this->_M_str + __pos, __n, __c); + if (__p) + __ret = __p - this->_M_str; + } + return __ret; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept + { + ; + + if (__n <= this->_M_len) + { + __pos = std::min(size_type(this->_M_len - __n), __pos); + do + { + if (traits_type::compare(this->_M_str + __pos, __str, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + rfind(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->_M_len; + if (__size > 0) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(this->_M_str[__size], __c)) + return __size; + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept + { + ; + for (; __n && __pos < this->_M_len; ++__pos) + { + const _CharT* __p = traits_type::find(__str, __n, + this->_M_str[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__str, __n, this->_M_str[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_not_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept + { + ; + for (; __pos < this->_M_len; ++__pos) + if (!traits_type::find(__str, __n, this->_M_str[__pos])) + return __pos; + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_first_not_of(_CharT __c, size_type __pos) const noexcept + { + for (; __pos < this->_M_len; ++__pos) + if (!traits_type::eq(this->_M_str[__pos], __c)) + return __pos; + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_not_of(const _CharT* __str, size_type __pos, + size_type __n) const noexcept + { + ; + size_type __size = this->_M_len; + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__str, __n, this->_M_str[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + constexpr typename basic_string_view<_CharT, _Traits>::size_type + basic_string_view<_CharT, _Traits>:: + find_last_not_of(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->_M_len; + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(this->_M_str[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + + +} +# 812 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string_view" 2 3 +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 2 3 + + +namespace std +{ + +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 +namespace __cxx11 { +# 84 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + class basic_string + { + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_CharT>::other _Char_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; + + + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Char_alloc_type allocator_type; + typedef typename _Alloc_traits::size_type size_type; + typedef typename _Alloc_traits::difference_type difference_type; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; + typedef typename _Alloc_traits::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + + + static const size_type npos = static_cast(-1); + + protected: + + + + + typedef const_iterator __const_iterator; + + + private: + + + typedef basic_string_view<_CharT, _Traits> __sv_type; + + template + using _If_sv = enable_if_t< + __and_, + __not_>, + __not_>>::value, + _Res>; + + + static __sv_type + _S_to_string_view(__sv_type __svt) noexcept + { return __svt; } + + + + + + struct __sv_wrapper + { + explicit __sv_wrapper(__sv_type __sv) noexcept : _M_sv(__sv) { } + __sv_type _M_sv; + }; + + + + + + + + explicit + basic_string(__sv_wrapper __svw, const _Alloc& __a) + : basic_string(__svw._M_sv.data(), __svw._M_sv.size(), __a) { } + + + + struct _Alloc_hider : allocator_type + { + + + + + _Alloc_hider(pointer __dat, const _Alloc& __a) + : allocator_type(__a), _M_p(__dat) { } + + _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) + : allocator_type(std::move(__a)), _M_p(__dat) { } + + + pointer _M_p; + }; + + _Alloc_hider _M_dataplus; + size_type _M_string_length; + + enum { _S_local_capacity = 15 / sizeof(_CharT) }; + + union + { + _CharT _M_local_buf[_S_local_capacity + 1]; + size_type _M_allocated_capacity; + }; + + void + _M_data(pointer __p) + { _M_dataplus._M_p = __p; } + + void + _M_length(size_type __length) + { _M_string_length = __length; } + + pointer + _M_data() const + { return _M_dataplus._M_p; } + + pointer + _M_local_data() + { + + return std::pointer_traits::pointer_to(*_M_local_buf); + + + + } + + const_pointer + _M_local_data() const + { + + return std::pointer_traits::pointer_to(*_M_local_buf); + + + + } + + void + _M_capacity(size_type __capacity) + { _M_allocated_capacity = __capacity; } + + void + _M_set_length(size_type __n) + { + _M_length(__n); + traits_type::assign(_M_data()[__n], _CharT()); + } + + bool + _M_is_local() const + { return _M_data() == _M_local_data(); } + + + pointer + _M_create(size_type&, size_type); + + void + _M_dispose() + { + if (!_M_is_local()) + _M_destroy(_M_allocated_capacity); + } + + void + _M_destroy(size_type __size) throw() + { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); } + + + + template + void + _M_construct_aux(_InIterator __beg, _InIterator __end, + std::__false_type) + { + typedef typename iterator_traits<_InIterator>::iterator_category _Tag; + _M_construct(__beg, __end, _Tag()); + } + + + + template + void + _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type) + { _M_construct_aux_2(static_cast(__beg), __end); } + + void + _M_construct_aux_2(size_type __req, _CharT __c) + { _M_construct(__req, __c); } + + template + void + _M_construct(_InIterator __beg, _InIterator __end) + { + typedef typename std::__is_integer<_InIterator>::__type _Integral; + _M_construct_aux(__beg, __end, _Integral()); + } + + + template + void + _M_construct(_InIterator __beg, _InIterator __end, + std::input_iterator_tag); + + + + template + void + _M_construct(_FwdIterator __beg, _FwdIterator __end, + std::forward_iterator_tag); + + void + _M_construct(size_type __req, _CharT __c); + + allocator_type& + _M_get_allocator() + { return _M_dataplus; } + + const allocator_type& + _M_get_allocator() const + { return _M_dataplus; } + + private: +# 317 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range_fmt(("%s: __pos (which is %zu) > " "this->size() (which is %zu)") + , + __s, __pos, this->size()); + return __pos; + } + + void + _M_check_length(size_type __n1, size_type __n2, const char* __s) const + { + if (this->max_size() - (this->size() - __n1) < __n2) + __throw_length_error((__s)); + } + + + + size_type + _M_limit(size_type __pos, size_type __off) const noexcept + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + + + bool + _M_disjunct(const _CharT* __s) const noexcept + { + return (less()(__s, _M_data()) + || less()(_M_data() + this->size(), __s)); + } + + + + static void + _S_copy(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::copy(__d, __s, __n); + } + + static void + _S_move(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::move(__d, __s, __n); + } + + static void + _S_assign(_CharT* __d, size_type __n, _CharT __c) + { + if (__n == 1) + traits_type::assign(*__d, __c); + else + traits_type::assign(__d, __n, __c); + } + + + + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, (void)++__p) + traits_type::assign(*__p, *__k1); + } + + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) noexcept + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + noexcept + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) noexcept + { _S_copy(__p, __k1, __k2 - __k1); } + + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + noexcept + { _S_copy(__p, __k1, __k2 - __k1); } + + static int + _S_compare(size_type __n1, size_type __n2) noexcept + { + const difference_type __d = difference_type(__n1 - __n2); + + if (__d > __gnu_cxx::__numeric_traits::__max) + return __gnu_cxx::__numeric_traits::__max; + else if (__d < __gnu_cxx::__numeric_traits::__min) + return __gnu_cxx::__numeric_traits::__min; + else + return int(__d); + } + + void + _M_assign(const basic_string&); + + void + _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, + size_type __len2); + + void + _M_erase(size_type __pos, size_type __n); + + public: + + + + + + + + basic_string() + noexcept(is_nothrow_default_constructible<_Alloc>::value) + : _M_dataplus(_M_local_data()) + { _M_set_length(0); } + + + + + explicit + basic_string(const _Alloc& __a) noexcept + : _M_dataplus(_M_local_data(), __a) + { _M_set_length(0); } + + + + + + basic_string(const basic_string& __str) + : _M_dataplus(_M_local_data(), + _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) + { _M_construct(__str._M_data(), __str._M_data() + __str.length()); } +# 469 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string(const basic_string& __str, size_type __pos, + const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { + const _CharT* __start = __str._M_data() + + __str._M_check(__pos, "basic_string::basic_string"); + _M_construct(__start, __start + __str._M_limit(__pos, npos)); + } + + + + + + + + basic_string(const basic_string& __str, size_type __pos, + size_type __n) + : _M_dataplus(_M_local_data()) + { + const _CharT* __start = __str._M_data() + + __str._M_check(__pos, "basic_string::basic_string"); + _M_construct(__start, __start + __str._M_limit(__pos, __n)); + } +# 500 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_M_local_data(), __a) + { + const _CharT* __start + = __str._M_data() + __str._M_check(__pos, "string::string"); + _M_construct(__start, __start + __str._M_limit(__pos, __n)); + } +# 518 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__s, __s + __n); } +# 531 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { + const _CharT* __end = __s ? __s + traits_type::length(__s) + + : reinterpret_cast(__alignof__(_CharT)); + _M_construct(__s, __end, random_access_iterator_tag()); + } +# 551 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__n, __c); } +# 565 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string(basic_string&& __str) noexcept + : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator())) + { + if (__str._M_is_local()) + { + traits_type::copy(_M_local_buf, __str._M_local_buf, + _S_local_capacity + 1); + } + else + { + _M_data(__str._M_data()); + _M_capacity(__str._M_allocated_capacity); + } + + + + + _M_length(__str.length()); + __str._M_data(__str._M_local_data()); + __str._M_set_length(0); + } + + + + + + + basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__l.begin(), __l.end()); } + + basic_string(const basic_string& __str, const _Alloc& __a) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__str.begin(), __str.end()); } + + basic_string(basic_string&& __str, const _Alloc& __a) + noexcept(_Alloc_traits::_S_always_equal()) + : _M_dataplus(_M_local_data(), __a) + { + if (__str._M_is_local()) + { + traits_type::copy(_M_local_buf, __str._M_local_buf, + _S_local_capacity + 1); + _M_length(__str.length()); + __str._M_set_length(0); + } + else if (_Alloc_traits::_S_always_equal() + || __str.get_allocator() == __a) + { + _M_data(__str._M_data()); + _M_length(__str.length()); + _M_capacity(__str._M_allocated_capacity); + __str._M_data(__str._M_local_buf); + __str._M_set_length(0); + } + else + _M_construct(__str.begin(), __str.end()); + } +# 633 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + + + basic_string(_InputIterator __beg, _InputIterator __end, + const _Alloc& __a = _Alloc()) + : _M_dataplus(_M_local_data(), __a) + { _M_construct(__beg, __end); } +# 651 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + basic_string(const _Tp& __t, size_type __pos, size_type __n, + const _Alloc& __a = _Alloc()) + : basic_string(_S_to_string_view(__t).substr(__pos, __n), __a) { } + + + + + + + template> + explicit + basic_string(const _Tp& __t, const _Alloc& __a = _Alloc()) + : basic_string(__sv_wrapper(_S_to_string_view(__t)), __a) { } + + + + + + ~basic_string() + { _M_dispose(); } + + + + + + basic_string& + operator=(const basic_string& __str) + { + return this->assign(__str); + } + + + + + + basic_string& + operator=(const _CharT* __s) + { return this->assign(__s); } +# 698 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + operator=(_CharT __c) + { + this->assign(1, __c); + return *this; + } +# 715 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + operator=(basic_string&& __str) + noexcept(_Alloc_traits::_S_nothrow_move()) + { + if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() + && !_Alloc_traits::_S_always_equal() + && _M_get_allocator() != __str._M_get_allocator()) + { + + _M_destroy(_M_allocated_capacity); + _M_data(_M_local_data()); + _M_set_length(0); + } + + std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); + + if (__str._M_is_local()) + { + + + + if (__builtin_expect(std::__addressof(__str) != this, true)) + { + if (__str.size()) + this->_S_copy(_M_data(), __str._M_data(), __str.size()); + _M_set_length(__str.size()); + } + } + else if (_Alloc_traits::_S_propagate_on_move_assign() + || _Alloc_traits::_S_always_equal() + || _M_get_allocator() == __str._M_get_allocator()) + { + + pointer __data = nullptr; + size_type __capacity; + if (!_M_is_local()) + { + if (_Alloc_traits::_S_always_equal()) + { + + __data = _M_data(); + __capacity = _M_allocated_capacity; + } + else + _M_destroy(_M_allocated_capacity); + } + + _M_data(__str._M_data()); + _M_length(__str.length()); + _M_capacity(__str._M_allocated_capacity); + if (__data) + { + __str._M_data(__data); + __str._M_capacity(__capacity); + } + else + __str._M_data(__str._M_local_buf); + } + else + assign(__str); + __str.clear(); + return *this; + } + + + + + + basic_string& + operator=(initializer_list<_CharT> __l) + { + this->assign(__l.begin(), __l.size()); + return *this; + } + + + + + + + + template + _If_sv<_Tp, basic_string&> + operator=(const _Tp& __svt) + { return this->assign(__svt); } + + + + + + operator __sv_type() const noexcept + { return __sv_type(data(), size()); } + + + + + + + + iterator + begin() noexcept + { return iterator(_M_data()); } + + + + + + const_iterator + begin() const noexcept + { return const_iterator(_M_data()); } + + + + + + iterator + end() noexcept + { return iterator(_M_data() + this->size()); } + + + + + + const_iterator + end() const noexcept + { return const_iterator(_M_data() + this->size()); } + + + + + + + reverse_iterator + rbegin() noexcept + { return reverse_iterator(this->end()); } + + + + + + + const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + + + + + + reverse_iterator + rend() noexcept + { return reverse_iterator(this->begin()); } + + + + + + + const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(this->begin()); } + + + + + + + const_iterator + cbegin() const noexcept + { return const_iterator(this->_M_data()); } + + + + + + const_iterator + cend() const noexcept + { return const_iterator(this->_M_data() + this->size()); } + + + + + + + const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(this->end()); } + + + + + + + const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(this->begin()); } + + + public: + + + + size_type + size() const noexcept + { return _M_string_length; } + + + + size_type + length() const noexcept + { return _M_string_length; } + + + size_type + max_size() const noexcept + { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } +# 943 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + void + resize(size_type __n, _CharT __c); +# 956 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + void + resize(size_type __n) + { this->resize(__n, _CharT()); } + + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + + void + shrink_to_fit() noexcept + { reserve(); } +#pragma GCC diagnostic pop + + + + + + + size_type + capacity() const noexcept + { + return _M_is_local() ? size_type(_S_local_capacity) + : _M_allocated_capacity; + } +# 998 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + void + reserve(size_type __res_arg); + + + + + + [[deprecated("use shrink_to_fit() instead")]] + + void + reserve(); + + + + + void + clear() noexcept + { _M_set_length(0); } + + + + + + [[__nodiscard__]] bool + empty() const noexcept + { return this->size() == 0; } +# 1036 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + const_reference + operator[] (size_type __pos) const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(__pos <= size())) __builtin_unreachable(); } while (false); + return _M_data()[__pos]; + } +# 1053 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + reference + operator[](size_type __pos) + { + + + do { if (__builtin_is_constant_evaluated() && !bool(__pos <= size())) __builtin_unreachable(); } while (false); + + ; + return _M_data()[__pos]; + } +# 1074 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") + + , + __n, this->size()); + return _M_data()[__n]; + } +# 1095 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") + + , + __n, this->size()); + return _M_data()[__n]; + } + + + + + + + reference + front() noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return operator[](0); + } + + + + + + const_reference + front() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return operator[](0); + } + + + + + + reference + back() noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return operator[](this->size() - 1); + } + + + + + + const_reference + back() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return operator[](this->size() - 1); + } +# 1158 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + operator+=(const basic_string& __str) + { return this->append(__str); } + + + + + + + basic_string& + operator+=(const _CharT* __s) + { return this->append(__s); } + + + + + + + basic_string& + operator+=(_CharT __c) + { + this->push_back(__c); + return *this; + } + + + + + + + + basic_string& + operator+=(initializer_list<_CharT> __l) + { return this->append(__l.begin(), __l.size()); } +# 1200 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + operator+=(const _Tp& __svt) + { return this->append(__svt); } + + + + + + + + basic_string& + append(const basic_string& __str) + { return _M_append(__str._M_data(), __str.size()); } +# 1228 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n = npos) + { return _M_append(__str._M_data() + + __str._M_check(__pos, "basic_string::append"), + __str._M_limit(__pos, __n)); } + + + + + + + + basic_string& + append(const _CharT* __s, size_type __n) + { + ; + _M_check_length(size_type(0), __n, "basic_string::append"); + return _M_append(__s, __n); + } + + + + + + + basic_string& + append(const _CharT* __s) + { + ; + const size_type __n = traits_type::length(__s); + _M_check_length(size_type(0), __n, "basic_string::append"); + return _M_append(__s, __n); + } +# 1270 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + append(size_type __n, _CharT __c) + { return _M_replace_aux(this->size(), size_type(0), __n, __c); } + + + + + + + + basic_string& + append(initializer_list<_CharT> __l) + { return this->append(__l.begin(), __l.size()); } +# 1294 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + + + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(end(), end(), __first, __last); } + + + + + + + + template + _If_sv<_Tp, basic_string&> + append(const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->append(__sv.data(), __sv.size()); + } +# 1324 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + append(const _Tp& __svt, size_type __pos, size_type __n = npos) + { + __sv_type __sv = __svt; + return _M_append(__sv.data() + + std::__sv_check(__sv.size(), __pos, "basic_string::append"), + std::__sv_limit(__sv.size(), __pos, __n)); + } + + + + + + + void + push_back(_CharT __c) + { + const size_type __size = this->size(); + if (__size + 1 > this->capacity()) + this->_M_mutate(__size, size_type(0), 0, size_type(1)); + traits_type::assign(this->_M_data()[__size], __c); + this->_M_set_length(__size + 1); + } + + + + + + + basic_string& + assign(const basic_string& __str) + { + + if (_Alloc_traits::_S_propagate_on_copy_assign()) + { + if (!_Alloc_traits::_S_always_equal() && !_M_is_local() + && _M_get_allocator() != __str._M_get_allocator()) + { + + + if (__str.size() <= _S_local_capacity) + { + _M_destroy(_M_allocated_capacity); + _M_data(_M_local_data()); + _M_set_length(0); + } + else + { + const auto __len = __str.size(); + auto __alloc = __str._M_get_allocator(); + + auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); + _M_destroy(_M_allocated_capacity); + _M_data(__ptr); + _M_capacity(__len); + _M_set_length(__len); + } + } + std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); + } + + this->_M_assign(__str); + return *this; + } +# 1399 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(basic_string&& __str) + noexcept(_Alloc_traits::_S_nothrow_move()) + { + + + return *this = std::move(__str); + } +# 1422 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n = npos) + { return _M_replace(size_type(0), this->size(), __str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } +# 1438 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s, size_type __n) + { + ; + return _M_replace(size_type(0), this->size(), __s, __n); + } +# 1454 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s) + { + ; + return _M_replace(size_type(0), this->size(), __s, + traits_type::length(__s)); + } +# 1471 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + assign(size_type __n, _CharT __c) + { return _M_replace_aux(size_type(0), this->size(), __n, __c); } +# 1484 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + + + + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(begin(), end(), __first, __last); } + + + + + + + + basic_string& + assign(initializer_list<_CharT> __l) + { return this->assign(__l.begin(), __l.size()); } +# 1510 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + assign(const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->assign(__sv.data(), __sv.size()); + } +# 1525 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + assign(const _Tp& __svt, size_type __pos, size_type __n = npos) + { + __sv_type __sv = __svt; + return _M_replace(size_type(0), this->size(), + __sv.data() + + std::__sv_check(__sv.size(), __pos, "basic_string::assign"), + std::__sv_limit(__sv.size(), __pos, __n)); + } +# 1553 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + insert(const_iterator __p, size_type __n, _CharT __c) + { + ; + const size_type __pos = __p - begin(); + this->replace(__p, __p, __n, __c); + return iterator(this->_M_data() + __pos); + } +# 1595 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + iterator + insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) + { + ; + const size_type __pos = __p - begin(); + this->replace(__p, __p, __beg, __end); + return iterator(this->_M_data() + __pos); + } +# 1631 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + insert(const_iterator __p, initializer_list<_CharT> __l) + { return this->insert(__p, __l.begin(), __l.end()); } +# 1658 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str) + { return this->replace(__pos1, size_type(0), + __str._M_data(), __str.size()); } +# 1681 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n = npos) + { return this->replace(__pos1, size_type(0), __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } +# 1704 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n) + { return this->replace(__pos, size_type(0), __s, __n); } +# 1723 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s) + { + ; + return this->replace(__pos, size_type(0), __s, + traits_type::length(__s)); + } +# 1747 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), + size_type(0), __n, __c); } +# 1765 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + insert(__const_iterator __p, _CharT __c) + { + ; + const size_type __pos = __p - begin(); + _M_replace_aux(__pos, size_type(0), size_type(1), __c); + return iterator(_M_data() + __pos); + } +# 1781 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + insert(size_type __pos, const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->insert(__pos, __sv.data(), __sv.size()); + } +# 1797 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + insert(size_type __pos1, const _Tp& __svt, + size_type __pos2, size_type __n = npos) + { + __sv_type __sv = __svt; + return this->replace(__pos1, size_type(0), + __sv.data() + + std::__sv_check(__sv.size(), __pos2, "basic_string::insert"), + std::__sv_limit(__sv.size(), __pos2, __n)); + } +# 1825 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + _M_check(__pos, "basic_string::erase"); + if (__n == npos) + this->_M_set_length(__pos); + else if (__n != 0) + this->_M_erase(__pos, _M_limit(__pos, __n)); + return *this; + } +# 1844 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + erase(__const_iterator __position) + { + + ; + const size_type __pos = __position - begin(); + this->_M_erase(__pos, size_type(1)); + return iterator(_M_data() + __pos); + } +# 1863 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + iterator + erase(__const_iterator __first, __const_iterator __last) + { + + ; + const size_type __pos = __first - begin(); + if (__last == end()) + this->_M_set_length(__pos); + else + this->_M_erase(__pos, __last - __first); + return iterator(this->_M_data() + __pos); + } + + + + + + + + void + pop_back() noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + _M_erase(size() - 1, 1); + } +# 1907 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { return this->replace(__pos, __n, __str._M_data(), __str.size()); } +# 1929 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2 = npos) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } +# 1954 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + ; + return _M_replace(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __s, __n2); + } +# 1979 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + ; + return this->replace(__pos, __n1, __s, traits_type::length(__s)); + } +# 2003 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __n2, __c); } +# 2021 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + const basic_string& __str) + { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } +# 2041 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + const _CharT* __s, size_type __n) + { + + ; + return this->replace(__i1 - begin(), __i2 - __i1, __s, __n); + } +# 2063 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) + { + ; + return this->replace(__i1, __i2, __s, traits_type::length(__s)); + } +# 2084 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, size_type __n, + _CharT __c) + { + + ; + return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c); + } +# 2109 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template> + basic_string& + replace(const_iterator __i1, const_iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { + + ; + ; + return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, + std::__false_type()); + } +# 2141 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + _CharT* __k1, _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - begin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + const _CharT* __k1, const _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - begin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + iterator __k1, iterator __k2) + { + + ; + ; + return this->replace(__i1 - begin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + + basic_string& + replace(__const_iterator __i1, __const_iterator __i2, + const_iterator __k1, const_iterator __k2) + { + + ; + ; + return this->replace(__i1 - begin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } +# 2200 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string& replace(const_iterator __i1, const_iterator __i2, + initializer_list<_CharT> __l) + { return this->replace(__i1, __i2, __l.begin(), __l.size()); } +# 2213 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + replace(size_type __pos, size_type __n, const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->replace(__pos, __n, __sv.data(), __sv.size()); + } +# 2230 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + replace(size_type __pos1, size_type __n1, const _Tp& __svt, + size_type __pos2, size_type __n2 = npos) + { + __sv_type __sv = __svt; + return this->replace(__pos1, __n1, + __sv.data() + + std::__sv_check(__sv.size(), __pos2, "basic_string::replace"), + std::__sv_limit(__sv.size(), __pos2, __n2)); + } +# 2251 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, basic_string&> + replace(const_iterator __i1, const_iterator __i2, const _Tp& __svt) + { + __sv_type __sv = __svt; + return this->replace(__i1 - begin(), __i2 - __i1, __sv); + } + + + private: + template + basic_string& + _M_replace_dispatch(const_iterator __i1, const_iterator __i2, + _Integer __n, _Integer __val, __true_type) + { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } + + template + basic_string& + _M_replace_dispatch(const_iterator __i1, const_iterator __i2, + _InputIterator __k1, _InputIterator __k2, + __false_type); + + basic_string& + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c); + + basic_string& + _M_replace(size_type __pos, size_type __len1, const _CharT* __s, + const size_type __len2); + + basic_string& + _M_append(const _CharT* __s, size_type __n); + + public: +# 2298 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; +# 2308 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + void + swap(basic_string& __s) noexcept; +# 2318 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + const _CharT* + c_str() const noexcept + { return _M_data(); } +# 2330 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + const _CharT* + data() const noexcept + { return _M_data(); } +# 2341 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + _CharT* + data() noexcept + { return _M_data(); } + + + + + + allocator_type + get_allocator() const noexcept + { return _M_get_allocator(); } +# 2365 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const + noexcept; +# 2379 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find(const basic_string& __str, size_type __pos = 0) const + noexcept + { return this->find(__str.data(), __pos, __str.size()); } +# 2391 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find(const _Tp& __svt, size_type __pos = 0) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find(__sv.data(), __pos, __sv.size()); + } +# 2411 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos = 0) const noexcept + { + ; + return this->find(__s, __pos, traits_type::length(__s)); + } +# 2428 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find(_CharT __c, size_type __pos = 0) const noexcept; +# 2441 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + noexcept + { return this->rfind(__str.data(), __pos, __str.size()); } +# 2453 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + rfind(const _Tp& __svt, size_type __pos = npos) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->rfind(__sv.data(), __pos, __sv.size()); + } +# 2475 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const + noexcept; +# 2489 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->rfind(__s, __pos, traits_type::length(__s)); + } +# 2506 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + rfind(_CharT __c, size_type __pos = npos) const noexcept; +# 2520 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + noexcept + { return this->find_first_of(__str.data(), __pos, __str.size()); } +# 2533 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find_first_of(const _Tp& __svt, size_type __pos = 0) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find_first_of(__sv.data(), __pos, __sv.size()); + } +# 2555 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept; +# 2569 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + noexcept + { + ; + return this->find_first_of(__s, __pos, traits_type::length(__s)); + } +# 2589 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_of(_CharT __c, size_type __pos = 0) const noexcept + { return this->find(__c, __pos); } +# 2604 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + noexcept + { return this->find_last_of(__str.data(), __pos, __str.size()); } +# 2617 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find_last_of(const _Tp& __svt, size_type __pos = npos) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find_last_of(__sv.data(), __pos, __sv.size()); + } +# 2639 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept; +# 2653 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + noexcept + { + ; + return this->find_last_of(__s, __pos, traits_type::length(__s)); + } +# 2673 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_of(_CharT __c, size_type __pos = npos) const noexcept + { return this->rfind(__c, __pos); } +# 2687 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + noexcept + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } +# 2700 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find_first_not_of(const _Tp& __svt, size_type __pos = 0) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find_first_not_of(__sv.data(), __pos, __sv.size()); + } +# 2722 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const noexcept; +# 2736 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + noexcept + { + ; + return this->find_first_not_of(__s, __pos, traits_type::length(__s)); + } +# 2754 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const + noexcept; +# 2769 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + noexcept + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } +# 2782 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, size_type> + find_last_not_of(const _Tp& __svt, size_type __pos = npos) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return this->find_last_not_of(__sv.data(), __pos, __sv.size()); + } +# 2804 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const noexcept; +# 2818 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + noexcept + { + ; + return this->find_last_not_of(__s, __pos, traits_type::length(__s)); + } +# 2836 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const + noexcept; +# 2852 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { return basic_string(*this, + _M_check(__pos, "basic_string::substr"), __n); } +# 2871 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(const basic_string& __str) const + { + const size_type __size = this->size(); + const size_type __osize = __str.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + + + + + + + template + _If_sv<_Tp, int> + compare(const _Tp& __svt) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + const size_type __size = this->size(); + const size_type __osize = __sv.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __sv.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } +# 2914 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, int> + compare(size_type __pos, size_type __n, const _Tp& __svt) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return __sv_type(*this).substr(__pos, __n).compare(__sv); + } +# 2933 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + _If_sv<_Tp, int> + compare(size_type __pos1, size_type __n1, const _Tp& __svt, + size_type __pos2, size_type __n2 = npos) const + noexcept(is_same<_Tp, __sv_type>::value) + { + __sv_type __sv = __svt; + return __sv_type(*this) + .substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2)); + } +# 2964 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; +# 2990 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2 = npos) const; +# 3008 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(const _CharT* __s) const noexcept; +# 3032 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; +# 3059 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; + + + bool + starts_with(basic_string_view<_CharT, _Traits> __x) const noexcept + { return __sv_type(this->data(), this->size()).starts_with(__x); } + + bool + starts_with(_CharT __x) const noexcept + { return __sv_type(this->data(), this->size()).starts_with(__x); } + + bool + starts_with(const _CharT* __x) const noexcept + { return __sv_type(this->data(), this->size()).starts_with(__x); } + + bool + ends_with(basic_string_view<_CharT, _Traits> __x) const noexcept + { return __sv_type(this->data(), this->size()).ends_with(__x); } + + bool + ends_with(_CharT __x) const noexcept + { return __sv_type(this->data(), this->size()).ends_with(__x); } + + bool + ends_with(const _CharT* __x) const noexcept + { return __sv_type(this->data(), this->size()).ends_with(__x); } +# 3104 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template friend class basic_stringbuf; + }; +} +# 6057 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 +namespace __cxx11 { + template::value_type, + typename _Allocator = allocator<_CharT>, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireAllocator<_Allocator>> + basic_string(_InputIterator, _InputIterator, _Allocator = _Allocator()) + -> basic_string<_CharT, char_traits<_CharT>, _Allocator>; + + + + template, + typename = _RequireAllocator<_Allocator>> + basic_string(basic_string_view<_CharT, _Traits>, const _Allocator& = _Allocator()) + -> basic_string<_CharT, _Traits, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + basic_string(basic_string_view<_CharT, _Traits>, + typename basic_string<_CharT, _Traits, _Allocator>::size_type, + typename basic_string<_CharT, _Traits, _Allocator>::size_type, + const _Allocator& = _Allocator()) + -> basic_string<_CharT, _Traits, _Allocator>; +} +# 6092 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return std::move(__lhs.append(__rhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>&& __rhs) + { return std::move(__rhs.insert(0, __lhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, + basic_string<_CharT, _Traits, _Alloc>&& __rhs) + { + + using _Alloc_traits = allocator_traits<_Alloc>; + bool __use_rhs = false; + if constexpr (typename _Alloc_traits::is_always_equal{}) + __use_rhs = true; + else if (__lhs.get_allocator() == __rhs.get_allocator()) + __use_rhs = true; + if (__use_rhs) + + { + const auto __size = __lhs.size() + __rhs.size(); + if (__size > __lhs.capacity() && __size <= __rhs.capacity()) + return std::move(__rhs.insert(0, __lhs)); + } + return std::move(__lhs.append(__rhs)); + } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + basic_string<_CharT, _Traits, _Alloc>&& __rhs) + { return std::move(__rhs.insert(0, __lhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, + basic_string<_CharT, _Traits, _Alloc>&& __rhs) + { return std::move(__rhs.insert(0, 1, __lhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, + const _CharT* __rhs) + { return std::move(__lhs.append(__rhs)); } + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, + _CharT __rhs) + { return std::move(__lhs.append(1, __rhs)); } +# 6223 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + noexcept + { return __lhs.compare(__rhs) == 0; } + + template + inline + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type + operator==(const basic_string<_CharT>& __lhs, + const basic_string<_CharT>& __rhs) noexcept + { return (__lhs.size() == __rhs.size() + && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), + __lhs.size())); } + + + + + + + + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } +# 6259 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline auto + operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) noexcept + -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) + { return __detail::__char_traits_cmp_cat<_Traits>(__lhs.compare(__rhs)); } +# 6273 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline auto + operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) noexcept + -> decltype(__detail::__char_traits_cmp_cat<_Traits>(0)) + { return __detail::__char_traits_cmp_cat<_Traits>(__lhs.compare(__rhs)); } +# 6490 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + noexcept(noexcept(__lhs.swap(__rhs))) + { __lhs.swap(__rhs); } +# 6510 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + + template<> + basic_istream& + operator>>(basic_istream& __is, basic_string& __str); +# 6528 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + + + return __ostream_insert(__os, __str.data(), __str.size()); + } +# 6551 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); +# 6568 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 3 + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return std::getline(__is, __str, __is.widen('\n')); } + + + + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>&& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { return std::getline(__is, __str, __delim); } + + + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>&& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return std::getline(__is, __str); } + + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + char __delim); + + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + wchar_t __delim); + + + +} + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cwchar" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 +# 96 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 +namespace std +{ + using ::FILE; + using ::fpos_t; + + using ::clearerr; + using ::fclose; + using ::feof; + using ::ferror; + using ::fflush; + using ::fgetc; + using ::fgetpos; + using ::fgets; + using ::fopen; + using ::fprintf; + using ::fputc; + using ::fputs; + using ::fread; + using ::freopen; + using ::fscanf; + using ::fseek; + using ::fsetpos; + using ::ftell; + using ::fwrite; + using ::getc; + using ::getchar; + + + + + using ::perror; + using ::printf; + using ::putc; + using ::putchar; + using ::puts; + using ::remove; + using ::rename; + using ::rewind; + using ::scanf; + using ::setbuf; + using ::setvbuf; + using ::sprintf; + using ::sscanf; + using ::tmpfile; + + using ::tmpnam; + + using ::ungetc; + using ::vfprintf; + using ::vprintf; + using ::vsprintf; +} +# 157 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 +namespace __gnu_cxx +{ +# 175 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdio" 3 + using ::snprintf; + using ::vfscanf; + using ::vscanf; + using ::vsnprintf; + using ::vsscanf; + +} + +namespace std +{ + using ::__gnu_cxx::snprintf; + using ::__gnu_cxx::vfscanf; + using ::__gnu_cxx::vscanf; + using ::__gnu_cxx::vsnprintf; + using ::__gnu_cxx::vsscanf; +} +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 3 +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/string_conversions.h" 2 3 + +namespace __gnu_cxx +{ + + + + template + _Ret + __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), + const char* __name, const _CharT* __str, std::size_t* __idx, + _Base... __base) + { + _Ret __ret; + + _CharT* __endptr; + + struct _Save_errno { + _Save_errno() : _M_errno((*_errno())) { (*_errno()) = 0; } + ~_Save_errno() { if ((*_errno()) == 0) (*_errno()) = _M_errno; } + int _M_errno; + } const __save_errno; + + struct _Range_chk { + static bool + _S_chk(_TRet, std::false_type) { return false; } + + static bool + _S_chk(_TRet __val, std::true_type) + { + return __val < _TRet(__numeric_traits::__min) + || __val > _TRet(__numeric_traits::__max); + } + }; + + const _TRet __tmp = __convf(__str, &__endptr, __base...); + + if (__endptr == __str) + std::__throw_invalid_argument(__name); + else if ((*_errno()) == 34 + || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) + std::__throw_out_of_range(__name); + else + __ret = __tmp; + + if (__idx) + *__idx = __endptr - __str; + + return __ret; + } + + + template + _String + __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, + __builtin_va_list), std::size_t __n, + const _CharT* __fmt, ...) + { + + + _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __n)); + + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + + const int __len = __convf(__s, __n, __fmt, __args); + + __builtin_va_end(__args); + + return _String(__s, __s + __len); + } + + +} +# 6608 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/charconv.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/charconv.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/charconv.h" 3 + + + + + +namespace std +{ + +namespace __detail +{ + + template + constexpr unsigned + __to_chars_len(_Tp __value, int __base = 10) noexcept + { + static_assert(is_integral<_Tp>::value, "implementation bug"); + static_assert(is_unsigned<_Tp>::value, "implementation bug"); + + unsigned __n = 1; + const unsigned __b2 = __base * __base; + const unsigned __b3 = __b2 * __base; + const unsigned long __b4 = __b3 * __base; + for (;;) + { + if (__value < (unsigned)__base) return __n; + if (__value < __b2) return __n + 1; + if (__value < __b3) return __n + 2; + if (__value < __b4) return __n + 3; + __value /= __b4; + __n += 4; + } + } + + + + + template + void + __to_chars_10_impl(char* __first, unsigned __len, _Tp __val) noexcept + { + static_assert(is_integral<_Tp>::value, "implementation bug"); + static_assert(is_unsigned<_Tp>::value, "implementation bug"); + + static constexpr char __digits[201] = + "0001020304050607080910111213141516171819" + "2021222324252627282930313233343536373839" + "4041424344454647484950515253545556575859" + "6061626364656667686970717273747576777879" + "8081828384858687888990919293949596979899"; + unsigned __pos = __len - 1; + while (__val >= 100) + { + auto const __num = (__val % 100) * 2; + __val /= 100; + __first[__pos] = __digits[__num + 1]; + __first[__pos - 1] = __digits[__num]; + __pos -= 2; + } + if (__val >= 10) + { + auto const __num = __val * 2; + __first[1] = __digits[__num + 1]; + __first[0] = __digits[__num]; + } + else + __first[0] = '0' + __val; + } + +} + +} +# 6609 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.h" 2 3 + +namespace std +{ + +namespace __cxx11 { + + + + inline int + stoi(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtol, "stoi", __str.c_str(), + __idx, __base); } + + inline long + stol(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), + __idx, __base); } + + inline unsigned long + stoul(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), + __idx, __base); } + + inline long long + stoll(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), + __idx, __base); } + + inline unsigned long long + stoull(const string& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), + __idx, __base); } + + + inline float + stof(const string& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } + + inline double + stod(const string& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } + + inline long double + stold(const string& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } + + + + + inline string + to_string(int __val) + { + const bool __neg = __val < 0; + const unsigned __uval = __neg ? (unsigned)~__val + 1u : __val; + const auto __len = __detail::__to_chars_len(__uval); + string __str(__neg + __len, '-'); + __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); + return __str; + } + + inline string + to_string(unsigned __val) + { + string __str(__detail::__to_chars_len(__val), '\0'); + __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); + return __str; + } + + inline string + to_string(long __val) + { + const bool __neg = __val < 0; + const unsigned long __uval = __neg ? (unsigned long)~__val + 1ul : __val; + const auto __len = __detail::__to_chars_len(__uval); + string __str(__neg + __len, '-'); + __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); + return __str; + } + + inline string + to_string(unsigned long __val) + { + string __str(__detail::__to_chars_len(__val), '\0'); + __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); + return __str; + } + + inline string + to_string(long long __val) + { + const bool __neg = __val < 0; + const unsigned long long __uval + = __neg ? (unsigned long long)~__val + 1ull : __val; + const auto __len = __detail::__to_chars_len(__uval); + string __str(__neg + __len, '-'); + __detail::__to_chars_10_impl(&__str[__neg], __len, __uval); + return __str; + } + + inline string + to_string(unsigned long long __val) + { + string __str(__detail::__to_chars_len(__val), '\0'); + __detail::__to_chars_10_impl(&__str[0], __str.size(), __val); + return __str; + } + + + + + inline string + to_string(float __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, + "%f", __val); + } + + inline string + to_string(double __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, + "%f", __val); + } + + inline string + to_string(long double __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, + "%Lf", __val); + } + + + + inline int + stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstol, "stoi", __str.c_str(), + __idx, __base); } + + inline long + stol(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), + __idx, __base); } + + inline unsigned long + stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), + __idx, __base); } + + inline long long + stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), + __idx, __base); } + + inline unsigned long long + stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) + { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), + __idx, __base); } + + + inline float + stof(const wstring& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } + + inline double + stod(const wstring& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } + + inline long double + stold(const wstring& __str, size_t* __idx = 0) + { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } + + + + inline wstring + to_wstring(int __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(int), + L"%d", __val); } + + inline wstring + to_wstring(unsigned __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, + 4 * sizeof(unsigned), + L"%u", __val); } + + inline wstring + to_wstring(long __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(long), + L"%ld", __val); } + + inline wstring + to_wstring(unsigned long __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, + 4 * sizeof(unsigned long), + L"%lu", __val); } + + inline wstring + to_wstring(long long __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, + 4 * sizeof(long long), + L"%lld", __val); } + + inline wstring + to_wstring(unsigned long long __val) + { return __gnu_cxx::__to_xstring(&std::vswprintf, + 4 * sizeof(unsigned long long), + L"%llu", __val); } + + inline wstring + to_wstring(float __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vswprintf, __n, + L"%f", __val); + } + + inline wstring + to_wstring(double __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vswprintf, __n, + L"%f", __val); + } + + inline wstring + to_wstring(long double __val) + { + const int __n = + __gnu_cxx::__numeric_traits::__max_exponent10 + 20; + return __gnu_cxx::__to_xstring(&std::vswprintf, __n, + L"%Lf", __val); + } + + + +} + +} + + + + + + + +namespace std +{ + + + + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const string& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), __s.length()); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const wstring& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(wchar_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u8string& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char8_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u16string& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char16_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const u32string& __s) const noexcept + { return std::_Hash_impl::hash(__s.data(), + __s.length() * sizeof(char32_t)); } + }; + + template<> + struct __is_fast_hash> : std::false_type + { }; + + + + + + inline namespace literals + { + inline namespace string_literals + { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wliteral-suffix" + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const char* __str, size_t __len) + { return basic_string{__str, __len}; } + + + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const wchar_t* __str, size_t __len) + { return basic_string{__str, __len}; } + + + + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const char8_t* __str, size_t __len) + { return basic_string{__str, __len}; } + + + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const char16_t* __str, size_t __len) + { return basic_string{__str, __len}; } + + __attribute ((__abi_tag__ ("cxx11"))) + inline basic_string + operator""s(const char32_t* __str, size_t __len) + { return basic_string{__str, __len}; } + +#pragma GCC diagnostic pop + } + } + + + namespace __detail::__variant + { + template struct _Never_valueless_alt; + + + + template + struct _Never_valueless_alt> + : __and_< + is_nothrow_move_constructible>, + is_nothrow_move_assignable> + >::type + { }; + } + + + + +} +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 1 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + + + +namespace std +{ + + + + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + swap(basic_string& __s) noexcept + { + if (this == &__s) + return; + + _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); + + if (_M_is_local()) + if (__s._M_is_local()) + { + if (length() && __s.length()) + { + _CharT __tmp_data[_S_local_capacity + 1]; + traits_type::copy(__tmp_data, __s._M_local_buf, + _S_local_capacity + 1); + traits_type::copy(__s._M_local_buf, _M_local_buf, + _S_local_capacity + 1); + traits_type::copy(_M_local_buf, __tmp_data, + _S_local_capacity + 1); + } + else if (__s.length()) + { + traits_type::copy(_M_local_buf, __s._M_local_buf, + _S_local_capacity + 1); + _M_length(__s.length()); + __s._M_set_length(0); + return; + } + else if (length()) + { + traits_type::copy(__s._M_local_buf, _M_local_buf, + _S_local_capacity + 1); + __s._M_length(length()); + _M_set_length(0); + return; + } + } + else + { + const size_type __tmp_capacity = __s._M_allocated_capacity; + traits_type::copy(__s._M_local_buf, _M_local_buf, + _S_local_capacity + 1); + _M_data(__s._M_data()); + __s._M_data(__s._M_local_buf); + _M_capacity(__tmp_capacity); + } + else + { + const size_type __tmp_capacity = _M_allocated_capacity; + if (__s._M_is_local()) + { + traits_type::copy(_M_local_buf, __s._M_local_buf, + _S_local_capacity + 1); + __s._M_data(_M_data()); + _M_data(_M_local_buf); + } + else + { + pointer __tmp_ptr = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp_ptr); + _M_capacity(__s._M_allocated_capacity); + } + __s._M_capacity(__tmp_capacity); + } + + const size_type __tmp_length = length(); + _M_length(__s.length()); + __s._M_length(__tmp_length); + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::pointer + basic_string<_CharT, _Traits, _Alloc>:: + _M_create(size_type& __capacity, size_type __old_capacity) + { + + + if (__capacity > max_size()) + std::__throw_length_error(("basic_string::_M_create")); + + + + + if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) + { + __capacity = 2 * __old_capacity; + + if (__capacity > max_size()) + __capacity = max_size(); + } + + + + return _Alloc_traits::allocate(_M_get_allocator(), __capacity + 1); + } + + + + + + template + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_construct(_InIterator __beg, _InIterator __end, + std::input_iterator_tag) + { + size_type __len = 0; + size_type __capacity = size_type(_S_local_capacity); + + while (__beg != __end && __len < __capacity) + { + _M_data()[__len++] = *__beg; + ++__beg; + } + + try + { + while (__beg != __end) + { + if (__len == __capacity) + { + + __capacity = __len + 1; + pointer __another = _M_create(__capacity, __len); + this->_S_copy(__another, _M_data(), __len); + _M_dispose(); + _M_data(__another); + _M_capacity(__capacity); + } + _M_data()[__len++] = *__beg; + ++__beg; + } + } + catch(...) + { + _M_dispose(); + throw; + } + + _M_set_length(__len); + } + + template + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_construct(_InIterator __beg, _InIterator __end, + std::forward_iterator_tag) + { + + if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) + std::__throw_logic_error(("basic_string::" "_M_construct null not valid") + ); + + size_type __dnew = static_cast(std::distance(__beg, __end)); + + if (__dnew > size_type(_S_local_capacity)) + { + _M_data(_M_create(__dnew, size_type(0))); + _M_capacity(__dnew); + } + + + try + { this->_S_copy_chars(_M_data(), __beg, __end); } + catch(...) + { + _M_dispose(); + throw; + } + + _M_set_length(__dnew); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_construct(size_type __n, _CharT __c) + { + if (__n > size_type(_S_local_capacity)) + { + _M_data(_M_create(__n, size_type(0))); + _M_capacity(__n); + } + + if (__n) + this->_S_assign(_M_data(), __n, __c); + + _M_set_length(__n); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_assign(const basic_string& __str) + { + if (this != &__str) + { + const size_type __rsize = __str.length(); + const size_type __capacity = capacity(); + + if (__rsize > __capacity) + { + size_type __new_capacity = __rsize; + pointer __tmp = _M_create(__new_capacity, __capacity); + _M_dispose(); + _M_data(__tmp); + _M_capacity(__new_capacity); + } + + if (__rsize) + this->_S_copy(_M_data(), __str._M_data(), __rsize); + + _M_set_length(__rsize); + } + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve(size_type __res) + { + const size_type __capacity = capacity(); + + + + + if (__res <= __capacity) + return; + + pointer __tmp = _M_create(__res, __capacity); + this->_S_copy(__tmp, _M_data(), length() + 1); + _M_dispose(); + _M_data(__tmp); + _M_capacity(__res); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, + size_type __len2) + { + const size_type __how_much = length() - __pos - __len1; + + size_type __new_capacity = length() + __len2 - __len1; + pointer __r = _M_create(__new_capacity, capacity()); + + if (__pos) + this->_S_copy(__r, _M_data(), __pos); + if (__s && __len2) + this->_S_copy(__r + __pos, __s, __len2); + if (__how_much) + this->_S_copy(__r + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + + _M_dispose(); + _M_data(__r); + _M_capacity(__new_capacity); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_erase(size_type __pos, size_type __n) + { + const size_type __how_much = length() - __pos - __n; + + if (__how_much && __n) + this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); + + _M_set_length(length() - __n); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve() + { + if (_M_is_local()) + return; + + const size_type __length = length(); + const size_type __capacity = _M_allocated_capacity; + + if (__length <= size_type(_S_local_capacity)) + { + this->_S_copy(_M_local_data(), _M_data(), __length + 1); + _M_destroy(__capacity); + _M_data(_M_local_data()); + } + + else if (__length < __capacity) + try + { + pointer __tmp + = _Alloc_traits::allocate(_M_get_allocator(), __length + 1); + this->_S_copy(__tmp, _M_data(), __length + 1); + _M_dispose(); + _M_data(__tmp); + _M_capacity(__length); + } + catch (const __cxxabiv1::__forced_unwind&) + { throw; } + catch (...) + { } + + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + resize(size_type __n, _CharT __c) + { + const size_type __size = this->size(); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->_M_set_length(__n); + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_append(const _CharT* __s, size_type __n) + { + const size_type __len = __n + this->size(); + + if (__len <= this->capacity()) + { + if (__n) + this->_S_copy(this->_M_data() + this->size(), __s, __n); + } + else + this->_M_mutate(this->size(), size_type(0), __s, __n); + + this->_M_set_length(__len); + return *this; + } + + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_dispatch(const_iterator __i1, const_iterator __i2, + _InputIterator __k1, _InputIterator __k2, + std::__false_type) + { + + + const basic_string __s(__k1, __k2, this->get_allocator()); + const size_type __n1 = __i2 - __i1; + return _M_replace(__i1 - begin(), __n1, __s._M_data(), + __s.size()); + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c) + { + _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); + + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __n2 - __n1; + + if (__new_size <= this->capacity()) + { + pointer __p = this->_M_data() + __pos1; + + const size_type __how_much = __old_size - __pos1 - __n1; + if (__how_much && __n1 != __n2) + this->_S_move(__p + __n2, __p + __n1, __how_much); + } + else + this->_M_mutate(__pos1, __n1, 0, __n2); + + if (__n2) + this->_S_assign(this->_M_data() + __pos1, __n2, __c); + + this->_M_set_length(__new_size); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace(size_type __pos, size_type __len1, const _CharT* __s, + const size_type __len2) + { + _M_check_length(__len1, __len2, "basic_string::_M_replace"); + + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + + if (__new_size <= this->capacity()) + { + pointer __p = this->_M_data() + __pos; + + const size_type __how_much = __old_size - __pos - __len1; + if (_M_disjunct(__s)) + { + if (__how_much && __len1 != __len2) + this->_S_move(__p + __len2, __p + __len1, __how_much); + if (__len2) + this->_S_copy(__p, __s, __len2); + } + else + { + + if (__len2 && __len2 <= __len1) + this->_S_move(__p, __s, __len2); + if (__how_much && __len1 != __len2) + this->_S_move(__p + __len2, __p + __len1, __how_much); + if (__len2 > __len1) + { + if (__s + __len2 <= __p + __len1) + this->_S_move(__p, __s, __len2); + else if (__s >= __p + __len1) + { + + + const size_type __poff = (__s - __p) + (__len2 - __len1); + this->_S_copy(__p, __p + __poff, __len2); + } + else + { + const size_type __nleft = (__p + __len1) - __s; + this->_S_move(__p, __s, __nleft); + this->_S_copy(__p + __nleft, __p + __len2, + __len2 - __nleft); + } + } + } + } + else + this->_M_mutate(__pos, __len1, __s, __len2); + + this->_M_set_length(__new_size); + return *this; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + _M_check(__pos, "basic_string::copy"); + __n = _M_limit(__pos, __n); + ; + if (__n) + _S_copy(__s, _M_data() + __pos, __n); + + return __n; + } +# 1167 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + ; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_CharT>::other _Char_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; + const __size_type __len = _Traits::length(__lhs); + __string_type __str(_Alloc_traits::_S_select_on_copy( + __rhs.get_allocator())); + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __len); + __str.append(__rhs); + return __str; + } + + template + basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_CharT>::other _Char_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; + __string_type __str(_Alloc_traits::_S_select_on_copy( + __rhs.get_allocator())); + const __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + const size_type __size = this->size(); + + if (__n == 0) + return __pos <= __size ? __pos : npos; + if (__pos >= __size) + return npos; + + const _CharT __elem0 = __s[0]; + const _CharT* const __data = data(); + const _CharT* __first = __data + __pos; + const _CharT* const __last = __data + __size; + size_type __len = __size - __pos; + + while (__len >= __n) + { + + __first = traits_type::find(__first, __len - __n + 1, __elem0); + if (!__first) + return npos; + + + + if (traits_type::compare(__first, __s, __n) == 0) + return __first - __data; + __len = __last - ++__first; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const noexcept + { + size_type __ret = npos; + const size_type __size = this->size(); + if (__pos < __size) + { + const _CharT* __data = _M_data(); + const size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + const size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(size_type(__size - __n), __pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(_M_data()[__size], __c)) + return __size; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + for (; __pos < this->size(); ++__pos) + if (!traits_type::find(__s, __n, _M_data()[__pos])) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const noexcept + { + for (; __pos < this->size(); ++__pos) + if (!traits_type::eq(_M_data()[__pos], __c)) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + noexcept + { + ; + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const noexcept + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + _M_check(__pos, "basic_string::compare"); + __n = _M_limit(__pos, __n); + const size_type __osize = __str.size(); + const size_type __len = std::min(__n, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = _S_compare(__n, __osize); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + _M_check(__pos1, "basic_string::compare"); + __str._M_check(__pos2, "basic_string::compare"); + __n1 = _M_limit(__pos1, __n1); + __n2 = __str._M_limit(__pos2, __n2); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const noexcept + { + ; + const size_type __size = this->size(); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __s, __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__n1, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + typedef ctype<_CharT> __ctype_type; + typedef typename __ctype_type::ctype_base __ctype_base; + + __size_type __extracted = 0; + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + + __str.erase(); + _CharT __buf[128]; + __size_type __len = 0; + const streamsize __w = __in.width(); + const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) + : __str.max_size(); + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(__ctype_base::space, + _Traits::to_char_type(__c))) + { + if (__len == sizeof(__buf) / sizeof(_CharT)) + { + __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); + __len = 0; + } + __buf[__len++] = _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + __str.append(__buf, __len); + + if (__extracted < __n && _Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + + __size_type __extracted = 0; + const __size_type __n = __str.max_size(); + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + try + { + __str.erase(); + const __int_type __idelim = _Traits::to_int_type(__delim); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !_Traits::eq_int_type(__c, __idelim)) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __in.rdbuf()->sbumpc(); + } + else + __err |= __ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } +# 1635 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + extern template + basic_istream& + operator>>(basic_istream&, string&); + extern template + basic_ostream& + operator<<(basic_ostream&, const string&); + extern template + basic_istream& + getline(basic_istream&, string&, char); + extern template + basic_istream& + getline(basic_istream&, string&); +# 1656 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/basic_string.tcc" 3 + extern template + basic_istream& + operator>>(basic_istream&, wstring&); + extern template + basic_ostream& + operator<<(basic_ostream&, const wstring&); + extern template + basic_istream& + getline(basic_istream&, wstring&, wchar_t); + extern template + basic_istream& + getline(basic_istream&, wstring&); + + + + +} +# 57 "D:/compilers/msys64/mingw64/include/c++/11.2.0/string" 2 3 + + +namespace std +{ + + namespace pmr { + template class polymorphic_allocator; + template> + using basic_string = std::basic_string<_CharT, _Traits, + polymorphic_allocator<_CharT>>; + using string = basic_string; + + using u8string = basic_string; + + using u16string = basic_string; + using u32string = basic_string; + + using wstring = basic_string; + + } + + template + struct __hash_string_base + : public __hash_base + { + size_t + operator()(const _Str& __s) const noexcept + { return hash>{}(__s); } + }; + + template<> + struct hash + : public __hash_string_base + { }; + + template<> + struct hash + : public __hash_string_base + { }; + + template<> + struct hash + : public __hash_string_base + { }; + template<> + struct hash + : public __hash_string_base + { }; + + template<> + struct hash + : public __hash_string_base + { }; + + + +} + + + +namespace std +{ + + + + + template + inline typename basic_string<_CharT, _Traits, _Alloc>::size_type + erase_if(basic_string<_CharT, _Traits, _Alloc>& __cont, _Predicate __pred) + { + const auto __osz = __cont.size(); + __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), + __cont.end()); + return __osz - __cont.size(); + } + + template + inline typename basic_string<_CharT, _Traits, _Alloc>::size_type + erase(basic_string<_CharT, _Traits, _Alloc>& __cont, const _Up& __value) + { + const auto __osz = __cont.size(); + __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), + __cont.end()); + return __osz - __cont.size(); + } + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 2 3 + + +namespace std +{ + +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + class locale + { + public: + + + typedef int category; + + + class facet; + class id; + class _Impl; + + friend class facet; + friend class _Impl; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (ctype | numeric | collate | + time | monetary | messages); +# 117 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale() throw(); +# 126 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale(const locale& __other) throw(); +# 136 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + locale(const char* __s); +# 151 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale(const locale& __base, const char* __s, category __cat); +# 162 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + locale(const std::string& __s) : locale(__s.c_str()) { } +# 177 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale(const locale& __base, const std::string& __s, category __cat) + : locale(__base, __s.c_str(), __cat) { } +# 192 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + locale(const locale& __base, const locale& __add, category __cat); +# 205 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + template + locale(const locale& __other, _Facet* __f); + + + ~locale() throw(); +# 219 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + const locale& + operator=(const locale& __other) throw(); +# 234 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + template + locale + combine(const locale& __other) const; + + + + + + + __attribute ((__abi_tag__ ("cxx11"))) + string + name() const; +# 254 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + bool + operator==(const locale& __other) const throw(); +# 284 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; +# 300 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + static locale + global(const locale& __loc); + + + + + static const locale& + classic(); + + private: + + _Impl* _M_impl; + + + static _Impl* _S_classic; + + + static _Impl* _S_global; + + + + + + static const char* const* const _S_categories; +# 335 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + enum { _S_categories_size = 6 + 0 }; + + + static __gthread_once_t _S_once; + + + explicit + locale(_Impl*) throw(); + + static void + _S_initialize(); + + static void + _S_initialize_once() throw(); + + static category + _S_normalize_category(category); + + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + + + static const id* const _S_twinned_facets[]; + + }; +# 373 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + class locale::facet + { + private: + friend class locale; + friend class locale::_Impl; + + mutable _Atomic_word _M_refcount; + + + static __c_locale _S_c_locale; + + + static const char _S_c_name[2]; + + + static __gthread_once_t _S_once; + + + static void + _S_initialize_once(); + + protected: +# 404 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) + { } + + + virtual + ~facet(); + + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old = 0); + + static __c_locale + _S_clone_c_locale(__c_locale& __cloc) throw(); + + static void + _S_destroy_c_locale(__c_locale& __cloc); + + static __c_locale + _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); + + + + static __c_locale + _S_get_c_locale(); + + __attribute__ ((__const__)) static const char* + _S_get_c_name() throw(); +# 440 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + facet(const facet&) = delete; + + facet& + operator=(const facet&) = delete; + + + private: + void + _M_add_reference() const throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() const throw() + { + + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + ; + try + { delete this; } + catch(...) + { } + } + } + + const facet* _M_sso_shim(const id*) const; + const facet* _M_cow_shim(const id*) const; + + protected: + class __shim; + }; +# 485 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + + template + friend const _Facet& + use_facet(const locale&); + + template + friend bool + has_facet(const locale&) throw(); + + + + + mutable size_t _M_index; + + + static _Atomic_word _S_refcount; + + void + operator=(const id&); + + id(const id&); + + public: + + + + id() { } + + size_t + _M_id() const throw(); + }; + + + + class locale::_Impl + { + public: + + friend class locale; + friend class locale::facet; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; + + private: + + _Atomic_word _M_refcount; + const facet** _M_facets; + size_t _M_facets_size; + const facet** _M_caches; + char** _M_names; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + + void + _M_add_reference() throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() throw() + { + + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + ; + try + { delete this; } + catch(...) + { } + } + } + + _Impl(const _Impl&, size_t); + _Impl(const char*, size_t); + _Impl(size_t) throw(); + + ~_Impl() throw(); + + _Impl(const _Impl&); + + void + operator=(const _Impl&); + + bool + _M_check_same_name() + { + bool __ret = true; + if (_M_names[1]) + + for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) + __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; + return __ret; + } + + void + _M_replace_categories(const _Impl*, category); + + void + _M_replace_category(const _Impl*, const locale::id* const*); + + void + _M_replace_facet(const _Impl*, const locale::id*); + + void + _M_install_facet(const locale::id*, const facet*); + + template + void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + + template + void + _M_init_facet_unchecked(_Facet* __facet) + { + __facet->_M_add_reference(); + _M_facets[_Facet::id._M_id()] = __facet; + } + + void + _M_install_cache(const facet*, size_t); + + void _M_init_extra(facet**); + void _M_init_extra(void*, void*, const char*, const char*); + + + + + }; +# 647 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + template + class __cxx11:: collate : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + protected: + + + __c_locale _M_c_locale_collate; + + public: + + static locale::id id; +# 674 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + collate(size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) + { } +# 688 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + explicit + collate(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) + { } +# 705 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } +# 724 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } +# 738 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + + + int + _M_compare(const _CharT*, const _CharT*) const throw(); + + size_t + _M_transform(_CharT*, const _CharT*, size_t) const throw(); + + protected: + + virtual + ~collate() + { _S_destroy_c_locale(_M_c_locale_collate); } +# 767 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; +# 781 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; +# 794 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 3 + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + + template + locale::id collate<_CharT>::id; + + + template<> + int + collate::_M_compare(const char*, const char*) const throw(); + + template<> + size_t + collate::_M_transform(char*, const char*, size_t) const throw(); + + + template<> + int + collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); + + template<> + size_t + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); + + + + template + class __cxx11:: collate_byname : public collate<_CharT> + { + public: + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + explicit + collate_byname(const char* __s, size_t __refs = 0) + : collate<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_collate); + this->_S_create_c_locale(this->_M_c_locale_collate, __s); + } + } + + + explicit + collate_byname(const string& __s, size_t __refs = 0) + : collate_byname(__s.c_str(), __refs) { } + + + protected: + virtual + ~collate_byname() { } + }; + + +} + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 3 + +namespace std +{ + + + template + locale:: + locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + + try + { _M_impl->_M_install_facet(&_Facet::id, __f); } + catch(...) + { + _M_impl->_M_remove_reference(); + throw; + } + delete [] _M_impl->_M_names[0]; + _M_impl->_M_names[0] = 0; + } + + template + locale + locale:: + combine(const locale& __other) const + { + _Impl* __tmp = new _Impl(*_M_impl, 1); + try + { + __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); + } + catch(...) + { + __tmp->_M_remove_reference(); + throw; + } + return locale(__tmp); + } + + template + bool + locale:: + operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type& __collate = use_facet<__collate_type>(*this); + return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } +# 102 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 3 + template + bool + has_facet(const locale& __loc) throw() + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + return (__i < __loc._M_impl->_M_facets_size + + && dynamic_cast(__facets[__i])); + + + + } +# 130 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.tcc" 3 + template + const _Facet& + use_facet(const locale& __loc) + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) + __throw_bad_cast(); + + return dynamic_cast(*__facets[__i]); + + + + } + + + + template + int + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () + { return 0; } + + + template + size_t + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () + { return 0; } + + template + int + collate<_CharT>:: + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { + + + const string_type __one(__lo1, __hi1); + const string_type __two(__lo2, __hi2); + + const _CharT* __p = __one.c_str(); + const _CharT* __pend = __one.data() + __one.length(); + const _CharT* __q = __two.c_str(); + const _CharT* __qend = __two.data() + __two.length(); + + + + + for (;;) + { + const int __res = _M_compare(__p, __q); + if (__res) + return __res; + + __p += char_traits<_CharT>::length(__p); + __q += char_traits<_CharT>::length(__q); + if (__p == __pend && __q == __qend) + return 0; + else if (__p == __pend) + return -1; + else if (__q == __qend) + return 1; + + __p++; + __q++; + } + } + + template + typename collate<_CharT>::string_type + collate<_CharT>:: + do_transform(const _CharT* __lo, const _CharT* __hi) const + { + string_type __ret; + + + const string_type __str(__lo, __hi); + + const _CharT* __p = __str.c_str(); + const _CharT* __pend = __str.data() + __str.length(); + + size_t __len = (__hi - __lo) * 2; + + _CharT* __c = new _CharT[__len]; + + try + { + + + + for (;;) + { + + size_t __res = _M_transform(__c, __p, __len); + + + if (__res >= __len) + { + __len = __res + 1; + delete [] __c, __c = 0; + __c = new _CharT[__len]; + __res = _M_transform(__c, __p, __len); + } + + __ret.append(__c, __res); + __p += char_traits<_CharT>::length(__p); + if (__p == __pend) + break; + + __p++; + __ret.push_back(_CharT()); + } + } + catch(...) + { + delete [] __c; + throw; + } + + delete [] __c; + + return __ret; + } + + template + long + collate<_CharT>:: + do_hash(const _CharT* __lo, const _CharT* __hi) const + { + unsigned long __val = 0; + for (; __lo < __hi; ++__lo) + __val = + *__lo + ((__val << 7) + | (__val >> (__gnu_cxx::__numeric_traits:: + __digits - 7))); + return static_cast(__val); + } + + + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + + +} +# 858 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/locale_classes.h" 2 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 2 3 + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/error_constants.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/error_constants.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cerrno" 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/x86_64-w64-mingw32/bits/error_constants.h" 2 3 + +namespace std +{ + + + + + enum class errc + { + address_family_not_supported = 102, + address_in_use = 100, + address_not_available = 101, + already_connected = 113, + argument_list_too_long = 7, + argument_out_of_domain = 33, + bad_address = 14, + bad_file_descriptor = 9, + + bad_message = 104, + + broken_pipe = 32, + connection_aborted = 106, + connection_already_in_progress = 103, + connection_refused = 107, + connection_reset = 108, + cross_device_link = 18, + destination_address_required = 109, + device_or_resource_busy = 16, + directory_not_empty = 41, + executable_format_error = 8, + file_exists = 17, + file_too_large = 27, + filename_too_long = 38, + function_not_supported = 40, + host_unreachable = 110, + + identifier_removed = 111, + + illegal_byte_sequence = 42, + inappropriate_io_control_operation = 25, + interrupted = 4, + invalid_argument = 22, + invalid_seek = 29, + io_error = 5, + is_a_directory = 21, + message_size = 115, + network_down = 116, + network_reset = 117, + network_unreachable = 118, + no_buffer_space = 119, + + no_child_process = 10, + + + no_link = 121, + + no_lock_available = 39, + + no_message_available = 120, + + + no_message = 122, + + no_protocol_option = 123, + + no_space_on_device = 28, + + + no_stream_resources = 124, + + no_such_device_or_address = 6, + no_such_device = 19, + no_such_file_or_directory = 2, + no_such_process = 3, + not_a_directory = 20, + not_a_socket = 128, + + not_a_stream = 125, + + not_connected = 126, + not_enough_memory = 12, + + not_supported = 129, + + operation_canceled = 105, + operation_in_progress = 112, + + operation_not_permitted = 1, + + operation_not_supported = 130, + + operation_would_block = 140, + + + owner_dead = 133, + + permission_denied = 13, + protocol_error = 134, + protocol_not_supported = 135, + read_only_file_system = 30, + resource_deadlock_would_occur = 36, + resource_unavailable_try_again = 11, + result_out_of_range = 34, + + state_not_recoverable = 127, + + + stream_timeout = 137, + + + text_file_busy = 139, + + + timed_out = 138, + + too_many_files_open_in_system = 23, + too_many_files_open = 24, + too_many_links = 31, + too_many_symbolic_link_levels = 114, + + value_too_large = 132, + + wrong_protocol_type = 136 + }; + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 3 + +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 3 + +#pragma GCC visibility push(default) + + + + +extern "C++" { + +namespace std +{ + + + + + + + class bad_exception : public exception + { + public: + bad_exception() noexcept { } + + + + virtual ~bad_exception() noexcept; + + + virtual const char* + what() const noexcept; + }; + + + typedef void (*terminate_handler) (); + + + typedef void (*unexpected_handler) (); + + + terminate_handler set_terminate(terminate_handler) noexcept; + + + + terminate_handler get_terminate() noexcept; + + + + + void terminate() noexcept __attribute__ ((__noreturn__)); + + + unexpected_handler set_unexpected(unexpected_handler) noexcept; + + + + unexpected_handler get_unexpected() noexcept; + + + + + void unexpected() __attribute__ ((__noreturn__)); +# 105 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 3 + [[__deprecated__]] + bool uncaught_exception() noexcept __attribute__ ((__pure__)); + + + + + int uncaught_exceptions() noexcept __attribute__ ((__pure__)); + + + +} + +namespace __gnu_cxx +{ + +# 137 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 3 + void __verbose_terminate_handler(); + + +} + +} + +#pragma GCC visibility pop + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 +#pragma GCC visibility push(default) + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 3 + +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 3 + +#pragma GCC visibility push(default) + +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 1 3 4 +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h" 1 3 4 +# 2 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/stddef.h" 2 3 4 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 2 3 +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/cxxabi_init_exception.h" 3 +namespace std +{ + class type_info; +} + +namespace __cxxabiv1 +{ + struct __cxa_refcounted_exception; + + extern "C" + { + + void* + __cxa_allocate_exception(size_t) noexcept; + + void + __cxa_free_exception(void*) noexcept; + + + __cxa_refcounted_exception* + __cxa_init_primary_exception(void *object, std::type_info *tinfo, + void ( *dest) (void *)) noexcept; + + } +} + + + +#pragma GCC visibility pop +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 3 + + + + + + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace __cxxabiv1 +{ + class __class_type_info; +} +# 80 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 3 +namespace std +{ + + + + + + + class type_info + { + public: + + + + + virtual ~type_info(); + + + + const char* name() const noexcept + { return __name[0] == '*' ? __name + 1 : __name; } + + + + + + bool before(const type_info& __arg) const noexcept; + bool operator==(const type_info& __arg) const noexcept; +# 143 "D:/compilers/msys64/mingw64/include/c++/11.2.0/typeinfo" 3 + size_t hash_code() const noexcept + { + + return _Hash_bytes(name(), __builtin_strlen(name()), + static_cast(0xc70f6907UL)); + + + + } + + + + virtual bool __is_pointer_p() const; + + + virtual bool __is_function_p() const; + + + + + + + + virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, + unsigned __outer) const; + + + virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, + void **__obj_ptr) const; + + protected: + const char *__name; + + explicit type_info(const char *__n): __name(__n) { } + + private: + + type_info& operator=(const type_info&); + type_info(const type_info&); + }; + + + + + + + + class bad_cast : public exception + { + public: + bad_cast() noexcept { } + + + + virtual ~bad_cast() noexcept; + + + virtual const char* what() const noexcept; + }; + + + + + + class bad_typeid : public exception + { + public: + bad_typeid () noexcept { } + + + + virtual ~bad_typeid() noexcept; + + + virtual const char* what() const noexcept; + }; +} + +} + +#pragma GCC visibility pop +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 2 3 +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 +extern "C++" { + +namespace std +{ + class type_info; + + + + + + + namespace __exception_ptr + { + class exception_ptr; + } + + using __exception_ptr::exception_ptr; + + + + + + exception_ptr current_exception() noexcept; + + template + exception_ptr make_exception_ptr(_Ex) noexcept; + + + void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); + + namespace __exception_ptr + { + using std::rethrow_exception; + + + + + + class exception_ptr + { + void* _M_exception_object; + + explicit exception_ptr(void* __e) noexcept; + + void _M_addref() noexcept; + void _M_release() noexcept; + + void *_M_get() const noexcept __attribute__ ((__pure__)); + + friend exception_ptr std::current_exception() noexcept; + friend void std::rethrow_exception(exception_ptr); + template + friend exception_ptr std::make_exception_ptr(_Ex) noexcept; + + public: + exception_ptr() noexcept; + + exception_ptr(const exception_ptr&) noexcept; + + + exception_ptr(nullptr_t) noexcept + : _M_exception_object(nullptr) + { } + + exception_ptr(exception_ptr&& __o) noexcept + : _M_exception_object(__o._M_exception_object) + { __o._M_exception_object = nullptr; } +# 124 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 + exception_ptr& + operator=(const exception_ptr&) noexcept; + + + exception_ptr& + operator=(exception_ptr&& __o) noexcept + { + exception_ptr(static_cast(__o)).swap(*this); + return *this; + } + + + ~exception_ptr() noexcept; + + void + swap(exception_ptr&) noexcept; +# 151 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 + explicit operator bool() const noexcept + { return _M_exception_object; } + + + + + friend bool + operator==(const exception_ptr&, const exception_ptr&) noexcept = default; +# 171 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 + const class std::type_info* + __cxa_exception_type() const noexcept + __attribute__ ((__pure__)); + }; + + + inline + exception_ptr::exception_ptr() noexcept + : _M_exception_object(0) + { } + + + inline + exception_ptr::exception_ptr(const exception_ptr& __other) noexcept + : _M_exception_object(__other._M_exception_object) + { + if (_M_exception_object) + _M_addref(); + } + + + inline + exception_ptr::~exception_ptr() noexcept + { + if (_M_exception_object) + _M_release(); + } + + + inline exception_ptr& + exception_ptr::operator=(const exception_ptr& __other) noexcept + { + exception_ptr(__other).swap(*this); + return *this; + } + + + inline void + exception_ptr::swap(exception_ptr &__other) noexcept + { + void *__tmp = _M_exception_object; + _M_exception_object = __other._M_exception_object; + __other._M_exception_object = __tmp; + } + + + inline void + swap(exception_ptr& __lhs, exception_ptr& __rhs) + { __lhs.swap(__rhs); } + + + template + inline void + __dest_thunk(void* __x) + { static_cast<_Ex*>(__x)->~_Ex(); } + + + } + + + template + exception_ptr + make_exception_ptr(_Ex __ex) noexcept + { + + void* __e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); + (void) __cxxabiv1::__cxa_init_primary_exception( + __e, const_cast(&typeid(__ex)), + __exception_ptr::__dest_thunk<_Ex>); + try + { + ::new (__e) _Ex(__ex); + return exception_ptr(__e); + } + catch(...) + { + __cxxabiv1::__cxa_free_exception(__e); + return current_exception(); + } +# 262 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/exception_ptr.h" 3 + } + + + + +} + +} + +#pragma GCC visibility pop +# 148 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/nested_exception.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/nested_exception.h" 3 +#pragma GCC visibility push(default) +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/nested_exception.h" 3 +extern "C++" { + +namespace std +{ + + + + + + + class nested_exception + { + exception_ptr _M_ptr; + + public: + nested_exception() noexcept : _M_ptr(current_exception()) { } + + nested_exception(const nested_exception&) noexcept = default; + + nested_exception& operator=(const nested_exception&) noexcept = default; + + virtual ~nested_exception() noexcept; + + [[noreturn]] + void + rethrow_nested() const + { + if (_M_ptr) + rethrow_exception(_M_ptr); + std::terminate(); + } + + exception_ptr + nested_ptr() const noexcept + { return _M_ptr; } + }; + + + + template + struct _Nested_exception : public _Except, public nested_exception + { + explicit _Nested_exception(const _Except& __ex) + : _Except(__ex) + { } + + explicit _Nested_exception(_Except&& __ex) + : _Except(static_cast<_Except&&>(__ex)) + { } + }; + + + + + template + [[noreturn]] + inline void + __throw_with_nested_impl(_Tp&& __t, true_type) + { + using _Up = typename remove_reference<_Tp>::type; + throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; + } + + template + [[noreturn]] + inline void + __throw_with_nested_impl(_Tp&& __t, false_type) + { throw std::forward<_Tp>(__t); } + + + + + + template + [[noreturn]] + inline void + throw_with_nested(_Tp&& __t) + { + using _Up = typename decay<_Tp>::type; + using _CopyConstructible + = __and_, is_move_constructible<_Up>>; + static_assert(_CopyConstructible::value, + "throw_with_nested argument must be CopyConstructible"); + using __nest = __and_, __bool_constant, + __not_>>; + std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); + } + + + + + template + using __rethrow_if_nested_cond = typename enable_if< + __and_, + __or_<__not_>, + is_convertible<_Tp*, nested_exception*>>>::value + >::type; + + + template + inline __rethrow_if_nested_cond<_Ex> + __rethrow_if_nested_impl(const _Ex* __ptr) + { + if (auto __ne_ptr = dynamic_cast(__ptr)) + __ne_ptr->rethrow_nested(); + } + + + inline void + __rethrow_if_nested_impl(const void*) + { } + + + + + template + inline void + rethrow_if_nested(const _Ex& __ex) + { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } + + +} + +} + + + +#pragma GCC visibility pop +# 149 "D:/compilers/msys64/mingw64/include/c++/11.2.0/exception" 2 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 2 3 + + +namespace std +{ + + + + + + struct __cow_string + { + union { + const char* _M_p; + char _M_bytes[sizeof(const char*)]; + }; + + __cow_string(); + __cow_string(const std::string&); + __cow_string(const char*, size_t); + __cow_string(const __cow_string&) noexcept; + __cow_string& operator=(const __cow_string&) noexcept; + ~__cow_string(); + + __cow_string(__cow_string&&) noexcept; + __cow_string& operator=(__cow_string&&) noexcept; + + }; + + typedef basic_string __sso_string; +# 113 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdexcept" 3 + class logic_error : public exception + { + __cow_string _M_msg; + + public: + + explicit + logic_error(const string& __arg) ; + + + explicit + logic_error(const char*) ; + + logic_error(logic_error&&) noexcept; + logic_error& operator=(logic_error&&) noexcept; + + + + logic_error(const logic_error&) noexcept; + logic_error& operator=(const logic_error&) noexcept; + + + + + + virtual ~logic_error() noexcept; + + + + virtual const char* + what() const noexcept; + + + + + + }; + + + + class domain_error : public logic_error + { + public: + explicit domain_error(const string& __arg) ; + + explicit domain_error(const char*) ; + domain_error(const domain_error&) = default; + domain_error& operator=(const domain_error&) = default; + domain_error(domain_error&&) = default; + domain_error& operator=(domain_error&&) = default; + + virtual ~domain_error() noexcept; + }; + + + class invalid_argument : public logic_error + { + public: + explicit invalid_argument(const string& __arg) ; + + explicit invalid_argument(const char*) ; + invalid_argument(const invalid_argument&) = default; + invalid_argument& operator=(const invalid_argument&) = default; + invalid_argument(invalid_argument&&) = default; + invalid_argument& operator=(invalid_argument&&) = default; + + virtual ~invalid_argument() noexcept; + }; + + + + class length_error : public logic_error + { + public: + explicit length_error(const string& __arg) ; + + explicit length_error(const char*) ; + length_error(const length_error&) = default; + length_error& operator=(const length_error&) = default; + length_error(length_error&&) = default; + length_error& operator=(length_error&&) = default; + + virtual ~length_error() noexcept; + }; + + + + class out_of_range : public logic_error + { + public: + explicit out_of_range(const string& __arg) ; + + explicit out_of_range(const char*) ; + out_of_range(const out_of_range&) = default; + out_of_range& operator=(const out_of_range&) = default; + out_of_range(out_of_range&&) = default; + out_of_range& operator=(out_of_range&&) = default; + + virtual ~out_of_range() noexcept; + }; + + + + + + + class runtime_error : public exception + { + __cow_string _M_msg; + + public: + + explicit + runtime_error(const string& __arg) ; + + + explicit + runtime_error(const char*) ; + + runtime_error(runtime_error&&) noexcept; + runtime_error& operator=(runtime_error&&) noexcept; + + + + runtime_error(const runtime_error&) noexcept; + runtime_error& operator=(const runtime_error&) noexcept; + + + + + + virtual ~runtime_error() noexcept; + + + + virtual const char* + what() const noexcept; + + + + + + }; + + + class range_error : public runtime_error + { + public: + explicit range_error(const string& __arg) ; + + explicit range_error(const char*) ; + range_error(const range_error&) = default; + range_error& operator=(const range_error&) = default; + range_error(range_error&&) = default; + range_error& operator=(range_error&&) = default; + + virtual ~range_error() noexcept; + }; + + + class overflow_error : public runtime_error + { + public: + explicit overflow_error(const string& __arg) ; + + explicit overflow_error(const char*) ; + overflow_error(const overflow_error&) = default; + overflow_error& operator=(const overflow_error&) = default; + overflow_error(overflow_error&&) = default; + overflow_error& operator=(overflow_error&&) = default; + + virtual ~overflow_error() noexcept; + }; + + + class underflow_error : public runtime_error + { + public: + explicit underflow_error(const string& __arg) ; + + explicit underflow_error(const char*) ; + underflow_error(const underflow_error&) = default; + underflow_error& operator=(const underflow_error&) = default; + underflow_error(underflow_error&&) = default; + underflow_error& operator=(underflow_error&&) = default; + + virtual ~underflow_error() noexcept; + }; + + + + +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 2 3 + + + + +namespace std +{ + + + + + + + class error_code; + class error_condition; + class system_error; + + + template + struct is_error_code_enum : public false_type { }; + + + template + struct is_error_condition_enum : public false_type { }; + + template<> + struct is_error_condition_enum + : public true_type { }; + + + template + inline constexpr bool is_error_code_enum_v = + is_error_code_enum<_Tp>::value; + template + inline constexpr bool is_error_condition_enum_v = + is_error_condition_enum<_Tp>::value; + + inline namespace _V2 { +# 89 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + class error_category + { + public: + constexpr error_category() noexcept = default; + + virtual ~error_category(); + + error_category(const error_category&) = delete; + error_category& operator=(const error_category&) = delete; + + virtual const char* + name() const noexcept = 0; + + + + + + + private: + __attribute ((__abi_tag__ ("cxx11"))) + virtual __cow_string + _M_message(int) const; + + public: + __attribute ((__abi_tag__ ("cxx11"))) + virtual string + message(int) const = 0; +# 125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + public: + virtual error_condition + default_error_condition(int __i) const noexcept; + + virtual bool + equivalent(int __i, const error_condition& __cond) const noexcept; + + virtual bool + equivalent(const error_code& __code, int __i) const noexcept; + + bool + operator==(const error_category& __other) const noexcept + { return this == &__other; } + + + strong_ordering + operator<=>(const error_category& __rhs) const noexcept + { return std::compare_three_way()(this, &__rhs); } +# 152 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + }; + + + + + __attribute__ ((__const__)) const error_category& generic_category() noexcept; + + + __attribute__ ((__const__)) const error_category& system_category() noexcept; + + } + + error_code make_error_code(errc) noexcept; +# 180 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + class error_code + { + public: + error_code() noexcept + : _M_value(0), _M_cat(&system_category()) { } + + error_code(int __v, const error_category& __cat) noexcept + : _M_value(__v), _M_cat(&__cat) { } + + template::value>::type> + error_code(_ErrorCodeEnum __e) noexcept + { *this = make_error_code(__e); } + + void + assign(int __v, const error_category& __cat) noexcept + { + _M_value = __v; + _M_cat = &__cat; + } + + void + clear() noexcept + { assign(0, system_category()); } + + + template + typename enable_if::value, + error_code&>::type + operator=(_ErrorCodeEnum __e) noexcept + { return *this = make_error_code(__e); } + + int + value() const noexcept { return _M_value; } + + const error_category& + category() const noexcept { return *_M_cat; } + + error_condition + default_error_condition() const noexcept; + + __attribute ((__abi_tag__ ("cxx11"))) + string + message() const + { return category().message(value()); } + + explicit operator bool() const noexcept + { return _M_value != 0; } + + + private: + int _M_value; + const error_category* _M_cat; + }; + + + + + + inline error_code + make_error_code(errc __e) noexcept + { return error_code(static_cast(__e), generic_category()); } + + + inline strong_ordering + operator<=>(const error_code& __lhs, const error_code& __rhs) noexcept + { + if (auto __c = __lhs.category() <=> __rhs.category(); __c != 0) + return __c; + return __lhs.value() <=> __rhs.value(); + } +# 261 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) + { return (__os << __e.category().name() << ':' << __e.value()); } + + + + error_condition make_error_condition(errc) noexcept; +# 279 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + class error_condition + { + public: + error_condition() noexcept + : _M_value(0), _M_cat(&generic_category()) { } + + error_condition(int __v, const error_category& __cat) noexcept + : _M_value(__v), _M_cat(&__cat) { } + + template::value>::type> + error_condition(_ErrorConditionEnum __e) noexcept + { *this = make_error_condition(__e); } + + void + assign(int __v, const error_category& __cat) noexcept + { + _M_value = __v; + _M_cat = &__cat; + } + + + template + typename enable_if::value, error_condition&>::type + operator=(_ErrorConditionEnum __e) noexcept + { return *this = make_error_condition(__e); } + + void + clear() noexcept + { assign(0, generic_category()); } + + + int + value() const noexcept { return _M_value; } + + const error_category& + category() const noexcept { return *_M_cat; } + + __attribute ((__abi_tag__ ("cxx11"))) + string + message() const + { return category().message(value()); } + + explicit operator bool() const noexcept + { return _M_value != 0; } + + + private: + int _M_value; + const error_category* _M_cat; + }; + + + + + + inline error_condition + make_error_condition(errc __e) noexcept + { return error_condition(static_cast(__e), generic_category()); } + + + + + inline bool + operator==(const error_code& __lhs, const error_code& __rhs) noexcept + { return (__lhs.category() == __rhs.category() + && __lhs.value() == __rhs.value()); } + + + + inline bool + operator==(const error_code& __lhs, const error_condition& __rhs) noexcept + { + return (__lhs.category().equivalent(__lhs.value(), __rhs) + || __rhs.category().equivalent(__lhs, __rhs.value())); + } + + + inline bool + operator==(const error_condition& __lhs, + const error_condition& __rhs) noexcept + { + return (__lhs.category() == __rhs.category() + && __lhs.value() == __rhs.value()); + } + + + + + inline strong_ordering + operator<=>(const error_condition& __lhs, + const error_condition& __rhs) noexcept + { + if (auto __c = __lhs.category() <=> __rhs.category(); __c != 0) + return __c; + return __lhs.value() <=> __rhs.value(); + } +# 430 "D:/compilers/msys64/mingw64/include/c++/11.2.0/system_error" 3 + class system_error : public std::runtime_error + { + private: + error_code _M_code; + + public: + system_error(error_code __ec = error_code()) + : runtime_error(__ec.message()), _M_code(__ec) { } + + system_error(error_code __ec, const string& __what) + : runtime_error(__what + ": " + __ec.message()), _M_code(__ec) { } + + system_error(error_code __ec, const char* __what) + : runtime_error(__what + (": " + __ec.message())), _M_code(__ec) { } + + system_error(int __v, const error_category& __ecat, const char* __what) + : system_error(error_code(__v, __ecat), __what) { } + + system_error(int __v, const error_category& __ecat) + : runtime_error(error_code(__v, __ecat).message()), + _M_code(__v, __ecat) { } + + system_error(int __v, const error_category& __ecat, const string& __what) + : runtime_error(__what + ": " + error_code(__v, __ecat).message()), + _M_code(__v, __ecat) { } + + + system_error (const system_error &) = default; + system_error &operator= (const system_error &) = default; + + + virtual ~system_error() noexcept; + + const error_code& + code() const noexcept { return _M_code; } + }; + + +} + + + +namespace std +{ + + + + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const error_code& __e) const noexcept + { + const size_t __tmp = std::_Hash_impl::hash(__e.value()); + return std::_Hash_impl::__hash_combine(&__e.category(), __tmp); + } + }; + + + + + + + template<> + struct hash + : public __hash_base + { + size_t + operator()(const error_condition& __e) const noexcept + { + const size_t __tmp = std::_Hash_impl::hash(__e.value()); + return std::_Hash_impl::__hash_combine(&__e.category(), __tmp); + } + }; + + + +} +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 2 3 + + +namespace std +{ + + + + + + + enum _Ios_Fmtflags + { + _S_boolalpha = 1L << 0, + _S_dec = 1L << 1, + _S_fixed = 1L << 2, + _S_hex = 1L << 3, + _S_internal = 1L << 4, + _S_left = 1L << 5, + _S_oct = 1L << 6, + _S_right = 1L << 7, + _S_scientific = 1L << 8, + _S_showbase = 1L << 9, + _S_showpoint = 1L << 10, + _S_showpos = 1L << 11, + _S_skipws = 1L << 12, + _S_unitbuf = 1L << 13, + _S_uppercase = 1L << 14, + _S_adjustfield = _S_left | _S_right | _S_internal, + _S_basefield = _S_dec | _S_oct | _S_hex, + _S_floatfield = _S_scientific | _S_fixed, + _S_ios_fmtflags_end = 1L << 16, + _S_ios_fmtflags_max = 0x7fffffff, + _S_ios_fmtflags_min = ~0x7fffffff + }; + + inline constexpr _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + + inline constexpr _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + + inline constexpr _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + + inline constexpr _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + + inline const _Ios_Fmtflags& + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + + inline const _Ios_Fmtflags& + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + + inline const _Ios_Fmtflags& + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + + + enum _Ios_Openmode + { + _S_app = 1L << 0, + _S_ate = 1L << 1, + _S_bin = 1L << 2, + _S_in = 1L << 3, + _S_out = 1L << 4, + _S_trunc = 1L << 5, + _S_ios_openmode_end = 1L << 16, + _S_ios_openmode_max = 0x7fffffff, + _S_ios_openmode_min = ~0x7fffffff + }; + + inline constexpr _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + + inline constexpr _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + + inline constexpr _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + + inline constexpr _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + + inline const _Ios_Openmode& + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + + inline const _Ios_Openmode& + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + + inline const _Ios_Openmode& + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + + + enum _Ios_Iostate + { + _S_goodbit = 0, + _S_badbit = 1L << 0, + _S_eofbit = 1L << 1, + _S_failbit = 1L << 2, + _S_ios_iostate_end = 1L << 16, + _S_ios_iostate_max = 0x7fffffff, + _S_ios_iostate_min = ~0x7fffffff + }; + + inline constexpr _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + + inline constexpr _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + + inline constexpr _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + + inline constexpr _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + + inline const _Ios_Iostate& + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + + inline const _Ios_Iostate& + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + + inline const _Ios_Iostate& + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + + + enum _Ios_Seekdir + { + _S_beg = 0, + _S_cur = 1, + _S_end = 2, + _S_ios_seekdir_end = 1L << 16 + }; + + + + enum class io_errc { stream = 1 }; + + template <> struct is_error_code_enum : public true_type { }; + + const error_category& iostream_category() noexcept; + + inline error_code + make_error_code(io_errc __e) noexcept + { return error_code(static_cast(__e), iostream_category()); } + + inline error_condition + make_error_condition(io_errc __e) noexcept + { return error_condition(static_cast(__e), iostream_category()); } +# 228 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + class ios_base + { +# 246 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + public: +# 255 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + class __attribute ((__abi_tag__ ("cxx11"))) failure : public system_error + { + public: + explicit + failure(const string& __str); + + + explicit + failure(const string&, const error_code&); + + explicit + failure(const char*, const error_code& = io_errc::stream); + + + virtual + ~failure() throw(); + + virtual const char* + what() const throw(); + }; +# 341 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef _Ios_Fmtflags fmtflags; + + + static const fmtflags boolalpha = _S_boolalpha; + + + static const fmtflags dec = _S_dec; + + + static const fmtflags fixed = _S_fixed; + + + static const fmtflags hex = _S_hex; + + + + + static const fmtflags internal = _S_internal; + + + + static const fmtflags left = _S_left; + + + static const fmtflags oct = _S_oct; + + + + static const fmtflags right = _S_right; + + + static const fmtflags scientific = _S_scientific; + + + + static const fmtflags showbase = _S_showbase; + + + + static const fmtflags showpoint = _S_showpoint; + + + static const fmtflags showpos = _S_showpos; + + + static const fmtflags skipws = _S_skipws; + + + static const fmtflags unitbuf = _S_unitbuf; + + + + static const fmtflags uppercase = _S_uppercase; + + + static const fmtflags adjustfield = _S_adjustfield; + + + static const fmtflags basefield = _S_basefield; + + + static const fmtflags floatfield = _S_floatfield; +# 416 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef _Ios_Iostate iostate; + + + + static const iostate badbit = _S_badbit; + + + static const iostate eofbit = _S_eofbit; + + + + + static const iostate failbit = _S_failbit; + + + static const iostate goodbit = _S_goodbit; +# 447 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef _Ios_Openmode openmode; + + + static const openmode app = _S_app; + + + static const openmode ate = _S_ate; + + + + + static const openmode binary = _S_bin; + + + static const openmode in = _S_in; + + + static const openmode out = _S_out; + + + static const openmode trunc = _S_trunc; +# 479 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef _Ios_Seekdir seekdir; + + + static const seekdir beg = _S_beg; + + + static const seekdir cur = _S_cur; + + + static const seekdir end = _S_end; +# 512 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; +# 529 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + typedef void (*event_callback) (event __e, ios_base& __b, int __i); +# 541 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + void + register_callback(event_callback __fn, int __index); + + protected: + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + iostate _M_exception; + iostate _M_streambuf_state; + + + + struct _Callback_list + { + + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + _Atomic_word _M_refcount; + + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + + void + _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + + int + _M_remove_reference() + { + + ; + int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); + if (__res == 0) + { + ; + } + return __res; + } + }; + + _Callback_list* _M_callbacks; + + void + _M_call_callbacks(event __ev) throw(); + + void + _M_dispose_callbacks(void) throw(); + + + struct _Words + { + void* _M_pword; + long _M_iword; + _Words() : _M_pword(0), _M_iword(0) { } + }; + + + _Words _M_word_zero; + + + + enum { _S_local_word_size = 8 }; + _Words _M_local_word[_S_local_word_size]; + + + int _M_word_size; + _Words* _M_word; + + _Words& + _M_grow_words(int __index, bool __iword); + + + locale _M_ios_locale; + + void + _M_init() throw(); + + public: + + + + + + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + + + Init(const Init&) = default; + Init& operator=(const Init&) = default; + + + private: + static _Atomic_word _S_refcount; + static bool _S_synced_with_stdio; + }; + + + + + + + fmtflags + flags() const + { return _M_flags; } +# 659 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } +# 675 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } +# 692 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + + + + + + + + void + unsetf(fmtflags __mask) + { _M_flags &= ~__mask; } +# 718 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + streamsize + precision() const + { return _M_precision; } + + + + + + + streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + + + + + + + + streamsize + width() const + { return _M_width; } + + + + + + + streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } +# 769 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + static bool + sync_with_stdio(bool __sync = true); +# 781 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + locale + imbue(const locale& __loc) throw(); +# 792 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + locale + getloc() const + { return _M_ios_locale; } +# 803 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + const locale& + _M_getloc() const + { return _M_ios_locale; } +# 822 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + static int + xalloc() throw(); +# 838 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + long& + iword(int __ix) + { + _Words& __word = ((unsigned)__ix < (unsigned)_M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, true); + return __word._M_iword; + } +# 859 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + void*& + pword(int __ix) + { + _Words& __word = ((unsigned)__ix < (unsigned)_M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, false); + return __word._M_pword; + } +# 876 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + virtual ~ios_base(); + + protected: + ios_base() throw (); +# 890 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ios_base.h" 3 + public: + ios_base(const ios_base&) = delete; + + ios_base& + operator=(const ios_base&) = delete; + + protected: + void + _M_move(ios_base&) noexcept; + + void + _M_swap(ios_base& __rhs) noexcept; + + }; + + + + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + + + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + + + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + + + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + + + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + + + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + + + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + + + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + + + + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + + + + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + + + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + + + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + + + + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + + + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } + + + + + + + inline ios_base& + hexfloat(ios_base& __base) + { + __base.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield); + return __base; + } + + + inline ios_base& + defaultfloat(ios_base& __base) + { + __base.unsetf(ios_base::floatfield); + return __base; + } + + + +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 2 3 + + + +namespace std +{ + + + + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, + basic_streambuf<_CharT, _Traits>*, bool&); +# 121 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + template + class basic_streambuf + { + public: + + + + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + + + typedef basic_streambuf __streambuf_type; + + + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + + friend streamsize + __copy_streambufs_eof<>(basic_streambuf*, basic_streambuf*, bool&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + void>::__type + advance(istreambuf_iterator<_CharT2>&, _Distance); + + friend void __istream_extract(istream&, char*, streamsize); + + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&); + + template + friend basic_istream<_CharT2, _Traits2>& + getline(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); + + protected: + + + + + + + + char_type* _M_in_beg; + char_type* _M_in_cur; + char_type* _M_in_end; + char_type* _M_out_beg; + char_type* _M_out_cur; + char_type* _M_out_end; + + + locale _M_buf_locale; + + public: + + virtual + ~basic_streambuf() + { } +# 213 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + locale + pubimbue(const locale& __loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + _M_buf_locale = __loc; + return __tmp; + } +# 230 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + locale + getloc() const + { return _M_buf_locale; } +# 243 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + basic_streambuf* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } +# 255 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } +# 267 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + + + + + int + pubsync() { return this->sync(); } +# 288 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + streamsize + in_avail() + { + const streamsize __ret = this->egptr() - this->gptr(); + return __ret ? __ret : this->showmanyc(); + } +# 302 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + snextc() + { + int_type __ret = traits_type::eof(); + if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), + __ret), true)) + __ret = this->sgetc(); + return __ret; + } +# 320 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sbumpc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + else + __ret = this->uflow(); + return __ret; + } +# 342 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sgetc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + __ret = traits_type::to_int_type(*this->gptr()); + else + __ret = this->underflow(); + return __ret; + } +# 361 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } +# 376 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sputbackc(char_type __c) + { + int_type __ret; + const bool __testpos = this->eback() < this->gptr(); + if (__builtin_expect(!__testpos || + !traits_type::eq(__c, this->gptr()[-1]), false)) + __ret = this->pbackfail(traits_type::to_int_type(__c)); + else + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } +# 401 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sungetc() + { + int_type __ret; + if (__builtin_expect(this->eback() < this->gptr(), true)) + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + else + __ret = this->pbackfail(); + return __ret; + } +# 428 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + int_type + sputc(char_type __c) + { + int_type __ret; + if (__builtin_expect(this->pptr() < this->epptr(), true)) + { + *this->pptr() = __c; + this->pbump(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } +# 454 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + + protected: +# 468 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + basic_streambuf() + : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), + _M_out_beg(0), _M_out_cur(0), _M_out_end(0), + _M_buf_locale(locale()) + { } +# 486 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + char_type* + eback() const { return _M_in_beg; } + + char_type* + gptr() const { return _M_in_cur; } + + char_type* + egptr() const { return _M_in_end; } +# 502 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + gbump(int __n) { _M_in_cur += __n; } +# 513 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + } +# 533 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + char_type* + pbase() const { return _M_out_beg; } + + char_type* + pptr() const { return _M_out_cur; } + + char_type* + epptr() const { return _M_out_end; } +# 549 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + pbump(int __n) { _M_out_cur += __n; } +# 559 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + } +# 580 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual void + imbue(const locale& __loc __attribute__ ((__unused__))) + { } +# 595 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } +# 606 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 618 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual pos_type + seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 631 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int + sync() { return 0; } +# 653 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual streamsize + showmanyc() { return 0; } +# 669 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual streamsize + xsgetn(char_type* __s, streamsize __n); +# 691 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int_type + underflow() + { return traits_type::eof(); } +# 704 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(this->underflow(), + __ret); + if (!__testeof) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + return __ret; + } +# 728 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int_type + pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) + { return traits_type::eof(); } +# 746 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual streamsize + xsputn(const char_type* __s, streamsize __n); +# 772 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + virtual int_type + overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) + { return traits_type::eof(); } +# 799 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 3 + void + __safe_gbump(streamsize __n) { _M_in_cur += __n; } + + void + __safe_pbump(streamsize __n) { _M_out_cur += __n; } + + + + + protected: + + basic_streambuf(const basic_streambuf&); + + basic_streambuf& + operator=(const basic_streambuf&); + + + void + swap(basic_streambuf& __sb) + { + std::swap(_M_in_beg, __sb._M_in_beg); + std::swap(_M_in_cur, __sb._M_in_cur); + std::swap(_M_in_end, __sb._M_in_end); + std::swap(_M_out_beg, __sb._M_out_beg); + std::swap(_M_out_cur, __sb._M_out_cur); + std::swap(_M_out_end, __sb._M_out_end); + std::swap(_M_buf_locale, __sb._M_buf_locale); + } + + }; + + + template + std::basic_streambuf<_CharT, _Traits>:: + basic_streambuf(const basic_streambuf&) = default; + + template + std::basic_streambuf<_CharT, _Traits>& + std::basic_streambuf<_CharT, _Traits>:: + operator=(const basic_streambuf&) = default; + + + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + + + + +} + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf.tcc" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf.tcc" 3 + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf.tcc" 3 + +namespace std +{ + + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->egptr() - this->gptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(__s, this->gptr(), __len); + __ret += __len; + __s += __len; + this->__safe_gbump(__len); + } + + if (__ret < __n) + { + const int_type __c = this->uflow(); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->epptr() - this->pptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(this->pptr(), __s, __len); + __ret += __len; + __s += __len; + this->__safe_pbump(__len); + } + + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + + + + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout, + bool& __ineof) + { + streamsize __ret = 0; + __ineof = true; + typename _Traits::int_type __c = __sbin->sgetc(); + while (!_Traits::eq_int_type(__c, _Traits::eof())) + { + __c = __sbout->sputc(_Traits::to_char_type(__c)); + if (_Traits::eq_int_type(__c, _Traits::eof())) + { + __ineof = false; + break; + } + ++__ret; + __c = __sbin->snextc(); + } + return __ret; + } + + template + inline streamsize + __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + bool __ineof; + return __copy_streambufs_eof(__sbin, __sbout, __ineof); + } + + + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + + +} +# 859 "D:/compilers/msys64/mingw64/include/c++/11.2.0/streambuf" 2 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 2 3 + + +namespace std +{ + +# 49 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + template + class istreambuf_iterator + : public iterator + { + public: +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + using pointer = void; + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*, bool); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + void>::__type + advance(istreambuf_iterator<_CharT2>&, _Distance); + + private: + + + + + + + + mutable streambuf_type* _M_sbuf; + int_type _M_c; + + public: + + constexpr istreambuf_iterator() noexcept + : _M_sbuf(0), _M_c(traits_type::eof()) { } + + + constexpr istreambuf_iterator(default_sentinel_t) noexcept + : istreambuf_iterator() { } + + + + istreambuf_iterator(const istreambuf_iterator&) noexcept = default; + + ~istreambuf_iterator() = default; + + + + istreambuf_iterator(istream_type& __s) noexcept + : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } + + + istreambuf_iterator(streambuf_type* __s) noexcept + : _M_sbuf(__s), _M_c(traits_type::eof()) { } + + + istreambuf_iterator& + operator=(const istreambuf_iterator&) noexcept = default; + + + + + + char_type + operator*() const + { + int_type __c = _M_get(); +# 156 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/streambuf_iterator.h" 3 + return traits_type::to_char_type(__c); + } + + + istreambuf_iterator& + operator++() + { + + + + ; + + _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + return *this; + } + + + istreambuf_iterator + operator++(int) + { + + + + ; + + istreambuf_iterator __old = *this; + __old._M_c = _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + return __old; + } + + + + + + bool + equal(const istreambuf_iterator& __b) const + { return _M_at_eof() == __b._M_at_eof(); } + + private: + int_type + _M_get() const + { + int_type __ret = _M_c; + if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc())) + _M_sbuf = 0; + return __ret; + } + + bool + _M_at_eof() const + { return _S_is_eof(_M_get()); } + + static bool + _S_is_eof(int_type __c) + { + const int_type __eof = traits_type::eof(); + return traits_type::eq_int_type(__c, __eof); + } + + + friend bool + operator==(const istreambuf_iterator& __i, default_sentinel_t __s) + { return __i._M_at_eof(); } + + }; + + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } + + + template + class ostreambuf_iterator + : public iterator + { + public: + + + + + using difference_type = ptrdiff_t; + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + private: + streambuf_type* _M_sbuf; + bool _M_failed; + + public: + + + constexpr + ostreambuf_iterator() noexcept + : _M_sbuf(nullptr), _M_failed(true) { } + + + + ostreambuf_iterator(ostream_type& __s) noexcept + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator(streambuf_type* __s) noexcept + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator& + operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) + _M_failed = true; + return *this; + } + + + ostreambuf_iterator& + operator*() + { return *this; } + + + ostreambuf_iterator& + operator++(int) + { return *this; } + + + ostreambuf_iterator& + operator++() + { return *this; } + + + bool + failed() const noexcept + { return _M_failed; } + + ostreambuf_iterator& + _M_put(const _CharT* __ws, streamsize __len) + { + if (__builtin_expect(!_M_failed, true) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) + _M_failed = true; + return *this; + } + }; + + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + copy(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, + ostreambuf_iterator<_CharT> __result) + { + if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) + { + bool __ineof; + __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); + if (!__ineof) + __result._M_failed = true; + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(_CharT* __first, _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(const _CharT* __first, const _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, _CharT* __result) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + + if (__first._M_sbuf && !__last._M_sbuf) + { + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof())) + { + const streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + traits_type::copy(__result, __sb->gptr(), __n); + __sb->__safe_gbump(__n); + __result += __n; + __c = __sb->underflow(); + } + else + { + *__result++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + } + } + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result, + bool __strict __attribute__((__unused__))) + { + if (__n == 0) + return __result; + + + + ; + _CharT* __beg = __result; + __result += __it._M_sbuf->sgetn(__beg, __n); + + + ; + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + istreambuf_iterator<_CharT> >::__type + find(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, const _CharT& __val) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + const int_type __eof = traits_type::eof(); + + if (__first._M_sbuf && !__last._M_sbuf) + { + const int_type __ival = traits_type::to_int_type(__val); + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __ival)) + { + streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + const _CharT* __p = traits_type::find(__sb->gptr(), + __n, __val); + if (__p) + __n = __p - __sb->gptr(); + __sb->__safe_gbump(__n); + __c = __sb->sgetc(); + } + else + __c = __sb->snextc(); + } + + __first._M_c = __eof; + } + + return __first; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + void>::__type + advance(istreambuf_iterator<_CharT>& __i, _Distance __n) + { + if (__n == 0) + return; + + do { if (__builtin_is_constant_evaluated() && !bool(__n > 0)) __builtin_unreachable(); } while (false); + + + ; + + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + const int_type __eof = traits_type::eof(); + + streambuf_type* __sb = __i._M_sbuf; + while (__n > 0) + { + streamsize __size = __sb->egptr() - __sb->gptr(); + if (__size > __n) + { + __sb->__safe_gbump(__n); + break; + } + + __sb->__safe_gbump(__size); + __n -= __size; + if (traits_type::eq_int_type(__sb->underflow(), __eof)) + { + + + ; + break; + } + } + + __i._M_c = __eof; + } + + + + +} +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/iterator" 2 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algobase.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 +namespace std +{ + +# 53 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 + template::type> + constexpr _Up&& + __invfwd(typename remove_reference<_Tp>::type& __t) noexcept + { return static_cast<_Up&&>(__t); } + + template + constexpr _Res + __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) + { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } + + template + constexpr _Res + __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } + + template + constexpr _Res + __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, + _Args&&... __args) + { + return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); + } + + template + constexpr _Res + __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) + { return __invfwd<_Tp>(__t).*__f; } + + template + constexpr _Res + __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) + { return (*std::forward<_Tp>(__t)).*__f; } + + + template + constexpr typename __invoke_result<_Callable, _Args...>::type + __invoke(_Callable&& __fn, _Args&&... __args) + noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) + { + using __result = __invoke_result<_Callable, _Args...>; + using __type = typename __result::type; + using __tag = typename __result::__invoke_type; + return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + } + + + + template + constexpr enable_if_t, _Res> + __invoke_r(_Callable&& __fn, _Args&&... __args) + noexcept(is_nothrow_invocable_r_v<_Res, _Callable, _Args...>) + { + using __result = __invoke_result<_Callable, _Args...>; + using __type = typename __result::type; + using __tag = typename __result::__invoke_type; + if constexpr (is_void_v<_Res>) + std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + else + return std::__invoke_impl<__type>(__tag{}, + std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + } +# 159 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/invoke.h" 3 + +} +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algobase.h" 2 3 + + + +namespace std +{ + +namespace ranges +{ + namespace __detail + { + template + constexpr inline bool __is_normal_iterator = false; + + template + constexpr inline bool + __is_normal_iterator<__gnu_cxx::__normal_iterator<_Iterator, + _Container>> = true; + + template + constexpr inline bool __is_reverse_iterator = false; + + template + constexpr inline bool + __is_reverse_iterator> = true; + + template + constexpr inline bool __is_move_iterator = false; + + template + constexpr inline bool + __is_move_iterator> = true; + } + + struct __equal_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr bool + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + + + if constexpr (__detail::__is_normal_iterator<_Iter1> + && same_as<_Iter1, _Sent1>) + return (*this)(__first1.base(), __last1.base(), + std::move(__first2), std::move(__last2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + else if constexpr (__detail::__is_normal_iterator<_Iter2> + && same_as<_Iter2, _Sent2>) + return (*this)(std::move(__first1), std::move(__last1), + __first2.base(), __last2.base(), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + else if constexpr (sized_sentinel_for<_Sent1, _Iter1> + && sized_sentinel_for<_Sent2, _Iter2>) + { + auto __d1 = ranges::distance(__first1, __last1); + auto __d2 = ranges::distance(__first2, __last2); + if (__d1 != __d2) + return false; + + using _ValueType1 = iter_value_t<_Iter1>; + constexpr bool __use_memcmp + = ((is_integral_v<_ValueType1> || is_pointer_v<_ValueType1>) + && __memcmpable<_Iter1, _Iter2>::__value + && is_same_v<_Pred, ranges::equal_to> + && is_same_v<_Proj1, identity> + && is_same_v<_Proj2, identity>); + if constexpr (__use_memcmp) + { + if (const size_t __len = (__last1 - __first1)) + return !std::__memcmp(__first1, __first2, __len); + return true; + } + else + { + for (; __first1 != __last1; ++__first1, (void)++__first2) + if (!(bool)std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + return false; + return true; + } + } + else + { + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!(bool)std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + return false; + return __first1 == __last1 && __first2 == __last2; + } + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr bool + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __equal_fn equal{}; + + template + struct in_out_result + { + [[no_unique_address]] _Iter in; + [[no_unique_address]] _Out out; + + template + requires convertible_to + && convertible_to + constexpr + operator in_out_result<_Iter2, _Out2>() const & + { return {in, out}; } + + template + requires convertible_to<_Iter, _Iter2> + && convertible_to<_Out, _Out2> + constexpr + operator in_out_result<_Iter2, _Out2>() && + { return {std::move(in), std::move(out)}; } + }; + + template + using copy_result = in_out_result<_Iter, _Out>; + + template + using move_result = in_out_result<_Iter, _Out>; + + template + using move_backward_result = in_out_result<_Iter1, _Iter2>; + + template + using copy_backward_result = in_out_result<_Iter1, _Iter2>; + + template _Sent, + bidirectional_iterator _Out> + requires (_IsMove + ? indirectly_movable<_Iter, _Out> + : indirectly_copyable<_Iter, _Out>) + constexpr conditional_t<_IsMove, + move_backward_result<_Iter, _Out>, + copy_backward_result<_Iter, _Out>> + __copy_or_move_backward(_Iter __first, _Sent __last, _Out __result); + + template _Sent, + weakly_incrementable _Out> + requires (_IsMove + ? indirectly_movable<_Iter, _Out> + : indirectly_copyable<_Iter, _Out>) + constexpr conditional_t<_IsMove, + move_result<_Iter, _Out>, + copy_result<_Iter, _Out>> + __copy_or_move(_Iter __first, _Sent __last, _Out __result) + { + + + using __detail::__is_move_iterator; + using __detail::__is_reverse_iterator; + using __detail::__is_normal_iterator; + if constexpr (__is_move_iterator<_Iter> && same_as<_Iter, _Sent>) + { + auto [__in, __out] + = ranges::__copy_or_move(std::move(__first).base(), + std::move(__last).base(), + std::move(__result)); + return {move_iterator{std::move(__in)}, std::move(__out)}; + } + else if constexpr (__is_reverse_iterator<_Iter> && same_as<_Iter, _Sent> + && __is_reverse_iterator<_Out>) + { + auto [__in,__out] + = ranges::__copy_or_move_backward<_IsMove>(std::move(__last).base(), + std::move(__first).base(), + std::move(__result).base()); + return {reverse_iterator{std::move(__in)}, + reverse_iterator{std::move(__out)}}; + } + else if constexpr (__is_normal_iterator<_Iter> && same_as<_Iter, _Sent>) + { + auto [__in,__out] + = ranges::__copy_or_move<_IsMove>(__first.base(), __last.base(), + __result); + return {decltype(__first){__in}, std::move(__out)}; + } + else if constexpr (__is_normal_iterator<_Out>) + { + auto [__in,__out] + = ranges::__copy_or_move<_IsMove>(__first, __last, __result.base()); + return {std::move(__in), decltype(__result){__out}}; + } + else if constexpr (sized_sentinel_for<_Sent, _Iter>) + { + + if (!std::is_constant_evaluated()) + + { + if constexpr (__memcpyable<_Iter, _Out>::__value) + { + using _ValueTypeI = iter_value_t<_Iter>; + static_assert(_IsMove + ? is_move_assignable_v<_ValueTypeI> + : is_copy_assignable_v<_ValueTypeI>); + auto __num = __last - __first; + if (__num) + __builtin_memmove(__result, __first, + sizeof(_ValueTypeI) * __num); + return {__first + __num, __result + __num}; + } + } + + for (auto __n = __last - __first; __n > 0; --__n) + { + if constexpr (_IsMove) + *__result = std::move(*__first); + else + *__result = *__first; + ++__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + else + { + while (__first != __last) + { + if constexpr (_IsMove) + *__result = std::move(*__first); + else + *__result = *__first; + ++__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + } + + struct __copy_fn + { + template _Sent, + weakly_incrementable _Out> + requires indirectly_copyable<_Iter, _Out> + constexpr copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result) const + { + return ranges::__copy_or_move(std::move(__first), + std::move(__last), + std::move(__result)); + } + + template + requires indirectly_copyable, _Out> + constexpr copy_result, _Out> + operator()(_Range&& __r, _Out __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __copy_fn copy{}; + + struct __move_fn + { + template _Sent, + weakly_incrementable _Out> + requires indirectly_movable<_Iter, _Out> + constexpr move_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result) const + { + return ranges::__copy_or_move(std::move(__first), + std::move(__last), + std::move(__result)); + } + + template + requires indirectly_movable, _Out> + constexpr move_result, _Out> + operator()(_Range&& __r, _Out __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __move_fn move{}; + + template _Sent, + bidirectional_iterator _Out> + requires (_IsMove + ? indirectly_movable<_Iter, _Out> + : indirectly_copyable<_Iter, _Out>) + constexpr conditional_t<_IsMove, + move_backward_result<_Iter, _Out>, + copy_backward_result<_Iter, _Out>> + __copy_or_move_backward(_Iter __first, _Sent __last, _Out __result) + { + + + using __detail::__is_reverse_iterator; + using __detail::__is_normal_iterator; + if constexpr (__is_reverse_iterator<_Iter> && same_as<_Iter, _Sent> + && __is_reverse_iterator<_Out>) + { + auto [__in,__out] + = ranges::__copy_or_move<_IsMove>(std::move(__last).base(), + std::move(__first).base(), + std::move(__result).base()); + return {reverse_iterator{std::move(__in)}, + reverse_iterator{std::move(__out)}}; + } + else if constexpr (__is_normal_iterator<_Iter> && same_as<_Iter, _Sent>) + { + auto [__in,__out] + = ranges::__copy_or_move_backward<_IsMove>(__first.base(), + __last.base(), + std::move(__result)); + return {decltype(__first){__in}, std::move(__out)}; + } + else if constexpr (__is_normal_iterator<_Out>) + { + auto [__in,__out] + = ranges::__copy_or_move_backward<_IsMove>(std::move(__first), + std::move(__last), + __result.base()); + return {std::move(__in), decltype(__result){__out}}; + } + else if constexpr (sized_sentinel_for<_Sent, _Iter>) + { + + if (!std::is_constant_evaluated()) + + { + if constexpr (__memcpyable<_Out, _Iter>::__value) + { + using _ValueTypeI = iter_value_t<_Iter>; + static_assert(_IsMove + ? is_move_assignable_v<_ValueTypeI> + : is_copy_assignable_v<_ValueTypeI>); + auto __num = __last - __first; + if (__num) + __builtin_memmove(__result - __num, __first, + sizeof(_ValueTypeI) * __num); + return {__first + __num, __result - __num}; + } + } + + auto __lasti = ranges::next(__first, __last); + auto __tail = __lasti; + + for (auto __n = __last - __first; __n > 0; --__n) + { + --__tail; + --__result; + if constexpr (_IsMove) + *__result = std::move(*__tail); + else + *__result = *__tail; + } + return {std::move(__lasti), std::move(__result)}; + } + else + { + auto __lasti = ranges::next(__first, __last); + auto __tail = __lasti; + + while (__first != __tail) + { + --__tail; + --__result; + if constexpr (_IsMove) + *__result = std::move(*__tail); + else + *__result = *__tail; + } + return {std::move(__lasti), std::move(__result)}; + } + } + + struct __copy_backward_fn + { + template _Sent1, + bidirectional_iterator _Iter2> + requires indirectly_copyable<_Iter1, _Iter2> + constexpr copy_backward_result<_Iter1, _Iter2> + operator()(_Iter1 __first, _Sent1 __last, _Iter2 __result) const + { + return ranges::__copy_or_move_backward(std::move(__first), + std::move(__last), + std::move(__result)); + } + + template + requires indirectly_copyable, _Iter> + constexpr copy_backward_result, _Iter> + operator()(_Range&& __r, _Iter __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __copy_backward_fn copy_backward{}; + + struct __move_backward_fn + { + template _Sent1, + bidirectional_iterator _Iter2> + requires indirectly_movable<_Iter1, _Iter2> + constexpr move_backward_result<_Iter1, _Iter2> + operator()(_Iter1 __first, _Sent1 __last, _Iter2 __result) const + { + return ranges::__copy_or_move_backward(std::move(__first), + std::move(__last), + std::move(__result)); + } + + template + requires indirectly_movable, _Iter> + constexpr move_backward_result, _Iter> + operator()(_Range&& __r, _Iter __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __move_backward_fn move_backward{}; + + template + using copy_n_result = in_out_result<_Iter, _Out>; + + struct __copy_n_fn + { + template + requires indirectly_copyable<_Iter, _Out> + constexpr copy_n_result<_Iter, _Out> + operator()(_Iter __first, iter_difference_t<_Iter> __n, + _Out __result) const + { + if constexpr (random_access_iterator<_Iter>) + { + if (__n > 0) + return ranges::copy(__first, __first + __n, std::move(__result)); + } + else + { + for (; __n > 0; --__n, (void)++__result, (void)++__first) + *__result = *__first; + } + return {std::move(__first), std::move(__result)}; + } + }; + + inline constexpr __copy_n_fn copy_n{}; + + struct __fill_n_fn + { + template _Out> + constexpr _Out + operator()(_Out __first, iter_difference_t<_Out> __n, + const _Tp& __value) const + { + + + if (__n <= 0) + return __first; + + + if constexpr (is_pointer_v<_Out> + + && __is_byte>::__value + && integral<_Tp>) + { + __builtin_memset(__first, static_cast(__value), __n); + return __first + __n; + } + else if constexpr (is_scalar_v<_Tp>) + { + const auto __tmp = __value; + for (; __n > 0; --__n, (void)++__first) + *__first = __tmp; + return __first; + } + else + { + for (; __n > 0; --__n, (void)++__first) + *__first = __value; + return __first; + } + } + }; + + inline constexpr __fill_n_fn fill_n{}; + + struct __fill_fn + { + template _Out, sentinel_for<_Out> _Sent> + constexpr _Out + operator()(_Out __first, _Sent __last, const _Tp& __value) const + { + + + if constexpr (sized_sentinel_for<_Sent, _Out>) + { + const auto __len = __last - __first; + return ranges::fill_n(__first, __len, __value); + } + else if constexpr (is_scalar_v<_Tp>) + { + const auto __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + return __first; + } + else + { + for (; __first != __last; ++__first) + *__first = __value; + return __first; + } + } + + template _Range> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, const _Tp& __value) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), __value); + } + }; + + inline constexpr __fill_fn fill{}; +} + +} +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_util.h" 1 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_util.h" 3 +namespace std +{ + +namespace ranges +{ + + + namespace __detail + { + template + concept __simple_view = view<_Range> && range + && same_as, iterator_t> + && same_as, sentinel_t>; + + template + concept __has_arrow = input_iterator<_It> + && (is_pointer_v<_It> || requires(_It __it) { __it.operator->(); }); + + template + concept __not_same_as + = !same_as, remove_cvref_t<_Up>>; + } + + + template + requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>> + class view_interface : public view_base + { + private: + constexpr _Derived& _M_derived() noexcept + { + static_assert(derived_from<_Derived, view_interface<_Derived>>); + static_assert(view<_Derived>); + return static_cast<_Derived&>(*this); + } + + constexpr const _Derived& _M_derived() const noexcept + { + static_assert(derived_from<_Derived, view_interface<_Derived>>); + static_assert(view<_Derived>); + return static_cast(*this); + } + + public: + constexpr bool + empty() requires forward_range<_Derived> + { return ranges::begin(_M_derived()) == ranges::end(_M_derived()); } + + constexpr bool + empty() const requires forward_range + { return ranges::begin(_M_derived()) == ranges::end(_M_derived()); } + + constexpr explicit + operator bool() requires requires { ranges::empty(_M_derived()); } + { return !ranges::empty(_M_derived()); } + + constexpr explicit + operator bool() const requires requires { ranges::empty(_M_derived()); } + { return !ranges::empty(_M_derived()); } + + constexpr auto + data() requires contiguous_iterator> + { return to_address(ranges::begin(_M_derived())); } + + constexpr auto + data() const + requires range + && contiguous_iterator> + { return to_address(ranges::begin(_M_derived())); } + + constexpr auto + size() + requires forward_range<_Derived> + && sized_sentinel_for, iterator_t<_Derived>> + { return ranges::end(_M_derived()) - ranges::begin(_M_derived()); } + + constexpr auto + size() const + requires forward_range + && sized_sentinel_for, + iterator_t> + { return ranges::end(_M_derived()) - ranges::begin(_M_derived()); } + + constexpr decltype(auto) + front() requires forward_range<_Derived> + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return *ranges::begin(_M_derived()); + } + + constexpr decltype(auto) + front() const requires forward_range + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return *ranges::begin(_M_derived()); + } + + constexpr decltype(auto) + back() + requires bidirectional_range<_Derived> && common_range<_Derived> + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return *ranges::prev(ranges::end(_M_derived())); + } + + constexpr decltype(auto) + back() const + requires bidirectional_range + && common_range + { + do { if (__builtin_is_constant_evaluated() && !bool(!empty())) __builtin_unreachable(); } while (false); + return *ranges::prev(ranges::end(_M_derived())); + } + + template + constexpr decltype(auto) + operator[](range_difference_t<_Range> __n) + { return ranges::begin(_M_derived())[__n]; } + + template + constexpr decltype(auto) + operator[](range_difference_t<_Range> __n) const + { return ranges::begin(_M_derived())[__n]; } + }; + + namespace __detail + { + template + concept __convertible_to_non_slicing = convertible_to<_From, _To> + && !(is_pointer_v> && is_pointer_v> + && __not_same_as>, + remove_pointer_t>>); + + template + concept __pair_like + = !is_reference_v<_Tp> && requires(_Tp __t) + { + typename tuple_size<_Tp>::type; + requires derived_from, integral_constant>; + typename tuple_element_t<0, remove_const_t<_Tp>>; + typename tuple_element_t<1, remove_const_t<_Tp>>; + { get<0>(__t) } -> convertible_to&>; + { get<1>(__t) } -> convertible_to&>; + }; + + template + concept __pair_like_convertible_from + = !range<_Tp> && __pair_like<_Tp> + && constructible_from<_Tp, _Up, _Vp> + && __convertible_to_non_slicing<_Up, tuple_element_t<0, _Tp>> + && convertible_to<_Vp, tuple_element_t<1, _Tp>>; + + } + + enum class subrange_kind : bool { unsized, sized }; + + + template _Sent = _It, + subrange_kind _Kind = sized_sentinel_for<_Sent, _It> + ? subrange_kind::sized : subrange_kind::unsized> + requires (_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _It>) + class subrange : public view_interface> + { + private: + + static const bool _S_store_size + = _Kind == subrange_kind::sized && !sized_sentinel_for<_Sent, _It>; + + _It _M_begin = _It(); + [[no_unique_address]] _Sent _M_end = _Sent(); + + using __size_type + = __detail::__make_unsigned_like_t>; + + template + struct _Size + { }; + + template + struct _Size<_Tp, true> + { _Tp _M_size; }; + + [[no_unique_address]] _Size<__size_type> _M_size = {}; + + public: + subrange() = default; + + constexpr + subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s) + requires (!_S_store_size) + : _M_begin(std::move(__i)), _M_end(__s) + { } + + constexpr + subrange(__detail::__convertible_to_non_slicing<_It> auto __i, _Sent __s, + __size_type __n) + requires (_Kind == subrange_kind::sized) + : _M_begin(std::move(__i)), _M_end(__s) + { + if constexpr (_S_store_size) + _M_size._M_size = __n; + } + + template<__detail::__not_same_as _Rng> + requires borrowed_range<_Rng> + && __detail::__convertible_to_non_slicing, _It> + && convertible_to, _Sent> + constexpr + subrange(_Rng&& __r) requires _S_store_size && sized_range<_Rng> + : subrange(__r, ranges::size(__r)) + { } + + template<__detail::__not_same_as _Rng> + requires borrowed_range<_Rng> + && __detail::__convertible_to_non_slicing, _It> + && convertible_to, _Sent> + constexpr + subrange(_Rng&& __r) requires (!_S_store_size) + : subrange(ranges::begin(__r), ranges::end(__r)) + { } + + template + requires __detail::__convertible_to_non_slicing, _It> + && convertible_to, _Sent> + constexpr + subrange(_Rng&& __r, __size_type __n) + requires (_Kind == subrange_kind::sized) + : subrange{ranges::begin(__r), ranges::end(__r), __n} + { } + + template<__detail::__not_same_as _PairLike> + requires __detail::__pair_like_convertible_from<_PairLike, const _It&, + const _Sent&> + constexpr + operator _PairLike() const + { return _PairLike(_M_begin, _M_end); } + + constexpr _It + begin() const requires copyable<_It> + { return _M_begin; } + + [[nodiscard]] constexpr _It + begin() requires (!copyable<_It>) + { return std::move(_M_begin); } + + constexpr _Sent end() const { return _M_end; } + + constexpr bool empty() const { return _M_begin == _M_end; } + + constexpr __size_type + size() const requires (_Kind == subrange_kind::sized) + { + if constexpr (_S_store_size) + return _M_size._M_size; + else + return __detail::__to_unsigned_like(_M_end - _M_begin); + } + + [[nodiscard]] constexpr subrange + next(iter_difference_t<_It> __n = 1) const & + requires forward_iterator<_It> + { + auto __tmp = *this; + __tmp.advance(__n); + return __tmp; + } + + [[nodiscard]] constexpr subrange + next(iter_difference_t<_It> __n = 1) && + { + advance(__n); + return std::move(*this); + } + + [[nodiscard]] constexpr subrange + prev(iter_difference_t<_It> __n = 1) const + requires bidirectional_iterator<_It> + { + auto __tmp = *this; + __tmp.advance(-__n); + return __tmp; + } + + constexpr subrange& + advance(iter_difference_t<_It> __n) + { + + + if constexpr (bidirectional_iterator<_It>) + if (__n < 0) + { + ranges::advance(_M_begin, __n); + if constexpr (_S_store_size) + _M_size._M_size += __detail::__to_unsigned_like(-__n); + return *this; + } + + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + auto __d = __n - ranges::advance(_M_begin, __n, _M_end); + if constexpr (_S_store_size) + _M_size._M_size -= __detail::__to_unsigned_like(__d); + return *this; + } + }; + + template _Sent> + subrange(_It, _Sent) -> subrange<_It, _Sent>; + + template _Sent> + subrange(_It, _Sent, + __detail::__make_unsigned_like_t>) + -> subrange<_It, _Sent, subrange_kind::sized>; + + template + subrange(_Rng&&) + -> subrange, sentinel_t<_Rng>, + (sized_range<_Rng> + || sized_sentinel_for, iterator_t<_Rng>>) + ? subrange_kind::sized : subrange_kind::unsized>; + + template + subrange(_Rng&&, + __detail::__make_unsigned_like_t>) + -> subrange, sentinel_t<_Rng>, subrange_kind::sized>; + + template + requires (_Num < 2) + constexpr auto + get(const subrange<_It, _Sent, _Kind>& __r) + { + if constexpr (_Num == 0) + return __r.begin(); + else + return __r.end(); + } + + template + requires (_Num < 2) + constexpr auto + get(subrange<_It, _Sent, _Kind>&& __r) + { + if constexpr (_Num == 0) + return __r.begin(); + else + return __r.end(); + } + + template _Sent, + subrange_kind _Kind> + inline constexpr bool + enable_borrowed_range> = true; + + template + using borrowed_subrange_t = conditional_t, + subrange>, + dangling>; + +} + + using ranges::get; + + template + struct tuple_size> + : integral_constant + { }; + + template + struct tuple_element<0, ranges::subrange<_Iter, _Sent, _Kind>> + { using type = _Iter; }; + + template + struct tuple_element<1, ranges::subrange<_Iter, _Sent, _Kind>> + { using type = _Sent; }; + + template + struct tuple_element<0, const ranges::subrange<_Iter, _Sent, _Kind>> + { using type = _Iter; }; + + template + struct tuple_element<1, const ranges::subrange<_Iter, _Sent, _Kind>> + { using type = _Sent; }; + + +} +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 2 3 + + + +namespace std +{ + +namespace ranges +{ + namespace __detail + { + template + constexpr auto + __make_comp_proj(_Comp& __comp, _Proj& __proj) + { + return [&] (auto&& __lhs, auto&& __rhs) -> bool { + using _TL = decltype(__lhs); + using _TR = decltype(__rhs); + return std::__invoke(__comp, + std::__invoke(__proj, std::forward<_TL>(__lhs)), + std::__invoke(__proj, std::forward<_TR>(__rhs))); + }; + } + + template + constexpr auto + __make_pred_proj(_Pred& __pred, _Proj& __proj) + { + return [&] (_Tp&& __arg) -> bool { + return std::__invoke(__pred, + std::__invoke(__proj, std::forward<_Tp>(__arg))); + }; + } + } + + struct __all_of_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (!(bool)std::__invoke(__pred, std::__invoke(__proj, *__first))) + return false; + return true; + } + + template, _Proj>> + _Pred> + constexpr bool + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __all_of_fn all_of{}; + + struct __any_of_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + return true; + return false; + } + + template, _Proj>> + _Pred> + constexpr bool + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __any_of_fn any_of{}; + + struct __none_of_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + return false; + return true; + } + + template, _Proj>> + _Pred> + constexpr bool + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __none_of_fn none_of{}; + + template + struct in_fun_result + { + [[no_unique_address]] _Iter in; + [[no_unique_address]] _Fp fun; + + template + requires convertible_to + && convertible_to + constexpr + operator in_fun_result<_Iter2, _F2p>() const & + { return {in, fun}; } + + template + requires convertible_to<_Iter, _Iter2> && convertible_to<_Fp, _F2p> + constexpr + operator in_fun_result<_Iter2, _F2p>() && + { return {std::move(in), std::move(fun)}; } + }; + + template + using for_each_result = in_fun_result<_Iter, _Fp>; + + struct __for_each_fn + { + template _Sent, + typename _Proj = identity, + indirectly_unary_invocable> _Fun> + constexpr for_each_result<_Iter, _Fun> + operator()(_Iter __first, _Sent __last, _Fun __f, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + std::__invoke(__f, std::__invoke(__proj, *__first)); + return { std::move(__first), std::move(__f) }; + } + + template, _Proj>> + _Fun> + constexpr for_each_result, _Fun> + operator()(_Range&& __r, _Fun __f, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__f), std::move(__proj)); + } + }; + + inline constexpr __for_each_fn for_each{}; + + template + using for_each_n_result = in_fun_result<_Iter, _Fp>; + + struct __for_each_n_fn + { + template> _Fun> + constexpr for_each_n_result<_Iter, _Fun> + operator()(_Iter __first, iter_difference_t<_Iter> __n, + _Fun __f, _Proj __proj = {}) const + { + if constexpr (random_access_iterator<_Iter>) + { + if (__n <= 0) + return {std::move(__first), std::move(__f)}; + auto __last = __first + __n; + return ranges::for_each(std::move(__first), std::move(__last), + std::move(__f), std::move(__proj)); + } + else + { + while (__n-- > 0) + { + std::__invoke(__f, std::__invoke(__proj, *__first)); + ++__first; + } + return {std::move(__first), std::move(__f)}; + } + } + }; + + inline constexpr __for_each_n_fn for_each_n{}; + + struct __find_fn + { + template _Sent, typename _Tp, + typename _Proj = identity> + requires indirect_binary_predicate, const _Tp*> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Proj __proj = {}) const + { + while (__first != __last + && !(std::__invoke(__proj, *__first) == __value)) + ++__first; + return __first; + } + + template + requires indirect_binary_predicate, _Proj>, + const _Tp*> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, const _Tp& __value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__proj)); + } + }; + + inline constexpr __find_fn find{}; + + struct __find_if_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + while (__first != __last + && !(bool)std::__invoke(__pred, std::__invoke(__proj, *__first))) + ++__first; + return __first; + } + + template, _Proj>> + _Pred> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __find_if_fn find_if{}; + + struct __find_if_not_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + while (__first != __last + && (bool)std::__invoke(__pred, std::__invoke(__proj, *__first))) + ++__first; + return __first; + } + + template, _Proj>> + _Pred> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __find_if_not_fn find_if_not{}; + + struct __find_first_of_fn + { + template _Sent1, + forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr _Iter1 + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + for (; __first1 != __last1; ++__first1) + for (auto __iter = __first2; __iter != __last2; ++__iter) + if (std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__iter))) + return __first1; + return __first1; + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr borrowed_iterator_t<_Range1> + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __find_first_of_fn find_first_of{}; + + struct __count_fn + { + template _Sent, + typename _Tp, typename _Proj = identity> + requires indirect_binary_predicate, + const _Tp*> + constexpr iter_difference_t<_Iter> + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Proj __proj = {}) const + { + iter_difference_t<_Iter> __n = 0; + for (; __first != __last; ++__first) + if (std::__invoke(__proj, *__first) == __value) + ++__n; + return __n; + } + + template + requires indirect_binary_predicate, _Proj>, + const _Tp*> + constexpr range_difference_t<_Range> + operator()(_Range&& __r, const _Tp& __value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__proj)); + } + }; + + inline constexpr __count_fn count{}; + + struct __count_if_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr iter_difference_t<_Iter> + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + iter_difference_t<_Iter> __n = 0; + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + ++__n; + return __n; + } + + template, _Proj>> + _Pred> + constexpr range_difference_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __count_if_fn count_if{}; + + template + struct in_in_result + { + [[no_unique_address]] _Iter1 in1; + [[no_unique_address]] _Iter2 in2; + + template + requires convertible_to + && convertible_to + constexpr + operator in_in_result<_IIter1, _IIter2>() const & + { return {in1, in2}; } + + template + requires convertible_to<_Iter1, _IIter1> + && convertible_to<_Iter2, _IIter2> + constexpr + operator in_in_result<_IIter1, _IIter2>() && + { return {std::move(in1), std::move(in2)}; } + }; + + template + using mismatch_result = in_in_result<_Iter1, _Iter2>; + + struct __mismatch_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr mismatch_result<_Iter1, _Iter2> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2 + && (bool)std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + { + ++__first1; + ++__first2; + } + return { std::move(__first1), std::move(__first2) }; + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr mismatch_result, iterator_t<_Range2>> + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __mismatch_fn mismatch{}; + + struct __search_fn + { + template _Sent1, + forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr subrange<_Iter1> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + if (__first1 == __last1 || __first2 == __last2) + return {__first1, __first1}; + + for (;;) + { + for (;;) + { + if (__first1 == __last1) + return {__first1, __first1}; + if (std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + break; + ++__first1; + } + auto __cur1 = __first1; + auto __cur2 = __first2; + for (;;) + { + if (++__cur2 == __last2) + return {__first1, ++__cur1}; + if (++__cur1 == __last1) + return {__cur1, __cur1}; + if (!(bool)std::__invoke(__pred, + std::__invoke(__proj1, *__cur1), + std::__invoke(__proj2, *__cur2))) + { + ++__first1; + break; + } + } + } + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr borrowed_subrange_t<_Range1> + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __search_fn search{}; + + struct __search_n_fn + { + template _Sent, typename _Tp, + typename _Pred = ranges::equal_to, typename _Proj = identity> + requires indirectly_comparable<_Iter, const _Tp*, _Pred, _Proj> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, iter_difference_t<_Iter> __count, + const _Tp& __value, _Pred __pred = {}, _Proj __proj = {}) const + { + if (__count <= 0) + return {__first, __first}; + + auto __value_comp = [&] (_Rp&& __arg) { + return std::__invoke(__pred, std::forward<_Rp>(__arg), __value); + }; + if (__count == 1) + { + __first = ranges::find_if(std::move(__first), __last, + std::move(__value_comp), + std::move(__proj)); + if (__first == __last) + return {__first, __first}; + else + { + auto __end = __first; + return {__first, ++__end}; + } + } + + if constexpr (sized_sentinel_for<_Sent, _Iter> + && random_access_iterator<_Iter>) + { + auto __tail_size = __last - __first; + auto __remainder = __count; + + while (__remainder <= __tail_size) + { + __first += __remainder; + __tail_size -= __remainder; + auto __backtrack = __first; + while (__value_comp(std::__invoke(__proj, *--__backtrack))) + { + if (--__remainder == 0) + return {__first - __count, __first}; + } + __remainder = __count + 1 - (__first - __backtrack); + } + auto __i = __first + __tail_size; + return {__i, __i}; + } + else + { + __first = ranges::find_if(__first, __last, __value_comp, __proj); + while (__first != __last) + { + auto __n = __count; + auto __i = __first; + ++__i; + while (__i != __last && __n != 1 + && __value_comp(std::__invoke(__proj, *__i))) + { + ++__i; + --__n; + } + if (__n == 1) + return {__first, __i}; + if (__i == __last) + return {__i, __i}; + __first = ranges::find_if(++__i, __last, __value_comp, __proj); + } + return {__first, __first}; + } + } + + template + requires indirectly_comparable, const _Tp*, + _Pred, _Proj> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, range_difference_t<_Range> __count, + const _Tp& __value, _Pred __pred = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__count), __value, + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __search_n_fn search_n{}; + + struct __find_end_fn + { + template _Sent1, + forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Pred = ranges::equal_to, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2> + constexpr subrange<_Iter1> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + if constexpr (bidirectional_iterator<_Iter1> + && bidirectional_iterator<_Iter2>) + { + auto __i1 = ranges::next(__first1, __last1); + auto __i2 = ranges::next(__first2, __last2); + auto __rresult + = ranges::search(reverse_iterator<_Iter1>{__i1}, + reverse_iterator<_Iter1>{__first1}, + reverse_iterator<_Iter2>{__i2}, + reverse_iterator<_Iter2>{__first2}, + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + auto __result_first = ranges::end(__rresult).base(); + auto __result_last = ranges::begin(__rresult).base(); + if (__result_last == __first1) + return {__i1, __i1}; + else + return {__result_first, __result_last}; + } + else + { + auto __i = ranges::next(__first1, __last1); + if (__first2 == __last2) + return {__i, __i}; + + auto __result_begin = __i; + auto __result_end = __i; + for (;;) + { + auto __new_range = ranges::search(__first1, __last1, + __first2, __last2, + __pred, __proj1, __proj2); + auto __new_result_begin = ranges::begin(__new_range); + auto __new_result_end = ranges::end(__new_range); + if (__new_result_begin == __last1) + return {__result_begin, __result_end}; + else + { + __result_begin = __new_result_begin; + __result_end = __new_result_end; + __first1 = __result_begin; + ++__first1; + } + } + } + } + + template + requires indirectly_comparable, iterator_t<_Range2>, + _Pred, _Proj1, _Proj2> + constexpr borrowed_subrange_t<_Range1> + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __find_end_fn find_end{}; + + struct __adjacent_find_fn + { + template _Sent, + typename _Proj = identity, + indirect_binary_predicate, + projected<_Iter, _Proj>> _Pred + = ranges::equal_to> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred = {}, _Proj __proj = {}) const + { + if (__first == __last) + return __first; + auto __next = __first; + for (; ++__next != __last; __first = __next) + { + if (std::__invoke(__pred, + std::__invoke(__proj, *__first), + std::__invoke(__proj, *__next))) + return __first; + } + return __next; + } + + template, _Proj>, + projected, _Proj>> _Pred = ranges::equal_to> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Pred __pred = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __adjacent_find_fn adjacent_find{}; + + struct __is_permutation_fn + { + template _Sent1, + forward_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Proj1 = identity, typename _Proj2 = identity, + indirect_equivalence_relation, + projected<_Iter2, _Proj2>> _Pred + = ranges::equal_to> + constexpr bool + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + constexpr bool __sized_iters + = (sized_sentinel_for<_Sent1, _Iter1> + && sized_sentinel_for<_Sent2, _Iter2>); + if constexpr (__sized_iters) + { + auto __d1 = ranges::distance(__first1, __last1); + auto __d2 = ranges::distance(__first2, __last2); + if (__d1 != __d2) + return false; + } + + + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + if (!(bool)std::__invoke(__pred, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + break; + + if constexpr (__sized_iters) + { + if (__first1 == __last1) + return true; + } + else + { + auto __d1 = ranges::distance(__first1, __last1); + auto __d2 = ranges::distance(__first2, __last2); + if (__d1 == 0 && __d2 == 0) + return true; + if (__d1 != __d2) + return false; + } + + for (auto __scan = __first1; __scan != __last1; ++__scan) + { + auto __proj_scan = std::__invoke(__proj1, *__scan); + auto __comp_scan = [&] (_Tp&& __arg) { + return std::__invoke(__pred, __proj_scan, + std::forward<_Tp>(__arg)); + }; + if (__scan != ranges::find_if(__first1, __scan, + __comp_scan, __proj1)) + continue; + + auto __matches = ranges::count_if(__first2, __last2, + __comp_scan, __proj2); + if (__matches == 0 + || ranges::count_if(__scan, __last1, + __comp_scan, __proj1) != __matches) + return false; + } + return true; + } + + template, _Proj1>, + projected, _Proj2>> _Pred = ranges::equal_to> + constexpr bool + operator()(_Range1&& __r1, _Range2&& __r2, _Pred __pred = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__pred), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __is_permutation_fn is_permutation{}; + + template + using copy_if_result = in_out_result<_Iter, _Out>; + + struct __copy_if_fn + { + template _Sent, + weakly_incrementable _Out, typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_copyable<_Iter, _Out> + constexpr copy_if_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + { + *__result = *__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + + template, _Proj>> + _Pred> + requires indirectly_copyable, _Out> + constexpr copy_if_result, _Out> + operator()(_Range&& __r, _Out __result, + _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __copy_if_fn copy_if{}; + + template + using swap_ranges_result = in_in_result<_Iter1, _Iter2>; + + struct __swap_ranges_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2> + requires indirectly_swappable<_Iter1, _Iter2> + constexpr swap_ranges_result<_Iter1, _Iter2> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2) const + { + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2) + ranges::iter_swap(__first1, __first2); + return {std::move(__first1), std::move(__first2)}; + } + + template + requires indirectly_swappable, iterator_t<_Range2>> + constexpr swap_ranges_result, + borrowed_iterator_t<_Range2>> + operator()(_Range1&& __r1, _Range2&& __r2) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2)); + } + }; + + inline constexpr __swap_ranges_fn swap_ranges{}; + + template + using unary_transform_result = in_out_result<_Iter, _Out>; + + template + struct in_in_out_result + { + [[no_unique_address]] _Iter1 in1; + [[no_unique_address]] _Iter2 in2; + [[no_unique_address]] _Out out; + + template + requires convertible_to + && convertible_to + && convertible_to + constexpr + operator in_in_out_result<_IIter1, _IIter2, _OOut>() const & + { return {in1, in2, out}; } + + template + requires convertible_to<_Iter1, _IIter1> + && convertible_to<_Iter2, _IIter2> + && convertible_to<_Out, _OOut> + constexpr + operator in_in_out_result<_IIter1, _IIter2, _OOut>() && + { return {std::move(in1), std::move(in2), std::move(out)}; } + }; + + template + using binary_transform_result = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __transform_fn + { + template _Sent, + weakly_incrementable _Out, + copy_constructible _Fp, typename _Proj = identity> + requires indirectly_writable<_Out, + indirect_result_t<_Fp&, + projected<_Iter, _Proj>>> + constexpr unary_transform_result<_Iter, _Out> + operator()(_Iter __first1, _Sent __last1, _Out __result, + _Fp __op, _Proj __proj = {}) const + { + for (; __first1 != __last1; ++__first1, (void)++__result) + *__result = std::__invoke(__op, std::__invoke(__proj, *__first1)); + return {std::move(__first1), std::move(__result)}; + } + + template + requires indirectly_writable<_Out, + indirect_result_t<_Fp&, + projected, _Proj>>> + constexpr unary_transform_result, _Out> + operator()(_Range&& __r, _Out __result, _Fp __op, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), + std::move(__op), std::move(__proj)); + } + + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, copy_constructible _Fp, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_writable<_Out, + indirect_result_t<_Fp&, + projected<_Iter1, _Proj1>, + projected<_Iter2, _Proj2>>> + constexpr binary_transform_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Out __result, _Fp __binary_op, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void)++__first2, ++__result) + *__result = std::__invoke(__binary_op, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2)); + return {std::move(__first1), std::move(__first2), std::move(__result)}; + } + + template + requires indirectly_writable<_Out, + indirect_result_t<_Fp&, + projected, _Proj1>, + projected, _Proj2>>> + constexpr binary_transform_result, + borrowed_iterator_t<_Range2>, _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, _Fp __binary_op, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__binary_op), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __transform_fn transform{}; + + struct __replace_fn + { + template _Sent, + typename _Tp1, typename _Tp2, typename _Proj = identity> + requires indirectly_writable<_Iter, const _Tp2&> + && indirect_binary_predicate, + const _Tp1*> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + const _Tp1& __old_value, const _Tp2& __new_value, + _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__proj, *__first) == __old_value) + *__first = __new_value; + return __first; + } + + template + requires indirectly_writable, const _Tp2&> + && indirect_binary_predicate, _Proj>, + const _Tp1*> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, + const _Tp1& __old_value, const _Tp2& __new_value, + _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __old_value, __new_value, std::move(__proj)); + } + }; + + inline constexpr __replace_fn replace{}; + + struct __replace_if_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_writable<_Iter, const _Tp&> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred, const _Tp& __new_value, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + *__first = __new_value; + return std::move(__first); + } + + template, _Proj>> + _Pred> + requires indirectly_writable, const _Tp&> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, + _Pred __pred, const _Tp& __new_value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), __new_value, std::move(__proj)); + } + }; + + inline constexpr __replace_if_fn replace_if{}; + + template + using replace_copy_result = in_out_result<_Iter, _Out>; + + struct __replace_copy_fn + { + template _Sent, + typename _Tp1, typename _Tp2, output_iterator _Out, + typename _Proj = identity> + requires indirectly_copyable<_Iter, _Out> + && indirect_binary_predicate, const _Tp1*> + constexpr replace_copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + const _Tp1& __old_value, const _Tp2& __new_value, + _Proj __proj = {}) const + { + for (; __first != __last; ++__first, (void)++__result) + if (std::__invoke(__proj, *__first) == __old_value) + *__result = __new_value; + else + *__result = *__first; + return {std::move(__first), std::move(__result)}; + } + + template _Out, typename _Proj = identity> + requires indirectly_copyable, _Out> + && indirect_binary_predicate, _Proj>, + const _Tp1*> + constexpr replace_copy_result, _Out> + operator()(_Range&& __r, _Out __result, + const _Tp1& __old_value, const _Tp2& __new_value, + _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), __old_value, + __new_value, std::move(__proj)); + } + }; + + inline constexpr __replace_copy_fn replace_copy{}; + + template + using replace_copy_if_result = in_out_result<_Iter, _Out>; + + struct __replace_copy_if_fn + { + template _Sent, + typename _Tp, output_iterator _Out, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_copyable<_Iter, _Out> + constexpr replace_copy_if_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + _Pred __pred, const _Tp& __new_value, _Proj __proj = {}) const + { + for (; __first != __last; ++__first, (void)++__result) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + *__result = __new_value; + else + *__result = *__first; + return {std::move(__first), std::move(__result)}; + } + + template _Out, + typename _Proj = identity, + indirect_unary_predicate, _Proj>> + _Pred> + requires indirectly_copyable, _Out> + constexpr replace_copy_if_result, _Out> + operator()(_Range&& __r, _Out __result, + _Pred __pred, const _Tp& __new_value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), std::move(__pred), + __new_value, std::move(__proj)); + } + }; + + inline constexpr __replace_copy_if_fn replace_copy_if{}; + + struct __generate_n_fn + { + template + requires invocable<_Fp&> + && indirectly_writable<_Out, invoke_result_t<_Fp&>> + constexpr _Out + operator()(_Out __first, iter_difference_t<_Out> __n, _Fp __gen) const + { + for (; __n > 0; --__n, (void)++__first) + *__first = std::__invoke(__gen); + return __first; + } + }; + + inline constexpr __generate_n_fn generate_n{}; + + struct __generate_fn + { + template _Sent, + copy_constructible _Fp> + requires invocable<_Fp&> + && indirectly_writable<_Out, invoke_result_t<_Fp&>> + constexpr _Out + operator()(_Out __first, _Sent __last, _Fp __gen) const + { + for (; __first != __last; ++__first) + *__first = std::__invoke(__gen); + return __first; + } + + template + requires invocable<_Fp&> && output_range<_Range, invoke_result_t<_Fp&>> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Fp __gen) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), std::move(__gen)); + } + }; + + inline constexpr __generate_fn generate{}; + + struct __remove_if_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + __first = ranges::find_if(__first, __last, __pred, __proj); + if (__first == __last) + return {__first, __first}; + + auto __result = __first; + ++__first; + for (; __first != __last; ++__first) + if (!std::__invoke(__pred, std::__invoke(__proj, *__first))) + { + *__result = std::move(*__first); + ++__result; + } + + return {__result, __first}; + } + + template, _Proj>> + _Pred> + requires permutable> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __remove_if_fn remove_if{}; + + struct __remove_fn + { + template _Sent, + typename _Tp, typename _Proj = identity> + requires indirect_binary_predicate, + const _Tp*> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Proj __proj = {}) const + { + auto __pred = [&] (auto&& __arg) { + return std::forward(__arg) == __value; + }; + return ranges::remove_if(__first, __last, + std::move(__pred), std::move(__proj)); + } + + template + requires permutable> + && indirect_binary_predicate, _Proj>, + const _Tp*> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, const _Tp& __value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__proj)); + } + }; + + inline constexpr __remove_fn remove{}; + + template + using remove_copy_if_result = in_out_result<_Iter, _Out>; + + struct __remove_copy_if_fn + { + template _Sent, + weakly_incrementable _Out, typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_copyable<_Iter, _Out> + constexpr remove_copy_if_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (!std::__invoke(__pred, std::__invoke(__proj, *__first))) + { + *__result = *__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + + template, _Proj>> + _Pred> + requires indirectly_copyable, _Out> + constexpr remove_copy_if_result, _Out> + operator()(_Range&& __r, _Out __result, + _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __remove_copy_if_fn remove_copy_if{}; + + template + using remove_copy_result = in_out_result<_Iter, _Out>; + + struct __remove_copy_fn + { + template _Sent, + weakly_incrementable _Out, typename _Tp, typename _Proj = identity> + requires indirectly_copyable<_Iter, _Out> + && indirect_binary_predicate, + const _Tp*> + constexpr remove_copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + const _Tp& __value, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (!(std::__invoke(__proj, *__first) == __value)) + { + *__result = *__first; + ++__result; + } + return {std::move(__first), std::move(__result)}; + } + + template + requires indirectly_copyable, _Out> + && indirect_binary_predicate, _Proj>, + const _Tp*> + constexpr remove_copy_result, _Out> + operator()(_Range&& __r, _Out __result, + const _Tp& __value, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), __value, std::move(__proj)); + } + }; + + inline constexpr __remove_copy_fn remove_copy{}; + + struct __unique_fn + { + template _Sent, + typename _Proj = identity, + indirect_equivalence_relation< + projected<_Iter, _Proj>> _Comp = ranges::equal_to> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + __first = ranges::adjacent_find(__first, __last, __comp, __proj); + if (__first == __last) + return {__first, __first}; + + auto __dest = __first; + ++__first; + while (++__first != __last) + if (!std::__invoke(__comp, + std::__invoke(__proj, *__dest), + std::__invoke(__proj, *__first))) + *++__dest = std::move(*__first); + return {++__dest, __first}; + } + + template, _Proj>> _Comp = ranges::equal_to> + requires permutable> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __unique_fn unique{}; + + namespace __detail + { + template + concept __can_reread_output = input_iterator<_Out> + && same_as<_Tp, iter_value_t<_Out>>; + } + + template + using unique_copy_result = in_out_result<_Iter, _Out>; + + struct __unique_copy_fn + { + template _Sent, + weakly_incrementable _Out, typename _Proj = identity, + indirect_equivalence_relation< + projected<_Iter, _Proj>> _Comp = ranges::equal_to> + requires indirectly_copyable<_Iter, _Out> + && (forward_iterator<_Iter> + || __detail::__can_reread_output<_Out, iter_value_t<_Iter>> + || indirectly_copyable_storable<_Iter, _Out>) + constexpr unique_copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return {std::move(__first), std::move(__result)}; + + + if constexpr (forward_iterator<_Iter>) + { + auto __next = __first; + *__result = *__next; + while (++__next != __last) + if (!std::__invoke(__comp, + std::__invoke(__proj, *__first), + std::__invoke(__proj, *__next))) + { + __first = __next; + *++__result = *__first; + } + return {__next, std::move(++__result)}; + } + else if constexpr (__detail::__can_reread_output<_Out, iter_value_t<_Iter>>) + { + *__result = *__first; + while (++__first != __last) + if (!std::__invoke(__comp, + std::__invoke(__proj, *__result), + std::__invoke(__proj, *__first))) + *++__result = *__first; + return {std::move(__first), std::move(++__result)}; + } + else + { + auto __value = *__first; + *__result = __value; + while (++__first != __last) + { + if (!(bool)std::__invoke(__comp, + std::__invoke(__proj, *__first), + std::__invoke(__proj, __value))) + { + __value = *__first; + *++__result = __value; + } + } + return {std::move(__first), std::move(++__result)}; + } + } + + template, _Proj>> _Comp = ranges::equal_to> + requires indirectly_copyable, _Out> + && (forward_iterator> + || __detail::__can_reread_output<_Out, range_value_t<_Range>> + || indirectly_copyable_storable, _Out>) + constexpr unique_copy_result, _Out> + operator()(_Range&& __r, _Out __result, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __unique_copy_fn unique_copy{}; + + struct __reverse_fn + { + template _Sent> + requires permutable<_Iter> + constexpr _Iter + operator()(_Iter __first, _Sent __last) const + { + auto __i = ranges::next(__first, __last); + auto __tail = __i; + + if constexpr (random_access_iterator<_Iter>) + { + if (__first != __last) + { + --__tail; + while (__first < __tail) + { + ranges::iter_swap(__first, __tail); + ++__first; + --__tail; + } + } + return __i; + } + else + { + for (;;) + if (__first == __tail || __first == --__tail) + break; + else + { + ranges::iter_swap(__first, __tail); + ++__first; + } + return __i; + } + } + + template + requires permutable> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r) const + { + return (*this)(ranges::begin(__r), ranges::end(__r)); + } + }; + + inline constexpr __reverse_fn reverse{}; + + template + using reverse_copy_result = in_out_result<_Iter, _Out>; + + struct __reverse_copy_fn + { + template _Sent, + weakly_incrementable _Out> + requires indirectly_copyable<_Iter, _Out> + constexpr reverse_copy_result<_Iter, _Out> + operator()(_Iter __first, _Sent __last, _Out __result) const + { + auto __i = ranges::next(__first, __last); + auto __tail = __i; + while (__first != __tail) + { + --__tail; + *__result = *__tail; + ++__result; + } + return {__i, __result}; + } + + template + requires indirectly_copyable, _Out> + constexpr reverse_copy_result, _Out> + operator()(_Range&& __r, _Out __result) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__result)); + } + }; + + inline constexpr __reverse_copy_fn reverse_copy{}; + + struct __rotate_fn + { + template _Sent> + constexpr subrange<_Iter> + operator()(_Iter __first, _Iter __middle, _Sent __last) const + { + auto __lasti = ranges::next(__first, __last); + if (__first == __middle) + return {__lasti, __lasti}; + if (__last == __middle) + return {std::move(__first), std::move(__lasti)}; + + if constexpr (random_access_iterator<_Iter>) + { + auto __n = __lasti - __first; + auto __k = __middle - __first; + + if (__k == __n - __k) + { + ranges::swap_ranges(__first, __middle, __middle, __middle + __k); + return {std::move(__middle), std::move(__lasti)}; + } + + auto __p = __first; + auto __ret = __first + (__lasti - __middle); + + for (;;) + { + if (__k < __n - __k) + { + + + if constexpr (__is_pod(iter_value_t<_Iter>)) + if (__k == 1) + { + auto __t = std::move(*__p); + ranges::move(__p + 1, __p + __n, __p); + *(__p + __n - 1) = std::move(__t); + return {std::move(__ret), std::move(__lasti)}; + } + auto __q = __p + __k; + for (decltype(__n) __i = 0; __i < __n - __k; ++ __i) + { + ranges::iter_swap(__p, __q); + ++__p; + ++__q; + } + __n %= __k; + if (__n == 0) + return {std::move(__ret), std::move(__lasti)}; + ranges::swap(__n, __k); + __k = __n - __k; + } + else + { + __k = __n - __k; + + + if constexpr (__is_pod(iter_value_t<_Iter>)) + if (__k == 1) + { + auto __t = std::move(*(__p + __n - 1)); + ranges::move_backward(__p, __p + __n - 1, __p + __n); + *__p = std::move(__t); + return {std::move(__ret), std::move(__lasti)}; + } + auto __q = __p + __n; + __p = __q - __k; + for (decltype(__n) __i = 0; __i < __n - __k; ++ __i) + { + --__p; + --__q; + ranges::iter_swap(__p, __q); + } + __n %= __k; + if (__n == 0) + return {std::move(__ret), std::move(__lasti)}; + std::swap(__n, __k); + } + } + } + else if constexpr (bidirectional_iterator<_Iter>) + { + auto __tail = __lasti; + + ranges::reverse(__first, __middle); + ranges::reverse(__middle, __tail); + + while (__first != __middle && __middle != __tail) + { + ranges::iter_swap(__first, --__tail); + ++__first; + } + + if (__first == __middle) + { + ranges::reverse(__middle, __tail); + return {std::move(__tail), std::move(__lasti)}; + } + else + { + ranges::reverse(__first, __middle); + return {std::move(__first), std::move(__lasti)}; + } + } + else + { + auto __first2 = __middle; + do + { + ranges::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } while (__first2 != __last); + + auto __ret = __first; + + __first2 = __middle; + + while (__first2 != __last) + { + ranges::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + return {std::move(__ret), std::move(__lasti)}; + } + } + + template + requires permutable> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, iterator_t<_Range> __middle) const + { + return (*this)(ranges::begin(__r), std::move(__middle), + ranges::end(__r)); + } + }; + + inline constexpr __rotate_fn rotate{}; + + template + using rotate_copy_result = in_out_result<_Iter, _Out>; + + struct __rotate_copy_fn + { + template _Sent, + weakly_incrementable _Out> + requires indirectly_copyable<_Iter, _Out> + constexpr rotate_copy_result<_Iter, _Out> + operator()(_Iter __first, _Iter __middle, _Sent __last, + _Out __result) const + { + auto __copy1 = ranges::copy(__middle, + std::move(__last), + std::move(__result)); + auto __copy2 = ranges::copy(std::move(__first), + std::move(__middle), + std::move(__copy1.out)); + return { std::move(__copy1.in), std::move(__copy2.out) }; + } + + template + requires indirectly_copyable, _Out> + constexpr rotate_copy_result, _Out> + operator()(_Range&& __r, iterator_t<_Range> __middle, _Out __result) const + { + return (*this)(ranges::begin(__r), std::move(__middle), + ranges::end(__r), std::move(__result)); + } + }; + + inline constexpr __rotate_copy_fn rotate_copy{}; + + struct __sample_fn + { + template _Sent, + weakly_incrementable _Out, typename _Gen> + requires (forward_iterator<_Iter> || random_access_iterator<_Out>) + && indirectly_copyable<_Iter, _Out> + && uniform_random_bit_generator> + _Out + operator()(_Iter __first, _Sent __last, _Out __out, + iter_difference_t<_Iter> __n, _Gen&& __g) const + { + if constexpr (forward_iterator<_Iter>) + { + + + auto __lasti = ranges::next(__first, __last); + return std:: + sample(std::move(__first), std::move(__lasti), std::move(__out), + __n, std::forward<_Gen>(__g)); + } + else + { + using __distrib_type + = uniform_int_distribution>; + using __param_type = typename __distrib_type::param_type; + __distrib_type __d{}; + iter_difference_t<_Iter> __sample_sz = 0; + while (__first != __last && __sample_sz != __n) + { + __out[__sample_sz++] = *__first; + ++__first; + } + for (auto __pop_sz = __sample_sz; __first != __last; + ++__first, (void) ++__pop_sz) + { + const auto __k = __d(__g, __param_type{0, __pop_sz}); + if (__k < __n) + __out[__k] = *__first; + } + return __out + __sample_sz; + } + } + + template + requires (forward_range<_Range> || random_access_iterator<_Out>) + && indirectly_copyable, _Out> + && uniform_random_bit_generator> + _Out + operator()(_Range&& __r, _Out __out, + range_difference_t<_Range> __n, _Gen&& __g) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__out), __n, + std::forward<_Gen>(__g)); + } + }; + + inline constexpr __sample_fn sample{}; + + + struct __shuffle_fn + { + template _Sent, + typename _Gen> + requires permutable<_Iter> + && uniform_random_bit_generator> + _Iter + operator()(_Iter __first, _Sent __last, _Gen&& __g) const + { + auto __lasti = ranges::next(__first, __last); + std::shuffle(std::move(__first), __lasti, std::forward<_Gen>(__g)); + return __lasti; + } + + template + requires permutable> + && uniform_random_bit_generator> + borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Gen&& __g) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::forward<_Gen>(__g)); + } + }; + + inline constexpr __shuffle_fn shuffle{}; + + + struct __push_heap_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::push_heap(__first, __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __push_heap_fn push_heap{}; + + struct __pop_heap_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::pop_heap(__first, __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __pop_heap_fn pop_heap{}; + + struct __make_heap_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::make_heap(__first, __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __make_heap_fn make_heap{}; + + struct __sort_heap_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::sort_heap(__first, __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __sort_heap_fn sort_heap{}; + + struct __is_heap_until_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + iter_difference_t<_Iter> __n = ranges::distance(__first, __last); + iter_difference_t<_Iter> __parent = 0, __child = 1; + for (; __child < __n; ++__child) + if (std::__invoke(__comp, + std::__invoke(__proj, *(__first + __parent)), + std::__invoke(__proj, *(__first + __child)))) + return __first + __child; + else if ((__child & 1) == 0) + ++__parent; + + return __first + __n; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __is_heap_until_fn is_heap_until{}; + + struct __is_heap_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (__last + == ranges::is_heap_until(__first, __last, + std::move(__comp), + std::move(__proj))); + } + + template, _Proj>> + _Comp = ranges::less> + constexpr bool + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __is_heap_fn is_heap{}; + + struct __sort_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::sort(std::move(__first), __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __sort_fn sort{}; + + struct __stable_sort_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::stable_sort(std::move(__first), __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __stable_sort_fn stable_sort{}; + + struct __partial_sort_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Iter __middle, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __middle) + return ranges::next(__first, __last); + + ranges::make_heap(__first, __middle, __comp, __proj); + auto __i = __middle; + for (; __i != __last; ++__i) + if (std::__invoke(__comp, + std::__invoke(__proj, *__i), + std::__invoke(__proj, *__first))) + { + ranges::pop_heap(__first, __middle, __comp, __proj); + ranges::iter_swap(__middle-1, __i); + ranges::push_heap(__first, __middle, __comp, __proj); + } + ranges::sort_heap(__first, __middle, __comp, __proj); + + return __i; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, iterator_t<_Range> __middle, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), std::move(__middle), + ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __partial_sort_fn partial_sort{}; + + template + using partial_sort_copy_result = in_out_result<_Iter, _Out>; + + struct __partial_sort_copy_fn + { + template _Sent1, + random_access_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires indirectly_copyable<_Iter1, _Iter2> + && sortable<_Iter2, _Comp, _Proj2> + && indirect_strict_weak_order<_Comp, + projected<_Iter1, _Proj1>, + projected<_Iter2, _Proj2>> + constexpr partial_sort_copy_result<_Iter1, _Iter2> + operator()(_Iter1 __first, _Sent1 __last, + _Iter2 __result_first, _Sent2 __result_last, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + if (__result_first == __result_last) + { + + auto __lasti = ranges::next(std::move(__first), + std::move(__last)); + return {std::move(__lasti), std::move(__result_first)}; + } + + auto __result_real_last = __result_first; + while (__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + + ranges::make_heap(__result_first, __result_real_last, __comp, __proj2); + for (; __first != __last; ++__first) + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first), + std::__invoke(__proj2, *__result_first))) + { + ranges::pop_heap(__result_first, __result_real_last, + __comp, __proj2); + *(__result_real_last-1) = *__first; + ranges::push_heap(__result_first, __result_real_last, + __comp, __proj2); + } + ranges::sort_heap(__result_first, __result_real_last, __comp, __proj2); + + return {std::move(__first), std::move(__result_real_last)}; + } + + template + requires indirectly_copyable, iterator_t<_Range2>> + && sortable, _Comp, _Proj2> + && indirect_strict_weak_order<_Comp, + projected, _Proj1>, + projected, _Proj2>> + constexpr partial_sort_copy_result, + borrowed_iterator_t<_Range2>> + operator()(_Range1&& __r, _Range2&& __out, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + ranges::begin(__out), ranges::end(__out), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __partial_sort_copy_fn partial_sort_copy{}; + + struct __is_sorted_until_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return __first; + + auto __next = __first; + for (++__next; __next != __last; __first = __next, (void)++__next) + if (std::__invoke(__comp, + std::__invoke(__proj, *__next), + std::__invoke(__proj, *__first))) + return __next; + return __next; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __is_sorted_until_fn is_sorted_until{}; + + struct __is_sorted_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return true; + + auto __next = __first; + for (++__next; __next != __last; __first = __next, (void)++__next) + if (std::__invoke(__comp, + std::__invoke(__proj, *__next), + std::__invoke(__proj, *__first))) + return false; + return true; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr bool + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __is_sorted_fn is_sorted{}; + + struct __nth_element_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr _Iter + operator()(_Iter __first, _Iter __nth, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::nth_element(std::move(__first), std::move(__nth), + __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, iterator_t<_Range> __nth, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), std::move(__nth), + ranges::end(__r), std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __nth_element_fn nth_element{}; + + struct __lower_bound_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __len = ranges::distance(__first, __last); + + while (__len > 0) + { + auto __half = __len / 2; + auto __middle = __first; + ranges::advance(__middle, __half); + if (std::__invoke(__comp, std::__invoke(__proj, *__middle), __value)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __lower_bound_fn lower_bound{}; + + struct __upper_bound_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __len = ranges::distance(__first, __last); + + while (__len > 0) + { + auto __half = __len / 2; + auto __middle = __first; + ranges::advance(__middle, __half); + if (std::__invoke(__comp, __value, std::__invoke(__proj, *__middle))) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __upper_bound_fn upper_bound{}; + + struct __equal_range_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __len = ranges::distance(__first, __last); + + while (__len > 0) + { + auto __half = __len / 2; + auto __middle = __first; + ranges::advance(__middle, __half); + if (std::__invoke(__comp, + std::__invoke(__proj, *__middle), + __value)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (std::__invoke(__comp, + __value, + std::__invoke(__proj, *__middle))) + __len = __half; + else + { + auto __left + = ranges::lower_bound(__first, __middle, + __value, __comp, __proj); + ranges::advance(__first, __len); + auto __right + = ranges::upper_bound(++__middle, __first, + __value, __comp, __proj); + return {__left, __right}; + } + } + return {__first, __first}; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, const _Tp& __value, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __equal_range_fn equal_range{}; + + struct __binary_search_fn + { + template _Sent, + typename _Tp, typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr bool + operator()(_Iter __first, _Sent __last, + const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __i = ranges::lower_bound(__first, __last, __value, __comp, __proj); + if (__i == __last) + return false; + return !(bool)std::__invoke(__comp, __value, + std::__invoke(__proj, *__i)); + } + + template, _Proj>> + _Comp = ranges::less> + constexpr bool + operator()(_Range&& __r, const _Tp& __value, _Comp __comp = {}, + _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + __value, std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __binary_search_fn binary_search{}; + + struct __is_partitioned_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr bool + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + __first = ranges::find_if_not(std::move(__first), __last, + __pred, __proj); + if (__first == __last) + return true; + ++__first; + return ranges::none_of(std::move(__first), std::move(__last), + std::move(__pred), std::move(__proj)); + } + + template, _Proj>> + _Pred> + constexpr bool + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __is_partitioned_fn is_partitioned{}; + + struct __partition_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr subrange<_Iter> + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + if constexpr (bidirectional_iterator<_Iter>) + { + auto __lasti = ranges::next(__first, __last); + auto __tail = __lasti; + for (;;) + { + for (;;) + if (__first == __tail) + return {std::move(__first), std::move(__lasti)}; + else if (std::__invoke(__pred, + std::__invoke(__proj, *__first))) + ++__first; + else + break; + --__tail; + for (;;) + if (__first == __tail) + return {std::move(__first), std::move(__lasti)}; + else if (!(bool)std::__invoke(__pred, + std::__invoke(__proj, *__tail))) + --__tail; + else + break; + ranges::iter_swap(__first, __tail); + ++__first; + } + } + else + { + if (__first == __last) + return {std::move(__first), std::move(__first)}; + + while (std::__invoke(__pred, std::__invoke(__proj, *__first))) + if (++__first == __last) + return {std::move(__first), std::move(__first)}; + + auto __next = __first; + while (++__next != __last) + if (std::__invoke(__pred, std::__invoke(__proj, *__next))) + { + ranges::iter_swap(__first, __next); + ++__first; + } + + return {std::move(__first), std::move(__next)}; + } + } + + template, _Proj>> + _Pred> + requires permutable> + constexpr borrowed_subrange_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __partition_fn partition{}; + + struct __stable_partition_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires permutable<_Iter> + subrange<_Iter> + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + auto __middle + = std::stable_partition(std::move(__first), __lasti, + __detail::__make_pred_proj(__pred, __proj)); + return {std::move(__middle), std::move(__lasti)}; + } + + template, _Proj>> + _Pred> + requires permutable> + borrowed_subrange_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __stable_partition_fn stable_partition{}; + + template + struct in_out_out_result + { + [[no_unique_address]] _Iter in; + [[no_unique_address]] _Out1 out1; + [[no_unique_address]] _Out2 out2; + + template + requires convertible_to + && convertible_to + && convertible_to + constexpr + operator in_out_out_result<_IIter, _OOut1, _OOut2>() const & + { return {in, out1, out2}; } + + template + requires convertible_to<_Iter, _IIter> + && convertible_to<_Out1, _OOut1> + && convertible_to<_Out2, _OOut2> + constexpr + operator in_out_out_result<_IIter, _OOut1, _OOut2>() && + { return {std::move(in), std::move(out1), std::move(out2)}; } + }; + + template + using partition_copy_result = in_out_out_result<_Iter, _Out1, _Out2>; + + struct __partition_copy_fn + { + template _Sent, + weakly_incrementable _Out1, weakly_incrementable _O2, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + requires indirectly_copyable<_Iter, _Out1> + && indirectly_copyable<_Iter, _O2> + constexpr partition_copy_result<_Iter, _Out1, _O2> + operator()(_Iter __first, _Sent __last, + _Out1 __out_true, _O2 __out_false, + _Pred __pred, _Proj __proj = {}) const + { + for (; __first != __last; ++__first) + if (std::__invoke(__pred, std::__invoke(__proj, *__first))) + { + *__out_true = *__first; + ++__out_true; + } + else + { + *__out_false = *__first; + ++__out_false; + } + + return {std::move(__first), + std::move(__out_true), std::move(__out_false)}; + } + + template, _Proj>> + _Pred> + requires indirectly_copyable, _Out1> + && indirectly_copyable, _O2> + constexpr partition_copy_result, _Out1, _O2> + operator()(_Range&& __r, _Out1 out_true, _O2 out_false, + _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(out_true), std::move(out_false), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __partition_copy_fn partition_copy{}; + + struct __partition_point_fn + { + template _Sent, + typename _Proj = identity, + indirect_unary_predicate> _Pred> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Pred __pred, _Proj __proj = {}) const + { + auto __len = ranges::distance(__first, __last); + + while (__len > 0) + { + auto __half = __len / 2; + auto __middle = __first; + ranges::advance(__middle, __half); + if (std::__invoke(__pred, std::__invoke(__proj, *__middle))) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + template, _Proj>> + _Pred> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__pred), std::move(__proj)); + } + }; + + inline constexpr __partition_point_fn partition_point{}; + + template + using merge_result = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __merge_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr merge_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + { + if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + auto __copy1 = ranges::copy(std::move(__first1), std::move(__last1), + std::move(__result)); + auto __copy2 = ranges::copy(std::move(__first2), std::move(__last2), + std::move(__copy1.out)); + return { std::move(__copy1.in), std::move(__copy2.in), + std::move(__copy2.out) }; + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr merge_result, + borrowed_iterator_t<_Range2>, + _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __merge_fn merge{}; + + struct __inplace_merge_fn + { + template _Sent, + typename _Comp = ranges::less, + typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + _Iter + operator()(_Iter __first, _Iter __middle, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __lasti = ranges::next(__first, __last); + std::inplace_merge(std::move(__first), std::move(__middle), __lasti, + __detail::__make_comp_proj(__comp, __proj)); + return __lasti; + } + + template + requires sortable, _Comp, _Proj> + borrowed_iterator_t<_Range> + operator()(_Range&& __r, iterator_t<_Range> __middle, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), std::move(__middle), + ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __inplace_merge_fn inplace_merge{}; + + struct __includes_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Proj1 = identity, typename _Proj2 = identity, + indirect_strict_weak_order, + projected<_Iter2, _Proj2>> + _Comp = ranges::less> + constexpr bool + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + return false; + else if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + ++__first1; + else + { + ++__first1; + ++__first2; + } + + return __first2 == __last2; + } + + template, _Proj1>, + projected, _Proj2>> + _Comp = ranges::less> + constexpr bool + operator()(_Range1&& __r1, _Range2&& __r2, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __includes_fn includes{}; + + template + using set_union_result = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __set_union_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr set_union_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Out __result, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + { + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + { + *__result = *__first1; + ++__first1; + } + else if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + auto __copy1 = ranges::copy(std::move(__first1), std::move(__last1), + std::move(__result)); + auto __copy2 = ranges::copy(std::move(__first2), std::move(__last2), + std::move(__copy1.out)); + return {std::move(__copy1.in), std::move(__copy2.in), + std::move(__copy2.out)}; + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr set_union_result, + borrowed_iterator_t<_Range2>, _Out> + operator()(_Range1&& __r1, _Range2&& __r2, + _Out __result, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __set_union_fn set_union{}; + + template + using set_intersection_result = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __set_intersection_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr set_intersection_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + ++__first1; + else if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + + auto __last1i = ranges::next(std::move(__first1), std::move(__last1)); + auto __last2i = ranges::next(std::move(__first2), std::move(__last2)); + return {std::move(__last1i), std::move(__last2i), std::move(__result)}; + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr set_intersection_result, + borrowed_iterator_t<_Range2>, _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __set_intersection_fn set_intersection{}; + + template + using set_difference_result = in_out_result<_Iter, _Out>; + + struct __set_difference_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr set_difference_result<_Iter1, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return ranges::copy(std::move(__first1), std::move(__last1), + std::move(__result)); + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr set_difference_result, _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __set_difference_fn set_difference{}; + + template + using set_symmetric_difference_result + = in_in_out_result<_Iter1, _Iter2, _Out>; + + struct __set_symmetric_difference_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + weakly_incrementable _Out, typename _Comp = ranges::less, + typename _Proj1 = identity, typename _Proj2 = identity> + requires mergeable<_Iter1, _Iter2, _Out, _Comp, _Proj1, _Proj2> + constexpr set_symmetric_difference_result<_Iter1, _Iter2, _Out> + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Out __result, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + while (__first1 != __last1 && __first2 != __last2) + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + auto __copy1 = ranges::copy(std::move(__first1), std::move(__last1), + std::move(__result)); + auto __copy2 = ranges::copy(std::move(__first2), std::move(__last2), + std::move(__copy1.out)); + return {std::move(__copy1.in), std::move(__copy2.in), + std::move(__copy2.out)}; + } + + template + requires mergeable, iterator_t<_Range2>, _Out, + _Comp, _Proj1, _Proj2> + constexpr set_symmetric_difference_result, + borrowed_iterator_t<_Range2>, + _Out> + operator()(_Range1&& __r1, _Range2&& __r2, _Out __result, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__result), std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + }; + + inline constexpr __set_symmetric_difference_fn set_symmetric_difference{}; + + struct __min_fn + { + template> + _Comp = ranges::less> + constexpr const _Tp& + operator()(const _Tp& __a, const _Tp& __b, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (std::__invoke(std::move(__comp), + std::__invoke(__proj, __b), + std::__invoke(__proj, __a))) + return __b; + else + return __a; + } + + template, _Proj>> + _Comp = ranges::less> + requires indirectly_copyable_storable, + range_value_t<_Range>*> + constexpr range_value_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __first = ranges::begin(__r); + auto __last = ranges::end(__r); + do { if (__builtin_is_constant_evaluated() && !bool(__first != __last)) __builtin_unreachable(); } while (false); + auto __result = *__first; + while (++__first != __last) + { + auto __tmp = *__first; + if (std::__invoke(__comp, + std::__invoke(__proj, __tmp), + std::__invoke(__proj, __result))) + __result = std::move(__tmp); + } + return __result; + } + + template> + _Comp = ranges::less> + constexpr _Tp + operator()(initializer_list<_Tp> __r, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::subrange(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __min_fn min{}; + + struct __max_fn + { + template> + _Comp = ranges::less> + constexpr const _Tp& + operator()(const _Tp& __a, const _Tp& __b, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (std::__invoke(std::move(__comp), + std::__invoke(__proj, __a), + std::__invoke(__proj, __b))) + return __b; + else + return __a; + } + + template, _Proj>> + _Comp = ranges::less> + requires indirectly_copyable_storable, + range_value_t<_Range>*> + constexpr range_value_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __first = ranges::begin(__r); + auto __last = ranges::end(__r); + do { if (__builtin_is_constant_evaluated() && !bool(__first != __last)) __builtin_unreachable(); } while (false); + auto __result = *__first; + while (++__first != __last) + { + auto __tmp = *__first; + if (std::__invoke(__comp, + std::__invoke(__proj, __result), + std::__invoke(__proj, __tmp))) + __result = std::move(__tmp); + } + return __result; + } + + template> + _Comp = ranges::less> + constexpr _Tp + operator()(initializer_list<_Tp> __r, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::subrange(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __max_fn max{}; + + struct __clamp_fn + { + template> _Comp + = ranges::less> + constexpr const _Tp& + operator()(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, + _Comp __comp = {}, _Proj __proj = {}) const + { + do { if (__builtin_is_constant_evaluated() && !bool(!(std::__invoke(__comp, std::__invoke(__proj, __hi), std::__invoke(__proj, __lo))))) __builtin_unreachable(); } while (false) + + ; + auto&& __proj_val = std::__invoke(__proj, __val); + if (std::__invoke(__comp, __proj_val, std::__invoke(__proj, __lo))) + return __lo; + else if (std::__invoke(__comp, std::__invoke(__proj, __hi), __proj_val)) + return __hi; + else + return __val; + } + }; + + inline constexpr __clamp_fn clamp{}; + + template + struct min_max_result + { + [[no_unique_address]] _Tp min; + [[no_unique_address]] _Tp max; + + template + requires convertible_to + constexpr + operator min_max_result<_Tp2>() const & + { return {min, max}; } + + template + requires convertible_to<_Tp, _Tp2> + constexpr + operator min_max_result<_Tp2>() && + { return {std::move(min), std::move(max)}; } + }; + + template + using minmax_result = min_max_result<_Tp>; + + struct __minmax_fn + { + template> + _Comp = ranges::less> + constexpr minmax_result + operator()(const _Tp& __a, const _Tp& __b, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (std::__invoke(std::move(__comp), + std::__invoke(__proj, __b), + std::__invoke(__proj, __a))) + return {__b, __a}; + else + return {__a, __b}; + } + + template, _Proj>> + _Comp = ranges::less> + requires indirectly_copyable_storable, range_value_t<_Range>*> + constexpr minmax_result> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + auto __first = ranges::begin(__r); + auto __last = ranges::end(__r); + do { if (__builtin_is_constant_evaluated() && !bool(__first != __last)) __builtin_unreachable(); } while (false); + auto __comp_proj = __detail::__make_comp_proj(__comp, __proj); + minmax_result> __result = {*__first, *__first}; + if (++__first == __last) + return __result; + else + { + + + auto&& __val = *__first; + if (__comp_proj(__val, __result.min)) + __result.min = std::forward(__val); + else + __result.max = std::forward(__val); + } + while (++__first != __last) + { + + + + range_value_t<_Range> __val1 = *__first; + if (++__first == __last) + { + + + + if (__comp_proj(__val1, __result.min)) + __result.min = std::move(__val1); + else if (!__comp_proj(__val1, __result.max)) + __result.max = std::move(__val1); + break; + } + auto&& __val2 = *__first; + if (!__comp_proj(__val2, __val1)) + { + if (__comp_proj(__val1, __result.min)) + __result.min = std::move(__val1); + if (!__comp_proj(__val2, __result.max)) + __result.max = std::forward(__val2); + } + else + { + if (__comp_proj(__val2, __result.min)) + __result.min = std::forward(__val2); + if (!__comp_proj(__val1, __result.max)) + __result.max = std::move(__val1); + } + } + return __result; + } + + template> + _Comp = ranges::less> + constexpr minmax_result<_Tp> + operator()(initializer_list<_Tp> __r, + _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::subrange(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __minmax_fn minmax{}; + + struct __min_element_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return __first; + + auto __i = __first; + while (++__i != __last) + { + if (std::__invoke(__comp, + std::__invoke(__proj, *__i), + std::__invoke(__proj, *__first))) + __first = __i; + } + return __first; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __min_element_fn min_element{}; + + struct __max_element_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr _Iter + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return __first; + + auto __i = __first; + while (++__i != __last) + { + if (std::__invoke(__comp, + std::__invoke(__proj, *__first), + std::__invoke(__proj, *__i))) + __first = __i; + } + return __first; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr borrowed_iterator_t<_Range> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __max_element_fn max_element{}; + + template + using minmax_element_result = min_max_result<_Iter>; + + struct __minmax_element_fn + { + template _Sent, + typename _Proj = identity, + indirect_strict_weak_order> + _Comp = ranges::less> + constexpr minmax_element_result<_Iter> + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + auto __comp_proj = __detail::__make_comp_proj(__comp, __proj); + minmax_element_result<_Iter> __result = {__first, __first}; + if (__first == __last || ++__first == __last) + return __result; + else + { + + + if (__comp_proj(*__first, *__result.min)) + __result.min = __first; + else + __result.max = __first; + } + while (++__first != __last) + { + + + + auto __prev = __first; + if (++__first == __last) + { + + + + if (__comp_proj(*__prev, *__result.min)) + __result.min = __prev; + else if (!__comp_proj(*__prev, *__result.max)) + __result.max = __prev; + break; + } + if (!__comp_proj(*__first, *__prev)) + { + if (__comp_proj(*__prev, *__result.min)) + __result.min = __prev; + if (!__comp_proj(*__first, *__result.max)) + __result.max = __first; + } + else + { + if (__comp_proj(*__first, *__result.min)) + __result.min = __first; + if (!__comp_proj(*__prev, *__result.max)) + __result.max = __prev; + } + } + return __result; + } + + template, _Proj>> + _Comp = ranges::less> + constexpr minmax_element_result> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __minmax_element_fn minmax_element{}; + + struct __lexicographical_compare_fn + { + template _Sent1, + input_iterator _Iter2, sentinel_for<_Iter2> _Sent2, + typename _Proj1 = identity, typename _Proj2 = identity, + indirect_strict_weak_order, + projected<_Iter2, _Proj2>> + _Comp = ranges::less> + constexpr bool + operator()(_Iter1 __first1, _Sent1 __last1, + _Iter2 __first2, _Sent2 __last2, + _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + if constexpr (__detail::__is_normal_iterator<_Iter1> + && same_as<_Iter1, _Sent1>) + return (*this)(__first1.base(), __last1.base(), + std::move(__first2), std::move(__last2), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + else if constexpr (__detail::__is_normal_iterator<_Iter2> + && same_as<_Iter2, _Sent2>) + return (*this)(std::move(__first1), std::move(__last1), + __first2.base(), __last2.base(), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + else + { + constexpr bool __sized_iters + = (sized_sentinel_for<_Sent1, _Iter1> + && sized_sentinel_for<_Sent2, _Iter2>); + if constexpr (__sized_iters) + { + using _ValueType1 = iter_value_t<_Iter1>; + using _ValueType2 = iter_value_t<_Iter2>; + + + constexpr bool __use_memcmp + = (__is_memcmp_ordered_with<_ValueType1, _ValueType2>::__value + && __ptr_to_nonvolatile<_Iter1> + && __ptr_to_nonvolatile<_Iter2> + && (is_same_v<_Comp, ranges::less> + || is_same_v<_Comp, ranges::greater>) + && is_same_v<_Proj1, identity> + && is_same_v<_Proj2, identity>); + if constexpr (__use_memcmp) + { + const auto __d1 = __last1 - __first1; + const auto __d2 = __last2 - __first2; + + if (const auto __len = std::min(__d1, __d2)) + { + const auto __c + = std::__memcmp(__first1, __first2, __len); + if constexpr (is_same_v<_Comp, ranges::less>) + { + if (__c < 0) + return true; + if (__c > 0) + return false; + } + else if constexpr (is_same_v<_Comp, ranges::greater>) + { + if (__c > 0) + return true; + if (__c < 0) + return false; + } + } + return __d1 < __d2; + } + } + + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, (void) ++__first2) + { + if (std::__invoke(__comp, + std::__invoke(__proj1, *__first1), + std::__invoke(__proj2, *__first2))) + return true; + if (std::__invoke(__comp, + std::__invoke(__proj2, *__first2), + std::__invoke(__proj1, *__first1))) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + } + + template, _Proj1>, + projected, _Proj2>> + _Comp = ranges::less> + constexpr bool + operator()(_Range1&& __r1, _Range2&& __r2, _Comp __comp = {}, + _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const + { + return (*this)(ranges::begin(__r1), ranges::end(__r1), + ranges::begin(__r2), ranges::end(__r2), + std::move(__comp), + std::move(__proj1), std::move(__proj2)); + } + + private: + template> + static constexpr bool __ptr_to_nonvolatile + = is_pointer_v<_Iter> && !is_volatile_v>; + }; + + inline constexpr __lexicographical_compare_fn lexicographical_compare; + + template + struct in_found_result + { + [[no_unique_address]] _Iter in; + bool found; + + template + requires convertible_to + constexpr + operator in_found_result<_Iter2>() const & + { return {in, found}; } + + template + requires convertible_to<_Iter, _Iter2> + constexpr + operator in_found_result<_Iter2>() && + { return {std::move(in), found}; } + }; + + template + using next_permutation_result = in_found_result<_Iter>; + + struct __next_permutation_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr next_permutation_result<_Iter> + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return {std::move(__first), false}; + + auto __i = __first; + ++__i; + if (__i == __last) + return {std::move(__i), false}; + + auto __lasti = ranges::next(__first, __last); + __i = __lasti; + --__i; + + for (;;) + { + auto __ii = __i; + --__i; + if (std::__invoke(__comp, + std::__invoke(__proj, *__i), + std::__invoke(__proj, *__ii))) + { + auto __j = __lasti; + while (!(bool)std::__invoke(__comp, + std::__invoke(__proj, *__i), + std::__invoke(__proj, *--__j))) + ; + ranges::iter_swap(__i, __j); + ranges::reverse(__ii, __last); + return {std::move(__lasti), true}; + } + if (__i == __first) + { + ranges::reverse(__first, __last); + return {std::move(__lasti), false}; + } + } + } + + template + requires sortable, _Comp, _Proj> + constexpr next_permutation_result> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __next_permutation_fn next_permutation{}; + + template + using prev_permutation_result = in_found_result<_Iter>; + + struct __prev_permutation_fn + { + template _Sent, + typename _Comp = ranges::less, typename _Proj = identity> + requires sortable<_Iter, _Comp, _Proj> + constexpr prev_permutation_result<_Iter> + operator()(_Iter __first, _Sent __last, + _Comp __comp = {}, _Proj __proj = {}) const + { + if (__first == __last) + return {std::move(__first), false}; + + auto __i = __first; + ++__i; + if (__i == __last) + return {std::move(__i), false}; + + auto __lasti = ranges::next(__first, __last); + __i = __lasti; + --__i; + + for (;;) + { + auto __ii = __i; + --__i; + if (std::__invoke(__comp, + std::__invoke(__proj, *__ii), + std::__invoke(__proj, *__i))) + { + auto __j = __lasti; + while (!(bool)std::__invoke(__comp, + std::__invoke(__proj, *--__j), + std::__invoke(__proj, *__i))) + ; + ranges::iter_swap(__i, __j); + ranges::reverse(__ii, __last); + return {std::move(__lasti), true}; + } + if (__i == __first) + { + ranges::reverse(__first, __last); + return {std::move(__lasti), false}; + } + } + } + + template + requires sortable, _Comp, _Proj> + constexpr prev_permutation_result> + operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const + { + return (*this)(ranges::begin(__r), ranges::end(__r), + std::move(__comp), std::move(__proj)); + } + }; + + inline constexpr __prev_permutation_fn prev_permutation{}; + +} + + + template + constexpr _ForwardIterator + shift_left(_ForwardIterator __first, _ForwardIterator __last, + typename iterator_traits<_ForwardIterator>::difference_type __n) + { + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + if (__n == 0) + return __last; + + auto __mid = ranges::next(__first, __n, __last); + if (__mid == __last) + return __first; + return std::move(std::move(__mid), std::move(__last), std::move(__first)); + } + + template + constexpr _ForwardIterator + shift_right(_ForwardIterator __first, _ForwardIterator __last, + typename iterator_traits<_ForwardIterator>::difference_type __n) + { + do { if (__builtin_is_constant_evaluated() && !bool(__n >= 0)) __builtin_unreachable(); } while (false); + if (__n == 0) + return __first; + + using _Cat + = typename iterator_traits<_ForwardIterator>::iterator_category; + if constexpr (derived_from<_Cat, bidirectional_iterator_tag>) + { + auto __mid = ranges::next(__last, -__n, __first); + if (__mid == __first) + return __last; + + return std::move_backward(std::move(__first), std::move(__mid), + std::move(__last)); + } + else + { + auto __result = ranges::next(__first, __n, __last); + if (__result == __last) + return __last; + + auto __dest_head = __first, __dest_tail = __result; + while (__dest_head != __result) + { + if (__dest_tail == __last) + { + + + + + + std::move(std::move(__first), std::move(__dest_head), __result); + return __result; + } + ++__dest_head; + ++__dest_tail; + } + + for (;;) + { +# 3835 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/ranges_algo.h" 3 + auto __cursor = __first; + while (__cursor != __result) + { + if (__dest_tail == __last) + { + + + + __dest_head = std::move(__cursor, __result, + std::move(__dest_head)); + std::move(std::move(__first), std::move(__cursor), + std::move(__dest_head)); + return __result; + } + std::iter_swap(__cursor, __dest_head); + ++__dest_head; + ++__dest_tail; + ++__cursor; + } + } + } + } + + +} +# 65 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 2 3 +# 74 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/glue_algorithm_defs.h" 1 3 +# 13 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/glue_algorithm_defs.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 1 3 +# 46 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 +namespace std +{ + + + template + struct __array_traits + { + typedef _Tp _Type[_Nm]; + typedef __is_swappable<_Tp> _Is_swappable; + typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; + + static constexpr _Tp& + _S_ref(const _Type& __t, std::size_t __n) noexcept + { return const_cast<_Tp&>(__t[__n]); } + + static constexpr _Tp* + _S_ptr(const _Type& __t) noexcept + { return const_cast<_Tp*>(__t); } + }; + + template + struct __array_traits<_Tp, 0> + { + struct _Type { }; + typedef true_type _Is_swappable; + typedef true_type _Is_nothrow_swappable; + + static constexpr _Tp& + _S_ref(const _Type&, std::size_t) noexcept + { return *static_cast<_Tp*>(nullptr); } + + static constexpr _Tp* + _S_ptr(const _Type&) noexcept + { return nullptr; } + }; +# 94 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 + template + struct array + { + typedef _Tp value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef value_type* iterator; + typedef const value_type* const_iterator; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + + typedef __array_traits<_Tp, _Nm> _AT_Type; + typename _AT_Type::_Type _M_elems; + + + + + constexpr void + fill(const value_type& __u) + { std::fill_n(begin(), size(), __u); } + + constexpr void + swap(array& __other) + noexcept(_AT_Type::_Is_nothrow_swappable::value) + { std::swap_ranges(begin(), end(), __other.begin()); } + + + constexpr iterator + begin() noexcept + { return iterator(data()); } + + constexpr const_iterator + begin() const noexcept + { return const_iterator(data()); } + + constexpr iterator + end() noexcept + { return iterator(data() + _Nm); } + + constexpr const_iterator + end() const noexcept + { return const_iterator(data() + _Nm); } + + constexpr reverse_iterator + rbegin() noexcept + { return reverse_iterator(end()); } + + constexpr const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(end()); } + + constexpr reverse_iterator + rend() noexcept + { return reverse_iterator(begin()); } + + constexpr const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(begin()); } + + constexpr const_iterator + cbegin() const noexcept + { return const_iterator(data()); } + + constexpr const_iterator + cend() const noexcept + { return const_iterator(data() + _Nm); } + + constexpr const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(end()); } + + constexpr const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(begin()); } + + + constexpr size_type + size() const noexcept { return _Nm; } + + constexpr size_type + max_size() const noexcept { return _Nm; } + + [[__nodiscard__]] constexpr bool + empty() const noexcept { return size() == 0; } + + + constexpr reference + operator[](size_type __n) noexcept + { + ; + return _AT_Type::_S_ref(_M_elems, __n); + } + + constexpr const_reference + operator[](size_type __n) const noexcept + { + + ; + + return _AT_Type::_S_ref(_M_elems, __n); + } + + constexpr reference + at(size_type __n) + { + if (__n >= _Nm) + std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") + , + __n, _Nm); + return _AT_Type::_S_ref(_M_elems, __n); + } + + constexpr const_reference + at(size_type __n) const + { + + + return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) + : (std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") + , + __n, _Nm), + _AT_Type::_S_ref(_M_elems, 0)); + } + + constexpr reference + front() noexcept + { + ; + return *begin(); + } + + constexpr const_reference + front() const noexcept + { + + ; + + return _AT_Type::_S_ref(_M_elems, 0); + } + + constexpr reference + back() noexcept + { + ; + return _Nm ? *(end() - 1) : *end(); + } + + constexpr const_reference + back() const noexcept + { + + ; + + return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) + : _AT_Type::_S_ref(_M_elems, 0); + } + + constexpr pointer + data() noexcept + { return _AT_Type::_S_ptr(_M_elems); } + + constexpr const_pointer + data() const noexcept + { return _AT_Type::_S_ptr(_M_elems); } + }; + + + template + array(_Tp, _Up...) + -> array && ...), _Tp>, + 1 + sizeof...(_Up)>; + + + + template + constexpr + inline bool + operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) + { return std::equal(__one.begin(), __one.end(), __two.begin()); } + + + template + constexpr __detail::__synth3way_t<_Tp> + operator<=>(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) + { + + if constexpr (_Nm && __is_memcmp_ordered<_Tp>::__value) + if (!std::is_constant_evaluated()) + { + constexpr size_t __n = _Nm * sizeof(_Tp); + return __builtin_memcmp(__a.data(), __b.data(), __n) <=> 0; + } + + + for (size_t __i = 0; __i < _Nm; ++__i) + { + auto __c = __detail::__synth3way(__a[__i], __b[__i]); + if (__c != 0) + return __c; + } + return strong_ordering::equal; + } +# 337 "D:/compilers/msys64/mingw64/include/c++/11.2.0/array" 3 + template + constexpr + inline + + + typename enable_if< + __array_traits<_Tp, _Nm>::_Is_swappable::value + >::type + + + + swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) + noexcept(noexcept(__one.swap(__two))) + { __one.swap(__two); } + + + template + typename enable_if< + !__array_traits<_Tp, _Nm>::_Is_swappable::value>::type + swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; + + + template + constexpr _Tp& + get(array<_Tp, _Nm>& __arr) noexcept + { + static_assert(_Int < _Nm, "array index is within bounds"); + return __array_traits<_Tp, _Nm>::_S_ref(__arr._M_elems, _Int); + } + + template + constexpr _Tp&& + get(array<_Tp, _Nm>&& __arr) noexcept + { + static_assert(_Int < _Nm, "array index is within bounds"); + return std::move(std::get<_Int>(__arr)); + } + + template + constexpr const _Tp& + get(const array<_Tp, _Nm>& __arr) noexcept + { + static_assert(_Int < _Nm, "array index is within bounds"); + return __array_traits<_Tp, _Nm>::_S_ref(__arr._M_elems, _Int); + } + + template + constexpr const _Tp&& + get(const array<_Tp, _Nm>&& __arr) noexcept + { + static_assert(_Int < _Nm, "array index is within bounds"); + return std::move(std::get<_Int>(__arr)); + } + + + + + template + constexpr array, sizeof...(_Idx)> + __to_array(_Tp (&__a)[sizeof...(_Idx)], index_sequence<_Idx...>) + { + if constexpr (_Move) + return {{std::move(__a[_Idx])...}}; + else + return {{__a[_Idx]...}}; + } + + template + constexpr array, _Nm> + to_array(_Tp (&__a)[_Nm]) + noexcept(is_nothrow_constructible_v<_Tp, _Tp&>) + { + static_assert(!is_array_v<_Tp>); + static_assert(is_constructible_v<_Tp, _Tp&>); + if constexpr (is_constructible_v<_Tp, _Tp&>) + return __to_array(__a, make_index_sequence<_Nm>{}); + __builtin_unreachable(); + } + + template + constexpr array, _Nm> + to_array(_Tp (&&__a)[_Nm]) + noexcept(is_nothrow_move_constructible_v<_Tp>) + { + static_assert(!is_array_v<_Tp>); + static_assert(is_move_constructible_v<_Tp>); + if constexpr (is_move_constructible_v<_Tp>) + return __to_array<1>(__a, make_index_sequence<_Nm>{}); + __builtin_unreachable(); + } + + + + + + template + struct tuple_size; + + + template + struct tuple_size> + : public integral_constant { }; + + + template + struct tuple_element; + + + template + struct tuple_element<_Int, array<_Tp, _Nm>> + { + static_assert(_Int < _Nm, "index is out of bounds"); + typedef _Tp type; + }; + + template + struct __is_tuple_like_impl> : true_type + { }; + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uses_allocator.h" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/uses_allocator.h" 3 +namespace std +{ + + + + struct __erased_type { }; + + + + + template + using __is_erased_or_convertible + = __or_, is_same<_Tp, __erased_type>>; + + + struct allocator_arg_t { explicit allocator_arg_t() = default; }; + + inline constexpr allocator_arg_t allocator_arg = + allocator_arg_t(); + + template> + struct __uses_allocator_helper + : false_type { }; + + template + struct __uses_allocator_helper<_Tp, _Alloc, + __void_t> + : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type + { }; + + + template + struct uses_allocator + : __uses_allocator_helper<_Tp, _Alloc>::type + { }; + + struct __uses_alloc_base { }; + + struct __uses_alloc0 : __uses_alloc_base + { + struct _Sink { void constexpr operator=(const void*) { } } _M_a; + }; + + template + struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; + + template + struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; + + template + struct __uses_alloc; + + template + struct __uses_alloc + : conditional< + is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>::value, + __uses_alloc1<_Alloc>, + __uses_alloc2<_Alloc>>::type + { + + + static_assert(__or_< + is_constructible<_Tp, allocator_arg_t, const _Alloc&, _Args...>, + is_constructible<_Tp, _Args..., const _Alloc&>>::value, + "construction with an allocator must be possible" + " if uses_allocator is true"); + }; + + template + struct __uses_alloc + : __uses_alloc0 { }; + + template + using __uses_alloc_t = + __uses_alloc::value, _Tp, _Alloc, _Args...>; + + template + constexpr + inline __uses_alloc_t<_Tp, _Alloc, _Args...> + __use_alloc(const _Alloc& __a) + { + __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; + __ret._M_a = std::__addressof(__a); + return __ret; + } + + template + void + __use_alloc(const _Alloc&&) = delete; + + + template + inline constexpr bool uses_allocator_v = + uses_allocator<_Tp, _Alloc>::value; + + + template class _Predicate, + typename _Tp, typename _Alloc, typename... _Args> + struct __is_uses_allocator_predicate + : conditional::value, + __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, + _Predicate<_Tp, _Args..., _Alloc>>, + _Predicate<_Tp, _Args...>>::type { }; + + template + struct __is_uses_allocator_constructible + : __is_uses_allocator_predicate + { }; + + + template + inline constexpr bool __is_uses_allocator_constructible_v = + __is_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; + + + template + struct __is_nothrow_uses_allocator_constructible + : __is_uses_allocator_predicate + { }; + + + + template + inline constexpr bool + __is_nothrow_uses_allocator_constructible_v = + __is_nothrow_uses_allocator_constructible<_Tp, _Alloc, _Args...>::value; + + + template + void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, + _Args&&... __args) + { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } + + template + void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, + _Args&&... __args) + { + ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, + std::forward<_Args>(__args)...); + } + + template + void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, + _Args&&... __args) + { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } + + template + void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, + _Args&&... __args) + { + std::__uses_allocator_construct_impl( + std::__use_alloc<_Tp, _Alloc, _Args...>(__a), __ptr, + std::forward<_Args>(__args)...); + } + + +} +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 2 3 + + + + + + +namespace std +{ + + + + + + + + template + class tuple; + + template + struct __is_empty_non_tuple : is_empty<_Tp> { }; + + + template + struct __is_empty_non_tuple> : false_type { }; + + + template + using __empty_not_final + = typename conditional<__is_final(_Tp), false_type, + __is_empty_non_tuple<_Tp>>::type; + + template::value> + struct _Head_base; + + + template + struct _Head_base<_Idx, _Head, true> + { + constexpr _Head_base() + : _M_head_impl() { } + + constexpr _Head_base(const _Head& __h) + : _M_head_impl(__h) { } + + constexpr _Head_base(const _Head_base&) = default; + constexpr _Head_base(_Head_base&&) = default; + + template + constexpr _Head_base(_UHead&& __h) + : _M_head_impl(std::forward<_UHead>(__h)) { } + + constexpr + _Head_base(allocator_arg_t, __uses_alloc0) + : _M_head_impl() { } + + template + _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) + : _M_head_impl(allocator_arg, *__a._M_a) { } + + template + _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) + : _M_head_impl(*__a._M_a) { } + + template + constexpr + _Head_base(__uses_alloc0, _UHead&& __uhead) + : _M_head_impl(std::forward<_UHead>(__uhead)) { } + + template + _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) + : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) + { } + + template + _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) + : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } + + static constexpr _Head& + _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } + + static constexpr const _Head& + _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } + + [[__no_unique_address__]] _Head _M_head_impl; + }; +# 176 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + struct _Head_base<_Idx, _Head, false> + { + constexpr _Head_base() + : _M_head_impl() { } + + constexpr _Head_base(const _Head& __h) + : _M_head_impl(__h) { } + + constexpr _Head_base(const _Head_base&) = default; + constexpr _Head_base(_Head_base&&) = default; + + template + constexpr _Head_base(_UHead&& __h) + : _M_head_impl(std::forward<_UHead>(__h)) { } + + constexpr + _Head_base(allocator_arg_t, __uses_alloc0) + : _M_head_impl() { } + + template + _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) + : _M_head_impl(allocator_arg, *__a._M_a) { } + + template + _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) + : _M_head_impl(*__a._M_a) { } + + template + constexpr + _Head_base(__uses_alloc0, _UHead&& __uhead) + : _M_head_impl(std::forward<_UHead>(__uhead)) { } + + template + _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) + : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) + { } + + template + _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) + : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } + + static constexpr _Head& + _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } + + static constexpr const _Head& + _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } + + _Head _M_head_impl; + }; +# 235 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + struct _Tuple_impl; + + + + + + + template + struct _Tuple_impl<_Idx, _Head, _Tail...> + : public _Tuple_impl<_Idx + 1, _Tail...>, + private _Head_base<_Idx, _Head> + { + template friend struct _Tuple_impl; + + typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; + typedef _Head_base<_Idx, _Head> _Base; + + static constexpr _Head& + _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } + + static constexpr const _Head& + _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } + + static constexpr _Inherited& + _M_tail(_Tuple_impl& __t) noexcept { return __t; } + + static constexpr const _Inherited& + _M_tail(const _Tuple_impl& __t) noexcept { return __t; } + + constexpr _Tuple_impl() + : _Inherited(), _Base() { } + + explicit constexpr + _Tuple_impl(const _Head& __head, const _Tail&... __tail) + : _Inherited(__tail...), _Base(__head) + { } + + template> + explicit constexpr + _Tuple_impl(_UHead&& __head, _UTail&&... __tail) + : _Inherited(std::forward<_UTail>(__tail)...), + _Base(std::forward<_UHead>(__head)) + { } + + constexpr _Tuple_impl(const _Tuple_impl&) = default; + + + + _Tuple_impl& operator=(const _Tuple_impl&) = delete; + + constexpr + _Tuple_impl(_Tuple_impl&& __in) + noexcept(__and_, + is_nothrow_move_constructible<_Inherited>>::value) + : _Inherited(std::move(_M_tail(__in))), + _Base(std::forward<_Head>(_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) + : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), + _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) + { } + + template + constexpr + _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + : _Inherited(std::move + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), + _Base(std::forward<_UHead> + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) + : _Inherited(__tag, __a), + _Base(__tag, __use_alloc<_Head>(__a)) + { } + + template + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Head& __head, const _Tail&... __tail) + : _Inherited(__tag, __a, __tail...), + _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) + { } + + template> + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _UHead&& __head, _UTail&&... __tail) + : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), + _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead>(__head)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl& __in) + : _Inherited(__tag, __a, _M_tail(__in)), + _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _Tuple_impl&& __in) + : _Inherited(__tag, __a, std::move(_M_tail(__in))), + _Base(__use_alloc<_Head, _Alloc, _Head>(__a), + std::forward<_Head>(_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl<_Idx, _UHead, _UTails...>& __in) + : _Inherited(__tag, __a, + _Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)), + _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), + _Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + : _Inherited(__tag, __a, std::move + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), + _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead> + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) + { } + + template + constexpr + void + _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) + { + _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); + _M_tail(*this)._M_assign( + _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)); + } + + template + constexpr + void + _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + { + _M_head(*this) = std::forward<_UHead> + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); + _M_tail(*this)._M_assign( + std::move(_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))); + } + + protected: + constexpr + void + _M_swap(_Tuple_impl& __in) + { + using std::swap; + swap(_M_head(*this), _M_head(__in)); + _Inherited::_M_swap(_M_tail(__in)); + } + }; + + + template + struct _Tuple_impl<_Idx, _Head> + : private _Head_base<_Idx, _Head> + { + template friend struct _Tuple_impl; + + typedef _Head_base<_Idx, _Head> _Base; + + static constexpr _Head& + _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } + + static constexpr const _Head& + _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } + + constexpr + _Tuple_impl() + : _Base() { } + + explicit constexpr + _Tuple_impl(const _Head& __head) + : _Base(__head) + { } + + template + explicit constexpr + _Tuple_impl(_UHead&& __head) + : _Base(std::forward<_UHead>(__head)) + { } + + constexpr _Tuple_impl(const _Tuple_impl&) = default; + + + + _Tuple_impl& operator=(const _Tuple_impl&) = delete; + + constexpr + _Tuple_impl(_Tuple_impl&& __in) + noexcept(is_nothrow_move_constructible<_Head>::value) + : _Base(std::forward<_Head>(_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) + : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) + { } + + template + constexpr + _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) + : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) + : _Base(__tag, __use_alloc<_Head>(__a)) + { } + + template + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Head& __head) + : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), __head) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _UHead&& __head) + : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead>(__head)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl& __in) + : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), _M_head(__in)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _Tuple_impl&& __in) + : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), + std::forward<_Head>(_M_head(__in))) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl<_Idx, _UHead>& __in) + : _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), + _Tuple_impl<_Idx, _UHead>::_M_head(__in)) + { } + + template + constexpr + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + _Tuple_impl<_Idx, _UHead>&& __in) + : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) + { } + + template + constexpr + void + _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) + { + _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); + } + + template + constexpr + void + _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) + { + _M_head(*this) + = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); + } + + protected: + constexpr + void + _M_swap(_Tuple_impl& __in) + { + using std::swap; + swap(_M_head(*this), _M_head(__in)); + } + }; + + + + template + struct _TupleConstraints + { + template + using is_constructible + = __bool_constant<__is_constructible(_Tp, _Up)>; + + + + + template + static constexpr bool __is_implicitly_constructible() + { + return __and_..., + is_convertible<_UTypes, _Types>... + >::value; + } + + + + + template + static constexpr bool __is_explicitly_constructible() + { + return __and_..., + __not_<__and_...>> + >::value; + } + + static constexpr bool __is_implicitly_default_constructible() + { + return __and_... + >::value; + } + + static constexpr bool __is_explicitly_default_constructible() + { + return __and_..., + __not_<__and_< + std::__is_implicitly_default_constructible<_Types>...> + >>::value; + } + }; + + + + template + struct _TupleConstraints + { + template + static constexpr bool __is_implicitly_constructible() + { return false; } + + template + static constexpr bool __is_explicitly_constructible() + { return false; } + }; + + + template + class tuple : public _Tuple_impl<0, _Elements...> + { + typedef _Tuple_impl<0, _Elements...> _Inherited; + + template + using _TCC = _TupleConstraints<_Cond, _Elements...>; + + + template + using _ImplicitDefaultCtor = __enable_if_t< + _TCC<_Dummy>::__is_implicitly_default_constructible(), + bool>; + + + template + using _ExplicitDefaultCtor = __enable_if_t< + _TCC<_Dummy>::__is_explicitly_default_constructible(), + bool>; + + + template + using _ImplicitCtor = __enable_if_t< + _TCC<_Cond>::template __is_implicitly_constructible<_Args...>(), + bool>; + + + template + using _ExplicitCtor = __enable_if_t< + _TCC<_Cond>::template __is_explicitly_constructible<_Args...>(), + bool>; + + template + static constexpr + __enable_if_t + __assignable() + { return __and_...>::value; } + + + template + static constexpr bool __nothrow_assignable() + { + return + __and_...>::value; + } + + + template + static constexpr bool __nothrow_constructible() + { + return + __and_...>::value; + } + + + template + static constexpr bool __valid_args() + { + return sizeof...(_Elements) == 1 + && !is_same>::value; + } + + + template + static constexpr bool __valid_args() + { return (sizeof...(_Tail) + 2) == sizeof...(_Elements); } +# 674 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template> + struct _UseOtherCtor + : false_type + { }; + + + template + struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Up>> + : __or_, is_constructible<_Tp, _Tuple>> + { }; + + + template + struct _UseOtherCtor<_Tuple, tuple<_Tp>, tuple<_Tp>> + : true_type + { }; + + + + + template + static constexpr bool __use_other_ctor() + { return _UseOtherCtor<_Tuple>::value; } + + public: + template::value> = true> + constexpr + tuple() + noexcept(__and_...>::value) + : _Inherited() { } + + template::value> = false> + explicit constexpr + tuple() + noexcept(__and_...>::value) + : _Inherited() { } + + template= 1), + _ImplicitCtor<_NotEmpty, const _Elements&...> = true> + constexpr + tuple(const _Elements&... __elements) + noexcept(__nothrow_constructible()) + : _Inherited(__elements...) { } + + template= 1), + _ExplicitCtor<_NotEmpty, const _Elements&...> = false> + explicit constexpr + tuple(const _Elements&... __elements) + noexcept(__nothrow_constructible()) + : _Inherited(__elements...) { } + + template(), + _ImplicitCtor<_Valid, _UElements...> = true> + constexpr + tuple(_UElements&&... __elements) + noexcept(__nothrow_constructible<_UElements...>()) + : _Inherited(std::forward<_UElements>(__elements)...) { } + + template(), + _ExplicitCtor<_Valid, _UElements...> = false> + explicit constexpr + tuple(_UElements&&... __elements) + noexcept(__nothrow_constructible<_UElements...>()) + : _Inherited(std::forward<_UElements>(__elements)...) { } + + constexpr tuple(const tuple&) = default; + + constexpr tuple(tuple&&) = default; + + template&>(), + _ImplicitCtor<_Valid, const _UElements&...> = true> + constexpr + tuple(const tuple<_UElements...>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(static_cast&>(__in)) + { } + + template&>(), + _ExplicitCtor<_Valid, const _UElements&...> = false> + explicit constexpr + tuple(const tuple<_UElements...>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(static_cast&>(__in)) + { } + + template&&>(), + _ImplicitCtor<_Valid, _UElements...> = true> + constexpr + tuple(tuple<_UElements...>&& __in) + noexcept(__nothrow_constructible<_UElements...>()) + : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } + + template&&>(), + _ExplicitCtor<_Valid, _UElements...> = false> + explicit constexpr + tuple(tuple<_UElements...>&& __in) + noexcept(__nothrow_constructible<_UElements...>()) + : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } + + + + template::value> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a) + : _Inherited(__tag, __a) { } + + template= 1), + _ImplicitCtor<_NotEmpty, const _Elements&...> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const _Elements&... __elements) + : _Inherited(__tag, __a, __elements...) { } + + template= 1), + _ExplicitCtor<_NotEmpty, const _Elements&...> = false> + constexpr + explicit + tuple(allocator_arg_t __tag, const _Alloc& __a, + const _Elements&... __elements) + : _Inherited(__tag, __a, __elements...) { } + + template(), + _ImplicitCtor<_Valid, _UElements...> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + _UElements&&... __elements) + : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) + { } + + template(), + _ExplicitCtor<_Valid, _UElements...> = false> + constexpr + explicit + tuple(allocator_arg_t __tag, const _Alloc& __a, + _UElements&&... __elements) + : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) + { } + + template + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) + : _Inherited(__tag, __a, static_cast(__in)) { } + + template + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) + : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } + + template&>(), + _ImplicitCtor<_Valid, const _UElements&...> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_UElements...>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template&>(), + _ExplicitCtor<_Valid, const _UElements&...> = false> + constexpr + explicit + tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_UElements...>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template&&>(), + _ImplicitCtor<_Valid, _UElements...> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + tuple<_UElements...>&& __in) + : _Inherited(__tag, __a, + static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) + { } + + template&&>(), + _ExplicitCtor<_Valid, _UElements...> = false> + constexpr + explicit + tuple(allocator_arg_t __tag, const _Alloc& __a, + tuple<_UElements...>&& __in) + : _Inherited(__tag, __a, + static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) + { } + + + + constexpr + tuple& + operator=(typename conditional<__assignable(), + const tuple&, + const __nonesuch&>::type __in) + noexcept(__nothrow_assignable()) + { + this->_M_assign(__in); + return *this; + } + + constexpr + tuple& + operator=(typename conditional<__assignable<_Elements...>(), + tuple&&, + __nonesuch&&>::type __in) + noexcept(__nothrow_assignable<_Elements...>()) + { + this->_M_assign(std::move(__in)); + return *this; + } + + template + constexpr + __enable_if_t<__assignable(), tuple&> + operator=(const tuple<_UElements...>& __in) + noexcept(__nothrow_assignable()) + { + this->_M_assign(__in); + return *this; + } + + template + constexpr + __enable_if_t<__assignable<_UElements...>(), tuple&> + operator=(tuple<_UElements...>&& __in) + noexcept(__nothrow_assignable<_UElements...>()) + { + this->_M_assign(std::move(__in)); + return *this; + } + + + constexpr + void + swap(tuple& __in) + noexcept(__and_<__is_nothrow_swappable<_Elements>...>::value) + { _Inherited::_M_swap(__in); } + }; + + + template + tuple(_UTypes...) -> tuple<_UTypes...>; + template + tuple(pair<_T1, _T2>) -> tuple<_T1, _T2>; + template + tuple(allocator_arg_t, _Alloc, _UTypes...) -> tuple<_UTypes...>; + template + tuple(allocator_arg_t, _Alloc, pair<_T1, _T2>) -> tuple<_T1, _T2>; + template + tuple(allocator_arg_t, _Alloc, tuple<_UTypes...>) -> tuple<_UTypes...>; + + + + template<> + class tuple<> + { + public: + void swap(tuple&) noexcept { } + + + tuple() = default; + + template + constexpr + tuple(allocator_arg_t, const _Alloc&) noexcept { } + template + constexpr + tuple(allocator_arg_t, const _Alloc&, const tuple&) noexcept { } + }; + + + + template + class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> + { + typedef _Tuple_impl<0, _T1, _T2> _Inherited; + + + template + using _ImplicitDefaultCtor = __enable_if_t< + _TupleConstraints<_Dummy, _U1, _U2>:: + __is_implicitly_default_constructible(), + bool>; + + + template + using _ExplicitDefaultCtor = __enable_if_t< + _TupleConstraints<_Dummy, _U1, _U2>:: + __is_explicitly_default_constructible(), + bool>; + + template + using _TCC = _TupleConstraints<_Dummy, _T1, _T2>; + + + template + using _ImplicitCtor = __enable_if_t< + _TCC<_Cond>::template __is_implicitly_constructible<_U1, _U2>(), + bool>; + + + template + using _ExplicitCtor = __enable_if_t< + _TCC<_Cond>::template __is_explicitly_constructible<_U1, _U2>(), + bool>; + + template + static constexpr bool __assignable() + { + return __and_, + is_assignable<_T2&, _U2>>::value; + } + + template + static constexpr bool __nothrow_assignable() + { + return __and_, + is_nothrow_assignable<_T2&, _U2>>::value; + } + + template + static constexpr bool __nothrow_constructible() + { + return __and_, + is_nothrow_constructible<_T2, _U2>>::value; + } + + static constexpr bool __nothrow_default_constructible() + { + return __and_, + is_nothrow_default_constructible<_T2>>::value; + } + + template + static constexpr bool __is_alloc_arg() + { return is_same<__remove_cvref_t<_U1>, allocator_arg_t>::value; } + + public: + template = true> + constexpr + tuple() + noexcept(__nothrow_default_constructible()) + : _Inherited() { } + + template = false> + explicit constexpr + tuple() + noexcept(__nothrow_default_constructible()) + : _Inherited() { } + + template = true> + constexpr + tuple(const _T1& __a1, const _T2& __a2) + noexcept(__nothrow_constructible()) + : _Inherited(__a1, __a2) { } + + template = false> + explicit constexpr + tuple(const _T1& __a1, const _T2& __a2) + noexcept(__nothrow_constructible()) + : _Inherited(__a1, __a2) { } + + template(), _U1, _U2> = true> + constexpr + tuple(_U1&& __a1, _U2&& __a2) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } + + template(), _U1, _U2> = false> + explicit constexpr + tuple(_U1&& __a1, _U2&& __a2) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } + + constexpr tuple(const tuple&) = default; + + constexpr tuple(tuple&&) = default; + + template = true> + constexpr + tuple(const tuple<_U1, _U2>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(static_cast&>(__in)) { } + + template = false> + explicit constexpr + tuple(const tuple<_U1, _U2>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(static_cast&>(__in)) { } + + template = true> + constexpr + tuple(tuple<_U1, _U2>&& __in) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } + + template = false> + explicit constexpr + tuple(tuple<_U1, _U2>&& __in) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } + + template = true> + constexpr + tuple(const pair<_U1, _U2>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(__in.first, __in.second) { } + + template = false> + explicit constexpr + tuple(const pair<_U1, _U2>& __in) + noexcept(__nothrow_constructible()) + : _Inherited(__in.first, __in.second) { } + + template = true> + constexpr + tuple(pair<_U1, _U2>&& __in) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + + template = false> + explicit constexpr + tuple(pair<_U1, _U2>&& __in) + noexcept(__nothrow_constructible<_U1, _U2>()) + : _Inherited(std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + + + + template::value, _T1, _T2> = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a) + : _Inherited(__tag, __a) { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const _T1& __a1, const _T2& __a2) + : _Inherited(__tag, __a, __a1, __a2) { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const _T1& __a1, const _T2& __a2) + : _Inherited(__tag, __a, __a1, __a2) { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) + : _Inherited(__tag, __a, std::forward<_U1>(__a1), + std::forward<_U2>(__a2)) { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + _U1&& __a1, _U2&& __a2) + : _Inherited(__tag, __a, std::forward<_U1>(__a1), + std::forward<_U2>(__a2)) { } + + template + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) + : _Inherited(__tag, __a, static_cast(__in)) { } + + template + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) + : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_U1, _U2>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const tuple<_U1, _U2>& __in) + : _Inherited(__tag, __a, + static_cast&>(__in)) + { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) + : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) + { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) + : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) + { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const pair<_U1, _U2>& __in) + : _Inherited(__tag, __a, __in.first, __in.second) { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, + const pair<_U1, _U2>& __in) + : _Inherited(__tag, __a, __in.first, __in.second) { } + + template = true> + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) + : _Inherited(__tag, __a, std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + + template = false> + explicit + constexpr + tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) + : _Inherited(__tag, __a, std::forward<_U1>(__in.first), + std::forward<_U2>(__in.second)) { } + + + + constexpr + tuple& + operator=(typename conditional<__assignable(), + const tuple&, + const __nonesuch&>::type __in) + noexcept(__nothrow_assignable()) + { + this->_M_assign(__in); + return *this; + } + + constexpr + tuple& + operator=(typename conditional<__assignable<_T1, _T2>(), + tuple&&, + __nonesuch&&>::type __in) + noexcept(__nothrow_assignable<_T1, _T2>()) + { + this->_M_assign(std::move(__in)); + return *this; + } + + template + constexpr + __enable_if_t<__assignable(), tuple&> + operator=(const tuple<_U1, _U2>& __in) + noexcept(__nothrow_assignable()) + { + this->_M_assign(__in); + return *this; + } + + template + constexpr + __enable_if_t<__assignable<_U1, _U2>(), tuple&> + operator=(tuple<_U1, _U2>&& __in) + noexcept(__nothrow_assignable<_U1, _U2>()) + { + this->_M_assign(std::move(__in)); + return *this; + } + + template + constexpr + __enable_if_t<__assignable(), tuple&> + operator=(const pair<_U1, _U2>& __in) + noexcept(__nothrow_assignable()) + { + this->_M_head(*this) = __in.first; + this->_M_tail(*this)._M_head(*this) = __in.second; + return *this; + } + + template + constexpr + __enable_if_t<__assignable<_U1, _U2>(), tuple&> + operator=(pair<_U1, _U2>&& __in) + noexcept(__nothrow_assignable<_U1, _U2>()) + { + this->_M_head(*this) = std::forward<_U1>(__in.first); + this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); + return *this; + } + + constexpr + void + swap(tuple& __in) + noexcept(__and_<__is_nothrow_swappable<_T1>, + __is_nothrow_swappable<_T2>>::value) + { _Inherited::_M_swap(__in); } + }; + + + + template + struct tuple_size> + : public integral_constant { }; + + + template + inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value; + + + + + + + template + struct tuple_element<__i, tuple<_Head, _Tail...> > + : tuple_element<__i - 1, tuple<_Tail...> > { }; + + + + + template + struct tuple_element<0, tuple<_Head, _Tail...> > + { + typedef _Head type; + }; + + + + + template + struct tuple_element<__i, tuple<>> + { + static_assert(__i < tuple_size>::value, + "tuple index must be in range"); + }; + + template + constexpr _Head& + __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept + { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } + + template + constexpr const _Head& + __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept + { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } + + + template + __enable_if_t<(__i >= sizeof...(_Types))> + __get_helper(const tuple<_Types...>&) = delete; + + + template + constexpr __tuple_element_t<__i, tuple<_Elements...>>& + get(tuple<_Elements...>& __t) noexcept + { return std::__get_helper<__i>(__t); } + + + template + constexpr const __tuple_element_t<__i, tuple<_Elements...>>& + get(const tuple<_Elements...>& __t) noexcept + { return std::__get_helper<__i>(__t); } + + + template + constexpr __tuple_element_t<__i, tuple<_Elements...>>&& + get(tuple<_Elements...>&& __t) noexcept + { + typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; + return std::forward<__element_type>(std::__get_helper<__i>(__t)); + } + + + template + constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& + get(const tuple<_Elements...>&& __t) noexcept + { + typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; + return std::forward(std::__get_helper<__i>(__t)); + } +# 1416 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + constexpr size_t + __find_uniq_type_in_pack() + { + constexpr size_t __sz = sizeof...(_Types); + constexpr bool __found[__sz] = { __is_same(_Tp, _Types) ... }; + size_t __n = __sz; + for (size_t __i = 0; __i < __sz; ++__i) + { + if (__found[__i]) + { + if (__n < __sz) + return __sz; + __n = __i; + } + } + return __n; + } + + + template + constexpr _Tp& + get(tuple<_Types...>& __t) noexcept + { + constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); + static_assert(__idx < sizeof...(_Types), + "the type T in std::get must occur exactly once in the tuple"); + return std::__get_helper<__idx>(__t); + } + + + template + constexpr _Tp&& + get(tuple<_Types...>&& __t) noexcept + { + constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); + static_assert(__idx < sizeof...(_Types), + "the type T in std::get must occur exactly once in the tuple"); + return std::forward<_Tp>(std::__get_helper<__idx>(__t)); + } + + + template + constexpr const _Tp& + get(const tuple<_Types...>& __t) noexcept + { + constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); + static_assert(__idx < sizeof...(_Types), + "the type T in std::get must occur exactly once in the tuple"); + return std::__get_helper<__idx>(__t); + } + + + + template + constexpr const _Tp&& + get(const tuple<_Types...>&& __t) noexcept + { + constexpr size_t __idx = __find_uniq_type_in_pack<_Tp, _Types...>(); + static_assert(__idx < sizeof...(_Types), + "the type T in std::get must occur exactly once in the tuple"); + return std::forward(std::__get_helper<__idx>(__t)); + } + + + + template + struct __tuple_compare + { + static constexpr bool + __eq(const _Tp& __t, const _Up& __u) + { + return bool(std::get<__i>(__t) == std::get<__i>(__u)) + && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); + } + + static constexpr bool + __less(const _Tp& __t, const _Up& __u) + { + return bool(std::get<__i>(__t) < std::get<__i>(__u)) + || (!bool(std::get<__i>(__u) < std::get<__i>(__t)) + && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u)); + } + }; + + template + struct __tuple_compare<_Tp, _Up, __size, __size> + { + static constexpr bool + __eq(const _Tp&, const _Up&) { return true; } + + static constexpr bool + __less(const _Tp&, const _Up&) { return false; } + }; + + template + constexpr bool + operator==(const tuple<_TElements...>& __t, + const tuple<_UElements...>& __u) + { + static_assert(sizeof...(_TElements) == sizeof...(_UElements), + "tuple objects can only be compared if they have equal sizes."); + using __compare = __tuple_compare, + tuple<_UElements...>, + 0, sizeof...(_TElements)>; + return __compare::__eq(__t, __u); + } + + + template + constexpr _Cat + __tuple_cmp(const _Tp&, const _Up&, index_sequence<>) + { return _Cat::equivalent; } + + template + constexpr _Cat + __tuple_cmp(const _Tp& __t, const _Up& __u, + index_sequence<_Idx0, _Idxs...>) + { + auto __c + = __detail::__synth3way(std::get<_Idx0>(__t), std::get<_Idx0>(__u)); + if (__c != 0) + return __c; + return std::__tuple_cmp<_Cat>(__t, __u, index_sequence<_Idxs...>()); + } + + template + constexpr + common_comparison_category_t<__detail::__synth3way_t<_Tps, _Ups>...> + operator<=>(const tuple<_Tps...>& __t, const tuple<_Ups...>& __u) + { + using _Cat + = common_comparison_category_t<__detail::__synth3way_t<_Tps, _Ups>...>; + return std::__tuple_cmp<_Cat>(__t, __u, index_sequence_for<_Tps...>()); + } +# 1592 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + constexpr tuple::__type...> + make_tuple(_Elements&&... __args) + { + typedef tuple::__type...> + __result_type; + return __result_type(std::forward<_Elements>(__args)...); + } + + + + + template + constexpr tuple<_Elements&&...> + forward_as_tuple(_Elements&&... __args) noexcept + { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } + + template + struct __make_tuple_impl; + + template + struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> + : __make_tuple_impl<_Idx + 1, + tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>, + _Tuple, _Nm> + { }; + + template + struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> + { + typedef tuple<_Tp...> __type; + }; + + template + struct __do_make_tuple + : __make_tuple_impl<0, tuple<>, _Tuple, tuple_size<_Tuple>::value> + { }; + + + template + struct __make_tuple + : public __do_make_tuple<__remove_cvref_t<_Tuple>> + { }; + + + template + struct __combine_tuples; + + template<> + struct __combine_tuples<> + { + typedef tuple<> __type; + }; + + template + struct __combine_tuples> + { + typedef tuple<_Ts...> __type; + }; + + template + struct __combine_tuples, tuple<_T2s...>, _Rem...> + { + typedef typename __combine_tuples, + _Rem...>::__type __type; + }; + + + template + struct __tuple_cat_result + { + typedef typename __combine_tuples + ::__type...>::__type __type; + }; + + + + template + struct __make_1st_indices; + + template<> + struct __make_1st_indices<> + { + typedef _Index_tuple<> __type; + }; + + template + struct __make_1st_indices<_Tp, _Tpls...> + { + typedef typename _Build_index_tuple::type>::value>::__type __type; + }; + + + + + template + struct __tuple_concater; + + template + struct __tuple_concater<_Ret, _Index_tuple<_Is...>, _Tp, _Tpls...> + { + template + static constexpr _Ret + _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) + { + typedef typename __make_1st_indices<_Tpls...>::__type __idx; + typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; + return __next::_S_do(std::forward<_Tpls>(__tps)..., + std::forward<_Us>(__us)..., + std::get<_Is>(std::forward<_Tp>(__tp))...); + } + }; + + template + struct __tuple_concater<_Ret, _Index_tuple<>> + { + template + static constexpr _Ret + _S_do(_Us&&... __us) + { + return _Ret(std::forward<_Us>(__us)...); + } + }; + + + template...>::value>::type> + constexpr auto + tuple_cat(_Tpls&&... __tpls) + -> typename __tuple_cat_result<_Tpls...>::__type + { + typedef typename __tuple_cat_result<_Tpls...>::__type __ret; + typedef typename __make_1st_indices<_Tpls...>::__type __idx; + typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; + return __concater::_S_do(std::forward<_Tpls>(__tpls)...); + } + + + + + template + constexpr tuple<_Elements&...> + tie(_Elements&... __args) noexcept + { return tuple<_Elements&...>(__args...); } + + + template + constexpr + inline + + + typename enable_if<__and_<__is_swappable<_Elements>...>::value + >::type + + + + swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + + template + constexpr + typename enable_if...>::value>::type + swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; + + + + + + + struct _Swallow_assign + { + template + constexpr const _Swallow_assign& + operator=(const _Tp&) const + { return *this; } + }; + + + + inline constexpr _Swallow_assign ignore{}; + + + template + struct uses_allocator, _Alloc> : true_type { }; +# 1789 "D:/compilers/msys64/mingw64/include/c++/11.2.0/tuple" 3 + template + template + constexpr + inline + pair<_T1, _T2>:: + pair(piecewise_construct_t, + tuple<_Args1...> __first, tuple<_Args2...> __second) + : pair(__first, __second, + typename _Build_index_tuple::__type(), + typename _Build_index_tuple::__type()) + { } + + template + template + constexpr inline + pair<_T1, _T2>:: + pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, + _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) + : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), + second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) + { } + + + + + + + + template class _Trait, typename _Tp, typename _Tuple> + inline constexpr bool __unpack_std_tuple = false; + + template class _Trait, typename _Tp, typename... _Up> + inline constexpr bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>> + = _Trait<_Tp, _Up...>::value; + + template class _Trait, typename _Tp, typename... _Up> + inline constexpr bool __unpack_std_tuple<_Trait, _Tp, tuple<_Up...>&> + = _Trait<_Tp, _Up&...>::value; + + template class _Trait, typename _Tp, typename... _Up> + inline constexpr bool __unpack_std_tuple<_Trait, _Tp, const tuple<_Up...>> + = _Trait<_Tp, const _Up...>::value; + + template class _Trait, typename _Tp, typename... _Up> + inline constexpr bool __unpack_std_tuple<_Trait, _Tp, const tuple<_Up...>&> + = _Trait<_Tp, const _Up&...>::value; + + + + template + constexpr decltype(auto) + __apply_impl(_Fn&& __f, _Tuple&& __t, index_sequence<_Idx...>) + { + return std::__invoke(std::forward<_Fn>(__f), + std::get<_Idx>(std::forward<_Tuple>(__t))...); + } + + template + constexpr decltype(auto) + apply(_Fn&& __f, _Tuple&& __t) + noexcept(__unpack_std_tuple) + { + using _Indices + = make_index_sequence>>; + return std::__apply_impl(std::forward<_Fn>(__f), + std::forward<_Tuple>(__t), + _Indices{}); + } + + + + template + constexpr _Tp + __make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>) + { return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); } + + template + constexpr _Tp + make_from_tuple(_Tuple&& __t) + noexcept(__unpack_std_tuple) + { + return __make_from_tuple_impl<_Tp>( + std::forward<_Tuple>(__t), + make_index_sequence>>{}); + } + + + + + +} +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 +namespace std +{ + +# 54 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 + template + struct _Maybe_unary_or_binary_function { }; + + + template + struct _Maybe_unary_or_binary_function<_Res, _T1> + : std::unary_function<_T1, _Res> { }; + + + template + struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> + : std::binary_function<_T1, _T2, _Res> { }; + + template + struct _Mem_fn_traits; + + template + struct _Mem_fn_traits_base + { + using __result_type = _Res; + using __maybe_type + = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; + using __arity = integral_constant; + }; +# 99 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; + + +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) & noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) & noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const & noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const & noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile & noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile & noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile & noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile & noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; +template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) && noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) && noexcept> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const && noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const && noexcept> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile && noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile && noexcept> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile && noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile && noexcept> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; + + + + + + + template> + struct _Maybe_get_result_type + { }; + + template + struct _Maybe_get_result_type<_Functor, + __void_t> + { typedef typename _Functor::result_type result_type; }; + + + + + + template + struct _Weak_result_type_impl + : _Maybe_get_result_type<_Functor> + { }; + + + template + struct _Weak_result_type_impl<_Res(_ArgTypes...) noexcept (_NE)> + { typedef _Res result_type; }; + + + template + struct _Weak_result_type_impl<_Res(_ArgTypes......) noexcept (_NE)> + { typedef _Res result_type; }; + + + template + struct _Weak_result_type_impl<_Res(*)(_ArgTypes...) noexcept (_NE)> + { typedef _Res result_type; }; + + + template + struct + _Weak_result_type_impl<_Res(*)(_ArgTypes......) noexcept (_NE)> + { typedef _Res result_type; }; + + + template::value> + struct _Weak_result_type_memfun + : _Weak_result_type_impl<_Functor> + { }; + + + template + struct _Weak_result_type_memfun<_MemFunPtr, true> + { + using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; + }; + + + template + struct _Weak_result_type_memfun<_Func _Class::*, false> + { }; + + + + + + template + struct _Weak_result_type + : _Weak_result_type_memfun::type> + { }; +# 293 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/refwrap.h" 3 + template + class reference_wrapper + + + + + + { + _Tp* _M_data; + + constexpr + static _Tp* _S_fun(_Tp& __r) noexcept { return std::__addressof(__r); } + + static void _S_fun(_Tp&&) = delete; + + template> + using __not_same + = typename enable_if::value>::type; + + public: + typedef _Tp type; + + + + + template, typename + = decltype(reference_wrapper::_S_fun(std::declval<_Up>()))> + constexpr + reference_wrapper(_Up&& __uref) + noexcept(noexcept(reference_wrapper::_S_fun(std::declval<_Up>()))) + : _M_data(reference_wrapper::_S_fun(std::forward<_Up>(__uref))) + { } + + reference_wrapper(const reference_wrapper&) = default; + + reference_wrapper& + operator=(const reference_wrapper&) = default; + + constexpr + operator _Tp&() const noexcept + { return this->get(); } + + constexpr + _Tp& + get() const noexcept + { return *_M_data; } + + template + constexpr + typename result_of<_Tp&(_Args&&...)>::type + operator()(_Args&&... __args) const + { + + if constexpr (is_object_v) + static_assert(sizeof(type), "type must be complete"); + + return std::__invoke(get(), std::forward<_Args>(__args)...); + } + }; + + + template + reference_wrapper(_Tp&) -> reference_wrapper<_Tp>; + + + + + + template + constexpr + inline reference_wrapper<_Tp> + ref(_Tp& __t) noexcept + { return reference_wrapper<_Tp>(__t); } + + + template + constexpr + inline reference_wrapper + cref(const _Tp& __t) noexcept + { return reference_wrapper(__t); } + + template + void ref(const _Tp&&) = delete; + + template + void cref(const _Tp&&) = delete; + + + template + constexpr + inline reference_wrapper<_Tp> + ref(reference_wrapper<_Tp> __t) noexcept + { return __t; } + + + template + constexpr + inline reference_wrapper + cref(reference_wrapper<_Tp> __t) noexcept + { return { __t.get() }; } + + + + +} +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 +namespace std +{ + + + + + + + + class bad_function_call : public std::exception + { + public: + virtual ~bad_function_call() noexcept; + + const char* what() const noexcept; + }; + + + + + + + + template + struct __is_location_invariant + : is_trivially_copyable<_Tp>::type + { }; + + class _Undefined_class; + + union _Nocopy_types + { + void* _M_object; + const void* _M_const_object; + void (*_M_function_pointer)(); + void (_Undefined_class::*_M_member_pointer)(); + }; + + union [[gnu::may_alias]] _Any_data + { + void* _M_access() { return &_M_pod_data[0]; } + const void* _M_access() const { return &_M_pod_data[0]; } + + template + _Tp& + _M_access() + { return *static_cast<_Tp*>(_M_access()); } + + template + const _Tp& + _M_access() const + { return *static_cast(_M_access()); } + + _Nocopy_types _M_unused; + char _M_pod_data[sizeof(_Nocopy_types)]; + }; + + enum _Manager_operation + { + __get_type_info, + __get_functor_ptr, + __clone_functor, + __destroy_functor + }; + + template + class function; + + + class _Function_base + { + public: + static const size_t _M_max_size = sizeof(_Nocopy_types); + static const size_t _M_max_align = __alignof__(_Nocopy_types); + + template + class _Base_manager + { + protected: + static const bool __stored_locally = + (__is_location_invariant<_Functor>::value + && sizeof(_Functor) <= _M_max_size + && __alignof__(_Functor) <= _M_max_align + && (_M_max_align % __alignof__(_Functor) == 0)); + + typedef integral_constant _Local_storage; + + + static _Functor* + _M_get_pointer(const _Any_data& __source) + { + if constexpr (__stored_locally) + { + const _Functor& __f = __source._M_access<_Functor>(); + return const_cast<_Functor*>(std::__addressof(__f)); + } + else + return __source._M_access<_Functor*>(); + } + + + + static void + _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) + { + ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); + } + + + + static void + _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) + { + __dest._M_access<_Functor*>() = + new _Functor(*__source._M_access()); + } + + + + static void + _M_destroy(_Any_data& __victim, true_type) + { + __victim._M_access<_Functor>().~_Functor(); + } + + + static void + _M_destroy(_Any_data& __victim, false_type) + { + delete __victim._M_access<_Functor*>(); + } + + public: + static bool + _M_manager(_Any_data& __dest, const _Any_data& __source, + _Manager_operation __op) + { + switch (__op) + { + case __get_type_info: + + __dest._M_access() = &typeid(_Functor); + + + + break; + case __get_functor_ptr: + __dest._M_access<_Functor*>() = _M_get_pointer(__source); + break; + + case __clone_functor: + _M_clone(__dest, __source, _Local_storage()); + break; + + case __destroy_functor: + _M_destroy(__dest, _Local_storage()); + break; + } + return false; + } + + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f) + { _M_init_functor(__functor, std::move(__f), _Local_storage()); } + + template + static bool + _M_not_empty_function(const function<_Signature>& __f) + { return static_cast(__f); } + + template + static bool + _M_not_empty_function(_Tp* __fp) + { return __fp != nullptr; } + + template + static bool + _M_not_empty_function(_Tp _Class::* __mp) + { return __mp != nullptr; } + + template + static bool + _M_not_empty_function(const _Tp&) + { return true; } + + private: + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) + { ::new (__functor._M_access()) _Functor(std::move(__f)); } + + static void + _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) + { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } + }; + + _Function_base() : _M_manager(nullptr) { } + + ~_Function_base() + { + if (_M_manager) + _M_manager(_M_functor, _M_functor, __destroy_functor); + } + + bool _M_empty() const { return !_M_manager; } + + typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, + _Manager_operation); + + _Any_data _M_functor; + _Manager_type _M_manager; + }; + + template + class _Function_handler; + + template + class _Function_handler<_Res(_ArgTypes...), _Functor> + : public _Function_base::_Base_manager<_Functor> + { + typedef _Function_base::_Base_manager<_Functor> _Base; + + public: + static bool + _M_manager(_Any_data& __dest, const _Any_data& __source, + _Manager_operation __op) + { + switch (__op) + { + + case __get_type_info: + __dest._M_access() = &typeid(_Functor); + break; + + case __get_functor_ptr: + __dest._M_access<_Functor*>() = _Base::_M_get_pointer(__source); + break; + + default: + _Base::_M_manager(__dest, __source, __op); + } + return false; + } + + static _Res + _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) + { + return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor), + std::forward<_ArgTypes>(__args)...); + } + }; + + + template<> + class _Function_handler + { + public: + static bool + _M_manager(_Any_data&, const _Any_data&, _Manager_operation) + { return false; } + }; + + + + + + template::value> + struct _Target_handler + : _Function_handler<_Signature, typename remove_cv<_Functor>::type> + { }; + + template + struct _Target_handler<_Signature, _Functor, false> + : _Function_handler + { }; + + + + + + + + template + class function<_Res(_ArgTypes...)> + : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, + private _Function_base + { + template> + struct _Callable + : __is_invocable_impl<_Res2, _Res>::type + { }; + + + + template + struct _Callable : false_type { }; + + template + using _Requires = typename enable_if<_Cond::value, _Tp>::type; + + public: + typedef _Res result_type; + + + + + + + + function() noexcept + : _Function_base() { } + + + + + + function(nullptr_t) noexcept + : _Function_base() { } +# 373 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function(const function& __x) + : _Function_base() + { + if (static_cast(__x)) + { + __x._M_manager(_M_functor, __x._M_functor, __clone_functor); + _M_invoker = __x._M_invoker; + _M_manager = __x._M_manager; + } + } +# 391 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function(function&& __x) noexcept + : _Function_base() + { __x.swap(*this); } +# 411 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template>, void>, + typename = _Requires<_Callable<_Functor>, void>> + function(_Functor __f) + : _Function_base() + { + typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler; + + if (_My_handler::_M_not_empty_function(__f)) + { + _My_handler::_M_init_functor(_M_functor, std::move(__f)); + _M_invoker = &_My_handler::_M_invoke; + _M_manager = &_My_handler::_M_manager; + } + } +# 439 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function& + operator=(const function& __x) + { + function(__x).swap(*this); + return *this; + } +# 457 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function& + operator=(function&& __x) noexcept + { + function(std::move(__x)).swap(*this); + return *this; + } +# 471 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + function& + operator=(nullptr_t) noexcept + { + if (_M_manager) + { + _M_manager(_M_functor, _M_functor, __destroy_functor); + _M_manager = nullptr; + _M_invoker = nullptr; + } + return *this; + } +# 499 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template + _Requires<_Callable::type>, function&> + operator=(_Functor&& __f) + { + function(std::forward<_Functor>(__f)).swap(*this); + return *this; + } + + + template + function& + operator=(reference_wrapper<_Functor> __f) noexcept + { + function(__f).swap(*this); + return *this; + } +# 525 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + void swap(function& __x) noexcept + { + std::swap(_M_functor, __x._M_functor); + std::swap(_M_manager, __x._M_manager); + std::swap(_M_invoker, __x._M_invoker); + } +# 542 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + explicit operator bool() const noexcept + { return !_M_empty(); } +# 555 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + _Res + operator()(_ArgTypes... __args) const + { + if (_M_empty()) + __throw_bad_function_call(); + return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); + } +# 574 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + const type_info& + target_type() const noexcept + { + if (_M_manager) + { + _Any_data __typeinfo_result; + _M_manager(__typeinfo_result, _M_functor, __get_type_info); + if (auto __ti = __typeinfo_result._M_access()) + return *__ti; + } + return typeid(void); + } +# 599 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template + _Functor* + target() noexcept + { + const function* __const_this = this; + const _Functor* __func = __const_this->template target<_Functor>(); + + + return *const_cast<_Functor**>(&__func); + } + + template + const _Functor* + target() const noexcept + { + if constexpr (is_object<_Functor>::value) + { + + + using _Handler = _Target_handler<_Res(_ArgTypes...), _Functor>; + + if (_M_manager == &_Handler::_M_manager + + || (_M_manager && typeid(_Functor) == target_type()) + + ) + { + _Any_data __ptr; + _M_manager(__ptr, _M_functor, __get_functor_ptr); + return __ptr._M_access(); + } + } + return nullptr; + } + + + private: + using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); + _Invoker_type _M_invoker; + }; + + + template + struct __function_guide_helper + { }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) & noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) const noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + struct __function_guide_helper< + _Res (_Tp::*) (_Args...) const & noexcept(_Nx) + > + { using type = _Res(_Args...); }; + + template + function(_Res(*)(_ArgTypes...)) -> function<_Res(_ArgTypes...)>; + + template::type> + function(_Functor) -> function<_Signature>; +# 686 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template + inline bool + operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept + { return !static_cast(__f); } +# 726 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_function.h" 3 + template + inline void + swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept + { __x.swap(__y); } + + + namespace __detail::__variant + { + template struct _Never_valueless_alt; + + + + template + struct _Never_valueless_alt> + : std::true_type + { }; + } + + + +} +# 60 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/aligned_buffer.h" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/aligned_buffer.h" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/aligned_buffer.h" 3 + + + + + + + +namespace __gnu_cxx +{ + + + + + template + struct __aligned_membuf + { + + + + + + struct _Tp2 { _Tp _M_t; }; + + alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)]; + + __aligned_membuf() = default; + + + __aligned_membuf(std::nullptr_t) { } + + void* + _M_addr() noexcept + { return static_cast(&_M_storage); } + + const void* + _M_addr() const noexcept + { return static_cast(&_M_storage); } + + _Tp* + _M_ptr() noexcept + { return static_cast<_Tp*>(_M_addr()); } + + const _Tp* + _M_ptr() const noexcept + { return static_cast(_M_addr()); } + }; +# 89 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ext/aligned_buffer.h" 3 + template + struct __aligned_buffer + : std::aligned_storage + { + typename + std::aligned_storage::type _M_storage; + + __aligned_buffer() = default; + + + __aligned_buffer(std::nullptr_t) { } + + void* + _M_addr() noexcept + { + return static_cast(&_M_storage); + } + + const void* + _M_addr() const noexcept + { + return static_cast(&_M_storage); + } + + _Tp* + _M_ptr() noexcept + { return static_cast<_Tp*>(_M_addr()); } + + const _Tp* + _M_ptr() const noexcept + { return static_cast(_M_addr()); } + }; + + +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 1 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 +namespace std +{ + + + template + class _Hashtable; + +namespace __detail +{ + + + + + + template + struct _Hashtable_base; + + + + template + inline typename std::iterator_traits<_Iterator>::difference_type + __distance_fw(_Iterator __first, _Iterator __last, + std::input_iterator_tag) + { return __first != __last ? 1 : 0; } + + template + inline typename std::iterator_traits<_Iterator>::difference_type + __distance_fw(_Iterator __first, _Iterator __last, + std::forward_iterator_tag) + { return std::distance(__first, __last); } + + template + inline typename std::iterator_traits<_Iterator>::difference_type + __distance_fw(_Iterator __first, _Iterator __last) + { return __distance_fw(__first, __last, + std::__iterator_category(__first)); } + + struct _Identity + { + template + _Tp&& + operator()(_Tp&& __x) const noexcept + { return std::forward<_Tp>(__x); } + }; + + struct _Select1st + { + template + auto + operator()(_Tp&& __x) const noexcept + -> decltype(std::get<0>(std::forward<_Tp>(__x))) + { return std::get<0>(std::forward<_Tp>(__x)); } + }; + + template + struct _Hashtable_alloc; + + + + template + struct _ReuseOrAllocNode + { + private: + using __node_alloc_type = _NodeAlloc; + using __hashtable_alloc = _Hashtable_alloc<__node_alloc_type>; + using __node_alloc_traits = + typename __hashtable_alloc::__node_alloc_traits; + using __node_type = typename __hashtable_alloc::__node_type; + + public: + _ReuseOrAllocNode(__node_type* __nodes, __hashtable_alloc& __h) + : _M_nodes(__nodes), _M_h(__h) { } + _ReuseOrAllocNode(const _ReuseOrAllocNode&) = delete; + + ~_ReuseOrAllocNode() + { _M_h._M_deallocate_nodes(_M_nodes); } + + template + __node_type* + operator()(_Arg&& __arg) const + { + if (_M_nodes) + { + __node_type* __node = _M_nodes; + _M_nodes = _M_nodes->_M_next(); + __node->_M_nxt = nullptr; + auto& __a = _M_h._M_node_allocator(); + __node_alloc_traits::destroy(__a, __node->_M_valptr()); + try + { + __node_alloc_traits::construct(__a, __node->_M_valptr(), + std::forward<_Arg>(__arg)); + } + catch(...) + { + _M_h._M_deallocate_node_ptr(__node); + throw; + } + return __node; + } + return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); + } + + private: + mutable __node_type* _M_nodes; + __hashtable_alloc& _M_h; + }; + + + + template + struct _AllocNode + { + private: + using __hashtable_alloc = _Hashtable_alloc<_NodeAlloc>; + using __node_type = typename __hashtable_alloc::__node_type; + + public: + _AllocNode(__hashtable_alloc& __h) + : _M_h(__h) { } + + template + __node_type* + operator()(_Arg&& __arg) const + { return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); } + + private: + __hashtable_alloc& _M_h; + }; +# 198 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Hashtable_traits + { + using __hash_cached = __bool_constant<_Cache_hash_code>; + using __constant_iterators = __bool_constant<_Constant_iterators>; + using __unique_keys = __bool_constant<_Unique_keys>; + }; +# 214 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + struct _Hash_node_base + { + _Hash_node_base* _M_nxt; + + _Hash_node_base() noexcept : _M_nxt() { } + + _Hash_node_base(_Hash_node_base* __next) noexcept : _M_nxt(__next) { } + }; + + + + + + + template + struct _Hash_node_value_base + { + typedef _Value value_type; + + __gnu_cxx::__aligned_buffer<_Value> _M_storage; + + _Value* + _M_valptr() noexcept + { return _M_storage._M_ptr(); } + + const _Value* + _M_valptr() const noexcept + { return _M_storage._M_ptr(); } + + _Value& + _M_v() noexcept + { return *_M_valptr(); } + + const _Value& + _M_v() const noexcept + { return *_M_valptr(); } + }; + + + + + template + struct _Hash_node_code_cache + { }; + + + + + template<> + struct _Hash_node_code_cache + { std::size_t _M_hash_code; }; + + template + struct _Hash_node_value + : _Hash_node_value_base<_Value> + , _Hash_node_code_cache<_Cache_hash_code> + { }; + + + + + template + struct _Hash_node + : _Hash_node_base + , _Hash_node_value<_Value, _Cache_hash_code> + { + _Hash_node* + _M_next() const noexcept + { return static_cast<_Hash_node*>(this->_M_nxt); } + }; + + + template + struct _Node_iterator_base + { + using __node_type = _Hash_node<_Value, _Cache_hash_code>; + + __node_type* _M_cur; + + _Node_iterator_base() : _M_cur(nullptr) { } + _Node_iterator_base(__node_type* __p) noexcept + : _M_cur(__p) { } + + void + _M_incr() noexcept + { _M_cur = _M_cur->_M_next(); } + + friend bool + operator==(const _Node_iterator_base& __x, const _Node_iterator_base& __y) + noexcept + { return __x._M_cur == __y._M_cur; } + + + + + + + + }; + + + template + struct _Node_iterator + : public _Node_iterator_base<_Value, __cache> + { + private: + using __base_type = _Node_iterator_base<_Value, __cache>; + using __node_type = typename __base_type::__node_type; + + public: + typedef _Value value_type; + typedef std::ptrdiff_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + using pointer = typename std::conditional<__constant_iterators, + const value_type*, value_type*>::type; + + using reference = typename std::conditional<__constant_iterators, + const value_type&, value_type&>::type; + + _Node_iterator() = default; + + explicit + _Node_iterator(__node_type* __p) noexcept + : __base_type(__p) { } + + reference + operator*() const noexcept + { return this->_M_cur->_M_v(); } + + pointer + operator->() const noexcept + { return this->_M_cur->_M_valptr(); } + + _Node_iterator& + operator++() noexcept + { + this->_M_incr(); + return *this; + } + + _Node_iterator + operator++(int) noexcept + { + _Node_iterator __tmp(*this); + this->_M_incr(); + return __tmp; + } + }; + + + template + struct _Node_const_iterator + : public _Node_iterator_base<_Value, __cache> + { + private: + using __base_type = _Node_iterator_base<_Value, __cache>; + using __node_type = typename __base_type::__node_type; + + public: + typedef _Value value_type; + typedef std::ptrdiff_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + typedef const value_type* pointer; + typedef const value_type& reference; + + _Node_const_iterator() = default; + + explicit + _Node_const_iterator(__node_type* __p) noexcept + : __base_type(__p) { } + + _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, + __cache>& __x) noexcept + : __base_type(__x._M_cur) { } + + reference + operator*() const noexcept + { return this->_M_cur->_M_v(); } + + pointer + operator->() const noexcept + { return this->_M_cur->_M_valptr(); } + + _Node_const_iterator& + operator++() noexcept + { + this->_M_incr(); + return *this; + } + + _Node_const_iterator + operator++(int) noexcept + { + _Node_const_iterator __tmp(*this); + this->_M_incr(); + return __tmp; + } + }; + + + + + + + struct _Mod_range_hashing + { + typedef std::size_t first_argument_type; + typedef std::size_t second_argument_type; + typedef std::size_t result_type; + + result_type + operator()(first_argument_type __num, + second_argument_type __den) const noexcept + { return __num % __den; } + }; + + + + + + + struct _Default_ranged_hash { }; + + + + struct _Prime_rehash_policy + { + using __has_load_factor = true_type; + + _Prime_rehash_policy(float __z = 1.0) noexcept + : _M_max_load_factor(__z), _M_next_resize(0) { } + + float + max_load_factor() const noexcept + { return _M_max_load_factor; } + + + std::size_t + _M_next_bkt(std::size_t __n) const; + + + std::size_t + _M_bkt_for_elements(std::size_t __n) const + { return __builtin_ceil(__n / (double)_M_max_load_factor); } + + + + + + std::pair + _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, + std::size_t __n_ins) const; + + typedef std::size_t _State; + + _State + _M_state() const + { return _M_next_resize; } + + void + _M_reset() noexcept + { _M_next_resize = 0; } + + void + _M_reset(_State __state) + { _M_next_resize = __state; } + + static const std::size_t _S_growth_factor = 2; + + float _M_max_load_factor; + mutable std::size_t _M_next_resize; + }; + + + struct _Mask_range_hashing + { + typedef std::size_t first_argument_type; + typedef std::size_t second_argument_type; + typedef std::size_t result_type; + + result_type + operator()(first_argument_type __num, + second_argument_type __den) const noexcept + { return __num & (__den - 1); } + }; + + + inline std::size_t + __clp2(std::size_t __n) noexcept + { + using __gnu_cxx::__int_traits; + + if (__n < 2) + return __n; + const unsigned __lz = sizeof(size_t) > sizeof(long) + ? __builtin_clzll(__n - 1ull) + : __builtin_clzl(__n - 1ul); + + return (size_t(1) << (__int_traits::__digits - __lz - 1)) << 1; + } + + + + struct _Power2_rehash_policy + { + using __has_load_factor = true_type; + + _Power2_rehash_policy(float __z = 1.0) noexcept + : _M_max_load_factor(__z), _M_next_resize(0) { } + + float + max_load_factor() const noexcept + { return _M_max_load_factor; } + + + + std::size_t + _M_next_bkt(std::size_t __n) noexcept + { + if (__n == 0) + + + + return 1; + + const auto __max_width = std::min(sizeof(size_t), 8); + const auto __max_bkt = size_t(1) << (__max_width * 8 - 1); + std::size_t __res = __clp2(__n); + + if (__res == 0) + __res = __max_bkt; + else if (__res == 1) + + + + __res = 2; + + if (__res == __max_bkt) + + + + _M_next_resize = size_t(-1); + else + _M_next_resize + = __builtin_floor(__res * (double)_M_max_load_factor); + + return __res; + } + + + std::size_t + _M_bkt_for_elements(std::size_t __n) const noexcept + { return __builtin_ceil(__n / (double)_M_max_load_factor); } + + + + + + std::pair + _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, + std::size_t __n_ins) noexcept + { + if (__n_elt + __n_ins > _M_next_resize) + { + + + + double __min_bkts + = std::max(__n_elt + __n_ins, _M_next_resize ? 0 : 11) + / (double)_M_max_load_factor; + if (__min_bkts >= __n_bkt) + return { true, + _M_next_bkt(std::max(__builtin_floor(__min_bkts) + 1, + __n_bkt * _S_growth_factor)) }; + + _M_next_resize + = __builtin_floor(__n_bkt * (double)_M_max_load_factor); + return { false, 0 }; + } + else + return { false, 0 }; + } + + typedef std::size_t _State; + + _State + _M_state() const noexcept + { return _M_next_resize; } + + void + _M_reset() noexcept + { _M_next_resize = 0; } + + void + _M_reset(_State __state) noexcept + { _M_next_resize = __state; } + + static const std::size_t _S_growth_factor = 2; + + float _M_max_load_factor; + std::size_t _M_next_resize; + }; +# 637 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Map_base { }; + + + template + struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> + { + using mapped_type = typename std::tuple_element<1, _Pair>::type; + }; + + + template + struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true> + { + private: + using __hashtable_base = _Hashtable_base<_Key, _Pair, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, + _Traits>; + + using __hashtable = _Hashtable<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, + _Unused, _RehashPolicy, _Traits>; + + using __hash_code = typename __hashtable_base::__hash_code; + + public: + using key_type = typename __hashtable_base::key_type; + using mapped_type = typename std::tuple_element<1, _Pair>::type; + + mapped_type& + operator[](const key_type& __k); + + mapped_type& + operator[](key_type&& __k); + + + + mapped_type& + at(const key_type& __k); + + const mapped_type& + at(const key_type& __k) const; + }; + + template + auto + _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + operator[](const key_type& __k) + -> mapped_type& + { + __hashtable* __h = static_cast<__hashtable*>(this); + __hash_code __code = __h->_M_hash_code(__k); + std::size_t __bkt = __h->_M_bucket_index(__code); + if (auto __node = __h->_M_find_node(__bkt, __k, __code)) + return __node->_M_v().second; + + typename __hashtable::_Scoped_node __node { + __h, + std::piecewise_construct, + std::tuple(__k), + std::tuple<>() + }; + auto __pos + = __h->_M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return __pos->second; + } + + template + auto + _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + operator[](key_type&& __k) + -> mapped_type& + { + __hashtable* __h = static_cast<__hashtable*>(this); + __hash_code __code = __h->_M_hash_code(__k); + std::size_t __bkt = __h->_M_bucket_index(__code); + if (auto __node = __h->_M_find_node(__bkt, __k, __code)) + return __node->_M_v().second; + + typename __hashtable::_Scoped_node __node { + __h, + std::piecewise_construct, + std::forward_as_tuple(std::move(__k)), + std::tuple<>() + }; + auto __pos + = __h->_M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return __pos->second; + } + + template + auto + _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + at(const key_type& __k) + -> mapped_type& + { + __hashtable* __h = static_cast<__hashtable*>(this); + auto __ite = __h->find(__k); + + if (!__ite._M_cur) + __throw_out_of_range(("_Map_base::at")); + return __ite->second; + } + + template + auto + _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + at(const key_type& __k) const + -> const mapped_type& + { + const __hashtable* __h = static_cast(this); + auto __ite = __h->find(__k); + + if (!__ite._M_cur) + __throw_out_of_range(("_Map_base::at")); + return __ite->second; + } + + + + + + + template + struct _Insert_base + { + protected: + using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, + _Equal, _Hash, _RangeHash, + _Unused, _Traits>; + + using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, + _Unused, _RehashPolicy, _Traits>; + + using __hash_cached = typename _Traits::__hash_cached; + using __constant_iterators = typename _Traits::__constant_iterators; + + using __hashtable_alloc = _Hashtable_alloc< + __alloc_rebind<_Alloc, _Hash_node<_Value, + __hash_cached::value>>>; + + using value_type = typename __hashtable_base::value_type; + using size_type = typename __hashtable_base::size_type; + + using __unique_keys = typename _Traits::__unique_keys; + using __node_alloc_type = typename __hashtable_alloc::__node_alloc_type; + using __node_gen_type = _AllocNode<__node_alloc_type>; + + __hashtable& + _M_conjure_hashtable() + { return *(static_cast<__hashtable*>(this)); } + + template + void + _M_insert_range(_InputIterator __first, _InputIterator __last, + const _NodeGetter&, true_type __uks); + + template + void + _M_insert_range(_InputIterator __first, _InputIterator __last, + const _NodeGetter&, false_type __uks); + + public: + using iterator = _Node_iterator<_Value, __constant_iterators::value, + __hash_cached::value>; + + using const_iterator = _Node_const_iterator<_Value, __constant_iterators::value, + __hash_cached::value>; + + using __ireturn_type = typename std::conditional<__unique_keys::value, + std::pair, + iterator>::type; + + __ireturn_type + insert(const value_type& __v) + { + __hashtable& __h = _M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return __h._M_insert(__v, __node_gen, __unique_keys{}); + } + + iterator + insert(const_iterator __hint, const value_type& __v) + { + __hashtable& __h = _M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return __h._M_insert(__hint, __v, __node_gen, __unique_keys{}); + } + + template + std::pair + try_emplace(const_iterator, _KType&& __k, _Args&&... __args) + { + __hashtable& __h = _M_conjure_hashtable(); + auto __code = __h._M_hash_code(__k); + std::size_t __bkt = __h._M_bucket_index(__code); + if (auto __node = __h._M_find_node(__bkt, __k, __code)) + return { iterator(__node), false }; + + typename __hashtable::_Scoped_node __node { + &__h, + std::piecewise_construct, + std::forward_as_tuple(std::forward<_KType>(__k)), + std::forward_as_tuple(std::forward<_Args>(__args)...) + }; + auto __it + = __h._M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return { __it, true }; + } + + void + insert(initializer_list __l) + { this->insert(__l.begin(), __l.end()); } + + template + void + insert(_InputIterator __first, _InputIterator __last) + { + __hashtable& __h = _M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return _M_insert_range(__first, __last, __node_gen, __unique_keys{}); + } + }; + + template + template + void + _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>:: + _M_insert_range(_InputIterator __first, _InputIterator __last, + const _NodeGetter& __node_gen, true_type __uks) + { + __hashtable& __h = _M_conjure_hashtable(); + for (; __first != __last; ++__first) + __h._M_insert(*__first, __node_gen, __uks); + } + + template + template + void + _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>:: + _M_insert_range(_InputIterator __first, _InputIterator __last, + const _NodeGetter& __node_gen, false_type __uks) + { + using __rehash_type = typename __hashtable::__rehash_type; + using __rehash_state = typename __hashtable::__rehash_state; + using pair_type = std::pair; + + size_type __n_elt = __detail::__distance_fw(__first, __last); + if (__n_elt == 0) + return; + + __hashtable& __h = _M_conjure_hashtable(); + __rehash_type& __rehash = __h._M_rehash_policy; + const __rehash_state& __saved_state = __rehash._M_state(); + pair_type __do_rehash = __rehash._M_need_rehash(__h._M_bucket_count, + __h._M_element_count, + __n_elt); + + if (__do_rehash.first) + __h._M_rehash(__do_rehash.second, __saved_state); + + for (; __first != __last; ++__first) + __h._M_insert(*__first, __node_gen, __uks); + } + + + + + + + + template + struct _Insert; + + + template + struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits, true> + : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits> + { + using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + using value_type = typename __base_type::value_type; + using iterator = typename __base_type::iterator; + using const_iterator = typename __base_type::const_iterator; + using __ireturn_type = typename __base_type::__ireturn_type; + + using __unique_keys = typename __base_type::__unique_keys; + using __hashtable = typename __base_type::__hashtable; + using __node_gen_type = typename __base_type::__node_gen_type; + + using __base_type::insert; + + __ireturn_type + insert(value_type&& __v) + { + __hashtable& __h = this->_M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return __h._M_insert(std::move(__v), __node_gen, __unique_keys{}); + } + + iterator + insert(const_iterator __hint, value_type&& __v) + { + __hashtable& __h = this->_M_conjure_hashtable(); + __node_gen_type __node_gen(__h); + return __h._M_insert(__hint, std::move(__v), __node_gen, + __unique_keys{}); + } + }; + + + template + struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> + : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits> + { + using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + using value_type = typename __base_type::value_type; + using iterator = typename __base_type::iterator; + using const_iterator = typename __base_type::const_iterator; + + using __unique_keys = typename __base_type::__unique_keys; + using __hashtable = typename __base_type::__hashtable; + using __ireturn_type = typename __base_type::__ireturn_type; + + using __base_type::insert; + + template + using __is_cons = std::is_constructible; + + template + using _IFcons = std::enable_if<__is_cons<_Pair>::value>; + + template + using _IFconsp = typename _IFcons<_Pair>::type; + + template> + __ireturn_type + insert(_Pair&& __v) + { + __hashtable& __h = this->_M_conjure_hashtable(); + return __h._M_emplace(__unique_keys{}, std::forward<_Pair>(__v)); + } + + template> + iterator + insert(const_iterator __hint, _Pair&& __v) + { + __hashtable& __h = this->_M_conjure_hashtable(); + return __h._M_emplace(__hint, __unique_keys{}, + std::forward<_Pair>(__v)); + } + }; + + template + using __has_load_factor = typename _Policy::__has_load_factor; + + + + + + + + template> + struct _Rehash_base; + + + template + struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, + false_type > + { + }; + + + template + struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, + true_type > + { + using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + float + max_load_factor() const noexcept + { + const __hashtable* __this = static_cast(this); + return __this->__rehash_policy().max_load_factor(); + } + + void + max_load_factor(float __z) + { + __hashtable* __this = static_cast<__hashtable*>(this); + __this->__rehash_policy(_RehashPolicy(__z)); + } + + void + reserve(std::size_t __n) + { + __hashtable* __this = static_cast<__hashtable*>(this); + __this->rehash(__this->__rehash_policy()._M_bkt_for_elements(__n)); + } + }; + + + + + + + + template + struct _Hashtable_ebo_helper; + + + template + struct _Hashtable_ebo_helper<_Nm, _Tp, true> + : private _Tp + { + _Hashtable_ebo_helper() = default; + + template + _Hashtable_ebo_helper(_OtherTp&& __tp) + : _Tp(std::forward<_OtherTp>(__tp)) + { } + + const _Tp& _M_cget() const { return static_cast(*this); } + _Tp& _M_get() { return static_cast<_Tp&>(*this); } + }; + + + template + struct _Hashtable_ebo_helper<_Nm, _Tp, false> + { + _Hashtable_ebo_helper() = default; + + template + _Hashtable_ebo_helper(_OtherTp&& __tp) + : _M_tp(std::forward<_OtherTp>(__tp)) + { } + + const _Tp& _M_cget() const { return _M_tp; } + _Tp& _M_get() { return _M_tp; } + + private: + _Tp _M_tp; + }; + + + + + + + + template + struct _Local_iterator_base; +# 1184 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Hash_code_base + : private _Hashtable_ebo_helper<1, _Hash> + { + private: + using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>; + + + friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, false>; + + public: + typedef _Hash hasher; + + hasher + hash_function() const + { return _M_hash(); } + + protected: + typedef std::size_t __hash_code; + + + + _Hash_code_base() = default; + _Hash_code_base(const _Hash& __hash) : __ebo_hash(__hash) { } + + __hash_code + _M_hash_code(const _Key& __k) const + { + static_assert(__is_invocable{}, + "hash function must be invocable with an argument of key type"); + return _M_hash()(__k); + } + + template + __hash_code + _M_hash_code_tr(const _Kt& __k) const + { + static_assert(__is_invocable{}, + "hash function must be invocable with an argument of key type"); + return _M_hash()(__k); + } + + std::size_t + _M_bucket_index(__hash_code __c, std::size_t __bkt_count) const + { return _RangeHash{}(__c, __bkt_count); } + + std::size_t + _M_bucket_index(const _Hash_node_value<_Value, false>& __n, + std::size_t __bkt_count) const + noexcept( noexcept(declval()(declval())) + && noexcept(declval()((__hash_code)0, + (std::size_t)0)) ) + { + return _RangeHash{}(_M_hash_code(_ExtractKey{}(__n._M_v())), + __bkt_count); + } + + std::size_t + _M_bucket_index(const _Hash_node_value<_Value, true>& __n, + std::size_t __bkt_count) const + noexcept( noexcept(declval()((__hash_code)0, + (std::size_t)0)) ) + { return _RangeHash{}(__n._M_hash_code, __bkt_count); } + + void + _M_store_code(_Hash_node_code_cache&, __hash_code) const + { } + + void + _M_copy_code(_Hash_node_code_cache&, + const _Hash_node_code_cache&) const + { } + + void + _M_store_code(_Hash_node_code_cache& __n, __hash_code __c) const + { __n._M_hash_code = __c; } + + void + _M_copy_code(_Hash_node_code_cache& __to, + const _Hash_node_code_cache& __from) const + { __to._M_hash_code = __from._M_hash_code; } + + void + _M_swap(_Hash_code_base& __x) + { std::swap(__ebo_hash::_M_get(), __x.__ebo_hash::_M_get()); } + + const _Hash& + _M_hash() const { return __ebo_hash::_M_cget(); } + }; + + + template + struct _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, true> + : public _Node_iterator_base<_Value, true> + { + protected: + using __base_node_iter = _Node_iterator_base<_Value, true>; + using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, true>; + + _Local_iterator_base() = default; + _Local_iterator_base(const __hash_code_base&, + _Hash_node<_Value, true>* __p, + std::size_t __bkt, std::size_t __bkt_count) + : __base_node_iter(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) + { } + + void + _M_incr() + { + __base_node_iter::_M_incr(); + if (this->_M_cur) + { + std::size_t __bkt + = _RangeHash{}(this->_M_cur->_M_hash_code, _M_bucket_count); + if (__bkt != _M_bucket) + this->_M_cur = nullptr; + } + } + + std::size_t _M_bucket; + std::size_t _M_bucket_count; + + public: + std::size_t + _M_get_bucket() const { return _M_bucket; } + }; + + + + + + template::value> + struct _Hash_code_storage + { + __gnu_cxx::__aligned_buffer<_Tp> _M_storage; + + _Tp* + _M_h() { return _M_storage._M_ptr(); } + + const _Tp* + _M_h() const { return _M_storage._M_ptr(); } + }; + + + template + struct _Hash_code_storage<_Tp, true> + { + static_assert( std::is_empty<_Tp>::value, "Type must be empty" ); + + + + _Tp* + _M_h() { return reinterpret_cast<_Tp*>(this); } + + const _Tp* + _M_h() const { return reinterpret_cast(this); } + }; + + template + using __hash_code_for_local_iter + = _Hash_code_storage<_Hash_code_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, false>>; + + + template + struct _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, false> + : __hash_code_for_local_iter<_Key, _Value, _ExtractKey, _Hash, _RangeHash, + _Unused> + , _Node_iterator_base<_Value, false> + { + protected: + using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, false>; + using __node_iter_base = _Node_iterator_base<_Value, false>; + + _Local_iterator_base() : _M_bucket_count(-1) { } + + _Local_iterator_base(const __hash_code_base& __base, + _Hash_node<_Value, false>* __p, + std::size_t __bkt, std::size_t __bkt_count) + : __node_iter_base(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) + { _M_init(__base); } + + ~_Local_iterator_base() + { + if (_M_bucket_count != size_t(-1)) + _M_destroy(); + } + + _Local_iterator_base(const _Local_iterator_base& __iter) + : __node_iter_base(__iter._M_cur), _M_bucket(__iter._M_bucket) + , _M_bucket_count(__iter._M_bucket_count) + { + if (_M_bucket_count != size_t(-1)) + _M_init(*__iter._M_h()); + } + + _Local_iterator_base& + operator=(const _Local_iterator_base& __iter) + { + if (_M_bucket_count != -1) + _M_destroy(); + this->_M_cur = __iter._M_cur; + _M_bucket = __iter._M_bucket; + _M_bucket_count = __iter._M_bucket_count; + if (_M_bucket_count != -1) + _M_init(*__iter._M_h()); + return *this; + } + + void + _M_incr() + { + __node_iter_base::_M_incr(); + if (this->_M_cur) + { + std::size_t __bkt = this->_M_h()->_M_bucket_index(*this->_M_cur, + _M_bucket_count); + if (__bkt != _M_bucket) + this->_M_cur = nullptr; + } + } + + std::size_t _M_bucket; + std::size_t _M_bucket_count; + + void + _M_init(const __hash_code_base& __base) + { ::new(this->_M_h()) __hash_code_base(__base); } + + void + _M_destroy() { this->_M_h()->~__hash_code_base(); } + + public: + std::size_t + _M_get_bucket() const { return _M_bucket; } + }; + + + template + struct _Local_iterator + : public _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, __cache> + { + private: + using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, __cache>; + using __hash_code_base = typename __base_type::__hash_code_base; + + public: + typedef _Value value_type; + typedef typename std::conditional<__constant_iterators, + const value_type*, value_type*>::type + pointer; + typedef typename std::conditional<__constant_iterators, + const value_type&, value_type&>::type + reference; + typedef std::ptrdiff_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + _Local_iterator() = default; + + _Local_iterator(const __hash_code_base& __base, + _Hash_node<_Value, __cache>* __n, + std::size_t __bkt, std::size_t __bkt_count) + : __base_type(__base, __n, __bkt, __bkt_count) + { } + + reference + operator*() const + { return this->_M_cur->_M_v(); } + + pointer + operator->() const + { return this->_M_cur->_M_valptr(); } + + _Local_iterator& + operator++() + { + this->_M_incr(); + return *this; + } + + _Local_iterator + operator++(int) + { + _Local_iterator __tmp(*this); + this->_M_incr(); + return __tmp; + } + }; + + + template + struct _Local_const_iterator + : public _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, __cache> + { + private: + using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, __cache>; + using __hash_code_base = typename __base_type::__hash_code_base; + + public: + typedef _Value value_type; + typedef const value_type* pointer; + typedef const value_type& reference; + typedef std::ptrdiff_t difference_type; + typedef std::forward_iterator_tag iterator_category; + + _Local_const_iterator() = default; + + _Local_const_iterator(const __hash_code_base& __base, + _Hash_node<_Value, __cache>* __n, + std::size_t __bkt, std::size_t __bkt_count) + : __base_type(__base, __n, __bkt, __bkt_count) + { } + + _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, + __constant_iterators, + __cache>& __x) + : __base_type(__x) + { } + + reference + operator*() const + { return this->_M_cur->_M_v(); } + + pointer + operator->() const + { return this->_M_cur->_M_valptr(); } + + _Local_const_iterator& + operator++() + { + this->_M_incr(); + return *this; + } + + _Local_const_iterator + operator++(int) + { + _Local_const_iterator __tmp(*this); + this->_M_incr(); + return __tmp; + } + }; +# 1556 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Hashtable_base + : public _Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, + _Unused, _Traits::__hash_cached::value>, + private _Hashtable_ebo_helper<0, _Equal> + { + public: + typedef _Key key_type; + typedef _Value value_type; + typedef _Equal key_equal; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + using __traits_type = _Traits; + using __hash_cached = typename __traits_type::__hash_cached; + + using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, + _Hash, _RangeHash, _Unused, + __hash_cached::value>; + + using __hash_code = typename __hash_code_base::__hash_code; + + private: + using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>; + + static bool + _S_equals(__hash_code, const _Hash_node_code_cache&) + { return true; } + + static bool + _S_node_equals(const _Hash_node_code_cache&, + const _Hash_node_code_cache&) + { return true; } + + static bool + _S_equals(__hash_code __c, const _Hash_node_code_cache& __n) + { return __c == __n._M_hash_code; } + + static bool + _S_node_equals(const _Hash_node_code_cache& __lhn, + const _Hash_node_code_cache& __rhn) + { return __lhn._M_hash_code == __rhn._M_hash_code; } + + protected: + _Hashtable_base() = default; + _Hashtable_base(const _Hash& __hash, const _Equal& __eq) + : __hash_code_base(__hash), _EqualEBO(__eq) + { } + + bool + _M_equals(const _Key& __k, __hash_code __c, + const _Hash_node_value<_Value, __hash_cached::value>& __n) const + { + static_assert(__is_invocable{}, + "key equality predicate must be invocable with two arguments of " + "key type"); + return _S_equals(__c, __n) && _M_eq()(__k, _ExtractKey{}(__n._M_v())); + } + + template + bool + _M_equals_tr(const _Kt& __k, __hash_code __c, + const _Hash_node_value<_Value, + __hash_cached::value>& __n) const + { + static_assert( + __is_invocable{}, + "key equality predicate must be invocable with two arguments of " + "key type"); + return _S_equals(__c, __n) && _M_eq()(__k, _ExtractKey{}(__n._M_v())); + } + + bool + _M_node_equals( + const _Hash_node_value<_Value, __hash_cached::value>& __lhn, + const _Hash_node_value<_Value, __hash_cached::value>& __rhn) const + { + return _S_node_equals(__lhn, __rhn) + && _M_eq()(_ExtractKey{}(__lhn._M_v()), _ExtractKey{}(__rhn._M_v())); + } + + void + _M_swap(_Hashtable_base& __x) + { + __hash_code_base::_M_swap(__x); + std::swap(_EqualEBO::_M_get(), __x._EqualEBO::_M_get()); + } + + const _Equal& + _M_eq() const { return _EqualEBO::_M_cget(); } + }; +# 1658 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable_policy.h" 3 + template + struct _Equality; + + + template + struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true> + { + using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + bool + _M_equal(const __hashtable&) const; + }; + + template + bool + _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, true>:: + _M_equal(const __hashtable& __other) const + { + using __node_type = typename __hashtable::__node_type; + const __hashtable* __this = static_cast(this); + if (__this->size() != __other.size()) + return false; + + for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) + { + std::size_t __ybkt = __other._M_bucket_index(*__itx._M_cur); + auto __prev_n = __other._M_buckets[__ybkt]; + if (!__prev_n) + return false; + + for (__node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt);; + __n = __n->_M_next()) + { + if (__n->_M_v() == *__itx) + break; + + if (!__n->_M_nxt + || __other._M_bucket_index(*__n->_M_next()) != __ybkt) + return false; + } + } + + return true; + } + + + template + struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false> + { + using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + bool + _M_equal(const __hashtable&) const; + }; + + template + bool + _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits, false>:: + _M_equal(const __hashtable& __other) const + { + using __node_type = typename __hashtable::__node_type; + const __hashtable* __this = static_cast(this); + if (__this->size() != __other.size()) + return false; + + for (auto __itx = __this->begin(); __itx != __this->end();) + { + std::size_t __x_count = 1; + auto __itx_end = __itx; + for (++__itx_end; __itx_end != __this->end() + && __this->key_eq()(_ExtractKey{}(*__itx), + _ExtractKey{}(*__itx_end)); + ++__itx_end) + ++__x_count; + + std::size_t __ybkt = __other._M_bucket_index(*__itx._M_cur); + auto __y_prev_n = __other._M_buckets[__ybkt]; + if (!__y_prev_n) + return false; + + __node_type* __y_n = static_cast<__node_type*>(__y_prev_n->_M_nxt); + for (;;) + { + if (__this->key_eq()(_ExtractKey{}(__y_n->_M_v()), + _ExtractKey{}(*__itx))) + break; + + auto __y_ref_n = __y_n; + for (__y_n = __y_n->_M_next(); __y_n; __y_n = __y_n->_M_next()) + if (!__other._M_node_equals(*__y_ref_n, *__y_n)) + break; + + if (!__y_n || __other._M_bucket_index(*__y_n) != __ybkt) + return false; + } + + typename __hashtable::const_iterator __ity(__y_n); + for (auto __ity_end = __ity; __ity_end != __other.end(); ++__ity_end) + if (--__x_count == 0) + break; + + if (__x_count != 0) + return false; + + if (!std::is_permutation(__itx, __itx_end, __ity)) + return false; + + __itx = __itx_end; + } + return true; + } + + + + + + template + struct _Hashtable_alloc : private _Hashtable_ebo_helper<0, _NodeAlloc> + { + private: + using __ebo_node_alloc = _Hashtable_ebo_helper<0, _NodeAlloc>; + public: + using __node_type = typename _NodeAlloc::value_type; + using __node_alloc_type = _NodeAlloc; + + using __node_alloc_traits = __gnu_cxx::__alloc_traits<__node_alloc_type>; + + using __value_alloc_traits = typename __node_alloc_traits::template + rebind_traits; + + using __node_ptr = __node_type*; + using __node_base = _Hash_node_base; + using __node_base_ptr = __node_base*; + using __buckets_alloc_type = + __alloc_rebind<__node_alloc_type, __node_base_ptr>; + using __buckets_alloc_traits = std::allocator_traits<__buckets_alloc_type>; + using __buckets_ptr = __node_base_ptr*; + + _Hashtable_alloc() = default; + _Hashtable_alloc(const _Hashtable_alloc&) = default; + _Hashtable_alloc(_Hashtable_alloc&&) = default; + + template + _Hashtable_alloc(_Alloc&& __a) + : __ebo_node_alloc(std::forward<_Alloc>(__a)) + { } + + __node_alloc_type& + _M_node_allocator() + { return __ebo_node_alloc::_M_get(); } + + const __node_alloc_type& + _M_node_allocator() const + { return __ebo_node_alloc::_M_cget(); } + + + template + __node_ptr + _M_allocate_node(_Args&&... __args); + + + void + _M_deallocate_node(__node_ptr __n); + + + void + _M_deallocate_node_ptr(__node_ptr __n); + + + + void + _M_deallocate_nodes(__node_ptr __n); + + __buckets_ptr + _M_allocate_buckets(std::size_t __bkt_count); + + void + _M_deallocate_buckets(__buckets_ptr, std::size_t __bkt_count); + }; + + + + template + template + auto + _Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args&&... __args) + -> __node_ptr + { + auto __nptr = __node_alloc_traits::allocate(_M_node_allocator(), 1); + __node_ptr __n = std::__to_address(__nptr); + try + { + ::new ((void*)__n) __node_type; + __node_alloc_traits::construct(_M_node_allocator(), + __n->_M_valptr(), + std::forward<_Args>(__args)...); + return __n; + } + catch(...) + { + __node_alloc_traits::deallocate(_M_node_allocator(), __nptr, 1); + throw; + } + } + + template + void + _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node(__node_ptr __n) + { + __node_alloc_traits::destroy(_M_node_allocator(), __n->_M_valptr()); + _M_deallocate_node_ptr(__n); + } + + template + void + _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node_ptr(__node_ptr __n) + { + typedef typename __node_alloc_traits::pointer _Ptr; + auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__n); + __n->~__node_type(); + __node_alloc_traits::deallocate(_M_node_allocator(), __ptr, 1); + } + + template + void + _Hashtable_alloc<_NodeAlloc>::_M_deallocate_nodes(__node_ptr __n) + { + while (__n) + { + __node_ptr __tmp = __n; + __n = __n->_M_next(); + _M_deallocate_node(__tmp); + } + } + + template + auto + _Hashtable_alloc<_NodeAlloc>::_M_allocate_buckets(std::size_t __bkt_count) + -> __buckets_ptr + { + __buckets_alloc_type __alloc(_M_node_allocator()); + + auto __ptr = __buckets_alloc_traits::allocate(__alloc, __bkt_count); + __buckets_ptr __p = std::__to_address(__ptr); + __builtin_memset(__p, 0, __bkt_count * sizeof(__node_base_ptr)); + return __p; + } + + template + void + _Hashtable_alloc<_NodeAlloc>:: + _M_deallocate_buckets(__buckets_ptr __bkts, + std::size_t __bkt_count) + { + typedef typename __buckets_alloc_traits::pointer _Ptr; + auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__bkts); + __buckets_alloc_type __alloc(_M_node_allocator()); + __buckets_alloc_traits::deallocate(__alloc, __ptr, __bkt_count); + } + + +} + +} +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/node_handle.h" 1 3 +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/node_handle.h" 3 + +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/node_handle.h" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/node_handle.h" 3 +namespace std +{ + + + + template + class _Node_handle_common + { + using _AllocTraits = allocator_traits<_NodeAlloc>; + + public: + using allocator_type = __alloc_rebind<_NodeAlloc, _Val>; + + allocator_type + get_allocator() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); + return allocator_type(_M_alloc._M_alloc); + } + + explicit operator bool() const noexcept { return _M_ptr != nullptr; } + + [[nodiscard]] bool empty() const noexcept { return _M_ptr == nullptr; } + + protected: + constexpr _Node_handle_common() noexcept : _M_ptr() { } + + ~_Node_handle_common() + { + if (!empty()) + _M_reset(); + } + + _Node_handle_common(_Node_handle_common&& __nh) noexcept + : _M_ptr(__nh._M_ptr) + { + if (_M_ptr) + _M_move(std::move(__nh)); + } + + _Node_handle_common& + operator=(_Node_handle_common&& __nh) noexcept + { + if (empty()) + { + if (!__nh.empty()) + _M_move(std::move(__nh)); + } + else if (__nh.empty()) + _M_reset(); + else + { + + _AllocTraits::destroy(*_M_alloc, _M_ptr->_M_valptr()); + _AllocTraits::deallocate(*_M_alloc, _M_ptr, 1); + + _M_alloc = __nh._M_alloc.release(); + _M_ptr = __nh._M_ptr; + __nh._M_ptr = nullptr; + } + return *this; + } + + _Node_handle_common(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _M_ptr(__ptr), _M_alloc(__alloc) + { + do { if (__builtin_is_constant_evaluated() && !bool(__ptr != nullptr)) __builtin_unreachable(); } while (false); + } + + void + _M_swap(_Node_handle_common& __nh) noexcept + { + if (empty()) + { + if (!__nh.empty()) + _M_move(std::move(__nh)); + } + else if (__nh.empty()) + __nh._M_move(std::move(*this)); + else + { + using std::swap; + swap(_M_ptr, __nh._M_ptr); + _M_alloc.swap(__nh._M_alloc); + } + } + + private: + + + + void + _M_move(_Node_handle_common&& __nh) noexcept + { + ::new (std::__addressof(_M_alloc)) _NodeAlloc(__nh._M_alloc.release()); + _M_ptr = __nh._M_ptr; + __nh._M_ptr = nullptr; + } + + + + + void + _M_reset() noexcept + { + _NodeAlloc __alloc = _M_alloc.release(); + _AllocTraits::destroy(__alloc, _M_ptr->_M_valptr()); + _AllocTraits::deallocate(__alloc, _M_ptr, 1); + _M_ptr = nullptr; + } + + protected: + typename _AllocTraits::pointer _M_ptr; + + private: + + + union _Optional_alloc + { + _Optional_alloc() { } + ~_Optional_alloc() { } + + _Optional_alloc(_Optional_alloc&&) = delete; + _Optional_alloc& operator=(_Optional_alloc&&) = delete; + + _Optional_alloc(const _NodeAlloc& __alloc) noexcept + : _M_alloc(__alloc) + { } + + + void + operator=(_NodeAlloc&& __alloc) noexcept + { + using _ATr = _AllocTraits; + if constexpr (_ATr::propagate_on_container_move_assignment::value) + _M_alloc = std::move(__alloc); + else if constexpr (!_AllocTraits::is_always_equal::value) + do { if (__builtin_is_constant_evaluated() && !bool(_M_alloc == __alloc)) __builtin_unreachable(); } while (false); + } + + + void + swap(_Optional_alloc& __other) noexcept + { + using std::swap; + if constexpr (_AllocTraits::propagate_on_container_swap::value) + swap(_M_alloc, __other._M_alloc); + else if constexpr (!_AllocTraits::is_always_equal::value) + do { if (__builtin_is_constant_evaluated() && !bool(_M_alloc == __other._M_alloc)) __builtin_unreachable(); } while (false); + } + + + _NodeAlloc& operator*() noexcept { return _M_alloc; } + + + _NodeAlloc release() noexcept + { + _NodeAlloc __tmp = std::move(_M_alloc); + _M_alloc.~_NodeAlloc(); + return __tmp; + } + + struct _Empty { }; + + [[__no_unique_address__]] _Empty _M_empty; + [[__no_unique_address__]] _NodeAlloc _M_alloc; + }; + + [[__no_unique_address__]] _Optional_alloc _M_alloc; + + template + friend class _Rb_tree; + }; + + + template + class _Node_handle : public _Node_handle_common<_Value, _NodeAlloc> + { + public: + constexpr _Node_handle() noexcept = default; + ~_Node_handle() = default; + _Node_handle(_Node_handle&&) noexcept = default; + + _Node_handle& + operator=(_Node_handle&&) noexcept = default; + + using key_type = _Key; + using mapped_type = typename _Value::second_type; + + key_type& + key() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); + return *_M_pkey; + } + + mapped_type& + mapped() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); + return *_M_pmapped; + } + + void + swap(_Node_handle& __nh) noexcept + { + this->_M_swap(__nh); + using std::swap; + swap(_M_pkey, __nh._M_pkey); + swap(_M_pmapped, __nh._M_pmapped); + } + + friend void + swap(_Node_handle& __x, _Node_handle& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + private: + using _AllocTraits = allocator_traits<_NodeAlloc>; + + _Node_handle(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _Node_handle_common<_Value, _NodeAlloc>(__ptr, __alloc) + { + if (__ptr) + { + auto& __key = const_cast<_Key&>(__ptr->_M_valptr()->first); + _M_pkey = _S_pointer_to(__key); + _M_pmapped = _S_pointer_to(__ptr->_M_valptr()->second); + } + else + { + _M_pkey = nullptr; + _M_pmapped = nullptr; + } + } + + template + using __pointer + = __ptr_rebind>; + + __pointer<_Key> _M_pkey = nullptr; + __pointer _M_pmapped = nullptr; + + template + __pointer<_Tp> + _S_pointer_to(_Tp& __obj) + { return pointer_traits<__pointer<_Tp>>::pointer_to(__obj); } + + const key_type& + _M_key() const noexcept { return key(); } + + template + friend class _Rb_tree; + + template + friend class _Hashtable; + }; + + + template + class _Node_handle<_Value, _Value, _NodeAlloc> + : public _Node_handle_common<_Value, _NodeAlloc> + { + public: + constexpr _Node_handle() noexcept = default; + ~_Node_handle() = default; + _Node_handle(_Node_handle&&) noexcept = default; + + _Node_handle& + operator=(_Node_handle&&) noexcept = default; + + using value_type = _Value; + + value_type& + value() const noexcept + { + do { if (__builtin_is_constant_evaluated() && !bool(!this->empty())) __builtin_unreachable(); } while (false); + return *this->_M_ptr->_M_valptr(); + } + + void + swap(_Node_handle& __nh) noexcept + { this->_M_swap(__nh); } + + friend void + swap(_Node_handle& __x, _Node_handle& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + private: + using _AllocTraits = allocator_traits<_NodeAlloc>; + + _Node_handle(typename _AllocTraits::pointer __ptr, + const _NodeAlloc& __alloc) + : _Node_handle_common<_Value, _NodeAlloc>(__ptr, __alloc) { } + + const value_type& + _M_key() const noexcept { return value(); } + + template + friend class _Rb_tree; + + template + friend class _Hashtable; + }; + + + template + struct _Node_insert_return + { + _Iterator position = _Iterator(); + bool inserted = false; + _NodeHandle node; + }; + + +} +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 2 3 + + +namespace std +{ + + + template + using __cache_default + = __not_<__and_< + __is_fast_hash<_Hash>, + + __is_nothrow_invocable>>; +# 164 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/hashtable.h" 3 + template + class _Hashtable + : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _Traits>, + public __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>, + public __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>, + public __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>, + public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>, + private __detail::_Hashtable_alloc< + __alloc_rebind<_Alloc, + __detail::_Hash_node<_Value, + _Traits::__hash_cached::value>>> + { + static_assert(is_same::type, _Value>::value, + "unordered container must have a non-const, non-volatile value_type"); + + static_assert(is_same{}, + "unordered container must have the same value_type as its allocator"); + + + using __traits_type = _Traits; + using __hash_cached = typename __traits_type::__hash_cached; + using __constant_iterators = typename __traits_type::__constant_iterators; + using __node_type = __detail::_Hash_node<_Value, __hash_cached::value>; + using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; + + using __hashtable_alloc = __detail::_Hashtable_alloc<__node_alloc_type>; + + using __node_value_type = + __detail::_Hash_node_value<_Value, __hash_cached::value>; + using __node_ptr = typename __hashtable_alloc::__node_ptr; + using __value_alloc_traits = + typename __hashtable_alloc::__value_alloc_traits; + using __node_alloc_traits = + typename __hashtable_alloc::__node_alloc_traits; + using __node_base = typename __hashtable_alloc::__node_base; + using __node_base_ptr = typename __hashtable_alloc::__node_base_ptr; + using __buckets_ptr = typename __hashtable_alloc::__buckets_ptr; + + using __insert_base = __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, + _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + public: + typedef _Key key_type; + typedef _Value value_type; + typedef _Alloc allocator_type; + typedef _Equal key_equal; + + + + typedef typename __value_alloc_traits::pointer pointer; + typedef typename __value_alloc_traits::const_pointer const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + + using iterator = typename __insert_base::iterator; + + using const_iterator = typename __insert_base::const_iterator; + + using local_iterator = __detail::_Local_iterator; + + using const_local_iterator = __detail::_Local_const_iterator< + key_type, _Value, + _ExtractKey, _Hash, _RangeHash, _Unused, + __constant_iterators::value, __hash_cached::value>; + + private: + using __rehash_type = _RehashPolicy; + using __rehash_state = typename __rehash_type::_State; + + using __unique_keys = typename __traits_type::__unique_keys; + + using __hashtable_base = __detail:: + _Hashtable_base<_Key, _Value, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, _Traits>; + + using __hash_code_base = typename __hashtable_base::__hash_code_base; + using __hash_code = typename __hashtable_base::__hash_code; + using __ireturn_type = typename __insert_base::__ireturn_type; + + using __map_base = __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + using __rehash_base = __detail::_Rehash_base<_Key, _Value, _Alloc, + _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + using __eq_base = __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, + _Equal, _Hash, _RangeHash, _Unused, + _RehashPolicy, _Traits>; + + using __reuse_or_alloc_node_gen_t = + __detail::_ReuseOrAllocNode<__node_alloc_type>; + using __alloc_node_gen_t = + __detail::_AllocNode<__node_alloc_type>; + + + struct _Scoped_node + { + + _Scoped_node(__node_ptr __n, __hashtable_alloc* __h) + : _M_h(__h), _M_node(__n) { } + + + template + _Scoped_node(__hashtable_alloc* __h, _Args&&... __args) + : _M_h(__h), + _M_node(__h->_M_allocate_node(std::forward<_Args>(__args)...)) + { } + + + ~_Scoped_node() { if (_M_node) _M_h->_M_deallocate_node(_M_node); }; + + _Scoped_node(const _Scoped_node&) = delete; + _Scoped_node& operator=(const _Scoped_node&) = delete; + + __hashtable_alloc* _M_h; + __node_ptr _M_node; + }; + + template + static constexpr + typename conditional::value, + const value_type&, value_type&&>::type + __fwd_value_for(value_type& __val) noexcept + { return std::move(__val); } + + + + + + struct __hash_code_base_access : __hash_code_base + { using __hash_code_base::_M_bucket_index; }; + + + + static_assert(noexcept(declval() + ._M_bucket_index(declval(), + (std::size_t)0)), + "Cache the hash code or qualify your functors involved" + " in hash code and bucket index computation with noexcept"); + + + static_assert(is_nothrow_default_constructible<_RangeHash>::value, + "Functor used to map hash code to bucket index" + " must be nothrow default constructible"); + static_assert(noexcept( + std::declval()((std::size_t)0, (std::size_t)0)), + "Functor used to map hash code to bucket index must be" + " noexcept"); + + + static_assert(is_nothrow_default_constructible<_ExtractKey>::value, + "_ExtractKey must be nothrow default constructible"); + static_assert(noexcept( + std::declval()(std::declval<_Value>())), + "_ExtractKey functor must be noexcept invocable"); + + template + friend struct __detail::_Map_base; + + template + friend struct __detail::_Insert_base; + + template + friend struct __detail::_Insert; + + template + friend struct __detail::_Equality; + + public: + using size_type = typename __hashtable_base::size_type; + using difference_type = typename __hashtable_base::difference_type; + + + using node_type = _Node_handle<_Key, _Value, __node_alloc_type>; + using insert_return_type = _Node_insert_return; + + + private: + __buckets_ptr _M_buckets = &_M_single_bucket; + size_type _M_bucket_count = 1; + __node_base _M_before_begin; + size_type _M_element_count = 0; + _RehashPolicy _M_rehash_policy; + + + + + + + + __node_base_ptr _M_single_bucket = nullptr; + + void + _M_update_bbegin() + { + if (_M_begin()) + _M_buckets[_M_bucket_index(*_M_begin())] = &_M_before_begin; + } + + void + _M_update_bbegin(__node_ptr __n) + { + _M_before_begin._M_nxt = __n; + _M_update_bbegin(); + } + + bool + _M_uses_single_bucket(__buckets_ptr __bkts) const + { return __builtin_expect(__bkts == &_M_single_bucket, false); } + + bool + _M_uses_single_bucket() const + { return _M_uses_single_bucket(_M_buckets); } + + __hashtable_alloc& + _M_base_alloc() { return *this; } + + __buckets_ptr + _M_allocate_buckets(size_type __bkt_count) + { + if (__builtin_expect(__bkt_count == 1, false)) + { + _M_single_bucket = nullptr; + return &_M_single_bucket; + } + + return __hashtable_alloc::_M_allocate_buckets(__bkt_count); + } + + void + _M_deallocate_buckets(__buckets_ptr __bkts, size_type __bkt_count) + { + if (_M_uses_single_bucket(__bkts)) + return; + + __hashtable_alloc::_M_deallocate_buckets(__bkts, __bkt_count); + } + + void + _M_deallocate_buckets() + { _M_deallocate_buckets(_M_buckets, _M_bucket_count); } + + + + __node_ptr + _M_bucket_begin(size_type __bkt) const; + + __node_ptr + _M_begin() const + { return static_cast<__node_ptr>(_M_before_begin._M_nxt); } + + + + template + void + _M_assign_elements(_Ht&&); + + template + void + _M_assign(_Ht&&, const _NodeGenerator&); + + void + _M_move_assign(_Hashtable&&, true_type); + + void + _M_move_assign(_Hashtable&&, false_type); + + void + _M_reset() noexcept; + + _Hashtable(const _Hash& __h, const _Equal& __eq, + const allocator_type& __a) + : __hashtable_base(__h, __eq), + __hashtable_alloc(__node_alloc_type(__a)) + { } + + template + static constexpr bool + _S_nothrow_move() + { + + + + + + if constexpr (_No_realloc) + if constexpr (is_nothrow_copy_constructible<_Hash>()) + return is_nothrow_copy_constructible<_Equal>(); + return false; + + } + + _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, + true_type ) + noexcept(_S_nothrow_move()); + + _Hashtable(_Hashtable&&, __node_alloc_type&&, + false_type ); + + template + _Hashtable(_InputIterator __first, _InputIterator __last, + size_type __bkt_count_hint, + const _Hash&, const _Equal&, const allocator_type&, + true_type __uks); + + template + _Hashtable(_InputIterator __first, _InputIterator __last, + size_type __bkt_count_hint, + const _Hash&, const _Equal&, const allocator_type&, + false_type __uks); + + public: + + _Hashtable() = default; + + _Hashtable(const _Hashtable&); + + _Hashtable(const _Hashtable&, const allocator_type&); + + explicit + _Hashtable(size_type __bkt_count_hint, + const _Hash& __hf = _Hash(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()); + + + _Hashtable(_Hashtable&& __ht) + noexcept(_S_nothrow_move()) + : _Hashtable(std::move(__ht), std::move(__ht._M_node_allocator()), + true_type{}) + { } + + _Hashtable(_Hashtable&& __ht, const allocator_type& __a) + noexcept(_S_nothrow_move<__node_alloc_traits::_S_always_equal()>()) + : _Hashtable(std::move(__ht), __node_alloc_type(__a), + typename __node_alloc_traits::is_always_equal{}) + { } + + explicit + _Hashtable(const allocator_type& __a) + : __hashtable_alloc(__node_alloc_type(__a)) + { } + + template + _Hashtable(_InputIterator __f, _InputIterator __l, + size_type __bkt_count_hint = 0, + const _Hash& __hf = _Hash(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _Hashtable(__f, __l, __bkt_count_hint, __hf, __eql, __a, + __unique_keys{}) + { } + + _Hashtable(initializer_list __l, + size_type __bkt_count_hint = 0, + const _Hash& __hf = _Hash(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _Hashtable(__l.begin(), __l.end(), __bkt_count_hint, + __hf, __eql, __a, __unique_keys{}) + { } + + _Hashtable& + operator=(const _Hashtable& __ht); + + _Hashtable& + operator=(_Hashtable&& __ht) + noexcept(__node_alloc_traits::_S_nothrow_move() + && is_nothrow_move_assignable<_Hash>::value + && is_nothrow_move_assignable<_Equal>::value) + { + constexpr bool __move_storage = + __node_alloc_traits::_S_propagate_on_move_assign() + || __node_alloc_traits::_S_always_equal(); + _M_move_assign(std::move(__ht), __bool_constant<__move_storage>()); + return *this; + } + + _Hashtable& + operator=(initializer_list __l) + { + __reuse_or_alloc_node_gen_t __roan(_M_begin(), *this); + _M_before_begin._M_nxt = nullptr; + clear(); + + + auto __l_bkt_count = _M_rehash_policy._M_bkt_for_elements(__l.size()); + + + if (_M_bucket_count < __l_bkt_count) + rehash(__l_bkt_count); + + this->_M_insert_range(__l.begin(), __l.end(), __roan, __unique_keys{}); + return *this; + } + + ~_Hashtable() noexcept; + + void + swap(_Hashtable&) + noexcept(__and_<__is_nothrow_swappable<_Hash>, + __is_nothrow_swappable<_Equal>>::value); + + + iterator + begin() noexcept + { return iterator(_M_begin()); } + + const_iterator + begin() const noexcept + { return const_iterator(_M_begin()); } + + iterator + end() noexcept + { return iterator(nullptr); } + + const_iterator + end() const noexcept + { return const_iterator(nullptr); } + + const_iterator + cbegin() const noexcept + { return const_iterator(_M_begin()); } + + const_iterator + cend() const noexcept + { return const_iterator(nullptr); } + + size_type + size() const noexcept + { return _M_element_count; } + + [[__nodiscard__]] bool + empty() const noexcept + { return size() == 0; } + + allocator_type + get_allocator() const noexcept + { return allocator_type(this->_M_node_allocator()); } + + size_type + max_size() const noexcept + { return __node_alloc_traits::max_size(this->_M_node_allocator()); } + + + key_equal + key_eq() const + { return this->_M_eq(); } + + + + + size_type + bucket_count() const noexcept + { return _M_bucket_count; } + + size_type + max_bucket_count() const noexcept + { return max_size(); } + + size_type + bucket_size(size_type __bkt) const + { return std::distance(begin(__bkt), end(__bkt)); } + + size_type + bucket(const key_type& __k) const + { return _M_bucket_index(this->_M_hash_code(__k)); } + + local_iterator + begin(size_type __bkt) + { + return local_iterator(*this, _M_bucket_begin(__bkt), + __bkt, _M_bucket_count); + } + + local_iterator + end(size_type __bkt) + { return local_iterator(*this, nullptr, __bkt, _M_bucket_count); } + + const_local_iterator + begin(size_type __bkt) const + { + return const_local_iterator(*this, _M_bucket_begin(__bkt), + __bkt, _M_bucket_count); + } + + const_local_iterator + end(size_type __bkt) const + { return const_local_iterator(*this, nullptr, __bkt, _M_bucket_count); } + + + const_local_iterator + cbegin(size_type __bkt) const + { + return const_local_iterator(*this, _M_bucket_begin(__bkt), + __bkt, _M_bucket_count); + } + + const_local_iterator + cend(size_type __bkt) const + { return const_local_iterator(*this, nullptr, __bkt, _M_bucket_count); } + + float + load_factor() const noexcept + { + return static_cast(size()) / static_cast(bucket_count()); + } + + + + + + + const _RehashPolicy& + __rehash_policy() const + { return _M_rehash_policy; } + + void + __rehash_policy(const _RehashPolicy& __pol) + { _M_rehash_policy = __pol; } + + + iterator + find(const key_type& __k); + + const_iterator + find(const key_type& __k) const; + + size_type + count(const key_type& __k) const; + + std::pair + equal_range(const key_type& __k); + + std::pair + equal_range(const key_type& __k) const; + + + + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + iterator + _M_find_tr(const _Kt& __k); + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + const_iterator + _M_find_tr(const _Kt& __k) const; + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + size_type + _M_count_tr(const _Kt& __k) const; + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + pair + _M_equal_range_tr(const _Kt& __k); + + template, + typename = __has_is_transparent_t<_Equal, _Kt>> + pair + _M_equal_range_tr(const _Kt& __k) const; + + + private: + + size_type + _M_bucket_index(const __node_value_type& __n) const noexcept + { return __hash_code_base::_M_bucket_index(__n, _M_bucket_count); } + + size_type + _M_bucket_index(__hash_code __c) const + { return __hash_code_base::_M_bucket_index(__c, _M_bucket_count); } + + + + __node_base_ptr + _M_find_before_node(size_type, const key_type&, __hash_code) const; + + template + __node_base_ptr + _M_find_before_node_tr(size_type, const _Kt&, __hash_code) const; + + __node_ptr + _M_find_node(size_type __bkt, const key_type& __key, + __hash_code __c) const + { + __node_base_ptr __before_n = _M_find_before_node(__bkt, __key, __c); + if (__before_n) + return static_cast<__node_ptr>(__before_n->_M_nxt); + return nullptr; + } + + template + __node_ptr + _M_find_node_tr(size_type __bkt, const _Kt& __key, + __hash_code __c) const + { + auto __before_n = _M_find_before_node_tr(__bkt, __key, __c); + if (__before_n) + return static_cast<__node_ptr>(__before_n->_M_nxt); + return nullptr; + } + + + void + _M_insert_bucket_begin(size_type, __node_ptr); + + + void + _M_remove_bucket_begin(size_type __bkt, __node_ptr __next_n, + size_type __next_bkt); + + + __node_base_ptr + _M_get_previous_node(size_type __bkt, __node_ptr __n); + + + + + iterator + _M_insert_unique_node(size_type __bkt, __hash_code, + __node_ptr __n, size_type __n_elt = 1); + + + + iterator + _M_insert_multi_node(__node_ptr __hint, + __hash_code __code, __node_ptr __n); + + template + std::pair + _M_emplace(true_type __uks, _Args&&... __args); + + template + iterator + _M_emplace(false_type __uks, _Args&&... __args) + { return _M_emplace(cend(), __uks, std::forward<_Args>(__args)...); } + + + template + iterator + _M_emplace(const_iterator, true_type __uks, _Args&&... __args) + { return _M_emplace(__uks, std::forward<_Args>(__args)...).first; } + + template + iterator + _M_emplace(const_iterator, false_type __uks, _Args&&... __args); + + template + std::pair + _M_insert(_Arg&&, const _NodeGenerator&, true_type __uks); + + template + iterator + _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, + false_type __uks) + { + return _M_insert(cend(), std::forward<_Arg>(__arg), __node_gen, + __uks); + } + + + template + iterator + _M_insert(const_iterator, _Arg&& __arg, + const _NodeGenerator& __node_gen, true_type __uks) + { + return + _M_insert(std::forward<_Arg>(__arg), __node_gen, __uks).first; + } + + + template + iterator + _M_insert(const_iterator, _Arg&&, + const _NodeGenerator&, false_type __uks); + + size_type + _M_erase(true_type __uks, const key_type&); + + size_type + _M_erase(false_type __uks, const key_type&); + + iterator + _M_erase(size_type __bkt, __node_base_ptr __prev_n, __node_ptr __n); + + public: + + template + __ireturn_type + emplace(_Args&&... __args) + { return _M_emplace(__unique_keys{}, std::forward<_Args>(__args)...); } + + template + iterator + emplace_hint(const_iterator __hint, _Args&&... __args) + { + return _M_emplace(__hint, __unique_keys{}, + std::forward<_Args>(__args)...); + } + + + + + iterator + erase(const_iterator); + + + iterator + erase(iterator __it) + { return erase(const_iterator(__it)); } + + size_type + erase(const key_type& __k) + { return _M_erase(__unique_keys{}, __k); } + + iterator + erase(const_iterator, const_iterator); + + void + clear() noexcept; + + + + void rehash(size_type __bkt_count); + + + + + + + insert_return_type + _M_reinsert_node(node_type&& __nh) + { + insert_return_type __ret; + if (__nh.empty()) + __ret.position = end(); + else + { + do { if (__builtin_is_constant_evaluated() && !bool(get_allocator() == __nh.get_allocator())) __builtin_unreachable(); } while (false); + + const key_type& __k = __nh._M_key(); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__code); + if (__node_ptr __n = _M_find_node(__bkt, __k, __code)) + { + __ret.node = std::move(__nh); + __ret.position = iterator(__n); + __ret.inserted = false; + } + else + { + __ret.position + = _M_insert_unique_node(__bkt, __code, __nh._M_ptr); + __nh._M_ptr = nullptr; + __ret.inserted = true; + } + } + return __ret; + } + + + iterator + _M_reinsert_node_multi(const_iterator __hint, node_type&& __nh) + { + if (__nh.empty()) + return end(); + + do { if (__builtin_is_constant_evaluated() && !bool(get_allocator() == __nh.get_allocator())) __builtin_unreachable(); } while (false); + + const key_type& __k = __nh._M_key(); + auto __code = this->_M_hash_code(__k); + auto __ret + = _M_insert_multi_node(__hint._M_cur, __code, __nh._M_ptr); + __nh._M_ptr = nullptr; + return __ret; + } + + private: + node_type + _M_extract_node(size_t __bkt, __node_base_ptr __prev_n) + { + __node_ptr __n = static_cast<__node_ptr>(__prev_n->_M_nxt); + if (__prev_n == _M_buckets[__bkt]) + _M_remove_bucket_begin(__bkt, __n->_M_next(), + __n->_M_nxt ? _M_bucket_index(*__n->_M_next()) : 0); + else if (__n->_M_nxt) + { + size_type __next_bkt = _M_bucket_index(*__n->_M_next()); + if (__next_bkt != __bkt) + _M_buckets[__next_bkt] = __prev_n; + } + + __prev_n->_M_nxt = __n->_M_nxt; + __n->_M_nxt = nullptr; + --_M_element_count; + return { __n, this->_M_node_allocator() }; + } + + public: + + node_type + extract(const_iterator __pos) + { + size_t __bkt = _M_bucket_index(*__pos._M_cur); + return _M_extract_node(__bkt, + _M_get_previous_node(__bkt, __pos._M_cur)); + } + + + node_type + extract(const _Key& __k) + { + node_type __nh; + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + if (__node_base_ptr __prev_node = _M_find_before_node(__bkt, __k, __code)) + __nh = _M_extract_node(__bkt, __prev_node); + return __nh; + } + + + template + void + _M_merge_unique(_Compatible_Hashtable& __src) noexcept + { + static_assert(is_same_v, "Node types are compatible"); + do { if (__builtin_is_constant_evaluated() && !bool(get_allocator() == __src.get_allocator())) __builtin_unreachable(); } while (false); + + auto __n_elt = __src.size(); + for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) + { + auto __pos = __i++; + const key_type& __k = _ExtractKey{}(*__pos); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__code); + if (_M_find_node(__bkt, __k, __code) == nullptr) + { + auto __nh = __src.extract(__pos); + _M_insert_unique_node(__bkt, __code, __nh._M_ptr, __n_elt); + __nh._M_ptr = nullptr; + __n_elt = 1; + } + else if (__n_elt != 1) + --__n_elt; + } + } + + + template + void + _M_merge_multi(_Compatible_Hashtable& __src) noexcept + { + static_assert(is_same_v, "Node types are compatible"); + do { if (__builtin_is_constant_evaluated() && !bool(get_allocator() == __src.get_allocator())) __builtin_unreachable(); } while (false); + + this->reserve(size() + __src.size()); + for (auto __i = __src.begin(), __end = __src.end(); __i != __end;) + _M_reinsert_node_multi(cend(), __src.extract(__i++)); + } + + + private: + + void _M_rehash_aux(size_type __bkt_count, true_type __uks); + + + void _M_rehash_aux(size_type __bkt_count, false_type __uks); + + + + void _M_rehash(size_type __bkt_count, const __rehash_state& __state); + }; + + + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_bucket_begin(size_type __bkt) const + -> __node_ptr + { + __node_base_ptr __n = _M_buckets[__bkt]; + return __n ? static_cast<__node_ptr>(__n->_M_nxt) : nullptr; + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(size_type __bkt_count_hint, + const _Hash& __h, const _Equal& __eq, const allocator_type& __a) + : _Hashtable(__h, __eq, __a) + { + auto __bkt_count = _M_rehash_policy._M_next_bkt(__bkt_count_hint); + if (__bkt_count > _M_bucket_count) + { + _M_buckets = _M_allocate_buckets(__bkt_count); + _M_bucket_count = __bkt_count; + } + } + + template + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(_InputIterator __f, _InputIterator __l, + size_type __bkt_count_hint, + const _Hash& __h, const _Equal& __eq, + const allocator_type& __a, true_type ) + : _Hashtable(__bkt_count_hint, __h, __eq, __a) + { + for (; __f != __l; ++__f) + this->insert(*__f); + } + + template + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(_InputIterator __f, _InputIterator __l, + size_type __bkt_count_hint, + const _Hash& __h, const _Equal& __eq, + const allocator_type& __a, false_type ) + : _Hashtable(__h, __eq, __a) + { + auto __nb_elems = __detail::__distance_fw(__f, __l); + auto __bkt_count = + _M_rehash_policy._M_next_bkt( + std::max(_M_rehash_policy._M_bkt_for_elements(__nb_elems), + __bkt_count_hint)); + + if (__bkt_count > _M_bucket_count) + { + _M_buckets = _M_allocate_buckets(__bkt_count); + _M_bucket_count = __bkt_count; + } + + for (; __f != __l; ++__f) + this->insert(*__f); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + operator=(const _Hashtable& __ht) + -> _Hashtable& + { + if (&__ht == this) + return *this; + + if (__node_alloc_traits::_S_propagate_on_copy_assign()) + { + auto& __this_alloc = this->_M_node_allocator(); + auto& __that_alloc = __ht._M_node_allocator(); + if (!__node_alloc_traits::_S_always_equal() + && __this_alloc != __that_alloc) + { + + this->_M_deallocate_nodes(_M_begin()); + _M_before_begin._M_nxt = nullptr; + _M_deallocate_buckets(); + _M_buckets = nullptr; + std::__alloc_on_copy(__this_alloc, __that_alloc); + __hashtable_base::operator=(__ht); + _M_bucket_count = __ht._M_bucket_count; + _M_element_count = __ht._M_element_count; + _M_rehash_policy = __ht._M_rehash_policy; + __alloc_node_gen_t __alloc_node_gen(*this); + try + { + _M_assign(__ht, __alloc_node_gen); + } + catch(...) + { + + + _M_reset(); + throw; + } + return *this; + } + std::__alloc_on_copy(__this_alloc, __that_alloc); + } + + + _M_assign_elements(__ht); + return *this; + } + + template + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_assign_elements(_Ht&& __ht) + { + __buckets_ptr __former_buckets = nullptr; + std::size_t __former_bucket_count = _M_bucket_count; + const __rehash_state& __former_state = _M_rehash_policy._M_state(); + + if (_M_bucket_count != __ht._M_bucket_count) + { + __former_buckets = _M_buckets; + _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); + _M_bucket_count = __ht._M_bucket_count; + } + else + __builtin_memset(_M_buckets, 0, + _M_bucket_count * sizeof(__node_base_ptr)); + + try + { + __hashtable_base::operator=(std::forward<_Ht>(__ht)); + _M_element_count = __ht._M_element_count; + _M_rehash_policy = __ht._M_rehash_policy; + __reuse_or_alloc_node_gen_t __roan(_M_begin(), *this); + _M_before_begin._M_nxt = nullptr; + _M_assign(std::forward<_Ht>(__ht), __roan); + if (__former_buckets) + _M_deallocate_buckets(__former_buckets, __former_bucket_count); + } + catch(...) + { + if (__former_buckets) + { + + _M_deallocate_buckets(); + _M_rehash_policy._M_reset(__former_state); + _M_buckets = __former_buckets; + _M_bucket_count = __former_bucket_count; + } + __builtin_memset(_M_buckets, 0, + _M_bucket_count * sizeof(__node_base_ptr)); + throw; + } + } + + template + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_assign(_Ht&& __ht, const _NodeGenerator& __node_gen) + { + __buckets_ptr __buckets = nullptr; + if (!_M_buckets) + _M_buckets = __buckets = _M_allocate_buckets(_M_bucket_count); + + try + { + if (!__ht._M_before_begin._M_nxt) + return; + + + + __node_ptr __ht_n = __ht._M_begin(); + __node_ptr __this_n + = __node_gen(__fwd_value_for<_Ht>(__ht_n->_M_v())); + this->_M_copy_code(*__this_n, *__ht_n); + _M_update_bbegin(__this_n); + + + __node_ptr __prev_n = __this_n; + for (__ht_n = __ht_n->_M_next(); __ht_n; __ht_n = __ht_n->_M_next()) + { + __this_n = __node_gen(__fwd_value_for<_Ht>(__ht_n->_M_v())); + __prev_n->_M_nxt = __this_n; + this->_M_copy_code(*__this_n, *__ht_n); + size_type __bkt = _M_bucket_index(*__this_n); + if (!_M_buckets[__bkt]) + _M_buckets[__bkt] = __prev_n; + __prev_n = __this_n; + } + } + catch(...) + { + clear(); + if (__buckets) + _M_deallocate_buckets(); + throw; + } + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_reset() noexcept + { + _M_rehash_policy._M_reset(); + _M_bucket_count = 1; + _M_single_bucket = nullptr; + _M_buckets = &_M_single_bucket; + _M_before_begin._M_nxt = nullptr; + _M_element_count = 0; + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_move_assign(_Hashtable&& __ht, true_type) + { + if (__builtin_expect(std::__addressof(__ht) == this, false)) + return; + + this->_M_deallocate_nodes(_M_begin()); + _M_deallocate_buckets(); + __hashtable_base::operator=(std::move(__ht)); + _M_rehash_policy = __ht._M_rehash_policy; + if (!__ht._M_uses_single_bucket()) + _M_buckets = __ht._M_buckets; + else + { + _M_buckets = &_M_single_bucket; + _M_single_bucket = __ht._M_single_bucket; + } + + _M_bucket_count = __ht._M_bucket_count; + _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; + _M_element_count = __ht._M_element_count; + std::__alloc_on_move(this->_M_node_allocator(), __ht._M_node_allocator()); + + + _M_update_bbegin(); + __ht._M_reset(); + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_move_assign(_Hashtable&& __ht, false_type) + { + if (__ht._M_node_allocator() == this->_M_node_allocator()) + _M_move_assign(std::move(__ht), true_type{}); + else + { + + _M_assign_elements(std::move(__ht)); + __ht.clear(); + } + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(const _Hashtable& __ht) + : __hashtable_base(__ht), + __map_base(__ht), + __rehash_base(__ht), + __hashtable_alloc( + __node_alloc_traits::_S_select_on_copy(__ht._M_node_allocator())), + _M_buckets(nullptr), + _M_bucket_count(__ht._M_bucket_count), + _M_element_count(__ht._M_element_count), + _M_rehash_policy(__ht._M_rehash_policy) + { + __alloc_node_gen_t __alloc_node_gen(*this); + _M_assign(__ht, __alloc_node_gen); + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, + true_type ) + noexcept(_S_nothrow_move()) + : __hashtable_base(__ht), + __map_base(__ht), + __rehash_base(__ht), + __hashtable_alloc(std::move(__a)), + _M_buckets(__ht._M_buckets), + _M_bucket_count(__ht._M_bucket_count), + _M_before_begin(__ht._M_before_begin._M_nxt), + _M_element_count(__ht._M_element_count), + _M_rehash_policy(__ht._M_rehash_policy) + { + + if (__ht._M_uses_single_bucket()) + { + _M_buckets = &_M_single_bucket; + _M_single_bucket = __ht._M_single_bucket; + } + + + _M_update_bbegin(); + + __ht._M_reset(); + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(const _Hashtable& __ht, const allocator_type& __a) + : __hashtable_base(__ht), + __map_base(__ht), + __rehash_base(__ht), + __hashtable_alloc(__node_alloc_type(__a)), + _M_buckets(), + _M_bucket_count(__ht._M_bucket_count), + _M_element_count(__ht._M_element_count), + _M_rehash_policy(__ht._M_rehash_policy) + { + __alloc_node_gen_t __alloc_node_gen(*this); + _M_assign(__ht, __alloc_node_gen); + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, + false_type ) + : __hashtable_base(__ht), + __map_base(__ht), + __rehash_base(__ht), + __hashtable_alloc(std::move(__a)), + _M_buckets(nullptr), + _M_bucket_count(__ht._M_bucket_count), + _M_element_count(__ht._M_element_count), + _M_rehash_policy(__ht._M_rehash_policy) + { + if (__ht._M_node_allocator() == this->_M_node_allocator()) + { + if (__ht._M_uses_single_bucket()) + { + _M_buckets = &_M_single_bucket; + _M_single_bucket = __ht._M_single_bucket; + } + else + _M_buckets = __ht._M_buckets; + + + + _M_update_bbegin(__ht._M_begin()); + + __ht._M_reset(); + } + else + { + __alloc_node_gen_t __alloc_gen(*this); + + using _Fwd_Ht = typename + conditional<__move_if_noexcept_cond::value, + const _Hashtable&, _Hashtable&&>::type; + _M_assign(std::forward<_Fwd_Ht>(__ht), __alloc_gen); + __ht.clear(); + } + } + + template + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + ~_Hashtable() noexcept + { + clear(); + _M_deallocate_buckets(); + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + swap(_Hashtable& __x) + noexcept(__and_<__is_nothrow_swappable<_Hash>, + __is_nothrow_swappable<_Equal>>::value) + { + + + + this->_M_swap(__x); + + std::__alloc_on_swap(this->_M_node_allocator(), __x._M_node_allocator()); + std::swap(_M_rehash_policy, __x._M_rehash_policy); + + + if (this->_M_uses_single_bucket()) + { + if (!__x._M_uses_single_bucket()) + { + _M_buckets = __x._M_buckets; + __x._M_buckets = &__x._M_single_bucket; + } + } + else if (__x._M_uses_single_bucket()) + { + __x._M_buckets = _M_buckets; + _M_buckets = &_M_single_bucket; + } + else + std::swap(_M_buckets, __x._M_buckets); + + std::swap(_M_bucket_count, __x._M_bucket_count); + std::swap(_M_before_begin._M_nxt, __x._M_before_begin._M_nxt); + std::swap(_M_element_count, __x._M_element_count); + std::swap(_M_single_bucket, __x._M_single_bucket); + + + + _M_update_bbegin(); + __x._M_update_bbegin(); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + find(const key_type& __k) + -> iterator + { + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + return iterator(_M_find_node(__bkt, __k, __code)); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + find(const key_type& __k) const + -> const_iterator + { + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + return const_iterator(_M_find_node(__bkt, __k, __code)); + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_find_tr(const _Kt& __k) + -> iterator + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + return iterator(_M_find_node_tr(__bkt, __k, __code)); + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_find_tr(const _Kt& __k) const + -> const_iterator + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + return const_iterator(_M_find_node_tr(__bkt, __k, __code)); + } + + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + count(const key_type& __k) const + -> size_type + { + auto __it = find(__k); + if (!__it._M_cur) + return 0; + + if (__unique_keys::value) + return 1; + + + + + size_type __result = 1; + for (auto __ref = __it++; + __it._M_cur && this->_M_node_equals(*__ref._M_cur, *__it._M_cur); + ++__it) + ++__result; + + return __result; + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_count_tr(const _Kt& __k) const + -> size_type + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + auto __n = _M_find_node_tr(__bkt, __k, __code); + if (!__n) + return 0; + + + + + iterator __it(__n); + size_type __result = 1; + for (++__it; + __it._M_cur && this->_M_equals_tr(__k, __code, *__it._M_cur); + ++__it) + ++__result; + + return __result; + } + + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + equal_range(const key_type& __k) + -> pair + { + auto __ite = find(__k); + if (!__ite._M_cur) + return { __ite, __ite }; + + auto __beg = __ite++; + if (__unique_keys::value) + return { __beg, __ite }; + + + + + while (__ite._M_cur && this->_M_node_equals(*__beg._M_cur, *__ite._M_cur)) + ++__ite; + + return { __beg, __ite }; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + equal_range(const key_type& __k) const + -> pair + { + auto __ite = find(__k); + if (!__ite._M_cur) + return { __ite, __ite }; + + auto __beg = __ite++; + if (__unique_keys::value) + return { __beg, __ite }; + + + + + while (__ite._M_cur && this->_M_node_equals(*__beg._M_cur, *__ite._M_cur)) + ++__ite; + + return { __beg, __ite }; + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_equal_range_tr(const _Kt& __k) + -> pair + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + auto __n = _M_find_node_tr(__bkt, __k, __code); + iterator __ite(__n); + if (!__n) + return { __ite, __ite }; + + + + + auto __beg = __ite++; + while (__ite._M_cur && this->_M_equals_tr(__k, __code, *__ite._M_cur)) + ++__ite; + + return { __beg, __ite }; + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_equal_range_tr(const _Kt& __k) const + -> pair + { + __hash_code __code = this->_M_hash_code_tr(__k); + std::size_t __bkt = _M_bucket_index(__code); + auto __n = _M_find_node_tr(__bkt, __k, __code); + const_iterator __ite(__n); + if (!__n) + return { __ite, __ite }; + + + + + auto __beg = __ite++; + while (__ite._M_cur && this->_M_equals_tr(__k, __code, *__ite._M_cur)) + ++__ite; + + return { __beg, __ite }; + } + + + + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_find_before_node(size_type __bkt, const key_type& __k, + __hash_code __code) const + -> __node_base_ptr + { + __node_base_ptr __prev_p = _M_buckets[__bkt]; + if (!__prev_p) + return nullptr; + + for (__node_ptr __p = static_cast<__node_ptr>(__prev_p->_M_nxt);; + __p = __p->_M_next()) + { + if (this->_M_equals(__k, __code, *__p)) + return __prev_p; + + if (!__p->_M_nxt || _M_bucket_index(*__p->_M_next()) != __bkt) + break; + __prev_p = __p; + } + + return nullptr; + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_find_before_node_tr(size_type __bkt, const _Kt& __k, + __hash_code __code) const + -> __node_base_ptr + { + __node_base_ptr __prev_p = _M_buckets[__bkt]; + if (!__prev_p) + return nullptr; + + for (__node_ptr __p = static_cast<__node_ptr>(__prev_p->_M_nxt);; + __p = __p->_M_next()) + { + if (this->_M_equals_tr(__k, __code, *__p)) + return __prev_p; + + if (!__p->_M_nxt || _M_bucket_index(*__p->_M_next()) != __bkt) + break; + __prev_p = __p; + } + + return nullptr; + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert_bucket_begin(size_type __bkt, __node_ptr __node) + { + if (_M_buckets[__bkt]) + { + + + __node->_M_nxt = _M_buckets[__bkt]->_M_nxt; + _M_buckets[__bkt]->_M_nxt = __node; + } + else + { + + + + __node->_M_nxt = _M_before_begin._M_nxt; + _M_before_begin._M_nxt = __node; + + if (__node->_M_nxt) + + + _M_buckets[_M_bucket_index(*__node->_M_next())] = __node; + + _M_buckets[__bkt] = &_M_before_begin; + } + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_remove_bucket_begin(size_type __bkt, __node_ptr __next, + size_type __next_bkt) + { + if (!__next || __next_bkt != __bkt) + { + + + if (__next) + _M_buckets[__next_bkt] = _M_buckets[__bkt]; + + + if (&_M_before_begin == _M_buckets[__bkt]) + _M_before_begin._M_nxt = __next; + _M_buckets[__bkt] = nullptr; + } + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_get_previous_node(size_type __bkt, __node_ptr __n) + -> __node_base_ptr + { + __node_base_ptr __prev_n = _M_buckets[__bkt]; + while (__prev_n->_M_nxt != __n) + __prev_n = __prev_n->_M_nxt; + return __prev_n; + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_emplace(true_type , _Args&&... __args) + -> pair + { + + _Scoped_node __node { this, std::forward<_Args>(__args)... }; + const key_type& __k = _ExtractKey{}(__node._M_node->_M_v()); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__code); + if (__node_ptr __p = _M_find_node(__bkt, __k, __code)) + + return std::make_pair(iterator(__p), false); + + + auto __pos = _M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return { __pos, true }; + } + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_emplace(const_iterator __hint, false_type , + _Args&&... __args) + -> iterator + { + + _Scoped_node __node { this, std::forward<_Args>(__args)... }; + const key_type& __k = _ExtractKey{}(__node._M_node->_M_v()); + + __hash_code __code = this->_M_hash_code(__k); + auto __pos + = _M_insert_multi_node(__hint._M_cur, __code, __node._M_node); + __node._M_node = nullptr; + return __pos; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert_unique_node(size_type __bkt, __hash_code __code, + __node_ptr __node, size_type __n_elt) + -> iterator + { + const __rehash_state& __saved_state = _M_rehash_policy._M_state(); + std::pair __do_rehash + = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, + __n_elt); + + if (__do_rehash.first) + { + _M_rehash(__do_rehash.second, __saved_state); + __bkt = _M_bucket_index(__code); + } + + this->_M_store_code(*__node, __code); + + + _M_insert_bucket_begin(__bkt, __node); + ++_M_element_count; + return iterator(__node); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert_multi_node(__node_ptr __hint, + __hash_code __code, __node_ptr __node) + -> iterator + { + const __rehash_state& __saved_state = _M_rehash_policy._M_state(); + std::pair __do_rehash + = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); + + if (__do_rehash.first) + _M_rehash(__do_rehash.second, __saved_state); + + this->_M_store_code(*__node, __code); + const key_type& __k = _ExtractKey{}(__node->_M_v()); + size_type __bkt = _M_bucket_index(__code); + + + + __node_base_ptr __prev + = __builtin_expect(__hint != nullptr, false) + && this->_M_equals(__k, __code, *__hint) + ? __hint + : _M_find_before_node(__bkt, __k, __code); + + if (__prev) + { + + __node->_M_nxt = __prev->_M_nxt; + __prev->_M_nxt = __node; + if (__builtin_expect(__prev == __hint, false)) + + + if (__node->_M_nxt + && !this->_M_equals(__k, __code, *__node->_M_next())) + { + size_type __next_bkt = _M_bucket_index(*__node->_M_next()); + if (__next_bkt != __bkt) + _M_buckets[__next_bkt] = __node; + } + } + else + + + + _M_insert_bucket_begin(__bkt, __node); + ++_M_element_count; + return iterator(__node); + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert(_Arg&& __v, const _NodeGenerator& __node_gen, + true_type ) + -> pair + { + const key_type& __k = _ExtractKey{}(__v); + __hash_code __code = this->_M_hash_code(__k); + size_type __bkt = _M_bucket_index(__code); + + if (__node_ptr __node = _M_find_node(__bkt, __k, __code)) + return { iterator(__node), false }; + + _Scoped_node __node{ __node_gen(std::forward<_Arg>(__v)), this }; + auto __pos + = _M_insert_unique_node(__bkt, __code, __node._M_node); + __node._M_node = nullptr; + return { __pos, true }; + } + + + template + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_insert(const_iterator __hint, _Arg&& __v, + const _NodeGenerator& __node_gen, + false_type ) + -> iterator + { + + + __hash_code __code = this->_M_hash_code(_ExtractKey{}(__v)); + + + _Scoped_node __node{ __node_gen(std::forward<_Arg>(__v)), this }; + auto __pos + = _M_insert_multi_node(__hint._M_cur, __code, __node._M_node); + __node._M_node = nullptr; + return __pos; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + erase(const_iterator __it) + -> iterator + { + __node_ptr __n = __it._M_cur; + std::size_t __bkt = _M_bucket_index(*__n); + + + + + __node_base_ptr __prev_n = _M_get_previous_node(__bkt, __n); + return _M_erase(__bkt, __prev_n, __n); + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_erase(size_type __bkt, __node_base_ptr __prev_n, __node_ptr __n) + -> iterator + { + if (__prev_n == _M_buckets[__bkt]) + _M_remove_bucket_begin(__bkt, __n->_M_next(), + __n->_M_nxt ? _M_bucket_index(*__n->_M_next()) : 0); + else if (__n->_M_nxt) + { + size_type __next_bkt = _M_bucket_index(*__n->_M_next()); + if (__next_bkt != __bkt) + _M_buckets[__next_bkt] = __prev_n; + } + + __prev_n->_M_nxt = __n->_M_nxt; + iterator __result(__n->_M_next()); + this->_M_deallocate_node(__n); + --_M_element_count; + + return __result; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_erase(true_type , const key_type& __k) + -> size_type + { + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + + + __node_base_ptr __prev_n = _M_find_before_node(__bkt, __k, __code); + if (!__prev_n) + return 0; + + + __node_ptr __n = static_cast<__node_ptr>(__prev_n->_M_nxt); + _M_erase(__bkt, __prev_n, __n); + return 1; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_erase(false_type , const key_type& __k) + -> size_type + { + __hash_code __code = this->_M_hash_code(__k); + std::size_t __bkt = _M_bucket_index(__code); + + + __node_base_ptr __prev_n = _M_find_before_node(__bkt, __k, __code); + if (!__prev_n) + return 0; + + + + + + + + __node_ptr __n = static_cast<__node_ptr>(__prev_n->_M_nxt); + __node_ptr __n_last = __n->_M_next(); + while (__n_last && this->_M_node_equals(*__n, *__n_last)) + __n_last = __n_last->_M_next(); + + std::size_t __n_last_bkt = __n_last ? _M_bucket_index(*__n_last) : __bkt; + + + size_type __result = 0; + do + { + __node_ptr __p = __n->_M_next(); + this->_M_deallocate_node(__n); + __n = __p; + ++__result; + } + while (__n != __n_last); + + _M_element_count -= __result; + if (__prev_n == _M_buckets[__bkt]) + _M_remove_bucket_begin(__bkt, __n_last, __n_last_bkt); + else if (__n_last_bkt != __bkt) + _M_buckets[__n_last_bkt] = __prev_n; + __prev_n->_M_nxt = __n_last; + return __result; + } + + template + auto + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + erase(const_iterator __first, const_iterator __last) + -> iterator + { + __node_ptr __n = __first._M_cur; + __node_ptr __last_n = __last._M_cur; + if (__n == __last_n) + return iterator(__n); + + std::size_t __bkt = _M_bucket_index(*__n); + + __node_base_ptr __prev_n = _M_get_previous_node(__bkt, __n); + bool __is_bucket_begin = __n == _M_bucket_begin(__bkt); + std::size_t __n_bkt = __bkt; + for (;;) + { + do + { + __node_ptr __tmp = __n; + __n = __n->_M_next(); + this->_M_deallocate_node(__tmp); + --_M_element_count; + if (!__n) + break; + __n_bkt = _M_bucket_index(*__n); + } + while (__n != __last_n && __n_bkt == __bkt); + if (__is_bucket_begin) + _M_remove_bucket_begin(__bkt, __n, __n_bkt); + if (__n == __last_n) + break; + __is_bucket_begin = true; + __bkt = __n_bkt; + } + + if (__n && (__n_bkt != __bkt || __is_bucket_begin)) + _M_buckets[__n_bkt] = __prev_n; + __prev_n->_M_nxt = __n; + return iterator(__n); + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + clear() noexcept + { + this->_M_deallocate_nodes(_M_begin()); + __builtin_memset(_M_buckets, 0, + _M_bucket_count * sizeof(__node_base_ptr)); + _M_element_count = 0; + _M_before_begin._M_nxt = nullptr; + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + rehash(size_type __bkt_count) + { + const __rehash_state& __saved_state = _M_rehash_policy._M_state(); + __bkt_count + = std::max(_M_rehash_policy._M_bkt_for_elements(_M_element_count + 1), + __bkt_count); + __bkt_count = _M_rehash_policy._M_next_bkt(__bkt_count); + + if (__bkt_count != _M_bucket_count) + _M_rehash(__bkt_count, __saved_state); + else + + + _M_rehash_policy._M_reset(__saved_state); + } + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_rehash(size_type __bkt_count, const __rehash_state& __state) + { + try + { + _M_rehash_aux(__bkt_count, __unique_keys{}); + } + catch(...) + { + + + _M_rehash_policy._M_reset(__state); + throw; + } + } + + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_rehash_aux(size_type __bkt_count, true_type ) + { + __buckets_ptr __new_buckets = _M_allocate_buckets(__bkt_count); + __node_ptr __p = _M_begin(); + _M_before_begin._M_nxt = nullptr; + std::size_t __bbegin_bkt = 0; + while (__p) + { + __node_ptr __next = __p->_M_next(); + std::size_t __bkt + = __hash_code_base::_M_bucket_index(*__p, __bkt_count); + if (!__new_buckets[__bkt]) + { + __p->_M_nxt = _M_before_begin._M_nxt; + _M_before_begin._M_nxt = __p; + __new_buckets[__bkt] = &_M_before_begin; + if (__p->_M_nxt) + __new_buckets[__bbegin_bkt] = __p; + __bbegin_bkt = __bkt; + } + else + { + __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; + __new_buckets[__bkt]->_M_nxt = __p; + } + + __p = __next; + } + + _M_deallocate_buckets(); + _M_bucket_count = __bkt_count; + _M_buckets = __new_buckets; + } + + + + template + void + _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, + _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>:: + _M_rehash_aux(size_type __bkt_count, false_type ) + { + __buckets_ptr __new_buckets = _M_allocate_buckets(__bkt_count); + __node_ptr __p = _M_begin(); + _M_before_begin._M_nxt = nullptr; + std::size_t __bbegin_bkt = 0; + std::size_t __prev_bkt = 0; + __node_ptr __prev_p = nullptr; + bool __check_bucket = false; + + while (__p) + { + __node_ptr __next = __p->_M_next(); + std::size_t __bkt + = __hash_code_base::_M_bucket_index(*__p, __bkt_count); + + if (__prev_p && __prev_bkt == __bkt) + { + + + + __p->_M_nxt = __prev_p->_M_nxt; + __prev_p->_M_nxt = __p; + + + + + + + __check_bucket = true; + } + else + { + if (__check_bucket) + { + + + if (__prev_p->_M_nxt) + { + std::size_t __next_bkt + = __hash_code_base::_M_bucket_index( + *__prev_p->_M_next(), __bkt_count); + if (__next_bkt != __prev_bkt) + __new_buckets[__next_bkt] = __prev_p; + } + __check_bucket = false; + } + + if (!__new_buckets[__bkt]) + { + __p->_M_nxt = _M_before_begin._M_nxt; + _M_before_begin._M_nxt = __p; + __new_buckets[__bkt] = &_M_before_begin; + if (__p->_M_nxt) + __new_buckets[__bbegin_bkt] = __p; + __bbegin_bkt = __bkt; + } + else + { + __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; + __new_buckets[__bkt]->_M_nxt = __p; + } + } + __prev_p = __p; + __prev_bkt = __bkt; + __p = __next; + } + + if (__check_bucket && __prev_p->_M_nxt) + { + std::size_t __next_bkt + = __hash_code_base::_M_bucket_index(*__prev_p->_M_next(), + __bkt_count); + if (__next_bkt != __prev_bkt) + __new_buckets[__next_bkt] = __prev_p; + } + + _M_deallocate_buckets(); + _M_bucket_count = __bkt_count; + _M_buckets = __new_buckets; + } + + + template class _Hash_merge_helper { }; + + + + + template + using _RequireNotAllocatorOrIntegral + = __enable_if_t, __is_allocator<_Hash>>::value>; + + + +} +# 47 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 +namespace std +{ + + + + + template + using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>; + + template, + typename _Pred = std::equal_to<_Key>, + typename _Alloc = std::allocator >, + typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>> + using __umap_hashtable = _Hashtable<_Key, std::pair, + _Alloc, __detail::_Select1st, + _Pred, _Hash, + __detail::_Mod_range_hashing, + __detail::_Default_ranged_hash, + __detail::_Prime_rehash_policy, _Tr>; + + + template + using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>; + + template, + typename _Pred = std::equal_to<_Key>, + typename _Alloc = std::allocator >, + typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>> + using __ummap_hashtable = _Hashtable<_Key, std::pair, + _Alloc, __detail::_Select1st, + _Pred, _Hash, + __detail::_Mod_range_hashing, + __detail::_Default_ranged_hash, + __detail::_Prime_rehash_policy, _Tr>; + + template + class unordered_multimap; +# 98 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template, + typename _Pred = equal_to<_Key>, + typename _Alloc = allocator>> + class unordered_map + { + typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; + _Hashtable _M_h; + + public: + + + + typedef typename _Hashtable::key_type key_type; + typedef typename _Hashtable::value_type value_type; + typedef typename _Hashtable::mapped_type mapped_type; + typedef typename _Hashtable::hasher hasher; + typedef typename _Hashtable::key_equal key_equal; + typedef typename _Hashtable::allocator_type allocator_type; + + + + + typedef typename _Hashtable::pointer pointer; + typedef typename _Hashtable::const_pointer const_pointer; + typedef typename _Hashtable::reference reference; + typedef typename _Hashtable::const_reference const_reference; + typedef typename _Hashtable::iterator iterator; + typedef typename _Hashtable::const_iterator const_iterator; + typedef typename _Hashtable::local_iterator local_iterator; + typedef typename _Hashtable::const_local_iterator const_local_iterator; + typedef typename _Hashtable::size_type size_type; + typedef typename _Hashtable::difference_type difference_type; + + + + using node_type = typename _Hashtable::node_type; + using insert_return_type = typename _Hashtable::insert_return_type; + + + + + + unordered_map() = default; +# 150 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + explicit + unordered_map(size_type __n, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__n, __hf, __eql, __a) + { } +# 171 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n = 0, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__first, __last, __n, __hf, __eql, __a) + { } + + + unordered_map(const unordered_map&) = default; + + + unordered_map(unordered_map&&) = default; + + + + + + explicit + unordered_map(const allocator_type& __a) + : _M_h(__a) + { } + + + + + + + unordered_map(const unordered_map& __umap, + const allocator_type& __a) + : _M_h(__umap._M_h, __a) + { } + + + + + + + unordered_map(unordered_map&& __umap, + const allocator_type& __a) + noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) ) + : _M_h(std::move(__umap._M_h), __a) + { } +# 227 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + unordered_map(initializer_list __l, + size_type __n = 0, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__l, __n, __hf, __eql, __a) + { } + + unordered_map(size_type __n, const allocator_type& __a) + : unordered_map(__n, hasher(), key_equal(), __a) + { } + + unordered_map(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__n, __hf, key_equal(), __a) + { } + + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_map(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__l, __n, __hf, key_equal(), __a) + { } + + + unordered_map& + operator=(const unordered_map&) = default; + + + unordered_map& + operator=(unordered_map&&) = default; +# 289 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + unordered_map& + operator=(initializer_list __l) + { + _M_h = __l; + return *this; + } + + + allocator_type + get_allocator() const noexcept + { return _M_h.get_allocator(); } + + + + + [[__nodiscard__]] bool + empty() const noexcept + { return _M_h.empty(); } + + + size_type + size() const noexcept + { return _M_h.size(); } + + + size_type + max_size() const noexcept + { return _M_h.max_size(); } + + + + + + + + iterator + begin() noexcept + { return _M_h.begin(); } + + + + + + + const_iterator + begin() const noexcept + { return _M_h.begin(); } + + const_iterator + cbegin() const noexcept + { return _M_h.begin(); } + + + + + + + iterator + end() noexcept + { return _M_h.end(); } + + + + + + + const_iterator + end() const noexcept + { return _M_h.end(); } + + const_iterator + cend() const noexcept + { return _M_h.end(); } +# 386 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + std::pair + emplace(_Args&&... __args) + { return _M_h.emplace(std::forward<_Args>(__args)...); } +# 417 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + emplace_hint(const_iterator __pos, _Args&&... __args) + { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } + + + + node_type + extract(const_iterator __pos) + { + do { if (__builtin_is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); + return _M_h.extract(__pos); + } + + + node_type + extract(const key_type& __key) + { return _M_h.extract(__key); } + + + insert_return_type + insert(node_type&& __nh) + { return _M_h._M_reinsert_node(std::move(__nh)); } + + + iterator + insert(const_iterator, node_type&& __nh) + { return _M_h._M_reinsert_node(std::move(__nh)).position; } +# 469 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + pair + try_emplace(const key_type& __k, _Args&&... __args) + { + return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...); + } + + + template + pair + try_emplace(key_type&& __k, _Args&&... __args) + { + return _M_h.try_emplace(cend(), std::move(__k), + std::forward<_Args>(__args)...); + } +# 513 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + try_emplace(const_iterator __hint, const key_type& __k, + _Args&&... __args) + { + return _M_h.try_emplace(__hint, __k, + std::forward<_Args>(__args)...).first; + } + + + template + iterator + try_emplace(const_iterator __hint, key_type&& __k, _Args&&... __args) + { + return _M_h.try_emplace(__hint, std::move(__k), + std::forward<_Args>(__args)...).first; + } +# 550 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + std::pair + insert(const value_type& __x) + { return _M_h.insert(__x); } + + + + std::pair + insert(value_type&& __x) + { return _M_h.insert(std::move(__x)); } + + template + __enable_if_t::value, + pair> + insert(_Pair&& __x) + { return _M_h.emplace(std::forward<_Pair>(__x)); } +# 589 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + insert(const_iterator __hint, const value_type& __x) + { return _M_h.insert(__hint, __x); } + + + + iterator + insert(const_iterator __hint, value_type&& __x) + { return _M_h.insert(__hint, std::move(__x)); } + + template + __enable_if_t::value, iterator> + insert(const_iterator __hint, _Pair&& __x) + { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); } +# 614 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_h.insert(__first, __last); } +# 626 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + insert(initializer_list __l) + { _M_h.insert(__l); } +# 652 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + pair + insert_or_assign(const key_type& __k, _Obj&& __obj) + { + auto __ret = _M_h.try_emplace(cend(), __k, + std::forward<_Obj>(__obj)); + if (!__ret.second) + __ret.first->second = std::forward<_Obj>(__obj); + return __ret; + } + + + template + pair + insert_or_assign(key_type&& __k, _Obj&& __obj) + { + auto __ret = _M_h.try_emplace(cend(), std::move(__k), + std::forward<_Obj>(__obj)); + if (!__ret.second) + __ret.first->second = std::forward<_Obj>(__obj); + return __ret; + } +# 701 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + insert_or_assign(const_iterator __hint, const key_type& __k, + _Obj&& __obj) + { + auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj)); + if (!__ret.second) + __ret.first->second = std::forward<_Obj>(__obj); + return __ret.first; + } + + + template + iterator + insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj) + { + auto __ret = _M_h.try_emplace(__hint, std::move(__k), + std::forward<_Obj>(__obj)); + if (!__ret.second) + __ret.first->second = std::forward<_Obj>(__obj); + return __ret.first; + } +# 739 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + erase(const_iterator __position) + { return _M_h.erase(__position); } + + + iterator + erase(iterator __position) + { return _M_h.erase(__position); } +# 761 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + size_type + erase(const key_type& __x) + { return _M_h.erase(__x); } +# 779 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + erase(const_iterator __first, const_iterator __last) + { return _M_h.erase(__first, __last); } + + + + + + + + void + clear() noexcept + { _M_h.clear(); } +# 803 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + swap(unordered_map& __x) + noexcept( noexcept(_M_h.swap(__x._M_h)) ) + { _M_h.swap(__x._M_h); } + + + template + friend class std::_Hash_merge_helper; + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper = _Hash_merge_helper; + _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper = _Hash_merge_helper; + _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + + + + + + hasher + hash_function() const + { return _M_h.hash_function(); } + + + + key_equal + key_eq() const + { return _M_h.key_eq(); } +# 867 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + find(const key_type& __x) + { return _M_h.find(__x); } + + + template + auto + find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) + { return _M_h._M_find_tr(__x); } + + + const_iterator + find(const key_type& __x) const + { return _M_h.find(__x); } + + + template + auto + find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) + { return _M_h._M_find_tr(__x); } +# 900 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + size_type + count(const key_type& __x) const + { return _M_h.count(__x); } + + + template + auto + count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) + { return _M_h._M_count_tr(__x); } +# 919 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + bool + contains(const key_type& __x) const + { return _M_h.find(__x) != _M_h.end(); } + + template + auto + contains(const _Kt& __x) const + -> decltype(_M_h._M_find_tr(__x), void(), true) + { return _M_h._M_find_tr(__x) != _M_h.end(); } +# 940 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_h.equal_range(__x); } + + + template + auto + equal_range(const _Kt& __x) + -> decltype(_M_h._M_equal_range_tr(__x)) + { return _M_h._M_equal_range_tr(__x); } + + + std::pair + equal_range(const key_type& __x) const + { return _M_h.equal_range(__x); } + + + template + auto + equal_range(const _Kt& __x) const + -> decltype(_M_h._M_equal_range_tr(__x)) + { return _M_h._M_equal_range_tr(__x); } +# 978 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + mapped_type& + operator[](const key_type& __k) + { return _M_h[__k]; } + + mapped_type& + operator[](key_type&& __k) + { return _M_h[std::move(__k)]; } +# 995 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + mapped_type& + at(const key_type& __k) + { return _M_h.at(__k); } + + const mapped_type& + at(const key_type& __k) const + { return _M_h.at(__k); } + + + + + + size_type + bucket_count() const noexcept + { return _M_h.bucket_count(); } + + + size_type + max_bucket_count() const noexcept + { return _M_h.max_bucket_count(); } + + + + + + + size_type + bucket_size(size_type __n) const + { return _M_h.bucket_size(__n); } + + + + + + + size_type + bucket(const key_type& __key) const + { return _M_h.bucket(__key); } + + + + + + + + local_iterator + begin(size_type __n) + { return _M_h.begin(__n); } +# 1051 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + const_local_iterator + begin(size_type __n) const + { return _M_h.begin(__n); } + + const_local_iterator + cbegin(size_type __n) const + { return _M_h.cbegin(__n); } +# 1066 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + local_iterator + end(size_type __n) + { return _M_h.end(__n); } +# 1077 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + const_local_iterator + end(size_type __n) const + { return _M_h.end(__n); } + + const_local_iterator + cend(size_type __n) const + { return _M_h.cend(__n); } + + + + + + float + load_factor() const noexcept + { return _M_h.load_factor(); } + + + + float + max_load_factor() const noexcept + { return _M_h.max_load_factor(); } + + + + + + void + max_load_factor(float __z) + { _M_h.max_load_factor(__z); } +# 1114 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + rehash(size_type __n) + { _M_h.rehash(__n); } +# 1125 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + reserve(size_type __n) + { _M_h.reserve(__n); } + + template + friend bool + operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, + const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); + }; + + + + template>, + typename _Pred = equal_to<__iter_key_t<_InputIterator>>, + typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireNotAllocator<_Pred>, + typename = _RequireAllocator<_Allocator>> + unordered_map(_InputIterator, _InputIterator, + typename unordered_map::size_type = {}, + _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) + -> unordered_map<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + _Hash, _Pred, _Allocator>; + + template, + typename _Pred = equal_to<_Key>, + typename _Allocator = allocator>, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireNotAllocator<_Pred>, + typename = _RequireAllocator<_Allocator>> + unordered_map(initializer_list>, + typename unordered_map::size_type = {}, + _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) + -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_map(_InputIterator, _InputIterator, + typename unordered_map::size_type, _Allocator) + -> unordered_map<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + hash<__iter_key_t<_InputIterator>>, + equal_to<__iter_key_t<_InputIterator>>, + _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_map(_InputIterator, _InputIterator, _Allocator) + -> unordered_map<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + hash<__iter_key_t<_InputIterator>>, + equal_to<__iter_key_t<_InputIterator>>, + _Allocator>; + + template, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireAllocator<_Allocator>> + unordered_map(_InputIterator, _InputIterator, + typename unordered_map::size_type, + _Hash, _Allocator) + -> unordered_map<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, _Hash, + equal_to<__iter_key_t<_InputIterator>>, _Allocator>; + + template> + unordered_map(initializer_list>, + typename unordered_map::size_type, + _Allocator) + -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; + + template> + unordered_map(initializer_list>, _Allocator) + -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_map(initializer_list>, + typename unordered_map::size_type, + _Hash, _Allocator) + -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; +# 1241 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template, + typename _Pred = equal_to<_Key>, + typename _Alloc = allocator>> + class unordered_multimap + { + typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; + _Hashtable _M_h; + + public: + + + + typedef typename _Hashtable::key_type key_type; + typedef typename _Hashtable::value_type value_type; + typedef typename _Hashtable::mapped_type mapped_type; + typedef typename _Hashtable::hasher hasher; + typedef typename _Hashtable::key_equal key_equal; + typedef typename _Hashtable::allocator_type allocator_type; + + + + + typedef typename _Hashtable::pointer pointer; + typedef typename _Hashtable::const_pointer const_pointer; + typedef typename _Hashtable::reference reference; + typedef typename _Hashtable::const_reference const_reference; + typedef typename _Hashtable::iterator iterator; + typedef typename _Hashtable::const_iterator const_iterator; + typedef typename _Hashtable::local_iterator local_iterator; + typedef typename _Hashtable::const_local_iterator const_local_iterator; + typedef typename _Hashtable::size_type size_type; + typedef typename _Hashtable::difference_type difference_type; + + + + using node_type = typename _Hashtable::node_type; + + + + + + unordered_multimap() = default; +# 1292 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + explicit + unordered_multimap(size_type __n, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__n, __hf, __eql, __a) + { } +# 1313 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n = 0, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__first, __last, __n, __hf, __eql, __a) + { } + + + unordered_multimap(const unordered_multimap&) = default; + + + unordered_multimap(unordered_multimap&&) = default; + + + + + + explicit + unordered_multimap(const allocator_type& __a) + : _M_h(__a) + { } + + + + + + + unordered_multimap(const unordered_multimap& __ummap, + const allocator_type& __a) + : _M_h(__ummap._M_h, __a) + { } + + + + + + + unordered_multimap(unordered_multimap&& __ummap, + const allocator_type& __a) + noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) ) + : _M_h(std::move(__ummap._M_h), __a) + { } +# 1369 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + unordered_multimap(initializer_list __l, + size_type __n = 0, + const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_h(__l, __n, __hf, __eql, __a) + { } + + unordered_multimap(size_type __n, const allocator_type& __a) + : unordered_multimap(__n, hasher(), key_equal(), __a) + { } + + unordered_multimap(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__n, __hf, key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__l, __n, __hf, key_equal(), __a) + { } + + + unordered_multimap& + operator=(const unordered_multimap&) = default; + + + unordered_multimap& + operator=(unordered_multimap&&) = default; +# 1431 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + unordered_multimap& + operator=(initializer_list __l) + { + _M_h = __l; + return *this; + } + + + allocator_type + get_allocator() const noexcept + { return _M_h.get_allocator(); } + + + + + [[__nodiscard__]] bool + empty() const noexcept + { return _M_h.empty(); } + + + size_type + size() const noexcept + { return _M_h.size(); } + + + size_type + max_size() const noexcept + { return _M_h.max_size(); } + + + + + + + + iterator + begin() noexcept + { return _M_h.begin(); } + + + + + + + const_iterator + begin() const noexcept + { return _M_h.begin(); } + + const_iterator + cbegin() const noexcept + { return _M_h.begin(); } + + + + + + + iterator + end() noexcept + { return _M_h.end(); } + + + + + + + const_iterator + end() const noexcept + { return _M_h.end(); } + + const_iterator + cend() const noexcept + { return _M_h.end(); } +# 1523 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + emplace(_Args&&... __args) + { return _M_h.emplace(std::forward<_Args>(__args)...); } +# 1550 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + iterator + emplace_hint(const_iterator __pos, _Args&&... __args) + { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } +# 1565 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + insert(const value_type& __x) + { return _M_h.insert(__x); } + + iterator + insert(value_type&& __x) + { return _M_h.insert(std::move(__x)); } + + template + __enable_if_t::value, iterator> + insert(_Pair&& __x) + { return _M_h.emplace(std::forward<_Pair>(__x)); } +# 1599 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + insert(const_iterator __hint, const value_type& __x) + { return _M_h.insert(__hint, __x); } + + + + iterator + insert(const_iterator __hint, value_type&& __x) + { return _M_h.insert(__hint, std::move(__x)); } + + template + __enable_if_t::value, iterator> + insert(const_iterator __hint, _Pair&& __x) + { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); } +# 1624 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_h.insert(__first, __last); } +# 1637 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + insert(initializer_list __l) + { _M_h.insert(__l); } + + + + node_type + extract(const_iterator __pos) + { + do { if (__builtin_is_constant_evaluated() && !bool(__pos != end())) __builtin_unreachable(); } while (false); + return _M_h.extract(__pos); + } + + + node_type + extract(const key_type& __key) + { return _M_h.extract(__key); } + + + iterator + insert(node_type&& __nh) + { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); } + + + iterator + insert(const_iterator __hint, node_type&& __nh) + { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); } +# 1680 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + erase(const_iterator __position) + { return _M_h.erase(__position); } + + + iterator + erase(iterator __position) + { return _M_h.erase(__position); } +# 1701 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + size_type + erase(const key_type& __x) + { return _M_h.erase(__x); } +# 1720 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + erase(const_iterator __first, const_iterator __last) + { return _M_h.erase(__first, __last); } + + + + + + + + void + clear() noexcept + { _M_h.clear(); } +# 1744 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + swap(unordered_multimap& __x) + noexcept( noexcept(_M_h.swap(__x._M_h)) ) + { _M_h.swap(__x._M_h); } + + + template + friend class std::_Hash_merge_helper; + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper + = _Hash_merge_helper; + _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) + { + using _Merge_helper + = _Hash_merge_helper; + _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); + } + + template + void + merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) + { merge(__source); } + + + + + + + hasher + hash_function() const + { return _M_h.hash_function(); } + + + + key_equal + key_eq() const + { return _M_h.key_eq(); } +# 1810 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + iterator + find(const key_type& __x) + { return _M_h.find(__x); } + + + template + auto + find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x)) + { return _M_h._M_find_tr(__x); } + + + const_iterator + find(const key_type& __x) const + { return _M_h.find(__x); } + + + template + auto + find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x)) + { return _M_h._M_find_tr(__x); } +# 1839 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + size_type + count(const key_type& __x) const + { return _M_h.count(__x); } + + + template + auto + count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x)) + { return _M_h._M_count_tr(__x); } +# 1858 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + bool + contains(const key_type& __x) const + { return _M_h.find(__x) != _M_h.end(); } + + template + auto + contains(const _Kt& __x) const + -> decltype(_M_h._M_find_tr(__x), void(), true) + { return _M_h._M_find_tr(__x) != _M_h.end(); } +# 1877 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_h.equal_range(__x); } + + + template + auto + equal_range(const _Kt& __x) + -> decltype(_M_h._M_equal_range_tr(__x)) + { return _M_h._M_equal_range_tr(__x); } + + + std::pair + equal_range(const key_type& __x) const + { return _M_h.equal_range(__x); } + + + template + auto + equal_range(const _Kt& __x) const + -> decltype(_M_h._M_equal_range_tr(__x)) + { return _M_h._M_equal_range_tr(__x); } + + + + + + + size_type + bucket_count() const noexcept + { return _M_h.bucket_count(); } + + + size_type + max_bucket_count() const noexcept + { return _M_h.max_bucket_count(); } + + + + + + + size_type + bucket_size(size_type __n) const + { return _M_h.bucket_size(__n); } + + + + + + + size_type + bucket(const key_type& __key) const + { return _M_h.bucket(__key); } + + + + + + + + local_iterator + begin(size_type __n) + { return _M_h.begin(__n); } +# 1949 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + const_local_iterator + begin(size_type __n) const + { return _M_h.begin(__n); } + + const_local_iterator + cbegin(size_type __n) const + { return _M_h.cbegin(__n); } +# 1964 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + local_iterator + end(size_type __n) + { return _M_h.end(__n); } +# 1975 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + const_local_iterator + end(size_type __n) const + { return _M_h.end(__n); } + + const_local_iterator + cend(size_type __n) const + { return _M_h.cend(__n); } + + + + + + float + load_factor() const noexcept + { return _M_h.load_factor(); } + + + + float + max_load_factor() const noexcept + { return _M_h.max_load_factor(); } + + + + + + void + max_load_factor(float __z) + { _M_h.max_load_factor(__z); } +# 2012 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + rehash(size_type __n) + { _M_h.rehash(__n); } +# 2023 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + void + reserve(size_type __n) + { _M_h.reserve(__n); } + + template + friend bool + operator==(const unordered_multimap<_Key1, _Tp1, + _Hash1, _Pred1, _Alloc1>&, + const unordered_multimap<_Key1, _Tp1, + _Hash1, _Pred1, _Alloc1>&); + }; + + + + template>, + typename _Pred = equal_to<__iter_key_t<_InputIterator>>, + typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireNotAllocator<_Pred>, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(_InputIterator, _InputIterator, + unordered_multimap::size_type = {}, + _Hash = _Hash(), _Pred = _Pred(), + _Allocator = _Allocator()) + -> unordered_multimap<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, _Hash, _Pred, + _Allocator>; + + template, + typename _Pred = equal_to<_Key>, + typename _Allocator = allocator>, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireNotAllocator<_Pred>, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(initializer_list>, + unordered_multimap::size_type = {}, + _Hash = _Hash(), _Pred = _Pred(), + _Allocator = _Allocator()) + -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(_InputIterator, _InputIterator, + unordered_multimap::size_type, _Allocator) + -> unordered_multimap<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + hash<__iter_key_t<_InputIterator>>, + equal_to<__iter_key_t<_InputIterator>>, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(_InputIterator, _InputIterator, _Allocator) + -> unordered_multimap<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, + hash<__iter_key_t<_InputIterator>>, + equal_to<__iter_key_t<_InputIterator>>, _Allocator>; + + template, + typename = _RequireNotAllocatorOrIntegral<_Hash>, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(_InputIterator, _InputIterator, + unordered_multimap::size_type, _Hash, + _Allocator) + -> unordered_multimap<__iter_key_t<_InputIterator>, + __iter_val_t<_InputIterator>, _Hash, + equal_to<__iter_key_t<_InputIterator>>, _Allocator>; + + template> + unordered_multimap(initializer_list>, + unordered_multimap::size_type, + _Allocator) + -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; + + template> + unordered_multimap(initializer_list>, _Allocator) + -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; + + template, + typename = _RequireAllocator<_Allocator>> + unordered_multimap(initializer_list>, + unordered_multimap::size_type, + _Hash, _Allocator) + -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; + + + + template + inline void + swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + template + inline void + swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + template + inline bool + operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + { return __x._M_h._M_equal(__y._M_h); } +# 2146 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + template + inline bool + operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + { return __x._M_h._M_equal(__y._M_h); } +# 2160 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unordered_map.h" 3 + + + + + template + struct _Hash_merge_helper< + std::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>, + _Hash2, _Eq2> + { + private: + template + using unordered_map = std::unordered_map<_Tp...>; + template + using unordered_multimap = std::unordered_multimap<_Tp...>; + + friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; + + static auto& + _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + + static auto& + _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + }; + + + template + struct _Hash_merge_helper< + std::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>, + _Hash2, _Eq2> + { + private: + template + using unordered_map = std::unordered_map<_Tp...>; + template + using unordered_multimap = std::unordered_multimap<_Tp...>; + + friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; + + static auto& + _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + + static auto& + _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) + { return __map._M_h; } + }; + + + +} +# 48 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/erase_if.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/erase_if.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/erase_if.h" 3 + + + + + +namespace std +{ + + + + + + + namespace __detail + { + template + typename _Container::size_type + __erase_nodes_if(_Container& __cont, _Predicate __pred) + { + typename _Container::size_type __num = 0; + for (auto __iter = __cont.begin(), __last = __cont.end(); + __iter != __last;) + { + if (__pred(*__iter)) + { + __iter = __cont.erase(__iter); + ++__num; + } + else + ++__iter; + } + return __num; + } + } + + +} +# 50 "D:/compilers/msys64/mingw64/include/c++/11.2.0/unordered_map" 2 3 + + + + + + +namespace std +{ + + namespace pmr + { + template class polymorphic_allocator; + template, + typename _Pred = std::equal_to<_Key>> + using unordered_map + = std::unordered_map<_Key, _Tp, _Hash, _Pred, + polymorphic_allocator>>; + template, + typename _Pred = std::equal_to<_Key>> + using unordered_multimap + = std::unordered_multimap<_Key, _Tp, _Hash, _Pred, + polymorphic_allocator>>; + } + +} + + + +namespace std +{ + + template + inline typename unordered_map<_Key, _Tp, _Hash, _CPred, _Alloc>::size_type + erase_if(unordered_map<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont, + _Predicate __pred) + { return __detail::__erase_nodes_if(__cont, __pred); } + + template + inline typename unordered_multimap<_Key, _Tp, _Hash, _CPred, _Alloc>:: + size_type + erase_if(unordered_multimap<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont, + _Predicate __pred) + { return __detail::__erase_nodes_if(__cont, __pred); } + +} +# 62 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 1 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 3 + +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 3 + + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 1 3 +# 70 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 +namespace std +{ + + + + + + + + + template + struct __uninitialized_copy + { + template + static _ForwardIterator + __uninit_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, (void)++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_copy + { + template + static _ForwardIterator + __uninit_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { return std::copy(__first, __last, __result); } + }; +# 124 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + + + + + + static_assert(is_constructible<_ValueType2, decltype(*__first)>::value, + "result type must be constructible from value type of input range"); + + typedef typename iterator_traits<_InputIterator>::reference _RefType1; + typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; + + + const bool __assignable = is_assignable<_RefType2, _RefType1>::value; + + + return std::__uninitialized_copy<__is_trivial(_ValueType1) + && __is_trivial(_ValueType2) + && __assignable>:: + __uninit_copy(__first, __last, __result); + } + + + + template + struct __uninitialized_fill + { + template + static void + __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill + { + template + static void + __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { std::fill(__first, __last, __x); } + }; +# 199 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + + + + static_assert(is_constructible<_ValueType, const _Tp&>::value, + "result type must be constructible from input type"); + + + + const bool __assignable = is_copy_assignable<_ValueType>::value; + + + std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: + __uninit_fill(__first, __last, __x); + } + + + + template + struct __uninitialized_fill_n + { + template + static _ForwardIterator + __uninit_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, (void) ++__cur) + std::_Construct(std::__addressof(*__cur), __x); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill_n + { + template + static _ForwardIterator + __uninit_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { return std::fill_n(__first, __n, __x); } + }; +# 271 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; +# 288 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + static_assert(is_constructible<_ValueType, const _Tp&>::value, + "result type must be constructible from input type"); + + + + constexpr bool __can_fill + = __and_, is_copy_assignable<_ValueType>>::value; + + return __uninitialized_fill_n<__is_trivial(_ValueType) && __can_fill>:: + __uninit_fill_n(__first, __n, __x); + } +# 308 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + _ForwardIterator __cur = __result; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __first != __last; ++__first, (void)++__cur) + __traits::construct(__alloc, std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur, __alloc); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, allocator<_Tp>&) + { return std::uninitialized_copy(__first, __last, __result); } + + template + inline _ForwardIterator + __uninitialized_move_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + return std::__uninitialized_copy_a(std::make_move_iterator(__first), + std::make_move_iterator(__last), + __result, __alloc); + } + + template + inline _ForwardIterator + __uninitialized_move_if_noexcept_a(_InputIterator __first, + _InputIterator __last, + _ForwardIterator __result, + _Allocator& __alloc) + { + return std::__uninitialized_copy_a + (std::__make_move_if_noexcept_iterator(__first), + std::__make_move_if_noexcept_iterator(__last), __result, __alloc); + } + + template + void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __cur != __last; ++__cur) + __traits::construct(__alloc, std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill(__first, __last, __x); } + + template + _ForwardIterator + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __n > 0; --__n, (void) ++__cur) + __traits::construct(__alloc, std::__addressof(*__cur), __x); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, allocator<_Tp2>&) + { return std::uninitialized_fill_n(__first, __n, __x); } +# 422 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + __uninitialized_copy_move(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + + template + inline _ForwardIterator + __uninitialized_move_copy(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline _ForwardIterator + __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, + const _Tp& __x, _InputIterator __first, + _InputIterator __last, _Allocator& __alloc) + { + std::__uninitialized_fill_a(__result, __mid, __x, __alloc); + try + { + return std::__uninitialized_move_a(__first, __last, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline void + __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x, + _Allocator& __alloc) + { + _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, + __first2, + __alloc); + try + { + std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); + } + catch(...) + { + std::_Destroy(__first2, __mid2, __alloc); + throw; + } + } +# 529 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + struct __uninitialized_default_1 + { + template + static void + __uninit_default(_ForwardIterator __first, _ForwardIterator __last) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(std::__addressof(*__cur)); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_default_1 + { + template + static void + __uninit_default(_ForwardIterator __first, _ForwardIterator __last) + { + if (__first == __last) + return; + + typename iterator_traits<_ForwardIterator>::value_type* __val + = std::__addressof(*__first); + std::_Construct(__val); + if (++__first != __last) + std::fill(__first, __last, *__val); + } + }; + + template + struct __uninitialized_default_n_1 + { + template + static _ForwardIterator + __uninit_default_n(_ForwardIterator __first, _Size __n) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, (void) ++__cur) + std::_Construct(std::__addressof(*__cur)); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_default_n_1 + { + template + static _ForwardIterator + __uninit_default_n(_ForwardIterator __first, _Size __n) + { + if (__n > 0) + { + typename iterator_traits<_ForwardIterator>::value_type* __val + = std::__addressof(*__first); + std::_Construct(__val); + ++__first; + __first = std::fill_n(__first, __n - 1, *__val); + } + return __first; + } + }; + + + + template + inline void + __uninitialized_default(_ForwardIterator __first, + _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + const bool __assignable = is_copy_assignable<_ValueType>::value; + + std::__uninitialized_default_1<__is_trivial(_ValueType) + && __assignable>:: + __uninit_default(__first, __last); + } + + + + template + inline _ForwardIterator + __uninitialized_default_n(_ForwardIterator __first, _Size __n) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + constexpr bool __can_fill + = __and_, is_copy_assignable<_ValueType>>::value; + + return __uninitialized_default_n_1<__is_trivial(_ValueType) + && __can_fill>:: + __uninit_default_n(__first, __n); + } + + + + + + template + void + __uninitialized_default_a(_ForwardIterator __first, + _ForwardIterator __last, + _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __cur != __last; ++__cur) + __traits::construct(__alloc, std::__addressof(*__cur)); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_default_a(_ForwardIterator __first, + _ForwardIterator __last, + allocator<_Tp>&) + { std::__uninitialized_default(__first, __last); } + + + + + + template + _ForwardIterator + __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, + _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; + for (; __n > 0; --__n, (void) ++__cur) + __traits::construct(__alloc, std::__addressof(*__cur)); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + + + template + inline _ForwardIterator + __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, + allocator<_Tp>&) + { return std::__uninitialized_default_n(__first, __n); } + + template + struct __uninitialized_default_novalue_1 + { + template + static void + __uninit_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct_novalue(std::__addressof(*__cur)); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_default_novalue_1 + { + template + static void + __uninit_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + } + }; + + template + struct __uninitialized_default_novalue_n_1 + { + template + static _ForwardIterator + __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, (void) ++__cur) + std::_Construct_novalue(std::__addressof(*__cur)); + return __cur; + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_default_novalue_n_1 + { + template + static _ForwardIterator + __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) + { return std::next(__first, __n); } + }; + + + + template + inline void + __uninitialized_default_novalue(_ForwardIterator __first, + _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_default_novalue_1< + is_trivially_default_constructible<_ValueType>::value>:: + __uninit_default_novalue(__first, __last); + } + + + + template + inline _ForwardIterator + __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + return __uninitialized_default_novalue_n_1< + is_trivially_default_constructible<_ValueType>::value>:: + __uninit_default_novalue_n(__first, __n); + } + + template + _ForwardIterator + __uninitialized_copy_n(_InputIterator __first, _Size __n, + _ForwardIterator __result, input_iterator_tag) + { + _ForwardIterator __cur = __result; + try + { + for (; __n > 0; --__n, (void) ++__first, ++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, + _ForwardIterator __result, + random_access_iterator_tag) + { return std::uninitialized_copy(__first, __first + __n, __result); } + + template + pair<_InputIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, + _ForwardIterator __result, input_iterator_tag) + { + _ForwardIterator __cur = __result; + try + { + for (; __n > 0; --__n, (void) ++__first, ++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return {__first, __cur}; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + + template + inline pair<_RandomAccessIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, + _ForwardIterator __result, + random_access_iterator_tag) + { + auto __second_res = uninitialized_copy(__first, __first + __n, __result); + auto __first_res = std::next(__first, __n); + return {__first_res, __second_res}; + } +# 870 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_copy_n(_InputIterator __first, _Size __n, + _ForwardIterator __result) + { return std::__uninitialized_copy_n(__first, __n, __result, + std::__iterator_category(__first)); } + + + template + inline pair<_InputIterator, _ForwardIterator> + __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, + _ForwardIterator __result) + { + return + std::__uninitialized_copy_n_pair(__first, __n, __result, + std::__iterator_category(__first)); + } +# 898 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_default_construct(_ForwardIterator __first, + _ForwardIterator __last) + { + __uninitialized_default_novalue(__first, __last); + } + + + + + + + + template + inline _ForwardIterator + uninitialized_default_construct_n(_ForwardIterator __first, _Size __count) + { + return __uninitialized_default_novalue_n(__first, __count); + } + + + + + + + template + inline void + uninitialized_value_construct(_ForwardIterator __first, + _ForwardIterator __last) + { + return __uninitialized_default(__first, __last); + } + + + + + + + + template + inline _ForwardIterator + uninitialized_value_construct_n(_ForwardIterator __first, _Size __count) + { + return __uninitialized_default_n(__first, __count); + } +# 952 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_move(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + return std::uninitialized_copy + (std::make_move_iterator(__first), + std::make_move_iterator(__last), __result); + } +# 969 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_uninitialized.h" 3 + template + inline pair<_InputIterator, _ForwardIterator> + uninitialized_move_n(_InputIterator __first, _Size __count, + _ForwardIterator __result) + { + auto __res = std::__uninitialized_copy_n_pair + (std::make_move_iterator(__first), + __count, __result); + return {__res.first.base(), __res.second}; + } + + + + + + template + inline void + __relocate_object_a(_Tp* __restrict __dest, _Up* __restrict __orig, + _Allocator& __alloc) + noexcept(noexcept(std::allocator_traits<_Allocator>::construct(__alloc, + __dest, std::move(*__orig))) + && noexcept(std::allocator_traits<_Allocator>::destroy( + __alloc, std::__addressof(*__orig)))) + { + typedef std::allocator_traits<_Allocator> __traits; + __traits::construct(__alloc, __dest, std::move(*__orig)); + __traits::destroy(__alloc, std::__addressof(*__orig)); + } + + + + template + struct __is_bitwise_relocatable + : is_trivial<_Tp> { }; + + template + inline __enable_if_t::value, _Tp*> + __relocate_a_1(_Tp* __first, _Tp* __last, + _Tp* __result, allocator<_Up>&) noexcept + { + ptrdiff_t __count = __last - __first; + if (__count > 0) + __builtin_memmove(__result, __first, __count * sizeof(_Tp)); + return __result + __count; + } + + template + inline _ForwardIterator + __relocate_a_1(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + noexcept(noexcept(std::__relocate_object_a(std::addressof(*__result), + std::addressof(*__first), + __alloc))) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + static_assert(std::is_same<_ValueType, _ValueType2>::value, + "relocation is only possible for values of the same type"); + _ForwardIterator __cur = __result; + for (; __first != __last; ++__first, (void)++__cur) + std::__relocate_object_a(std::__addressof(*__cur), + std::__addressof(*__first), __alloc); + return __cur; + } + + template + inline _ForwardIterator + __relocate_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + noexcept(noexcept(__relocate_a_1(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result), __alloc))) + { + return __relocate_a_1(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result), __alloc); + } + + + + + + + +} +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 1 3 +# 77 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 +namespace std +{ + + + + + template + struct _Vector_base + { + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_Tp>::other _Tp_alloc_type; + typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer + pointer; + + struct _Vector_impl_data + { + pointer _M_start; + pointer _M_finish; + pointer _M_end_of_storage; + + _Vector_impl_data() noexcept + : _M_start(), _M_finish(), _M_end_of_storage() + { } + + + _Vector_impl_data(_Vector_impl_data&& __x) noexcept + : _M_start(__x._M_start), _M_finish(__x._M_finish), + _M_end_of_storage(__x._M_end_of_storage) + { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); } + + + void + _M_copy_data(_Vector_impl_data const& __x) noexcept + { + _M_start = __x._M_start; + _M_finish = __x._M_finish; + _M_end_of_storage = __x._M_end_of_storage; + } + + void + _M_swap_data(_Vector_impl_data& __x) noexcept + { + + + _Vector_impl_data __tmp; + __tmp._M_copy_data(*this); + _M_copy_data(__x); + __x._M_copy_data(__tmp); + } + }; + + struct _Vector_impl + : public _Tp_alloc_type, public _Vector_impl_data + { + _Vector_impl() noexcept(is_nothrow_default_constructible<_Tp_alloc_type>::value) + + : _Tp_alloc_type() + { } + + _Vector_impl(_Tp_alloc_type const& __a) noexcept + : _Tp_alloc_type(__a) + { } + + + + + _Vector_impl(_Vector_impl&& __x) noexcept + : _Tp_alloc_type(std::move(__x)), _Vector_impl_data(std::move(__x)) + { } + + _Vector_impl(_Tp_alloc_type&& __a) noexcept + : _Tp_alloc_type(std::move(__a)) + { } + + _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept + : _Tp_alloc_type(std::move(__a)), _Vector_impl_data(std::move(__rv)) + { } +# 270 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + }; + + public: + typedef _Alloc allocator_type; + + _Tp_alloc_type& + _M_get_Tp_allocator() noexcept + { return this->_M_impl; } + + const _Tp_alloc_type& + _M_get_Tp_allocator() const noexcept + { return this->_M_impl; } + + allocator_type + get_allocator() const noexcept + { return allocator_type(_M_get_Tp_allocator()); } + + + _Vector_base() = default; + + + + + _Vector_base(const allocator_type& __a) noexcept + : _M_impl(__a) { } + + + + _Vector_base(size_t __n) + : _M_impl() + { _M_create_storage(__n); } + + + _Vector_base(size_t __n, const allocator_type& __a) + : _M_impl(__a) + { _M_create_storage(__n); } + + + _Vector_base(_Vector_base&&) = default; + + + + _Vector_base(_Tp_alloc_type&& __a) noexcept + : _M_impl(std::move(__a)) { } + + _Vector_base(_Vector_base&& __x, const allocator_type& __a) + : _M_impl(__a) + { + if (__x.get_allocator() == __a) + this->_M_impl._M_swap_data(__x._M_impl); + else + { + size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; + _M_create_storage(__n); + } + } + + + _Vector_base(const allocator_type& __a, _Vector_base&& __x) + : _M_impl(_Tp_alloc_type(__a), std::move(__x._M_impl)) + { } + + + ~_Vector_base() noexcept + { + _M_deallocate(_M_impl._M_start, + _M_impl._M_end_of_storage - _M_impl._M_start); + } + + public: + _Vector_impl _M_impl; + + pointer + _M_allocate(size_t __n) + { + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; + return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); + } + + void + _M_deallocate(pointer __p, size_t __n) + { + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; + if (__p) + _Tr::deallocate(_M_impl, __p, __n); + } + + protected: + void + _M_create_storage(size_t __n) + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + }; +# 388 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template > + class vector : protected _Vector_base<_Tp, _Alloc> + { +# 401 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + static_assert(is_same::type, _Tp>::value, + "std::vector must have a non-const, non-volatile value_type"); + + static_assert(is_same::value, + "std::vector must have the same value_type as its allocator"); + + + + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; + + public: + typedef _Tp value_type; + typedef typename _Base::pointer pointer; + typedef typename _Alloc_traits::const_pointer const_pointer; + typedef typename _Alloc_traits::reference reference; + typedef typename _Alloc_traits::const_reference const_reference; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + private: + + static constexpr bool + _S_nothrow_relocate(true_type) + { + return noexcept(std::__relocate_a(std::declval(), + std::declval(), + std::declval(), + std::declval<_Tp_alloc_type&>())); + } + + static constexpr bool + _S_nothrow_relocate(false_type) + { return false; } + + static constexpr bool + _S_use_relocate() + { + + + + return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{}); + } + + static pointer + _S_do_relocate(pointer __first, pointer __last, pointer __result, + _Tp_alloc_type& __alloc, true_type) noexcept + { + return std::__relocate_a(__first, __last, __result, __alloc); + } + + static pointer + _S_do_relocate(pointer, pointer, pointer __result, + _Tp_alloc_type&, false_type) noexcept + { return __result; } + + static pointer + _S_relocate(pointer __first, pointer __last, pointer __result, + _Tp_alloc_type& __alloc) noexcept + { + using __do_it = __bool_constant<_S_use_relocate()>; + return _S_do_relocate(__first, __last, __result, __alloc, __do_it{}); + } + + + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_impl; + using _Base::_M_get_Tp_allocator; + + public: + + + + + + + + vector() = default; +# 496 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + explicit + vector(const allocator_type& __a) noexcept + : _Base(__a) { } +# 509 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + explicit + vector(size_type __n, const allocator_type& __a = allocator_type()) + : _Base(_S_check_init_len(__n, __a), __a) + { _M_default_initialize(__n); } +# 522 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector(size_type __n, const value_type& __value, + const allocator_type& __a = allocator_type()) + : _Base(_S_check_init_len(__n, __a), __a) + { _M_fill_initialize(__n, __value); } +# 553 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector(const vector& __x) + : _Base(__x.size(), + _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) + { + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } +# 572 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector(vector&&) noexcept = default; + + + vector(const vector& __x, const allocator_type& __a) + : _Base(__x.size(), __a) + { + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + + private: + vector(vector&& __rv, const allocator_type& __m, true_type) noexcept + : _Base(__m, std::move(__rv)) + { } + + vector(vector&& __rv, const allocator_type& __m, false_type) + : _Base(__m) + { + if (__rv.get_allocator() == __m) + this->_M_impl._M_swap_data(__rv._M_impl); + else if (!__rv.empty()) + { + this->_M_create_storage(__rv.size()); + this->_M_impl._M_finish = + std::__uninitialized_move_a(__rv.begin(), __rv.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + __rv.clear(); + } + } + + public: + + vector(vector&& __rv, const allocator_type& __m) + noexcept( noexcept( + vector(std::declval(), std::declval(), + std::declval())) ) + : vector(std::move(__rv), __m, typename _Alloc_traits::is_always_equal{}) + { } +# 625 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector(initializer_list __l, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_range_initialize(__l.begin(), __l.end(), + random_access_iterator_tag()); + } +# 651 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template> + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_range_initialize(__first, __last, + std::__iterator_category(__first)); + } +# 678 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + ~vector() noexcept + { + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + } +# 694 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector& + operator=(const vector& __x); +# 708 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector& + operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) + { + constexpr bool __move_storage = + _Alloc_traits::_S_propagate_on_move_assign() + || _Alloc_traits::_S_always_equal(); + _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); + return *this; + } +# 729 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + vector& + operator=(initializer_list __l) + { + this->_M_assign_aux(__l.begin(), __l.end(), + random_access_iterator_tag()); + return *this; + } +# 748 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 765 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template> + void + assign(_InputIterator __first, _InputIterator __last) + { _M_assign_dispatch(__first, __last, __false_type()); } +# 793 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + assign(initializer_list __l) + { + this->_M_assign_aux(__l.begin(), __l.end(), + random_access_iterator_tag()); + } + + + + using _Base::get_allocator; + + + + + + + + iterator + begin() noexcept + { return iterator(this->_M_impl._M_start); } + + + + + + + const_iterator + begin() const noexcept + { return const_iterator(this->_M_impl._M_start); } + + + + + + + iterator + end() noexcept + { return iterator(this->_M_impl._M_finish); } + + + + + + + const_iterator + end() const noexcept + { return const_iterator(this->_M_impl._M_finish); } + + + + + + + reverse_iterator + rbegin() noexcept + { return reverse_iterator(end()); } + + + + + + + const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(end()); } + + + + + + + reverse_iterator + rend() noexcept + { return reverse_iterator(begin()); } + + + + + + + const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(begin()); } + + + + + + + + const_iterator + cbegin() const noexcept + { return const_iterator(this->_M_impl._M_start); } + + + + + + + const_iterator + cend() const noexcept + { return const_iterator(this->_M_impl._M_finish); } + + + + + + + const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(end()); } + + + + + + + const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(begin()); } + + + + + size_type + size() const noexcept + { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } + + + size_type + max_size() const noexcept + { return _S_max_size(_M_get_Tp_allocator()); } +# 936 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + resize(size_type __new_size) + { + if (__new_size > size()) + _M_default_append(__new_size - size()); + else if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + } +# 956 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + resize(size_type __new_size, const value_type& __x) + { + if (__new_size > size()) + _M_fill_insert(end(), __new_size - size(), __x); + else if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + } +# 988 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + shrink_to_fit() + { _M_shrink_to_fit(); } + + + + + + + size_type + capacity() const noexcept + { return size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + + + + + + [[__nodiscard__]] bool + empty() const noexcept + { return begin() == end(); } +# 1027 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + reserve(size_type __n); +# 1042 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + reference + operator[](size_type __n) noexcept + { + ; + return *(this->_M_impl._M_start + __n); + } +# 1060 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + const_reference + operator[](size_type __n) const noexcept + { + ; + return *(this->_M_impl._M_start + __n); + } + + protected: + + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") + + , + __n, this->size()); + } + + public: +# 1091 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } +# 1109 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + + + + + + reference + front() noexcept + { + ; + return *begin(); + } + + + + + + const_reference + front() const noexcept + { + ; + return *begin(); + } + + + + + + reference + back() noexcept + { + ; + return *(end() - 1); + } + + + + + + const_reference + back() const noexcept + { + ; + return *(end() - 1); + } +# 1167 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + _Tp* + data() noexcept + { return _M_data_ptr(this->_M_impl._M_start); } + + const _Tp* + data() const noexcept + { return _M_data_ptr(this->_M_impl._M_start); } +# 1186 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + __x); + ++this->_M_impl._M_finish; + ; + } + else + _M_realloc_insert(end(), __x); + } + + + void + push_back(value_type&& __x) + { emplace_back(std::move(__x)); } + + template + + reference + + + + emplace_back(_Args&&... __args); +# 1224 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + pop_back() noexcept + { + ; + --this->_M_impl._M_finish; + _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); + ; + } +# 1246 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + iterator + emplace(const_iterator __position, _Args&&... __args) + { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } +# 1262 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + insert(const_iterator __position, const value_type& __x); +# 1292 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + insert(const_iterator __position, value_type&& __x) + { return _M_insert_rval(__position, std::move(__x)); } +# 1309 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + insert(const_iterator __position, initializer_list __l) + { + auto __offset = __position - cbegin(); + _M_range_insert(begin() + __offset, __l.begin(), __l.end(), + std::random_access_iterator_tag()); + return begin() + __offset; + } +# 1334 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + insert(const_iterator __position, size_type __n, const value_type& __x) + { + difference_type __offset = __position - cbegin(); + _M_fill_insert(begin() + __offset, __n, __x); + return begin() + __offset; + } +# 1376 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template> + iterator + insert(const_iterator __position, _InputIterator __first, + _InputIterator __last) + { + difference_type __offset = __position - cbegin(); + _M_insert_dispatch(begin() + __offset, + __first, __last, __false_type()); + return begin() + __offset; + } +# 1428 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + + erase(const_iterator __position) + { return _M_erase(begin() + (__position - cbegin())); } +# 1455 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + iterator + + erase(const_iterator __first, const_iterator __last) + { + const auto __beg = begin(); + const auto __cbeg = cbegin(); + return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); + } +# 1479 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + void + swap(vector& __x) noexcept + { + + do { if (__builtin_is_constant_evaluated() && !bool(_Alloc_traits::propagate_on_container_swap::value || _M_get_Tp_allocator() == __x._M_get_Tp_allocator())) __builtin_unreachable(); } while (false) + ; + + this->_M_impl._M_swap_data(__x._M_impl); + _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + + + + + + + void + clear() noexcept + { _M_erase_at_end(this->_M_impl._M_start); } + + protected: + + + + + template + pointer + _M_allocate_and_copy(size_type __n, + _ForwardIterator __first, _ForwardIterator __last) + { + pointer __result = this->_M_allocate(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __result, + _M_get_Tp_allocator()); + return __result; + } + catch(...) + { + _M_deallocate(__result, __n); + throw; + } + } +# 1556 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + void + _M_range_initialize(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + try { + for (; __first != __last; ++__first) + + emplace_back(*__first); + + + + } catch(...) { + clear(); + throw; + } + } + + + template + void + _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_impl._M_start + = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + + + + void + _M_fill_initialize(size_type __n, const value_type& __value) + { + this->_M_impl._M_finish = + std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, + _M_get_Tp_allocator()); + } + + + + void + _M_default_initialize(size_type __n) + { + this->_M_impl._M_finish = + std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, + _M_get_Tp_allocator()); + } +# 1618 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } + + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); + + + + void + _M_fill_assign(size_type __n, const value_type& __val); + + + + + + + + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, __n, __val); } + + + template + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, + _InputIterator __last, __false_type) + { + _M_range_insert(__pos, __first, __last, + std::__iterator_category(__first)); + } + + + template + void + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + + + template + void + _M_range_insert(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + + + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + + + + void + _M_default_append(size_type __n); + + bool + _M_shrink_to_fit(); +# 1705 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + struct _Temporary_value + { + template + explicit + _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) + { + _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), + std::forward<_Args>(__args)...); + } + + ~_Temporary_value() + { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } + + value_type& + _M_val() { return *_M_ptr(); } + + private: + _Tp* + _M_ptr() { return reinterpret_cast<_Tp*>(&__buf); } + + vector* _M_this; + typename aligned_storage::type __buf; + }; + + + + template + void + _M_insert_aux(iterator __position, _Arg&& __arg); + + template + void + _M_realloc_insert(iterator __position, _Args&&... __args); + + + iterator + _M_insert_rval(const_iterator __position, value_type&& __v); + + + template + iterator + _M_emplace_aux(const_iterator __position, _Args&&... __args); + + + iterator + _M_emplace_aux(const_iterator __position, value_type&& __v) + { return _M_insert_rval(__position, std::move(__v)); } + + + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + (std::max)(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + + static size_type + _S_check_init_len(size_type __n, const allocator_type& __a) + { + if (__n > _S_max_size(_Tp_alloc_type(__a))) + __throw_length_error( + ("cannot create std::vector larger than max_size()")); + return __n; + } + + static size_type + _S_max_size(const _Tp_alloc_type& __a) noexcept + { + + + + const size_t __diffmax + = __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + const size_t __allocmax = _Alloc_traits::max_size(__a); + return (std::min)(__diffmax, __allocmax); + } + + + + + + void + _M_erase_at_end(pointer __pos) noexcept + { + if (size_type __n = this->_M_impl._M_finish - __pos) + { + std::_Destroy(__pos, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __pos; + ; + } + } + + iterator + _M_erase(iterator __position); + + iterator + _M_erase(iterator __first, iterator __last); + + + private: + + + + void + _M_move_assign(vector&& __x, true_type) noexcept + { + vector __tmp(get_allocator()); + this->_M_impl._M_swap_data(__x._M_impl); + __tmp._M_impl._M_swap_data(__x._M_impl); + std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); + } + + + + void + _M_move_assign(vector&& __x, false_type) + { + if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) + _M_move_assign(std::move(__x), true_type()); + else + { + + + this->_M_assign_aux(std::make_move_iterator(__x.begin()), + std::make_move_iterator(__x.end()), + std::random_access_iterator_tag()); + __x.clear(); + } + } + + + template + _Up* + _M_data_ptr(_Up* __ptr) const noexcept + { return __ptr; } + + + template + typename std::pointer_traits<_Ptr>::element_type* + _M_data_ptr(_Ptr __ptr) const + { return empty() ? nullptr : std::__to_address(__ptr); } +# 1868 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + }; + + + template::value_type, + typename _Allocator = allocator<_ValT>, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireAllocator<_Allocator>> + vector(_InputIterator, _InputIterator, _Allocator = _Allocator()) + -> vector<_ValT, _Allocator>; +# 1890 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + inline bool + operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return (__x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin())); } +# 1908 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + inline __detail::__synth3way_t<_Tp> + operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { + return std::lexicographical_compare_three_way(__x.begin(), __x.end(), + __y.begin(), __y.end(), + __detail::__synth3way); + } +# 1960 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_vector.h" 3 + template + inline void + swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + noexcept(noexcept(__x.swap(__y))) + { __x.swap(__y); } + + + + + namespace __detail::__variant + { + template struct _Never_valueless_alt; + + + + template + struct _Never_valueless_alt> + : std::is_nothrow_move_assignable> + { }; + } + + + +} +# 68 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 1 3 +# 64 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 +namespace std +{ + + + + typedef unsigned long _Bit_type; + enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; + + struct _Bit_reference + { + _Bit_type * _M_p; + _Bit_type _M_mask; + + _Bit_reference(_Bit_type * __x, _Bit_type __y) + : _M_p(__x), _M_mask(__y) { } + + _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } + + + _Bit_reference(const _Bit_reference&) = default; + + + operator bool() const noexcept + { return !!(*_M_p & _M_mask); } + + _Bit_reference& + operator=(bool __x) noexcept + { + if (__x) + *_M_p |= _M_mask; + else + *_M_p &= ~_M_mask; + return *this; + } + + _Bit_reference& + operator=(const _Bit_reference& __x) noexcept + { return *this = bool(__x); } + + bool + operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + + bool + operator<(const _Bit_reference& __x) const + { return !bool(*this) && bool(__x); } + + void + flip() noexcept + { *_M_p ^= _M_mask; } + }; + + + inline void + swap(_Bit_reference __x, _Bit_reference __y) noexcept + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + inline void + swap(_Bit_reference __x, bool& __y) noexcept + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + inline void + swap(bool& __x, _Bit_reference __y) noexcept + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + + struct _Bit_iterator_base + : public std::iterator + { + _Bit_type * _M_p; + unsigned int _M_offset; + + _Bit_iterator_base(_Bit_type * __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) { } + + void + _M_bump_up() + { + if (_M_offset++ == int(_S_word_bit) - 1) + { + _M_offset = 0; + ++_M_p; + } + } + + void + _M_bump_down() + { + if (_M_offset-- == 0) + { + _M_offset = int(_S_word_bit) - 1; + --_M_p; + } + } + + void + _M_incr(ptrdiff_t __i) + { + difference_type __n = __i + _M_offset; + _M_p += __n / int(_S_word_bit); + __n = __n % int(_S_word_bit); + if (__n < 0) + { + __n += int(_S_word_bit); + --_M_p; + } + _M_offset = static_cast(__n); + } + + friend constexpr bool + operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { return __x._M_p == __y._M_p && __x._M_offset == __y._M_offset; } + + + friend constexpr strong_ordering + operator<=>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + noexcept + { + if (const auto __cmp = __x._M_p <=> __y._M_p; __cmp != 0) + return __cmp; + return __x._M_offset <=> __y._M_offset; + } +# 223 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + friend ptrdiff_t + operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { + return (int(_S_word_bit) * (__x._M_p - __y._M_p) + + __x._M_offset - __y._M_offset); + } + }; + + struct _Bit_iterator : public _Bit_iterator_base + { + typedef _Bit_reference reference; + + typedef void pointer; + + + + typedef _Bit_iterator iterator; + + _Bit_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + iterator + _M_const_cast() const + { return *this; } + + reference + operator*() const + { return reference(_M_p, 1UL << _M_offset); } + + iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + iterator + operator++(int) + { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + iterator + operator--(int) + { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + reference + operator[](difference_type __i) const + { return *(*this + __i); } + + friend iterator + operator+(const iterator& __x, difference_type __n) + { + iterator __tmp = __x; + __tmp += __n; + return __tmp; + } + + friend iterator + operator+(difference_type __n, const iterator& __x) + { return __x + __n; } + + friend iterator + operator-(const iterator& __x, difference_type __n) + { + iterator __tmp = __x; + __tmp -= __n; + return __tmp; + } + }; + + struct _Bit_const_iterator : public _Bit_iterator_base + { + typedef bool reference; + typedef bool const_reference; + + typedef void pointer; + + + + typedef _Bit_const_iterator const_iterator; + + _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_const_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) { } + + _Bit_iterator + _M_const_cast() const + { return _Bit_iterator(_M_p, _M_offset); } + + const_reference + operator*() const + { return _Bit_reference(_M_p, 1UL << _M_offset); } + + const_iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + const_iterator + operator++(int) + { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + const_iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + const_iterator + operator--(int) + { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + const_iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + const_iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + const_reference + operator[](difference_type __i) const + { return *(*this + __i); } + + friend const_iterator + operator+(const const_iterator& __x, difference_type __n) + { + const_iterator __tmp = __x; + __tmp += __n; + return __tmp; + } + + friend const_iterator + operator-(const const_iterator& __x, difference_type __n) + { + const_iterator __tmp = __x; + __tmp -= __n; + return __tmp; + } + + friend const_iterator + operator+(difference_type __n, const const_iterator& __x) + { return __x + __n; } + }; + + template + struct _Bvector_base + { + typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template + rebind<_Bit_type>::other _Bit_alloc_type; + typedef typename __gnu_cxx::__alloc_traits<_Bit_alloc_type> + _Bit_alloc_traits; + typedef typename _Bit_alloc_traits::pointer _Bit_pointer; + + struct _Bvector_impl_data + { + + _Bit_iterator _M_start; +# 440 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + _Bit_iterator _M_finish; + _Bit_pointer _M_end_of_storage; + + _Bvector_impl_data() noexcept + : _M_start(), _M_finish(), _M_end_of_storage() + { } + + + _Bvector_impl_data(const _Bvector_impl_data&) = default; + _Bvector_impl_data& + operator=(const _Bvector_impl_data&) = default; + + _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept + : _Bvector_impl_data(__x) + { __x._M_reset(); } + + void + _M_move_data(_Bvector_impl_data&& __x) noexcept + { + *this = __x; + __x._M_reset(); + } + + + void + _M_reset() noexcept + { *this = _Bvector_impl_data(); } + + void + _M_swap_data(_Bvector_impl_data& __x) noexcept + { + + + std::swap(*this, __x); + } + }; + + struct _Bvector_impl + : public _Bit_alloc_type, public _Bvector_impl_data + { + _Bvector_impl() noexcept(is_nothrow_default_constructible<_Bit_alloc_type>::value) + + : _Bit_alloc_type() + { } + + _Bvector_impl(const _Bit_alloc_type& __a) noexcept + : _Bit_alloc_type(__a) + { } + + + + + _Bvector_impl(_Bvector_impl&& __x) noexcept + : _Bit_alloc_type(std::move(__x)), _Bvector_impl_data(std::move(__x)) + { } + + _Bvector_impl(_Bit_alloc_type&& __a, _Bvector_impl&& __x) noexcept + : _Bit_alloc_type(std::move(__a)), _Bvector_impl_data(std::move(__x)) + { } + + + _Bit_type* + _M_end_addr() const noexcept + { + if (this->_M_end_of_storage) + return std::__addressof(this->_M_end_of_storage[-1]) + 1; + return 0; + } + }; + + public: + typedef _Alloc allocator_type; + + _Bit_alloc_type& + _M_get_Bit_allocator() noexcept + { return this->_M_impl; } + + const _Bit_alloc_type& + _M_get_Bit_allocator() const noexcept + { return this->_M_impl; } + + allocator_type + get_allocator() const noexcept + { return allocator_type(_M_get_Bit_allocator()); } + + + _Bvector_base() = default; + + + + + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } + + + _Bvector_base(_Bvector_base&&) = default; + + _Bvector_base(_Bvector_base&& __x, const allocator_type& __a) noexcept + : _M_impl(_Bit_alloc_type(__a), std::move(__x._M_impl)) + { } + + + ~_Bvector_base() + { this->_M_deallocate(); } + + protected: + _Bvector_impl _M_impl; + + _Bit_pointer + _M_allocate(size_t __n) + { return _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); } + + void + _M_deallocate() + { + if (_M_impl._M_start._M_p) + { + const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; + _Bit_alloc_traits::deallocate(_M_impl, + _M_impl._M_end_of_storage - __n, + __n); + _M_impl._M_reset(); + } + } + + + void + _M_move_data(_Bvector_base&& __x) noexcept + { _M_impl._M_move_data(std::move(__x._M_impl)); } + + + static size_t + _S_nword(size_t __n) + { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } + }; +# 595 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + template + class vector : protected _Bvector_base<_Alloc> + { + typedef _Bvector_base<_Alloc> _Base; + typedef typename _Base::_Bit_pointer _Bit_pointer; + typedef typename _Base::_Bit_alloc_traits _Bit_alloc_traits; + + + friend struct std::hash; + + + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef _Alloc allocator_type; + + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_S_nword; + using _Base::_M_get_Bit_allocator; + + public: + + vector() = default; + + + + + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + + + explicit + vector(size_type __n, const allocator_type& __a = allocator_type()) + : vector(__n, false, __a) + { } + + vector(size_type __n, const bool& __value, + const allocator_type& __a = allocator_type()) + + + + + + : _Base(__a) + { + _M_initialize(__n); + _M_initialize_value(__value); + } + + vector(const vector& __x) + : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator())) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), begin()); + } + + + vector(vector&&) = default; + + private: + vector(vector&& __x, const allocator_type& __a, true_type) noexcept + : _Base(std::move(__x), __a) + { } + + vector(vector&& __x, const allocator_type& __a, false_type) + : _Base(__a) + { + if (__x.get_allocator() == __a) + this->_M_move_data(std::move(__x)); + else + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), begin()); + __x.clear(); + } + } + + public: + vector(vector&& __x, const allocator_type& __a) + noexcept(_Bit_alloc_traits::_S_always_equal()) + : vector(std::move(__x), __a, + typename _Bit_alloc_traits::is_always_equal{}) + { } + + vector(const vector& __x, const allocator_type& __a) + : _Base(__a) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), begin()); + } + + vector(initializer_list __l, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize_range(__l.begin(), __l.end(), + random_access_iterator_tag()); + } + + + + template> + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize_range(__first, __last, + std::__iterator_category(__first)); + } +# 733 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + ~vector() noexcept { } + + vector& + operator=(const vector& __x) + { + if (&__x == this) + return *this; + + if (_Bit_alloc_traits::_S_propagate_on_copy_assign()) + { + if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator()) + { + this->_M_deallocate(); + std::__alloc_on_copy(_M_get_Bit_allocator(), + __x._M_get_Bit_allocator()); + _M_initialize(__x.size()); + } + else + std::__alloc_on_copy(_M_get_Bit_allocator(), + __x._M_get_Bit_allocator()); + } + + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + return *this; + } + + + vector& + operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) + { + if (_Bit_alloc_traits::_S_propagate_on_move_assign() + || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator()) + { + this->_M_deallocate(); + this->_M_move_data(std::move(__x)); + std::__alloc_on_move(_M_get_Bit_allocator(), + __x._M_get_Bit_allocator()); + } + else + { + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + __x.clear(); + } + return *this; + } + + vector& + operator=(initializer_list __l) + { + this->assign(__l.begin(), __l.end()); + return *this; + } + + + + + + + void + assign(size_type __n, const bool& __x) + { _M_fill_assign(__n, __x); } + + + template> + void + assign(_InputIterator __first, _InputIterator __last) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } +# 825 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + void + assign(initializer_list __l) + { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } + + + iterator + begin() noexcept + { return iterator(this->_M_impl._M_start._M_p, 0); } + + const_iterator + begin() const noexcept + { return const_iterator(this->_M_impl._M_start._M_p, 0); } + + iterator + end() noexcept + { return this->_M_impl._M_finish; } + + const_iterator + end() const noexcept + { return this->_M_impl._M_finish; } + + reverse_iterator + rbegin() noexcept + { return reverse_iterator(end()); } + + const_reverse_iterator + rbegin() const noexcept + { return const_reverse_iterator(end()); } + + reverse_iterator + rend() noexcept + { return reverse_iterator(begin()); } + + const_reverse_iterator + rend() const noexcept + { return const_reverse_iterator(begin()); } + + + const_iterator + cbegin() const noexcept + { return const_iterator(this->_M_impl._M_start._M_p, 0); } + + const_iterator + cend() const noexcept + { return this->_M_impl._M_finish; } + + const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(end()); } + + const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(begin()); } + + + size_type + size() const noexcept + { return size_type(end() - begin()); } + + size_type + max_size() const noexcept + { + const size_type __isize = + __gnu_cxx::__numeric_traits::__max + - int(_S_word_bit) + 1; + const size_type __asize + = _Bit_alloc_traits::max_size(_M_get_Bit_allocator()); + return (__asize <= __isize / int(_S_word_bit) + ? __asize * int(_S_word_bit) : __isize); + } + + size_type + capacity() const noexcept + { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) + - begin()); } + + [[__nodiscard__]] bool + empty() const noexcept + { return begin() == end(); } + + reference + operator[](size_type __n) + { return begin()[__n]; } + + const_reference + operator[](size_type __n) const + { return begin()[__n]; } + + protected: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") + + , + __n, this->size()); + } + + public: + reference + at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + + const_reference + at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + void + reserve(size_type __n) + { + if (__n > max_size()) + __throw_length_error(("vector::reserve")); + if (capacity() < __n) + _M_reallocate(__n); + } + + reference + front() + { return *begin(); } + + const_reference + front() const + { return *begin(); } + + reference + back() + { return *(end() - 1); } + + const_reference + back() const + { return *(end() - 1); } + + + + + + + void + data() noexcept { } + + void + push_back(bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + + void + swap(vector& __x) noexcept + { + + do { if (__builtin_is_constant_evaluated() && !bool(_Bit_alloc_traits::propagate_on_container_swap::value || _M_get_Bit_allocator() == __x._M_get_Bit_allocator())) __builtin_unreachable(); } while (false) + ; + + this->_M_impl._M_swap_data(__x._M_impl); + _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), + __x._M_get_Bit_allocator()); + } + + + static void + swap(reference __x, reference __y) noexcept + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + iterator + + insert(const_iterator __position, const bool& __x = bool()) + + + + { + const difference_type __n = __position - begin(); + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr() + && __position == end()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(__position._M_const_cast(), __x); + return begin() + __n; + } + + + template> + iterator + insert(const_iterator __position, + _InputIterator __first, _InputIterator __last) + { + difference_type __offset = __position - cbegin(); + _M_insert_range(__position._M_const_cast(), + __first, __last, + std::__iterator_category(__first)); + return begin() + __offset; + } +# 1038 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + iterator + insert(const_iterator __position, size_type __n, const bool& __x) + { + difference_type __offset = __position - cbegin(); + _M_fill_insert(__position._M_const_cast(), __n, __x); + return begin() + __offset; + } + + + + + + + + iterator + insert(const_iterator __p, initializer_list __l) + { return this->insert(__p, __l.begin(), __l.end()); } + + + void + pop_back() + { --this->_M_impl._M_finish; } + + iterator + + erase(const_iterator __position) + + + + { return _M_erase(__position._M_const_cast()); } + + iterator + + erase(const_iterator __first, const_iterator __last) + + + + { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } + + void + resize(size_type __new_size, bool __x = bool()) + { + if (__new_size < size()) + _M_erase_at_end(begin() + difference_type(__new_size)); + else + insert(end(), __new_size - size(), __x); + } + + + void + shrink_to_fit() + { _M_shrink_to_fit(); } + + + void + flip() noexcept + { + _Bit_type * const __end = this->_M_impl._M_end_addr(); + for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p) + *__p = ~*__p; + } + + void + clear() noexcept + { _M_erase_at_end(begin()); } + + + template + + reference + + + + emplace_back(_Args&&... __args) + { + push_back(bool(__args...)); + + return back(); + + } + + template + iterator + emplace(const_iterator __pos, _Args&&... __args) + { return insert(__pos, bool(__args...)); } + + + protected: + + iterator + _M_copy_aligned(const_iterator __first, const_iterator __last, + iterator __result) + { + _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); + return std::copy(const_iterator(__last._M_p, 0), __last, + iterator(__q, 0)); + } + + void + _M_initialize(size_type __n) + { + if (__n) + { + _Bit_pointer __q = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = __q + _S_nword(__n); + iterator __start = iterator(std::__addressof(*__q), 0); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __start + difference_type(__n); + } + } + + void + _M_initialize_value(bool __x) + { + if (_Bit_type* __p = this->_M_impl._M_start._M_p) + __builtin_memset(__p, __x ? ~0 : 0, + (this->_M_impl._M_end_addr() - __p) + * sizeof(_Bit_type)); + } + + void + _M_reallocate(size_type __n); + + + bool + _M_shrink_to_fit(); +# 1185 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + template + void + _M_initialize_range(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + template + void + _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + _M_initialize(__n); + std::copy(__first, __last, begin()); + } +# 1219 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + void + _M_fill_assign(size_t __n, bool __x) + { + if (__n > size()) + { + _M_initialize_value(__x); + insert(end(), __n - size(), __x); + } + else + { + _M_erase_at_end(begin() + __n); + _M_initialize_value(__x); + } + } + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, (void)++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len < size()) + _M_erase_at_end(std::copy(__first, __last, begin())); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } +# 1283 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/stl_bvector.h" 3 + void + _M_fill_insert(iterator __position, size_type __n, bool __x); + + template + void + _M_insert_range(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + void + _M_insert_aux(iterator __position, bool __x); + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + void + _M_erase_at_end(iterator __pos) + { this->_M_impl._M_finish = __pos; } + + iterator + _M_erase(iterator __pos); + + iterator + _M_erase(iterator __first, iterator __last); + }; + + + + inline void + __fill_bvector(std::_Bit_type * __v, + unsigned int __first, unsigned int __last, bool __x) + { + using std::_Bit_type; + using std::_S_word_bit; + const _Bit_type __fmask = ~0ul << __first; + const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); + const _Bit_type __mask = __fmask & __lmask; + + if (__x) + *__v |= __mask; + else + *__v &= ~__mask; + } + + inline void + __fill_a1(std::_Bit_iterator __first, + std::_Bit_iterator __last, const bool& __x) + { + using std::_Bit_type; + using std::_S_word_bit; + if (__first._M_p != __last._M_p) + { + _Bit_type* __first_p = __first._M_p; + if (__first._M_offset != 0) + __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); + + __builtin_memset(__first_p, __x ? ~0 : 0, + (__last._M_p - __first_p) * sizeof(_Bit_type)); + + if (__last._M_offset != 0) + __fill_bvector(__last._M_p, 0, __last._M_offset, __x); + } + else if (__first._M_offset != __last._M_offset) + __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); + } + + + + + template + struct hash> + : public __hash_base> + { + size_t + operator()(const std::vector&) const noexcept; + }; + + + +} +# 69 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/vector.tcc" 1 3 +# 59 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/vector.tcc" 3 +namespace std +{ + + + + template + void + vector<_Tp, _Alloc>:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + const size_type __old_size = size(); + pointer __tmp; + + if constexpr (_S_use_relocate()) + { + __tmp = this->_M_allocate(__n); + _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, + __tmp, _M_get_Tp_allocator()); + } + else + + { + __tmp = _M_allocate_and_copy(__n, + std::__make_move_if_noexcept_iterator(this->_M_impl._M_start), + std::__make_move_if_noexcept_iterator(this->_M_impl._M_finish)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = __tmp + __old_size; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + } + + + template + template + + typename vector<_Tp, _Alloc>::reference + + + + vector<_Tp, _Alloc>:: + emplace_back(_Args&&... __args) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::forward<_Args>(__args)...); + ++this->_M_impl._M_finish; + ; + } + else + _M_realloc_insert(end(), std::forward<_Args>(__args)...); + + return back(); + + } + + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + + insert(const_iterator __position, const value_type& __x) + + + + { + const size_type __n = __position - begin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == end()) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + __x); + ++this->_M_impl._M_finish; + ; + } + else + { + + const auto __pos = begin() + (__position - cbegin()); + + + _Temporary_value __x_copy(this, __x); + _M_insert_aux(__pos, std::move(__x_copy._M_val())); + + + + } + else + + _M_realloc_insert(begin() + (__position - cbegin()), __x); + + + + + return iterator(this->_M_impl._M_start + __n); + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + _M_erase(iterator __position) + { + if (__position + 1 != end()) + std::move(__position + 1, end(), __position); + --this->_M_impl._M_finish; + _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); + ; + return __position; + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + _M_erase(iterator __first, iterator __last) + { + if (__first != __last) + { + if (__last != end()) + std::move(__last, end(), __first); + _M_erase_at_end(__first.base() + (end() - __last)); + } + return __first; + } + + template + vector<_Tp, _Alloc>& + vector<_Tp, _Alloc>:: + operator=(const vector<_Tp, _Alloc>& __x) + { + if (&__x != this) + { + ; + + if (_Alloc_traits::_S_propagate_on_copy_assign()) + { + if (!_Alloc_traits::_S_always_equal() + && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) + { + + this->clear(); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = nullptr; + this->_M_impl._M_finish = nullptr; + this->_M_impl._M_end_of_storage = nullptr; + } + std::__alloc_on_copy(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + const size_type __xlen = __x.size(); + if (__xlen > capacity()) + { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), + __x.end()); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; + } + else if (size() >= __xlen) + { + std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), + end(), _M_get_Tp_allocator()); + } + else + { + std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), + this->_M_impl._M_start); + std::__uninitialized_copy_a(__x._M_impl._M_start + size(), + __x._M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; + } + return *this; + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_assign(size_t __n, const value_type& __val) + { + if (__n > capacity()) + { + vector __tmp(__n, __val, _M_get_Tp_allocator()); + __tmp._M_impl._M_swap_data(this->_M_impl); + } + else if (__n > size()) + { + std::fill(begin(), end(), __val); + const size_type __add = __n - size(); + ; + this->_M_impl._M_finish = + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __add, __val, _M_get_Tp_allocator()); + ; + } + else + _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + pointer __cur(this->_M_impl._M_start); + for (; __first != __last && __cur != this->_M_impl._M_finish; + ++__cur, (void)++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + _M_range_insert(end(), __first, __last, + std::__iterator_category(__first)); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + + if (__len > capacity()) + { + _S_check_init_len(__len, _M_get_Tp_allocator()); + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = this->_M_impl._M_start + __len; + this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; + } + else if (size() >= __len) + _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, this->_M_impl._M_start); + const size_type __attribute__((__unused__)) __n = __len - size(); + ; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + } + } + + + template + auto + vector<_Tp, _Alloc>:: + _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator + { + const auto __n = __position - cbegin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == cend()) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::move(__v)); + ++this->_M_impl._M_finish; + ; + } + else + _M_insert_aux(begin() + __n, std::move(__v)); + else + _M_realloc_insert(begin() + __n, std::move(__v)); + + return iterator(this->_M_impl._M_start + __n); + } + + template + template + auto + vector<_Tp, _Alloc>:: + _M_emplace_aux(const_iterator __position, _Args&&... __args) + -> iterator + { + const auto __n = __position - cbegin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + if (__position == cend()) + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::forward<_Args>(__args)...); + ++this->_M_impl._M_finish; + ; + } + else + { + + + + _Temporary_value __tmp(this, std::forward<_Args>(__args)...); + _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); + } + else + _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); + + return iterator(this->_M_impl._M_start + __n); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_insert_aux(iterator __position, _Arg&& __arg) + + + + + + + { + ; + _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, + std::move(*(this->_M_impl._M_finish - 1))); + ++this->_M_impl._M_finish; + ; + + + + std::move_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) + + ; + + + + *__position = std::forward<_Arg>(__arg); + + } + + + template + template + void + vector<_Tp, _Alloc>:: + _M_realloc_insert(iterator __position, _Args&&... __args) + + + + + + + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_realloc_insert"); + pointer __old_start = this->_M_impl._M_start; + pointer __old_finish = this->_M_impl._M_finish; + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + + + + + _Alloc_traits::construct(this->_M_impl, + __new_start + __elems_before, + + std::forward<_Args>(__args)...); + + + + __new_finish = pointer(); + + + if constexpr (_S_use_relocate()) + { + __new_finish = _S_relocate(__old_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + + ++__new_finish; + + __new_finish = _S_relocate(__position.base(), __old_finish, + __new_finish, _M_get_Tp_allocator()); + } + else + + { + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__old_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + + ++__new_finish; + + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__position.base(), __old_finish, + __new_finish, _M_get_Tp_allocator()); + } + } + catch(...) + { + if (!__new_finish) + _Alloc_traits::destroy(this->_M_impl, + __new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + + if constexpr (!_S_use_relocate()) + + std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); + ; + _M_deallocate(__old_start, + this->_M_impl._M_end_of_storage - __old_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_insert(iterator __position, size_type __n, const value_type& __x) + { + if (__n != 0) + { + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + + + + _Temporary_value __tmp(this, __x); + value_type& __x_copy = __tmp._M_val(); + + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + ; + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + ; + std::move_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::fill(__position.base(), __position.base() + __n, + __x_copy); + } + else + { + ; + this->_M_impl._M_finish = + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - __elems_after, + __x_copy, + _M_get_Tp_allocator()); + ; + std::__uninitialized_move_a(__position.base(), __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + ; + std::fill(__position.base(), __old_finish, __x_copy); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + std::__uninitialized_fill_n_a(__new_start + __elems_before, + __n, __x, + _M_get_Tp_allocator()); + __new_finish = pointer(); + + __new_finish + = std::__uninitialized_move_if_noexcept_a + (this->_M_impl._M_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + + __new_finish += __n; + + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__position.base(), this->_M_impl._M_finish, + __new_finish, _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + std::_Destroy(__new_start + __elems_before, + __new_start + __elems_before + __n, + _M_get_Tp_allocator()); + else + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + + template + void + vector<_Tp, _Alloc>:: + _M_default_append(size_type __n) + { + if (__n != 0) + { + const size_type __size = size(); + size_type __navail = size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish); + + if (__size > max_size() || __navail > max_size() - __size) + __builtin_unreachable(); + + if (__navail >= __n) + { + ; + this->_M_impl._M_finish = + std::__uninitialized_default_n_a(this->_M_impl._M_finish, + __n, _M_get_Tp_allocator()); + ; + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_default_append"); + pointer __new_start(this->_M_allocate(__len)); + if constexpr (_S_use_relocate()) + { + try + { + std::__uninitialized_default_n_a(__new_start + __size, + __n, _M_get_Tp_allocator()); + } + catch(...) + { + _M_deallocate(__new_start, __len); + throw; + } + _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish, + __new_start, _M_get_Tp_allocator()); + } + else + { + pointer __destroy_from = pointer(); + try + { + std::__uninitialized_default_n_a(__new_start + __size, + __n, _M_get_Tp_allocator()); + __destroy_from = __new_start + __size; + std::__uninitialized_move_if_noexcept_a( + this->_M_impl._M_start, this->_M_impl._M_finish, + __new_start, _M_get_Tp_allocator()); + } + catch(...) + { + if (__destroy_from) + std::_Destroy(__destroy_from, __destroy_from + __n, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_start + __size + __n; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + template + bool + vector<_Tp, _Alloc>:: + _M_shrink_to_fit() + { + if (capacity() == size()) + return false; + ; + return std::__shrink_to_fit_aux::_S_do_it(*this); + } + + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + if (__pos == end()) + { + for (; __first != __last; ++__first) + insert(end(), *__first); + } + else if (__first != __last) + { + vector __tmp(__first, __last, _M_get_Tp_allocator()); + insert(__pos, + std::make_move_iterator(__tmp.begin()), + std::make_move_iterator(__tmp.end())); + } + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + const size_type __n = std::distance(__first, __last); + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + ; + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + ; + std::move_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::copy(__first, __last, __position); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elems_after); + ; + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + ; + std::__uninitialized_move_a(__position.base(), + __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + ; + std::copy(__first, __mid, __position); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_range_insert"); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + __new_finish + = std::__uninitialized_move_if_noexcept_a + (this->_M_impl._M_start, __position.base(), + __new_start, _M_get_Tp_allocator()); + __new_finish + = std::__uninitialized_copy_a(__first, __last, + __new_finish, + _M_get_Tp_allocator()); + __new_finish + = std::__uninitialized_move_if_noexcept_a + (__position.base(), this->_M_impl._M_finish, + __new_finish, _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + ; + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + + + template + void + vector:: + _M_reallocate(size_type __n) + { + _Bit_pointer __q = this->_M_allocate(__n); + iterator __start(std::__addressof(*__q), 0); + iterator __finish(_M_copy_aligned(begin(), end(), __start)); + this->_M_deallocate(); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; + this->_M_impl._M_end_of_storage = __q + _S_nword(__n); + } + + template + void + vector:: + _M_fill_insert(iterator __position, size_type __n, bool __x) + { + if (__n == 0) + return; + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + difference_type(__n)); + std::fill(__position, __position + difference_type(__n), __x); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + _Bit_pointer __q = this->_M_allocate(__len); + iterator __start(std::__addressof(*__q), 0); + iterator __i = _M_copy_aligned(begin(), __position, __start); + std::fill(__i, __i + difference_type(__n), __x); + iterator __finish = std::copy(__position, end(), + __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = __q + _S_nword(__len); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; + } + } + + template + template + void + vector:: + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + size_type __n = std::distance(__first, __last); + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + + difference_type(__n)); + std::copy(__first, __last, __position); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_insert_range"); + _Bit_pointer __q = this->_M_allocate(__len); + iterator __start(std::__addressof(*__q), 0); + iterator __i = _M_copy_aligned(begin(), __position, __start); + __i = std::copy(__first, __last, __i); + iterator __finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = __q + _S_nword(__len); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; + } + } + } + + template + void + vector:: + _M_insert_aux(iterator __position, bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) + { + std::copy_backward(__position, this->_M_impl._M_finish, + this->_M_impl._M_finish + 1); + *__position = __x; + ++this->_M_impl._M_finish; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + _Bit_pointer __q = this->_M_allocate(__len); + iterator __start(std::__addressof(*__q), 0); + iterator __i = _M_copy_aligned(begin(), __position, __start); + *__i++ = __x; + iterator __finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = __q + _S_nword(__len); + this->_M_impl._M_start = __start; + this->_M_impl._M_finish = __finish; + } + } + + template + typename vector::iterator + vector:: + _M_erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + return __position; + } + + template + typename vector::iterator + vector:: + _M_erase(iterator __first, iterator __last) + { + if (__first != __last) + _M_erase_at_end(std::copy(__last, end(), __first)); + return __first; + } + + + template + bool + vector:: + _M_shrink_to_fit() + { + if (capacity() - size() < int(_S_word_bit)) + return false; + try + { + _M_reallocate(size()); + return true; + } + catch(...) + { return false; } + } + + + + +} + + + +namespace std +{ + + + template + size_t + hash>:: + operator()(const std::vector& __b) const noexcept + { + size_t __hash = 0; + using std::_S_word_bit; + using std::_Bit_type; + + const size_t __words = __b.size() / _S_word_bit; + if (__words) + { + const size_t __clength = __words * sizeof(_Bit_type); + __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); + } + + const size_t __extrabits = __b.size() % _S_word_bit; + if (__extrabits) + { + _Bit_type __hiword = *__b._M_impl._M_finish._M_p; + __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); + + const size_t __clength + = (__extrabits + 8 - 1) / 8; + if (__words) + __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); + else + __hash = std::_Hash_impl::hash(&__hiword, __clength); + } + + return __hash; + } + + +} +# 73 "D:/compilers/msys64/mingw64/include/c++/11.2.0/vector" 2 3 + + + + + + + +namespace std +{ + + namespace pmr { + template class polymorphic_allocator; + template + using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; + } + + + + + + + + +} + + + +namespace std +{ + + + + + template + inline typename vector<_Tp, _Alloc>::size_type + erase_if(vector<_Tp, _Alloc>& __cont, _Predicate __pred) + { + const auto __osz = __cont.size(); + __cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred), + __cont.end()); + return __osz - __cont.size(); + } + + template + inline typename vector<_Tp, _Alloc>::size_type + erase(vector<_Tp, _Alloc>& __cont, const _Up& __value) + { + const auto __osz = __cont.size(); + __cont.erase(std::remove(__cont.begin(), __cont.end(), __value), + __cont.end()); + return __osz - __cont.size(); + } + +} +# 63 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 2 3 +# 74 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 +namespace std +{ + + + + + + template struct _Placeholder { }; +# 92 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template + inline constexpr invoke_result_t<_Callable, _Args...> + invoke(_Callable&& __fn, _Args&&... __args) + noexcept(is_nothrow_invocable_v<_Callable, _Args...>) + { + return std::__invoke(std::forward<_Callable>(__fn), + std::forward<_Args>(__args)...); + } + + + template::value> + class _Mem_fn_base + : public _Mem_fn_traits<_MemFunPtr>::__maybe_type + { + using _Traits = _Mem_fn_traits<_MemFunPtr>; + + using _Arity = typename _Traits::__arity; + using _Varargs = typename _Traits::__vararg; + + template + friend struct _Bind_check_arity; + + _MemFunPtr _M_pmf; + + public: + + using result_type = typename _Traits::__result_type; + + explicit constexpr + _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { } + + template + constexpr + auto + operator()(_Args&&... __args) const + noexcept(noexcept( + std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) + -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) + { return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); } + }; + + + template + class _Mem_fn_base<_MemObjPtr, false> + { + using _Arity = integral_constant; + using _Varargs = false_type; + + template + friend struct _Bind_check_arity; + + _MemObjPtr _M_pm; + + public: + explicit constexpr + _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { } + + template + constexpr + auto + operator()(_Tp&& __obj) const + noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) + -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) + { return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); } + }; + + template + struct _Mem_fn; + + template + struct _Mem_fn<_Res _Class::*> + : _Mem_fn_base<_Res _Class::*> + { + using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; + }; +# 176 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template + constexpr + inline _Mem_fn<_Tp _Class::*> + mem_fn(_Tp _Class::* __pm) noexcept + { + return _Mem_fn<_Tp _Class::*>(__pm); + } +# 192 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template + struct is_bind_expression + : public false_type { }; +# 203 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template + struct is_placeholder + : public integral_constant + { }; + + + template inline constexpr bool is_bind_expression_v + = is_bind_expression<_Tp>::value; + template inline constexpr int is_placeholder_v + = is_placeholder<_Tp>::value; + + + + + + + namespace placeholders + { + + + + + extern const _Placeholder<1> _1; + extern const _Placeholder<2> _2; + extern const _Placeholder<3> _3; + extern const _Placeholder<4> _4; + extern const _Placeholder<5> _5; + extern const _Placeholder<6> _6; + extern const _Placeholder<7> _7; + extern const _Placeholder<8> _8; + extern const _Placeholder<9> _9; + extern const _Placeholder<10> _10; + extern const _Placeholder<11> _11; + extern const _Placeholder<12> _12; + extern const _Placeholder<13> _13; + extern const _Placeholder<14> _14; + extern const _Placeholder<15> _15; + extern const _Placeholder<16> _16; + extern const _Placeholder<17> _17; + extern const _Placeholder<18> _18; + extern const _Placeholder<19> _19; + extern const _Placeholder<20> _20; + extern const _Placeholder<21> _21; + extern const _Placeholder<22> _22; + extern const _Placeholder<23> _23; + extern const _Placeholder<24> _24; + extern const _Placeholder<25> _25; + extern const _Placeholder<26> _26; + extern const _Placeholder<27> _27; + extern const _Placeholder<28> _28; + extern const _Placeholder<29> _29; + } + + + + + + + template + struct is_placeholder<_Placeholder<_Num> > + : public integral_constant + { }; + + template + struct is_placeholder > + : public integral_constant + { }; + + + + template + using _Safe_tuple_element_t + = typename enable_if<(__i < tuple_size<_Tuple>::value), + tuple_element<__i, _Tuple>>::type::type; +# 289 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template::value, + bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> + class _Mu; + + + + + + + template + class _Mu, false, false> + { + public: + + + + + template + constexpr + _Tp& + operator()(_CVRef& __arg, _Tuple&) const volatile + { return __arg.get(); } + }; + + + + + + + + template + class _Mu<_Arg, true, false> + { + public: + template + constexpr + auto + operator()(_CVArg& __arg, + tuple<_Args...>& __tuple) const volatile + -> decltype(__arg(declval<_Args>()...)) + { + + typedef typename _Build_index_tuple::__type + _Indexes; + return this->__call(__arg, __tuple, _Indexes()); + } + + private: + + + template + constexpr + auto + __call(_CVArg& __arg, tuple<_Args...>& __tuple, + const _Index_tuple<_Indexes...>&) const volatile + -> decltype(__arg(declval<_Args>()...)) + { + return __arg(std::get<_Indexes>(std::move(__tuple))...); + } + }; + + + + + + + template + class _Mu<_Arg, false, true> + { + public: + template + constexpr + _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& + operator()(const volatile _Arg&, _Tuple& __tuple) const volatile + { + return + ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple)); + } + }; + + + + + + + template + class _Mu<_Arg, false, false> + { + public: + template + constexpr + _CVArg&& + operator()(_CVArg&& __arg, _Tuple&) const volatile + { return std::forward<_CVArg>(__arg); } + }; + + + template + inline auto + __volget(volatile tuple<_Tp...>& __tuple) + -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& + { return std::get<_Ind>(const_cast&>(__tuple)); } + + + template + inline auto + __volget(const volatile tuple<_Tp...>& __tuple) + -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& + { return std::get<_Ind>(const_cast&>(__tuple)); } + + + template + class _Bind; + + template + class _Bind<_Functor(_Bound_args...)> + : public _Weak_result_type<_Functor> + { + typedef typename _Build_index_tuple::__type + _Bound_indexes; + + _Functor _M_f; + tuple<_Bound_args...> _M_bound_args; + + + template + constexpr + _Result + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... + ); + } + + + template + constexpr + _Result + __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... + ); + } + + + template + _Result + __call_v(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) volatile + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... + ); + } + + + template + _Result + __call_c_v(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) const volatile + { + return std::__invoke(_M_f, + _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... + ); + } + + template + using _Mu_type = decltype( + _Mu::type>()( + std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) ); + + template + using _Res_type_impl + = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type; + + template + using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>; + + template + using __dependent = typename + enable_if::value+1), _Functor>::type; + + template class __cv_quals> + using _Res_type_cv = _Res_type_impl< + typename __cv_quals<__dependent<_CallArgs>>::type, + _CallArgs, + typename __cv_quals<_Bound_args>::type...>; + + public: + template + explicit constexpr + _Bind(const _Functor& __f, _Args&&... __args) + : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) + { } + + template + explicit constexpr + _Bind(_Functor&& __f, _Args&&... __args) + : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) + { } + + _Bind(const _Bind&) = default; + _Bind(_Bind&&) = default; + + + template>> + constexpr + _Result + operator()(_Args&&... __args) + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template, add_const>> + constexpr + _Result + operator()(_Args&&... __args) const + { + return this->__call_c<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } +# 527 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template, add_volatile>> + [[deprecated("std::bind does not support volatile in C++17")]] + _Result + operator()(_Args&&... __args) volatile + { + return this->__call_v<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template, add_cv>> + [[deprecated("std::bind does not support volatile in C++17")]] + _Result + operator()(_Args&&... __args) const volatile + { + return this->__call_c_v<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + }; + + + template + class _Bind_result; + + template + class _Bind_result<_Result, _Functor(_Bound_args...)> + { + typedef typename _Build_index_tuple::__type + _Bound_indexes; + + _Functor _M_f; + tuple<_Bound_args...> _M_bound_args; + + + template + constexpr + _Res + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) + { + return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() + (std::get<_Indexes>(_M_bound_args), __args)...); + } + + + template + constexpr + _Res + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const + { + return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() + (std::get<_Indexes>(_M_bound_args), __args)...); + } + + + template + constexpr + _Res + __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile + { + return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() + (__volget<_Indexes>(_M_bound_args), __args)...); + } + + + template + constexpr + _Res + __call(tuple<_Args...>&& __args, + _Index_tuple<_Indexes...>) const volatile + { + return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>() + (__volget<_Indexes>(_M_bound_args), __args)...); + } + + public: + typedef _Result result_type; + + template + explicit constexpr + _Bind_result(const _Functor& __f, _Args&&... __args) + : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) + { } + + template + explicit constexpr + _Bind_result(_Functor&& __f, _Args&&... __args) + : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) + { } + + _Bind_result(const _Bind_result&) = default; + _Bind_result(_Bind_result&&) = default; + + + template + constexpr + result_type + operator()(_Args&&... __args) + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template + constexpr + result_type + operator()(_Args&&... __args) const + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template + [[deprecated("std::bind does not support volatile in C++17")]] + result_type + operator()(_Args&&... __args) volatile + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + + + template + [[deprecated("std::bind does not support volatile in C++17")]] + result_type + operator()(_Args&&... __args) const volatile + { + return this->__call<_Result>( + std::forward_as_tuple(std::forward<_Args>(__args)...), + _Bound_indexes()); + } + }; + + + + + + + template + struct is_bind_expression<_Bind<_Signature> > + : public true_type { }; + + + + + + template + struct is_bind_expression > + : public true_type { }; + + + + + + template + struct is_bind_expression > + : public true_type { }; + + + + + + template + struct is_bind_expression> + : public true_type { }; + + + + + + template + struct is_bind_expression<_Bind_result<_Result, _Signature>> + : public true_type { }; + + + + + + template + struct is_bind_expression> + : public true_type { }; + + + + + + template + struct is_bind_expression> + : public true_type { }; + + + + + + template + struct is_bind_expression> + : public true_type { }; + + template + struct _Bind_check_arity { }; + + template + struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> + { + static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), + "Wrong number of arguments for function"); + }; + + template + struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> + { + static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), + "Wrong number of arguments for function"); + }; + + template + struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> + { + using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; + using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; + static_assert(_Varargs::value + ? sizeof...(_BoundArgs) >= _Arity::value + 1 + : sizeof...(_BoundArgs) == _Arity::value + 1, + "Wrong number of arguments for pointer-to-member"); + }; + + + + + template::type> + using __is_socketlike = __or_, is_enum<_Tp2>>; + + template + struct _Bind_helper + : _Bind_check_arity::type, _BoundArgs...> + { + typedef typename decay<_Func>::type __func_type; + typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; + }; + + + + + template + struct _Bind_helper + { }; + + + + + + template + inline constexpr typename + _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type + bind(_Func&& __f, _BoundArgs&&... __args) + { + typedef _Bind_helper __helper_type; + return typename __helper_type::type(std::forward<_Func>(__f), + std::forward<_BoundArgs>(__args)...); + } + + template + struct _Bindres_helper + : _Bind_check_arity::type, _BoundArgs...> + { + typedef typename decay<_Func>::type __functor_type; + typedef _Bind_result<_Result, + __functor_type(typename decay<_BoundArgs>::type...)> + type; + }; + + + + + + template + inline constexpr + typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type + bind(_Func&& __f, _BoundArgs&&... __args) + { + typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; + return typename __helper_type::type(std::forward<_Func>(__f), + std::forward<_BoundArgs>(__args)...); + } + + + + + template + struct _Bind_front + { + static_assert(is_move_constructible_v<_Fd>); + static_assert((is_move_constructible_v<_BoundArgs> && ...)); + + + + template + explicit constexpr + _Bind_front(int, _Fn&& __fn, _Args&&... __args) + noexcept(__and_, + is_nothrow_constructible<_BoundArgs, _Args>...>::value) + : _M_fd(std::forward<_Fn>(__fn)), + _M_bound_args(std::forward<_Args>(__args)...) + { static_assert(sizeof...(_Args) == sizeof...(_BoundArgs)); } + + _Bind_front(const _Bind_front&) = default; + _Bind_front(_Bind_front&&) = default; + _Bind_front& operator=(const _Bind_front&) = default; + _Bind_front& operator=(_Bind_front&&) = default; + ~_Bind_front() = default; + + template + constexpr + invoke_result_t<_Fd&, _BoundArgs&..., _CallArgs...> + operator()(_CallArgs&&... __call_args) & + noexcept(is_nothrow_invocable_v<_Fd&, _BoundArgs&..., _CallArgs...>) + { + return _S_call(*this, _BoundIndices(), + std::forward<_CallArgs>(__call_args)...); + } + + template + constexpr + invoke_result_t + operator()(_CallArgs&&... __call_args) const & + noexcept(is_nothrow_invocable_v) + { + return _S_call(*this, _BoundIndices(), + std::forward<_CallArgs>(__call_args)...); + } + + template + constexpr + invoke_result_t<_Fd, _BoundArgs..., _CallArgs...> + operator()(_CallArgs&&... __call_args) && + noexcept(is_nothrow_invocable_v<_Fd, _BoundArgs..., _CallArgs...>) + { + return _S_call(std::move(*this), _BoundIndices(), + std::forward<_CallArgs>(__call_args)...); + } + + template + constexpr + invoke_result_t + operator()(_CallArgs&&... __call_args) const && + noexcept(is_nothrow_invocable_v) + { + return _S_call(std::move(*this), _BoundIndices(), + std::forward<_CallArgs>(__call_args)...); + } + + private: + using _BoundIndices = index_sequence_for<_BoundArgs...>; + + template + static constexpr + decltype(auto) + _S_call(_Tp&& __g, index_sequence<_Ind...>, _CallArgs&&... __call_args) + { + return std::invoke(std::forward<_Tp>(__g)._M_fd, + std::get<_Ind>(std::forward<_Tp>(__g)._M_bound_args)..., + std::forward<_CallArgs>(__call_args)...); + } + + _Fd _M_fd; + std::tuple<_BoundArgs...> _M_bound_args; + }; + + template + using _Bind_front_t + = _Bind_front, decay_t<_Args>...>; + + template + constexpr _Bind_front_t<_Fn, _Args...> + bind_front(_Fn&& __fn, _Args&&... __args) + noexcept(is_nothrow_constructible_v<_Bind_front_t<_Fn, _Args...>, + int, _Fn, _Args...>) + { + return _Bind_front_t<_Fn, _Args...>(0, std::forward<_Fn>(__fn), + std::forward<_Args>(__args)...); + } + + + + + template + class _Not_fn + { + template + using __inv_res_t = typename __invoke_result<_Fn2, _Args...>::type; + + template + static decltype(!std::declval<_Tp>()) + _S_not() noexcept(noexcept(!std::declval<_Tp>())); + + public: + template + constexpr + _Not_fn(_Fn2&& __fn, int) + : _M_fn(std::forward<_Fn2>(__fn)) { } + + _Not_fn(const _Not_fn& __fn) = default; + _Not_fn(_Not_fn&& __fn) = default; + ~_Not_fn() = default; +# 956 "D:/compilers/msys64/mingw64/include/c++/11.2.0/functional" 3 + template constexpr decltype(_S_not<__inv_res_t<_Fn &, _Args...>>()) operator()(_Args&&... __args) & noexcept(__is_nothrow_invocable<_Fn &, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn &, _Args...>>())) { return !std::__invoke(std::forward< _Fn & >(_M_fn), std::forward<_Args>(__args)...); } + template constexpr decltype(_S_not<__inv_res_t<_Fn const &, _Args...>>()) operator()(_Args&&... __args) const & noexcept(__is_nothrow_invocable<_Fn const &, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn const &, _Args...>>())) { return !std::__invoke(std::forward< _Fn const & >(_M_fn), std::forward<_Args>(__args)...); } + template constexpr decltype(_S_not<__inv_res_t<_Fn &&, _Args...>>()) operator()(_Args&&... __args) && noexcept(__is_nothrow_invocable<_Fn &&, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn &&, _Args...>>())) { return !std::__invoke(std::forward< _Fn && >(_M_fn), std::forward<_Args>(__args)...); } + template constexpr decltype(_S_not<__inv_res_t<_Fn const &&, _Args...>>()) operator()(_Args&&... __args) const && noexcept(__is_nothrow_invocable<_Fn const &&, _Args...>::value && noexcept(_S_not<__inv_res_t<_Fn const &&, _Args...>>())) { return !std::__invoke(std::forward< _Fn const && >(_M_fn), std::forward<_Args>(__args)...); } + + + private: + _Fn _M_fn; + }; + + template + struct __is_byte_like : false_type { }; + + template + struct __is_byte_like<_Tp, equal_to<_Tp>> + : __bool_constant::value> { }; + + template + struct __is_byte_like<_Tp, equal_to> + : __bool_constant::value> { }; + + + + enum class byte : unsigned char; + + template<> + struct __is_byte_like> + : true_type { }; + + template<> + struct __is_byte_like> + : true_type { }; + + + + template + constexpr + inline auto + not_fn(_Fn&& __fn) + noexcept(std::is_nothrow_constructible, _Fn&&>::value) + { + return _Not_fn>{std::forward<_Fn>(__fn), 0}; + } + + + + + template> + class default_searcher + { + public: + constexpr + default_searcher(_ForwardIterator1 __pat_first, + _ForwardIterator1 __pat_last, + _BinaryPredicate __pred = _BinaryPredicate()) + : _M_m(__pat_first, __pat_last, std::move(__pred)) + { } + + template + constexpr + pair<_ForwardIterator2, _ForwardIterator2> + operator()(_ForwardIterator2 __first, _ForwardIterator2 __last) const + { + _ForwardIterator2 __first_ret = + std::search(__first, __last, std::get<0>(_M_m), std::get<1>(_M_m), + std::get<2>(_M_m)); + auto __ret = std::make_pair(__first_ret, __first_ret); + if (__ret.first != __last) + std::advance(__ret.second, std::distance(std::get<0>(_M_m), + std::get<1>(_M_m))); + return __ret; + } + + private: + tuple<_ForwardIterator1, _ForwardIterator1, _BinaryPredicate> _M_m; + }; + + template + struct __boyer_moore_map_base + { + template + __boyer_moore_map_base(_RAIter __pat, size_t __patlen, + _Hash&& __hf, _Pred&& __pred) + : _M_bad_char{ __patlen, std::move(__hf), std::move(__pred) } + { + if (__patlen > 0) + for (__diff_type __i = 0; __i < __patlen - 1; ++__i) + _M_bad_char[__pat[__i]] = __patlen - 1 - __i; + } + + using __diff_type = _Tp; + + __diff_type + _M_lookup(_Key __key, __diff_type __not_found) const + { + auto __iter = _M_bad_char.find(__key); + if (__iter == _M_bad_char.end()) + return __not_found; + return __iter->second; + } + + _Pred + _M_pred() const { return _M_bad_char.key_eq(); } + + std::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char; + }; + + template + struct __boyer_moore_array_base + { + template + __boyer_moore_array_base(_RAIter __pat, size_t __patlen, + _Unused&&, _Pred&& __pred) + : _M_bad_char{ array<_Tp, _Len>{}, std::move(__pred) } + { + std::get<0>(_M_bad_char).fill(__patlen); + if (__patlen > 0) + for (__diff_type __i = 0; __i < __patlen - 1; ++__i) + { + auto __ch = __pat[__i]; + using _UCh = make_unsigned_t; + auto __uch = static_cast<_UCh>(__ch); + std::get<0>(_M_bad_char)[__uch] = __patlen - 1 - __i; + } + } + + using __diff_type = _Tp; + + template + __diff_type + _M_lookup(_Key __key, __diff_type __not_found) const + { + auto __ukey = static_cast>(__key); + if (__ukey >= _Len) + return __not_found; + return std::get<0>(_M_bad_char)[__ukey]; + } + + const _Pred& + _M_pred() const { return std::get<1>(_M_bad_char); } + + tuple, _Pred> _M_bad_char; + }; + + + + template::value_type, + typename _Diff = typename iterator_traits<_RAIter>::difference_type> + using __boyer_moore_base_t + = conditional_t<__is_byte_like<_Val, _Pred>::value, + __boyer_moore_array_base<_Diff, 256, _Pred>, + __boyer_moore_map_base<_Val, _Diff, _Hash, _Pred>>; + + template::value_type>, + typename _BinaryPredicate = equal_to<>> + class boyer_moore_searcher + : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate> + { + using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>; + using typename _Base::__diff_type; + + public: + boyer_moore_searcher(_RAIter __pat_first, _RAIter __pat_last, + _Hash __hf = _Hash(), + _BinaryPredicate __pred = _BinaryPredicate()); + + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const; + + private: + bool + _M_is_prefix(_RAIter __word, __diff_type __len, + __diff_type __pos) + { + const auto& __pred = this->_M_pred(); + __diff_type __suffixlen = __len - __pos; + for (__diff_type __i = 0; __i < __suffixlen; ++__i) + if (!__pred(__word[__i], __word[__pos + __i])) + return false; + return true; + } + + __diff_type + _M_suffix_length(_RAIter __word, __diff_type __len, + __diff_type __pos) + { + const auto& __pred = this->_M_pred(); + __diff_type __i = 0; + while (__pred(__word[__pos - __i], __word[__len - 1 - __i]) + && __i < __pos) + { + ++__i; + } + return __i; + } + + template + __diff_type + _M_bad_char_shift(_Tp __c) const + { return this->_M_lookup(__c, _M_pat_end - _M_pat); } + + _RAIter _M_pat; + _RAIter _M_pat_end; + std::vector<__diff_type> _M_good_suffix; + }; + + template::value_type>, + typename _BinaryPredicate = equal_to<>> + class boyer_moore_horspool_searcher + : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate> + { + using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>; + using typename _Base::__diff_type; + + public: + boyer_moore_horspool_searcher(_RAIter __pat, + _RAIter __pat_end, + _Hash __hf = _Hash(), + _BinaryPredicate __pred + = _BinaryPredicate()) + : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)), + _M_pat(__pat), _M_pat_end(__pat_end) + { } + + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const + { + const auto& __pred = this->_M_pred(); + auto __patlen = _M_pat_end - _M_pat; + if (__patlen == 0) + return std::make_pair(__first, __first); + auto __len = __last - __first; + while (__len >= __patlen) + { + for (auto __scan = __patlen - 1; + __pred(__first[__scan], _M_pat[__scan]); --__scan) + if (__scan == 0) + return std::make_pair(__first, __first + __patlen); + auto __shift = _M_bad_char_shift(__first[__patlen - 1]); + __len -= __shift; + __first += __shift; + } + return std::make_pair(__last, __last); + } + + private: + template + __diff_type + _M_bad_char_shift(_Tp __c) const + { return this->_M_lookup(__c, _M_pat_end - _M_pat); } + + _RAIter _M_pat; + _RAIter _M_pat_end; + }; + + template + boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>:: + boyer_moore_searcher(_RAIter __pat, _RAIter __pat_end, + _Hash __hf, _BinaryPredicate __pred) + : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)), + _M_pat(__pat), _M_pat_end(__pat_end), _M_good_suffix(__pat_end - __pat) + { + auto __patlen = __pat_end - __pat; + if (__patlen == 0) + return; + __diff_type __last_prefix = __patlen - 1; + for (__diff_type __p = __patlen - 1; __p >= 0; --__p) + { + if (_M_is_prefix(__pat, __patlen, __p + 1)) + __last_prefix = __p + 1; + _M_good_suffix[__p] = __last_prefix + (__patlen - 1 - __p); + } + for (__diff_type __p = 0; __p < __patlen - 1; ++__p) + { + auto __slen = _M_suffix_length(__pat, __patlen, __p); + auto __pos = __patlen - 1 - __slen; + if (!__pred(__pat[__p - __slen], __pat[__pos])) + _M_good_suffix[__pos] = __patlen - 1 - __p + __slen; + } + } + + template + template + pair<_RandomAccessIterator2, _RandomAccessIterator2> + boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>:: + operator()(_RandomAccessIterator2 __first, + _RandomAccessIterator2 __last) const + { + auto __patlen = _M_pat_end - _M_pat; + if (__patlen == 0) + return std::make_pair(__first, __first); + const auto& __pred = this->_M_pred(); + __diff_type __i = __patlen - 1; + auto __stringlen = __last - __first; + while (__i < __stringlen) + { + __diff_type __j = __patlen - 1; + while (__j >= 0 && __pred(__first[__i], _M_pat[__j])) + { + --__i; + --__j; + } + if (__j < 0) + { + const auto __match = __first + __i + 1; + return std::make_pair(__match, __match + __patlen); + } + __i += std::max(_M_bad_char_shift(__first[__i]), + _M_good_suffix[__j]); + } + return std::make_pair(__last, __last); + } + + + + + + +} +# 14 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/glue_algorithm_defs.h" 2 3 + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/execution_defs.h" 1 3 +# 15 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/execution_defs.h" 3 +namespace __pstl +{ +namespace execution +{ +inline namespace v1 +{ + + +class sequenced_policy +{ + public: + + static constexpr std::false_type + __allow_unsequenced() + { + return std::false_type{}; + } + static constexpr std::false_type + __allow_vector() + { + return std::false_type{}; + } + static constexpr std::false_type + __allow_parallel() + { + return std::false_type{}; + } +}; + + +class parallel_policy +{ + public: + + static constexpr std::false_type + __allow_unsequenced() + { + return std::false_type{}; + } + static constexpr std::false_type + __allow_vector() + { + return std::false_type{}; + } + static constexpr std::true_type + __allow_parallel() + { + return std::true_type{}; + } +}; + + +class parallel_unsequenced_policy +{ + public: + + static constexpr std::true_type + __allow_unsequenced() + { + return std::true_type{}; + } + static constexpr std::true_type + __allow_vector() + { + return std::true_type{}; + } + static constexpr std::true_type + __allow_parallel() + { + return std::true_type{}; + } +}; + +class unsequenced_policy +{ + public: + + static constexpr std::true_type + __allow_unsequenced() + { + return std::true_type{}; + } + static constexpr std::true_type + __allow_vector() + { + return std::true_type{}; + } + static constexpr std::false_type + __allow_parallel() + { + return std::false_type{}; + } +}; + + +constexpr sequenced_policy seq{}; +constexpr parallel_policy par{}; +constexpr parallel_unsequenced_policy par_unseq{}; +constexpr unsequenced_policy unseq{}; + + +template +struct is_execution_policy : std::false_type +{ +}; + +template <> +struct is_execution_policy<__pstl::execution::sequenced_policy> : std::true_type +{ +}; +template <> +struct is_execution_policy<__pstl::execution::parallel_policy> : std::true_type +{ +}; +template <> +struct is_execution_policy<__pstl::execution::parallel_unsequenced_policy> : std::true_type +{ +}; +template <> +struct is_execution_policy<__pstl::execution::unsequenced_policy> : std::true_type +{ +}; + + +template +constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<_Tp>::value; + + +} +} + +namespace __internal +{ +template + +using __enable_if_execution_policy = + typename std::enable_if<__pstl::execution::is_execution_policy>::value, + _Tp>::type; + + + + + +} + +} +# 16 "D:/compilers/msys64/mingw64/include/c++/11.2.0/pstl/glue_algorithm_defs.h" 2 3 + +namespace std +{ + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +any_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +all_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +none_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +for_each(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Function __f); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +for_each_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n, _Function __f); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +find_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +find_if_not(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, + _ForwardIterator2 __s_last, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, + _ForwardIterator2 __s_last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, + _ForwardIterator2 __s_first, _ForwardIterator2 __s_last, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, + _ForwardIterator2 __s_first, _ForwardIterator2 __s_last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, + typename iterator_traits<_ForwardIterator>::difference_type> +count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, + typename iterator_traits<_ForwardIterator>::difference_type> +count_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, + _ForwardIterator2 __s_last, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> +search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, + _ForwardIterator2 __s_last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count, + const _Tp& __value, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count, + const _Tp& __value); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +copy_n(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _Size __n, _ForwardIterator2 __result); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 result, + _Predicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +swap_ranges(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, + _UnaryOperation __op); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator __result, _BinaryOperation __op); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +replace_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred, + const _Tp& __new_value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +replace(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, + const _Tp& __new_value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +replace_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, + _ForwardIterator2 __result, _UnaryPredicate __pred, const _Tp& __new_value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +replace_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, + const _Tp& __old_value, const _Tp& __new_value); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +fill_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __count, const _Tp& __value); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +generate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Generator __g); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +generate_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size count, _Generator __g); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +remove_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, + _ForwardIterator2 __result, _Predicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +remove_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, + const _Tp& __value); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +remove_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +remove(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, + _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +reverse_copy(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, + _ForwardIterator __d_first); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +rotate_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __middle, _ForwardIterator1 __last, + _ForwardIterator2 __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_partitioned(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +partition(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _BidirectionalIterator> +stable_partition(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, + _UnaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +partition_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, + _ForwardIterator1 __out_true, _ForwardIterator2 __out_false, _UnaryPredicate __pred); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _BinaryPredicate __pred); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> +mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _BinaryPredicate __p); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _BinaryPredicate __p); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> +move(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, + _RandomAccessIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> +partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, + _RandomAccessIterator __d_first, _RandomAccessIterator __d_last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> +partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, + _RandomAccessIterator __d_first, _RandomAccessIterator __d_last); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _ForwardIterator __d_first, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _ForwardIterator __d_first); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, + _BidirectionalIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> +inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, + _BidirectionalIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, + _ForwardIterator2 __last2, _ForwardIterator __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator result, + _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> +is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> +is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> +max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>> +minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>> +minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); + + + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Compare __comp); + +template +__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> +lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2); + +} +# 75 "D:/compilers/msys64/mingw64/include/c++/11.2.0/algorithm" 2 3 +# 14 "../../module/sf.cxx" 2 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 1 3 +# 32 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 + template + struct __static_sign + : integral_constant + { }; + + template + struct __static_abs + : integral_constant::value> + { }; + + template + struct __static_gcd + : __static_gcd<_Qn, (_Pn % _Qn)> + { }; + + template + struct __static_gcd<_Pn, 0> + : integral_constant::value> + { }; + + template + struct __static_gcd<0, _Qn> + : integral_constant::value> + { }; + + + + + + + + template + struct __safe_multiply + { + private: + static const uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); + + static const uintmax_t __a0 = __static_abs<_Pn>::value % __c; + static const uintmax_t __a1 = __static_abs<_Pn>::value / __c; + static const uintmax_t __b0 = __static_abs<_Qn>::value % __c; + static const uintmax_t __b1 = __static_abs<_Qn>::value / __c; + + static_assert(__a1 == 0 || __b1 == 0, + "overflow in multiplication"); + static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), + "overflow in multiplication"); + static_assert(__b0 * __a0 <= 0x7fffffffffffffffLL, + "overflow in multiplication"); + static_assert((__a0 * __b1 + __b0 * __a1) * __c + <= 0x7fffffffffffffffLL - __b0 * __a0, + "overflow in multiplication"); + + public: + static const intmax_t value = _Pn * _Qn; + }; + + + + template + struct __big_less + : integral_constant + { }; + + template + struct __big_add + { + static constexpr uintmax_t __lo = __lo1 + __lo2; + static constexpr uintmax_t __hi = (__hi1 + __hi2 + + (__lo1 + __lo2 < __lo1)); + }; + + + template + struct __big_sub + { + static_assert(!__big_less<__hi1, __lo1, __hi2, __lo2>::value, + "Internal library error"); + static constexpr uintmax_t __lo = __lo1 - __lo2; + static constexpr uintmax_t __hi = (__hi1 - __hi2 - + (__lo1 < __lo2)); + }; + + + template + struct __big_mul + { + private: + static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); + static constexpr uintmax_t __x0 = __x % __c; + static constexpr uintmax_t __x1 = __x / __c; + static constexpr uintmax_t __y0 = __y % __c; + static constexpr uintmax_t __y1 = __y / __c; + static constexpr uintmax_t __x0y0 = __x0 * __y0; + static constexpr uintmax_t __x0y1 = __x0 * __y1; + static constexpr uintmax_t __x1y0 = __x1 * __y0; + static constexpr uintmax_t __x1y1 = __x1 * __y1; + static constexpr uintmax_t __mix = __x0y1 + __x1y0; + static constexpr uintmax_t __mix_lo = __mix * __c; + static constexpr uintmax_t __mix_hi + = __mix / __c + ((__mix < __x0y1) ? __c : 0); + typedef __big_add<__mix_hi, __mix_lo, __x1y1, __x0y0> _Res; + public: + static constexpr uintmax_t __hi = _Res::__hi; + static constexpr uintmax_t __lo = _Res::__lo; + }; + + + + template + struct __big_div_impl + { + private: + static_assert(__d >= (uintmax_t(1) << (sizeof(intmax_t) * 8 - 1)), + "Internal library error"); + static_assert(__n1 < __d, "Internal library error"); + static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); + static constexpr uintmax_t __d1 = __d / __c; + static constexpr uintmax_t __d0 = __d % __c; + + static constexpr uintmax_t __q1x = __n1 / __d1; + static constexpr uintmax_t __r1x = __n1 % __d1; + static constexpr uintmax_t __m = __q1x * __d0; + static constexpr uintmax_t __r1y = __r1x * __c + __n0 / __c; + static constexpr uintmax_t __r1z = __r1y + __d; + static constexpr uintmax_t __r1 + = ((__r1y < __m) ? ((__r1z >= __d) && (__r1z < __m)) + ? (__r1z + __d) : __r1z : __r1y) - __m; + static constexpr uintmax_t __q1 + = __q1x - ((__r1y < __m) + ? ((__r1z >= __d) && (__r1z < __m)) ? 2 : 1 : 0); + static constexpr uintmax_t __q0x = __r1 / __d1; + static constexpr uintmax_t __r0x = __r1 % __d1; + static constexpr uintmax_t __n = __q0x * __d0; + static constexpr uintmax_t __r0y = __r0x * __c + __n0 % __c; + static constexpr uintmax_t __r0z = __r0y + __d; + static constexpr uintmax_t __r0 + = ((__r0y < __n) ? ((__r0z >= __d) && (__r0z < __n)) + ? (__r0z + __d) : __r0z : __r0y) - __n; + static constexpr uintmax_t __q0 + = __q0x - ((__r0y < __n) ? ((__r0z >= __d) + && (__r0z < __n)) ? 2 : 1 : 0); + + public: + static constexpr uintmax_t __quot = __q1 * __c + __q0; + static constexpr uintmax_t __rem = __r0; + + private: + typedef __big_mul<__quot, __d> _Prod; + typedef __big_add<_Prod::__hi, _Prod::__lo, 0, __rem> _Sum; + static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, + "Internal library error"); + }; + + template + struct __big_div + { + private: + static_assert(__d != 0, "Internal library error"); + static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), + "This library calls __builtin_clzll on uintmax_t, which " + "is unsafe on your platform. Please complain to " + "http://gcc.gnu.org/bugzilla/"); + static constexpr int __shift = __builtin_clzll(__d); + static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift; + static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0; + static constexpr uintmax_t __c1 = uintmax_t(1) << __shift; + static constexpr uintmax_t __c2 = uintmax_t(1) << __coshift; + static constexpr uintmax_t __new_d = __d * __c1; + static constexpr uintmax_t __new_n0 = __n0 * __c1; + static constexpr uintmax_t __n1_shifted = (__n1 % __d) * __c1; + static constexpr uintmax_t __n0_top = (__shift != 0) ? (__n0 / __c2) : 0; + static constexpr uintmax_t __new_n1 = __n1_shifted + __n0_top; + typedef __big_div_impl<__new_n1, __new_n0, __new_d> _Res; + + public: + static constexpr uintmax_t __quot_hi = __n1 / __d; + static constexpr uintmax_t __quot_lo = _Res::__quot; + static constexpr uintmax_t __rem = _Res::__rem / __c1; + + private: + typedef __big_mul<__quot_lo, __d> _P0; + typedef __big_mul<__quot_hi, __d> _P1; + typedef __big_add<_P0::__hi, _P0::__lo, _P1::__lo, __rem> _Sum; + + static_assert(_P1::__hi == 0, "Internal library error"); + static_assert(_Sum::__hi >= _P0::__hi, "Internal library error"); + + static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, + "Internal library error"); + static_assert(__rem < __d, "Internal library error"); + }; +# 265 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ratio" 3 + template + struct ratio + { + static_assert(_Den != 0, "denominator cannot be zero"); + static_assert(_Num >= -0x7fffffffffffffffLL && _Den >= -0x7fffffffffffffffLL, + "out of range"); + + + static constexpr intmax_t num = + _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value; + + static constexpr intmax_t den = + __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value; + + typedef ratio type; + }; + + template + constexpr intmax_t ratio<_Num, _Den>::num; + + template + constexpr intmax_t ratio<_Num, _Den>::den; + + + + template + struct __ratio_multiply + { + private: + static const intmax_t __gcd1 = + __static_gcd<_R1::num, _R2::den>::value; + static const intmax_t __gcd2 = + __static_gcd<_R2::num, _R1::den>::value; + + public: + typedef ratio< + __safe_multiply<(_R1::num / __gcd1), + (_R2::num / __gcd2)>::value, + __safe_multiply<(_R1::den / __gcd2), + (_R2::den / __gcd1)>::value> type; + + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; + }; + + template + constexpr intmax_t __ratio_multiply<_R1, _R2>::num; + + template + constexpr intmax_t __ratio_multiply<_R1, _R2>::den; + + + + + template + using ratio_multiply = typename __ratio_multiply<_R1, _R2>::type; + + + + template + struct __ratio_divide + { + static_assert(_R2::num != 0, "division by 0"); + + typedef typename __ratio_multiply< + _R1, + ratio<_R2::den, _R2::num>>::type type; + + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; + }; + + template + constexpr intmax_t __ratio_divide<_R1, _R2>::num; + + template + constexpr intmax_t __ratio_divide<_R1, _R2>::den; + + + + + template + using ratio_divide = typename __ratio_divide<_R1, _R2>::type; + + + template + struct ratio_equal + : integral_constant + { }; + + + template + struct ratio_not_equal + : integral_constant::value> + { }; + + + + + template, + typename _Right = __big_mul<_R2::num,_R1::den> > + struct __ratio_less_impl_1 + : integral_constant::value> + { }; + + template::value + != __static_sign<_R2::num>::value)), + bool = (__static_sign<_R1::num>::value == -1 + && __static_sign<_R2::num>::value == -1)> + struct __ratio_less_impl + : __ratio_less_impl_1<_R1, _R2>::type + { }; + + template + struct __ratio_less_impl<_R1, _R2, true, false> + : integral_constant + { }; + + template + struct __ratio_less_impl<_R1, _R2, false, true> + : __ratio_less_impl_1, + ratio<-_R1::num, _R1::den> >::type + { }; + + + + + template + struct ratio_less + : __ratio_less_impl<_R1, _R2>::type + { }; + + + template + struct ratio_less_equal + : integral_constant::value> + { }; + + + template + struct ratio_greater + : integral_constant::value> + { }; + + + template + struct ratio_greater_equal + : integral_constant::value> + { }; + + + template + inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_less_v = ratio_less<_R1, _R2>::value; + template + inline constexpr bool ratio_less_equal_v = + ratio_less_equal<_R1, _R2>::value; + template + inline constexpr bool ratio_greater_v = ratio_greater<_R1, _R2>::value; + template + inline constexpr bool ratio_greater_equal_v + = ratio_greater_equal<_R1, _R2>::value; + + + + + template= 0), + bool = (_R2::num >= 0), + bool = ratio_less::value, _R1::den>, + ratio<__static_abs<_R2::num>::value, _R2::den> >::value> + struct __ratio_add_impl + { + private: + typedef typename __ratio_add_impl< + ratio<-_R1::num, _R1::den>, + ratio<-_R2::num, _R2::den> >::type __t; + public: + typedef ratio<-__t::num, __t::den> type; + }; + + + template + struct __ratio_add_impl<_R1, _R2, true, true, __b> + { + private: + static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; + static constexpr uintmax_t __d2 = _R2::den / __g; + typedef __big_mul<_R1::den, __d2> __d; + typedef __big_mul<_R1::num, _R2::den / __g> __x; + typedef __big_mul<_R2::num, _R1::den / __g> __y; + typedef __big_add<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; + static_assert(__n::__hi >= __x::__hi, "Internal library error"); + typedef __big_div<__n::__hi, __n::__lo, __g> __ng; + static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; + typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; + static_assert(__n_final::__rem == 0, "Internal library error"); + static_assert(__n_final::__quot_hi == 0 && + __n_final::__quot_lo <= 0x7fffffffffffffffLL, "overflow in addition"); + typedef __big_mul<_R1::den / __g2, __d2> __d_final; + static_assert(__d_final::__hi == 0 && + __d_final::__lo <= 0x7fffffffffffffffLL, "overflow in addition"); + public: + typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; + }; + + template + struct __ratio_add_impl<_R1, _R2, false, true, true> + : __ratio_add_impl<_R2, _R1> + { }; + + + template + struct __ratio_add_impl<_R1, _R2, true, false, false> + { + private: + static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; + static constexpr uintmax_t __d2 = _R2::den / __g; + typedef __big_mul<_R1::den, __d2> __d; + typedef __big_mul<_R1::num, _R2::den / __g> __x; + typedef __big_mul<-_R2::num, _R1::den / __g> __y; + typedef __big_sub<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; + typedef __big_div<__n::__hi, __n::__lo, __g> __ng; + static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; + typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; + static_assert(__n_final::__rem == 0, "Internal library error"); + static_assert(__n_final::__quot_hi == 0 && + __n_final::__quot_lo <= 0x7fffffffffffffffLL, "overflow in addition"); + typedef __big_mul<_R1::den / __g2, __d2> __d_final; + static_assert(__d_final::__hi == 0 && + __d_final::__lo <= 0x7fffffffffffffffLL, "overflow in addition"); + public: + typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; + }; + + template + struct __ratio_add + { + typedef typename __ratio_add_impl<_R1, _R2>::type type; + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; + }; + + template + constexpr intmax_t __ratio_add<_R1, _R2>::num; + + template + constexpr intmax_t __ratio_add<_R1, _R2>::den; + + + + + template + using ratio_add = typename __ratio_add<_R1, _R2>::type; + + + + template + struct __ratio_subtract + { + typedef typename __ratio_add< + _R1, + ratio<-_R2::num, _R2::den>>::type type; + + static constexpr intmax_t num = type::num; + static constexpr intmax_t den = type::den; + }; + + template + constexpr intmax_t __ratio_subtract<_R1, _R2>::num; + + template + constexpr intmax_t __ratio_subtract<_R1, _R2>::den; + + + + + template + using ratio_subtract = typename __ratio_subtract<_R1, _R2>::type; + + + typedef ratio<1, 1000000000000000000> atto; + typedef ratio<1, 1000000000000000> femto; + typedef ratio<1, 1000000000000> pico; + typedef ratio<1, 1000000000> nano; + typedef ratio<1, 1000000> micro; + typedef ratio<1, 1000> milli; + typedef ratio<1, 100> centi; + typedef ratio<1, 10> deci; + typedef ratio< 10, 1> deca; + typedef ratio< 100, 1> hecto; + typedef ratio< 1000, 1> kilo; + typedef ratio< 1000000, 1> mega; + typedef ratio< 1000000000, 1> giga; + typedef ratio< 1000000000000, 1> tera; + typedef ratio< 1000000000000000, 1> peta; + typedef ratio< 1000000000000000000, 1> exa; + + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 2 3 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ctime" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ctime" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ctime" 3 +# 58 "D:/compilers/msys64/mingw64/include/c++/11.2.0/ctime" 3 +namespace std +{ + using ::clock_t; + using ::time_t; + using ::tm; + + using ::clock; + using ::difftime; + using ::mktime; + using ::time; + using ::asctime; + using ::ctime; + using ::gmtime; + using ::localtime; + using ::strftime; +} +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/parse_numbers.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/parse_numbers.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/parse_numbers.h" 3 +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/parse_numbers.h" 3 +namespace std +{ + + +namespace __parse_int +{ + template + struct _Digit; + + template + struct _Digit<_Base, '0'> : integral_constant + { + using __valid = true_type; + }; + + template + struct _Digit<_Base, '1'> : integral_constant + { + using __valid = true_type; + }; + + template + struct _Digit_impl : integral_constant + { + static_assert(_Base > _Val, "invalid digit"); + using __valid = true_type; + }; + + template + struct _Digit<_Base, '2'> : _Digit_impl<_Base, 2> + { }; + + template + struct _Digit<_Base, '3'> : _Digit_impl<_Base, 3> + { }; + + template + struct _Digit<_Base, '4'> : _Digit_impl<_Base, 4> + { }; + + template + struct _Digit<_Base, '5'> : _Digit_impl<_Base, 5> + { }; + + template + struct _Digit<_Base, '6'> : _Digit_impl<_Base, 6> + { }; + + template + struct _Digit<_Base, '7'> : _Digit_impl<_Base, 7> + { }; + + template + struct _Digit<_Base, '8'> : _Digit_impl<_Base, 8> + { }; + + template + struct _Digit<_Base, '9'> : _Digit_impl<_Base, 9> + { }; + + template + struct _Digit<_Base, 'a'> : _Digit_impl<_Base, 0xa> + { }; + + template + struct _Digit<_Base, 'A'> : _Digit_impl<_Base, 0xa> + { }; + + template + struct _Digit<_Base, 'b'> : _Digit_impl<_Base, 0xb> + { }; + + template + struct _Digit<_Base, 'B'> : _Digit_impl<_Base, 0xb> + { }; + + template + struct _Digit<_Base, 'c'> : _Digit_impl<_Base, 0xc> + { }; + + template + struct _Digit<_Base, 'C'> : _Digit_impl<_Base, 0xc> + { }; + + template + struct _Digit<_Base, 'd'> : _Digit_impl<_Base, 0xd> + { }; + + template + struct _Digit<_Base, 'D'> : _Digit_impl<_Base, 0xd> + { }; + + template + struct _Digit<_Base, 'e'> : _Digit_impl<_Base, 0xe> + { }; + + template + struct _Digit<_Base, 'E'> : _Digit_impl<_Base, 0xe> + { }; + + template + struct _Digit<_Base, 'f'> : _Digit_impl<_Base, 0xf> + { }; + + template + struct _Digit<_Base, 'F'> : _Digit_impl<_Base, 0xf> + { }; + + + template + struct _Digit<_Base, '\''> : integral_constant + { + using __valid = false_type; + }; + + + + template + using __ull_constant = integral_constant; + + template + struct _Power_help + { + using __next = typename _Power_help<_Base, _Digs...>::type; + using __valid_digit = typename _Digit<_Base, _Dig>::__valid; + using type + = __ull_constant<__next::value * (__valid_digit{} ? _Base : 1ULL)>; + }; + + template + struct _Power_help<_Base, _Dig> + { + using __valid_digit = typename _Digit<_Base, _Dig>::__valid; + using type = __ull_constant<__valid_digit::value>; + }; + + template + struct _Power : _Power_help<_Base, _Digs...>::type + { }; + + template + struct _Power<_Base> : __ull_constant<0> + { }; + + + + template + struct _Number_help + { + using __digit = _Digit<_Base, _Dig>; + using __valid_digit = typename __digit::__valid; + using __next = _Number_help<_Base, + __valid_digit::value ? _Pow / _Base : _Pow, + _Digs...>; + using type = __ull_constant<_Pow * __digit::value + __next::type::value>; + static_assert((type::value / _Pow) == __digit::value, + "integer literal does not fit in unsigned long long"); + }; + + + template + struct _Number_help<_Base, _Pow, '\'', _Dig, _Digs...> + : _Number_help<_Base, _Pow, _Dig, _Digs...> + { }; + + + template + struct _Number_help<_Base, 1ULL, _Dig> + { + using type = __ull_constant<_Digit<_Base, _Dig>::value>; + }; + + template + struct _Number + : _Number_help<_Base, _Power<_Base, _Digs...>::value, _Digs...>::type + { }; + + template + struct _Number<_Base> + : __ull_constant<0> + { }; + + + + template + struct _Parse_int; + + template + struct _Parse_int<'0', 'b', _Digs...> + : _Number<2U, _Digs...>::type + { }; + + template + struct _Parse_int<'0', 'B', _Digs...> + : _Number<2U, _Digs...>::type + { }; + + template + struct _Parse_int<'0', 'x', _Digs...> + : _Number<16U, _Digs...>::type + { }; + + template + struct _Parse_int<'0', 'X', _Digs...> + : _Number<16U, _Digs...>::type + { }; + + template + struct _Parse_int<'0', _Digs...> + : _Number<8U, _Digs...>::type + { }; + + template + struct _Parse_int + : _Number<10U, _Digs...>::type + { }; + +} + + +namespace __select_int +{ + template + struct _Select_int_base; + + template + struct _Select_int_base<_Val, _IntType, _Ints...> + : conditional_t<(_Val <= __gnu_cxx::__int_traits<_IntType>::__max), + integral_constant<_IntType, (_IntType)_Val>, + _Select_int_base<_Val, _Ints...>> + { }; + + template + struct _Select_int_base<_Val> + { }; + + template + using _Select_int = typename _Select_int_base< + __parse_int::_Parse_int<_Digs...>::value, + unsigned char, + unsigned short, + unsigned int, + unsigned long, + unsigned long long + >::type; + +} + + +} +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 2 3 + + + + + +namespace std +{ + + + + namespace filesystem { struct __file_clock; }; +# 68 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + namespace chrono + { + template> + struct duration; + + template + struct time_point; + } + + + + + + template + struct __duration_common_type + { }; + + template + struct __duration_common_type<_CT, _Period1, _Period2, + __void_t> + { + private: + using __gcd_num = __static_gcd<_Period1::num, _Period2::num>; + using __gcd_den = __static_gcd<_Period1::den, _Period2::den>; + using __cr = typename _CT::type; + using __r = ratio<__gcd_num::value, + (_Period1::den / __gcd_den::value) * _Period2::den>; + + public: + using type = chrono::duration<__cr, typename __r::type>; + }; + + + + + + template + struct common_type, + chrono::duration<_Rep2, _Period2>> + : __duration_common_type, + typename _Period1::type, + typename _Period2::type> + { }; + + + + template + struct common_type, + chrono::duration<_Rep, _Period>> + { + using type = chrono::duration::type, + typename _Period::type>; + }; + + + + template + struct common_type> + { + using type = chrono::duration::type, + typename _Period::type>; + }; + + + + + + template + struct __timepoint_common_type + { }; + + template + struct __timepoint_common_type<_CT, _Clock, __void_t> + { + using type = chrono::time_point<_Clock, typename _CT::type>; + }; + + + + + + template + struct common_type, + chrono::time_point<_Clock, _Duration2>> + : __timepoint_common_type, _Clock> + { }; + + + + template + struct common_type, + chrono::time_point<_Clock, _Duration>> + { using type = chrono::time_point<_Clock, _Duration>; }; + + + + template + struct common_type> + { using type = chrono::time_point<_Clock, _Duration>; }; + + + + namespace chrono + { + + + + + + + template + struct __duration_cast_impl + { + template + static constexpr _ToDur + __cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::rep __to_rep; + return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count()) + * static_cast<_CR>(_CF::num) + / static_cast<_CR>(_CF::den))); + } + }; + + template + struct __duration_cast_impl<_ToDur, _CF, _CR, true, true> + { + template + static constexpr _ToDur + __cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::rep __to_rep; + return _ToDur(static_cast<__to_rep>(__d.count())); + } + }; + + template + struct __duration_cast_impl<_ToDur, _CF, _CR, true, false> + { + template + static constexpr _ToDur + __cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::rep __to_rep; + return _ToDur(static_cast<__to_rep>( + static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den))); + } + }; + + template + struct __duration_cast_impl<_ToDur, _CF, _CR, false, true> + { + template + static constexpr _ToDur + __cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::rep __to_rep; + return _ToDur(static_cast<__to_rep>( + static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num))); + } + }; + + template + struct __is_duration + : std::false_type + { }; + + template + struct __is_duration> + : std::true_type + { }; + + template + using __enable_if_is_duration + = typename enable_if<__is_duration<_Tp>::value, _Tp>::type; + + template + using __disable_if_is_duration + = typename enable_if::value, _Tp>::type; + + + + + template + constexpr __enable_if_is_duration<_ToDur> + duration_cast(const duration<_Rep, _Period>& __d) + { + typedef typename _ToDur::period __to_period; + typedef typename _ToDur::rep __to_rep; + typedef ratio_divide<_Period, __to_period> __cf; + typedef typename common_type<__to_rep, _Rep, intmax_t>::type + __cr; + typedef __duration_cast_impl<_ToDur, __cf, __cr, + __cf::num == 1, __cf::den == 1> __dc; + return __dc::__cast(__d); + } + + + template + struct treat_as_floating_point + : is_floating_point<_Rep> + { }; + + + template + inline constexpr bool treat_as_floating_point_v = + treat_as_floating_point<_Rep>::value; + + + + template + struct is_clock; + + template + inline constexpr bool is_clock_v = is_clock<_Tp>::value; + + + template + struct is_clock : false_type + { }; + + template + requires requires { + typename _Tp::rep; + typename _Tp::period; + typename _Tp::duration; + typename _Tp::time_point::clock; + typename _Tp::time_point::duration; + { &_Tp::is_steady } -> same_as; + { _Tp::now() } -> same_as; + requires same_as>; + requires same_as; + } + struct is_clock<_Tp> : true_type + { }; +# 335 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template + constexpr __enable_if_is_duration<_ToDur> + floor(const duration<_Rep, _Period>& __d) + { + auto __to = chrono::duration_cast<_ToDur>(__d); + if (__to > __d) + return __to - _ToDur{1}; + return __to; + } + + template + constexpr __enable_if_is_duration<_ToDur> + ceil(const duration<_Rep, _Period>& __d) + { + auto __to = chrono::duration_cast<_ToDur>(__d); + if (__to < __d) + return __to + _ToDur{1}; + return __to; + } + + template + constexpr enable_if_t< + __and_<__is_duration<_ToDur>, + __not_>>::value, + _ToDur> + round(const duration<_Rep, _Period>& __d) + { + _ToDur __t0 = chrono::floor<_ToDur>(__d); + _ToDur __t1 = __t0 + _ToDur{1}; + auto __diff0 = __d - __t0; + auto __diff1 = __t1 - __d; + if (__diff0 == __diff1) + { + if (__t0.count() & 1) + return __t1; + return __t0; + } + else if (__diff0 < __diff1) + return __t0; + return __t1; + } + + template + constexpr + enable_if_t::is_signed, duration<_Rep, _Period>> + abs(duration<_Rep, _Period> __d) + { + if (__d >= __d.zero()) + return __d; + return -__d; + } + + + namespace __detail { using chrono::ceil; } +# 415 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template + struct duration_values + { + static constexpr _Rep + zero() noexcept + { return _Rep(0); } + + static constexpr _Rep + max() noexcept + { return numeric_limits<_Rep>::max(); } + + static constexpr _Rep + min() noexcept + { return numeric_limits<_Rep>::lowest(); } + }; + + + + template + struct __is_ratio + : std::false_type + { }; + + template + struct __is_ratio> + : std::true_type + { }; + + + + + template + struct duration + { + private: + template + using __is_float = treat_as_floating_point<_Rep2>; + + static constexpr intmax_t + _S_gcd(intmax_t __m, intmax_t __n) noexcept + { + + + + do + { + intmax_t __rem = __m % __n; + __m = __n; + __n = __rem; + } + while (__n != 0); + return __m; + + + + + + } + + + + + + template + using __divide = ratio<(_R1::num / __gcd1) * (_R2::den / __gcd2), + (_R1::den / __gcd2) * (_R2::num / __gcd1)>; + + + template + using __is_harmonic + = __bool_constant<__divide<_Period2, _Period>::den == 1>; + + public: + + using rep = _Rep; + using period = typename _Period::type; + + static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration"); + static_assert(__is_ratio<_Period>::value, + "period must be a specialization of ratio"); + static_assert(_Period::num > 0, "period must be positive"); + + + constexpr duration() = default; + + duration(const duration&) = default; + + + + template, + __or_<__is_float, __not_<__is_float<_Rep2>>>>> + constexpr explicit duration(const _Rep2& __rep) + : __r(static_cast(__rep)) { } + + template, + __or_<__is_float, + __and_<__is_harmonic<_Period2>, + __not_<__is_float<_Rep2>>>>>> + constexpr duration(const duration<_Rep2, _Period2>& __d) + : __r(duration_cast(__d).count()) { } + + ~duration() = default; + duration& operator=(const duration&) = default; + + + constexpr rep + count() const + { return __r; } + + + + constexpr duration::type, period> + operator+() const + { return duration::type, period>(__r); } + + constexpr duration::type, period> + operator-() const + { return duration::type, period>(-__r); } + + constexpr duration& + operator++() + { + ++__r; + return *this; + } + + constexpr duration + operator++(int) + { return duration(__r++); } + + constexpr duration& + operator--() + { + --__r; + return *this; + } + + constexpr duration + operator--(int) + { return duration(__r--); } + + constexpr duration& + operator+=(const duration& __d) + { + __r += __d.count(); + return *this; + } + + constexpr duration& + operator-=(const duration& __d) + { + __r -= __d.count(); + return *this; + } + + constexpr duration& + operator*=(const rep& __rhs) + { + __r *= __rhs; + return *this; + } + + constexpr duration& + operator/=(const rep& __rhs) + { + __r /= __rhs; + return *this; + } + + + template + constexpr + typename enable_if::value, + duration&>::type + operator%=(const rep& __rhs) + { + __r %= __rhs; + return *this; + } + + template + constexpr + typename enable_if::value, + duration&>::type + operator%=(const duration& __d) + { + __r %= __d.count(); + return *this; + } + + + static constexpr duration + zero() noexcept + { return duration(duration_values::zero()); } + + static constexpr duration + min() noexcept + { return duration(duration_values::min()); } + + static constexpr duration + max() noexcept + { return duration(duration_values::max()); } + + private: + rep __r; + }; + + + + + template + constexpr typename common_type, + duration<_Rep2, _Period2>>::type + operator+(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __cd; + return __cd(__cd(__lhs).count() + __cd(__rhs).count()); + } + + + template + constexpr typename common_type, + duration<_Rep2, _Period2>>::type + operator-(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __cd; + return __cd(__cd(__lhs).count() - __cd(__rhs).count()); + } +# 664 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template::type> + using __common_rep_t = typename + enable_if::value, _CRep>::type; + + + + + + + template + constexpr duration<__common_rep_t<_Rep1, _Rep2>, _Period> + operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) + { + typedef duration::type, _Period> + __cd; + return __cd(__cd(__d).count() * __s); + } + + + template + constexpr duration<__common_rep_t<_Rep2, _Rep1>, _Period> + operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) + { return __d * __s; } + + template + constexpr + duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> + operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) + { + typedef duration::type, _Period> + __cd; + return __cd(__cd(__d).count() / __s); + } + + template + constexpr typename common_type<_Rep1, _Rep2>::type + operator/(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __cd; + return __cd(__lhs).count() / __cd(__rhs).count(); + } + + + template + constexpr + duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> + operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) + { + typedef duration::type, _Period> + __cd; + return __cd(__cd(__d).count() % __s); + } + + template + constexpr typename common_type, + duration<_Rep2, _Period2>>::type + operator%(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __cd; + return __cd(__cd(__lhs).count() % __cd(__rhs).count()); + } + + + + template + constexpr bool + operator==(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __ct; + return __ct(__lhs).count() == __ct(__rhs).count(); + } + + template + constexpr bool + operator<(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<__dur1,__dur2>::type __ct; + return __ct(__lhs).count() < __ct(__rhs).count(); + } + + + template + requires three_way_comparable> + constexpr auto + operator<=>(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + using __ct = common_type_t, + duration<_Rep2, _Period2>>; + return __ct(__lhs).count() <=> __ct(__rhs).count(); + } +# 782 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template + constexpr bool + operator<=(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { return !(__rhs < __lhs); } + + template + constexpr bool + operator>(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { return __rhs < __lhs; } + + template + constexpr bool + operator>=(const duration<_Rep1, _Period1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { return !(__lhs < __rhs); } +# 816 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + using nanoseconds = duration; + + + using microseconds = duration; + + + using milliseconds = duration; + + + using seconds = duration; + + + using minutes = duration>; + + + using hours = duration>; + + + + using days = duration>; + + + using weeks = duration>; + + + using years = duration>; + + + using months = duration>; + + + + + + template + struct time_point + { + static_assert(__is_duration<_Dur>::value, + "duration must be a specialization of std::chrono::duration"); + + typedef _Clock clock; + typedef _Dur duration; + typedef typename duration::rep rep; + typedef typename duration::period period; + + constexpr time_point() : __d(duration::zero()) + { } + + constexpr explicit time_point(const duration& __dur) + : __d(__dur) + { } + + + template>> + constexpr time_point(const time_point& __t) + : __d(__t.time_since_epoch()) + { } + + + constexpr duration + time_since_epoch() const + { return __d; } + + + constexpr time_point& + operator++() + { + ++__d; + return *this; + } + + constexpr time_point + operator++(int) + { return time_point{__d++}; } + + constexpr time_point& + operator--() + { + --__d; + return *this; + } + + constexpr time_point + operator--(int) + { return time_point{__d--}; } + + + + constexpr time_point& + operator+=(const duration& __dur) + { + __d += __dur; + return *this; + } + + constexpr time_point& + operator-=(const duration& __dur) + { + __d -= __dur; + return *this; + } + + + static constexpr time_point + min() noexcept + { return time_point(duration::min()); } + + static constexpr time_point + max() noexcept + { return time_point(duration::max()); } + + private: + duration __d; + }; + + + template + constexpr typename enable_if<__is_duration<_ToDur>::value, + time_point<_Clock, _ToDur>>::type + time_point_cast(const time_point<_Clock, _Dur>& __t) + { + typedef time_point<_Clock, _ToDur> __time_point; + return __time_point(duration_cast<_ToDur>(__t.time_since_epoch())); + } + + + template + constexpr + enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>> + floor(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::floor<_ToDur>(__tp.time_since_epoch())}; + } + + template + constexpr + enable_if_t<__is_duration<_ToDur>::value, time_point<_Clock, _ToDur>> + ceil(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::ceil<_ToDur>(__tp.time_since_epoch())}; + } + + template + constexpr enable_if_t< + __and_<__is_duration<_ToDur>, + __not_>>::value, + time_point<_Clock, _ToDur>> + round(const time_point<_Clock, _Dur>& __tp) + { + return time_point<_Clock, _ToDur>{ + chrono::round<_ToDur>(__tp.time_since_epoch())}; + } + + + + + + template + constexpr time_point<_Clock, + typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> + operator+(const time_point<_Clock, _Dur1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<_Dur1,__dur2>::type __ct; + typedef time_point<_Clock, __ct> __time_point; + return __time_point(__lhs.time_since_epoch() + __rhs); + } + + + template + constexpr time_point<_Clock, + typename common_type, _Dur2>::type> + operator+(const duration<_Rep1, _Period1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { + typedef duration<_Rep1, _Period1> __dur1; + typedef typename common_type<__dur1,_Dur2>::type __ct; + typedef time_point<_Clock, __ct> __time_point; + return __time_point(__rhs.time_since_epoch() + __lhs); + } + + + template + constexpr time_point<_Clock, + typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> + operator-(const time_point<_Clock, _Dur1>& __lhs, + const duration<_Rep2, _Period2>& __rhs) + { + typedef duration<_Rep2, _Period2> __dur2; + typedef typename common_type<_Dur1,__dur2>::type __ct; + typedef time_point<_Clock, __ct> __time_point; + return __time_point(__lhs.time_since_epoch() -__rhs); + } + + + + + + + template + constexpr typename common_type<_Dur1, _Dur2>::type + operator-(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __lhs.time_since_epoch() - __rhs.time_since_epoch(); } + + template + constexpr bool + operator==(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); } + + + template _Dur2> + constexpr auto + operator<=>(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __lhs.time_since_epoch() <=> __rhs.time_since_epoch(); } +# 1049 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + template + constexpr bool + operator<(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); } + + template + constexpr bool + operator<=(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return !(__rhs < __lhs); } + + template + constexpr bool + operator>(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return __rhs < __lhs; } + + template + constexpr bool + operator>=(const time_point<_Clock, _Dur1>& __lhs, + const time_point<_Clock, _Dur2>& __rhs) + { return !(__lhs < __rhs); } +# 1093 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + inline namespace _V2 { + + + + + + + + struct system_clock + { + typedef chrono::nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + + static_assert(system_clock::duration::min() + < system_clock::duration::zero(), + "a clock's minimum duration cannot be less than its epoch"); + + static constexpr bool is_steady = false; + + static time_point + now() noexcept; + + + static std::time_t + to_time_t(const time_point& __t) noexcept + { + return std::time_t(duration_cast + (__t.time_since_epoch()).count()); + } + + static time_point + from_time_t(std::time_t __t) noexcept + { + typedef chrono::time_point __from; + return time_point_cast + (__from(chrono::seconds(__t))); + } + }; +# 1141 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + struct steady_clock + { + typedef chrono::nanoseconds duration; + typedef duration::rep rep; + typedef duration::period period; + typedef chrono::time_point time_point; + + static constexpr bool is_steady = true; + + static time_point + now() noexcept; + }; +# 1163 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + using high_resolution_clock = system_clock; + + } + + + template + using sys_time = time_point; + using sys_seconds = sys_time; + using sys_days = sys_time; + + using file_clock = ::std::filesystem::__file_clock; + + template + using file_time = time_point; + + template<> struct is_clock : true_type { }; + template<> struct is_clock : true_type { }; + template<> struct is_clock : true_type { }; + + template<> inline constexpr bool is_clock_v = true; + template<> inline constexpr bool is_clock_v = true; + template<> inline constexpr bool is_clock_v = true; + + struct local_t { }; + template + using local_time = time_point; + using local_seconds = local_time; + using local_days = local_time; + + class utc_clock; + class tai_clock; + class gps_clock; + + template + using utc_time = time_point; + using utc_seconds = utc_time; + + template + using tai_time = time_point; + using tai_seconds = tai_time; + + template + using gps_time = time_point; + using gps_seconds = gps_time; + + template<> struct is_clock : true_type { }; + template<> struct is_clock : true_type { }; + template<> struct is_clock : true_type { }; + + template<> inline constexpr bool is_clock_v = true; + template<> inline constexpr bool is_clock_v = true; + template<> inline constexpr bool is_clock_v = true; + + struct leap_second_info + { + bool is_leap_second; + seconds elapsed; + }; + + + + + class day; + class month; + class year; + class weekday; + class weekday_indexed; + class weekday_last; + class month_day; + class month_day_last; + class month_weekday; + class month_weekday_last; + class year_month; + class year_month_day; + class year_month_day_last; + class year_month_weekday; + class year_month_weekday_last; + + struct last_spec + { + explicit last_spec() = default; + + friend constexpr month_day_last + operator/(int __m, last_spec) noexcept; + + friend constexpr month_day_last + operator/(last_spec, int __m) noexcept; + }; + + inline constexpr last_spec last{}; + + namespace __detail + { + + + + + + constexpr unsigned + __modulo(long long __n, unsigned __d) + { + if (__n >= 0) + return __n % __d; + else + return (__d + (__n % __d)) % __d; + } + + inline constexpr unsigned __days_per_month[12] + = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + } + + + + class day + { + private: + unsigned char _M_d; + + public: + day() = default; + + explicit constexpr + day(unsigned __d) noexcept + : _M_d(__d) + { } + + constexpr day& + operator++() noexcept + { + ++_M_d; + return *this; + } + + constexpr day + operator++(int) noexcept + { + auto __ret = *this; + ++(*this); + return __ret; + } + + constexpr day& + operator--() noexcept + { + --_M_d; + return *this; + } + + constexpr day + operator--(int) noexcept + { + auto __ret = *this; + --(*this); + return __ret; + } + + constexpr day& + operator+=(const days& __d) noexcept + { + *this = *this + __d; + return *this; + } + + constexpr day& + operator-=(const days& __d) noexcept + { + *this = *this - __d; + return *this; + } + + constexpr explicit + operator unsigned() const noexcept + { return _M_d; } + + constexpr bool + ok() const noexcept + { return 1 <= _M_d && _M_d <= 31; } + + friend constexpr bool + operator==(const day& __x, const day& __y) noexcept + { return unsigned{__x} == unsigned{__y}; } + + friend constexpr strong_ordering + operator<=>(const day& __x, const day& __y) noexcept + { return unsigned{__x} <=> unsigned{__y}; } + + friend constexpr day + operator+(const day& __x, const days& __y) noexcept + { return day(unsigned{__x} + __y.count()); } + + friend constexpr day + operator+(const days& __x, const day& __y) noexcept + { return __y + __x; } + + friend constexpr day + operator-(const day& __x, const days& __y) noexcept + { return __x + -__y; } + + friend constexpr days + operator-(const day& __x, const day& __y) noexcept + { return days{int(unsigned{__x}) - int(unsigned{__y})}; } + + friend constexpr month_day + operator/(const month& __m, const day& __d) noexcept; + + friend constexpr month_day + operator/(int __m, const day& __d) noexcept; + + friend constexpr month_day + operator/(const day& __d, const month& __m) noexcept; + + friend constexpr month_day + operator/(const day& __d, int __m) noexcept; + + friend constexpr year_month_day + operator/(const year_month& __ym, const day& __d) noexcept; + + + }; + + + + class month + { + private: + unsigned char _M_m; + + public: + month() = default; + + explicit constexpr + month(unsigned __m) noexcept + : _M_m(__m) + { } + + constexpr month& + operator++() noexcept + { + *this += months{1}; + return *this; + } + + constexpr month + operator++(int) noexcept + { + auto __ret = *this; + ++(*this); + return __ret; + } + + constexpr month& + operator--() noexcept + { + *this -= months{1}; + return *this; + } + + constexpr month + operator--(int) noexcept + { + auto __ret = *this; + --(*this); + return __ret; + } + + constexpr month& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + constexpr month& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + explicit constexpr + operator unsigned() const noexcept + { return _M_m; } + + constexpr bool + ok() const noexcept + { return 1 <= _M_m && _M_m <= 12; } + + friend constexpr bool + operator==(const month& __x, const month& __y) noexcept + { return unsigned{__x} == unsigned{__y}; } + + friend constexpr strong_ordering + operator<=>(const month& __x, const month& __y) noexcept + { return unsigned{__x} <=> unsigned{__y}; } + + friend constexpr month + operator+(const month& __x, const months& __y) noexcept + { + auto __n = static_cast(unsigned{__x}) + (__y.count() - 1); + return month{__detail::__modulo(__n, 12) + 1}; + } + + friend constexpr month + operator+(const months& __x, const month& __y) noexcept + { return __y + __x; } + + friend constexpr month + operator-(const month& __x, const months& __y) noexcept + { return __x + -__y; } + + friend constexpr months + operator-(const month& __x, const month& __y) noexcept + { + const auto __dm = int(unsigned(__x)) - int(unsigned(__y)); + return months{__dm < 0 ? 12 + __dm : __dm}; + } + + friend constexpr year_month + operator/(const year& __y, const month& __m) noexcept; + + friend constexpr month_day + operator/(const month& __m, int __d) noexcept; + + friend constexpr month_day_last + operator/(const month& __m, last_spec) noexcept; + + friend constexpr month_day_last + operator/(last_spec, const month& __m) noexcept; + + friend constexpr month_weekday + operator/(const month& __m, const weekday_indexed& __wdi) noexcept; + + friend constexpr month_weekday + operator/(const weekday_indexed& __wdi, const month& __m) noexcept; + + friend constexpr month_weekday_last + operator/(const month& __m, const weekday_last& __wdl) noexcept; + + friend constexpr month_weekday_last + operator/(const weekday_last& __wdl, const month& __m) noexcept; + + + }; + + inline constexpr month January{1}; + inline constexpr month February{2}; + inline constexpr month March{3}; + inline constexpr month April{4}; + inline constexpr month May{5}; + inline constexpr month June{6}; + inline constexpr month July{7}; + inline constexpr month August{8}; + inline constexpr month September{9}; + inline constexpr month October{10}; + inline constexpr month November{11}; + inline constexpr month December{12}; + + + + class year + { + private: + short _M_y; + + public: + year() = default; + + explicit constexpr + year(int __y) noexcept + : _M_y{static_cast(__y)} + { } + + static constexpr year + min() noexcept + { return year{-32767}; } + + static constexpr year + max() noexcept + { return year{32767}; } + + constexpr year& + operator++() noexcept + { + ++_M_y; + return *this; + } + + constexpr year + operator++(int) noexcept + { + auto __ret = *this; + ++(*this); + return __ret; + } + + constexpr year& + operator--() noexcept + { + --_M_y; + return *this; + } + + constexpr year + operator--(int) noexcept + { + auto __ret = *this; + --(*this); + return __ret; + } + + constexpr year& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr year + operator+() const noexcept + { return *this; } + + constexpr year + operator-() const noexcept + { return year{-_M_y}; } + + constexpr bool + is_leap() const noexcept + { +# 1609 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + constexpr uint32_t __multiplier = 42949673; + constexpr uint32_t __bound = 42949669; + constexpr uint32_t __max_dividend = 1073741799; + constexpr uint32_t __offset = __max_dividend / 2 / 100 * 100; + const bool __is_multiple_of_100 + = __multiplier * (_M_y + __offset) < __bound; + return (!__is_multiple_of_100 || _M_y % 400 == 0) && _M_y % 4 == 0; + } + + explicit constexpr + operator int() const noexcept + { return _M_y; } + + constexpr bool + ok() const noexcept + { return min()._M_y <= _M_y && _M_y <= max()._M_y; } + + friend constexpr bool + operator==(const year& __x, const year& __y) noexcept + { return int{__x} == int{__y}; } + + friend constexpr strong_ordering + operator<=>(const year& __x, const year& __y) noexcept + { return int{__x} <=> int{__y}; } + + friend constexpr year + operator+(const year& __x, const years& __y) noexcept + { return year{int{__x} + static_cast(__y.count())}; } + + friend constexpr year + operator+(const years& __x, const year& __y) noexcept + { return __y + __x; } + + friend constexpr year + operator-(const year& __x, const years& __y) noexcept + { return __x + -__y; } + + friend constexpr years + operator-(const year& __x, const year& __y) noexcept + { return years{int{__x} - int{__y}}; } + + friend constexpr year_month + operator/(const year& __y, int __m) noexcept; + + friend constexpr year_month_day + operator/(const year& __y, const month_day& __md) noexcept; + + friend constexpr year_month_day + operator/(const month_day& __md, const year& __y) noexcept; + + friend constexpr year_month_day_last + operator/(const year& __y, const month_day_last& __mdl) noexcept; + + friend constexpr year_month_day_last + operator/(const month_day_last& __mdl, const year& __y) noexcept; + + friend constexpr year_month_weekday + operator/(const year& __y, const month_weekday& __mwd) noexcept; + + friend constexpr year_month_weekday + operator/(const month_weekday& __mwd, const year& __y) noexcept; + + friend constexpr year_month_weekday_last + operator/(const year& __y, const month_weekday_last& __mwdl) noexcept; + + friend constexpr year_month_weekday_last + operator/(const month_weekday_last& __mwdl, const year& __y) noexcept; + + + }; + + + + class weekday + { + private: + unsigned char _M_wd; + + static constexpr weekday + _S_from_days(const days& __d) + { + auto __n = __d.count(); + return weekday(__n >= -4 ? (__n + 4) % 7 : (__n + 5) % 7 + 6); + } + + public: + weekday() = default; + + explicit constexpr + weekday(unsigned __wd) noexcept + : _M_wd(__wd == 7 ? 0 : __wd) + { } + + constexpr + weekday(const sys_days& __dp) noexcept + : weekday{_S_from_days(__dp.time_since_epoch())} + { } + + explicit constexpr + weekday(const local_days& __dp) noexcept + : weekday{sys_days{__dp.time_since_epoch()}} + { } + + constexpr weekday& + operator++() noexcept + { + *this += days{1}; + return *this; + } + + constexpr weekday + operator++(int) noexcept + { + auto __ret = *this; + ++(*this); + return __ret; + } + + constexpr weekday& + operator--() noexcept + { + *this -= days{1}; + return *this; + } + + constexpr weekday + operator--(int) noexcept + { + auto __ret = *this; + --(*this); + return __ret; + } + + constexpr weekday& + operator+=(const days& __d) noexcept + { + *this = *this + __d; + return *this; + } + + constexpr weekday& + operator-=(const days& __d) noexcept + { + *this = *this - __d; + return *this; + } + + constexpr unsigned + c_encoding() const noexcept + { return _M_wd; } + + constexpr unsigned + iso_encoding() const noexcept + { return _M_wd == 0u ? 7u : _M_wd; } + + constexpr bool + ok() const noexcept + { return _M_wd <= 6; } + + constexpr weekday_indexed + operator[](unsigned __index) const noexcept; + + constexpr weekday_last + operator[](last_spec) const noexcept; + + friend constexpr bool + operator==(const weekday& __x, const weekday& __y) noexcept + { return __x._M_wd == __y._M_wd; } + + friend constexpr weekday + operator+(const weekday& __x, const days& __y) noexcept + { + auto __n = static_cast(__x._M_wd) + __y.count(); + return weekday{__detail::__modulo(__n, 7)}; + } + + friend constexpr weekday + operator+(const days& __x, const weekday& __y) noexcept + { return __y + __x; } + + friend constexpr weekday + operator-(const weekday& __x, const days& __y) noexcept + { return __x + -__y; } + + friend constexpr days + operator-(const weekday& __x, const weekday& __y) noexcept + { + auto __n = static_cast(__x._M_wd) - __y._M_wd; + return days{__detail::__modulo(__n, 7)}; + } + + + }; + + inline constexpr weekday Sunday{0}; + inline constexpr weekday Monday{1}; + inline constexpr weekday Tuesday{2}; + inline constexpr weekday Wednesday{3}; + inline constexpr weekday Thursday{4}; + inline constexpr weekday Friday{5}; + inline constexpr weekday Saturday{6}; + + + + class weekday_indexed + { + private: + chrono::weekday _M_wd; + unsigned char _M_index; + + public: + weekday_indexed() = default; + + constexpr + weekday_indexed(const chrono::weekday& __wd, unsigned __index) noexcept + : _M_wd(__wd), _M_index(__index) + { } + + constexpr chrono::weekday + weekday() const noexcept + { return _M_wd; } + + constexpr unsigned + index() const noexcept + { return _M_index; }; + + constexpr bool + ok() const noexcept + { return _M_wd.ok() && 1 <= _M_index && _M_index <= 5; } + + friend constexpr bool + operator==(const weekday_indexed& __x, const weekday_indexed& __y) noexcept + { return __x.weekday() == __y.weekday() && __x.index() == __y.index(); } + + friend constexpr month_weekday + operator/(const month& __m, const weekday_indexed& __wdi) noexcept; + + friend constexpr month_weekday + operator/(int __m, const weekday_indexed& __wdi) noexcept; + + friend constexpr month_weekday + operator/(const weekday_indexed& __wdi, const month& __m) noexcept; + + friend constexpr month_weekday + operator/(const weekday_indexed& __wdi, int __m) noexcept; + + friend constexpr year_month_weekday + operator/(const year_month& __ym, const weekday_indexed& __wdi) noexcept; + + + }; + + constexpr weekday_indexed + weekday::operator[](unsigned __index) const noexcept + { return {*this, __index}; } + + + + class weekday_last + { + private: + chrono::weekday _M_wd; + + public: + explicit constexpr + weekday_last(const chrono::weekday& __wd) noexcept + : _M_wd{__wd} + { } + + constexpr chrono::weekday + weekday() const noexcept + { return _M_wd; } + + constexpr bool + ok() const noexcept + { return _M_wd.ok(); } + + friend constexpr bool + operator==(const weekday_last& __x, const weekday_last& __y) noexcept + { return __x.weekday() == __y.weekday(); } + + friend constexpr month_weekday_last + operator/(int __m, const weekday_last& __wdl) noexcept; + + friend constexpr month_weekday_last + operator/(const weekday_last& __wdl, int __m) noexcept; + + friend constexpr year_month_weekday_last + operator/(const year_month& __ym, const weekday_last& __wdl) noexcept; + + + }; + + constexpr weekday_last + weekday::operator[](last_spec) const noexcept + { return weekday_last{*this}; } + + + + class month_day + { + private: + chrono::month _M_m; + chrono::day _M_d; + + public: + month_day() = default; + + constexpr + month_day(const chrono::month& __m, const chrono::day& __d) noexcept + : _M_m{__m}, _M_d{__d} + { } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::day + day() const noexcept + { return _M_d; } + + constexpr bool + ok() const noexcept + { + return _M_m.ok() + && 1u <= unsigned(_M_d) + && unsigned(_M_d) <= __detail::__days_per_month[unsigned(_M_m) - 1]; + } + + friend constexpr bool + operator==(const month_day& __x, const month_day& __y) noexcept + { return __x.month() == __y.month() && __x.day() == __y.day(); } + + friend constexpr strong_ordering + operator<=>(const month_day& __x, const month_day& __y) noexcept + = default; + + friend constexpr month_day + operator/(const chrono::month& __m, const chrono::day& __d) noexcept + { return {__m, __d}; } + + friend constexpr month_day + operator/(const chrono::month& __m, int __d) noexcept + { return {__m, chrono::day(unsigned(__d))}; } + + friend constexpr month_day + operator/(int __m, const chrono::day& __d) noexcept + { return {chrono::month(unsigned(__m)), __d}; } + + friend constexpr month_day + operator/(const chrono::day& __d, const chrono::month& __m) noexcept + { return {__m, __d}; } + + friend constexpr month_day + operator/(const chrono::day& __d, int __m) noexcept + { return {chrono::month(unsigned(__m)), __d}; } + + friend constexpr year_month_day + operator/(int __y, const month_day& __md) noexcept; + + friend constexpr year_month_day + operator/(const month_day& __md, int __y) noexcept; + + + }; + + + + class month_day_last + { + private: + chrono::month _M_m; + + public: + explicit constexpr + month_day_last(const chrono::month& __m) noexcept + : _M_m{__m} + { } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr bool + ok() const noexcept + { return _M_m.ok(); } + + friend constexpr bool + operator==(const month_day_last& __x, const month_day_last& __y) noexcept + { return __x.month() == __y.month(); } + + friend constexpr strong_ordering + operator<=>(const month_day_last& __x, const month_day_last& __y) noexcept + = default; + + friend constexpr month_day_last + operator/(const chrono::month& __m, last_spec) noexcept + { return month_day_last{__m}; } + + friend constexpr month_day_last + operator/(int __m, last_spec) noexcept + { return chrono::month(unsigned(__m)) / last; } + + friend constexpr month_day_last + operator/(last_spec, const chrono::month& __m) noexcept + { return __m / last; } + + friend constexpr month_day_last + operator/(last_spec, int __m) noexcept + { return __m / last; } + + friend constexpr year_month_day_last + operator/(int __y, const month_day_last& __mdl) noexcept; + + friend constexpr year_month_day_last + operator/(const month_day_last& __mdl, int __y) noexcept; + + + }; + + + + class month_weekday + { + private: + chrono::month _M_m; + chrono::weekday_indexed _M_wdi; + + public: + constexpr + month_weekday(const chrono::month& __m, + const chrono::weekday_indexed& __wdi) noexcept + : _M_m{__m}, _M_wdi{__wdi} + { } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::weekday_indexed + weekday_indexed() const noexcept + { return _M_wdi; } + + constexpr bool + ok() const noexcept + { return _M_m.ok() && _M_wdi.ok(); } + + friend constexpr bool + operator==(const month_weekday& __x, const month_weekday& __y) noexcept + { + return __x.month() == __y.month() + && __x.weekday_indexed() == __y.weekday_indexed(); + } + + friend constexpr month_weekday + operator/(const chrono::month& __m, + const chrono::weekday_indexed& __wdi) noexcept + { return {__m, __wdi}; } + + friend constexpr month_weekday + operator/(int __m, const chrono::weekday_indexed& __wdi) noexcept + { return chrono::month(unsigned(__m)) / __wdi; } + + friend constexpr month_weekday + operator/(const chrono::weekday_indexed& __wdi, + const chrono::month& __m) noexcept + { return __m / __wdi; } + + friend constexpr month_weekday + operator/(const chrono::weekday_indexed& __wdi, int __m) noexcept + { return __m / __wdi; } + + friend constexpr year_month_weekday + operator/(int __y, const month_weekday& __mwd) noexcept; + + friend constexpr year_month_weekday + operator/(const month_weekday& __mwd, int __y) noexcept; + + + }; + + + + class month_weekday_last + { + private: + chrono::month _M_m; + chrono::weekday_last _M_wdl; + + public: + constexpr + month_weekday_last(const chrono::month& __m, + const chrono::weekday_last& __wdl) noexcept + :_M_m{__m}, _M_wdl{__wdl} + { } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::weekday_last + weekday_last() const noexcept + { return _M_wdl; } + + constexpr bool + ok() const noexcept + { return _M_m.ok() && _M_wdl.ok(); } + + friend constexpr bool + operator==(const month_weekday_last& __x, + const month_weekday_last& __y) noexcept + { + return __x.month() == __y.month() + && __x.weekday_last() == __y.weekday_last(); + } + + friend constexpr month_weekday_last + operator/(const chrono::month& __m, + const chrono::weekday_last& __wdl) noexcept + { return {__m, __wdl}; } + + friend constexpr month_weekday_last + operator/(int __m, const chrono::weekday_last& __wdl) noexcept + { return chrono::month(unsigned(__m)) / __wdl; } + + friend constexpr month_weekday_last + operator/(const chrono::weekday_last& __wdl, + const chrono::month& __m) noexcept + { return __m / __wdl; } + + friend constexpr month_weekday_last + operator/(const chrono::weekday_last& __wdl, int __m) noexcept + { return chrono::month(unsigned(__m)) / __wdl; } + + friend constexpr year_month_weekday_last + operator/(int __y, const month_weekday_last& __mwdl) noexcept; + + friend constexpr year_month_weekday_last + operator/(const month_weekday_last& __mwdl, int __y) noexcept; + + + }; + + + + namespace __detail + { +# 2168 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + using __months_years_conversion_disambiguator = void; + } + + class year_month + { + private: + chrono::year _M_y; + chrono::month _M_m; + + public: + year_month() = default; + + constexpr + year_month(const chrono::year& __y, const chrono::month& __m) noexcept + : _M_y{__y}, _M_m{__m} + { } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + template + constexpr year_month& + operator+=(const months& __dm) noexcept + { + *this = *this + __dm; + return *this; + } + + template + constexpr year_month& + operator-=(const months& __dm) noexcept + { + *this = *this - __dm; + return *this; + } + + constexpr year_month& + operator+=(const years& __dy) noexcept + { + *this = *this + __dy; + return *this; + } + + constexpr year_month& + operator-=(const years& __dy) noexcept + { + *this = *this - __dy; + return *this; + } + + constexpr bool + ok() const noexcept + { return _M_y.ok() && _M_m.ok(); } + + friend constexpr bool + operator==(const year_month& __x, const year_month& __y) noexcept + { return __x.year() == __y.year() && __x.month() == __y.month(); } + + friend constexpr strong_ordering + operator<=>(const year_month& __x, const year_month& __y) noexcept + = default; + + template + friend constexpr year_month + operator+(const year_month& __ym, const months& __dm) noexcept + { + + auto __m = __ym.month() + __dm; + auto __i = int(unsigned(__ym.month())) - 1 + __dm.count(); + auto __y = (__i < 0 + ? __ym.year() + years{(__i - 11) / 12} + : __ym.year() + years{__i / 12}); + return __y / __m; + } + + template + friend constexpr year_month + operator+(const months& __dm, const year_month& __ym) noexcept + { return __ym + __dm; } + + template + friend constexpr year_month + operator-(const year_month& __ym, const months& __dm) noexcept + { return __ym + -__dm; } + + friend constexpr months + operator-(const year_month& __x, const year_month& __y) noexcept + { + return (__x.year() - __y.year() + + months{static_cast(unsigned{__x.month()}) + - static_cast(unsigned{__y.month()})}); + } + + friend constexpr year_month + operator+(const year_month& __ym, const years& __dy) noexcept + { return (__ym.year() + __dy) / __ym.month(); } + + friend constexpr year_month + operator+(const years& __dy, const year_month& __ym) noexcept + { return __ym + __dy; } + + friend constexpr year_month + operator-(const year_month& __ym, const years& __dy) noexcept + { return __ym + -__dy; } + + friend constexpr year_month + operator/(const chrono::year& __y, const chrono::month& __m) noexcept + { return {__y, __m}; } + + friend constexpr year_month + operator/(const chrono::year& __y, int __m) noexcept + { return {__y, chrono::month(unsigned(__m))}; } + + friend constexpr year_month_day + operator/(const year_month& __ym, int __d) noexcept; + + friend constexpr year_month_day_last + operator/(const year_month& __ym, last_spec) noexcept; + + + }; + + + + class year_month_day + { + private: + chrono::year _M_y; + chrono::month _M_m; + chrono::day _M_d; + + static constexpr year_month_day _S_from_days(const days& __dp) noexcept; + + constexpr days _M_days_since_epoch() const noexcept; + + public: + year_month_day() = default; + + constexpr + year_month_day(const chrono::year& __y, const chrono::month& __m, + const chrono::day& __d) noexcept + : _M_y{__y}, _M_m{__m}, _M_d{__d} + { } + + constexpr + year_month_day(const year_month_day_last& __ymdl) noexcept; + + constexpr + year_month_day(const sys_days& __dp) noexcept + : year_month_day(_S_from_days(__dp.time_since_epoch())) + { } + + explicit constexpr + year_month_day(const local_days& __dp) noexcept + : year_month_day(sys_days{__dp.time_since_epoch()}) + { } + + template + constexpr year_month_day& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + template + constexpr year_month_day& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + constexpr year_month_day& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year_month_day& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::day + day() const noexcept + { return _M_d; } + + constexpr + operator sys_days() const noexcept + { return sys_days{_M_days_since_epoch()}; } + + explicit constexpr + operator local_days() const noexcept + { return local_days{sys_days{*this}.time_since_epoch()}; } + + constexpr bool ok() const noexcept; + + friend constexpr bool + operator==(const year_month_day& __x, const year_month_day& __y) noexcept + { + return __x.year() == __y.year() + && __x.month() == __y.month() + && __x.day() == __y.day(); + } + + friend constexpr strong_ordering + operator<=>(const year_month_day& __x, const year_month_day& __y) noexcept + = default; + + template + friend constexpr year_month_day + operator+(const year_month_day& __ymd, const months& __dm) noexcept + { return (__ymd.year() / __ymd.month() + __dm) / __ymd.day(); } + + template + friend constexpr year_month_day + operator+(const months& __dm, const year_month_day& __ymd) noexcept + { return __ymd + __dm; } + + friend constexpr year_month_day + operator+(const year_month_day& __ymd, const years& __dy) noexcept + { return (__ymd.year() + __dy) / __ymd.month() / __ymd.day(); } + + friend constexpr year_month_day + operator+(const years& __dy, const year_month_day& __ymd) noexcept + { return __ymd + __dy; } + + template + friend constexpr year_month_day + operator-(const year_month_day& __ymd, const months& __dm) noexcept + { return __ymd + -__dm; } + + friend constexpr year_month_day + operator-(const year_month_day& __ymd, const years& __dy) noexcept + { return __ymd + -__dy; } + + friend constexpr year_month_day + operator/(const year_month& __ym, const chrono::day& __d) noexcept + { return {__ym.year(), __ym.month(), __d}; } + + friend constexpr year_month_day + operator/(const year_month& __ym, int __d) noexcept + { return __ym / chrono::day{unsigned(__d)}; } + + friend constexpr year_month_day + operator/(const chrono::year& __y, const month_day& __md) noexcept + { return __y / __md.month() / __md.day(); } + + friend constexpr year_month_day + operator/(int __y, const month_day& __md) noexcept + { return chrono::year{__y} / __md; } + + friend constexpr year_month_day + operator/(const month_day& __md, const chrono::year& __y) noexcept + { return __y / __md; } + + friend constexpr year_month_day + operator/(const month_day& __md, int __y) noexcept + { return chrono::year(__y) / __md; } + + + }; + + + + + + constexpr year_month_day + year_month_day::_S_from_days(const days& __dp) noexcept + { + constexpr auto __z2 = static_cast(-1468000); + constexpr auto __r2_e3 = static_cast(536895458); + + const auto __r0 = static_cast(__dp.count()) + __r2_e3; + + const auto __n1 = 4 * __r0 + 3; + const auto __q1 = __n1 / 146097; + const auto __r1 = __n1 % 146097 / 4; + + constexpr auto __p32 = static_cast(1) << 32; + const auto __n2 = 4 * __r1 + 3; + const auto __u2 = static_cast(2939745) * __n2; + const auto __q2 = static_cast(__u2 / __p32); + const auto __r2 = static_cast(__u2 % __p32) / 2939745 / 4; + + constexpr auto __p16 = static_cast(1) << 16; + const auto __n3 = 2141 * __r2 + 197913; + const auto __q3 = __n3 / __p16; + const auto __r3 = __n3 % __p16 / 2141; + + const auto __y0 = 100 * __q1 + __q2; + const auto __m0 = __q3; + const auto __d0 = __r3; + + const auto __j = __r2 >= 306; + const auto __y1 = __y0 + __j; + const auto __m1 = __j ? __m0 - 12 : __m0; + const auto __d1 = __d0 + 1; + + return year_month_day{chrono::year{static_cast(__y1 + __z2)}, + chrono::month{__m1}, chrono::day{__d1}}; + } + + + + + + constexpr days + year_month_day::_M_days_since_epoch() const noexcept + { + auto constexpr __z2 = static_cast(-1468000); + auto constexpr __r2_e3 = static_cast(536895458); + + const auto __y1 = static_cast(static_cast(_M_y)) - __z2; + const auto __m1 = static_cast(static_cast(_M_m)); + const auto __d1 = static_cast(static_cast(_M_d)); + + const auto __j = static_cast(__m1 < 3); + const auto __y0 = __y1 - __j; + const auto __m0 = __j ? __m1 + 12 : __m1; + const auto __d0 = __d1 - 1; + + const auto __q1 = __y0 / 100; + const auto __yc = 1461 * __y0 / 4 - __q1 + __q1 / 4; + const auto __mc = (979 *__m0 - 2919) / 32; + const auto __dc = __d0; + + return days{static_cast(__yc + __mc + __dc - __r2_e3)}; + } + + + + class year_month_day_last + { + private: + chrono::year _M_y; + chrono::month_day_last _M_mdl; + + public: + constexpr + year_month_day_last(const chrono::year& __y, + const chrono::month_day_last& __mdl) noexcept + : _M_y{__y}, _M_mdl{__mdl} + { } + + template + constexpr year_month_day_last& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + template + constexpr year_month_day_last& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + constexpr year_month_day_last& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year_month_day_last& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_mdl.month(); } + + constexpr chrono::month_day_last + month_day_last() const noexcept + { return _M_mdl; } + + + constexpr chrono::day + day() const noexcept + { + const auto __m = static_cast(month()); +# 2592 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + return chrono::day{__m != 2 ? ((__m ^ (__m >> 3)) & 1) | 30 + : _M_y.is_leap() ? 29 : 28}; + } + + constexpr + operator sys_days() const noexcept + { return sys_days{year() / month() / day()}; } + + explicit constexpr + operator local_days() const noexcept + { return local_days{sys_days{*this}.time_since_epoch()}; } + + constexpr bool + ok() const noexcept + { return _M_y.ok() && _M_mdl.ok(); } + + friend constexpr bool + operator==(const year_month_day_last& __x, + const year_month_day_last& __y) noexcept + { + return __x.year() == __y.year() + && __x.month_day_last() == __y.month_day_last(); + } + + friend constexpr strong_ordering + operator<=>(const year_month_day_last& __x, + const year_month_day_last& __y) noexcept + = default; + + template + friend constexpr year_month_day_last + operator+(const year_month_day_last& __ymdl, + const months& __dm) noexcept + { return (__ymdl.year() / __ymdl.month() + __dm) / last; } + + template + friend constexpr year_month_day_last + operator+(const months& __dm, + const year_month_day_last& __ymdl) noexcept + { return __ymdl + __dm; } + + template + friend constexpr year_month_day_last + operator-(const year_month_day_last& __ymdl, + const months& __dm) noexcept + { return __ymdl + -__dm; } + + friend constexpr year_month_day_last + operator+(const year_month_day_last& __ymdl, + const years& __dy) noexcept + { return {__ymdl.year() + __dy, __ymdl.month_day_last()}; } + + friend constexpr year_month_day_last + operator+(const years& __dy, + const year_month_day_last& __ymdl) noexcept + { return __ymdl + __dy; } + + friend constexpr year_month_day_last + operator-(const year_month_day_last& __ymdl, + const years& __dy) noexcept + { return __ymdl + -__dy; } + + friend constexpr year_month_day_last + operator/(const year_month& __ym, last_spec) noexcept + { return {__ym.year(), chrono::month_day_last{__ym.month()}}; } + + friend constexpr year_month_day_last + operator/(const chrono::year& __y, + const chrono::month_day_last& __mdl) noexcept + { return {__y, __mdl}; } + + friend constexpr year_month_day_last + operator/(int __y, const chrono::month_day_last& __mdl) noexcept + { return chrono::year(__y) / __mdl; } + + friend constexpr year_month_day_last + operator/(const chrono::month_day_last& __mdl, + const chrono::year& __y) noexcept + { return __y / __mdl; } + + friend constexpr year_month_day_last + operator/(const chrono::month_day_last& __mdl, int __y) noexcept + { return chrono::year(__y) / __mdl; } + + + }; + + + constexpr + year_month_day::year_month_day(const year_month_day_last& __ymdl) noexcept + : _M_y{__ymdl.year()}, _M_m{__ymdl.month()}, _M_d{__ymdl.day()} + { } + + constexpr bool + year_month_day::ok() const noexcept + { + if (!_M_y.ok() || !_M_m.ok()) + return false; + return chrono::day{1} <= _M_d && _M_d <= (_M_y / _M_m / last).day(); + } + + + + class year_month_weekday + { + private: + chrono::year _M_y; + chrono::month _M_m; + chrono::weekday_indexed _M_wdi; + + static constexpr year_month_weekday + _S_from_sys_days(const sys_days& __dp) + { + year_month_day __ymd{__dp}; + chrono::weekday __wd{__dp}; + auto __index = __wd[(unsigned{__ymd.day()} - 1) / 7 + 1]; + return {__ymd.year(), __ymd.month(), __index}; + } + + public: + year_month_weekday() = default; + + constexpr + year_month_weekday(const chrono::year& __y, const chrono::month& __m, + const chrono::weekday_indexed& __wdi) noexcept + : _M_y{__y}, _M_m{__m}, _M_wdi{__wdi} + { } + + constexpr + year_month_weekday(const sys_days& __dp) noexcept + : year_month_weekday{_S_from_sys_days(__dp)} + { } + + explicit constexpr + year_month_weekday(const local_days& __dp) noexcept + : year_month_weekday{sys_days{__dp.time_since_epoch()}} + { } + + template + constexpr year_month_weekday& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + template + constexpr year_month_weekday& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + constexpr year_month_weekday& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year_month_weekday& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::weekday + weekday() const noexcept + { return _M_wdi.weekday(); } + + constexpr unsigned + index() const noexcept + { return _M_wdi.index(); } + + constexpr chrono::weekday_indexed + weekday_indexed() const noexcept + { return _M_wdi; } + + constexpr + operator sys_days() const noexcept + { + auto __d = sys_days{year() / month() / 1}; + return __d + (weekday() - chrono::weekday(__d) + + days{(static_cast(index())-1)*7}); + } + + explicit constexpr + operator local_days() const noexcept + { return local_days{sys_days{*this}.time_since_epoch()}; } + + constexpr bool + ok() const noexcept + { + if (!_M_y.ok() || !_M_m.ok() || !_M_wdi.ok()) + return false; + if (_M_wdi.index() <= 4) + return true; + days __d = (_M_wdi.weekday() + - chrono::weekday{sys_days{_M_y / _M_m / 1}} + + days((_M_wdi.index()-1)*7 + 1)); + do { if (__builtin_is_constant_evaluated() && !bool(__d.count() >= 1)) __builtin_unreachable(); } while (false); + return __d.count() <= unsigned{(_M_y / _M_m / last).day()}; + } + + friend constexpr bool + operator==(const year_month_weekday& __x, + const year_month_weekday& __y) noexcept + { + return __x.year() == __y.year() + && __x.month() == __y.month() + && __x.weekday_indexed() == __y.weekday_indexed(); + } + + template + friend constexpr year_month_weekday + operator+(const year_month_weekday& __ymwd, const months& __dm) noexcept + { + return ((__ymwd.year() / __ymwd.month() + __dm) + / __ymwd.weekday_indexed()); + } + + template + friend constexpr year_month_weekday + operator+(const months& __dm, const year_month_weekday& __ymwd) noexcept + { return __ymwd + __dm; } + + friend constexpr year_month_weekday + operator+(const year_month_weekday& __ymwd, const years& __dy) noexcept + { return {__ymwd.year() + __dy, __ymwd.month(), __ymwd.weekday_indexed()}; } + + friend constexpr year_month_weekday + operator+(const years& __dy, const year_month_weekday& __ymwd) noexcept + { return __ymwd + __dy; } + + template + friend constexpr year_month_weekday + operator-(const year_month_weekday& __ymwd, const months& __dm) noexcept + { return __ymwd + -__dm; } + + friend constexpr year_month_weekday + operator-(const year_month_weekday& __ymwd, const years& __dy) noexcept + { return __ymwd + -__dy; } + + friend constexpr year_month_weekday + operator/(const year_month& __ym, + const chrono::weekday_indexed& __wdi) noexcept + { return {__ym.year(), __ym.month(), __wdi}; } + + friend constexpr year_month_weekday + operator/(const chrono::year& __y, const month_weekday& __mwd) noexcept + { return {__y, __mwd.month(), __mwd.weekday_indexed()}; } + + friend constexpr year_month_weekday + operator/(int __y, const month_weekday& __mwd) noexcept + { return chrono::year(__y) / __mwd; } + + friend constexpr year_month_weekday + operator/(const month_weekday& __mwd, const chrono::year& __y) noexcept + { return __y / __mwd; } + + friend constexpr year_month_weekday + operator/(const month_weekday& __mwd, int __y) noexcept + { return chrono::year(__y) / __mwd; } + + + }; + + + + class year_month_weekday_last + { + private: + chrono::year _M_y; + chrono::month _M_m; + chrono::weekday_last _M_wdl; + + public: + constexpr + year_month_weekday_last(const chrono::year& __y, const chrono::month& __m, + const chrono::weekday_last& __wdl) noexcept + : _M_y{__y}, _M_m{__m}, _M_wdl{__wdl} + { } + + template + constexpr year_month_weekday_last& + operator+=(const months& __m) noexcept + { + *this = *this + __m; + return *this; + } + + template + constexpr year_month_weekday_last& + operator-=(const months& __m) noexcept + { + *this = *this - __m; + return *this; + } + + constexpr year_month_weekday_last& + operator+=(const years& __y) noexcept + { + *this = *this + __y; + return *this; + } + + constexpr year_month_weekday_last& + operator-=(const years& __y) noexcept + { + *this = *this - __y; + return *this; + } + + constexpr chrono::year + year() const noexcept + { return _M_y; } + + constexpr chrono::month + month() const noexcept + { return _M_m; } + + constexpr chrono::weekday + weekday() const noexcept + { return _M_wdl.weekday(); } + + constexpr chrono::weekday_last + weekday_last() const noexcept + { return _M_wdl; } + + constexpr + operator sys_days() const noexcept + { + const auto __d = sys_days{_M_y / _M_m / last}; + return sys_days{(__d - (chrono::weekday{__d} + - _M_wdl.weekday())).time_since_epoch()}; + } + + explicit constexpr + operator local_days() const noexcept + { return local_days{sys_days{*this}.time_since_epoch()}; } + + constexpr bool + ok() const noexcept + { return _M_y.ok() && _M_m.ok() && _M_wdl.ok(); } + + friend constexpr bool + operator==(const year_month_weekday_last& __x, + const year_month_weekday_last& __y) noexcept + { + return __x.year() == __y.year() + && __x.month() == __y.month() + && __x.weekday_last() == __y.weekday_last(); + } + + template + friend constexpr year_month_weekday_last + operator+(const year_month_weekday_last& __ymwdl, + const months& __dm) noexcept + { + return ((__ymwdl.year() / __ymwdl.month() + __dm) + / __ymwdl.weekday_last()); + } + + template + friend constexpr year_month_weekday_last + operator+(const months& __dm, + const year_month_weekday_last& __ymwdl) noexcept + { return __ymwdl + __dm; } + + friend constexpr year_month_weekday_last + operator+(const year_month_weekday_last& __ymwdl, + const years& __dy) noexcept + { return {__ymwdl.year() + __dy, __ymwdl.month(), __ymwdl.weekday_last()}; } + + friend constexpr year_month_weekday_last + operator+(const years& __dy, + const year_month_weekday_last& __ymwdl) noexcept + { return __ymwdl + __dy; } + + template + friend constexpr year_month_weekday_last + operator-(const year_month_weekday_last& __ymwdl, + const months& __dm) noexcept + { return __ymwdl + -__dm; } + + friend constexpr year_month_weekday_last + operator-(const year_month_weekday_last& __ymwdl, + const years& __dy) noexcept + { return __ymwdl + -__dy; } + + friend constexpr year_month_weekday_last + operator/(const year_month& __ym, + const chrono::weekday_last& __wdl) noexcept + { return {__ym.year(), __ym.month(), __wdl}; } + + friend constexpr year_month_weekday_last + operator/(const chrono::year& __y, + const chrono::month_weekday_last& __mwdl) noexcept + { return {__y, __mwdl.month(), __mwdl.weekday_last()}; } + + friend constexpr year_month_weekday_last + operator/(int __y, const chrono::month_weekday_last& __mwdl) noexcept + { return chrono::year(__y) / __mwdl; } + + friend constexpr year_month_weekday_last + operator/(const chrono::month_weekday_last& __mwdl, + const chrono::year& __y) noexcept + { return __y / __mwdl; } + + friend constexpr year_month_weekday_last + operator/(const chrono::month_weekday_last& __mwdl, int __y) noexcept + { return chrono::year(__y) / __mwdl; } + + + }; + + + + namespace __detail + { + consteval long long + __pow10(unsigned __n) + { + long long __r = 1; + while (__n-- > 0) + __r *= 10; + return __r; + } + } + + template + class hh_mm_ss + { + private: + static constexpr int + _S_fractional_width() + { + int __multiplicity_2 = 0; + int __multiplicity_5 = 0; + auto __den = _Duration::period::den; + while ((__den % 2) == 0) + { + ++__multiplicity_2; + __den /= 2; + } + while ((__den % 5) == 0) + { + ++__multiplicity_5; + __den /= 5; + } + if (__den != 1) + return 6; + + int __width = (__multiplicity_2 > __multiplicity_5 + ? __multiplicity_2 : __multiplicity_5); + if (__width > 18) + __width = 18; + return __width; + } + + public: + static constexpr unsigned fractional_width = {_S_fractional_width()}; + + using precision + = duration, + ratio<1, __detail::__pow10(fractional_width)>>; + + constexpr + hh_mm_ss() noexcept + : hh_mm_ss{_Duration::zero()} + { } + + constexpr explicit + hh_mm_ss(_Duration __d) noexcept + : _M_is_neg (__d < _Duration::zero()), + _M_h (duration_cast(abs(__d))), + _M_m (duration_cast(abs(__d) - hours())), + _M_s (duration_cast(abs(__d) - hours() - minutes())) + { + if constexpr (treat_as_floating_point_v) + _M_ss = abs(__d) - hours() - minutes() - seconds(); + else + _M_ss = duration_cast(abs(__d) - hours() + - minutes() - seconds()); + } + + constexpr bool + is_negative() const noexcept + { return _M_is_neg; } + + constexpr chrono::hours + hours() const noexcept + { return _M_h; } + + constexpr chrono::minutes + minutes() const noexcept + { return _M_m; } + + constexpr chrono::seconds + seconds() const noexcept + { return _M_s; } + + constexpr precision + subseconds() const noexcept + { return _M_ss; } + + constexpr explicit + operator precision() const noexcept + { return to_duration(); } + + constexpr precision + to_duration() const noexcept + { + if (_M_is_neg) + return -(_M_h + _M_m + _M_s + _M_ss); + else + return _M_h + _M_m + _M_s + _M_ss; + } + + + + private: + bool _M_is_neg; + chrono::hours _M_h; + chrono::minutes _M_m; + chrono::seconds _M_s; + precision _M_ss; + }; + + + + } + + + + + + inline namespace literals + { +# 3165 "D:/compilers/msys64/mingw64/include/c++/11.2.0/chrono" 3 + inline namespace chrono_literals + { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wliteral-suffix" + + template + constexpr _Dur __check_overflow() + { + using _Val = __parse_int::_Parse_int<_Digits...>; + constexpr typename _Dur::rep __repval = _Val::value; + static_assert(__repval >= 0 && __repval == _Val::value, + "literal value cannot be represented by duration type"); + return _Dur(__repval); + } + + + + constexpr chrono::duration> + operator""h(long double __hours) + { return chrono::duration>{__hours}; } + + + template + constexpr chrono::hours + operator""h() + { return __check_overflow(); } + + + constexpr chrono::duration> + operator""min(long double __mins) + { return chrono::duration>{__mins}; } + + + template + constexpr chrono::minutes + operator""min() + { return __check_overflow(); } + + + constexpr chrono::duration + operator""s(long double __secs) + { return chrono::duration{__secs}; } + + + template + constexpr chrono::seconds + operator""s() + { return __check_overflow(); } + + + constexpr chrono::duration + operator""ms(long double __msecs) + { return chrono::duration{__msecs}; } + + + template + constexpr chrono::milliseconds + operator""ms() + { return __check_overflow(); } + + + constexpr chrono::duration + operator""us(long double __usecs) + { return chrono::duration{__usecs}; } + + + template + constexpr chrono::microseconds + operator""us() + { return __check_overflow(); } + + + constexpr chrono::duration + operator""ns(long double __nsecs) + { return chrono::duration{__nsecs}; } + + + template + constexpr chrono::nanoseconds + operator""ns() + { return __check_overflow(); } + + + constexpr chrono::day + operator""d(unsigned long long __d) noexcept + { return chrono::day{static_cast(__d)}; } + + constexpr chrono::year + operator""y(unsigned long long __y) noexcept + { return chrono::year{static_cast(__y)}; } + + +#pragma GCC diagnostic pop + } + } + + namespace chrono + { + using namespace literals::chrono_literals; + } + + + namespace chrono + { + + + constexpr bool + is_am(const hours& __h) noexcept + { return 0h <= __h && __h <= 11h; } + + constexpr bool + is_pm(const hours& __h) noexcept + { return 12h <= __h && __h <= 23h; } + + constexpr hours + make12(const hours& __h) noexcept + { + if (__h == 0h) + return 12h; + else if (__h > 12h) + return __h - 12h; + return __h; + } + + constexpr hours + make24(const hours& __h, bool __is_pm) noexcept + { + if (!__is_pm) + { + if (__h == 12h) + return 0h; + else + return __h; + } + else + { + if (__h == 12h) + return __h; + else + return __h + 12h; + } + } + } + + + + namespace filesystem + { + struct __file_clock + { + using duration = chrono::nanoseconds; + using rep = duration::rep; + using period = duration::period; + using time_point = chrono::time_point<__file_clock>; + static constexpr bool is_steady = false; + + static time_point + now() noexcept + { return _S_from_sys(chrono::system_clock::now()); } + + + template + static + chrono::file_time<_Dur> + from_sys(const chrono::sys_time<_Dur>& __t) noexcept + { return _S_from_sys(__t); } + + + template + static + chrono::sys_time<_Dur> + to_sys(const chrono::file_time<_Dur>& __t) noexcept + { return _S_to_sys(__t); } + + + private: + using __sys_clock = chrono::system_clock; + + + + + static constexpr chrono::seconds _S_epoch_diff{6437664000}; + + protected: + + template + static + chrono::time_point<__file_clock, _Dur> + _S_from_sys(const chrono::time_point<__sys_clock, _Dur>& __t) noexcept + { + using __file_time = chrono::time_point<__file_clock, _Dur>; + return __file_time{__t.time_since_epoch()} - _S_epoch_diff; + } + + + template + static + chrono::time_point<__sys_clock, _Dur> + _S_to_sys(const chrono::time_point<__file_clock, _Dur>& __t) noexcept + { + using __sys_time = chrono::time_point<__sys_clock, _Dur>; + return __sys_time{__t.time_since_epoch()} + _S_epoch_diff; + } + }; + } + + + + +} +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 +namespace std +{ + +# 57 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 + class __mutex_base + { + protected: + typedef __gthread_mutex_t __native_type; + + + + + + + __native_type _M_mutex; + + __mutex_base() noexcept + { + + __gthread_mutex_init_function(&_M_mutex); + } + + ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); } + + + __mutex_base(const __mutex_base&) = delete; + __mutex_base& operator=(const __mutex_base&) = delete; + }; + + + class mutex : private __mutex_base + { + public: + typedef __native_type* native_handle_type; + + + + + mutex() noexcept = default; + ~mutex() = default; + + mutex(const mutex&) = delete; + mutex& operator=(const mutex&) = delete; + + void + lock() + { + int __e = __gthread_mutex_lock(&_M_mutex); + + + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + + return !__gthread_mutex_trylock(&_M_mutex); + } + + void + unlock() + { + + __gthread_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + }; + + + class __condvar + { + using timespec = __gthread_time_t; + + public: + __condvar() noexcept + { + + + + } + + ~__condvar() + { + int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond); + do { if (__builtin_is_constant_evaluated() && !bool(__e != 16)) __builtin_unreachable(); } while (false); + } + + __condvar(const __condvar&) = delete; + __condvar& operator=(const __condvar&) = delete; + + __gthread_cond_t* native_handle() noexcept { return &_M_cond; } + + + void + wait(mutex& __m) noexcept + { + int __e __attribute__((__unused__)) + = __gthread_cond_wait(&_M_cond, __m.native_handle()); + do { if (__builtin_is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); + } + + void + wait_until(mutex& __m, timespec& __abs_time) noexcept + { + __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time); + } +# 174 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/std_mutex.h" 3 + void + notify_one() noexcept + { + int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond); + do { if (__builtin_is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); + } + + void + notify_all() noexcept + { + int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond); + do { if (__builtin_is_constant_evaluated() && !bool(__e == 0)) __builtin_unreachable(); } while (false); + } + + protected: + + __gthread_cond_t _M_cond = (pthread_cond_t)-1; + + + + }; + + + + + struct defer_lock_t { explicit defer_lock_t() = default; }; + + + struct try_to_lock_t { explicit try_to_lock_t() = default; }; + + + + struct adopt_lock_t { explicit adopt_lock_t() = default; }; + + + inline constexpr defer_lock_t defer_lock { }; + + + inline constexpr try_to_lock_t try_to_lock { }; + + + inline constexpr adopt_lock_t adopt_lock { }; + + + + + + + template + class lock_guard + { + public: + typedef _Mutex mutex_type; + + explicit lock_guard(mutex_type& __m) : _M_device(__m) + { _M_device.lock(); } + + lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m) + { } + + ~lock_guard() + { _M_device.unlock(); } + + lock_guard(const lock_guard&) = delete; + lock_guard& operator=(const lock_guard&) = delete; + + private: + mutex_type& _M_device; + }; + + + +} +# 44 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 2 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 3 +# 43 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 3 +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/unique_lock.h" 3 + template + class unique_lock + { + public: + typedef _Mutex mutex_type; + + unique_lock() noexcept + : _M_device(0), _M_owns(false) + { } + + explicit unique_lock(mutex_type& __m) + : _M_device(std::__addressof(__m)), _M_owns(false) + { + lock(); + _M_owns = true; + } + + unique_lock(mutex_type& __m, defer_lock_t) noexcept + : _M_device(std::__addressof(__m)), _M_owns(false) + { } + + unique_lock(mutex_type& __m, try_to_lock_t) + : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock()) + { } + + unique_lock(mutex_type& __m, adopt_lock_t) noexcept + : _M_device(std::__addressof(__m)), _M_owns(true) + { + + } + + template + unique_lock(mutex_type& __m, + const chrono::time_point<_Clock, _Duration>& __atime) + : _M_device(std::__addressof(__m)), + _M_owns(_M_device->try_lock_until(__atime)) + { } + + template + unique_lock(mutex_type& __m, + const chrono::duration<_Rep, _Period>& __rtime) + : _M_device(std::__addressof(__m)), + _M_owns(_M_device->try_lock_for(__rtime)) + { } + + ~unique_lock() + { + if (_M_owns) + unlock(); + } + + unique_lock(const unique_lock&) = delete; + unique_lock& operator=(const unique_lock&) = delete; + + unique_lock(unique_lock&& __u) noexcept + : _M_device(__u._M_device), _M_owns(__u._M_owns) + { + __u._M_device = 0; + __u._M_owns = false; + } + + unique_lock& operator=(unique_lock&& __u) noexcept + { + if(_M_owns) + unlock(); + + unique_lock(std::move(__u)).swap(*this); + + __u._M_device = 0; + __u._M_owns = false; + + return *this; + } + + void + lock() + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_device->lock(); + _M_owns = true; + } + } + + bool + try_lock() + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock(); + return _M_owns; + } + } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock_until(__atime); + return _M_owns; + } + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { + if (!_M_device) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_owns) + __throw_system_error(int(errc::resource_deadlock_would_occur)); + else + { + _M_owns = _M_device->try_lock_for(__rtime); + return _M_owns; + } + } + + void + unlock() + { + if (!_M_owns) + __throw_system_error(int(errc::operation_not_permitted)); + else if (_M_device) + { + _M_device->unlock(); + _M_owns = false; + } + } + + void + swap(unique_lock& __u) noexcept + { + std::swap(_M_device, __u._M_device); + std::swap(_M_owns, __u._M_owns); + } + + mutex_type* + release() noexcept + { + mutex_type* __ret = _M_device; + _M_device = 0; + _M_owns = false; + return __ret; + } + + bool + owns_lock() const noexcept + { return _M_owns; } + + explicit operator bool() const noexcept + { return owns_lock(); } + + mutex_type* + mutex() const noexcept + { return _M_device; } + + private: + mutex_type* _M_device; + bool _M_owns; + }; + + + + template + inline void + swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept + { __x.swap(__y); } + + +} +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 2 3 +# 55 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 +namespace std +{ + +# 67 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + class __recursive_mutex_base + { + protected: + typedef __gthread_recursive_mutex_t __native_type; + + __recursive_mutex_base(const __recursive_mutex_base&) = delete; + __recursive_mutex_base& operator=(const __recursive_mutex_base&) = delete; + + + __native_type _M_mutex = (pthread_mutex_t)-3; + + __recursive_mutex_base() = default; +# 91 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + }; + + + class recursive_mutex : private __recursive_mutex_base + { + public: + typedef __native_type* native_handle_type; + + recursive_mutex() = default; + ~recursive_mutex() = default; + + recursive_mutex(const recursive_mutex&) = delete; + recursive_mutex& operator=(const recursive_mutex&) = delete; + + void + lock() + { + int __e = __gthread_recursive_mutex_lock(&_M_mutex); + + + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + + return !__gthread_recursive_mutex_trylock(&_M_mutex); + } + + void + unlock() + { + + __gthread_recursive_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + }; + + + template + class __timed_mutex_impl + { + protected: + template + bool + _M_try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { + + + + using __clock = chrono::system_clock; + + + auto __rt = chrono::duration_cast<__clock::duration>(__rtime); + if (ratio_greater<__clock::period, _Period>()) + ++__rt; + return _M_try_lock_until(__clock::now() + __rt); + } + + template + bool + _M_try_lock_until(const chrono::time_point& __atime) + { + auto __s = chrono::time_point_cast(__atime); + auto __ns = chrono::duration_cast(__atime - __s); + + __gthread_time_t __ts = { + static_cast(__s.time_since_epoch().count()), + static_cast(__ns.count()) + }; + + return static_cast<_Derived*>(this)->_M_timedlock(__ts); + } +# 190 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + bool + _M_try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { + + static_assert(chrono::is_clock_v<_Clock>); + + + + + auto __now = _Clock::now(); + do { + auto __rtime = __atime - __now; + if (_M_try_lock_for(__rtime)) + return true; + __now = _Clock::now(); + } while (__atime > __now); + return false; + } + }; + + + class timed_mutex + : private __mutex_base, public __timed_mutex_impl + { + public: + typedef __native_type* native_handle_type; + + timed_mutex() = default; + ~timed_mutex() = default; + + timed_mutex(const timed_mutex&) = delete; + timed_mutex& operator=(const timed_mutex&) = delete; + + void + lock() + { + int __e = __gthread_mutex_lock(&_M_mutex); + + + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + + return !__gthread_mutex_trylock(&_M_mutex); + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { return _M_try_lock_for(__rtime); } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { return _M_try_lock_until(__atime); } + + void + unlock() + { + + __gthread_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + + private: + friend class __timed_mutex_impl; + + bool + _M_timedlock(const __gthread_time_t& __ts) + { return !__gthread_mutex_timedlock(&_M_mutex, &__ts); } + + + + + + + }; + + + class recursive_timed_mutex + : private __recursive_mutex_base, + public __timed_mutex_impl + { + public: + typedef __native_type* native_handle_type; + + recursive_timed_mutex() = default; + ~recursive_timed_mutex() = default; + + recursive_timed_mutex(const recursive_timed_mutex&) = delete; + recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete; + + void + lock() + { + int __e = __gthread_recursive_mutex_lock(&_M_mutex); + + + if (__e) + __throw_system_error(__e); + } + + bool + try_lock() noexcept + { + + return !__gthread_recursive_mutex_trylock(&_M_mutex); + } + + template + bool + try_lock_for(const chrono::duration<_Rep, _Period>& __rtime) + { return _M_try_lock_for(__rtime); } + + template + bool + try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime) + { return _M_try_lock_until(__atime); } + + void + unlock() + { + + __gthread_recursive_mutex_unlock(&_M_mutex); + } + + native_handle_type + native_handle() noexcept + { return &_M_mutex; } + + private: + friend class __timed_mutex_impl; + + bool + _M_timedlock(const __gthread_time_t& __ts) + { return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts); } + + + + + + + }; +# 515 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + inline unique_lock<_Lock> + __try_to_lock(_Lock& __l) + { return unique_lock<_Lock>{__l, try_to_lock}; } + + template + struct __try_lock_impl + { + template + static void + __do_try_lock(tuple<_Lock&...>& __locks, int& __idx) + { + __idx = _Idx; + auto __lock = std::__try_to_lock(std::get<_Idx>(__locks)); + if (__lock.owns_lock()) + { + constexpr bool __cont = _Idx + 2 < sizeof...(_Lock); + using __try_locker = __try_lock_impl<_Idx + 1, __cont>; + __try_locker::__do_try_lock(__locks, __idx); + if (__idx == -1) + __lock.release(); + } + } + }; + + template + struct __try_lock_impl<_Idx, false> + { + template + static void + __do_try_lock(tuple<_Lock&...>& __locks, int& __idx) + { + __idx = _Idx; + auto __lock = std::__try_to_lock(std::get<_Idx>(__locks)); + if (__lock.owns_lock()) + { + __idx = -1; + __lock.release(); + } + } + }; +# 568 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + int + try_lock(_Lock1& __l1, _Lock2& __l2, _Lock3&... __l3) + { + int __idx; + auto __locks = std::tie(__l1, __l2, __l3...); + __try_lock_impl<0>::__do_try_lock(__locks, __idx); + return __idx; + } +# 589 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + void + lock(_L1& __l1, _L2& __l2, _L3&... __l3) + { + while (true) + { + using __try_locker = __try_lock_impl<0, sizeof...(_L3) != 0>; + unique_lock<_L1> __first(__l1); + int __idx; + auto __locks = std::tie(__l2, __l3...); + __try_locker::__do_try_lock(__locks, __idx); + if (__idx == -1) + { + __first.release(); + return; + } + } + } +# 615 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + template + class scoped_lock + { + public: + explicit scoped_lock(_MutexTypes&... __m) : _M_devices(std::tie(__m...)) + { std::lock(__m...); } + + explicit scoped_lock(adopt_lock_t, _MutexTypes&... __m) noexcept + : _M_devices(std::tie(__m...)) + { } + + ~scoped_lock() + { std::apply([](auto&... __m) { (__m.unlock(), ...); }, _M_devices); } + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + + private: + tuple<_MutexTypes&...> _M_devices; + }; + + template<> + class scoped_lock<> + { + public: + explicit scoped_lock() = default; + explicit scoped_lock(adopt_lock_t) noexcept { } + ~scoped_lock() = default; + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + }; + + template + class scoped_lock<_Mutex> + { + public: + using mutex_type = _Mutex; + + explicit scoped_lock(mutex_type& __m) : _M_device(__m) + { _M_device.lock(); } + + explicit scoped_lock(adopt_lock_t, mutex_type& __m) noexcept + : _M_device(__m) + { } + + ~scoped_lock() + { _M_device.unlock(); } + + scoped_lock(const scoped_lock&) = delete; + scoped_lock& operator=(const scoped_lock&) = delete; + + private: + mutex_type& _M_device; + }; + + + + + struct once_flag + { + constexpr once_flag() noexcept = default; + + + once_flag(const once_flag&) = delete; + + once_flag& operator=(const once_flag&) = delete; + + private: + + + __gthread_once_t _M_once = 0; + + struct _Prepare_execution; + + template + friend void + call_once(once_flag& __once, _Callable&& __f, _Args&&... __args); + }; + + + + + + extern __thread void* __once_callable; + extern __thread void (*__once_call)(); + + + struct once_flag::_Prepare_execution + { + template + explicit + _Prepare_execution(_Callable& __c) + { + + __once_callable = std::__addressof(__c); + + __once_call = [] { (*static_cast<_Callable*>(__once_callable))(); }; + } + + ~_Prepare_execution() + { + + __once_callable = nullptr; + __once_call = nullptr; + } + + _Prepare_execution(const _Prepare_execution&) = delete; + _Prepare_execution& operator=(const _Prepare_execution&) = delete; + }; +# 767 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + extern "C" void __once_proxy(void); + + + template + void + call_once(once_flag& __once, _Callable&& __f, _Args&&... __args) + { + + auto __callable = [&] { + std::__invoke(std::forward<_Callable>(__f), + std::forward<_Args>(__args)...); + }; + + once_flag::_Prepare_execution __exec(__callable); + + + if (int __e = __gthread_once(&__once._M_once, &__once_proxy)) + __throw_system_error(__e); + } +# 888 "D:/compilers/msys64/mingw64/include/c++/11.2.0/mutex" 3 + +} +# 18 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/tools/promotion.hpp" 1 +# 25 "../../../../boost/math/tools/promotion.hpp" +# 1 "../../../../boost/math/tools/config.hpp" 1 +# 14 "../../../../boost/math/tools/config.hpp" +# 1 "../../../../boost/math/tools/is_standalone.hpp" 1 +# 15 "../../../../boost/math/tools/config.hpp" 2 +# 94 "../../../../boost/math/tools/config.hpp" +# 1 "../../../../boost/math/tools/user.hpp" 1 +# 95 "../../../../boost/math/tools/config.hpp" 2 +# 386 "../../../../boost/math/tools/config.hpp" + +# 386 "../../../../boost/math/tools/config.hpp" +namespace boost{ namespace math{ +namespace tools +{ + +template +inline T max (T a, T b, T c) noexcept(std::is_floating_point::value) +{ + return (std::max)((std::max)(a, b), c); +} + +template +inline T max (T a, T b, T c, T d) noexcept(std::is_floating_point::value) +{ + return (std::max)((std::max)(a, b), (std::max)(c, d)); +} + +} + +template +void suppress_unused_variable_warning(const T&) noexcept(std::is_floating_point::value) +{ +} + +namespace detail{ + +template +struct is_integer_for_rounding +{ + static constexpr bool value = std::is_integral::value || (std::numeric_limits::is_specialized && std::numeric_limits::is_integer); +}; + +} + +}} +# 26 "../../../../boost/math/tools/promotion.hpp" 2 + + + + +namespace boost +{ + namespace math + { + namespace tools + { +# 56 "../../../../boost/math/tools/promotion.hpp" + template + struct promote_arg + { + using type = typename std::conditional::value, double, T>::type; + }; + + + template <> struct promote_arg { using type = float; }; + template <> struct promote_arg{ using type = double; }; + template <> struct promote_arg { using type = long double; }; + template <> struct promote_arg { using type = double; }; + + template + struct promote_args_2 + { + + using T1P = typename promote_arg::type; + using T2P = typename promote_arg::type; + + using type = typename std::conditional< + std::is_floating_point::value && std::is_floating_point::value, + + + + + typename std::conditional::value || std::is_same::value, + long double, + typename std::conditional::value || std::is_same::value, + double, + float + >::type + + + + >::type, + + typename std::conditional::value && std::is_convertible::value, T2P, T1P>::type>::type; + }; + + + template <> struct promote_args_2 { using type = float; }; + template <> struct promote_args_2{ using type = double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = long double; }; + template <> struct promote_args_2 { using type = long double; }; + + template + struct promote_args + { + using type = typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, typename std::remove_cv::type + >::type + >::type + >::type + >::type + >::type; + + + + + + + + }; + + + + + + + template + struct promote_args_permissive + { + using type = typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, + typename promote_args_2< + typename std::remove_cv::type, typename std::remove_cv::type + >::type + >::type + >::type + >::type + >::type; + }; + + } + } +} +# 19 "../../module/sf.cxx" 2 + + +export module boost.math.special_functions; + +import boost.math.core; +import boost.math.constants; + + + + +export namespace boost::math { + + template + struct max_factorial; + template + RT factorial(unsigned int); + template + RT factorial(unsigned int, const Policy& pol); + template + RT unchecked_factorial(unsigned int ); + template + RT double_factorial(unsigned i); + template + RT double_factorial(unsigned i, const Policy& pol); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol); + + template + typename tools::promote_args::type rising_factorial(RT x, int n); + + template + typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol); + + + template + typename tools::promote_args::type tgamma(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z, const Policy& pol); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT z, int* sign); + + template + typename tools::promote_args::type lgamma(RT z, int* sign, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT x); + + template + typename tools::promote_args::type lgamma(RT x, const Policy& pol); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_p(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&); + + + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q, const Policy&); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q, const Policy&); + + + template + typename tools::promote_args::type digamma(T x); + + template + typename tools::promote_args::type digamma(T x, const Policy&); + + + template + typename tools::promote_args::type trigamma(T x); + + template + typename tools::promote_args::type trigamma(T x, const Policy&); + + + template + typename tools::promote_args::type polygamma(int n, T x); + + template + typename tools::promote_args::type polygamma(int n, T x, const Policy&); + + + template + typename tools::promote_args::type erf(RT z); + template + typename tools::promote_args::type erf(RT z, const Policy&); + + template + typename tools::promote_args::type erfc(RT z); + template + typename tools::promote_args::type erfc(RT z, const Policy&); + + template + typename tools::promote_args::type erf_inv(RT z); + template + typename tools::promote_args::type erf_inv(RT z, const Policy& pol); + + template + typename tools::promote_args::type erfc_inv(RT z); + template + typename tools::promote_args::type erfc_inv(RT z, const Policy& pol); + + + template + typename tools::promote_args::type zeta(T s, const Policy&); +} + +# 1 "../../../../boost/math/special_functions/log1p.hpp" 1 +# 26 "../../../../boost/math/special_functions/log1p.hpp" +# 1 "../../../../boost/math/tools/series.hpp" 1 +# 20 "../../../../boost/math/tools/series.hpp" +namespace boost{ namespace math{ namespace tools{ + + + + +template +inline typename Functor::result_type sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms, const V& init_value) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename Functor::result_type result_type; + + std::uintmax_t counter = max_terms; + + result_type result = init_value; + result_type next_term; + do{ + next_term = func(); + result += next_term; + } + while((abs(factor * result) < abs(next_term)) && --counter); + + + max_terms = max_terms - counter; + + return result; +} + +template +inline typename Functor::result_type sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + typename Functor::result_type init_value = 0; + return sum_series(func, factor, max_terms, init_value); +} + +template +inline typename Functor::result_type sum_series(Functor& func, int bits, std::uintmax_t& max_terms, const U& init_value) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + typedef typename Functor::result_type result_type; + result_type factor = ldexp(result_type(1), 1 - bits); + return sum_series(func, factor, max_terms, init_value); +} + +template +inline typename Functor::result_type sum_series(Functor& func, int bits) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + typedef typename Functor::result_type result_type; + std::uintmax_t iters = (std::numeric_limits::max)(); + result_type init_val = 0; + return sum_series(func, bits, iters, init_val); +} + +template +inline typename Functor::result_type sum_series(Functor& func, int bits, std::uintmax_t& max_terms) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + typedef typename Functor::result_type result_type; + result_type init_val = 0; + return sum_series(func, bits, max_terms, init_val); +} + +template +inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + std::uintmax_t iters = (std::numeric_limits::max)(); + return sum_series(func, bits, iters, init_value); +} + + + +template +inline typename Functor::result_type checked_sum_series(Functor& func, const U& factor, std::uintmax_t& max_terms, const V& init_value, V& norm) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename Functor::result_type result_type; + + std::uintmax_t counter = max_terms; + + result_type result = init_value; + result_type next_term; + do { + next_term = func(); + result += next_term; + norm += fabs(next_term); + } while ((abs(factor * result) < abs(next_term)) && --counter); + + + max_terms = max_terms - counter; + + return result; +} +# 129 "../../../../boost/math/tools/series.hpp" +template +inline typename Functor::result_type kahan_sum_series(Functor& func, int bits) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename Functor::result_type result_type; + + result_type factor = pow(result_type(2), bits); + result_type result = func(); + result_type next_term, y, t; + result_type carry = 0; + do{ + next_term = func(); + y = next_term - carry; + t = result + y; + carry = t - result; + carry -= y; + result = t; + } + while(fabs(result) < fabs(factor * next_term)); + return result; +} + +template +inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, std::uintmax_t& max_terms) noexcept((std::is_floating_point::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename Functor::result_type result_type; + + std::uintmax_t counter = max_terms; + + result_type factor = ldexp(result_type(1), bits); + result_type result = func(); + result_type next_term, y, t; + result_type carry = 0; + do{ + next_term = func(); + y = next_term - carry; + t = result + y; + carry = t - result; + carry -= y; + result = t; + } + while((fabs(result) < fabs(factor * next_term)) && --counter); + + + max_terms = max_terms - counter; + + return result; +} + +} +} +} +# 27 "../../../../boost/math/special_functions/log1p.hpp" 2 +# 1 "../../../../boost/math/tools/big_constant.hpp" 1 +# 21 "../../../../boost/math/tools/big_constant.hpp" +namespace boost{ namespace math{ + +namespace tools{ + +template +struct numeric_traits : public std::numeric_limits< T > {}; +# 43 "../../../../boost/math/tools/big_constant.hpp" +typedef double largest_float; + + + +template +inline constexpr T make_big_value(largest_float v, const char*, std::true_type const&, std::false_type const&) noexcept(std::is_floating_point::value) +{ + return static_cast(v); +} +template +inline constexpr T make_big_value(largest_float v, const char*, std::true_type const&, std::true_type const&) noexcept(std::is_floating_point::value) +{ + return static_cast(v); +} + + + + + + + +template +inline T make_big_value(largest_float, const char* s, std::false_type const&, std::false_type const&) +{ + static_assert(sizeof(T) == 0, "Type is unsupported in standalone mode. Please disable and try again."); +} + +template +inline constexpr T make_big_value(largest_float, const char* s, std::false_type const&, std::true_type const&) noexcept(std::is_floating_point::value) +{ + return T(s); +} +# 97 "../../../../boost/math/tools/big_constant.hpp" +}}} +# 28 "../../../../boost/math/special_functions/log1p.hpp" 2 +# 1 "../../../../boost/math/tools/assert.hpp" 1 +# 26 "../../../../boost/math/tools/assert.hpp" +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cassert" 1 3 +# 41 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cassert" 3 + +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cassert" 3 + + +# 1 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/assert.h" 1 3 +# 17 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/assert.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 1 3 +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 3 +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 1 3 +# 39 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 + +# 40 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cstdlib" 3 +# 37 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 2 3 + + +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 3 +using std::abort; +using std::atexit; +using std::exit; +# 51 "D:/compilers/msys64/mingw64/include/c++/11.2.0/stdlib.h" 3 +using std::div_t; +using std::ldiv_t; + +using std::abs; +using std::atof; +using std::atoi; +using std::atol; +using std::bsearch; +using std::calloc; +using std::div; +using std::free; +using std::getenv; +using std::labs; +using std::ldiv; +using std::malloc; + +using std::mblen; +using std::mbstowcs; +using std::mbtowc; + +using std::qsort; +using std::rand; +using std::realloc; +using std::srand; +using std::strtod; +using std::strtol; +using std::strtoul; +using std::system; + +using std::wcstombs; +using std::wctomb; +# 18 "D:/compilers/msys64/mingw64/x86_64-w64-mingw32/include/assert.h" 2 3 + + + +extern "C" { + + +__attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _wassert(const wchar_t *_Message,const wchar_t *_File,unsigned _Line); +__attribute__ ((__dllimport__)) void __attribute__((__cdecl__)) _assert (const char *_Message, const char *_File, unsigned _Line); + + +} +# 45 "D:/compilers/msys64/mingw64/include/c++/11.2.0/cassert" 2 3 +# 27 "../../../../boost/math/tools/assert.hpp" 2 +# 29 "../../../../boost/math/special_functions/log1p.hpp" 2 +# 40 "../../../../boost/math/special_functions/log1p.hpp" + +# 40 "../../../../boost/math/special_functions/log1p.hpp" +namespace boost{ namespace math{ + + +export template +typename tools::promote_args::type log1p(T x, const Policy&); + + +namespace detail +{ + + + + + template + struct log1p_series + { + typedef T result_type; + + log1p_series(T x) + : k(0), m_mult(-x), m_prod(-1){} + + T operator()() + { + m_prod *= m_mult; + return m_prod / ++k; + } + + int count()const + { + return k; + } + + private: + int k; + const T m_mult; + T m_prod; + log1p_series(const log1p_series&); + log1p_series& operator=(const log1p_series&); + }; +# 89 "../../../../boost/math/special_functions/log1p.hpp" +template +T log1p_imp(T const & x, const Policy& pol, const std::integral_constant&) +{ + typedef typename tools::promote_args::type result_type; + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if((x < -1) || (boost::math::isnan)(x)) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + result_type a = abs(result_type(x)); + if(a > result_type(0.5f)) + return log(1 + result_type(x)); + + + if(a < tools::epsilon()) + return x; + detail::log1p_series s(x); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + + result_type result = tools::sum_series(s, policies::get_epsilon(), max_iter); + + policies::check_series_iterations(function, max_iter, pol); + return result; +} + +template +T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + + + if(a < tools::epsilon()) + return x; + + + + + + static const T P[] = { + 0.15141069795941984e-16L, + 0.35495104378055055e-15L, + 0.33333333333332835L, + 0.99249063543365859L, + 1.1143969784156509L, + 0.58052937949269651L, + 0.13703234928513215L, + 0.011294864812099712L + }; + static const T Q[] = { + 1L, + 3.7274719063011499L, + 5.5387948649720334L, + 4.159201143419005L, + 1.6423855110312755L, + 0.31706251443180914L, + 0.022665554431410243L, + -0.29252538135177773e-5L + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +template +T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + + + if(a < tools::epsilon()) + return x; + + + + + + static const T P[] = { + boost::math::tools::make_big_value( -0.807533446680736736712e-19, "-0.807533446680736736712e-19", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.490881544804798926426e-18, "-0.490881544804798926426e-18", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.333333333333333373941, "0.333333333333333373941", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.17141290782087994162, "1.17141290782087994162", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.62790522814926264694, "1.62790522814926264694", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.13156411870766876113, "1.13156411870766876113", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.408087379932853785336, "0.408087379932853785336", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0706537026422828914622, "0.0706537026422828914622", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00441709903782239229447, "0.00441709903782239229447", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.26423872346263928361, "4.26423872346263928361", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 7.48189472704477708962, "7.48189472704477708962", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 6.94757016732904280913, "6.94757016732904280913", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.6493508622280767304, "3.6493508622280767304", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.06884863623790638317, "1.06884863623790638317", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.158292216998514145947, "0.158292216998514145947", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00885295524069924328658, "0.00885295524069924328658", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.560026216133415663808e-6, "-0.560026216133415663808e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +template +T log1p_imp(T const& x, const Policy& pol, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::log1p<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + T a = fabs(x); + if(a > 0.5f) + return log(1 + x); + + + if(a < tools::epsilon()) + return x; + + + + + + + static const T P[] = { + -0.671192866803148236519e-7L, + 0.119670999140731844725e-6L, + 0.333339469182083148598L, + 0.237827183019664122066L + }; + static const T Q[] = { + 1L, + 1.46348272586988539733L, + 0.497859871350117338894L, + -0.00471666268910169651936L + }; + + T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); + result *= x; + + return result; +} + +template +struct log1p_initializer +{ + struct init + { + init() + { + do_init(tag()); + } + template + static void do_init(const std::integral_constant&){} + static void do_init(const std::integral_constant&) + { + boost::math::log1p(static_cast(0.25), Policy()); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename log1p_initializer::init log1p_initializer::initializer; + + +} + +export template +inline typename tools::promote_args::type log1p(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + typedef std::integral_constant tag_type; + + detail::log1p_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::log1p_imp(static_cast(x), forwarding_policy(), tag_type()), "boost::math::log1p<%1%>(%1%)"); +} +# 435 "../../../../boost/math/special_functions/log1p.hpp" +export template +inline typename tools::promote_args::type log1p(T x) +{ + return boost::math::log1p(x, policies::policy<>()); +} + + + +export template +inline typename tools::promote_args::type + log1pmx(T x, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const char* function = "boost::math::log1pmx<%1%>(%1%)"; + + if(x < -1) + return policies::raise_domain_error( + function, "log1pmx(x) requires x > -1, but got x = %1%.", x, pol); + if(x == -1) + return -policies::raise_overflow_error( + function, 0, pol); + + result_type a = abs(result_type(x)); + if(a > result_type(0.95f)) + return log(1 + result_type(x)) - result_type(x); + + + if(a < tools::epsilon()) + return -x * x / 2; + boost::math::detail::log1p_series s(x); + s(); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + + T result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter); + + policies::check_series_iterations(function, max_iter, pol); + return result; +} + +export template +inline typename tools::promote_args::type log1pmx(T x) +{ + return log1pmx(x, policies::policy<>()); +} + +} +} +# 190 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/expm1.hpp" 1 +# 37 "../../../../boost/math/special_functions/expm1.hpp" +namespace boost{ namespace math{ + +namespace detail +{ + + + + + template + struct expm1_series + { + typedef T result_type; + + expm1_series(T x) + : k(0), m_x(x), m_term(1) {} + + T operator()() + { + ++k; + m_term *= m_x; + m_term /= k; + return m_term; + } + + int count()const + { + return k; + } + + private: + int k; + const T m_x; + T m_term; + expm1_series(const expm1_series&); + expm1_series& operator=(const expm1_series&); + }; + +template +struct expm1_initializer +{ + struct init + { + init() + { + do_init(tag()); + } + template + static void do_init(const std::integral_constant&){} + static void do_init(const std::integral_constant&) + { + expm1(T(0.5)); + } + static void do_init(const std::integral_constant&) + { + expm1(T(0.5)); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename expm1_initializer::init expm1_initializer::initializer; + + + + + + +template +T expm1_imp(T x, const std::integral_constant&, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T a = fabs(x); + if((boost::math::isnan)(a)) + { + return policies::raise_domain_error("boost::math::expm1<%1%>(%1%)", "expm1 requires a finite argument, but got %1%", a, pol); + } + if(a > T(0.5f)) + { + if(a >= tools::log_max_value()) + { + if(x > 0) + return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); + return -1; + } + return exp(x) - T(1); + } + if(a < tools::epsilon()) + return x; + detail::expm1_series s(x); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + + T result = tools::sum_series(s, policies::get_epsilon(), max_iter); + + policies::check_series_iterations("boost::math::expm1<%1%>(%1%)", max_iter, pol); + return result; +} + +template +T expm1_imp(T x, const std::integral_constant&, const P& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T a = fabs(x); + if(a > T(0.5L)) + { + if(a >= tools::log_max_value()) + { + if(x > 0) + return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); + return -1; + } + return exp(x) - T(1); + } + if(a < tools::epsilon()) + return x; + + static const float Y = 0.10281276702880859e1f; + static const T n[] = { static_cast(-0.28127670288085937e-1), static_cast(0.51278186299064534e0), static_cast(-0.6310029069350198e-1), static_cast(0.11638457975729296e-1), static_cast(-0.52143390687521003e-3), static_cast(0.21491399776965688e-4) }; + static const T d[] = { 1, static_cast(-0.45442309511354755e0), static_cast(0.90850389570911714e-1), static_cast(-0.10088963629815502e-1), static_cast(0.63003407478692265e-3), static_cast(-0.17976570003654402e-4) }; + + T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); + return result; +} + +template +T expm1_imp(T x, const std::integral_constant&, const P& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T a = fabs(x); + if(a > T(0.5L)) + { + if(a >= tools::log_max_value()) + { + if(x > 0) + return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); + return -1; + } + return exp(x) - T(1); + } + if(a < tools::epsilon()) + return x; + + static const float Y = 0.10281276702880859375e1f; + static const T n[] = { + boost::math::tools::make_big_value( -0.281276702880859375e-1, "-0.281276702880859375e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.512980290285154286358e0, "0.512980290285154286358e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.667758794592881019644e-1, "-0.667758794592881019644e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.131432469658444745835e-1, "0.131432469658444745835e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.72303795326880286965e-3, "-0.72303795326880286965e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.447441185192951335042e-4, "0.447441185192951335042e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.714539134024984593011e-6, "-0.714539134024984593011e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T d[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.461477618025562520389e0, "-0.461477618025562520389e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.961237488025708540713e-1, "0.961237488025708540713e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.116483957658204450739e-1, "-0.116483957658204450739e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.873308008461557544458e-3, "0.873308008461557544458e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.387922804997682392562e-4, "-0.387922804997682392562e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.807473180049193557294e-6, "0.807473180049193557294e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); + return result; +} + +template +T expm1_imp(T x, const std::integral_constant&, const P& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T a = fabs(x); + if(a > T(0.5L)) + { + if(a >= tools::log_max_value()) + { + if(x > 0) + return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); + return -1; + } + return exp(x) - T(1); + } + if(a < tools::epsilon()) + return x; + + static const float Y = 0.10281276702880859375e1f; + static const T n[] = { + boost::math::tools::make_big_value( -0.28127670288085937499999999999999999854e-1, "-0.28127670288085937499999999999999999854e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.51278156911210477556524452177540792214e0, "0.51278156911210477556524452177540792214e0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.63263178520747096729500254678819588223e-1, "-0.63263178520747096729500254678819588223e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.14703285606874250425508446801230572252e-1, "0.14703285606874250425508446801230572252e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.8675686051689527802425310407898459386e-3, "-0.8675686051689527802425310407898459386e-3", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.88126359618291165384647080266133492399e-4, "0.88126359618291165384647080266133492399e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.25963087867706310844432390015463138953e-5, "-0.25963087867706310844432390015463138953e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.14226691087800461778631773363204081194e-6, "0.14226691087800461778631773363204081194e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.15995603306536496772374181066765665596e-8, "-0.15995603306536496772374181066765665596e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.45261820069007790520447958280473183582e-10, "0.45261820069007790520447958280473183582e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T d[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.45441264709074310514348137469214538853e0, "-0.45441264709074310514348137469214538853e0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.96827131936192217313133611655555298106e-1, "0.96827131936192217313133611655555298106e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.12745248725908178612540554584374876219e-1, "-0.12745248725908178612540554584374876219e-1", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.11473613871583259821612766907781095472e-2, "0.11473613871583259821612766907781095472e-2", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.73704168477258911962046591907690764416e-4, "-0.73704168477258911962046591907690764416e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.34087499397791555759285503797256103259e-5, "0.34087499397791555759285503797256103259e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.11114024704296196166272091230695179724e-6, "-0.11114024704296196166272091230695179724e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.23987051614110848595909588343223896577e-8, "0.23987051614110848595909588343223896577e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.29477341859111589208776402638429026517e-10, "-0.29477341859111589208776402638429026517e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.13222065991022301420255904060628100924e-12, "0.13222065991022301420255904060628100924e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); + return result; +} + +} + +export template +inline typename tools::promote_args::type expm1(T x, const Policy& ) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + typedef std::integral_constant tag_type; + + detail::expm1_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::expm1_imp( + static_cast(x), + tag_type(), forwarding_policy()), "boost::math::expm1<%1%>(%1%)"); +} +# 309 "../../../../boost/math/special_functions/expm1.hpp" +export template +inline typename tools::promote_args::type expm1(T x) +{ + return expm1(x, policies::policy<>()); +} + +} +} +# 191 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/powm1.hpp" 1 +# 23 "../../../../boost/math/special_functions/powm1.hpp" +namespace boost{ namespace math{ namespace detail{ + +template +inline T powm1_imp(const T x, const T y, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const char* function = "boost::math::powm1<%1%>(%1%, %1%)"; + + if (x > 0) + { + if ((fabs(y * (x - 1)) < 0.5) || (fabs(y) < 0.2)) + { + + + T l = y * log(x); + if (l < 0.5) + return boost::math::expm1(l, pol); + if (l > boost::math::tools::log_max_value()) + return boost::math::policies::raise_overflow_error(function, 0, pol); + + } + } + else if (x < 0) + { + + if (boost::math::trunc(y) != y) + return boost::math::policies::raise_domain_error(function, "For non-integral exponent, expected base > 0 but got %1%", x, pol); + if (boost::math::trunc(y / 2) == y / 2) + return powm1_imp(T(-x), y, pol); + } + return pow(x, y) - 1; +} + +} + +export template +inline typename tools::promote_args::type + powm1(const T1 a, const T2 z) +{ + typedef typename tools::promote_args::type result_type; + return detail::powm1_imp(static_cast(a), static_cast(z), policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + powm1(const T1 a, const T2 z, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::powm1_imp(static_cast(a), static_cast(z), pol); +} + +} +} +# 192 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/sqrt1pm1.hpp" 1 +# 23 "../../../../boost/math/special_functions/sqrt1pm1.hpp" +namespace boost{ namespace math{ + +export template +inline typename tools::promote_args::type sqrt1pm1(const T& val, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if(fabs(result_type(val)) > 0.75) + return sqrt(1 + result_type(val)) - 1; + return boost::math::expm1(boost::math::log1p(val, pol) / 2, pol); +} + +export template +inline typename tools::promote_args::type sqrt1pm1(const T& val) +{ + return sqrt1pm1(val, policies::policy<>()); +} + +} +} +# 193 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" 1 +# 17 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" +# 1 "../../../../boost/math/tools/convert_from_string.hpp" 1 +# 20 "../../../../boost/math/tools/convert_from_string.hpp" +namespace boost{ namespace math{ namespace tools{ + + template + struct convert_from_string_result + { + typedef typename std::conditional::value, const char*, T>::type type; + }; + + template + Real convert_from_string(const char* p, const std::false_type&) + { + + + static_assert(sizeof(Real) == 0, "boost.lexical_cast is not supported in standalone mode."); + (void)p; + return Real(0); + + + + } + template + constexpr const char* convert_from_string(const char* p, const std::true_type&) noexcept + { + return p; + } + template + constexpr typename convert_from_string_result::type convert_from_string(const char* p) noexcept((std::is_constructible::value)) + { + return convert_from_string(p, std::is_constructible()); + } + +} +} +} +# 18 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" 2 +# 39 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" +namespace boost { namespace math +{ + +export template +struct max_factorial; + +export template +RT unchecked_factorial(unsigned int ); + + +export template <> +inline constexpr float unchecked_factorial(unsigned i ) +{ + + constexpr std::array factorials = { { + + + + 1.0F, + 1.0F, + 2.0F, + 6.0F, + 24.0F, + 120.0F, + 720.0F, + 5040.0F, + 40320.0F, + 362880.0F, + 3628800.0F, + 39916800.0F, + 479001600.0F, + 6227020800.0F, + 87178291200.0F, + 1307674368000.0F, + 20922789888000.0F, + 355687428096000.0F, + 6402373705728000.0F, + 121645100408832000.0F, + 0.243290200817664e19F, + 0.5109094217170944e20F, + 0.112400072777760768e22F, + 0.2585201673888497664e23F, + 0.62044840173323943936e24F, + 0.15511210043330985984e26F, + 0.403291461126605635584e27F, + 0.10888869450418352160768e29F, + 0.304888344611713860501504e30F, + 0.8841761993739701954543616e31F, + 0.26525285981219105863630848e33F, + 0.822283865417792281772556288e34F, + 0.26313083693369353016721801216e36F, + 0.868331761881188649551819440128e37F, + 0.29523279903960414084761860964352e39F, + }}; + + return factorials[i]; +} + +export template <> +struct max_factorial +{ + static constexpr unsigned value = 34; +}; + +export template <> +inline constexpr double unchecked_factorial(unsigned i ) +{ + + constexpr std::array factorials = { { + + + + 1.0, + 1.0, + 2.0, + 6.0, + 24.0, + 120.0, + 720.0, + 5040.0, + 40320.0, + 362880.0, + 3628800.0, + 39916800.0, + 479001600.0, + 6227020800.0, + 87178291200.0, + 1307674368000.0, + 20922789888000.0, + 355687428096000.0, + 6402373705728000.0, + 121645100408832000.0, + 0.243290200817664e19, + 0.5109094217170944e20, + 0.112400072777760768e22, + 0.2585201673888497664e23, + 0.62044840173323943936e24, + 0.15511210043330985984e26, + 0.403291461126605635584e27, + 0.10888869450418352160768e29, + 0.304888344611713860501504e30, + 0.8841761993739701954543616e31, + 0.26525285981219105863630848e33, + 0.822283865417792281772556288e34, + 0.26313083693369353016721801216e36, + 0.868331761881188649551819440128e37, + 0.29523279903960414084761860964352e39, + 0.103331479663861449296666513375232e41, + 0.3719933267899012174679994481508352e42, + 0.137637530912263450463159795815809024e44, + 0.5230226174666011117600072241000742912e45, + 0.203978820811974433586402817399028973568e47, + 0.815915283247897734345611269596115894272e48, + 0.3345252661316380710817006205344075166515e50, + 0.1405006117752879898543142606244511569936e52, + 0.6041526306337383563735513206851399750726e53, + 0.265827157478844876804362581101461589032e55, + 0.1196222208654801945619631614956577150644e57, + 0.5502622159812088949850305428800254892962e58, + 0.2586232415111681806429643551536119799692e60, + 0.1241391559253607267086228904737337503852e62, + 0.6082818640342675608722521633212953768876e63, + 0.3041409320171337804361260816606476884438e65, + 0.1551118753287382280224243016469303211063e67, + 0.8065817517094387857166063685640376697529e68, + 0.427488328406002556429801375338939964969e70, + 0.2308436973392413804720927426830275810833e72, + 0.1269640335365827592596510084756651695958e74, + 0.7109985878048634518540456474637249497365e75, + 0.4052691950487721675568060190543232213498e77, + 0.2350561331282878571829474910515074683829e79, + 0.1386831185456898357379390197203894063459e81, + 0.8320987112741390144276341183223364380754e82, + 0.507580213877224798800856812176625227226e84, + 0.3146997326038793752565312235495076408801e86, + 0.1982608315404440064116146708361898137545e88, + 0.1268869321858841641034333893351614808029e90, + 0.8247650592082470666723170306785496252186e91, + 0.5443449390774430640037292402478427526443e93, + 0.3647111091818868528824985909660546442717e95, + 0.2480035542436830599600990418569171581047e97, + 0.1711224524281413113724683388812728390923e99, + 0.1197857166996989179607278372168909873646e101, + 0.8504785885678623175211676442399260102886e102, + 0.6123445837688608686152407038527467274078e104, + 0.4470115461512684340891257138125051110077e106, + 0.3307885441519386412259530282212537821457e108, + 0.2480914081139539809194647711659403366093e110, + 0.188549470166605025498793226086114655823e112, + 0.1451830920282858696340707840863082849837e114, + 0.1132428117820629783145752115873204622873e116, + 0.8946182130782975286851441715398316520698e117, + 0.7156945704626380229481153372318653216558e119, + 0.5797126020747367985879734231578109105412e121, + 0.4753643337012841748421382069894049466438e123, + 0.3945523969720658651189747118012061057144e125, + 0.3314240134565353266999387579130131288001e127, + 0.2817104114380550276949479442260611594801e129, + 0.2422709538367273238176552320344125971528e131, + 0.210775729837952771721360051869938959523e133, + 0.1854826422573984391147968456455462843802e135, + 0.1650795516090846108121691926245361930984e137, + 0.1485715964481761497309522733620825737886e139, + 0.1352001527678402962551665687594951421476e141, + 0.1243841405464130725547532432587355307758e143, + 0.1156772507081641574759205162306240436215e145, + 0.1087366156656743080273652852567866010042e147, + 0.103299784882390592625997020993947270954e149, + 0.9916779348709496892095714015418938011582e150, + 0.9619275968248211985332842594956369871234e152, + 0.942689044888324774562618574305724247381e154, + 0.9332621544394415268169923885626670049072e156, + 0.9332621544394415268169923885626670049072e158, + 0.9425947759838359420851623124482936749562e160, + 0.9614466715035126609268655586972595484554e162, + 0.990290071648618040754671525458177334909e164, + 0.1029901674514562762384858386476504428305e167, + 0.1081396758240290900504101305800329649721e169, + 0.1146280563734708354534347384148349428704e171, + 0.1226520203196137939351751701038733888713e173, + 0.132464181945182897449989183712183259981e175, + 0.1443859583202493582204882102462797533793e177, + 0.1588245541522742940425370312709077287172e179, + 0.1762952551090244663872161047107075788761e181, + 0.1974506857221074023536820372759924883413e183, + 0.2231192748659813646596607021218715118256e185, + 0.2543559733472187557120132004189335234812e187, + 0.2925093693493015690688151804817735520034e189, + 0.339310868445189820119825609358857320324e191, + 0.396993716080872089540195962949863064779e193, + 0.4684525849754290656574312362808384164393e195, + 0.5574585761207605881323431711741977155627e197, + 0.6689502913449127057588118054090372586753e199, + 0.8094298525273443739681622845449350829971e201, + 0.9875044200833601362411579871448208012564e203, + 0.1214630436702532967576624324188129585545e206, + 0.1506141741511140879795014161993280686076e208, + 0.1882677176888926099743767702491600857595e210, + 0.237217324288004688567714730513941708057e212, + 0.3012660018457659544809977077527059692324e214, + 0.3856204823625804217356770659234636406175e216, + 0.4974504222477287440390234150412680963966e218, + 0.6466855489220473672507304395536485253155e220, + 0.8471580690878820510984568758152795681634e222, + 0.1118248651196004307449963076076169029976e225, + 0.1487270706090685728908450891181304809868e227, + 0.1992942746161518876737324194182948445223e229, + 0.269047270731805048359538766214698040105e231, + 0.3659042881952548657689727220519893345429e233, + 0.5012888748274991661034926292112253883237e235, + 0.6917786472619488492228198283114910358867e237, + 0.9615723196941089004197195613529725398826e239, + 0.1346201247571752460587607385894161555836e242, + 0.1898143759076170969428526414110767793728e244, + 0.2695364137888162776588507508037290267094e246, + 0.3854370717180072770521565736493325081944e248, + 0.5550293832739304789551054660550388118e250, + 0.80479260574719919448490292577980627711e252, + 0.1174997204390910823947958271638517164581e255, + 0.1727245890454638911203498659308620231933e257, + 0.2556323917872865588581178015776757943262e259, + 0.380892263763056972698595524350736933546e261, + 0.571338395644585459047893286526105400319e263, + 0.8627209774233240431623188626544191544816e265, + 0.1311335885683452545606724671234717114812e268, + 0.2006343905095682394778288746989117185662e270, + 0.308976961384735088795856467036324046592e272, + 0.4789142901463393876335775239063022722176e274, + 0.7471062926282894447083809372938315446595e276, + 0.1172956879426414428192158071551315525115e279, + 0.1853271869493734796543609753051078529682e281, + 0.2946702272495038326504339507351214862195e283, + 0.4714723635992061322406943211761943779512e285, + 0.7590705053947218729075178570936729485014e287, + 0.1229694218739449434110178928491750176572e290, + 0.2004401576545302577599591653441552787813e292, + 0.3287218585534296227263330311644146572013e294, + 0.5423910666131588774984495014212841843822e296, + 0.9003691705778437366474261723593317460744e298, + 0.1503616514864999040201201707840084015944e301, + 0.2526075744973198387538018869171341146786e303, + 0.4269068009004705274939251888899566538069e305, + 0.7257415615307998967396728211129263114717e307, + }}; + + return factorials[i]; +} + +export template <> +struct max_factorial +{ + static constexpr unsigned value = 170; +}; + +export template <> +inline constexpr long double unchecked_factorial(unsigned i ) +{ + + constexpr std::array factorials = { { + + + + 1L, + 1L, + 2L, + 6L, + 24L, + 120L, + 720L, + 5040L, + 40320L, + 362880.0L, + 3628800.0L, + 39916800.0L, + 479001600.0L, + 6227020800.0L, + 87178291200.0L, + 1307674368000.0L, + 20922789888000.0L, + 355687428096000.0L, + 6402373705728000.0L, + 121645100408832000.0L, + 0.243290200817664e19L, + 0.5109094217170944e20L, + 0.112400072777760768e22L, + 0.2585201673888497664e23L, + 0.62044840173323943936e24L, + 0.15511210043330985984e26L, + 0.403291461126605635584e27L, + 0.10888869450418352160768e29L, + 0.304888344611713860501504e30L, + 0.8841761993739701954543616e31L, + 0.26525285981219105863630848e33L, + 0.822283865417792281772556288e34L, + 0.26313083693369353016721801216e36L, + 0.868331761881188649551819440128e37L, + 0.29523279903960414084761860964352e39L, + 0.103331479663861449296666513375232e41L, + 0.3719933267899012174679994481508352e42L, + 0.137637530912263450463159795815809024e44L, + 0.5230226174666011117600072241000742912e45L, + 0.203978820811974433586402817399028973568e47L, + 0.815915283247897734345611269596115894272e48L, + 0.3345252661316380710817006205344075166515e50L, + 0.1405006117752879898543142606244511569936e52L, + 0.6041526306337383563735513206851399750726e53L, + 0.265827157478844876804362581101461589032e55L, + 0.1196222208654801945619631614956577150644e57L, + 0.5502622159812088949850305428800254892962e58L, + 0.2586232415111681806429643551536119799692e60L, + 0.1241391559253607267086228904737337503852e62L, + 0.6082818640342675608722521633212953768876e63L, + 0.3041409320171337804361260816606476884438e65L, + 0.1551118753287382280224243016469303211063e67L, + 0.8065817517094387857166063685640376697529e68L, + 0.427488328406002556429801375338939964969e70L, + 0.2308436973392413804720927426830275810833e72L, + 0.1269640335365827592596510084756651695958e74L, + 0.7109985878048634518540456474637249497365e75L, + 0.4052691950487721675568060190543232213498e77L, + 0.2350561331282878571829474910515074683829e79L, + 0.1386831185456898357379390197203894063459e81L, + 0.8320987112741390144276341183223364380754e82L, + 0.507580213877224798800856812176625227226e84L, + 0.3146997326038793752565312235495076408801e86L, + 0.1982608315404440064116146708361898137545e88L, + 0.1268869321858841641034333893351614808029e90L, + 0.8247650592082470666723170306785496252186e91L, + 0.5443449390774430640037292402478427526443e93L, + 0.3647111091818868528824985909660546442717e95L, + 0.2480035542436830599600990418569171581047e97L, + 0.1711224524281413113724683388812728390923e99L, + 0.1197857166996989179607278372168909873646e101L, + 0.8504785885678623175211676442399260102886e102L, + 0.6123445837688608686152407038527467274078e104L, + 0.4470115461512684340891257138125051110077e106L, + 0.3307885441519386412259530282212537821457e108L, + 0.2480914081139539809194647711659403366093e110L, + 0.188549470166605025498793226086114655823e112L, + 0.1451830920282858696340707840863082849837e114L, + 0.1132428117820629783145752115873204622873e116L, + 0.8946182130782975286851441715398316520698e117L, + 0.7156945704626380229481153372318653216558e119L, + 0.5797126020747367985879734231578109105412e121L, + 0.4753643337012841748421382069894049466438e123L, + 0.3945523969720658651189747118012061057144e125L, + 0.3314240134565353266999387579130131288001e127L, + 0.2817104114380550276949479442260611594801e129L, + 0.2422709538367273238176552320344125971528e131L, + 0.210775729837952771721360051869938959523e133L, + 0.1854826422573984391147968456455462843802e135L, + 0.1650795516090846108121691926245361930984e137L, + 0.1485715964481761497309522733620825737886e139L, + 0.1352001527678402962551665687594951421476e141L, + 0.1243841405464130725547532432587355307758e143L, + 0.1156772507081641574759205162306240436215e145L, + 0.1087366156656743080273652852567866010042e147L, + 0.103299784882390592625997020993947270954e149L, + 0.9916779348709496892095714015418938011582e150L, + 0.9619275968248211985332842594956369871234e152L, + 0.942689044888324774562618574305724247381e154L, + 0.9332621544394415268169923885626670049072e156L, + 0.9332621544394415268169923885626670049072e158L, + 0.9425947759838359420851623124482936749562e160L, + 0.9614466715035126609268655586972595484554e162L, + 0.990290071648618040754671525458177334909e164L, + 0.1029901674514562762384858386476504428305e167L, + 0.1081396758240290900504101305800329649721e169L, + 0.1146280563734708354534347384148349428704e171L, + 0.1226520203196137939351751701038733888713e173L, + 0.132464181945182897449989183712183259981e175L, + 0.1443859583202493582204882102462797533793e177L, + 0.1588245541522742940425370312709077287172e179L, + 0.1762952551090244663872161047107075788761e181L, + 0.1974506857221074023536820372759924883413e183L, + 0.2231192748659813646596607021218715118256e185L, + 0.2543559733472187557120132004189335234812e187L, + 0.2925093693493015690688151804817735520034e189L, + 0.339310868445189820119825609358857320324e191L, + 0.396993716080872089540195962949863064779e193L, + 0.4684525849754290656574312362808384164393e195L, + 0.5574585761207605881323431711741977155627e197L, + 0.6689502913449127057588118054090372586753e199L, + 0.8094298525273443739681622845449350829971e201L, + 0.9875044200833601362411579871448208012564e203L, + 0.1214630436702532967576624324188129585545e206L, + 0.1506141741511140879795014161993280686076e208L, + 0.1882677176888926099743767702491600857595e210L, + 0.237217324288004688567714730513941708057e212L, + 0.3012660018457659544809977077527059692324e214L, + 0.3856204823625804217356770659234636406175e216L, + 0.4974504222477287440390234150412680963966e218L, + 0.6466855489220473672507304395536485253155e220L, + 0.8471580690878820510984568758152795681634e222L, + 0.1118248651196004307449963076076169029976e225L, + 0.1487270706090685728908450891181304809868e227L, + 0.1992942746161518876737324194182948445223e229L, + 0.269047270731805048359538766214698040105e231L, + 0.3659042881952548657689727220519893345429e233L, + 0.5012888748274991661034926292112253883237e235L, + 0.6917786472619488492228198283114910358867e237L, + 0.9615723196941089004197195613529725398826e239L, + 0.1346201247571752460587607385894161555836e242L, + 0.1898143759076170969428526414110767793728e244L, + 0.2695364137888162776588507508037290267094e246L, + 0.3854370717180072770521565736493325081944e248L, + 0.5550293832739304789551054660550388118e250L, + 0.80479260574719919448490292577980627711e252L, + 0.1174997204390910823947958271638517164581e255L, + 0.1727245890454638911203498659308620231933e257L, + 0.2556323917872865588581178015776757943262e259L, + 0.380892263763056972698595524350736933546e261L, + 0.571338395644585459047893286526105400319e263L, + 0.8627209774233240431623188626544191544816e265L, + 0.1311335885683452545606724671234717114812e268L, + 0.2006343905095682394778288746989117185662e270L, + 0.308976961384735088795856467036324046592e272L, + 0.4789142901463393876335775239063022722176e274L, + 0.7471062926282894447083809372938315446595e276L, + 0.1172956879426414428192158071551315525115e279L, + 0.1853271869493734796543609753051078529682e281L, + 0.2946702272495038326504339507351214862195e283L, + 0.4714723635992061322406943211761943779512e285L, + 0.7590705053947218729075178570936729485014e287L, + 0.1229694218739449434110178928491750176572e290L, + 0.2004401576545302577599591653441552787813e292L, + 0.3287218585534296227263330311644146572013e294L, + 0.5423910666131588774984495014212841843822e296L, + 0.9003691705778437366474261723593317460744e298L, + 0.1503616514864999040201201707840084015944e301L, + 0.2526075744973198387538018869171341146786e303L, + 0.4269068009004705274939251888899566538069e305L, + 0.7257415615307998967396728211129263114717e307L, + }}; + + return factorials[i]; +} + +export template <> +struct max_factorial +{ + static constexpr unsigned value = 170; +}; +# 677 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" +template +struct unchecked_factorial_initializer +{ + struct init + { + init() + { + boost::math::unchecked_factorial(3); + } + void force_instantiate()const {} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename unchecked_factorial_initializer::init unchecked_factorial_initializer::initializer; + + +template +inline T unchecked_factorial_imp(unsigned i, const std::integral_constant&) +{ +# 714 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" + static_assert(!std::is_integral::value && !std::numeric_limits::is_integer, "Type T must not be an integral type"); + + + static const std::array factorials = {{ + T(boost::math::tools::convert_from_string("1")), + T(boost::math::tools::convert_from_string("1")), + T(boost::math::tools::convert_from_string("2")), + T(boost::math::tools::convert_from_string("6")), + T(boost::math::tools::convert_from_string("24")), + T(boost::math::tools::convert_from_string("120")), + T(boost::math::tools::convert_from_string("720")), + T(boost::math::tools::convert_from_string("5040")), + T(boost::math::tools::convert_from_string("40320")), + T(boost::math::tools::convert_from_string("362880")), + T(boost::math::tools::convert_from_string("3628800")), + T(boost::math::tools::convert_from_string("39916800")), + T(boost::math::tools::convert_from_string("479001600")), + T(boost::math::tools::convert_from_string("6227020800")), + T(boost::math::tools::convert_from_string("87178291200")), + T(boost::math::tools::convert_from_string("1307674368000")), + T(boost::math::tools::convert_from_string("20922789888000")), + T(boost::math::tools::convert_from_string("355687428096000")), + T(boost::math::tools::convert_from_string("6402373705728000")), + T(boost::math::tools::convert_from_string("121645100408832000")), + T(boost::math::tools::convert_from_string("2432902008176640000")), + T(boost::math::tools::convert_from_string("51090942171709440000")), + T(boost::math::tools::convert_from_string("1124000727777607680000")), + T(boost::math::tools::convert_from_string("25852016738884976640000")), + T(boost::math::tools::convert_from_string("620448401733239439360000")), + T(boost::math::tools::convert_from_string("15511210043330985984000000")), + T(boost::math::tools::convert_from_string("403291461126605635584000000")), + T(boost::math::tools::convert_from_string("10888869450418352160768000000")), + T(boost::math::tools::convert_from_string("304888344611713860501504000000")), + T(boost::math::tools::convert_from_string("8841761993739701954543616000000")), + T(boost::math::tools::convert_from_string("265252859812191058636308480000000")), + T(boost::math::tools::convert_from_string("8222838654177922817725562880000000")), + T(boost::math::tools::convert_from_string("263130836933693530167218012160000000")), + T(boost::math::tools::convert_from_string("8683317618811886495518194401280000000")), + T(boost::math::tools::convert_from_string("295232799039604140847618609643520000000")), + T(boost::math::tools::convert_from_string("10333147966386144929666651337523200000000")), + T(boost::math::tools::convert_from_string("371993326789901217467999448150835200000000")), + T(boost::math::tools::convert_from_string("13763753091226345046315979581580902400000000")), + T(boost::math::tools::convert_from_string("523022617466601111760007224100074291200000000")), + T(boost::math::tools::convert_from_string("20397882081197443358640281739902897356800000000")), + T(boost::math::tools::convert_from_string("815915283247897734345611269596115894272000000000")), + T(boost::math::tools::convert_from_string("33452526613163807108170062053440751665152000000000")), + T(boost::math::tools::convert_from_string("1405006117752879898543142606244511569936384000000000")), + T(boost::math::tools::convert_from_string("60415263063373835637355132068513997507264512000000000")), + T(boost::math::tools::convert_from_string("2658271574788448768043625811014615890319638528000000000")), + T(boost::math::tools::convert_from_string("119622220865480194561963161495657715064383733760000000000")), + T(boost::math::tools::convert_from_string("5502622159812088949850305428800254892961651752960000000000")), + T(boost::math::tools::convert_from_string("258623241511168180642964355153611979969197632389120000000000")), + T(boost::math::tools::convert_from_string("12413915592536072670862289047373375038521486354677760000000000")), + T(boost::math::tools::convert_from_string("608281864034267560872252163321295376887552831379210240000000000")), + T(boost::math::tools::convert_from_string("30414093201713378043612608166064768844377641568960512000000000000")), + T(boost::math::tools::convert_from_string("1551118753287382280224243016469303211063259720016986112000000000000")), + T(boost::math::tools::convert_from_string("80658175170943878571660636856403766975289505440883277824000000000000")), + T(boost::math::tools::convert_from_string("4274883284060025564298013753389399649690343788366813724672000000000000")), + T(boost::math::tools::convert_from_string("230843697339241380472092742683027581083278564571807941132288000000000000")), + T(boost::math::tools::convert_from_string("12696403353658275925965100847566516959580321051449436762275840000000000000")), + T(boost::math::tools::convert_from_string("710998587804863451854045647463724949736497978881168458687447040000000000000")), + T(boost::math::tools::convert_from_string("40526919504877216755680601905432322134980384796226602145184481280000000000000")), + T(boost::math::tools::convert_from_string("2350561331282878571829474910515074683828862318181142924420699914240000000000000")), + T(boost::math::tools::convert_from_string("138683118545689835737939019720389406345902876772687432540821294940160000000000000")), + T(boost::math::tools::convert_from_string("8320987112741390144276341183223364380754172606361245952449277696409600000000000000")), + T(boost::math::tools::convert_from_string("507580213877224798800856812176625227226004528988036003099405939480985600000000000000")), + T(boost::math::tools::convert_from_string("31469973260387937525653122354950764088012280797258232192163168247821107200000000000000")), + T(boost::math::tools::convert_from_string("1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000")), + T(boost::math::tools::convert_from_string("126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000")), + T(boost::math::tools::convert_from_string("8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000")), + T(boost::math::tools::convert_from_string("544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000")), + T(boost::math::tools::convert_from_string("36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000")), + T(boost::math::tools::convert_from_string("2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000")), + T(boost::math::tools::convert_from_string("171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000")), + T(boost::math::tools::convert_from_string("11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000")), + T(boost::math::tools::convert_from_string("850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000")), + T(boost::math::tools::convert_from_string("61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000")), + T(boost::math::tools::convert_from_string("4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000")), + T(boost::math::tools::convert_from_string("330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000")), + T(boost::math::tools::convert_from_string("24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000")), + T(boost::math::tools::convert_from_string("1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000")), + T(boost::math::tools::convert_from_string("145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000")), + T(boost::math::tools::convert_from_string("11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000")), + T(boost::math::tools::convert_from_string("894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000")), + T(boost::math::tools::convert_from_string("71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000")), + T(boost::math::tools::convert_from_string("5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000")), + T(boost::math::tools::convert_from_string("475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000")), + T(boost::math::tools::convert_from_string("39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000")), + T(boost::math::tools::convert_from_string("3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000")), + T(boost::math::tools::convert_from_string("281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000")), + T(boost::math::tools::convert_from_string("24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000")), + T(boost::math::tools::convert_from_string("2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000")), + T(boost::math::tools::convert_from_string("185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000")), + T(boost::math::tools::convert_from_string("16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000")), + T(boost::math::tools::convert_from_string("1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000")), + T(boost::math::tools::convert_from_string("135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000")), + T(boost::math::tools::convert_from_string("12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000")), + T(boost::math::tools::convert_from_string("1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000")), + T(boost::math::tools::convert_from_string("108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000")), + T(boost::math::tools::convert_from_string("10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000")), + T(boost::math::tools::convert_from_string("991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000")), + T(boost::math::tools::convert_from_string("96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000")), + T(boost::math::tools::convert_from_string("9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000")), + T(boost::math::tools::convert_from_string("933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000")), + T(boost::math::tools::convert_from_string("93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000")), + }}; + + return factorials[i]; +} + +template +inline T unchecked_factorial_imp(unsigned i, const std::integral_constant&) +{ +# 839 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" + static_assert(!std::is_integral::value && !std::numeric_limits::is_integer, "Type T must not be an integral type"); + + static const char* const factorial_strings[] = { + "1", + "1", + "2", + "6", + "24", + "120", + "720", + "5040", + "40320", + "362880", + "3628800", + "39916800", + "479001600", + "6227020800", + "87178291200", + "1307674368000", + "20922789888000", + "355687428096000", + "6402373705728000", + "121645100408832000", + "2432902008176640000", + "51090942171709440000", + "1124000727777607680000", + "25852016738884976640000", + "620448401733239439360000", + "15511210043330985984000000", + "403291461126605635584000000", + "10888869450418352160768000000", + "304888344611713860501504000000", + "8841761993739701954543616000000", + "265252859812191058636308480000000", + "8222838654177922817725562880000000", + "263130836933693530167218012160000000", + "8683317618811886495518194401280000000", + "295232799039604140847618609643520000000", + "10333147966386144929666651337523200000000", + "371993326789901217467999448150835200000000", + "13763753091226345046315979581580902400000000", + "523022617466601111760007224100074291200000000", + "20397882081197443358640281739902897356800000000", + "815915283247897734345611269596115894272000000000", + "33452526613163807108170062053440751665152000000000", + "1405006117752879898543142606244511569936384000000000", + "60415263063373835637355132068513997507264512000000000", + "2658271574788448768043625811014615890319638528000000000", + "119622220865480194561963161495657715064383733760000000000", + "5502622159812088949850305428800254892961651752960000000000", + "258623241511168180642964355153611979969197632389120000000000", + "12413915592536072670862289047373375038521486354677760000000000", + "608281864034267560872252163321295376887552831379210240000000000", + "30414093201713378043612608166064768844377641568960512000000000000", + "1551118753287382280224243016469303211063259720016986112000000000000", + "80658175170943878571660636856403766975289505440883277824000000000000", + "4274883284060025564298013753389399649690343788366813724672000000000000", + "230843697339241380472092742683027581083278564571807941132288000000000000", + "12696403353658275925965100847566516959580321051449436762275840000000000000", + "710998587804863451854045647463724949736497978881168458687447040000000000000", + "40526919504877216755680601905432322134980384796226602145184481280000000000000", + "2350561331282878571829474910515074683828862318181142924420699914240000000000000", + "138683118545689835737939019720389406345902876772687432540821294940160000000000000", + "8320987112741390144276341183223364380754172606361245952449277696409600000000000000", + "507580213877224798800856812176625227226004528988036003099405939480985600000000000000", + "31469973260387937525653122354950764088012280797258232192163168247821107200000000000000", + "1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000", + "126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000", + "8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000", + "544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000", + "36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000", + "2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000", + "171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000", + "11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000", + "850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000", + "61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000", + "4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000", + "330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000", + "24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000", + "1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000", + "145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000", + "11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000", + "894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000", + "71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000", + "5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000", + "475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000", + "39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000", + "3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000", + "281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000", + "24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000", + "2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000", + "185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000", + "16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000", + "1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000", + "135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000", + "12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000", + "1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000", + "108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000", + "10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000", + "991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000", + "96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000", + "9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000", + "933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000", + "93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000", + }; + + + + static thread_local T factorials[sizeof(factorial_strings) / sizeof(factorial_strings[0])]; + static thread_local int digits = 0; + + int current_digits = boost::math::tools::digits(); + + if(digits != current_digits) + { + digits = current_digits; + for(unsigned k = 0; k < sizeof(factorials) / sizeof(factorials[0]); ++k) + factorials[k] = static_cast(boost::math::tools::convert_from_string(factorial_strings[k])); + } + + return factorials[i]; +} + +template +inline T unchecked_factorial_imp(unsigned i, const std::integral_constant::digits>&) +{ + return unchecked_factorial(i); +} + +template +inline T unchecked_factorial_imp(unsigned i, const std::integral_constant::digits>&) +{ + return unchecked_factorial(i); +} +# 989 "../../../../boost/math/special_functions/detail/unchecked_factorial.hpp" +export template +inline T unchecked_factorial(unsigned i) +{ + typedef typename boost::math::policies::precision >::type tag_type; + return unchecked_factorial_imp(i, tag_type()); +} + + + + + + + +export template +struct max_factorial +{ + static constexpr unsigned value = + std::numeric_limits::digits == std::numeric_limits::digits ? max_factorial::value + : std::numeric_limits::digits == std::numeric_limits::digits ? max_factorial::value + : std::numeric_limits::digits == std::numeric_limits::digits ? max_factorial::value + + : 100; +}; + + + + +template +const unsigned max_factorial::value; + + +} +} +# 194 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/bernoulli.hpp" 1 +# 17 "../../../../boost/math/special_functions/bernoulli.hpp" +# 1 "../../../../boost/math/special_functions/detail/unchecked_bernoulli.hpp" 1 +# 25 "../../../../boost/math/special_functions/detail/unchecked_bernoulli.hpp" +namespace boost { namespace math { + +namespace detail { + +template +struct max_bernoulli_index +{ + static constexpr unsigned value = 17; +}; + +template <> +struct max_bernoulli_index<1> +{ + static constexpr unsigned value = 32; +}; + +template <> +struct max_bernoulli_index<2> +{ + static constexpr unsigned value = 129; +}; + +template <> +struct max_bernoulli_index<3> +{ + static constexpr unsigned value = 1156; +}; + +template <> +struct max_bernoulli_index<4> +{ + static constexpr unsigned value = 11; +}; + +template +struct bernoulli_imp_variant +{ + static constexpr unsigned value = + (std::numeric_limits::max_exponent == 128) + && (std::numeric_limits::radix == 2) + && (std::numeric_limits::digits <= std::numeric_limits::digits) + && (std::is_convertible::value) ? 1 : + ( + (std::numeric_limits::max_exponent == 1024) + && (std::numeric_limits::radix == 2) + && (std::numeric_limits::digits <= std::numeric_limits::digits) + && (std::is_convertible::value) ? 2 : + ( + (std::numeric_limits::max_exponent == 16384) + && (std::numeric_limits::radix == 2) + && (std::numeric_limits::digits <= std::numeric_limits::digits) + && (std::is_convertible::value) ? 3 : (!std::is_convertible::value ? 4 : 0) + ) + ); +}; + +} + +export template +struct max_bernoulli_b2n : public detail::max_bernoulli_index::value>{}; + +namespace detail{ + +template +inline constexpr T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + constexpr std::array::value> numerators = + + + + {{ + std::int64_t( +1LL), + std::int64_t( +1LL), + std::int64_t( -1LL), + std::int64_t( +1LL), + std::int64_t( -1LL), + std::int64_t( +5LL), + std::int64_t( -691LL), + std::int64_t( +7LL), + std::int64_t( -3617LL), + std::int64_t( +43867LL), + std::int64_t( -174611LL), + std::int64_t( +854513LL), + std::int64_t( -236364091LL), + std::int64_t( +8553103LL), + std::int64_t( -23749461029LL), + std::int64_t(+8615841276005LL), + std::int64_t(-7709321041217LL), + std::int64_t(+2577687858367LL) + }}; + + + constexpr std::array::value> denominators = + + + + {{ + std::int64_t( 1LL), + std::int64_t( 6LL), + std::int64_t( 30LL), + std::int64_t( 42LL), + std::int64_t( 30LL), + std::int64_t( 66LL), + std::int64_t( 2730LL), + std::int64_t( 6LL), + std::int64_t( 510LL), + std::int64_t( 798LL), + std::int64_t( 330LL), + std::int64_t( 138LL), + std::int64_t( 2730LL), + std::int64_t( 6LL), + std::int64_t( 870LL), + std::int64_t( 14322LL), + std::int64_t( 510LL), + std::int64_t( 6LL) + }}; + return T(numerators[n]) / denominators[n]; +} + +template +inline constexpr T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + constexpr std::array::value> bernoulli_data = + + + + {{ + +1.00000000000000000000000000000000000000000F, + +0.166666666666666666666666666666666666666667F, + -0.0333333333333333333333333333333333333333333F, + +0.0238095238095238095238095238095238095238095F, + -0.0333333333333333333333333333333333333333333F, + +0.0757575757575757575757575757575757575757576F, + -0.253113553113553113553113553113553113553114F, + +1.16666666666666666666666666666666666666667F, + -7.09215686274509803921568627450980392156863F, + +54.9711779448621553884711779448621553884712F, + -529.124242424242424242424242424242424242424F, + +6192.12318840579710144927536231884057971014F, + -86580.2531135531135531135531135531135531136F, + +1.42551716666666666666666666666666666666667e6F, + -2.72982310678160919540229885057471264367816e7F, + +6.01580873900642368384303868174835916771401e8F, + -1.51163157670921568627450980392156862745098e10F, + +4.29614643061166666666666666666666666666667e11F, + -1.37116552050883327721590879485616327721591e13F, + +4.88332318973593166666666666666666666666667e14F, + -1.92965793419400681486326681448632668144863e16F, + +8.41693047573682615000553709856035437430786e17F, + -4.03380718540594554130768115942028985507246e19F, + +2.11507486380819916056014539007092198581560e21F, + -1.20866265222965259346027311937082525317819e23F, + +7.50086674607696436685572007575757575757576e24F, + -5.03877810148106891413789303052201257861635e26F, + +3.65287764848181233351104308429711779448622e28F, + -2.84987693024508822262691464329106781609195e30F, + +2.38654274996836276446459819192192149717514e32F, + -2.13999492572253336658107447651910973926742e34F, + +2.05009757234780975699217330956723102516667e36F, + -2.09380059113463784090951852900279701847092e38F, + }}; + + return bernoulli_data[n]; +} + + +template +inline constexpr T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + constexpr std::array::value> bernoulli_data = + + + + {{ + +1.00000000000000000000000000000000000000000, + +0.166666666666666666666666666666666666666667, + -0.0333333333333333333333333333333333333333333, + +0.0238095238095238095238095238095238095238095, + -0.0333333333333333333333333333333333333333333, + +0.0757575757575757575757575757575757575757576, + -0.253113553113553113553113553113553113553114, + +1.16666666666666666666666666666666666666667, + -7.09215686274509803921568627450980392156863, + +54.9711779448621553884711779448621553884712, + -529.124242424242424242424242424242424242424, + +6192.12318840579710144927536231884057971014, + -86580.2531135531135531135531135531135531136, + +1.42551716666666666666666666666666666666667e6, + -2.72982310678160919540229885057471264367816e7, + +6.01580873900642368384303868174835916771401e8, + -1.51163157670921568627450980392156862745098e10, + +4.29614643061166666666666666666666666666667e11, + -1.37116552050883327721590879485616327721591e13, + +4.88332318973593166666666666666666666666667e14, + -1.92965793419400681486326681448632668144863e16, + +8.41693047573682615000553709856035437430786e17, + -4.03380718540594554130768115942028985507246e19, + +2.11507486380819916056014539007092198581560e21, + -1.20866265222965259346027311937082525317819e23, + +7.50086674607696436685572007575757575757576e24, + -5.03877810148106891413789303052201257861635e26, + +3.65287764848181233351104308429711779448622e28, + -2.84987693024508822262691464329106781609195e30, + +2.38654274996836276446459819192192149717514e32, + -2.13999492572253336658107447651910973926742e34, + +2.05009757234780975699217330956723102516667e36, + -2.09380059113463784090951852900279701847092e38, + +2.27526964884635155596492603527692645814700e40, + -2.62577102862395760473030497361582020814490e42, + +3.21250821027180325182047923042649852435219e44, + -4.15982781667947109139170744952623589366896e46, + +5.69206954820352800238834562191210586444805e48, + -8.21836294197845756922906534686173330145509e50, + +1.25029043271669930167323398297028955241772e53, + -2.00155832332483702749253291988132987687242e55, + +3.36749829153643742333966769033387530162196e57, + -5.94709705031354477186604968440515408405791e59, + +1.10119103236279775595641307904376916046305e62, + -2.13552595452535011886583850190410656789733e64, + +4.33288969866411924196166130593792062184514e66, + -9.18855282416693282262005552155018971389604e68, + +2.03468967763290744934550279902200200659751e71, + -4.70038339580357310785752555350060606545967e73, + +1.13180434454842492706751862577339342678904e76, + -2.83822495706937069592641563364817647382847e78, + +7.40642489796788506297508271409209841768797e80, + -2.00964548027566044834656196727153631868673e83, + +5.66571700508059414457193460305193569614195e85, + -1.65845111541362169158237133743199123014950e88, + +5.03688599504923774192894219151801548124424e90, + -1.58614682376581863693634015729664387827410e93, + +5.17567436175456269840732406825071225612408e95, + -1.74889218402171173396900258776181591451415e98, + +6.11605199949521852558245252642641677807677e100, + -2.21227769127078349422883234567129324455732e103, + +8.27227767987709698542210624599845957312047e105, + -3.19589251114157095835916343691808148735263e108, + +1.27500822233877929823100243029266798669572e111, + -5.25009230867741338994028246245651754469199e113, + +2.23018178942416252098692981988387281437383e116, + -9.76845219309552044386335133989802393011669e118, + +4.40983619784529542722726228748131691918758e121, + -2.05085708864640888397293377275830154864566e124, + +9.82144332797912771075729696020975210414919e126, + -4.84126007982088805087891967099634127611305e129, + +2.45530888014809826097834674040886903996737e132, + -1.28069268040847475487825132786017857218118e135, + +6.86761671046685811921018885984644004360924e137, + -3.78464685819691046949789954163795568144895e140, + +2.14261012506652915508713231351482720966602e143, + -1.24567271371836950070196429616376072194583e146, + +7.43457875510001525436796683940520613117807e148, + -4.55357953046417048940633332233212748767721e151, + +2.86121128168588683453638472510172325229190e154, + -1.84377235520338697276882026536287854875414e157, + +1.21811545362210466995013165065995213558174e160, + -8.24821871853141215484818457296893447301419e162, + +5.72258779378329433296516498142978615918685e165, + -4.06685305250591047267679693831158655602196e168, + +2.95960920646420500628752695815851870426379e171, + -2.20495225651894575090311752273445984836379e174, + +1.68125970728895998058311525151360665754464e177, + -1.31167362135569576486452806355817153004431e180, + +1.04678940094780380821832853929823089643829e183, + -8.54328935788337077185982546299082774593270e185, + +7.12878213224865423522884066771438224721245e188, + -6.08029314555358993000847118686477458461988e191, + +5.29967764248499239300942910043247266228490e194, + -4.71942591687458626443646229013379911103761e197, + +4.29284137914029810894168296541074669045521e200, + -3.98767449682322074434477655542938795106651e203, + +3.78197804193588827138944181161393327898220e206, + -3.66142336836811912436858082151197348755196e209, + +3.61760902723728623488554609298914089477541e212, + -3.64707726451913543621383088655499449048682e215, + +3.75087554364544090983452410104814189306842e218, + -3.93458672964390282694891288533713429355657e221, + +4.20882111481900820046571171111494898242731e224, + -4.59022962206179186559802940573325591059371e227, + +5.10317257726295759279198185106496768539760e230, + -5.78227623036569554015377271242917142512200e233, + +6.67624821678358810322637794412809363451080e236, + -7.85353076444504163225916259639312444428230e239, + +9.41068940670587255245443288258762485293948e242, + -1.14849338734651839938498599206805592548354e246, + +1.42729587428487856771416320087122499897180e249, + -1.80595595869093090142285728117654560926719e252, + +2.32615353076608052161297985184708876161736e255, + -3.04957517154995947681942819261542593785327e258, + +4.06858060764339734424012124124937318633684e261, + -5.52310313219743616252320044093186392324280e264, + +7.62772793964343924869949690204961215533859e267, + -1.07155711196978863132793524001065396932667e271, + +1.53102008959691884453440916153355334355847e274, + -2.22448916821798346676602348865048510824835e277, + +3.28626791906901391668189736436895275365183e280, + -4.93559289559603449020711938191575963496999e283, + +7.53495712008325067212266049779283956727824e286, + -1.16914851545841777278088924731655041783900e290, + +1.84352614678389394126646201597702232396492e293, + -2.95368261729680829728014917350525183485207e296, + +4.80793212775015697668878704043264072227967e299, + -7.95021250458852528538243631671158693036798e302, + +1.33527841873546338750122832017820518292039e306 + }}; + + return bernoulli_data[n]; +} + +template +inline constexpr T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + constexpr std::array::value> bernoulli_data = + + + + {{ + +1.00000000000000000000000000000000000000000L, + +0.166666666666666666666666666666666666666667L, + -0.0333333333333333333333333333333333333333333L, + +0.0238095238095238095238095238095238095238095L, + -0.0333333333333333333333333333333333333333333L, + +0.0757575757575757575757575757575757575757576L, + -0.253113553113553113553113553113553113553114L, + +1.16666666666666666666666666666666666666667L, + -7.09215686274509803921568627450980392156863L, + +54.9711779448621553884711779448621553884712L, + -529.124242424242424242424242424242424242424L, + +6192.12318840579710144927536231884057971014L, + -86580.2531135531135531135531135531135531136L, + +1.42551716666666666666666666666666666666667E6L, + -2.72982310678160919540229885057471264367816E7L, + +6.01580873900642368384303868174835916771401E8L, + -1.51163157670921568627450980392156862745098E10L, + +4.29614643061166666666666666666666666666667E11L, + -1.37116552050883327721590879485616327721591E13L, + +4.88332318973593166666666666666666666666667E14L, + -1.92965793419400681486326681448632668144863E16L, + +8.41693047573682615000553709856035437430786E17L, + -4.03380718540594554130768115942028985507246E19L, + +2.11507486380819916056014539007092198581560E21L, + -1.20866265222965259346027311937082525317819E23L, + +7.50086674607696436685572007575757575757576E24L, + -5.03877810148106891413789303052201257861635E26L, + +3.65287764848181233351104308429711779448622E28L, + -2.84987693024508822262691464329106781609195E30L, + +2.38654274996836276446459819192192149717514E32L, + -2.13999492572253336658107447651910973926742E34L, + +2.05009757234780975699217330956723102516667E36L, + -2.09380059113463784090951852900279701847092E38L, + +2.27526964884635155596492603527692645814700E40L, + -2.62577102862395760473030497361582020814490E42L, + +3.21250821027180325182047923042649852435219E44L, + -4.15982781667947109139170744952623589366896E46L, + +5.69206954820352800238834562191210586444805E48L, + -8.21836294197845756922906534686173330145509E50L, + +1.25029043271669930167323398297028955241772E53L, + -2.00155832332483702749253291988132987687242E55L, + +3.36749829153643742333966769033387530162196E57L, + -5.94709705031354477186604968440515408405791E59L, + +1.10119103236279775595641307904376916046305E62L, + -2.13552595452535011886583850190410656789733E64L, + +4.33288969866411924196166130593792062184514E66L, + -9.18855282416693282262005552155018971389604E68L, + +2.03468967763290744934550279902200200659751E71L, + -4.70038339580357310785752555350060606545967E73L, + +1.13180434454842492706751862577339342678904E76L, + -2.83822495706937069592641563364817647382847E78L, + +7.40642489796788506297508271409209841768797E80L, + -2.00964548027566044834656196727153631868673E83L, + +5.66571700508059414457193460305193569614195E85L, + -1.65845111541362169158237133743199123014950E88L, + +5.03688599504923774192894219151801548124424E90L, + -1.58614682376581863693634015729664387827410E93L, + +5.17567436175456269840732406825071225612408E95L, + -1.74889218402171173396900258776181591451415E98L, + +6.11605199949521852558245252642641677807677E100L, + -2.21227769127078349422883234567129324455732E103L, + +8.27227767987709698542210624599845957312047E105L, + -3.19589251114157095835916343691808148735263E108L, + +1.27500822233877929823100243029266798669572E111L, + -5.25009230867741338994028246245651754469199E113L, + +2.23018178942416252098692981988387281437383E116L, + -9.76845219309552044386335133989802393011669E118L, + +4.40983619784529542722726228748131691918758E121L, + -2.05085708864640888397293377275830154864566E124L, + +9.82144332797912771075729696020975210414919E126L, + -4.84126007982088805087891967099634127611305E129L, + +2.45530888014809826097834674040886903996737E132L, + -1.28069268040847475487825132786017857218118E135L, + +6.86761671046685811921018885984644004360924E137L, + -3.78464685819691046949789954163795568144895E140L, + +2.14261012506652915508713231351482720966602E143L, + -1.24567271371836950070196429616376072194583E146L, + +7.43457875510001525436796683940520613117807E148L, + -4.55357953046417048940633332233212748767721E151L, + +2.86121128168588683453638472510172325229190E154L, + -1.84377235520338697276882026536287854875414E157L, + +1.21811545362210466995013165065995213558174E160L, + -8.24821871853141215484818457296893447301419E162L, + +5.72258779378329433296516498142978615918685E165L, + -4.06685305250591047267679693831158655602196E168L, + +2.95960920646420500628752695815851870426379E171L, + -2.20495225651894575090311752273445984836379E174L, + +1.68125970728895998058311525151360665754464E177L, + -1.31167362135569576486452806355817153004431E180L, + +1.04678940094780380821832853929823089643829E183L, + -8.54328935788337077185982546299082774593270E185L, + +7.12878213224865423522884066771438224721245E188L, + -6.08029314555358993000847118686477458461988E191L, + +5.29967764248499239300942910043247266228490E194L, + -4.71942591687458626443646229013379911103761E197L, + +4.29284137914029810894168296541074669045521E200L, + -3.98767449682322074434477655542938795106651E203L, + +3.78197804193588827138944181161393327898220E206L, + -3.66142336836811912436858082151197348755196E209L, + +3.61760902723728623488554609298914089477541E212L, + -3.64707726451913543621383088655499449048682E215L, + +3.75087554364544090983452410104814189306842E218L, + -3.93458672964390282694891288533713429355657E221L, + +4.20882111481900820046571171111494898242731E224L, + -4.59022962206179186559802940573325591059371E227L, + +5.10317257726295759279198185106496768539760E230L, + -5.78227623036569554015377271242917142512200E233L, + +6.67624821678358810322637794412809363451080E236L, + -7.85353076444504163225916259639312444428230E239L, + +9.41068940670587255245443288258762485293948E242L, + -1.14849338734651839938498599206805592548354E246L, + +1.42729587428487856771416320087122499897180E249L, + -1.80595595869093090142285728117654560926719E252L, + +2.32615353076608052161297985184708876161736E255L, + -3.04957517154995947681942819261542593785327E258L, + +4.06858060764339734424012124124937318633684E261L, + -5.52310313219743616252320044093186392324280E264L, + +7.62772793964343924869949690204961215533859E267L, + -1.07155711196978863132793524001065396932667E271L, + +1.53102008959691884453440916153355334355847E274L, + -2.22448916821798346676602348865048510824835E277L, + +3.28626791906901391668189736436895275365183E280L, + -4.93559289559603449020711938191575963496999E283L, + +7.53495712008325067212266049779283956727824E286L, + -1.16914851545841777278088924731655041783900E290L, + +1.84352614678389394126646201597702232396492E293L, + -2.95368261729680829728014917350525183485207E296L, + +4.80793212775015697668878704043264072227967E299L, + -7.95021250458852528538243631671158693036798E302L, + +1.33527841873546338750122832017820518292039E306L, +# 665 "../../../../boost/math/special_functions/detail/unchecked_bernoulli.hpp" + }}; + + return bernoulli_data[n]; +} + +template +inline T unchecked_bernoulli_imp(std::size_t n, const std::integral_constant& ) +{ + + + + + static const std::array::value> numerators = + {{ + std::int32_t( +1LL), + std::int32_t( +1LL), + std::int32_t( -1LL), + std::int32_t( +1LL), + std::int32_t( -1LL), + std::int32_t( +5LL), + std::int32_t( -691LL), + std::int32_t( +7LL), + std::int32_t( -3617LL), + std::int32_t( +43867LL), + std::int32_t( -174611LL), + std::int32_t( +854513LL), + }}; + + static const std::array::value> denominators = + {{ + std::int32_t( 1LL), + std::int32_t( 6LL), + std::int32_t( 30LL), + std::int32_t( 42LL), + std::int32_t( 30LL), + std::int32_t( 66LL), + std::int32_t( 2730LL), + std::int32_t( 6LL), + std::int32_t( 510LL), + std::int32_t( 798LL), + std::int32_t( 330LL), + std::int32_t( 138LL), + }}; + return T(numerators[n]) / T(denominators[n]); +} + +} + +export template +inline constexpr T unchecked_bernoulli_b2n(const std::size_t n) +{ + typedef std::integral_constant::value> tag_type; + + return detail::unchecked_bernoulli_imp(n, tag_type()); +} + +}} +# 18 "../../../../boost/math/special_functions/bernoulli.hpp" 2 +# 1 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 1 +# 11 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" +# 1 "../../../../boost/math/tools/throw_exception.hpp" 1 +# 12 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 2 + +# 1 "../../../../boost/math/tools/atomic.hpp" 1 +# 11 "../../../../boost/math/tools/atomic.hpp" +# 1 "../../../../boost/math/tools/cxx03_warn.hpp" 1 +# 12 "../../../../boost/math/tools/atomic.hpp" 2 + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/atomic" 1 3 +# 35 "D:/compilers/msys64/mingw64/include/c++/11.2.0/atomic" 3 + +# 36 "D:/compilers/msys64/mingw64/include/c++/11.2.0/atomic" 3 + + + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_lockfree_defines.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_lockfree_defines.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_lockfree_defines.h" 3 +# 38 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 2 3 + + + +# 1 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_wait.h" 1 3 +# 33 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_wait.h" 3 + +# 34 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_wait.h" 3 +# 53 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_wait.h" 3 + +# 53 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_wait.h" 3 +namespace std +{ + + namespace __detail + { + + + + + using __platform_wait_t = uint64_t; + static constexpr size_t __platform_wait_alignment + = __alignof__(__platform_wait_t); + + } + + template + inline constexpr bool __platform_wait_uses_type + + + + + + = false; + + + namespace __detail + { +# 128 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_wait.h" 3 + inline void + __thread_yield() noexcept + { + + __gthread_yield(); + + } + + inline void + __thread_relax() noexcept + { + + __builtin_ia32_pause(); + + + + } + + constexpr auto __atomic_spin_count_1 = 12; + constexpr auto __atomic_spin_count_2 = 4; + + struct __default_spin_policy + { + bool + operator()() const noexcept + { return false; } + }; + + template + bool + __atomic_spin(_Pred& __pred, _Spin __spin = _Spin{ }) noexcept + { + for (auto __i = 0; __i < __atomic_spin_count_1; ++__i) + { + if (__pred()) + return true; + __detail::__thread_relax(); + } + + for (auto __i = 0; __i < __atomic_spin_count_2; ++__i) + { + if (__pred()) + return true; + __detail::__thread_yield(); + } + + while (__spin()) + { + if (__pred()) + return true; + } + + return false; + } + + + template + bool __atomic_compare(const _Tp& __a, const _Tp& __b) + { + + return __builtin_memcmp(&__a, &__b, sizeof(_Tp)) == 0; + } + + struct __waiter_pool_base + { + + + + static constexpr auto _S_align = 64; + + + alignas(_S_align) __platform_wait_t _M_wait = 0; + + + mutex _M_mtx; + + + alignas(_S_align) __platform_wait_t _M_ver = 0; + + + __condvar _M_cv; + + __waiter_pool_base() = default; + + void + _M_enter_wait() noexcept + { __atomic_fetch_add(&_M_wait, 1, 4); } + + void + _M_leave_wait() noexcept + { __atomic_fetch_sub(&_M_wait, 1, 4); } + + bool + _M_waiting() const noexcept + { + __platform_wait_t __res; + __atomic_load(&_M_wait, &__res, 2); + return __res > 0; + } + + void + _M_notify(const __platform_wait_t* __addr, bool __all, bool __bare) noexcept + { + if (!(__bare || _M_waiting())) + return; + + + + + if (__all) + _M_cv.notify_all(); + else + _M_cv.notify_one(); + + } + + static __waiter_pool_base& + _S_for(const void* __addr) noexcept + { + constexpr uintptr_t __ct = 16; + static __waiter_pool_base __w[__ct]; + auto __key = (uintptr_t(__addr) >> 2) % __ct; + return __w[__key]; + } + }; + + struct __waiter_pool : __waiter_pool_base + { + void + _M_do_wait(const __platform_wait_t* __addr, __platform_wait_t __old) noexcept + { + + + + __platform_wait_t __val; + __atomic_load(__addr, &__val, 0); + if (__val == __old) + { + lock_guard __l(_M_mtx); + _M_cv.wait(_M_mtx); + } + + } + }; + + template + struct __waiter_base + { + using __waiter_type = _Tp; + + __waiter_type& _M_w; + __platform_wait_t* _M_addr; + + template + static __platform_wait_t* + _S_wait_addr(const _Up* __a, __platform_wait_t* __b) + { + if constexpr (__platform_wait_uses_type<_Up>) + return reinterpret_cast<__platform_wait_t*>(const_cast<_Up*>(__a)); + else + return __b; + } + + static __waiter_type& + _S_for(const void* __addr) noexcept + { + static_assert(sizeof(__waiter_type) == sizeof(__waiter_pool_base)); + auto& res = __waiter_pool_base::_S_for(__addr); + return reinterpret_cast<__waiter_type&>(res); + } + + template + explicit __waiter_base(const _Up* __addr) noexcept + : _M_w(_S_for(__addr)) + , _M_addr(_S_wait_addr(__addr, &_M_w._M_ver)) + { } + + bool + _M_laundered() const + { return _M_addr == &_M_w._M_ver; } + + void + _M_notify(bool __all, bool __bare = false) + { + if (_M_laundered()) + { + __atomic_fetch_add(_M_addr, 1, 4); + __all = true; + } + _M_w._M_notify(_M_addr, __all, __bare); + } + + template + static bool + _S_do_spin_v(__platform_wait_t* __addr, + const _Up& __old, _ValFn __vfn, + __platform_wait_t& __val, + _Spin __spin = _Spin{ }) + { + auto const __pred = [=] + { return !__detail::__atomic_compare(__old, __vfn()); }; + + if constexpr (__platform_wait_uses_type<_Up>) + { + __val == __old; + } + else + { + __atomic_load(__addr, &__val, 0); + } + return __atomic_spin(__pred, __spin); + } + + template + bool + _M_do_spin_v(const _Up& __old, _ValFn __vfn, + __platform_wait_t& __val, + _Spin __spin = _Spin{ }) + { return _S_do_spin_v(_M_addr, __old, __vfn, __val, __spin); } + + template + static bool + _S_do_spin(const __platform_wait_t* __addr, + _Pred __pred, + __platform_wait_t& __val, + _Spin __spin = _Spin{ }) + { + __atomic_load(__addr, &__val, 0); + return __atomic_spin(__pred, __spin); + } + + template + bool + _M_do_spin(_Pred __pred, __platform_wait_t& __val, + _Spin __spin = _Spin{ }) + { return _S_do_spin(_M_addr, __pred, __val, __spin); } + }; + + template + struct __waiter : __waiter_base<__waiter_pool> + { + using __base_type = __waiter_base<__waiter_pool>; + + template + explicit __waiter(const _Tp* __addr) noexcept + : __base_type(__addr) + { + if constexpr (_EntersWait::value) + _M_w._M_enter_wait(); + } + + ~__waiter() + { + if constexpr (_EntersWait::value) + _M_w._M_leave_wait(); + } + + template + void + _M_do_wait_v(_Tp __old, _ValFn __vfn) + { + __platform_wait_t __val; + if (__base_type::_M_do_spin_v(__old, __vfn, __val)) + return; + + do + { + __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val); + } + while (__detail::__atomic_compare(__old, __vfn())); + } + + template + void + _M_do_wait(_Pred __pred) noexcept + { + do + { + __platform_wait_t __val; + if (__base_type::_M_do_spin(__pred, __val)) + return; + __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val); + } + while (!__pred()); + } + }; + + using __enters_wait = __waiter; + using __bare_wait = __waiter; + } + + template + void + __atomic_wait_address_v(const _Tp* __addr, _Tp __old, + _ValFn __vfn) noexcept + { + __detail::__enters_wait __w(__addr); + __w._M_do_wait_v(__old, __vfn); + } + + template + void + __atomic_wait_address(const _Tp* __addr, _Pred __pred) noexcept + { + __detail::__enters_wait __w(__addr); + __w._M_do_wait(__pred); + } + + + template + void + __atomic_wait_address_bare(const __detail::__platform_wait_t* __addr, + _Pred __pred) noexcept + { +# 457 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_wait.h" 3 + __detail::__bare_wait __w(__addr); + __w._M_do_wait(__pred); + + } + + template + void + __atomic_notify_address(const _Tp* __addr, bool __all) noexcept + { + __detail::__bare_wait __w(__addr); + __w._M_notify(__all); + } + + + inline void + __atomic_notify_address_bare(const __detail::__platform_wait_t* __addr, + bool __all) noexcept + { + + + + __detail::__bare_wait __w(__addr); + __w._M_notify(__all, true); + + } + +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 2 3 + + + + + + +namespace std +{ + +# 61 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 3 + enum class memory_order : int + { + relaxed, + consume, + acquire, + release, + acq_rel, + seq_cst + }; + + inline constexpr memory_order memory_order_relaxed = memory_order::relaxed; + inline constexpr memory_order memory_order_consume = memory_order::consume; + inline constexpr memory_order memory_order_acquire = memory_order::acquire; + inline constexpr memory_order memory_order_release = memory_order::release; + inline constexpr memory_order memory_order_acq_rel = memory_order::acq_rel; + inline constexpr memory_order memory_order_seq_cst = memory_order::seq_cst; +# 89 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 3 + enum __memory_order_modifier + { + __memory_order_mask = 0x0ffff, + __memory_order_modifier_mask = 0xffff0000, + __memory_order_hle_acquire = 0x10000, + __memory_order_hle_release = 0x20000 + }; + + constexpr memory_order + operator|(memory_order __m, __memory_order_modifier __mod) + { + return memory_order(int(__m) | int(__mod)); + } + + constexpr memory_order + operator&(memory_order __m, __memory_order_modifier __mod) + { + return memory_order(int(__m) & int(__mod)); + } + + + constexpr memory_order + __cmpexch_failure_order2(memory_order __m) noexcept + { + return __m == memory_order_acq_rel ? memory_order_acquire + : __m == memory_order_release ? memory_order_relaxed : __m; + } + + constexpr memory_order + __cmpexch_failure_order(memory_order __m) noexcept + { + return memory_order(__cmpexch_failure_order2(__m & __memory_order_mask) + | __memory_order_modifier(__m & __memory_order_modifier_mask)); + } + + inline __attribute__((__always_inline__)) void + atomic_thread_fence(memory_order __m) noexcept + { __atomic_thread_fence(int(__m)); } + + inline __attribute__((__always_inline__)) void + atomic_signal_fence(memory_order __m) noexcept + { __atomic_signal_fence(int(__m)); } + + + template + inline _Tp + kill_dependency(_Tp __y) noexcept + { + _Tp __ret(__y); + return __ret; + } + + + template + struct __atomic_base; +# 154 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 3 + template + struct atomic; + + template + struct atomic<_Tp*>; + + + + typedef bool __atomic_flag_data_type; +# 177 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 3 + extern "C" { + + struct __atomic_flag_base + { + __atomic_flag_data_type _M_i = {}; + }; + + } + + + + + struct atomic_flag : public __atomic_flag_base + { + atomic_flag() noexcept = default; + ~atomic_flag() noexcept = default; + atomic_flag(const atomic_flag&) = delete; + atomic_flag& operator=(const atomic_flag&) = delete; + atomic_flag& operator=(const atomic_flag&) volatile = delete; + + + constexpr atomic_flag(bool __i) noexcept + : __atomic_flag_base{ _S_init(__i) } + { } + + inline __attribute__((__always_inline__)) bool + test_and_set(memory_order __m = memory_order_seq_cst) noexcept + { + return __atomic_test_and_set (&_M_i, int(__m)); + } + + inline __attribute__((__always_inline__)) bool + test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept + { + return __atomic_test_and_set (&_M_i, int(__m)); + } + + + + + inline __attribute__((__always_inline__)) bool + test(memory_order __m = memory_order_seq_cst) const noexcept + { + __atomic_flag_data_type __v; + __atomic_load(&_M_i, &__v, int(__m)); + return __v == 1; + } + + inline __attribute__((__always_inline__)) bool + test(memory_order __m = memory_order_seq_cst) const volatile noexcept + { + __atomic_flag_data_type __v; + __atomic_load(&_M_i, &__v, int(__m)); + return __v == 1; + } + + + inline __attribute__((__always_inline__)) void + wait(bool __old, + memory_order __m = memory_order_seq_cst) const noexcept + { + const __atomic_flag_data_type __v + = __old ? 1 : 0; + + std::__atomic_wait_address_v(&_M_i, __v, + [__m, this] { return __atomic_load_n(&_M_i, int(__m)); }); + } + + + + inline __attribute__((__always_inline__)) void + notify_one() const noexcept + { std::__atomic_notify_address(&_M_i, false); } + + + + inline __attribute__((__always_inline__)) void + notify_all() const noexcept + { std::__atomic_notify_address(&_M_i, true); } + + + + + + inline __attribute__((__always_inline__)) void + clear(memory_order __m = memory_order_seq_cst) noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + + __atomic_clear (&_M_i, int(__m)); + } + + inline __attribute__((__always_inline__)) void + clear(memory_order __m = memory_order_seq_cst) volatile noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + + __atomic_clear (&_M_i, int(__m)); + } + + private: + static constexpr __atomic_flag_data_type + _S_init(bool __i) + { return __i ? 1 : 0; } + }; +# 316 "D:/compilers/msys64/mingw64/include/c++/11.2.0/bits/atomic_base.h" 3 + template + struct __atomic_base + { + using value_type = _ITp; + using difference_type = value_type; + + private: + typedef _ITp __int_type; + + static constexpr int _S_alignment = + sizeof(_ITp) > alignof(_ITp) ? sizeof(_ITp) : alignof(_ITp); + + alignas(_S_alignment) __int_type _M_i = 0; + + public: + __atomic_base() noexcept = default; + ~__atomic_base() noexcept = default; + __atomic_base(const __atomic_base&) = delete; + __atomic_base& operator=(const __atomic_base&) = delete; + __atomic_base& operator=(const __atomic_base&) volatile = delete; + + + constexpr __atomic_base(__int_type __i) noexcept : _M_i (__i) { } + + operator __int_type() const noexcept + { return load(); } + + operator __int_type() const volatile noexcept + { return load(); } + + __int_type + operator=(__int_type __i) noexcept + { + store(__i); + return __i; + } + + __int_type + operator=(__int_type __i) volatile noexcept + { + store(__i); + return __i; + } + + __int_type + operator++(int) noexcept + { return fetch_add(1); } + + __int_type + operator++(int) volatile noexcept + { return fetch_add(1); } + + __int_type + operator--(int) noexcept + { return fetch_sub(1); } + + __int_type + operator--(int) volatile noexcept + { return fetch_sub(1); } + + __int_type + operator++() noexcept + { return __atomic_add_fetch(&_M_i, 1, int(memory_order_seq_cst)); } + + __int_type + operator++() volatile noexcept + { return __atomic_add_fetch(&_M_i, 1, int(memory_order_seq_cst)); } + + __int_type + operator--() noexcept + { return __atomic_sub_fetch(&_M_i, 1, int(memory_order_seq_cst)); } + + __int_type + operator--() volatile noexcept + { return __atomic_sub_fetch(&_M_i, 1, int(memory_order_seq_cst)); } + + __int_type + operator+=(__int_type __i) noexcept + { return __atomic_add_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator+=(__int_type __i) volatile noexcept + { return __atomic_add_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator-=(__int_type __i) noexcept + { return __atomic_sub_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator-=(__int_type __i) volatile noexcept + { return __atomic_sub_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator&=(__int_type __i) noexcept + { return __atomic_and_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator&=(__int_type __i) volatile noexcept + { return __atomic_and_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator|=(__int_type __i) noexcept + { return __atomic_or_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator|=(__int_type __i) volatile noexcept + { return __atomic_or_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator^=(__int_type __i) noexcept + { return __atomic_xor_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + __int_type + operator^=(__int_type __i) volatile noexcept + { return __atomic_xor_fetch(&_M_i, __i, int(memory_order_seq_cst)); } + + bool + is_lock_free() const noexcept + { + + return __atomic_is_lock_free(sizeof(_M_i), + reinterpret_cast(-_S_alignment)); + } + + bool + is_lock_free() const volatile noexcept + { + + return __atomic_is_lock_free(sizeof(_M_i), + reinterpret_cast(-_S_alignment)); + } + + inline __attribute__((__always_inline__)) void + store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); + + __atomic_store_n(&_M_i, __i, int(__m)); + } + + inline __attribute__((__always_inline__)) void + store(__int_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); + + __atomic_store_n(&_M_i, __i, int(__m)); + } + + inline __attribute__((__always_inline__)) __int_type + load(memory_order __m = memory_order_seq_cst) const noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + + return __atomic_load_n(&_M_i, int(__m)); + } + + inline __attribute__((__always_inline__)) __int_type + load(memory_order __m = memory_order_seq_cst) const volatile noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + + return __atomic_load_n(&_M_i, int(__m)); + } + + inline __attribute__((__always_inline__)) __int_type + exchange(__int_type __i, + memory_order __m = memory_order_seq_cst) noexcept + { + return __atomic_exchange_n(&_M_i, __i, int(__m)); + } + + + inline __attribute__((__always_inline__)) __int_type + exchange(__int_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + return __atomic_exchange_n(&_M_i, __i, int(__m)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_weak(__int_type& __i1, __int_type __i2, + memory_order __m1, memory_order __m2) noexcept + { + memory_order __b2 __attribute__ ((__unused__)) + = __m2 & __memory_order_mask; + memory_order __b1 __attribute__ ((__unused__)) + = __m1 & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 <= __b1)) __builtin_unreachable(); } while (false); + + return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, + int(__m1), int(__m2)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_weak(__int_type& __i1, __int_type __i2, + memory_order __m1, + memory_order __m2) volatile noexcept + { + memory_order __b2 __attribute__ ((__unused__)) + = __m2 & __memory_order_mask; + memory_order __b1 __attribute__ ((__unused__)) + = __m1 & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 <= __b1)) __builtin_unreachable(); } while (false); + + return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, + int(__m1), int(__m2)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_weak(__int_type& __i1, __int_type __i2, + memory_order __m = memory_order_seq_cst) noexcept + { + return compare_exchange_weak(__i1, __i2, __m, + __cmpexch_failure_order(__m)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_weak(__int_type& __i1, __int_type __i2, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + return compare_exchange_weak(__i1, __i2, __m, + __cmpexch_failure_order(__m)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_strong(__int_type& __i1, __int_type __i2, + memory_order __m1, memory_order __m2) noexcept + { + memory_order __b2 __attribute__ ((__unused__)) + = __m2 & __memory_order_mask; + memory_order __b1 __attribute__ ((__unused__)) + = __m1 & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 <= __b1)) __builtin_unreachable(); } while (false); + + return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, + int(__m1), int(__m2)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_strong(__int_type& __i1, __int_type __i2, + memory_order __m1, + memory_order __m2) volatile noexcept + { + memory_order __b2 __attribute__ ((__unused__)) + = __m2 & __memory_order_mask; + memory_order __b1 __attribute__ ((__unused__)) + = __m1 & __memory_order_mask; + + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 <= __b1)) __builtin_unreachable(); } while (false); + + return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, + int(__m1), int(__m2)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_strong(__int_type& __i1, __int_type __i2, + memory_order __m = memory_order_seq_cst) noexcept + { + return compare_exchange_strong(__i1, __i2, __m, + __cmpexch_failure_order(__m)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_strong(__int_type& __i1, __int_type __i2, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + return compare_exchange_strong(__i1, __i2, __m, + __cmpexch_failure_order(__m)); + } + + + inline __attribute__((__always_inline__)) void + wait(__int_type __old, + memory_order __m = memory_order_seq_cst) const noexcept + { + std::__atomic_wait_address_v(&_M_i, __old, + [__m, this] { return this->load(__m); }); + } + + + + inline __attribute__((__always_inline__)) void + notify_one() const noexcept + { std::__atomic_notify_address(&_M_i, false); } + + + + inline __attribute__((__always_inline__)) void + notify_all() const noexcept + { std::__atomic_notify_address(&_M_i, true); } + + + + + inline __attribute__((__always_inline__)) __int_type + fetch_add(__int_type __i, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_fetch_add(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_add(__int_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_fetch_add(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_sub(__int_type __i, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_fetch_sub(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_sub(__int_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_fetch_sub(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_and(__int_type __i, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_fetch_and(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_and(__int_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_fetch_and(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_or(__int_type __i, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_fetch_or(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_or(__int_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_fetch_or(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_xor(__int_type __i, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_fetch_xor(&_M_i, __i, int(__m)); } + + inline __attribute__((__always_inline__)) __int_type + fetch_xor(__int_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_fetch_xor(&_M_i, __i, int(__m)); } + }; + + + + template + struct __atomic_base<_PTp*> + { + private: + typedef _PTp* __pointer_type; + + __pointer_type _M_p = nullptr; + + + constexpr ptrdiff_t + _M_type_size(ptrdiff_t __d) const { return __d * sizeof(_PTp); } + + constexpr ptrdiff_t + _M_type_size(ptrdiff_t __d) const volatile { return __d * sizeof(_PTp); } + + public: + __atomic_base() noexcept = default; + ~__atomic_base() noexcept = default; + __atomic_base(const __atomic_base&) = delete; + __atomic_base& operator=(const __atomic_base&) = delete; + __atomic_base& operator=(const __atomic_base&) volatile = delete; + + + constexpr __atomic_base(__pointer_type __p) noexcept : _M_p (__p) { } + + operator __pointer_type() const noexcept + { return load(); } + + operator __pointer_type() const volatile noexcept + { return load(); } + + __pointer_type + operator=(__pointer_type __p) noexcept + { + store(__p); + return __p; + } + + __pointer_type + operator=(__pointer_type __p) volatile noexcept + { + store(__p); + return __p; + } + + __pointer_type + operator++(int) noexcept + { return fetch_add(1); } + + __pointer_type + operator++(int) volatile noexcept + { return fetch_add(1); } + + __pointer_type + operator--(int) noexcept + { return fetch_sub(1); } + + __pointer_type + operator--(int) volatile noexcept + { return fetch_sub(1); } + + __pointer_type + operator++() noexcept + { return __atomic_add_fetch(&_M_p, _M_type_size(1), + int(memory_order_seq_cst)); } + + __pointer_type + operator++() volatile noexcept + { return __atomic_add_fetch(&_M_p, _M_type_size(1), + int(memory_order_seq_cst)); } + + __pointer_type + operator--() noexcept + { return __atomic_sub_fetch(&_M_p, _M_type_size(1), + int(memory_order_seq_cst)); } + + __pointer_type + operator--() volatile noexcept + { return __atomic_sub_fetch(&_M_p, _M_type_size(1), + int(memory_order_seq_cst)); } + + __pointer_type + operator+=(ptrdiff_t __d) noexcept + { return __atomic_add_fetch(&_M_p, _M_type_size(__d), + int(memory_order_seq_cst)); } + + __pointer_type + operator+=(ptrdiff_t __d) volatile noexcept + { return __atomic_add_fetch(&_M_p, _M_type_size(__d), + int(memory_order_seq_cst)); } + + __pointer_type + operator-=(ptrdiff_t __d) noexcept + { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), + int(memory_order_seq_cst)); } + + __pointer_type + operator-=(ptrdiff_t __d) volatile noexcept + { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), + int(memory_order_seq_cst)); } + + bool + is_lock_free() const noexcept + { + + return __atomic_is_lock_free(sizeof(_M_p), + reinterpret_cast(-__alignof(_M_p))); + } + + bool + is_lock_free() const volatile noexcept + { + + return __atomic_is_lock_free(sizeof(_M_p), + reinterpret_cast(-__alignof(_M_p))); + } + + inline __attribute__((__always_inline__)) void + store(__pointer_type __p, + memory_order __m = memory_order_seq_cst) noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); + + __atomic_store_n(&_M_p, __p, int(__m)); + } + + inline __attribute__((__always_inline__)) void + store(__pointer_type __p, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acquire)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_consume)) __builtin_unreachable(); } while (false); + + __atomic_store_n(&_M_p, __p, int(__m)); + } + + inline __attribute__((__always_inline__)) __pointer_type + load(memory_order __m = memory_order_seq_cst) const noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + + return __atomic_load_n(&_M_p, int(__m)); + } + + inline __attribute__((__always_inline__)) __pointer_type + load(memory_order __m = memory_order_seq_cst) const volatile noexcept + { + memory_order __b __attribute__ ((__unused__)) + = __m & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + + return __atomic_load_n(&_M_p, int(__m)); + } + + inline __attribute__((__always_inline__)) __pointer_type + exchange(__pointer_type __p, + memory_order __m = memory_order_seq_cst) noexcept + { + return __atomic_exchange_n(&_M_p, __p, int(__m)); + } + + + inline __attribute__((__always_inline__)) __pointer_type + exchange(__pointer_type __p, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + return __atomic_exchange_n(&_M_p, __p, int(__m)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, + memory_order __m1, + memory_order __m2) noexcept + { + memory_order __b2 __attribute__ ((__unused__)) + = __m2 & __memory_order_mask; + memory_order __b1 __attribute__ ((__unused__)) + = __m1 & __memory_order_mask; + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 <= __b1)) __builtin_unreachable(); } while (false); + + return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, + int(__m1), int(__m2)); + } + + inline __attribute__((__always_inline__)) bool + compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, + memory_order __m1, + memory_order __m2) volatile noexcept + { + memory_order __b2 __attribute__ ((__unused__)) + = __m2 & __memory_order_mask; + memory_order __b1 __attribute__ ((__unused__)) + = __m1 & __memory_order_mask; + + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_release)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 != memory_order_acq_rel)) __builtin_unreachable(); } while (false); + do { if (__builtin_is_constant_evaluated() && !bool(__b2 <= __b1)) __builtin_unreachable(); } while (false); + + return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, + int(__m1), int(__m2)); + } + + + inline __attribute__((__always_inline__)) void + wait(__pointer_type __old, + memory_order __m = memory_order_seq_cst) noexcept + { + std::__atomic_wait_address_v(&_M_p, __old, + [__m, this] + { return this->load(__m); }); + } + + + + inline __attribute__((__always_inline__)) void + notify_one() const noexcept + { std::__atomic_notify_address(&_M_p, false); } + + + + inline __attribute__((__always_inline__)) void + notify_all() const noexcept + { std::__atomic_notify_address(&_M_p, true); } + + + + + inline __attribute__((__always_inline__)) __pointer_type + fetch_add(ptrdiff_t __d, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_fetch_add(&_M_p, _M_type_size(__d), int(__m)); } + + inline __attribute__((__always_inline__)) __pointer_type + fetch_add(ptrdiff_t __d, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_fetch_add(&_M_p, _M_type_size(__d), int(__m)); } + + inline __attribute__((__always_inline__)) __pointer_type + fetch_sub(ptrdiff_t __d, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), int(__m)); } + + inline __attribute__((__always_inline__)) __pointer_type + fetch_sub(ptrdiff_t __d, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), int(__m)); } + }; + + + + namespace __atomic_impl + { + + template + using _Val = remove_volatile_t<_Tp>; + + + template + using _Diff = conditional_t, ptrdiff_t, _Val<_Tp>>; + + template + inline __attribute__((__always_inline__)) bool + is_lock_free() noexcept + { + + return __atomic_is_lock_free(_Size, reinterpret_cast(-_Align)); + } + + template + inline __attribute__((__always_inline__)) void + store(_Tp* __ptr, _Val<_Tp> __t, memory_order __m) noexcept + { __atomic_store(__ptr, std::__addressof(__t), int(__m)); } + + template + inline __attribute__((__always_inline__)) _Val<_Tp> + load(const _Tp* __ptr, memory_order __m) noexcept + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + auto* __dest = reinterpret_cast<_Val<_Tp>*>(__buf); + __atomic_load(__ptr, __dest, int(__m)); + return *__dest; + } + + template + inline __attribute__((__always_inline__)) _Val<_Tp> + exchange(_Tp* __ptr, _Val<_Tp> __desired, memory_order __m) noexcept + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + auto* __dest = reinterpret_cast<_Val<_Tp>*>(__buf); + __atomic_exchange(__ptr, std::__addressof(__desired), __dest, int(__m)); + return *__dest; + } + + template + inline __attribute__((__always_inline__)) bool + compare_exchange_weak(_Tp* __ptr, _Val<_Tp>& __expected, + _Val<_Tp> __desired, memory_order __success, + memory_order __failure) noexcept + { + return __atomic_compare_exchange(__ptr, std::__addressof(__expected), + std::__addressof(__desired), true, + int(__success), int(__failure)); + } + + template + inline __attribute__((__always_inline__)) bool + compare_exchange_strong(_Tp* __ptr, _Val<_Tp>& __expected, + _Val<_Tp> __desired, memory_order __success, + memory_order __failure) noexcept + { + return __atomic_compare_exchange(__ptr, std::__addressof(__expected), + std::__addressof(__desired), false, + int(__success), int(__failure)); + } + + + template + inline __attribute__((__always_inline__)) void + wait(const _Tp* __ptr, _Val<_Tp> __old, + memory_order __m = memory_order_seq_cst) noexcept + { + std::__atomic_wait_address_v(__ptr, __old, + [__ptr, __m]() { return __atomic_impl::load(__ptr, __m); }); + } + + + + template + inline __attribute__((__always_inline__)) void + notify_one(const _Tp* __ptr) noexcept + { std::__atomic_notify_address(__ptr, false); } + + + + template + inline __attribute__((__always_inline__)) void + notify_all(const _Tp* __ptr) noexcept + { std::__atomic_notify_address(__ptr, true); } + + + + + template + inline __attribute__((__always_inline__)) _Tp + fetch_add(_Tp* __ptr, _Diff<_Tp> __i, memory_order __m) noexcept + { return __atomic_fetch_add(__ptr, __i, int(__m)); } + + template + inline __attribute__((__always_inline__)) _Tp + fetch_sub(_Tp* __ptr, _Diff<_Tp> __i, memory_order __m) noexcept + { return __atomic_fetch_sub(__ptr, __i, int(__m)); } + + template + inline __attribute__((__always_inline__)) _Tp + fetch_and(_Tp* __ptr, _Val<_Tp> __i, memory_order __m) noexcept + { return __atomic_fetch_and(__ptr, __i, int(__m)); } + + template + inline __attribute__((__always_inline__)) _Tp + fetch_or(_Tp* __ptr, _Val<_Tp> __i, memory_order __m) noexcept + { return __atomic_fetch_or(__ptr, __i, int(__m)); } + + template + inline __attribute__((__always_inline__)) _Tp + fetch_xor(_Tp* __ptr, _Val<_Tp> __i, memory_order __m) noexcept + { return __atomic_fetch_xor(__ptr, __i, int(__m)); } + + template + inline __attribute__((__always_inline__)) _Tp + __add_fetch(_Tp* __ptr, _Diff<_Tp> __i) noexcept + { return __atomic_add_fetch(__ptr, __i, 5); } + + template + inline __attribute__((__always_inline__)) _Tp + __sub_fetch(_Tp* __ptr, _Diff<_Tp> __i) noexcept + { return __atomic_sub_fetch(__ptr, __i, 5); } + + template + inline __attribute__((__always_inline__)) _Tp + __and_fetch(_Tp* __ptr, _Val<_Tp> __i) noexcept + { return __atomic_and_fetch(__ptr, __i, 5); } + + template + inline __attribute__((__always_inline__)) _Tp + __or_fetch(_Tp* __ptr, _Val<_Tp> __i) noexcept + { return __atomic_or_fetch(__ptr, __i, 5); } + + template + inline __attribute__((__always_inline__)) _Tp + __xor_fetch(_Tp* __ptr, _Val<_Tp> __i) noexcept + { return __atomic_xor_fetch(__ptr, __i, 5); } + + template + _Tp + __fetch_add_flt(_Tp* __ptr, _Val<_Tp> __i, memory_order __m) noexcept + { + _Val<_Tp> __oldval = load(__ptr, memory_order_relaxed); + _Val<_Tp> __newval = __oldval + __i; + while (!compare_exchange_weak(__ptr, __oldval, __newval, __m, + memory_order_relaxed)) + __newval = __oldval + __i; + return __oldval; + } + + template + _Tp + __fetch_sub_flt(_Tp* __ptr, _Val<_Tp> __i, memory_order __m) noexcept + { + _Val<_Tp> __oldval = load(__ptr, memory_order_relaxed); + _Val<_Tp> __newval = __oldval - __i; + while (!compare_exchange_weak(__ptr, __oldval, __newval, __m, + memory_order_relaxed)) + __newval = __oldval - __i; + return __oldval; + } + + template + _Tp + __add_fetch_flt(_Tp* __ptr, _Val<_Tp> __i) noexcept + { + _Val<_Tp> __oldval = load(__ptr, memory_order_relaxed); + _Val<_Tp> __newval = __oldval + __i; + while (!compare_exchange_weak(__ptr, __oldval, __newval, + memory_order_seq_cst, + memory_order_relaxed)) + __newval = __oldval + __i; + return __newval; + } + + template + _Tp + __sub_fetch_flt(_Tp* __ptr, _Val<_Tp> __i) noexcept + { + _Val<_Tp> __oldval = load(__ptr, memory_order_relaxed); + _Val<_Tp> __newval = __oldval - __i; + while (!compare_exchange_weak(__ptr, __oldval, __newval, + memory_order_seq_cst, + memory_order_relaxed)) + __newval = __oldval - __i; + return __newval; + } + } + + + template + struct __atomic_float + { + static_assert(is_floating_point_v<_Fp>); + + static constexpr size_t _S_alignment = __alignof__(_Fp); + + public: + using value_type = _Fp; + using difference_type = value_type; + + static constexpr bool is_always_lock_free + = __atomic_always_lock_free(sizeof(_Fp), 0); + + __atomic_float() = default; + + constexpr + __atomic_float(_Fp __t) : _M_fp(__t) + { } + + __atomic_float(const __atomic_float&) = delete; + __atomic_float& operator=(const __atomic_float&) = delete; + __atomic_float& operator=(const __atomic_float&) volatile = delete; + + _Fp + operator=(_Fp __t) volatile noexcept + { + this->store(__t); + return __t; + } + + _Fp + operator=(_Fp __t) noexcept + { + this->store(__t); + return __t; + } + + bool + is_lock_free() const volatile noexcept + { return __atomic_impl::is_lock_free(); } + + bool + is_lock_free() const noexcept + { return __atomic_impl::is_lock_free(); } + + void + store(_Fp __t, memory_order __m = memory_order_seq_cst) volatile noexcept + { __atomic_impl::store(&_M_fp, __t, __m); } + + void + store(_Fp __t, memory_order __m = memory_order_seq_cst) noexcept + { __atomic_impl::store(&_M_fp, __t, __m); } + + _Fp + load(memory_order __m = memory_order_seq_cst) const volatile noexcept + { return __atomic_impl::load(&_M_fp, __m); } + + _Fp + load(memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::load(&_M_fp, __m); } + + operator _Fp() const volatile noexcept { return this->load(); } + operator _Fp() const noexcept { return this->load(); } + + _Fp + exchange(_Fp __desired, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_impl::exchange(&_M_fp, __desired, __m); } + + _Fp + exchange(_Fp __desired, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_impl::exchange(&_M_fp, __desired, __m); } + + bool + compare_exchange_weak(_Fp& __expected, _Fp __desired, + memory_order __success, + memory_order __failure) noexcept + { + return __atomic_impl::compare_exchange_weak(&_M_fp, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_weak(_Fp& __expected, _Fp __desired, + memory_order __success, + memory_order __failure) volatile noexcept + { + return __atomic_impl::compare_exchange_weak(&_M_fp, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_strong(_Fp& __expected, _Fp __desired, + memory_order __success, + memory_order __failure) noexcept + { + return __atomic_impl::compare_exchange_strong(&_M_fp, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_strong(_Fp& __expected, _Fp __desired, + memory_order __success, + memory_order __failure) volatile noexcept + { + return __atomic_impl::compare_exchange_strong(&_M_fp, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_weak(_Fp& __expected, _Fp __desired, + memory_order __order = memory_order_seq_cst) + noexcept + { + return compare_exchange_weak(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + bool + compare_exchange_weak(_Fp& __expected, _Fp __desired, + memory_order __order = memory_order_seq_cst) + volatile noexcept + { + return compare_exchange_weak(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + bool + compare_exchange_strong(_Fp& __expected, _Fp __desired, + memory_order __order = memory_order_seq_cst) + noexcept + { + return compare_exchange_strong(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + bool + compare_exchange_strong(_Fp& __expected, _Fp __desired, + memory_order __order = memory_order_seq_cst) + volatile noexcept + { + return compare_exchange_strong(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + + inline __attribute__((__always_inline__)) void + wait(_Fp __old, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::wait(&_M_fp, __old, __m); } + + + + inline __attribute__((__always_inline__)) void + notify_one() const noexcept + { __atomic_impl::notify_one(&_M_fp); } + + + + inline __attribute__((__always_inline__)) void + notify_all() const noexcept + { __atomic_impl::notify_all(&_M_fp); } + + + + + value_type + fetch_add(value_type __i, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_impl::__fetch_add_flt(&_M_fp, __i, __m); } + + value_type + fetch_add(value_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_impl::__fetch_add_flt(&_M_fp, __i, __m); } + + value_type + fetch_sub(value_type __i, + memory_order __m = memory_order_seq_cst) noexcept + { return __atomic_impl::__fetch_sub_flt(&_M_fp, __i, __m); } + + value_type + fetch_sub(value_type __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return __atomic_impl::__fetch_sub_flt(&_M_fp, __i, __m); } + + value_type + operator+=(value_type __i) noexcept + { return __atomic_impl::__add_fetch_flt(&_M_fp, __i); } + + value_type + operator+=(value_type __i) volatile noexcept + { return __atomic_impl::__add_fetch_flt(&_M_fp, __i); } + + value_type + operator-=(value_type __i) noexcept + { return __atomic_impl::__sub_fetch_flt(&_M_fp, __i); } + + value_type + operator-=(value_type __i) volatile noexcept + { return __atomic_impl::__sub_fetch_flt(&_M_fp, __i); } + + private: + alignas(_S_alignment) _Fp _M_fp = 0; + }; + + + template, bool = is_floating_point_v<_Tp>> + struct __atomic_ref; + + + template + struct __atomic_ref<_Tp, false, false> + { + static_assert(is_trivially_copyable_v<_Tp>); + + + static constexpr int _S_min_alignment + = (sizeof(_Tp) & (sizeof(_Tp) - 1)) || sizeof(_Tp) > 16 + ? 0 : sizeof(_Tp); + + public: + using value_type = _Tp; + + static constexpr bool is_always_lock_free + = __atomic_always_lock_free(sizeof(_Tp), 0); + + static constexpr size_t required_alignment + = _S_min_alignment > alignof(_Tp) ? _S_min_alignment : alignof(_Tp); + + __atomic_ref& operator=(const __atomic_ref&) = delete; + + explicit + __atomic_ref(_Tp& __t) : _M_ptr(std::__addressof(__t)) + { do { if (__builtin_is_constant_evaluated() && !bool(((uintptr_t)_M_ptr % required_alignment) == 0)) __builtin_unreachable(); } while (false); } + + __atomic_ref(const __atomic_ref&) noexcept = default; + + _Tp + operator=(_Tp __t) const noexcept + { + this->store(__t); + return __t; + } + + operator _Tp() const noexcept { return this->load(); } + + bool + is_lock_free() const noexcept + { return __atomic_impl::is_lock_free(); } + + void + store(_Tp __t, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::store(_M_ptr, __t, __m); } + + _Tp + load(memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::load(_M_ptr, __m); } + + _Tp + exchange(_Tp __desired, memory_order __m = memory_order_seq_cst) + const noexcept + { return __atomic_impl::exchange(_M_ptr, __desired, __m); } + + bool + compare_exchange_weak(_Tp& __expected, _Tp __desired, + memory_order __success, + memory_order __failure) const noexcept + { + return __atomic_impl::compare_exchange_weak(_M_ptr, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_strong(_Tp& __expected, _Tp __desired, + memory_order __success, + memory_order __failure) const noexcept + { + return __atomic_impl::compare_exchange_strong(_M_ptr, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_weak(_Tp& __expected, _Tp __desired, + memory_order __order = memory_order_seq_cst) + const noexcept + { + return compare_exchange_weak(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + bool + compare_exchange_strong(_Tp& __expected, _Tp __desired, + memory_order __order = memory_order_seq_cst) + const noexcept + { + return compare_exchange_strong(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + + inline __attribute__((__always_inline__)) void + wait(_Tp __old, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::wait(_M_ptr, __old, __m); } + + + + inline __attribute__((__always_inline__)) void + notify_one() const noexcept + { __atomic_impl::notify_one(_M_ptr); } + + + + inline __attribute__((__always_inline__)) void + notify_all() const noexcept + { __atomic_impl::notify_all(_M_ptr); } + + + + + private: + _Tp* _M_ptr; + }; + + + template + struct __atomic_ref<_Tp, true, false> + { + static_assert(is_integral_v<_Tp>); + + public: + using value_type = _Tp; + using difference_type = value_type; + + static constexpr bool is_always_lock_free + = __atomic_always_lock_free(sizeof(_Tp), 0); + + static constexpr size_t required_alignment + = sizeof(_Tp) > alignof(_Tp) ? sizeof(_Tp) : alignof(_Tp); + + __atomic_ref() = delete; + __atomic_ref& operator=(const __atomic_ref&) = delete; + + explicit + __atomic_ref(_Tp& __t) : _M_ptr(&__t) + { do { if (__builtin_is_constant_evaluated() && !bool(((uintptr_t)_M_ptr % required_alignment) == 0)) __builtin_unreachable(); } while (false); } + + __atomic_ref(const __atomic_ref&) noexcept = default; + + _Tp + operator=(_Tp __t) const noexcept + { + this->store(__t); + return __t; + } + + operator _Tp() const noexcept { return this->load(); } + + bool + is_lock_free() const noexcept + { + return __atomic_impl::is_lock_free(); + } + + void + store(_Tp __t, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::store(_M_ptr, __t, __m); } + + _Tp + load(memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::load(_M_ptr, __m); } + + _Tp + exchange(_Tp __desired, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::exchange(_M_ptr, __desired, __m); } + + bool + compare_exchange_weak(_Tp& __expected, _Tp __desired, + memory_order __success, + memory_order __failure) const noexcept + { + return __atomic_impl::compare_exchange_weak(_M_ptr, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_strong(_Tp& __expected, _Tp __desired, + memory_order __success, + memory_order __failure) const noexcept + { + return __atomic_impl::compare_exchange_strong(_M_ptr, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_weak(_Tp& __expected, _Tp __desired, + memory_order __order = memory_order_seq_cst) + const noexcept + { + return compare_exchange_weak(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + bool + compare_exchange_strong(_Tp& __expected, _Tp __desired, + memory_order __order = memory_order_seq_cst) + const noexcept + { + return compare_exchange_strong(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + + inline __attribute__((__always_inline__)) void + wait(_Tp __old, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::wait(_M_ptr, __old, __m); } + + + + inline __attribute__((__always_inline__)) void + notify_one() const noexcept + { __atomic_impl::notify_one(_M_ptr); } + + + + inline __attribute__((__always_inline__)) void + notify_all() const noexcept + { __atomic_impl::notify_all(_M_ptr); } + + + + + value_type + fetch_add(value_type __i, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::fetch_add(_M_ptr, __i, __m); } + + value_type + fetch_sub(value_type __i, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::fetch_sub(_M_ptr, __i, __m); } + + value_type + fetch_and(value_type __i, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::fetch_and(_M_ptr, __i, __m); } + + value_type + fetch_or(value_type __i, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::fetch_or(_M_ptr, __i, __m); } + + value_type + fetch_xor(value_type __i, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::fetch_xor(_M_ptr, __i, __m); } + + inline __attribute__((__always_inline__)) value_type + operator++(int) const noexcept + { return fetch_add(1); } + + inline __attribute__((__always_inline__)) value_type + operator--(int) const noexcept + { return fetch_sub(1); } + + value_type + operator++() const noexcept + { return __atomic_impl::__add_fetch(_M_ptr, value_type(1)); } + + value_type + operator--() const noexcept + { return __atomic_impl::__sub_fetch(_M_ptr, value_type(1)); } + + value_type + operator+=(value_type __i) const noexcept + { return __atomic_impl::__add_fetch(_M_ptr, __i); } + + value_type + operator-=(value_type __i) const noexcept + { return __atomic_impl::__sub_fetch(_M_ptr, __i); } + + value_type + operator&=(value_type __i) const noexcept + { return __atomic_impl::__and_fetch(_M_ptr, __i); } + + value_type + operator|=(value_type __i) const noexcept + { return __atomic_impl::__or_fetch(_M_ptr, __i); } + + value_type + operator^=(value_type __i) const noexcept + { return __atomic_impl::__xor_fetch(_M_ptr, __i); } + + private: + _Tp* _M_ptr; + }; + + + template + struct __atomic_ref<_Fp, false, true> + { + static_assert(is_floating_point_v<_Fp>); + + public: + using value_type = _Fp; + using difference_type = value_type; + + static constexpr bool is_always_lock_free + = __atomic_always_lock_free(sizeof(_Fp), 0); + + static constexpr size_t required_alignment = __alignof__(_Fp); + + __atomic_ref() = delete; + __atomic_ref& operator=(const __atomic_ref&) = delete; + + explicit + __atomic_ref(_Fp& __t) : _M_ptr(&__t) + { do { if (__builtin_is_constant_evaluated() && !bool(((uintptr_t)_M_ptr % required_alignment) == 0)) __builtin_unreachable(); } while (false); } + + __atomic_ref(const __atomic_ref&) noexcept = default; + + _Fp + operator=(_Fp __t) const noexcept + { + this->store(__t); + return __t; + } + + operator _Fp() const noexcept { return this->load(); } + + bool + is_lock_free() const noexcept + { + return __atomic_impl::is_lock_free(); + } + + void + store(_Fp __t, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::store(_M_ptr, __t, __m); } + + _Fp + load(memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::load(_M_ptr, __m); } + + _Fp + exchange(_Fp __desired, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::exchange(_M_ptr, __desired, __m); } + + bool + compare_exchange_weak(_Fp& __expected, _Fp __desired, + memory_order __success, + memory_order __failure) const noexcept + { + return __atomic_impl::compare_exchange_weak(_M_ptr, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_strong(_Fp& __expected, _Fp __desired, + memory_order __success, + memory_order __failure) const noexcept + { + return __atomic_impl::compare_exchange_strong(_M_ptr, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_weak(_Fp& __expected, _Fp __desired, + memory_order __order = memory_order_seq_cst) + const noexcept + { + return compare_exchange_weak(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + bool + compare_exchange_strong(_Fp& __expected, _Fp __desired, + memory_order __order = memory_order_seq_cst) + const noexcept + { + return compare_exchange_strong(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + + inline __attribute__((__always_inline__)) void + wait(_Fp __old, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::wait(_M_ptr, __old, __m); } + + + + inline __attribute__((__always_inline__)) void + notify_one() const noexcept + { __atomic_impl::notify_one(_M_ptr); } + + + + inline __attribute__((__always_inline__)) void + notify_all() const noexcept + { __atomic_impl::notify_all(_M_ptr); } + + + + + value_type + fetch_add(value_type __i, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::__fetch_add_flt(_M_ptr, __i, __m); } + + value_type + fetch_sub(value_type __i, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::__fetch_sub_flt(_M_ptr, __i, __m); } + + value_type + operator+=(value_type __i) const noexcept + { return __atomic_impl::__add_fetch_flt(_M_ptr, __i); } + + value_type + operator-=(value_type __i) const noexcept + { return __atomic_impl::__sub_fetch_flt(_M_ptr, __i); } + + private: + _Fp* _M_ptr; + }; + + + template + struct __atomic_ref<_Tp*, false, false> + { + public: + using value_type = _Tp*; + using difference_type = ptrdiff_t; + + static constexpr bool is_always_lock_free = 2 == 2; + + static constexpr size_t required_alignment = __alignof__(_Tp*); + + __atomic_ref() = delete; + __atomic_ref& operator=(const __atomic_ref&) = delete; + + explicit + __atomic_ref(_Tp*& __t) : _M_ptr(std::__addressof(__t)) + { do { if (__builtin_is_constant_evaluated() && !bool(((uintptr_t)_M_ptr % required_alignment) == 0)) __builtin_unreachable(); } while (false); } + + __atomic_ref(const __atomic_ref&) noexcept = default; + + _Tp* + operator=(_Tp* __t) const noexcept + { + this->store(__t); + return __t; + } + + operator _Tp*() const noexcept { return this->load(); } + + bool + is_lock_free() const noexcept + { + return __atomic_impl::is_lock_free(); + } + + void + store(_Tp* __t, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::store(_M_ptr, __t, __m); } + + _Tp* + load(memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::load(_M_ptr, __m); } + + _Tp* + exchange(_Tp* __desired, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::exchange(_M_ptr, __desired, __m); } + + bool + compare_exchange_weak(_Tp*& __expected, _Tp* __desired, + memory_order __success, + memory_order __failure) const noexcept + { + return __atomic_impl::compare_exchange_weak(_M_ptr, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_strong(_Tp*& __expected, _Tp* __desired, + memory_order __success, + memory_order __failure) const noexcept + { + return __atomic_impl::compare_exchange_strong(_M_ptr, + __expected, __desired, + __success, __failure); + } + + bool + compare_exchange_weak(_Tp*& __expected, _Tp* __desired, + memory_order __order = memory_order_seq_cst) + const noexcept + { + return compare_exchange_weak(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + bool + compare_exchange_strong(_Tp*& __expected, _Tp* __desired, + memory_order __order = memory_order_seq_cst) + const noexcept + { + return compare_exchange_strong(__expected, __desired, __order, + __cmpexch_failure_order(__order)); + } + + + inline __attribute__((__always_inline__)) void + wait(_Tp* __old, memory_order __m = memory_order_seq_cst) const noexcept + { __atomic_impl::wait(_M_ptr, __old, __m); } + + + + inline __attribute__((__always_inline__)) void + notify_one() const noexcept + { __atomic_impl::notify_one(_M_ptr); } + + + + inline __attribute__((__always_inline__)) void + notify_all() const noexcept + { __atomic_impl::notify_all(_M_ptr); } + + + + + inline __attribute__((__always_inline__)) value_type + fetch_add(difference_type __d, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::fetch_add(_M_ptr, _S_type_size(__d), __m); } + + inline __attribute__((__always_inline__)) value_type + fetch_sub(difference_type __d, + memory_order __m = memory_order_seq_cst) const noexcept + { return __atomic_impl::fetch_sub(_M_ptr, _S_type_size(__d), __m); } + + value_type + operator++(int) const noexcept + { return fetch_add(1); } + + value_type + operator--(int) const noexcept + { return fetch_sub(1); } + + value_type + operator++() const noexcept + { + return __atomic_impl::__add_fetch(_M_ptr, _S_type_size(1)); + } + + value_type + operator--() const noexcept + { + return __atomic_impl::__sub_fetch(_M_ptr, _S_type_size(1)); + } + + value_type + operator+=(difference_type __d) const noexcept + { + return __atomic_impl::__add_fetch(_M_ptr, _S_type_size(__d)); + } + + value_type + operator-=(difference_type __d) const noexcept + { + return __atomic_impl::__sub_fetch(_M_ptr, _S_type_size(__d)); + } + + private: + static constexpr ptrdiff_t + _S_type_size(ptrdiff_t __d) noexcept + { + static_assert(is_object_v<_Tp>); + return __d * sizeof(_Tp); + } + + _Tp** _M_ptr; + }; + + + + + + +} +# 42 "D:/compilers/msys64/mingw64/include/c++/11.2.0/atomic" 2 3 + +namespace std +{ + +# 56 "D:/compilers/msys64/mingw64/include/c++/11.2.0/atomic" 3 + template + struct atomic; + + + + template<> + struct atomic + { + using value_type = bool; + + private: + __atomic_base _M_base; + + public: + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(bool __i) noexcept : _M_base(__i) { } + + bool + operator=(bool __i) noexcept + { return _M_base.operator=(__i); } + + bool + operator=(bool __i) volatile noexcept + { return _M_base.operator=(__i); } + + operator bool() const noexcept + { return _M_base.load(); } + + operator bool() const volatile noexcept + { return _M_base.load(); } + + bool + is_lock_free() const noexcept { return _M_base.is_lock_free(); } + + bool + is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } + + + static constexpr bool is_always_lock_free = 2 == 2; + + + void + store(bool __i, memory_order __m = memory_order_seq_cst) noexcept + { _M_base.store(__i, __m); } + + void + store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept + { _M_base.store(__i, __m); } + + bool + load(memory_order __m = memory_order_seq_cst) const noexcept + { return _M_base.load(__m); } + + bool + load(memory_order __m = memory_order_seq_cst) const volatile noexcept + { return _M_base.load(__m); } + + bool + exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept + { return _M_base.exchange(__i, __m); } + + bool + exchange(bool __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return _M_base.exchange(__i, __m); } + + bool + compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, + memory_order __m2) noexcept + { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } + + bool + compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, + memory_order __m2) volatile noexcept + { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } + + bool + compare_exchange_weak(bool& __i1, bool __i2, + memory_order __m = memory_order_seq_cst) noexcept + { return _M_base.compare_exchange_weak(__i1, __i2, __m); } + + bool + compare_exchange_weak(bool& __i1, bool __i2, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return _M_base.compare_exchange_weak(__i1, __i2, __m); } + + bool + compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, + memory_order __m2) noexcept + { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } + + bool + compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, + memory_order __m2) volatile noexcept + { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } + + bool + compare_exchange_strong(bool& __i1, bool __i2, + memory_order __m = memory_order_seq_cst) noexcept + { return _M_base.compare_exchange_strong(__i1, __i2, __m); } + + bool + compare_exchange_strong(bool& __i1, bool __i2, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return _M_base.compare_exchange_strong(__i1, __i2, __m); } + + + void + wait(bool __old, memory_order __m = memory_order_seq_cst) const noexcept + { _M_base.wait(__old, __m); } + + + + void + notify_one() const noexcept + { _M_base.notify_one(); } + + void + notify_all() const noexcept + { _M_base.notify_all(); } + + }; +# 195 "D:/compilers/msys64/mingw64/include/c++/11.2.0/atomic" 3 + template + struct atomic + { + using value_type = _Tp; + + private: + + static constexpr int _S_min_alignment + = (sizeof(_Tp) & (sizeof(_Tp) - 1)) || sizeof(_Tp) > 16 + ? 0 : sizeof(_Tp); + + static constexpr int _S_alignment + = _S_min_alignment > alignof(_Tp) ? _S_min_alignment : alignof(_Tp); + + alignas(_S_alignment) _Tp _M_i = _Tp(); + + static_assert(__is_trivially_copyable(_Tp), + "std::atomic requires a trivially copyable type"); + + static_assert(sizeof(_Tp) > 0, + "Incomplete or zero-sized types are not supported"); + + + static_assert(is_copy_constructible_v<_Tp>); + static_assert(is_move_constructible_v<_Tp>); + static_assert(is_copy_assignable_v<_Tp>); + static_assert(is_move_assignable_v<_Tp>); + + + public: + atomic() = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(_Tp __i) noexcept : _M_i(__i) { } + + operator _Tp() const noexcept + { return load(); } + + operator _Tp() const volatile noexcept + { return load(); } + + _Tp + operator=(_Tp __i) noexcept + { store(__i); return __i; } + + _Tp + operator=(_Tp __i) volatile noexcept + { store(__i); return __i; } + + bool + is_lock_free() const noexcept + { + + return __atomic_is_lock_free(sizeof(_M_i), + reinterpret_cast(-_S_alignment)); + } + + bool + is_lock_free() const volatile noexcept + { + + return __atomic_is_lock_free(sizeof(_M_i), + reinterpret_cast(-_S_alignment)); + } + + + static constexpr bool is_always_lock_free + = __atomic_always_lock_free(sizeof(_M_i), 0); + + + void + store(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept + { + __atomic_store(std::__addressof(_M_i), std::__addressof(__i), int(__m)); + } + + void + store(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept + { + __atomic_store(std::__addressof(_M_i), std::__addressof(__i), int(__m)); + } + + _Tp + load(memory_order __m = memory_order_seq_cst) const noexcept + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); + __atomic_load(std::__addressof(_M_i), __ptr, int(__m)); + return *__ptr; + } + + _Tp + load(memory_order __m = memory_order_seq_cst) const volatile noexcept + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); + __atomic_load(std::__addressof(_M_i), __ptr, int(__m)); + return *__ptr; + } + + _Tp + exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); + __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), + __ptr, int(__m)); + return *__ptr; + } + + _Tp + exchange(_Tp __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; + _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); + __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), + __ptr, int(__m)); + return *__ptr; + } + + bool + compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, + memory_order __f) noexcept + { + return __atomic_compare_exchange(std::__addressof(_M_i), + std::__addressof(__e), + std::__addressof(__i), + true, int(__s), int(__f)); + } + + bool + compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, + memory_order __f) volatile noexcept + { + return __atomic_compare_exchange(std::__addressof(_M_i), + std::__addressof(__e), + std::__addressof(__i), + true, int(__s), int(__f)); + } + + bool + compare_exchange_weak(_Tp& __e, _Tp __i, + memory_order __m = memory_order_seq_cst) noexcept + { return compare_exchange_weak(__e, __i, __m, + __cmpexch_failure_order(__m)); } + + bool + compare_exchange_weak(_Tp& __e, _Tp __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return compare_exchange_weak(__e, __i, __m, + __cmpexch_failure_order(__m)); } + + bool + compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, + memory_order __f) noexcept + { + return __atomic_compare_exchange(std::__addressof(_M_i), + std::__addressof(__e), + std::__addressof(__i), + false, int(__s), int(__f)); + } + + bool + compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, + memory_order __f) volatile noexcept + { + return __atomic_compare_exchange(std::__addressof(_M_i), + std::__addressof(__e), + std::__addressof(__i), + false, int(__s), int(__f)); + } + + bool + compare_exchange_strong(_Tp& __e, _Tp __i, + memory_order __m = memory_order_seq_cst) noexcept + { return compare_exchange_strong(__e, __i, __m, + __cmpexch_failure_order(__m)); } + + bool + compare_exchange_strong(_Tp& __e, _Tp __i, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return compare_exchange_strong(__e, __i, __m, + __cmpexch_failure_order(__m)); } + + + void + wait(_Tp __old, memory_order __m = memory_order_seq_cst) const noexcept + { + std::__atomic_wait_address_v(&_M_i, __old, + [__m, this] { return this->load(__m); }); + } + + + + void + notify_one() const noexcept + { std::__atomic_notify_address(&_M_i, false); } + + void + notify_all() const noexcept + { std::__atomic_notify_address(&_M_i, true); } + + + }; + + + + template + struct atomic<_Tp*> + { + using value_type = _Tp*; + using difference_type = ptrdiff_t; + + typedef _Tp* __pointer_type; + typedef __atomic_base<_Tp*> __base_type; + __base_type _M_b; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__pointer_type __p) noexcept : _M_b(__p) { } + + operator __pointer_type() const noexcept + { return __pointer_type(_M_b); } + + operator __pointer_type() const volatile noexcept + { return __pointer_type(_M_b); } + + __pointer_type + operator=(__pointer_type __p) noexcept + { return _M_b.operator=(__p); } + + __pointer_type + operator=(__pointer_type __p) volatile noexcept + { return _M_b.operator=(__p); } + + __pointer_type + operator++(int) noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b++; + } + + __pointer_type + operator++(int) volatile noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b++; + } + + __pointer_type + operator--(int) noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b--; + } + + __pointer_type + operator--(int) volatile noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b--; + } + + __pointer_type + operator++() noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return ++_M_b; + } + + __pointer_type + operator++() volatile noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return ++_M_b; + } + + __pointer_type + operator--() noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return --_M_b; + } + + __pointer_type + operator--() volatile noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return --_M_b; + } + + __pointer_type + operator+=(ptrdiff_t __d) noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b.operator+=(__d); + } + + __pointer_type + operator+=(ptrdiff_t __d) volatile noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b.operator+=(__d); + } + + __pointer_type + operator-=(ptrdiff_t __d) noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b.operator-=(__d); + } + + __pointer_type + operator-=(ptrdiff_t __d) volatile noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b.operator-=(__d); + } + + bool + is_lock_free() const noexcept + { return _M_b.is_lock_free(); } + + bool + is_lock_free() const volatile noexcept + { return _M_b.is_lock_free(); } + + + static constexpr bool is_always_lock_free = 2 == 2; + + + void + store(__pointer_type __p, + memory_order __m = memory_order_seq_cst) noexcept + { return _M_b.store(__p, __m); } + + void + store(__pointer_type __p, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return _M_b.store(__p, __m); } + + __pointer_type + load(memory_order __m = memory_order_seq_cst) const noexcept + { return _M_b.load(__m); } + + __pointer_type + load(memory_order __m = memory_order_seq_cst) const volatile noexcept + { return _M_b.load(__m); } + + __pointer_type + exchange(__pointer_type __p, + memory_order __m = memory_order_seq_cst) noexcept + { return _M_b.exchange(__p, __m); } + + __pointer_type + exchange(__pointer_type __p, + memory_order __m = memory_order_seq_cst) volatile noexcept + { return _M_b.exchange(__p, __m); } + + bool + compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, + memory_order __m1, memory_order __m2) noexcept + { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } + + bool + compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, + memory_order __m1, + memory_order __m2) volatile noexcept + { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } + + bool + compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, + memory_order __m = memory_order_seq_cst) noexcept + { + return compare_exchange_weak(__p1, __p2, __m, + __cmpexch_failure_order(__m)); + } + + bool + compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + return compare_exchange_weak(__p1, __p2, __m, + __cmpexch_failure_order(__m)); + } + + bool + compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, + memory_order __m1, memory_order __m2) noexcept + { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } + + bool + compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, + memory_order __m1, + memory_order __m2) volatile noexcept + { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } + + bool + compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, + memory_order __m = memory_order_seq_cst) noexcept + { + return _M_b.compare_exchange_strong(__p1, __p2, __m, + __cmpexch_failure_order(__m)); + } + + bool + compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + return _M_b.compare_exchange_strong(__p1, __p2, __m, + __cmpexch_failure_order(__m)); + } + + + void + wait(__pointer_type __old, memory_order __m = memory_order_seq_cst) noexcept + { _M_b.wait(__old, __m); } + + + + void + notify_one() const noexcept + { _M_b.notify_one(); } + + void + notify_all() const noexcept + { _M_b.notify_all(); } + + __pointer_type + fetch_add(ptrdiff_t __d, + memory_order __m = memory_order_seq_cst) noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b.fetch_add(__d, __m); + } + + __pointer_type + fetch_add(ptrdiff_t __d, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b.fetch_add(__d, __m); + } + + __pointer_type + fetch_sub(ptrdiff_t __d, + memory_order __m = memory_order_seq_cst) noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b.fetch_sub(__d, __m); + } + + __pointer_type + fetch_sub(ptrdiff_t __d, + memory_order __m = memory_order_seq_cst) volatile noexcept + { + + static_assert( is_object<_Tp>::value, "pointer to object type" ); + + return _M_b.fetch_sub(__d, __m); + } + }; + + + + template<> + struct atomic : __atomic_base + { + typedef char __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef signed char __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept= default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef unsigned char __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept= default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef short __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef unsigned short __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef int __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef unsigned int __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef long __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef unsigned long __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef long long __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef unsigned long long __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef wchar_t __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + + template<> + struct atomic : __atomic_base + { + typedef char8_t __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + + template<> + struct atomic : __atomic_base + { + typedef char16_t __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + template<> + struct atomic : __atomic_base + { + typedef char32_t __integral_type; + typedef __atomic_base __base_type; + + atomic() noexcept = default; + ~atomic() noexcept = default; + atomic(const atomic&) = delete; + atomic& operator=(const atomic&) = delete; + atomic& operator=(const atomic&) volatile = delete; + + constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } + + using __base_type::operator __integral_type; + using __base_type::operator=; + + + static constexpr bool is_always_lock_free = 2 == 2; + + }; + + + + typedef atomic atomic_bool; + + + typedef atomic atomic_char; + + + typedef atomic atomic_schar; + + + typedef atomic atomic_uchar; + + + typedef atomic atomic_short; + + + typedef atomic atomic_ushort; + + + typedef atomic atomic_int; + + + typedef atomic atomic_uint; + + + typedef atomic atomic_long; + + + typedef atomic atomic_ulong; + + + typedef atomic atomic_llong; + + + typedef atomic atomic_ullong; + + + typedef atomic atomic_wchar_t; + + + + typedef atomic atomic_char8_t; + + + + typedef atomic atomic_char16_t; + + + typedef atomic atomic_char32_t; + + + + + + + typedef atomic atomic_int8_t; + + + typedef atomic atomic_uint8_t; + + + typedef atomic atomic_int16_t; + + + typedef atomic atomic_uint16_t; + + + typedef atomic atomic_int32_t; + + + typedef atomic atomic_uint32_t; + + + typedef atomic atomic_int64_t; + + + typedef atomic atomic_uint64_t; + + + + typedef atomic atomic_int_least8_t; + + + typedef atomic atomic_uint_least8_t; + + + typedef atomic atomic_int_least16_t; + + + typedef atomic atomic_uint_least16_t; + + + typedef atomic atomic_int_least32_t; + + + typedef atomic atomic_uint_least32_t; + + + typedef atomic atomic_int_least64_t; + + + typedef atomic atomic_uint_least64_t; + + + + typedef atomic atomic_int_fast8_t; + + + typedef atomic atomic_uint_fast8_t; + + + typedef atomic atomic_int_fast16_t; + + + typedef atomic atomic_uint_fast16_t; + + + typedef atomic atomic_int_fast32_t; + + + typedef atomic atomic_uint_fast32_t; + + + typedef atomic atomic_int_fast64_t; + + + typedef atomic atomic_uint_fast64_t; + + + + + typedef atomic atomic_intptr_t; + + + typedef atomic atomic_uintptr_t; + + + typedef atomic atomic_size_t; + + + typedef atomic atomic_ptrdiff_t; + + + + typedef atomic atomic_intmax_t; + + + typedef atomic atomic_uintmax_t; + + + + inline bool + atomic_flag_test_and_set_explicit(atomic_flag* __a, + memory_order __m) noexcept + { return __a->test_and_set(__m); } + + inline bool + atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, + memory_order __m) noexcept + { return __a->test_and_set(__m); } + + inline void + atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept + { __a->clear(__m); } + + inline void + atomic_flag_clear_explicit(volatile atomic_flag* __a, + memory_order __m) noexcept + { __a->clear(__m); } + + inline bool + atomic_flag_test_and_set(atomic_flag* __a) noexcept + { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } + + inline bool + atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept + { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } + + inline void + atomic_flag_clear(atomic_flag* __a) noexcept + { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } + + inline void + atomic_flag_clear(volatile atomic_flag* __a) noexcept + { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } + + + template + using __atomic_val_t = typename atomic<_Tp>::value_type; + template + using __atomic_diff_t = typename atomic<_Tp>::difference_type; + + + + template + inline bool + atomic_is_lock_free(const atomic<_ITp>* __a) noexcept + { return __a->is_lock_free(); } + + template + inline bool + atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept + { return __a->is_lock_free(); } + + template + inline void + atomic_init(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept + { __a->store(__i, memory_order_relaxed); } + + template + inline void + atomic_init(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept + { __a->store(__i, memory_order_relaxed); } + + template + inline void + atomic_store_explicit(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { __a->store(__i, __m); } + + template + inline void + atomic_store_explicit(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { __a->store(__i, __m); } + + template + inline _ITp + atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept + { return __a->load(__m); } + + template + inline _ITp + atomic_load_explicit(const volatile atomic<_ITp>* __a, + memory_order __m) noexcept + { return __a->load(__m); } + + template + inline _ITp + atomic_exchange_explicit(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { return __a->exchange(__i, __m); } + + template + inline _ITp + atomic_exchange_explicit(volatile atomic<_ITp>* __a, + __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { return __a->exchange(__i, __m); } + + template + inline bool + atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a, + __atomic_val_t<_ITp>* __i1, + __atomic_val_t<_ITp> __i2, + memory_order __m1, + memory_order __m2) noexcept + { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } + + template + inline bool + atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a, + __atomic_val_t<_ITp>* __i1, + __atomic_val_t<_ITp> __i2, + memory_order __m1, + memory_order __m2) noexcept + { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } + + template + inline bool + atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a, + __atomic_val_t<_ITp>* __i1, + __atomic_val_t<_ITp> __i2, + memory_order __m1, + memory_order __m2) noexcept + { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } + + template + inline bool + atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a, + __atomic_val_t<_ITp>* __i1, + __atomic_val_t<_ITp> __i2, + memory_order __m1, + memory_order __m2) noexcept + { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } + + + template + inline void + atomic_store(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept + { atomic_store_explicit(__a, __i, memory_order_seq_cst); } + + template + inline void + atomic_store(volatile atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept + { atomic_store_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_load(const atomic<_ITp>* __a) noexcept + { return atomic_load_explicit(__a, memory_order_seq_cst); } + + template + inline _ITp + atomic_load(const volatile atomic<_ITp>* __a) noexcept + { return atomic_load_explicit(__a, memory_order_seq_cst); } + + template + inline _ITp + atomic_exchange(atomic<_ITp>* __a, __atomic_val_t<_ITp> __i) noexcept + { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_exchange(volatile atomic<_ITp>* __a, + __atomic_val_t<_ITp> __i) noexcept + { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } + + template + inline bool + atomic_compare_exchange_weak(atomic<_ITp>* __a, + __atomic_val_t<_ITp>* __i1, + __atomic_val_t<_ITp> __i2) noexcept + { + return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, + memory_order_seq_cst, + memory_order_seq_cst); + } + + template + inline bool + atomic_compare_exchange_weak(volatile atomic<_ITp>* __a, + __atomic_val_t<_ITp>* __i1, + __atomic_val_t<_ITp> __i2) noexcept + { + return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, + memory_order_seq_cst, + memory_order_seq_cst); + } + + template + inline bool + atomic_compare_exchange_strong(atomic<_ITp>* __a, + __atomic_val_t<_ITp>* __i1, + __atomic_val_t<_ITp> __i2) noexcept + { + return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, + memory_order_seq_cst, + memory_order_seq_cst); + } + + template + inline bool + atomic_compare_exchange_strong(volatile atomic<_ITp>* __a, + __atomic_val_t<_ITp>* __i1, + __atomic_val_t<_ITp> __i2) noexcept + { + return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, + memory_order_seq_cst, + memory_order_seq_cst); + } + + + + template + inline void + atomic_wait(const atomic<_Tp>* __a, + typename std::atomic<_Tp>::value_type __old) noexcept + { __a->wait(__old); } + + template + inline void + atomic_wait_explicit(const atomic<_Tp>* __a, + typename std::atomic<_Tp>::value_type __old, + std::memory_order __m) noexcept + { __a->wait(__old, __m); } + + template + inline void + atomic_notify_one(atomic<_Tp>* __a) noexcept + { __a->notify_one(); } + + template + inline void + atomic_notify_all(atomic<_Tp>* __a) noexcept + { __a->notify_all(); } + + + + + + + template + inline _ITp + atomic_fetch_add_explicit(atomic<_ITp>* __a, + __atomic_diff_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_add(__i, __m); } + + template + inline _ITp + atomic_fetch_add_explicit(volatile atomic<_ITp>* __a, + __atomic_diff_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_add(__i, __m); } + + template + inline _ITp + atomic_fetch_sub_explicit(atomic<_ITp>* __a, + __atomic_diff_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_sub(__i, __m); } + + template + inline _ITp + atomic_fetch_sub_explicit(volatile atomic<_ITp>* __a, + __atomic_diff_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_sub(__i, __m); } + + template + inline _ITp + atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_and(__i, __m); } + + template + inline _ITp + atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_and(__i, __m); } + + template + inline _ITp + atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_or(__i, __m); } + + template + inline _ITp + atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_or(__i, __m); } + + template + inline _ITp + atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_xor(__i, __m); } + + template + inline _ITp + atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i, + memory_order __m) noexcept + { return __a->fetch_xor(__i, __m); } + + template + inline _ITp + atomic_fetch_add(atomic<_ITp>* __a, + __atomic_diff_t<_ITp> __i) noexcept + { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_add(volatile atomic<_ITp>* __a, + __atomic_diff_t<_ITp> __i) noexcept + { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_sub(atomic<_ITp>* __a, + __atomic_diff_t<_ITp> __i) noexcept + { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_sub(volatile atomic<_ITp>* __a, + __atomic_diff_t<_ITp> __i) noexcept + { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_and(__atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i) noexcept + { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_and(volatile __atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i) noexcept + { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_or(__atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i) noexcept + { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_or(volatile __atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i) noexcept + { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_xor(__atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i) noexcept + { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } + + template + inline _ITp + atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, + __atomic_val_t<_ITp> __i) noexcept + { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } + + + + template<> + struct atomic : __atomic_float + { + atomic() noexcept = default; + + constexpr + atomic(float __fp) noexcept : __atomic_float(__fp) + { } + + atomic& operator=(const atomic&) volatile = delete; + atomic& operator=(const atomic&) = delete; + + using __atomic_float::operator=; + }; + + template<> + struct atomic : __atomic_float + { + atomic() noexcept = default; + + constexpr + atomic(double __fp) noexcept : __atomic_float(__fp) + { } + + atomic& operator=(const atomic&) volatile = delete; + atomic& operator=(const atomic&) = delete; + + using __atomic_float::operator=; + }; + + template<> + struct atomic : __atomic_float + { + atomic() noexcept = default; + + constexpr + atomic(long double __fp) noexcept : __atomic_float(__fp) + { } + + atomic& operator=(const atomic&) volatile = delete; + atomic& operator=(const atomic&) = delete; + + using __atomic_float::operator=; + }; + + + + + template + struct atomic_ref : __atomic_ref<_Tp> + { + explicit + atomic_ref(_Tp& __t) noexcept : __atomic_ref<_Tp>(__t) + { } + + atomic_ref& operator=(const atomic_ref&) = delete; + + atomic_ref(const atomic_ref&) = default; + + using __atomic_ref<_Tp>::operator=; + }; + + + + + + +} +# 15 "../../../../boost/math/tools/atomic.hpp" 2 + + +# 16 "../../../../boost/math/tools/atomic.hpp" +namespace boost { + namespace math { + namespace detail { + + typedef std::atomic atomic_counter_type; + typedef std::atomic atomic_unsigned_type; + typedef int atomic_integer_type; + typedef unsigned atomic_unsigned_integer_type; +# 42 "../../../../boost/math/tools/atomic.hpp" + } + } +} +# 14 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 2 +# 31 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" +namespace boost{ namespace math{ namespace detail{ + + + + +template +T b2n_asymptotic(int n) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + const T nx = static_cast(n); + const T nx2(nx * nx); + + const T approximate_log_of_bernoulli_bn = + ((boost::math::constants::half() + nx) * log(nx)) + + ((boost::math::constants::half() - nx) * log(boost::math::constants::pi())) + + (((T(3) / 2) - nx) * boost::math::constants::ln_two()) + + ((nx * (T(2) - (nx2 * 7) * (1 + ((nx2 * 30) * ((nx2 * 12) - 1))))) / (((nx2 * nx2) * nx2) * 2520)); + return ((n / 2) & 1 ? 1 : -1) * (approximate_log_of_bernoulli_bn > tools::log_max_value() + ? policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, nx, Policy()) + : static_cast(exp(approximate_log_of_bernoulli_bn))); +} + +template +T t2n_asymptotic(int n) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T t2n = fabs(b2n_asymptotic(2 * n)) / (2 * n); + T p2 = ldexp(T(1), n); + if(tools::max_value() / p2 < t2n) + return policies::raise_overflow_error("boost::math::tangent_t2n<%1%>(std::size_t)", 0, T(n), Policy()); + t2n *= p2; + p2 -= 1; + if(tools::max_value() / p2 < t2n) + return policies::raise_overflow_error("boost::math::tangent_t2n<%1%>(std::size_t)", 0, Policy()); + t2n *= p2; + return t2n; +} +# 84 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" +struct max_bernoulli_root_functor +{ + max_bernoulli_root_functor(unsigned long long t) : target(static_cast(t)) {} + double operator()(double n) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + const double nx2(n * n); + + const double approximate_log_of_bernoulli_bn + = ((boost::math::constants::half() + n) * log(n)) + + ((boost::math::constants::half() - n) * log(boost::math::constants::pi())) + + (((double(3) / 2) - n) * boost::math::constants::ln_two()) + + ((n * (2 - (nx2 * 7) * (1 + ((nx2 * 30) * ((nx2 * 12) - 1))))) / (((nx2 * nx2) * nx2) * 2520)); + + return approximate_log_of_bernoulli_bn - target; + } +private: + double target; +}; + +template +inline std::size_t find_bernoulli_overflow_limit(const std::false_type&) +{ + + static const double max_result = static_cast((std::numeric_limits::max)() - 1000u); + + unsigned long long t = lltrunc(boost::math::tools::log_max_value()); + max_bernoulli_root_functor fun(t); + boost::math::tools::equal_floor tol; + std::uintmax_t max_iter = boost::math::policies::get_max_root_iterations(); + double result = boost::math::tools::toms748_solve(fun, sqrt(double(t)), double(t), tol, max_iter).first / 2; + if (result > max_result) + result = max_result; + + return static_cast(result); +} + +template +inline std::size_t find_bernoulli_overflow_limit(const std::true_type&) +{ + return max_bernoulli_index::value>::value; +} + +template +std::size_t b2n_overflow_limit() +{ + + + typedef std::integral_constant::value >= 1) && (bernoulli_imp_variant::value <= 3)> tag_type; + static const std::size_t lim = find_bernoulli_overflow_limit(tag_type()); + return lim; +} + + + + + + +template ::is_specialized && (std::numeric_limits::radix == 2), bool>::type = true> +inline T tangent_scale_factor() +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + return ldexp(T(1), std::numeric_limits::min_exponent + 5); +} + +template ::is_specialized || !(std::numeric_limits::radix == 2), bool>::type = true> +inline T tangent_scale_factor() +{ + return tools::min_value() * 16; +} +# 168 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" +template +struct fixed_vector : private std::allocator +{ + typedef unsigned size_type; + typedef T* iterator; + typedef const T* const_iterator; + fixed_vector() : m_used(0) + { + std::size_t overflow_limit = 5 + b2n_overflow_limit >(); + m_capacity = static_cast((std::min)(overflow_limit, static_cast(100000u))); + m_data = this->allocate(m_capacity); + } + ~fixed_vector() + { + typedef std::allocator allocator_type; + typedef std::allocator_traits allocator_traits; + allocator_type& alloc = *this; + for(unsigned i = 0; i < m_used; ++i) + allocator_traits::destroy(alloc, &m_data[i]); + allocator_traits::deallocate(alloc, m_data, m_capacity); + } + T& operator[](unsigned n) { +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + (void) ((!!( +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + n < m_used +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + )) || (_assert( +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + "n < m_used" +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + ,"../../../../boost/math/special_functions/detail/bernoulli_details.hpp",189),0)) +# 189 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + ; return m_data[n]; } + const T& operator[](unsigned n)const { +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + (void) ((!!( +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + n < m_used +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + )) || (_assert( +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + "n < m_used" +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" 3 + ,"../../../../boost/math/special_functions/detail/bernoulli_details.hpp",190),0)) +# 190 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + ; return m_data[n]; } + unsigned size()const { return m_used; } + unsigned size() { return m_used; } + void resize(unsigned n, const T& val) + { + if(n > m_capacity) + { + throw std::runtime_error("Exhausted storage for Bernoulli numbers.");; + } + for(unsigned i = m_used; i < n; ++i) + new (m_data + i) T(val); + m_used = n; + } + void resize(unsigned n) { resize(n, T()); } + T* begin() { return m_data; } + T* end() { return m_data + m_used; } + T* begin()const { return m_data; } + T* end()const { return m_data + m_used; } + unsigned capacity()const { return m_capacity; } + void clear() { m_used = 0; } +private: + T* m_data; + unsigned m_used, m_capacity; +}; + +template +class bernoulli_numbers_cache +{ +public: + bernoulli_numbers_cache() : m_overflow_limit((std::numeric_limits::max)()) + , m_counter(0) + , m_current_precision(boost::math::tools::digits()) + {} + + typedef fixed_vector container_type; + + void tangent(std::size_t m) + { + static const std::size_t min_overflow_index = b2n_overflow_limit() - 1; + tn.resize(static_cast(m), T(0U)); + + ; + + std::size_t prev_size = m_intermediates.size(); + m_intermediates.resize(m, T(0U)); + + if(prev_size == 0) + { + m_intermediates[1] = tangent_scale_factor() ; + tn[0U] = T(0U); + tn[1U] = tangent_scale_factor() ; + ; + ; + } + + for(std::size_t i = std::max(2, prev_size); i < m; i++) + { + bool overflow_check = false; + if(i >= min_overflow_index && (boost::math::tools::max_value() / (i-1) < m_intermediates[1]) ) + { + std::fill(tn.begin() + i, tn.end(), boost::math::tools::max_value()); + break; + } + m_intermediates[1] = m_intermediates[1] * (i-1); + for(std::size_t j = 2; j <= i; j++) + { + overflow_check = + (i >= min_overflow_index) && ( + (boost::math::tools::max_value() / (i - j) < m_intermediates[j]) + || (boost::math::tools::max_value() / (i - j + 2) < m_intermediates[j-1]) + || (boost::math::tools::max_value() - m_intermediates[j] * (i - j) < m_intermediates[j-1] * (i - j + 2)) + || ((boost::math::isinf)(m_intermediates[j])) + ); + + if(overflow_check) + { + std::fill(tn.begin() + i, tn.end(), boost::math::tools::max_value()); + break; + } + m_intermediates[j] = m_intermediates[j] * (i - j) + m_intermediates[j-1] * (i - j + 2); + } + if(overflow_check) + break; + tn[static_cast(i)] = m_intermediates[i]; + ; + ; + } + } + + void tangent_numbers_series(const std::size_t m) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const std::size_t min_overflow_index = b2n_overflow_limit() - 1; + + typename container_type::size_type old_size = bn.size(); + + tangent(m); + bn.resize(static_cast(m)); + + if(!old_size) + { + bn[0] = 1; + old_size = 1; + } + + T power_two(ldexp(T(1), static_cast(2 * old_size))); + + for(std::size_t i = old_size; i < m; i++) + { + T b(static_cast(i * 2)); + + + + + + b = b / (power_two * tangent_scale_factor()); + b /= (power_two - 1); + bool overflow_check = (i >= min_overflow_index) && (tools::max_value() / tn[static_cast(i)] < b); + if(overflow_check) + { + m_overflow_limit = i; + while(i < m) + { + b = std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : tools::max_value(); + bn[static_cast(i)] = ((i % 2U) ? b : T(-b)); + ++i; + } + break; + } + else + { + b *= tn[static_cast(i)]; + } + + power_two = ldexp(power_two, 2); + + const bool b_neg = i % 2 == 0; + + bn[static_cast(i)] = ((!b_neg) ? b : T(-b)); + } + } + + template + OutputIterator copy_bernoulli_numbers(OutputIterator out, std::size_t start, std::size_t n, const Policy& pol) + { +# 347 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + if(start + n > bn.capacity()) + { + if(start < bn.capacity()) + { + out = copy_bernoulli_numbers(out, start, bn.capacity() - start, pol); + n -= bn.capacity() - start; + start = static_cast(bn.capacity()); + } + if(start < b2n_overflow_limit() + 2u) + { + for(; n; ++start, --n) + { + *out = b2n_asymptotic(static_cast(start * 2U)); + ++out; + } + } + for(; n; ++start, --n) + { + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(start), pol); + ++out; + } + return out; + } +# 403 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + if((static_cast(m_counter.load(std::memory_order_consume)) < start + n) + || (static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits())) + { + std::lock_guard l(m_mutex); + + if((static_cast(m_counter.load(std::memory_order_consume)) < start + n) + || (static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits())) + { + if(static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits()) + { + bn.clear(); + tn.clear(); + m_intermediates.clear(); + m_counter.store(0, std::memory_order_release); + m_current_precision = boost::math::tools::digits(); + } + if(start + n >= bn.size()) + { + std::size_t new_size = (std::min)((std::max)((std::max)(std::size_t(start + n), std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity())); + tangent_numbers_series(new_size); + } + m_counter.store(static_cast(bn.size()), std::memory_order_release); + } + } + + for(std::size_t i = (std::max)(static_cast(max_bernoulli_b2n::value + 1), start); i < start + n; ++i) + { + *out = (i >= m_overflow_limit) ? policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol) : bn[static_cast(i)]; + ++out; + } + + + return out; + } + + template + OutputIterator copy_tangent_numbers(OutputIterator out, std::size_t start, std::size_t n, const Policy& pol) + { +# 454 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + if(start + n > bn.capacity()) + { + if(start < bn.capacity()) + { + out = copy_tangent_numbers(out, start, bn.capacity() - start, pol); + n -= bn.capacity() - start; + start = static_cast(bn.capacity()); + } + if(start < b2n_overflow_limit() + 2u) + { + for(; n; ++start, --n) + { + *out = t2n_asymptotic(static_cast(start)); + ++out; + } + } + for(; n; ++start, --n) + { + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(start), pol); + ++out; + } + return out; + } +# 517 "../../../../boost/math/special_functions/detail/bernoulli_details.hpp" + if((static_cast(m_counter.load(std::memory_order_consume)) < start + n) + || (static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits())) + { + std::lock_guard l(m_mutex); + + if((static_cast(m_counter.load(std::memory_order_consume)) < start + n) + || (static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits())) + { + if(static_cast(m_current_precision.load(std::memory_order_consume)) < boost::math::tools::digits()) + { + bn.clear(); + tn.clear(); + m_intermediates.clear(); + m_counter.store(0, std::memory_order_release); + m_current_precision = boost::math::tools::digits(); + } + if(start + n >= bn.size()) + { + std::size_t new_size = (std::min)((std::max)((std::max)(start + n, std::size_t(bn.size() + 20)), std::size_t(50)), std::size_t(bn.capacity())); + tangent_numbers_series(new_size); + } + m_counter.store(static_cast(bn.size()), std::memory_order_release); + } + } + + for(std::size_t i = start; i < start + n; ++i) + { + if(i >= m_overflow_limit) + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol); + else + { + if(tools::max_value() * tangent_scale_factor() < tn[static_cast(i)]) + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol); + else + *out = tn[static_cast(i)] / tangent_scale_factor(); + } + ++out; + } + + + return out; + } + +private: + + + + + + fixed_vector bn, tn; + std::vector m_intermediates; + + std::size_t m_overflow_limit; + + + std::mutex m_mutex; + atomic_counter_type m_counter, m_current_precision; + + + + +}; + +template +inline typename std::enable_if<(std::numeric_limits::digits == 0) || (std::numeric_limits::digits >= 0x7fffffff), bernoulli_numbers_cache&>::type get_bernoulli_numbers_cache() +{ + + + + + + static + + thread_local + + bernoulli_numbers_cache data; + return data; +} +template +inline typename std::enable_if::digits && (std::numeric_limits::digits < 0x7fffffff), bernoulli_numbers_cache&>::type get_bernoulli_numbers_cache() +{ + + + + static bernoulli_numbers_cache data; + return data; +} + +}}} +# 19 "../../../../boost/math/special_functions/bernoulli.hpp" 2 + +namespace boost { namespace math { + +namespace detail { + +template +OutputIterator bernoulli_number_imp(OutputIterator out, std::size_t start, std::size_t n, const Policy& pol, const std::integral_constant& tag) +{ + for(std::size_t i = start; (i <= max_bernoulli_b2n::value) && (i < start + n); ++i) + { + *out = unchecked_bernoulli_imp(i, tag); + ++out; + } + + for(std::size_t i = (std::max)(static_cast(max_bernoulli_b2n::value + 1), start); i < start + n; ++i) + { + + *out = (i & 1 ? 1 : -1) * policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(n)", 0, T(i), pol); + ++out; + } + return out; +} + +template +OutputIterator bernoulli_number_imp(OutputIterator out, std::size_t start, std::size_t n, const Policy& pol, const std::integral_constant& tag) +{ + for(std::size_t i = start; (i <= max_bernoulli_b2n::value) && (i < start + n); ++i) + { + *out = unchecked_bernoulli_imp(i, tag); + ++out; + } + + + + if(start + n <= max_bernoulli_b2n::value) + return out; + + return get_bernoulli_numbers_cache().copy_bernoulli_numbers(out, start, n, pol); +} + +} + +export template +inline T bernoulli_b2n(const int i, const Policy &pol) +{ + typedef std::integral_constant::value> tag_type; + if(i < 0) + return policies::raise_domain_error("boost::math::bernoulli_b2n<%1%>", "Index should be >= 0 but got %1%", T(i), pol); + + T result = static_cast(0); + boost::math::detail::bernoulli_number_imp(&result, static_cast(i), 1u, pol, tag_type()); + return result; +} + +export template +inline T bernoulli_b2n(const int i) +{ + return boost::math::bernoulli_b2n(i, policies::policy<>()); +} + +export template +inline OutputIterator bernoulli_b2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it, + const Policy& pol) +{ + typedef std::integral_constant::value> tag_type; + if(start_index < 0) + { + *out_it = policies::raise_domain_error("boost::math::bernoulli_b2n<%1%>", "Index should be >= 0 but got %1%", T(start_index), pol); + return ++out_it; + } + + return boost::math::detail::bernoulli_number_imp(out_it, start_index, number_of_bernoullis_b2n, pol, tag_type()); +} + +export template +inline OutputIterator bernoulli_b2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it) +{ + return boost::math::bernoulli_b2n(start_index, number_of_bernoullis_b2n, out_it, policies::policy<>()); +} + +export template +inline T tangent_t2n(const int i, const Policy &pol) +{ + if(i < 0) + return policies::raise_domain_error("boost::math::tangent_t2n<%1%>", "Index should be >= 0 but got %1%", T(i), pol); + + T result; + boost::math::detail::get_bernoulli_numbers_cache().copy_tangent_numbers(&result, i, 1, pol); + return result; +} + +export template +inline T tangent_t2n(const int i) +{ + return boost::math::tangent_t2n(i, policies::policy<>()); +} + +export template +inline OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_tangent_t2n, + OutputIterator out_it, + const Policy& pol) +{ + if(start_index < 0) + { + *out_it = policies::raise_domain_error("boost::math::tangent_t2n<%1%>", "Index should be >= 0 but got %1%", T(start_index), pol); + return ++out_it; + } + + return boost::math::detail::get_bernoulli_numbers_cache().copy_tangent_numbers(out_it, start_index, number_of_tangent_t2n, pol); +} + +export template +inline OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_tangent_t2n, + OutputIterator out_it) +{ + return boost::math::tangent_t2n(start_index, number_of_tangent_t2n, out_it, policies::policy<>()); +} + +} } +# 195 "../../module/sf.cxx" 2 +# 1 "../../../../boost/math/special_functions/gamma.hpp" 1 +# 25 "../../../../boost/math/special_functions/gamma.hpp" +# 1 "../../../../boost/math/tools/fraction.hpp" 1 +# 13 "../../../../boost/math/tools/fraction.hpp" +# 1 "../../../../boost/math/tools/complex.hpp" 1 +# 14 "../../../../boost/math/tools/complex.hpp" +# 1 "../../../../boost/math/tools/is_detected.hpp" 1 +# 13 "../../../../boost/math/tools/is_detected.hpp" +namespace boost { namespace math { namespace tools { + +template +using void_t = void; + +namespace detail { + +template class Op, typename... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, typename... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +} + + +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(const nonesuch&) = delete; + void operator=(const nonesuch&) = delete; +}; + +template class Op, typename... Args> +using is_detected = typename detail::detector::value_t; + +template class Op, typename... Args> +using detected_t = typename detail::detector::type; + +template class Op, typename... Args> +using detected_or = detail::detector; + +}}} +# 15 "../../../../boost/math/tools/complex.hpp" 2 + +namespace boost { + namespace math { + namespace tools { + + namespace detail { + template + struct is_complex_type_impl + { + static constexpr bool value = false; + }; + + template + struct is_complex_type_impl().real()), + decltype(std::declval().imag())>> + { + static constexpr bool value = true; + }; + } + + template + struct is_complex_type : public detail::is_complex_type_impl {}; + + + + + + template ::value> + struct integer_scalar_type + { + typedef int type; + }; + template + struct integer_scalar_type + { + typedef typename T::value_type type; + }; + template ::value> + struct unsigned_scalar_type + { + typedef unsigned type; + }; + template + struct unsigned_scalar_type + { + typedef typename T::value_type type; + }; + template ::value> + struct scalar_type + { + typedef T type; + }; + template + struct scalar_type + { + typedef typename T::value_type type; + }; + + +} } } +# 14 "../../../../boost/math/tools/fraction.hpp" 2 + + + + + + + +namespace boost{ namespace math{ namespace tools{ + +namespace detail +{ + + template + struct is_pair : public std::false_type{}; + + template + struct is_pair> : public std::true_type{}; + + template + struct fraction_traits_simple + { + using result_type = typename Gen::result_type; + using value_type = typename Gen::result_type; + + static result_type a(const value_type&) noexcept(std::is_floating_point::value) + { + return 1; + } + static result_type b(const value_type& v) noexcept(std::is_floating_point::value) + { + return v; + } + }; + + template + struct fraction_traits_pair + { + using value_type = typename Gen::result_type; + using result_type = typename value_type::first_type; + + static result_type a(const value_type& v) noexcept(std::is_floating_point::value) + { + return v.first; + } + static result_type b(const value_type& v) noexcept(std::is_floating_point::value) + { + return v.second; + } + }; + + template + struct fraction_traits + : public std::conditional< + is_pair::value, + fraction_traits_pair, + fraction_traits_simple>::type + { + }; + + template ::value> + struct tiny_value + { + + + + static T get() { + return 16*tools::min_value(); + } + }; + template + struct tiny_value + { + using value_type = typename T::value_type; + static T get() { + return 16*tools::min_value(); + } + }; + +} +# 108 "../../../../boost/math/tools/fraction.hpp" +template +inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, const U& factor, std::uintmax_t& max_terms) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + using value_type = typename traits::value_type; + using integer_type = typename integer_scalar_type::type; + using scalar_type = typename scalar_type::type; + + integer_type const zero(0), one(1); + + result_type tiny = detail::tiny_value::get(); + scalar_type terminator = abs(factor); + + value_type v = g(); + + result_type f, C, D, delta; + f = traits::b(v); + if(f == zero) + f = tiny; + C = f; + D = 0; + + std::uintmax_t counter(max_terms); + do{ + v = g(); + D = traits::b(v) + traits::a(v) * D; + if(D == result_type(0)) + D = tiny; + C = traits::b(v) + traits::a(v) / C; + if(C == zero) + C = tiny; + D = one/D; + delta = C*D; + f = f * delta; + }while((abs(delta - one) > terminator) && --counter); + + max_terms = max_terms - counter; + + return f; +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, const U& factor) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + std::uintmax_t max_terms = (std::numeric_limits::max)(); + return continued_fraction_b(g, factor, max_terms); +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, int bits) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + + result_type factor = ldexp(1.0f, 1 - bits); + std::uintmax_t max_terms = (std::numeric_limits::max)(); + return continued_fraction_b(g, factor, max_terms); +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, int bits, std::uintmax_t& max_terms) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + + result_type factor = ldexp(1.0f, 1 - bits); + return continued_fraction_b(g, factor, max_terms); +} +# 202 "../../../../boost/math/tools/fraction.hpp" +template +inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, const U& factor, std::uintmax_t& max_terms) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + using value_type = typename traits::value_type; + using integer_type = typename integer_scalar_type::type; + using scalar_type = typename scalar_type::type; + + integer_type const zero(0), one(1); + + result_type tiny = detail::tiny_value::get(); + scalar_type terminator = abs(factor); + + value_type v = g(); + + result_type f, C, D, delta, a0; + f = traits::b(v); + a0 = traits::a(v); + if(f == zero) + f = tiny; + C = f; + D = 0; + + std::uintmax_t counter(max_terms); + + do{ + v = g(); + D = traits::b(v) + traits::a(v) * D; + if(D == zero) + D = tiny; + C = traits::b(v) + traits::a(v) / C; + if(C == zero) + C = tiny; + D = one/D; + delta = C*D; + f = f * delta; + }while((abs(delta - one) > terminator) && --counter); + + max_terms = max_terms - counter; + + return a0/f; +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, const U& factor) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + std::uintmax_t max_iter = (std::numeric_limits::max)(); + return continued_fraction_a(g, factor, max_iter); +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, int bits) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef detail::fraction_traits traits; + typedef typename traits::result_type result_type; + + result_type factor = ldexp(1.0f, 1-bits); + std::uintmax_t max_iter = (std::numeric_limits::max)(); + + return continued_fraction_a(g, factor, max_iter); +} + +template +inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, int bits, std::uintmax_t& max_terms) + noexcept((std::is_floating_point::result_type>::value) && noexcept(std::declval()())) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + using traits = detail::fraction_traits; + using result_type = typename traits::result_type; + + result_type factor = ldexp(1.0f, 1-bits); + return continued_fraction_a(g, factor, max_terms); +} + +} +} +} +# 26 "../../../../boost/math/special_functions/gamma.hpp" 2 + + + + + + +# 1 "../../../../boost/math/special_functions/lanczos.hpp" 1 +# 33 "../../../../boost/math/special_functions/lanczos.hpp" +namespace boost{ namespace math{ namespace lanczos{ +# 50 "../../../../boost/math/special_functions/lanczos.hpp" +template +struct lanczos_initializer +{ + struct init + { + init() + { + T t(1); + Lanczos::lanczos_sum(t); + Lanczos::lanczos_sum_expG_scaled(t); + Lanczos::lanczos_sum_near_1(t); + Lanczos::lanczos_sum_near_2(t); + Lanczos::g(); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; +template +typename lanczos_initializer::init const lanczos_initializer::initializer; + + + + + + + +template +inline double lanczos_g_near_1_and_2(const L&) +{ + return L::g(); +} + + + + + + + +struct lanczos6 : public std::integral_constant +{ + + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[6] = { + static_cast(boost::math::tools::make_big_value( 8706.349592549009182288174442774377925882, "8706.349592549009182288174442774377925882", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8523.650341121874633477483696775067709735, "8523.650341121874633477483696775067709735", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3338.029219476423550899999750161289306564, "3338.029219476423550899999750161289306564", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 653.6424994294008795995653541449610986791, "653.6424994294008795995653541449610986791", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 63.99951844938187085666201263218840287667, "63.99951844938187085666201263218840287667", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631006311133031631822390264407, "2.506628274631006311133031631822390264407", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint16_t denom[6] = { + static_cast(0u), + static_cast(24u), + static_cast(50u), + static_cast(35u), + static_cast(10u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[6] = { + static_cast(boost::math::tools::make_big_value( 32.81244541029783471623665933780748627823, "32.81244541029783471623665933780748627823", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 32.12388941444332003446077108933558534361, "32.12388941444332003446077108933558534361", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12.58034729455216106950851080138931470954, "12.58034729455216106950851080138931470954", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.463444478353241423633780693218408889251, "2.463444478353241423633780693218408889251", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2412010548258800231126240760264822486599, "0.2412010548258800231126240760264822486599", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.009446967704539249494420221613134244048319, "0.009446967704539249494420221613134244048319", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint16_t denom[6] = { + static_cast(0u), + static_cast(24u), + static_cast(50u), + static_cast(35u), + static_cast(10u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[5] = { + static_cast(boost::math::tools::make_big_value( 2.044879010930422922760429926121241330235, "2.044879010930422922760429926121241330235", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.751366405578505366591317846728753993668, "-2.751366405578505366591317846728753993668", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.02282965224225004296750609604264824677, "1.02282965224225004296750609604264824677", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.09786124911582813985028889636665335893627, "-0.09786124911582813985028889636665335893627", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0009829742267506615183144364420540766510112, "0.0009829742267506615183144364420540766510112", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[5] = { + static_cast(boost::math::tools::make_big_value( 5.748142489536043490764289256167080091892, "5.748142489536043490764289256167080091892", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.734074268282457156081021756682138251825, "-7.734074268282457156081021756682138251825", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.875167944990511006997713242805893543947, "2.875167944990511006997713242805893543947", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.2750873773533504542306766137703788781776, "-0.2750873773533504542306766137703788781776", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.002763134585812698552178368447708846850353, "0.002763134585812698552178368447708846850353", std::integral_constant::value) && ((35 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 5.581000000000000405009359383257105946541; } +}; + + + + + + +struct lanczos11 : public std::integral_constant +{ + + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[11] = { + static_cast(boost::math::tools::make_big_value( 38474670393.31776828316099004518914832218, "38474670393.31776828316099004518914832218", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 36857665043.51950660081971227404959150474, "36857665043.51950660081971227404959150474", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 15889202453.72942008945006665994637853242, "15889202453.72942008945006665994637853242", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4059208354.298834770194507810788393801607, "4059208354.298834770194507810788393801607", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 680547661.1834733286087695557084801366446, "680547661.1834733286087695557084801366446", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 78239755.00312005289816041245285376206263, "78239755.00312005289816041245285376206263", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6246580.776401795264013335510453568106366, "6246580.776401795264013335510453568106366", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 341986.3488721347032223777872763188768288, "341986.3488721347032223777872763188768288", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12287.19451182455120096222044424100527629, "12287.19451182455120096222044424100527629", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 261.6140441641668190791708576058805625502, "261.6140441641668190791708576058805625502", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415573855452633787834, "2.506628274631000502415573855452633787834", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint32_t denom[11] = { + static_cast(0u), + static_cast(362880u), + static_cast(1026576u), + static_cast(1172700u), + static_cast(723680u), + static_cast(269325u), + static_cast(63273u), + static_cast(9450u), + static_cast(870u), + static_cast(45u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[11] = { + static_cast(boost::math::tools::make_big_value( 709811.662581657956893540610814842699825, "709811.662581657956893540610814842699825", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 679979.847415722640161734319823103390728, "679979.847415722640161734319823103390728", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 293136.785721159725251629480984140341656, "293136.785721159725251629480984140341656", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 74887.5403291467179935942448101441897121, "74887.5403291467179935942448101441897121", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12555.29058241386295096255111537516768137, "12555.29058241386295096255111537516768137", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1443.42992444170669746078056942194198252, "1443.42992444170669746078056942194198252", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 115.2419459613734722083208906727972935065, "115.2419459613734722083208906727972935065", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.30923920573262762719523981992008976989, "6.30923920573262762719523981992008976989", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2266840463022436475495508977579735223818, "0.2266840463022436475495508977579735223818", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.004826466289237661857584712046231435101741, "0.004826466289237661857584712046231435101741", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.4624429436045378766270459638520555557321e-4, "0.4624429436045378766270459638520555557321e-4", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint32_t denom[11] = { + static_cast(0u), + static_cast(362880u), + static_cast(1026576u), + static_cast(1172700u), + static_cast(723680u), + static_cast(269325u), + static_cast(63273u), + static_cast(9450u), + static_cast(870u), + static_cast(45u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[10] = { + static_cast(boost::math::tools::make_big_value( 4.005853070677940377969080796551266387954, "4.005853070677940377969080796551266387954", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -13.17044315127646469834125159673527183164, "-13.17044315127646469834125159673527183164", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 17.19146865350790353683895137079288129318, "17.19146865350790353683895137079288129318", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -11.36446409067666626185701599196274701126, "-11.36446409067666626185701599196274701126", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.024801119349323770107694133829772634737, "4.024801119349323770107694133829772634737", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.7445703262078094128346501724255463005006, "-0.7445703262078094128346501724255463005006", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.06513861351917497265045550019547857713172, "0.06513861351917497265045550019547857713172", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.00217899958561830354633560009312512312758, "-0.00217899958561830354633560009312512312758", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.17655204574495137651670832229571934738e-4, "0.17655204574495137651670832229571934738e-4", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1036282091079938047775645941885460820853e-7, "-0.1036282091079938047775645941885460820853e-7", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[10] = { + static_cast(boost::math::tools::make_big_value( 19.05889633808148715159575716844556056056, "19.05889633808148715159575716844556056056", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -62.66183664701721716960978577959655644762, "-62.66183664701721716960978577959655644762", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 81.7929198065004751699057192860287512027, "81.7929198065004751699057192860287512027", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -54.06941772964234828416072865069196553015, "-54.06941772964234828416072865069196553015", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 19.14904664790693019642068229478769661515, "19.14904664790693019642068229478769661515", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.542488556926667589704590409095331790317, "-3.542488556926667589704590409095331790317", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.3099140334815639910894627700232804503017, "0.3099140334815639910894627700232804503017", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.01036716187296241640634252431913030440825, "-0.01036716187296241640634252431913030440825", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.8399926504443119927673843789048514017761e-4, "0.8399926504443119927673843789048514017761e-4", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.493038376656195010308610694048822561263e-7, "-0.493038376656195010308610694048822561263e-7", std::integral_constant::value) && ((60 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 10.90051099999999983936049829935654997826; } +}; + + + + + + +struct lanczos13 : public std::integral_constant +{ + + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[13] = { + static_cast(boost::math::tools::make_big_value( 44012138428004.60895436261759919070125699, "44012138428004.60895436261759919070125699", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 41590453358593.20051581730723108131357995, "41590453358593.20051581730723108131357995", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 18013842787117.99677796276038389462742949, "18013842787117.99677796276038389462742949", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4728736263475.388896889723995205703970787, "4728736263475.388896889723995205703970787", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 837910083628.4046470415724300225777912264, "837910083628.4046470415724300225777912264", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 105583707273.4299344907359855510105321192, "105583707273.4299344907359855510105321192", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9701363618.494999493386608345339104922694, "9701363618.494999493386608345339104922694", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 654914397.5482052641016767125048538245644, "654914397.5482052641016767125048538245644", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 32238322.94213356530668889463945849409184, "32238322.94213356530668889463945849409184", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1128514.219497091438040721811544858643121, "1128514.219497091438040721811544858643121", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 26665.79378459858944762533958798805525125, "26665.79378459858944762533958798805525125", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 381.8801248632926870394389468349331394196, "381.8801248632926870394389468349331394196", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415763426076722427007, "2.506628274631000502415763426076722427007", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[13] = { + static_cast(boost::math::tools::make_big_value( 86091529.53418537217994842267760536134841, "86091529.53418537217994842267760536134841", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 81354505.17858011242874285785316135398567, "81354505.17858011242874285785316135398567", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 35236626.38815461910817650960734605416521, "35236626.38815461910817650960734605416521", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9249814.988024471294683815872977672237195, "9249814.988024471294683815872977672237195", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1639024.216687146960253839656643518985826, "1639024.216687146960253839656643518985826", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 206530.8157641225032631778026076868855623, "206530.8157641225032631778026076868855623", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 18976.70193530288915698282139308582105936, "18976.70193530288915698282139308582105936", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1281.068909912559479885759622791374106059, "1281.068909912559479885759622791374106059", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 63.06093343420234536146194868906771599354, "63.06093343420234536146194868906771599354", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.207470909792527638222674678171050209691, "2.207470909792527638222674678171050209691", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.05216058694613505427476207805814960742102, "0.05216058694613505427476207805814960742102", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0007469903808915448316510079585999893674101, "0.0007469903808915448316510079585999893674101", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.4903180573459871862552197089738373164184e-5, "0.4903180573459871862552197089738373164184e-5", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[12] = { + static_cast(boost::math::tools::make_big_value( 4.832115561461656947793029596285626840312, "4.832115561461656947793029596285626840312", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -19.86441536140337740383120735104359034688, "-19.86441536140337740383120735104359034688", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 33.9927422807443239927197864963170585331, "33.9927422807443239927197864963170585331", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -31.41520692249765980987427413991250886138, "-31.41520692249765980987427413991250886138", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 17.0270866009599345679868972409543597821, "17.0270866009599345679868972409543597821", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.5077216950865501362506920516723682167, "-5.5077216950865501362506920516723682167", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.037811741948214855286817963800439373362, "1.037811741948214855286817963800439373362", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.106640468537356182313660880481398642811, "-0.106640468537356182313660880481398642811", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.005276450526660653288757565778182586742831, "0.005276450526660653288757565778182586742831", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.0001000935625597121545867453746252064770029, "-0.0001000935625597121545867453746252064770029", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.462590910138598083940803704521211569234e-6, "0.462590910138598083940803704521211569234e-6", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1735307814426389420248044907765671743012e-9, "-0.1735307814426389420248044907765671743012e-9", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[12] = { + static_cast(boost::math::tools::make_big_value( 26.96979819614830698367887026728396466395, "26.96979819614830698367887026728396466395", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -110.8705424709385114023884328797900204863, "-110.8705424709385114023884328797900204863", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 189.7258846119231466417015694690434770085, "189.7258846119231466417015694690434770085", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -175.3397202971107486383321670769397356553, "-175.3397202971107486383321670769397356553", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 95.03437648691551457087250340903980824948, "95.03437648691551457087250340903980824948", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -30.7406022781665264273675797983497141978, "-30.7406022781665264273675797983497141978", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.792405601630517993355102578874590410552, "5.792405601630517993355102578874590410552", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.5951993240669148697377539518639997795831, "-0.5951993240669148697377539518639997795831", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.02944979359164017509944724739946255067671, "0.02944979359164017509944724739946255067671", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.0005586586555377030921194246330399163602684, "-0.0005586586555377030921194246330399163602684", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2581888478270733025288922038673392636029e-5, "0.2581888478270733025288922038673392636029e-5", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.9685385411006641478305219367315965391289e-9, "-0.9685385411006641478305219367315965391289e-9", std::integral_constant::value) && ((72 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 13.1445650000000000545696821063756942749; } +}; + + + + + + +struct lanczos6m24 : public std::integral_constant +{ + + + + template + static T lanczos_sum(const T& z) + { + static const T num[6] = { + static_cast(58.52061591769095910314047740215847630266L), + static_cast(182.5248962595894264831189414768236280862L), + static_cast(211.0971093028510041839168287718170827259L), + static_cast(112.2526547883668146736465390902227161763L), + static_cast(27.5192015197455403062503721613097825345L), + static_cast(2.50662858515256974113978724717473206342L) + }; + static const std::uint16_t denom[6] = { + static_cast(0u), + static_cast(24u), + static_cast(50u), + static_cast(35u), + static_cast(10u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[6] = { + static_cast(14.0261432874996476619570577285003839357L), + static_cast(43.74732405540314316089531289293124360129L), + static_cast(50.59547402616588964511581430025589038612L), + static_cast(26.90456680562548195593733429204228910299L), + static_cast(6.595765571169314946316366571954421695196L), + static_cast(0.6007854010515290065101128585795542383721L) + }; + static const std::uint16_t denom[6] = { + static_cast(0u), + static_cast(24u), + static_cast(50u), + static_cast(35u), + static_cast(10u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[5] = { + static_cast(0.4922488055204602807654354732674868442106L), + static_cast(0.004954497451132152436631238060933905650346L), + static_cast(-0.003374784572167105840686977985330859371848L), + static_cast(0.001924276018962061937026396537786414831385L), + static_cast(-0.00056533046336427583708166383712907694434L), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[5] = { + static_cast(0.6534966888520080645505805298901130485464L), + static_cast(0.006577461728560758362509168026049182707101L), + static_cast(-0.004480276069269967207178373559014835978161L), + static_cast(0.00255461870648818292376982818026706528842L), + static_cast(-0.000750517993690428370380996157470900204524L), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 1.428456135094165802001953125; } +}; + + + + + + +struct lanczos13m53 : public std::integral_constant +{ + + + + template + static T lanczos_sum(const T& z) + { + static const T num[13] = { + static_cast(23531376880.41075968857200767445163675473L), + static_cast(42919803642.64909876895789904700198885093L), + static_cast(35711959237.35566804944018545154716670596L), + static_cast(17921034426.03720969991975575445893111267L), + static_cast(6039542586.35202800506429164430729792107L), + static_cast(1439720407.311721673663223072794912393972L), + static_cast(248874557.8620541565114603864132294232163L), + static_cast(31426415.58540019438061423162831820536287L), + static_cast(2876370.628935372441225409051620849613599L), + static_cast(186056.2653952234950402949897160456992822L), + static_cast(8071.672002365816210638002902272250613822L), + static_cast(210.8242777515793458725097339207133627117L), + static_cast(2.506628274631000270164908177133837338626L) + }; + static const std::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[13] = { + static_cast(56906521.91347156388090791033559122686859L), + static_cast(103794043.1163445451906271053616070238554L), + static_cast(86363131.28813859145546927288977868422342L), + static_cast(43338889.32467613834773723740590533316085L), + static_cast(14605578.08768506808414169982791359218571L), + static_cast(3481712.15498064590882071018964774556468L), + static_cast(601859.6171681098786670226533699352302507L), + static_cast(75999.29304014542649875303443598909137092L), + static_cast(6955.999602515376140356310115515198987526L), + static_cast(449.9445569063168119446858607650988409623L), + static_cast(19.51992788247617482847860966235652136208L), + static_cast(0.5098416655656676188125178644804694509993L), + static_cast(0.006061842346248906525783753964555936883222L) + }; + static const std::uint32_t denom[13] = { + static_cast(0u), + static_cast(39916800u), + static_cast(120543840u), + static_cast(150917976u), + static_cast(105258076u), + static_cast(45995730u), + static_cast(13339535u), + static_cast(2637558u), + static_cast(357423u), + static_cast(32670u), + static_cast(1925u), + static_cast(66u), + static_cast(1u) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[12] = { + static_cast(2.208709979316623790862569924861841433016L), + static_cast(-3.327150580651624233553677113928873034916L), + static_cast(1.483082862367253753040442933770164111678L), + static_cast(-0.1993758927614728757314233026257810172008L), + static_cast(0.004785200610085071473880915854204301886437L), + static_cast(-0.1515973019871092388943437623825208095123e-5L), + static_cast(-0.2752907702903126466004207345038327818713e-7L), + static_cast(0.3075580174791348492737947340039992829546e-7L), + static_cast(-0.1933117898880828348692541394841204288047e-7L), + static_cast(0.8690926181038057039526127422002498960172e-8L), + static_cast(-0.2499505151487868335680273909354071938387e-8L), + static_cast(0.3394643171893132535170101292240837927725e-9L), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[12] = { + static_cast(6.565936202082889535528455955485877361223L), + static_cast(-9.8907772644920670589288081640128194231L), + static_cast(4.408830289125943377923077727900630927902L), + static_cast(-0.5926941084905061794445733628891024027949L), + static_cast(0.01422519127192419234315002746252160965831L), + static_cast(-0.4506604409707170077136555010018549819192e-5L), + static_cast(-0.8183698410724358930823737982119474130069e-7L), + static_cast(0.9142922068165324132060550591210267992072e-7L), + static_cast(-0.5746670642147041587497159649318454348117e-7L), + static_cast(0.2583592566524439230844378948704262291927e-7L), + static_cast(-0.7430396708998719707642735577238449585822e-8L), + static_cast(0.1009141566987569892221439918230042368112e-8L), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 6.024680040776729583740234375; } +}; + + + + + + +struct lanczos17m64 : public std::integral_constant +{ + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[17] = { + static_cast(boost::math::tools::make_big_value( 553681095419291969.2230556393350368550504, "553681095419291969.2230556393350368550504", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 731918863887667017.2511276782146694632234, "731918863887667017.2511276782146694632234", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 453393234285807339.4627124634539085143364, "453393234285807339.4627124634539085143364", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 174701893724452790.3546219631779712198035, "174701893724452790.3546219631779712198035", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 46866125995234723.82897281620357050883077, "46866125995234723.82897281620357050883077", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9281280675933215.169109622777099699054272, "9281280675933215.169109622777099699054272", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1403600894156674.551057997617468721789536, "1403600894156674.551057997617468721789536", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 165345984157572.7305349809894046783973837, "165345984157572.7305349809894046783973837", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 15333629842677.31531822808737907246817024, "15333629842677.31531822808737907246817024", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1123152927963.956626161137169462874517318, "1123152927963.956626161137169462874517318", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 64763127437.92329018717775593533620578237, "64763127437.92329018717775593533620578237", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2908830362.657527782848828237106640944457, "2908830362.657527782848828237106640944457", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 99764700.56999856729959383751710026787811, "99764700.56999856729959383751710026787811", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2525791.604886139959837791244686290089331, "2525791.604886139959837791244686290089331", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 44516.94034970167828580039370201346554872, "44516.94034970167828580039370201346554872", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 488.0063567520005730476791712814838113252, "488.0063567520005730476791712814838113252", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.50662827463100050241576877135758834683, "2.50662827463100050241576877135758834683", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint64_t denom[17] = { + 0uLL, + 1307674368000uLL, + 4339163001600uLL, + 6165817614720uLL, + 5056995703824uLL, + 2706813345600uLL, + 1009672107080uLL, + 272803210680uLL, + 54631129553uLL, + 8207628000uLL, + 928095740uLL, + 78558480uLL, + 4899622uLL, + 218400uLL, + 6580uLL, + 120uLL, + 1uLL + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[17] = { + static_cast(boost::math::tools::make_big_value( 2715894658327.717377557655133124376674911, "2715894658327.717377557655133124376674911", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3590179526097.912105038525528721129550434, "3590179526097.912105038525528721129550434", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2223966599737.814969312127353235818710172, "2223966599737.814969312127353235818710172", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 856940834518.9562481809925866825485883417, "856940834518.9562481809925866825485883417", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 229885871668.749072933597446453399395469, "229885871668.749072933597446453399395469", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 45526171687.54610815813502794395753410032, "45526171687.54610815813502794395753410032", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6884887713.165178784550917647709216424823, "6884887713.165178784550917647709216424823", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 811048596.1407531864760282453852372777439, "811048596.1407531864760282453852372777439", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 75213915.96540822314499613623119501704812, "75213915.96540822314499613623119501704812", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5509245.417224265151697527957954952830126, "5509245.417224265151697527957954952830126", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 317673.5368435419126714931842182369574221, "317673.5368435419126714931842182369574221", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 14268.27989845035520147014373320337523596, "14268.27989845035520147014373320337523596", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 489.3618720403263670213909083601787814792, "489.3618720403263670213909083601787814792", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12.38941330038454449295883217865458609584, "12.38941330038454449295883217865458609584", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2183627389504614963941574507281683147897, "0.2183627389504614963941574507281683147897", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.002393749522058449186690627996063983095463, "0.002393749522058449186690627996063983095463", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.1229541408909435212800785616808830746135e-4, "0.1229541408909435212800785616808830746135e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const std::uint64_t denom[17] = { + 0uLL, + 1307674368000uLL, + 4339163001600uLL, + 6165817614720uLL, + 5056995703824uLL, + 2706813345600uLL, + 1009672107080uLL, + 272803210680uLL, + 54631129553uLL, + 8207628000uLL, + 928095740uLL, + 78558480uLL, + 4899622uLL, + 218400uLL, + 6580uLL, + 120uLL, + 1uLL + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[16] = { + static_cast(boost::math::tools::make_big_value( 4.493645054286536365763334986866616581265, "4.493645054286536365763334986866616581265", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -16.95716370392468543800733966378143997694, "-16.95716370392468543800733966378143997694", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 26.19196892983737527836811770970479846644, "26.19196892983737527836811770970479846644", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -21.3659076437988814488356323758179283908, "-21.3659076437988814488356323758179283908", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.913992596774556590710751047594507535764, "9.913992596774556590710751047594507535764", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.62888300018780199210536267080940382158, "-2.62888300018780199210536267080940382158", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.3807056693542503606384861890663080735588, "0.3807056693542503606384861890663080735588", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.02714647489697685807340312061034730486958, "-0.02714647489697685807340312061034730486958", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0007815484715461206757220527133967191796747, "0.0007815484715461206757220527133967191796747", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.6108630817371501052576880554048972272435e-5, "-0.6108630817371501052576880554048972272435e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.5037380238864836824167713635482801545086e-8, "0.5037380238864836824167713635482801545086e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1483232144262638814568926925964858237006e-13, "-0.1483232144262638814568926925964858237006e-13", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.1346609158752142460943888149156716841693e-14, "0.1346609158752142460943888149156716841693e-14", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.660492688923978805315914918995410340796e-15, "-0.660492688923978805315914918995410340796e-15", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.1472114697343266749193617793755763792681e-15, "0.1472114697343266749193617793755763792681e-15", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1410901942033374651613542904678399264447e-16, "-0.1410901942033374651613542904678399264447e-16", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[16] = { + static_cast(boost::math::tools::make_big_value( 23.56409085052261327114594781581930373708, "23.56409085052261327114594781581930373708", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -88.92116338946308797946237246006238652361, "-88.92116338946308797946237246006238652361", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 137.3472822086847596961177383569603988797, "137.3472822086847596961177383569603988797", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -112.0400438263562152489272966461114852861, "-112.0400438263562152489272966461114852861", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 51.98768915202973863076166956576777843805, "51.98768915202973863076166956576777843805", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -13.78552090862799358221343319574970124948, "-13.78552090862799358221343319574970124948", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.996371068830872830250406773917646121742, "1.996371068830872830250406773917646121742", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.1423525874909934506274738563671862576161, "-0.1423525874909934506274738563671862576161", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.004098338646046865122459664947239111298524, "0.004098338646046865122459664947239111298524", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.3203286637326511000882086573060433529094e-4, "-0.3203286637326511000882086573060433529094e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.2641536751640138646146395939004587594407e-7, "0.2641536751640138646146395939004587594407e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.7777876663062235617693516558976641009819e-13, "-0.7777876663062235617693516558976641009819e-13", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.7061443477097101636871806229515157914789e-14, "0.7061443477097101636871806229515157914789e-14", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.3463537849537988455590834887691613484813e-14, "-0.3463537849537988455590834887691613484813e-14", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.7719578215795234036320348283011129450595e-15, "0.7719578215795234036320348283011129450595e-15", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.7398586479708476329563577384044188912075e-16, "-0.7398586479708476329563577384044188912075e-16", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 12.2252227365970611572265625; } +}; + + + + + + +struct lanczos24m113 : public std::integral_constant +{ + + + + template + static T lanczos_sum(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[24] = { + static_cast(boost::math::tools::make_big_value( 2029889364934367661624137213253.22102954656825019111612712252027267955023987678816620961507, "2029889364934367661624137213253.22102954656825019111612712252027267955023987678816620961507", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2338599599286656537526273232565.2727349714338768161421882478417543004440597874814359063158, "2338599599286656537526273232565.2727349714338768161421882478417543004440597874814359063158", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1288527989493833400335117708406.3953711906175960449186720680201425446299360322830739180195, "1288527989493833400335117708406.3953711906175960449186720680201425446299360322830739180195", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 451779745834728745064649902914.550539158066332484594436145043388809847364393288132164411521, "451779745834728745064649902914.550539158066332484594436145043388809847364393288132164411521", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 113141284461097964029239556815.291212318665536114012605167994061291631013303788706545334708, "113141284461097964029239556815.291212318665536114012605167994061291631013303788706545334708", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 21533689802794625866812941616.7509064680880468667055339259146063256555368135236149614592432, "21533689802794625866812941616.7509064680880468667055339259146063256555368135236149614592432", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3235510315314840089932120340.71494940111731241353655381919722177496659303550321056514776757, "3235510315314840089932120340.71494940111731241353655381919722177496659303550321056514776757", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 393537392344185475704891959.081297108513472083749083165179784098220158201055270548272414314, "393537392344185475704891959.081297108513472083749083165179784098220158201055270548272414314", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 39418265082950435024868801.5005452240816902251477336582325944930252142622315101857742955673, "39418265082950435024868801.5005452240816902251477336582325944930252142622315101857742955673", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3290158764187118871697791.05850632319194734270969161036889516414516566453884272345518372696, "3290158764187118871697791.05850632319194734270969161036889516414516566453884272345518372696", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 230677110449632078321772.618245845856640677845629174549731890660612368500786684333975350954, "230677110449632078321772.618245845856640677845629174549731890660612368500786684333975350954", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 13652233645509183190158.5916189185218250859402806777406323001463296297553612462737044693697, "13652233645509183190158.5916189185218250859402806777406323001463296297553612462737044693697", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 683661466754325350495.216655026531202476397782296585200982429378069417193575896602446904762, "683661466754325350495.216655026531202476397782296585200982429378069417193575896602446904762", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 28967871782219334117.0122379171041074970463982134039409352925258212207710168851968215545064, "28967871782219334117.0122379171041074970463982134039409352925258212207710168851968215545064", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1036104088560167006.2022834098572346459442601718514554488352117620272232373622553429728555, "1036104088560167006.2022834098572346459442601718514554488352117620272232373622553429728555", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 31128490785613152.8380102669349814751268126141105475287632676569913936040772990253369753962, "31128490785613152.8380102669349814751268126141105475287632676569913936040772990253369753962", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 779327504127342.536207878988196814811198475410572992436243686674896894543126229424358472541, "779327504127342.536207878988196814811198475410572992436243686674896894543126229424358472541", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 16067543181294.643350688789124777020407337133926174150582333950666044399234540521336771876, "16067543181294.643350688789124777020407337133926174150582333950666044399234540521336771876", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 268161795520.300916569439413185778557212729611517883948634711190170998896514639936969855484, "268161795520.300916569439413185778557212729611517883948634711190170998896514639936969855484", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3533216359.10528191668842486732408440112703691790824611391987708562111396961696753452085068, "3533216359.10528191668842486732408440112703691790824611391987708562111396961696753452085068", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 35378979.5479656110614685178752543826919239614088343789329169535932709470588426584501652577, "35378979.5479656110614685178752543826919239614088343789329169535932709470588426584501652577", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 253034.881362204346444503097491737872930637147096453940375713745904094735506180552724766444, "253034.881362204346444503097491737872930637147096453940375713745904094735506180552724766444", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1151.61895453463992438325318456328526085882924197763140514450975619271382783957699017875304, "1151.61895453463992438325318456328526085882924197763140514450975619271382783957699017875304", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.50662827463100050241576528481104515966515623051532908941425544355490413900497467936202516, "2.50662827463100050241576528481104515966515623051532908941425544355490413900497467936202516", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[24] = { + static_cast(boost::math::tools::make_big_value( 0.0, "0.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.112400072777760768e22, "0.112400072777760768e22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.414847677933545472e22, "0.414847677933545472e22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6756146673770930688000.0, "6756146673770930688000.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6548684852703068697600.0, "6548684852703068697600.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4280722865357147142912.0, "4280722865357147142912.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2021687376910682741568.0, "2021687376910682741568.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 720308216440924653696.0, "720308216440924653696.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 199321978221066137360.0, "199321978221066137360.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 43714229649594412832.0, "43714229649594412832.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7707401101297361068.0, "7707401101297361068.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1103230881185949736.0, "1103230881185949736.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 129006659818331295.0, "129006659818331295.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12363045847086207.0, "12363045847086207.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 971250460939913.0, "971250460939913.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 62382416421941.0, "62382416421941.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3256091103430.0, "3256091103430.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 136717357942.0, "136717357942.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4546047198.0, "4546047198.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 116896626.0, "116896626.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2240315.0, "2240315.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 30107.0, "30107.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 253.0, "253.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + lanczos_initializer::force_instantiate(); + static const T num[24] = { + static_cast(boost::math::tools::make_big_value( 3035162425359883494754.02878223286972654682199012688209026810841953293372712802258398358538, "3035162425359883494754.02878223286972654682199012688209026810841953293372712802258398358538", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3496756894406430103600.16057175075063458536101374170860226963245118484234495645518505519827, "3496756894406430103600.16057175075063458536101374170860226963245118484234495645518505519827", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1926652656689320888654.01954015145958293168365236755537645929361841917596501251362171653478, "1926652656689320888654.01954015145958293168365236755537645929361841917596501251362171653478", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 675517066488272766316.083023742440619929434602223726894748181327187670231286180156444871912, "675517066488272766316.083023742440619929434602223726894748181327187670231286180156444871912", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 169172853104918752780.086262749564831660238912144573032141700464995906149421555926000038492, "169172853104918752780.086262749564831660238912144573032141700464995906149421555926000038492", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 32197935167225605785.6444116302160245528783954573163541751756353183343357329404208062043808, "32197935167225605785.6444116302160245528783954573163541751756353183343357329404208062043808", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4837849542714083249.37587447454818124327561966323276633775195138872820542242539845253171632, "4837849542714083249.37587447454818124327561966323276633775195138872820542242539845253171632", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 588431038090493242.308438203986649553459461798968819276505178004064031201740043314534404158, "588431038090493242.308438203986649553459461798968819276505178004064031201740043314534404158", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 58939585141634058.6206417889192563007809470547755357240808035714047014324843817783741669733, "58939585141634058.6206417889192563007809470547755357240808035714047014324843817783741669733", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4919561837722192.82991866530802080996138070630296720420704876654726991998309206256077395868, "4919561837722192.82991866530802080996138070630296720420704876654726991998309206256077395868", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 344916580244240.407442753122831512004021081677987651622305356145640394384006997569631719101, "344916580244240.407442753122831512004021081677987651622305356145640394384006997569631719101", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 20413302960687.8250598845969238472629322716685686993835561234733641729957841485003560103066, "20413302960687.8250598845969238472629322716685686993835561234733641729957841485003560103066", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1022234822943.78400752460970689311934727763870970686747383486600540378889311406851534545789, "1022234822943.78400752460970689311934727763870970686747383486600540378889311406851534545789", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 43313787191.9821354846952908076307094286897439975815501673706144217246093900159173598852503, "43313787191.9821354846952908076307094286897439975815501673706144217246093900159173598852503", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1549219505.59667418528481770869280437577581951167003505825834192510436144666564648361001914, "1549219505.59667418528481770869280437577581951167003505825834192510436144666564648361001914", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 46544421.1998761919380541579358096705925369145324466147390364674998568485110045455014967149, "46544421.1998761919380541579358096705925369145324466147390364674998568485110045455014967149", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1165278.06807504975090675074910052763026564833951579556132777702952882101173607903881127542, "1165278.06807504975090675074910052763026564833951579556132777702952882101173607903881127542", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 24024.759267256769471083727721827405338569868270177779485912486668586611981795179894572115, "24024.759267256769471083727721827405338569868270177779485912486668586611981795179894572115", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 400.965008113421955824358063769761286758463521789765880962939528760888853281920872064838918, "400.965008113421955824358063769761286758463521789765880962939528760888853281920872064838918", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.28299015654478269617039029170846385138134929147421558771949982217659507918482272439717603, "5.28299015654478269617039029170846385138134929147421558771949982217659507918482272439717603", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0528999024412510102409256676599360516359062802002483877724963720047531347449011629466149805, "0.0528999024412510102409256676599360516359062802002483877724963720047531347449011629466149805", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.000378346710654740685454266569593414561162134092347356968516522170279688139165340746957511115, "0.000378346710654740685454266569593414561162134092347356968516522170279688139165340746957511115", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.172194142179211139195966608011235161516824700287310869949928393345257114743230967204370963e-5, "0.172194142179211139195966608011235161516824700287310869949928393345257114743230967204370963e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.374799931707148855771381263542708435935402853962736029347951399323367765509988401336565436e-8, "0.374799931707148855771381263542708435935402853962736029347951399323367765509988401336565436e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[24] = { + static_cast(boost::math::tools::make_big_value( 0.0, "0.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.112400072777760768e22, "0.112400072777760768e22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.414847677933545472e22, "0.414847677933545472e22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6756146673770930688000.0, "6756146673770930688000.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6548684852703068697600.0, "6548684852703068697600.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4280722865357147142912.0, "4280722865357147142912.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2021687376910682741568.0, "2021687376910682741568.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 720308216440924653696.0, "720308216440924653696.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 199321978221066137360.0, "199321978221066137360.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 43714229649594412832.0, "43714229649594412832.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7707401101297361068.0, "7707401101297361068.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1103230881185949736.0, "1103230881185949736.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 129006659818331295.0, "129006659818331295.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 12363045847086207.0, "12363045847086207.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 971250460939913.0, "971250460939913.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 62382416421941.0, "62382416421941.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3256091103430.0, "3256091103430.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 136717357942.0, "136717357942.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4546047198.0, "4546047198.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 116896626.0, "116896626.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2240315.0, "2240315.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 30107.0, "30107.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 253.0, "253.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[23] = { + static_cast(boost::math::tools::make_big_value( 7.4734083002469026177867421609938203388868806387315406134072298925733950040583068760685908, "7.4734083002469026177867421609938203388868806387315406134072298925733950040583068760685908", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -50.4225805042247530267317342133388132970816607563062253708655085754357843064134941138154171, "-50.4225805042247530267317342133388132970816607563062253708655085754357843064134941138154171", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 152.288200621747008570784082624444625293884063492396162110698238568311211546361189979357019, "152.288200621747008570784082624444625293884063492396162110698238568311211546361189979357019", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -271.894959539150384169327513139846971255640842175739337449692360299099322742181325023644769, "-271.894959539150384169327513139846971255640842175739337449692360299099322742181325023644769", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 319.240102980202312307047586791116902719088581839891008532114107693294261542869734803906793, "319.240102980202312307047586791116902719088581839891008532114107693294261542869734803906793", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -259.493144143048088289689500935518073716201741349569864988870534417890269467336454358361499, "-259.493144143048088289689500935518073716201741349569864988870534417890269467336454358361499", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 149.747518319689708813209645403067832020714660918583227716408482877303972685262557460145835, "149.747518319689708813209645403067832020714660918583227716408482877303972685262557460145835", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -61.9261301009341333289187201425188698128684426428003249782448828881580630606817104372760037, "-61.9261301009341333289187201425188698128684426428003249782448828881580630606817104372760037", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 18.3077524177286961563937379403377462608113523887554047531153187277072451294845795496072365, "18.3077524177286961563937379403377462608113523887554047531153187277072451294845795496072365", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.82011322251948043097070160584761236869363471824695092089556195047949392738162970152230254, "-3.82011322251948043097070160584761236869363471824695092089556195047949392738162970152230254", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.549382685505691522516705902336780999493262538301283190963770663549981309645795228539620711, "0.549382685505691522516705902336780999493262538301283190963770663549981309645795228539620711", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.0524814679715180697633723771076668718265358076235229045603747927518423453658004287459638024, "-0.0524814679715180697633723771076668718265358076235229045603747927518423453658004287459638024", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.00315392664003333528534120626687784812050217700942910879712808180705014754163256855643360698, "0.00315392664003333528534120626687784812050217700942910879712808180705014754163256855643360698", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.000110098373127648510519799564665442121339511198561008748083409549601095293123407080388658329, "-0.000110098373127648510519799564665442121339511198561008748083409549601095293123407080388658329", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.19809382866681658224945717689377373458866950897791116315219376038432014207446832310901893e-5, "0.19809382866681658224945717689377373458866950897791116315219376038432014207446832310901893e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.152278977408600291408265615203504153130482270424202400677280558181047344681214058227949755e-7, "-0.152278977408600291408265615203504153130482270424202400677280558181047344681214058227949755e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.364344768076106268872239259083188037615571711218395765792787047015406264051536972018235217e-10, "0.364344768076106268872239259083188037615571711218395765792787047015406264051536972018235217e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.148897510480440424971521542520683536298361220674662555578951242811522959610991621951203526e-13, "-0.148897510480440424971521542520683536298361220674662555578951242811522959610991621951203526e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.261199241161582662426512749820666625442516059622425213340053324061794752786482115387573582e-18, "0.261199241161582662426512749820666625442516059622425213340053324061794752786482115387573582e-18", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.780072664167099103420998436901014795601783313858454665485256897090476089641613851903791529e-24, "-0.780072664167099103420998436901014795601783313858454665485256897090476089641613851903791529e-24", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.303465867587106629530056603454807425512962762653755513440561256044986695349304176849392735e-24, "0.303465867587106629530056603454807425512962762653755513440561256044986695349304176849392735e-24", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.615420597971283870342083342286977366161772327800327789325710571275345878439656918541092056e-25, "-0.615420597971283870342083342286977366161772327800327789325710571275345878439656918541092056e-25", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.499641233843540749369110053005439398774706583601830828776209650445427083113181961630763702e-26, "0.499641233843540749369110053005439398774706583601830828776209650445427083113181961630763702e-26", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(k*dz + k*k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + lanczos_initializer::force_instantiate(); + static const T d[23] = { + static_cast(boost::math::tools::make_big_value( 61.4165001061101455341808888883960361969557848005400286332291451422461117307237198559485365, "61.4165001061101455341808888883960361969557848005400286332291451422461117307237198559485365", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -414.372973678657049667308134761613915623353625332248315105320470271523320700386200587519147, "-414.372973678657049667308134761613915623353625332248315105320470271523320700386200587519147", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1251.50505818554680171298972755376376836161706773644771875668053742215217922228357204561873, "1251.50505818554680171298972755376376836161706773644771875668053742215217922228357204561873", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2234.43389421602399514176336175766511311493214354568097811220122848998413358085613880612158, "-2234.43389421602399514176336175766511311493214354568097811220122848998413358085613880612158", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2623.51647746991904821899989145639147785427273427135380151752779100215839537090464785708684, "2623.51647746991904821899989145639147785427273427135380151752779100215839537090464785708684", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2132.51572435428751962745870184529534443305617818870214348386131243463614597272260797772423, "-2132.51572435428751962745870184529534443305617818870214348386131243463614597272260797772423", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1230.62572059218405766499842067263311220019173335523810725664442147670956427061920234820189, "1230.62572059218405766499842067263311220019173335523810725664442147670956427061920234820189", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -508.90919151163744999377586956023909888833335885805154492270846381061182696305011395981929, "-508.90919151163744999377586956023909888833335885805154492270846381061182696305011395981929", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 150.453184562246579758706538566480316921938628645961177699894388251635886834047343195475395, "150.453184562246579758706538566480316921938628645961177699894388251635886834047343195475395", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -31.3937061525822497422230490071156186113405446381476081565548185848237169870395131828731397, "-31.3937061525822497422230490071156186113405446381476081565548185848237169870395131828731397", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.51482916590287954234936829724231512565732528859217337795452389161322923867318809206313688, "4.51482916590287954234936829724231512565732528859217337795452389161322923867318809206313688", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.431292919341108177524462194102701868233551186625103849565527515201492276412231365776131952, "-0.431292919341108177524462194102701868233551186625103849565527515201492276412231365776131952", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.0259189820815586225636729971503340447445001375909094681698918294680345547092233915092128323, "0.0259189820815586225636729971503340447445001375909094681698918294680345547092233915092128323", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.000904788882557558697594884691337532557729219389814315972435534723829065673966567231504429712, "-0.000904788882557558697594884691337532557729219389814315972435534723829065673966567231504429712", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.162793589759218213439218473348810982422449144393340433592232065020562974405674317564164312e-4, "0.162793589759218213439218473348810982422449144393340433592232065020562974405674317564164312e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.125142926178202562426432039899709511761368233479483128438847484617555752948755923647214487e-6, "-0.125142926178202562426432039899709511761368233479483128438847484617555752948755923647214487e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.299418680048132583204152682950097239197934281178261879500770485862852229898797687301941982e-9, "0.299418680048132583204152682950097239197934281178261879500770485862852229898797687301941982e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.122364035267809278675627784883078206654408225276233049012165202996967011873995261617995421e-12, "-0.122364035267809278675627784883078206654408225276233049012165202996967011873995261617995421e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.21465364366598631597052073538883430194257709353929022544344097235100199405814005393447785e-17, "0.21465364366598631597052073538883430194257709353929022544344097235100199405814005393447785e-17", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.641064035802907518396608051803921688237330857546406669209280666066685733941549058513986818e-23, "-0.641064035802907518396608051803921688237330857546406669209280666066685733941549058513986818e-23", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.249388374622173329690271566855185869111237201309011956145463506483151054813346819490278951e-23, "0.249388374622173329690271566855185869111237201309011956145463506483151054813346819490278951e-23", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.505752900177513489906064295001851463338022055787536494321532352380960774349054239257683149e-24, "-0.505752900177513489906064295001851463338022055787536494321532352380960774349054239257683149e-24", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.410605371184590959139968810080063542546949719163227555918846829816144878123034347778284006e-25, "0.410605371184590959139968810080063542546949719163227555918846829816144878123034347778284006e-25", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) + { + result += (-d[k-1]*dz)/(z + k*z + k*k - 1); + } + return result; + } + + static double g(){ return 20.3209821879863739013671875; } +}; + + + + + + + +struct lanczos27MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[27] = { + static_cast(boost::math::tools::make_big_value( 2.532923291341302819860952064783714673718970e+36, "2.532923291341302819860952064783714673718970e+36", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.715272050979243637524956158081893927075092e+36, "2.715272050979243637524956158081893927075092e+36", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.399396313336459710065708403038293278484916e+36, "1.399396313336459710065708403038293278484916e+36", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.615805213483907585030394968151583590083805e+35, "4.615805213483907585030394968151583590083805e+35", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.094287593119694642121339924355455488336630e+35, "1.094287593119694642121339924355455488336630e+35", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.985179143643083871895846729884916046817583e+34, "1.985179143643083871895846729884916046817583e+34", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.864723387203319421361199873281888626383507e+33, "2.864723387203319421361199873281888626383507e+33", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.374651939493419385833371654981557918551584e+32, "3.374651939493419385833371654981557918551584e+32", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.304504350810987437240912594601486056121725e+31, "3.304504350810987437240912594601486056121725e+31", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.724892917231894382998818728699010291796660e+30, "2.724892917231894382998818728699010291796660e+30", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.909901039551708500588401626148435467434009e+29, "1.909901039551708500588401626148435467434009e+29", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.145381204249362220411918333792713760478856e+28, "1.145381204249362220411918333792713760478856e+28", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.902980366355225260615014098246446681081078e+26, "5.902980366355225260615014098246446681081078e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.620997933261144559370948440813656891792187e+25, "2.620997933261144559370948440813656891792187e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.003441440382636640319535096309665505136930e+24, "1.003441440382636640319535096309665505136930e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.309721390821762354780404195884829522953769e+22, "3.309721390821762354780404195884829522953769e+22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.381514076593540726655991152770953882150136e+20, "9.381514076593540726655991152770953882150136e+20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.275266040978137565809877941293859174071955e+19, "2.275266040978137565809877941293859174071955e+19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.690398430937632687996992361090819887063422e+17, "4.690398430937632687996992361090819887063422e+17", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.142411407304237744553849404860811146407986e+15, "8.142411407304237744553849404860811146407986e+15", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.174971623395676312463521417132401487856454e+14, "1.174971623395676312463521417132401487856454e+14", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.384092119107453943335286646923309490786229e+12, "1.384092119107453943335286646923309490786229e+12", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.296932429990667045419860753608558102709582e+10, "1.296932429990667045419860753608558102709582e+10", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.299378037650538629629318998114044963408825e+07, "9.299378037650538629629318998114044963408825e+07", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.792561328661952922209314899668849919321249e+05, "4.792561328661952922209314899668849919321249e+05", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.580741273679785112052701460119954412080073e+03, "1.580741273679785112052701460119954412080073e+03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415765284811045253005320e+00, "2.506628274631000502415765284811045253005320e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[27] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.551121004333098598400000000000000000000000e+25, "1.551121004333098598400000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.919012881170120359936000000000000000000000e+25, "5.919012881170120359936000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.004801715483511615488000000000000000000000e+26, "1.004801715483511615488000000000000000000000e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.023395306017446756725760000000000000000000e+26, "1.023395306017446756725760000000000000000000e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.087414531983767267719680000000000000000000e+25, "7.087414531983767267719680000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.577035564590760682636262400000000000000000e+25, "3.577035564590760682636262400000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.374646821796792697868000000000000000000000e+25, "1.374646821796792697868000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.144457803247115877036800000000000000000000e+24, "4.144457803247115877036800000000000000000000e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.001369304512841374110000000000000000000000e+24, "1.001369304512841374110000000000000000000000e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.969281004511108202428800000000000000000000e+23, "1.969281004511108202428800000000000000000000e+23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.188201437529851278250000000000000000000000e+22, "3.188201437529851278250000000000000000000000e+22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.284218746244111474800000000000000000000000e+21, "4.284218746244111474800000000000000000000000e+21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.805445587427335451250000000000000000000000e+20, "4.805445587427335451250000000000000000000000e+20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.514594692699448186500000000000000000000000e+19, "4.514594692699448186500000000000000000000000e+19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.557372853474553750000000000000000000000000e+18, "3.557372853474553750000000000000000000000000e+18", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.349615694227860500000000000000000000000000e+17, "2.349615694227860500000000000000000000000000e+17", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.297275331854287500000000000000000000000000e+16, "1.297275331854287500000000000000000000000000e+16", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.956673043671350000000000000000000000000000e+14, "5.956673043671350000000000000000000000000000e+14", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.256393782500000000000000000000000000000000e+13, "2.256393782500000000000000000000000000000000e+13", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.968295763000000000000000000000000000000000e+11, "6.968295763000000000000000000000000000000000e+11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.724710487500000000000000000000000000000000e+10, "1.724710487500000000000000000000000000000000e+10", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.336854950000000000000000000000000000000000e+08, "3.336854950000000000000000000000000000000000e+08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.858750000000000000000000000000000000000000e+06, "4.858750000000000000000000000000000000000000e+06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.005000000000000000000000000000000000000000e+04, "5.005000000000000000000000000000000000000000e+04", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.250000000000000000000000000000000000000000e+02, "3.250000000000000000000000000000000000000000e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[27] = { + static_cast(boost::math::tools::make_big_value( 4.630539114451826442425094380936505531231478e+25, "4.630539114451826442425094380936505531231478e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.963898228350662244301785145431331232866294e+25, "4.963898228350662244301785145431331232866294e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.558292778812387748738731408569861630189290e+25, "2.558292778812387748738731408569861630189290e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.438339470758124934572462000795083198080916e+24, "8.438339470758124934572462000795083198080916e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.000511235267926346573212315280041509763731e+24, "2.000511235267926346573212315280041509763731e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.629185970715063928416526096935558921044815e+23, "3.629185970715063928416526096935558921044815e+23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.237116237146422484431753186953979152997281e+22, "5.237116237146422484431753186953979152997281e+22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.169337167415775727114018906990954798102547e+21, "6.169337167415775727114018906990954798102547e+21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.041097534463262894898495303906833076469281e+20, "6.041097534463262894898495303906833076469281e+20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.981486521549315574859643064948741979243976e+19, "4.981486521549315574859643064948741979243976e+19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.491567035847004398885838650781864506656075e+18, "3.491567035847004398885838650781864506656075e+18", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.093917524216073202169716871304960622121045e+17, "2.093917524216073202169716871304960622121045e+17", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.079147622499629876874169792116583887362096e+16, "1.079147622499629876874169792116583887362096e+16", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.791551915666662583520458128259897770660473e+14, "4.791551915666662583520458128259897770660473e+14", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.834431723470453391466841656396291574724498e+13, "1.834431723470453391466841656396291574724498e+13", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.050635015489291434258728317621551605496937e+11, "6.050635015489291434258728317621551605496937e+11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.715072384266421431637543951156767586591045e+10, "1.715072384266421431637543951156767586591045e+10", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.159505514655385281007353699906486901798470e+08, "4.159505514655385281007353699906486901798470e+08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.574706336771416438731056639147393961539411e+06, "8.574706336771416438731056639147393961539411e+06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.488547033239016552342729952719496931402330e+05, "1.488547033239016552342729952719496931402330e+05", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.148012961586177396403312787979484589898276e+03, "2.148012961586177396403312787979484589898276e+03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.530314564772178162122057449947469958774484e+01, "2.530314564772178162122057449947469958774484e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.370974425637913452858480025228307253546963e-01, "2.370974425637913452858480025228307253546963e-01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.700056764080375263450528442694493496437080e-03, "1.700056764080375263450528442694493496437080e-03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.761474446005270789145652778771406388702068e-06, "8.761474446005270789145652778771406388702068e-06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.889816806780013044430000551700375309307825e-08, "2.889816806780013044430000551700375309307825e-08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.582468135039046226997146555551548992616343e-11, "4.582468135039046226997146555551548992616343e-11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[27] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.551121004333098598400000000000000000000000e+25, "1.551121004333098598400000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.919012881170120359936000000000000000000000e+25, "5.919012881170120359936000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.004801715483511615488000000000000000000000e+26, "1.004801715483511615488000000000000000000000e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.023395306017446756725760000000000000000000e+26, "1.023395306017446756725760000000000000000000e+26", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.087414531983767267719680000000000000000000e+25, "7.087414531983767267719680000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.577035564590760682636262400000000000000000e+25, "3.577035564590760682636262400000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.374646821796792697868000000000000000000000e+25, "1.374646821796792697868000000000000000000000e+25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.144457803247115877036800000000000000000000e+24, "4.144457803247115877036800000000000000000000e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.001369304512841374110000000000000000000000e+24, "1.001369304512841374110000000000000000000000e+24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.969281004511108202428800000000000000000000e+23, "1.969281004511108202428800000000000000000000e+23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.188201437529851278250000000000000000000000e+22, "3.188201437529851278250000000000000000000000e+22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.284218746244111474800000000000000000000000e+21, "4.284218746244111474800000000000000000000000e+21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.805445587427335451250000000000000000000000e+20, "4.805445587427335451250000000000000000000000e+20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.514594692699448186500000000000000000000000e+19, "4.514594692699448186500000000000000000000000e+19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.557372853474553750000000000000000000000000e+18, "3.557372853474553750000000000000000000000000e+18", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.349615694227860500000000000000000000000000e+17, "2.349615694227860500000000000000000000000000e+17", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.297275331854287500000000000000000000000000e+16, "1.297275331854287500000000000000000000000000e+16", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.956673043671350000000000000000000000000000e+14, "5.956673043671350000000000000000000000000000e+14", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.256393782500000000000000000000000000000000e+13, "2.256393782500000000000000000000000000000000e+13", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.968295763000000000000000000000000000000000e+11, "6.968295763000000000000000000000000000000000e+11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.724710487500000000000000000000000000000000e+10, "1.724710487500000000000000000000000000000000e+10", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.336854950000000000000000000000000000000000e+08, "3.336854950000000000000000000000000000000000e+08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.858750000000000000000000000000000000000000e+06, "4.858750000000000000000000000000000000000000e+06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.005000000000000000000000000000000000000000e+04, "5.005000000000000000000000000000000000000000e+04", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.250000000000000000000000000000000000000000e+02, "3.250000000000000000000000000000000000000000e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[34] = { + static_cast(boost::math::tools::make_big_value( 6.264579889722939745225908247624593169040293e+00, "6.264579889722939745225908247624593169040293e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.470545597111704235784909052092266897169254e+01, "-3.470545597111704235784909052092266897169254e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.398164226943527197542310295220360303173237e+01, "8.398164226943527197542310295220360303173237e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.166490739555248669771075340695671987349622e+02, "-1.166490739555248669771075340695671987349622e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.028101937812836112448434230485371426845812e+02, "1.028101937812836112448434230485371426845812e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.003050880354706854567842055875605768028585e+01, "-6.003050880354706854567842055875605768028585e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.355206767355338215012383892758889890708805e+01, "2.355206767355338215012383892758889890708805e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.173166763225116428638036856999036700963277e+00, "-6.173166763225116428638036856999036700963277e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.055748115088123667349396984075505516234940e+00, "1.055748115088123667349396984075505516234940e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.127784364612243323022358484127515048080935e-01, "-1.127784364612243323022358484127515048080935e-01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.013011055366411613813518259345336997226641e-03, "7.013011055366411613813518259345336997226641e-03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.271137289000937686705998821090835222190159e-04, "-2.271137289000937686705998821090835222190159e-04", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.195172534910278451113805217678979457290834e-06, "3.195172534910278451113805217678979457290834e-06", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.421890451863814077221239932785029648679973e-08, "-1.421890451863814077221239932785029648679973e-08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.066311611137421591999312557597869716741027e-11, "1.066311611137421591999312557597869716741027e-11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.797948012646761974584234409950319937184538e-16, "-2.797948012646761974584234409950319937184538e-16", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.274002995605577985657965320478056380380290e-22, "-5.274002995605577985657965320478056380380290e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.270091452696164640108774677242731307730848e-21, "2.270091452696164640108774677242731307730848e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.933040546739252731034872986511694993372995e-21, "-6.933040546739252731034872986511694993372995e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.405071936614348906224568346156522897751303e-20, "1.405071936614348906224568346156522897751303e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.105092450748689398417350156762592106638543e-20, "-2.105092450748689398417350156762592106638543e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.573335807137266819877752062372030042747590e-20, "2.573335807137266819877752062372030042747590e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.690602407074901259448169161354115161602278e-20, "-2.690602407074901259448169161354115161602278e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.445091932555604281164557526008785529455861e-20, "2.445091932555604281164557526008785529455861e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.932804556880430674197633802977544778784320e-20, "-1.932804556880430674197633802977544778784320e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.320001406610629373227596309759263536640140e-20, "1.320001406610629373227596309759263536640140e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.699733918513786660891771237627803608806010e-21, "-7.699733918513786660891771237627803608806010e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.776870859236169815307382842451635095251495e-21, "3.776870859236169815307382842451635095251495e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.526154769745297076196084765279504608995696e-21, "-1.526154769745297076196084765279504608995696e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.939458578626915680695594094484224178207306e-22, "4.939458578626915680695594094484224178207306e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.229538969055131478930409285699348366508295e-22, "-1.229538969055131478930409285699348366508295e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.207569067702627873429089508800955397620386e-23, "2.207569067702627873429089508800955397620386e-23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.542428477414786133402832964643707382175743e-24, "-2.542428477414786133402832964643707382175743e-24", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.409458057545117569935733339065832415295665e-25, "1.409458057545117569935733339065832415295665e-25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[34] = { + static_cast(boost::math::tools::make_big_value( 4.391991857844535020743473289228849738381662e+01, "4.391991857844535020743473289228849738381662e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.433141291692735004291785549611375831426138e+02, "-2.433141291692735004291785549611375831426138e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.887812040849956173864447000497922705559488e+02, "5.887812040849956173864447000497922705559488e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.178070869177285054991117755136346786974125e+02, "-8.178070869177285054991117755136346786974125e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.207850198088647199855281811058606257270817e+02, "7.207850198088647199855281811058606257270817e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.208638257131458956367681504789416772705762e+02, "-4.208638257131458956367681504789416772705762e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.651195950543217389263490876246883903526458e+02, "1.651195950543217389263490876246883903526458e+02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.327903648523876358512872196882929451369963e+01, "-4.327903648523876358512872196882929451369963e+01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.401672908678997114468388150043974540095678e+00, "7.401672908678997114468388150043974540095678e+00", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.906706968342945744899907670199667000072243e-01, "-7.906706968342945744899907670199667000072243e-01", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.916704391410548803397953511596928808893685e-02, "4.916704391410548803397953511596928808893685e-02", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.592256249729202493268939584019491192080080e-03, "-1.592256249729202493268939584019491192080080e-03", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.240081857804364904696255913500139170039349e-05, "2.240081857804364904696255913500139170039349e-05", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.968635402954290441376528527568797927543768e-08, "-9.968635402954290441376528527568797927543768e-08", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.475731807209447934074840206826861054997914e-11, "7.475731807209447934074840206826861054997914e-11", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.961594409606987475034042150632670295904917e-15, "-1.961594409606987475034042150632670295904917e-15", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.697515016601028609216707527257479621172555e-21, "-3.697515016601028609216707527257479621172555e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.591523031442252914289458638424672100510104e-20, "1.591523031442252914289458638424672100510104e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.860638409502590149748648713304503849363893e-20, "-4.860638409502590149748648713304503849363893e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.850723614235842081434077716825371111986246e-20, "9.850723614235842081434077716825371111986246e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.475844999417373489569601576817086030522522e-19, "-1.475844999417373489569601576817086030522522e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.804122560714365990744061859839148408328067e-19, "1.804122560714365990744061859839148408328067e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.886336206511766947905039498619940334834436e-19, "-1.886336206511766947905039498619940334834436e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.714212931833249115161397417081604581762608e-19, "1.714212931833249115161397417081604581762608e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.355056847554880232469037060291577918972607e-19, "-1.355056847554880232469037060291577918972607e-19", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.254308400931922182743462783124793743058980e-20, "9.254308400931922182743462783124793743058980e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.398154269396277345367516583851274647578103e-20, "-5.398154269396277345367516583851274647578103e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.647900793652290520419156346839352858087685e-20, "2.647900793652290520419156346839352858087685e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.069961504286664892352397126472100106281531e-20, "-1.069961504286664892352397126472100106281531e-20", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.462971538614891132079878533424998572755101e-21, "3.462971538614891132079878533424998572755101e-21", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.620091428399885297009840750915836982112365e-22, "-8.620091428399885297009840750915836982112365e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.547689636281132331592940788973245529484744e-22, "1.547689636281132331592940788973245529484744e-22", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.782453950387991004107321678322483537333246e-23, "-1.782453950387991004107321678322483537333246e-23", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.881473972208065873607436095608077625677024e-25, "9.881473972208065873607436095608077625677024e-25", std::integral_constant::value) && ((134 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 2.472513680905104038743047567550092935562134e+01; } +}; + +inline double lanczos_g_near_1_and_2(const lanczos27MP&) +{ + return 17.03623256087303; +} + + + + + + + +struct lanczos35MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[35] = { + static_cast(boost::math::tools::make_big_value( 2.17215050716253100021302249837728942659410271586236104e+50, "2.17215050716253100021302249837728942659410271586236104e+50", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.51055117651708470336913962553466820524801246971658127e+50, "2.51055117651708470336913962553466820524801246971658127e+50", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.40813458996718289733677017073036013655624930344397267e+50, "1.40813458996718289733677017073036013655624930344397267e+50", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.10569518324826607478187974291222641098997506635019681e+49, "5.10569518324826607478187974291222641098997506635019681e+49", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.34502197565331471178368569687788687058240547971732391e+49, "1.34502197565331471178368569687788687058240547971732391e+49", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.74311603169690571192608960963509140372217014888512918e+48, "2.74311603169690571192608960963509140372217014888512918e+48", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.50656021978234091874071935392175934984492682009447097e+47, "4.50656021978234091874071935392175934984492682009447097e+47", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.12703102551730381018400796362603958419580969330315139e+46, "6.12703102551730381018400796362603958419580969330315139e+46", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.02844698442195350077632196816248435420923619452768200e+45, "7.02844698442195350077632196816248435420923619452768200e+45", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.90106767379334717236568166816961185224083190775430842e+44, "6.90106767379334717236568166816961185224083190775430842e+44", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.86371531667026447746284883480888667804130713757839681e+43, "5.86371531667026447746284883480888667804130713757839681e+43", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.34808948517797782155274346690360992144536507118093783e+42, "4.34808948517797782155274346690360992144536507118093783e+42", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.83232124439938458545786668616393415008373341980153072e+41, "2.83232124439938458545786668616393415008373341980153072e+41", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.62895707563068512468013948922815298700909218398406635e+40, "1.62895707563068512468013948922815298700909218398406635e+40", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.30384063116420066671650072267242339695473078925159324e+38, "8.30384063116420066671650072267242339695473078925159324e+38", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.76258309689585811716178198120267186946262194080905971e+37, "3.76258309689585811716178198120267186946262194080905971e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.51837231299916455171135124843484994848995300472356341e+36, "1.51837231299916455171135124843484994848995300472356341e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.46324357690180919340289798257560253430931750807924001e+34, "5.46324357690180919340289798257560253430931750807924001e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.75333853376321853646128997503611223620394342435525484e+33, "1.75333853376321853646128997503611223620394342435525484e+33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.01719517877315910652307531002686423847077617217874485e+31, "5.01719517877315910652307531002686423847077617217874485e+31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.27861878894319497853745513558138184450369083409359360e+30, "1.27861878894319497853745513558138184450369083409359360e+30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.89640024726662067702004632718605032785787967237099607e+28, "2.89640024726662067702004632718605032785787967237099607e+28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.81537701811791870172286588846619085013138846074815251e+26, "5.81537701811791870172286588846619085013138846074815251e+26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.03090758312551459302562064161308518889144037164899961e+25, "1.03090758312551459302562064161308518889144037164899961e+25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.60538569869661647274451913615710409703905629234367906e+23, "1.60538569869661647274451913615710409703905629234367906e+23", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.18176163448730621246454091850022844174919234685832508e+21, "2.18176163448730621246454091850022844174919234685832508e+21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.56586635256765282348264053213197702964352373258511008e+19, "2.56586635256765282348264053213197702964352373258511008e+19", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.58289895656990946427745668670352144404744258615044371e+17, "2.58289895656990946427745668670352144404744258615044371e+17", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.19373478903102411154024309088124853938046967389531861e+15, "2.19373478903102411154024309088124853938046967389531861e+15", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.54192605870424877025476980158698548681325282029269310e+13, "1.54192605870424877025476980158698548681325282029269310e+13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.73027427579217615249706012469272147499107562412573337e+10, "8.73027427579217615249706012469272147499107562412573337e+10", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.82675918536460865549992482360500962016208597062710654e+08, "3.82675918536460865549992482360500962016208597062710654e+08", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.21869956201943834772161655315196962519434419814106818e+06, "1.21869956201943834772161655315196962519434419814106818e+06", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.50897418653428667959996348205296461689142907811767371e+03, "2.50897418653428667959996348205296461689142907811767371e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.50662827463100050241576528481104525300698674060984055e+00, "2.50662827463100050241576528481104525300698674060984055e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[35] = { + static_cast(boost::math::tools::make_big_value( 0.00000000000000000000000000000000000000000000000000000e+00, "0.00000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.68331761881188649551819440128000000000000000000000000e+36, "8.68331761881188649551819440128000000000000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.55043336733310191803732770947072000000000000000000000e+37, "3.55043336733310191803732770947072000000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.55728779174162547080350866368102400000000000000000000e+37, "6.55728779174162547080350866368102400000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.37352350419052295388404251629977600000000000000000000e+37, "7.37352350419052295388404251629977600000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.72117566475005542296335706764492800000000000000000000e+37, "5.72117566475005542296335706764492800000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28417720643003773414159612967554252800000000000000000e+37, "3.28417720643003773414159612967554252800000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.45822739485943139719482682477713244160000000000000000e+37, "1.45822739485943139719482682477713244160000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.16476527817201997988283152951021977600000000000000000e+36, "5.16476527817201997988283152951021977600000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.49225481668254064104679479029764121600000000000000000e+36, "1.49225481668254064104679479029764121600000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.57726463942545496998486904826347776000000000000000000e+35, "3.57726463942545496998486904826347776000000000000000000e+35", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.20859297660335343156864734965859840000000000000000000e+34, "7.20859297660335343156864734965859840000000000000000000e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.23364307820330543590375511999050240000000000000000000e+34, "1.23364307820330543590375511999050240000000000000000000e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.80750015058176473779293385245398400000000000000000000e+33, "1.80750015058176473779293385245398400000000000000000000e+33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.28183125026789051815954180232544000000000000000000000e+32, "2.28183125026789051815954180232544000000000000000000000e+32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.49437224233918151570015089338400000000000000000000000e+31, "2.49437224233918151570015089338400000000000000000000000e+31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.37000480501772121324931003824000000000000000000000000e+30, "2.37000480501772121324931003824000000000000000000000000e+30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.96258640868140652967646352465000000000000000000000000e+29, "1.96258640868140652967646352465000000000000000000000000e+29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.41894262447739018035536664650000000000000000000000000e+28, "1.41894262447739018035536664650000000000000000000000000e+28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.96452376168568744680811480000000000000000000000000000e+26, "8.96452376168568744680811480000000000000000000000000000e+26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.94875410890088264440962800000000000000000000000000000e+25, "4.94875410890088264440962800000000000000000000000000000e+25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.38478815149246067334598000000000000000000000000000000e+24, "2.38478815149246067334598000000000000000000000000000000e+24", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.00124085806115519088380000000000000000000000000000000e+23, "1.00124085806115519088380000000000000000000000000000000e+23", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.65117470518809938644000000000000000000000000000000000e+21, "3.65117470518809938644000000000000000000000000000000000e+21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.15145312544238764840000000000000000000000000000000000e+20, "1.15145312544238764840000000000000000000000000000000000e+20", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.12192419709374919000000000000000000000000000000000000e+18, "3.12192419709374919000000000000000000000000000000000000e+18", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.22038661704031100000000000000000000000000000000000000e+16, "7.22038661704031100000000000000000000000000000000000000e+16", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.40979763670090400000000000000000000000000000000000000e+15, "1.40979763670090400000000000000000000000000000000000000e+15", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.29191290647440000000000000000000000000000000000000000e+13, "2.29191290647440000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.04437176604000000000000000000000000000000000000000000e+11, "3.04437176604000000000000000000000000000000000000000000e+11", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.21763644400000000000000000000000000000000000000000000e+09, "3.21763644400000000000000000000000000000000000000000000e+09", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.60169360000000000000000000000000000000000000000000000e+07, "2.60169360000000000000000000000000000000000000000000000e+07", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.51096000000000000000000000000000000000000000000000000e+05, "1.51096000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.61000000000000000000000000000000000000000000000000000e+02, "5.61000000000000000000000000000000000000000000000000000e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.00000000000000000000000000000000000000000000000000000e+00, "1.00000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[35] = { + static_cast(boost::math::tools::make_big_value( 2.84421398435712762388902267099927585742388886580864424e+37, "2.84421398435712762388902267099927585742388886580864424e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28731583799033736725852757551292030085556435695468295e+37, "3.28731583799033736725852757551292030085556435695468295e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.84381150359300352571680869181416248982215282642834936e+37, "1.84381150359300352571680869181416248982215282642834936e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.68539753215772969226355064737523321566208288321687448e+36, "6.68539753215772969226355064737523321566208288321687448e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.76117184320624276162478300964159399462275652881271996e+36, "1.76117184320624276162478300964159399462275652881271996e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.59183627116994441494601110756468114877940946273012852e+35, "3.59183627116994441494601110756468114877940946273012852e+35", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.90089018057779871758440184258134151304912092733579104e+34, "5.90089018057779871758440184258134151304912092733579104e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.02273473587728940068021671629793244969348874651645551e+33, "8.02273473587728940068021671629793244969348874651645551e+33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.20304883823127369598764418881022021049206245678741573e+32, "9.20304883823127369598764418881022021049206245678741573e+32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.03625836242722113759123056762610636251641913153595812e+31, "9.03625836242722113759123056762610636251641913153595812e+31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.67794913334462808923359541498599600753842936204419932e+30, "7.67794913334462808923359541498599600753842936204419932e+30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.69338859264140114791649895977363900871692586779302150e+29, "5.69338859264140114791649895977363900871692586779302150e+29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.70864158121145435408364940074910197916145829346031858e+28, "3.70864158121145435408364940074910197916145829346031858e+28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.13295647753179115743895667847873122731507276407230715e+27, "2.13295647753179115743895667847873122731507276407230715e+27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.08730493440263847356723847541024859440843056640671533e+26, "1.08730493440263847356723847541024859440843056640671533e+26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.92672649809905793239714364398097142490510744815940192e+24, "4.92672649809905793239714364398097142490510744815940192e+24", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.98815678372776973689475889094271298156568135487559824e+23, "1.98815678372776973689475889094271298156568135487559824e+23", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.15357141696015228406471054927723105303656292491717836e+21, "7.15357141696015228406471054927723105303656292491717836e+21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.29582156512528703674984172534752222415664014582498353e+20, "2.29582156512528703674984172534752222415664014582498353e+20", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.56951562180494343732211791410530161839249714612303326e+18, "6.56951562180494343732211791410530161839249714612303326e+18", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.67422350715677024140556410421772283993277946880053914e+17, "1.67422350715677024140556410421772283993277946880053914e+17", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.79254663081905790190270601146772274854974105071798035e+15, "3.79254663081905790190270601146772274854974105071798035e+15", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.61465496276608608941993297108655885737613121720232292e+13, "7.61465496276608608941993297108655885737613121720232292e+13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.34987044168298086318822469739196823360923972361455073e+12, "1.34987044168298086318822469739196823360923972361455073e+12", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.10209211537761991333937729340544738747931371426736883e+10, "2.10209211537761991333937729340544738747931371426736883e+10", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.85679879496413826670691454915567101976631415248412906e+08, "2.85679879496413826670691454915567101976631415248412906e+08", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.35974553231926272707704478737590721340254406209650188e+06, "3.35974553231926272707704478737590721340254406209650188e+06", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.38204802486455055334129565820015244464343854444712513e+04, "3.38204802486455055334129565820015244464343854444712513e+04", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.87247644413155087645140975008088533286977710080244249e+02, "2.87247644413155087645140975008088533286977710080244249e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.01899805954981363917258740277358024893572331522514601e+00, "2.01899805954981363917258740277358024893572331522514601e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.14314215799519834172753514406176454576793263619287700e-02, "1.14314215799519834172753514406176454576793263619287700e-02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.01075867159821346256470334018168931185179114379271616e-05, "5.01075867159821346256470334018168931185179114379271616e-05", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.59576526838074751422330690168945437827562833198707558e-07, "1.59576526838074751422330690168945437827562833198707558e-07", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28525092722679899458094768960179796663588010298597603e-10, "3.28525092722679899458094768960179796663588010298597603e-10", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28217919006153582429216342066702743329957749672852350e-13, "3.28217919006153582429216342066702743329957749672852350e-13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[35] = { + static_cast(boost::math::tools::make_big_value( 0.00000000000000000000000000000000000000000000000000000e+00, "0.00000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.68331761881188649551819440128000000000000000000000000e+36, "8.68331761881188649551819440128000000000000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.55043336733310191803732770947072000000000000000000000e+37, "3.55043336733310191803732770947072000000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.55728779174162547080350866368102400000000000000000000e+37, "6.55728779174162547080350866368102400000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.37352350419052295388404251629977600000000000000000000e+37, "7.37352350419052295388404251629977600000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.72117566475005542296335706764492800000000000000000000e+37, "5.72117566475005542296335706764492800000000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.28417720643003773414159612967554252800000000000000000e+37, "3.28417720643003773414159612967554252800000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.45822739485943139719482682477713244160000000000000000e+37, "1.45822739485943139719482682477713244160000000000000000e+37", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.16476527817201997988283152951021977600000000000000000e+36, "5.16476527817201997988283152951021977600000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.49225481668254064104679479029764121600000000000000000e+36, "1.49225481668254064104679479029764121600000000000000000e+36", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.57726463942545496998486904826347776000000000000000000e+35, "3.57726463942545496998486904826347776000000000000000000e+35", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.20859297660335343156864734965859840000000000000000000e+34, "7.20859297660335343156864734965859840000000000000000000e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.23364307820330543590375511999050240000000000000000000e+34, "1.23364307820330543590375511999050240000000000000000000e+34", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.80750015058176473779293385245398400000000000000000000e+33, "1.80750015058176473779293385245398400000000000000000000e+33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.28183125026789051815954180232544000000000000000000000e+32, "2.28183125026789051815954180232544000000000000000000000e+32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.49437224233918151570015089338400000000000000000000000e+31, "2.49437224233918151570015089338400000000000000000000000e+31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.37000480501772121324931003824000000000000000000000000e+30, "2.37000480501772121324931003824000000000000000000000000e+30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.96258640868140652967646352465000000000000000000000000e+29, "1.96258640868140652967646352465000000000000000000000000e+29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.41894262447739018035536664650000000000000000000000000e+28, "1.41894262447739018035536664650000000000000000000000000e+28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.96452376168568744680811480000000000000000000000000000e+26, "8.96452376168568744680811480000000000000000000000000000e+26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.94875410890088264440962800000000000000000000000000000e+25, "4.94875410890088264440962800000000000000000000000000000e+25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.38478815149246067334598000000000000000000000000000000e+24, "2.38478815149246067334598000000000000000000000000000000e+24", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.00124085806115519088380000000000000000000000000000000e+23, "1.00124085806115519088380000000000000000000000000000000e+23", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.65117470518809938644000000000000000000000000000000000e+21, "3.65117470518809938644000000000000000000000000000000000e+21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.15145312544238764840000000000000000000000000000000000e+20, "1.15145312544238764840000000000000000000000000000000000e+20", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.12192419709374919000000000000000000000000000000000000e+18, "3.12192419709374919000000000000000000000000000000000000e+18", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.22038661704031100000000000000000000000000000000000000e+16, "7.22038661704031100000000000000000000000000000000000000e+16", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.40979763670090400000000000000000000000000000000000000e+15, "1.40979763670090400000000000000000000000000000000000000e+15", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.29191290647440000000000000000000000000000000000000000e+13, "2.29191290647440000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.04437176604000000000000000000000000000000000000000000e+11, "3.04437176604000000000000000000000000000000000000000000e+11", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.21763644400000000000000000000000000000000000000000000e+09, "3.21763644400000000000000000000000000000000000000000000e+09", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.60169360000000000000000000000000000000000000000000000e+07, "2.60169360000000000000000000000000000000000000000000000e+07", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.51096000000000000000000000000000000000000000000000000e+05, "1.51096000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.61000000000000000000000000000000000000000000000000000e+02, "5.61000000000000000000000000000000000000000000000000000e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.00000000000000000000000000000000000000000000000000000e+00, "1.00000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[42] = { + static_cast(boost::math::tools::make_big_value( 8.2258008829795701933757823508857131818190413131511363e+00, "8.2258008829795701933757823508857131818190413131511363e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.1680809698202901664719598422224259984110345848176138e+01, "-6.1680809698202901664719598422224259984110345848176138e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0937956909159916126016144892534179459545368045658870e+02, "2.0937956909159916126016144892534179459545368045658870e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.2570860117223597345299309707009980433696777143916823e+02, "-4.2570860117223597345299309707009980433696777143916823e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7808407045434705509914139521956838552432057817709310e+02, "5.7808407045434705509914139521956838552432057817709310e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.5355182201018147597112724614545263772722036922648575e+02, "-5.5355182201018147597112724614545263772722036922648575e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.8474340895549068665467127190441982794533803160633534e+02, "3.8474340895549068665467127190441982794533803160633534e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9687073432491586288948383529096081854867384409828362e+02, "-1.9687073432491586288948383529096081854867384409828362e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.4457539281218595159502905008069838638140685905208109e+01, "7.4457539281218595159502905008069838638140685905208109e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.0724321926101376768201888687693227423632630755627070e+01, "-2.0724321926101376768201888687693227423632630755627070e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.1941554220476109189863208161993450668341832413951177e+00, "4.1941554220476109189863208161993450668341832413951177e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.0469416499468520752326008902894754184436051369514739e-01, "-6.0469416499468520752326008902894754184436051369514739e-01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.0254471406496505041361077191383344271915106887055424e-02, "6.0254471406496505041361077191383344271915106887055424e-02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.9743975328123868311047848806382369109187457702980947e-03, "-3.9743975328123868311047848806382369109187457702980947e-03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6326975883294075748535457727960259872733702003969396e-04, "1.6326975883294075748535457727960259872733702003969396e-04", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.8276395425975110081829250599527615065306178329307764e-06, "-3.8276395425975110081829250599527615065306178329307764e-06", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.4994926214942760944619799278085799215984014361562132e-08, "4.4994926214942760944619799278085799215984014361562132e-08", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.1685212562684580327244208091708941173130794374261284e-10, "-2.1685212562684580327244208091708941173130794374261284e-10", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0566129445336641178978472923139566421562362783155822e-13, "3.0566129445336641178978472923139566421562362783155822e-13", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.6744193557172228303189080097715371728193237070211608e-17, "-6.6744193557172228303189080097715371728193237070211608e-17", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.3116377246238995291497495503598572469502355628188604e-22, "5.3116377246238995291497495503598572469502355628188604e-22", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.7791795131683583370183641939988202673347172514688534e-28, "-2.7791795131683583370183641939988202673347172514688534e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.6372242277604226411817535739257869758194674562641039e-28, "9.6372242277604226411817535739257869758194674562641039e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.7502495488892655715569603094708394381657045801526069e-27, "-2.7502495488892655715569603094708394381657045801526069e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.0501577132014302973783965458067331883116843242885033e-27, "6.0501577132014302973783965458067331883116843242885033e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.0246214059191840597181314245134333087378581123342727e-26, "-1.0246214059191840597181314245134333087378581123342727e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4016071303078853730266134475467378117726380022343630e-26, "1.4016071303078853730266134475467378117726380022343630e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.6214830666337247122639245651193515459936309025504988e-26, "-1.6214830666337247122639245651193515459936309025504988e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6312853482448038567407561706085851388360060108080568e-26, "1.6312853482448038567407561706085851388360060108080568e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.4458785355627609495060506977643541320437284829970271e-26, "-1.4458785355627609495060506977643541320437284829970271e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1331287575394227733315016732552406681866623847709417e-26, "1.1331287575394227733315016732552406681866623847709417e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.8351635033967037250982310034619565150687081453609992e-27, "-7.8351635033967037250982310034619565150687081453609992e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7520885958378593874310858129100278585054737696926701e-27, "4.7520885958378593874310858129100278585054737696926701e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.5058409122183022757924336573867978222207111500077203e-27, "-2.5058409122183022757924336573867978222207111500077203e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1353898614924597482474648262273645405650282912119167e-27, "1.1353898614924597482474648262273645405650282912119167e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.3531153377666279783383214654257629384565834244973196e-28, "-4.3531153377666279783383214654257629384565834244973196e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3839135182642184911017974189326632232475070566724497e-28, "1.3839135182642184911017974189326632232475070566724497e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.5479558181723745255902653783884759401621303982915322e-29, "-3.5479558181723745255902653783884759401621303982915322e-29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.0441825447107352322817077249008075090725287665933142e-30, "7.0441825447107352322817077249008075090725287665933142e-30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.0157887327297754418593987114368959771100770274203800e-30, "-1.0157887327297754418593987114368959771100770274203800e-30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.4607280988529299025458955706898751267120992042268667e-32, "9.4607280988529299025458955706898751267120992042268667e-32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.2702032336418528894772149178970767164510337389404370e-33, "-4.2702032336418528894772149178970767164510337389404370e-33", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[42] = { + static_cast(boost::math::tools::make_big_value( 7.3782193657165970743894979068466124765194827248379940e+01, "7.3782193657165970743894979068466124765194827248379940e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.5325256602067816772285455933211570612342576586214891e+02, "-5.5325256602067816772285455933211570612342576586214891e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.8780522570799869937961476290263461833002660531646012e+03, "1.8780522570799869937961476290263461833002660531646012e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.8184384596766268378888212415693303553880671796724735e+03, "-3.8184384596766268378888212415693303553880671796724735e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.1851863962133477520750252664910607723762372771833722e+03, "5.1851863962133477520750252664910607723762372771833722e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.9651417912803026185477059393373316779106801664686922e+03, "-4.9651417912803026185477059393373316779106801664686922e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4509968222802070571038728168526976259879110509473673e+03, "3.4509968222802070571038728168526976259879110509473673e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.7658529366356277958293590921029620586497540226150778e+03, "-1.7658529366356277958293590921029620586497540226150778e+03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.6785479743985639684438881535624244315638292743993560e+02, "6.6785479743985639684438881535624244315638292743993560e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.8588900406390499925005060563245955316983471925301184e+02, "-1.8588900406390499925005060563245955316983471925301184e+02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.7619921996662567540276653040387614527561121386327888e+01, "3.7619921996662567540276653040387614527561121386327888e+01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.4238684621351227134322239416053684476498738936970880e+00, "-5.4238684621351227134322239416053684476498738936970880e+00", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4045887339956612618258661862314001628281850888893694e-01, "5.4045887339956612618258661862314001628281850888893694e-01", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.5648780296066214471224136948413423004282323597057130e-02, "-3.5648780296066214471224136948413423004282323597057130e-02", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4644654223878248996887367583334112564695286627087816e-03, "1.4644654223878248996887367583334112564695286627087816e-03", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.4332418933955508302078477926243914098802666261366678e-05, "-3.4332418933955508302078477926243914098802666261366678e-05", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.0358676398914795323109452992079597262040795201720992e-07, "4.0358676398914795323109452992079597262040795201720992e-07", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9450781456519433542572418782578042705818718277820822e-09, "-1.9450781456519433542572418782578042705818718277820822e-09", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.7416614067965791526251519843473783727166050306987362e-12, "2.7416614067965791526251519843473783727166050306987362e-12", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.9866912469474631311384623900742191091588854047124831e-16, "-5.9866912469474631311384623900742191091588854047124831e-16", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7643298058164570865040068204832109970445542816595386e-21, "4.7643298058164570865040068204832109970445542816595386e-21", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.4928145473701388663847838847907869194628008362147191e-27, "-2.4928145473701388663847838847907869194628008362147191e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.6442105079571407791997926495585104881317603986245265e-27, "8.6442105079571407791997926495585104881317603986245265e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.4668655090053572169091092679046557243825245275372519e-26, "-2.4668655090053572169091092679046557243825245275372519e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4267531441890485644063141608998212380717408586417687e-26, "5.4267531441890485644063141608998212380717408586417687e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.1904503977518246823477462773596622658428222241396033e-26, "-9.1904503977518246823477462773596622658428222241396033e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2571863845333234910026102012663485977044671519503762e-25, "1.2571863845333234910026102012663485977044671519503762e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.4544064381831932921238058900083969277495893492892409e-25, "-1.4544064381831932921238058900083969277495893492892409e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4631986986621358205011740516995928067691739105999606e-25, "1.4631986986621358205011740516995928067691739105999606e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.2968960911316058263225162731552440661464077730310616e-25, "-1.2968960911316058263225162731552440661464077730310616e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0163718599154085420173689991270137222141149005433561e-25, "1.0163718599154085420173689991270137222141149005433561e-25", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.0278330240079354003556694314544898753730575016426382e-26, "-7.0278330240079354003556694314544898753730575016426382e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.2624362787531585897289168590458242934350512724487489e-26, "4.2624362787531585897289168590458242934350512724487489e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.2476405895248242769628910185593849817270999749433590e-26, "-2.2476405895248242769628910185593849817270999749433590e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0183999810930941402072961555627198647985838184285745e-26, "1.0183999810930941402072961555627198647985838184285745e-26", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.9045729824028673594421184017022743317479187113896743e-27, "-3.9045729824028673594421184017022743317479187113896743e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2413159115073860802650598534057774896614268826143102e-27, "1.2413159115073860802650598534057774896614268826143102e-27", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.1823766097367740928881247634568036933183255409575449e-28, "-3.1823766097367740928881247634568036933183255409575449e-28", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.3183542619623422719031481991659628332908631907371078e-29, "6.3183542619623422719031481991659628332908631907371078e-29", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.1112247985618590949970839428497941653776549519221927e-30, "-9.1112247985618590949970839428497941653776549519221927e-30", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.4859004327675283792859615082199609974336399587796249e-31, "8.4859004327675283792859615082199609974336399587796249e-31", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.8302040910318742925508017945893539585506545571212821e-32, "-3.8302040910318742925508017945893539585506545571212821e-32", std::integral_constant::value) && ((168 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 2.96640371531248092651367187500000000000000000000000000e+01; } +}; + +inline double lanczos_g_near_1_and_2(const lanczos35MP&) +{ + return 22.36563469469547; +} + + + + + + +struct lanczos48MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[48] = { + static_cast(boost::math::tools::make_big_value( 5.761757987425932419978923296640371540367427757167447418730589877e+70, "5.761757987425932419978923296640371540367427757167447418730589877e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.723233313564421930629677035555276136256253817229396631458438691e+70, "8.723233313564421930629677035555276136256253817229396631458438691e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.460052620548943146316510839385235752729444155384745952604400014e+70, "6.460052620548943146316510839385235752729444155384745952604400014e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.118620599704657143233902039524163888476114389296433891234019212e+70, "3.118620599704657143233902039524163888476114389296433891234019212e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.103553323924588863191816202847384353588419783622786374048756587e+70, "1.103553323924588863191816202847384353588419783622786374048756587e+70", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.051624469576894078907076790635986076815810433950937821174281248e+69, "3.051624469576894078907076790635986076815810433950937821174281248e+69", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.865434054315747674202246332480484800778071304068935338977820344e+68, "6.865434054315747674202246332480484800778071304068935338977820344e+68", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.291785980379681713553231795767203835753576510251486784293089714e+68, "1.291785980379681713553231795767203835753576510251486784293089714e+68", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.073927196464385740270105346713079967925505577692095446860826790e+67, "2.073927196464385740270105346713079967925505577692095446860826790e+67", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.884317172328855613403642857232246924724496526520223674336243586e+66, "2.884317172328855613403642857232246924724496526520223674336243586e+66", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.515983058669346491005379681336434957516572863544374020968683717e+65, "3.515983058669346491005379681336434957516572863544374020968683717e+65", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.791988252541273516986153564408477102509671668999707480365384945e+64, "3.791988252541273516986153564408477102509671668999707480365384945e+64", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.645764905652320236264233988360776875326874810201273735655153182e+63, "3.645764905652320236264233988360776875326874810201273735655153182e+63", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.144135487589921315512939394666974184673239886993573956770438389e+62, "3.144135487589921315512939394666974184673239886993573956770438389e+62", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.444700846549614719681016920231266383188819427952261902403138865e+61, "2.444700846549614719681016920231266383188819427952261902403138865e+61", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.721099093953481665535866508692670759355705777392277743203856663e+60, "1.721099093953481665535866508692670759355705777392277743203856663e+60", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.100969797434901880312682514502493221610943693861105392844971160e+59, "1.100969797434901880312682514502493221610943693861105392844971160e+59", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.418121506159806547634040503980950792234471035467217702752406105e+57, "6.418121506159806547634040503980950792234471035467217702752406105e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.417864259432558812733518752689742288284271989351444645566759428e+56, "3.417864259432558812733518752689742288284271989351444645566759428e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.665995533734965936996397899459612023184583125575089834552055942e+55, "1.665995533734965936996397899459612023184583125575089834552055942e+55", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.444766925649844009950058690449625999301860892596426461258095232e+53, "7.444766925649844009950058690449625999301860892596426461258095232e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.053637791492838551734963920042182131006240650838206322215619662e+52, "3.053637791492838551734963920042182131006240650838206322215619662e+52", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.150696853422753584935226676401667305978026730065639035499393518e+51, "1.150696853422753584935226676401667305978026730065639035499393518e+51", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.985976091763077924792684854305586783380530313659602423780141188e+49, "3.985976091763077924792684854305586783380530313659602423780141188e+49", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.269589095786672590317833654141210781129738119237951536741077115e+48, "1.269589095786672590317833654141210781129738119237951536741077115e+48", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.718300118825405526804849893058410300716988331091767076237827497e+46, "3.718300118825405526804849893058410300716988331091767076237827497e+46", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.001037055130874457401651655102738871459032839441218104652569066e+45, "1.001037055130874457401651655102738871459032839441218104652569066e+45", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.475842513986568687160423191409256650108932454810648362428602348e+43, "2.475842513986568687160423191409256650108932454810648362428602348e+43", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.620452049086499203878684285356863241396518483154492676811559133e+41, "5.620452049086499203878684285356863241396518483154492676811559133e+41", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.169661026157169583693125067814111812572434991018171004040405784e+40, "1.169661026157169583693125067814111812572434991018171004040405784e+40", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.227918466522161929152413190031319328201533237960827483146218740e+38, "2.227918466522161929152413190031319328201533237960827483146218740e+38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.876388843752351291646654793076860108915313255758699513365393870e+36, "3.876388843752351291646654793076860108915313255758699513365393870e+36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.145947758366681136606104191450792163942386660344907590963820717e+34, "6.145947758366681136606104191450792163942386660344907590963820717e+34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.853323303407534484800459250019301328433169196161471441696806506e+32, "8.853323303407534484800459250019301328433169196161471441696806506e+32", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.154628006575221227908667538321556179086649067527404327882584768e+31, "1.154628006575221227908667538321556179086649067527404327882584768e+31", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.357526820024103486396860374714568600536209103260198100884104997e+29, "1.357526820024103486396860374714568600536209103260198100884104997e+29", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.431529899588725297356982438015035066854198997921929156832870645e+27, "1.431529899588725297356982438015035066854198997921929156832870645e+27", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.345565129287503320724079046959642760096964859126850291147857935e+25, "1.345565129287503320724079046959642760096964859126850291147857935e+25", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.118851309483567225684739040233675455708538654675741148330404763e+23, "1.118851309483567225684739040233675455708538654675741148330404763e+23", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.153371780240325463304870847387326315142505274277395976930776452e+20, "8.153371780240325463304870847387326315142505274277395976930776452e+20", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.146212685927632120682088036018035709941745020823689824280902727e+18, "5.146212685927632120682088036018035709941745020823689824280902727e+18", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.771109638413640784841091904266004758198074452790973613270876444e+16, "2.771109638413640784841091904266004758198074452790973613270876444e+16", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.247775743837944205683004431867637625466576857881195465700397478e+14, "1.247775743837944205683004431867637625466576857881195465700397478e+14", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.570311375510395966207715903995528566489264305503840005145629111e+11, "4.570311375510395966207715903995528566489264305503840005145629111e+11", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.307932649387240491969419239876926639445902586258953887216911993e+09, "1.307932649387240491969419239876926639445902586258953887216911993e+09", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.743144608535924824275750439447323876880302369055576390115394778e+06, "2.743144608535924824275750439447323876880302369055576390115394778e+06", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.749690888961891063146468955091435916957208840312184463551812828e+03, "3.749690888961891063146468955091435916957208840312184463551812828e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415765284811045253006986740609938316629929233e+00, "2.506628274631000502415765284811045253006986740609938316629929233e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[48] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.502622159812088949850305428800254892961651752960000000000000000e+57, "5.502622159812088949850305428800254892961651752960000000000000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.430336111272256671478593169569751383305061494947840000000000000e+58, "2.430336111272256671478593169569751383305061494947840000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.920361290698585974808779016476219830728024276336640000000000000e+58, "4.920361290698585974808779016476219830728024276336640000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.149178946896205138947217427059336370288899808821248000000000000e+58, "6.149178946896205138947217427059336370288899808821248000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.374105269656119699331051574067858017333550280343552000000000000e+58, "5.374105269656119699331051574067858017333550280343552000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.521316226597066883749849655326023294027593332332429312000000000e+58, "3.521316226597066883749849655326023294027593332332429312000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.808864152650289891915479515152146571014320216782405632000000000e+58, "1.808864152650289891915479515152146571014320216782405632000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.514810409642252571378917003183814999063638859346214912000000000e+57, "7.514810409642252571378917003183814999063638859346214912000000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.583350992233550434239775839017811699814141926043903590400000000e+57, "2.583350992233550434239775839017811699814141926043903590400000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.478403249251559174520099458337662519939088809134875607040000000e+56, "7.478403249251559174520099458337662519939088809134875607040000000e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.848344883280695333961708798743230793633983609036568330240000000e+56, "1.848344883280695333961708798743230793633983609036568330240000000e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.943873277267014936040757307088314776495222166971439104000000000e+55, "3.943873277267014936040757307088314776495222166971439104000000000e+55", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.331069721888505257142927693659482094449571844495257600000000000e+54, "7.331069721888505257142927693659482094449571844495257600000000000e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.196124539826947758881834650235619760202156354268084224000000000e+54, "1.196124539826947758881834650235619760202156354268084224000000000e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.723744838816127002822609734027860811982593574672547840000000000e+53, "1.723744838816127002822609734027860811982593574672547840000000000e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.205691767196054136766333529400075228162139411801728000000000000e+52, "2.205691767196054136766333529400075228162139411801728000000000000e+52", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.517213632743192166819003098472340901249838381523200000000000000e+51, "2.517213632743192166819003098472340901249838381523200000000000000e+51", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.571722144655713179046526371841394014407124514352640000000000000e+50, "2.571722144655713179046526371841394014407124514352640000000000000e+50", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.359512744028577584409389641902976782871564427046400000000000000e+49, "2.359512744028577584409389641902976782871564427046400000000000000e+49", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.949188285585060392916084953872833077002135851920000000000000000e+48, "1.949188285585060392916084953872833077002135851920000000000000000e+48", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.452967188675463645529736303316005271151737332000000000000000000e+47, "1.452967188675463645529736303316005271151737332000000000000000000e+47", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.790015208782962556675223159728484084908850744000000000000000000e+45, "9.790015208782962556675223159728484084908850744000000000000000000e+45", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.970673071264242753610155919125826961862567840000000000000000000e+44, "5.970673071264242753610155919125826961862567840000000000000000000e+44", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.299166890445957751586491053313346243255473500000000000000000000e+43, "3.299166890445957751586491053313346243255473500000000000000000000e+43", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.652735578141047520337049888545244673386975000000000000000000000e+42, "1.652735578141047520337049888545244673386975000000000000000000000e+42", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.508428802270485256066710729742536448661900000000000000000000000e+40, "7.508428802270485256066710729742536448661900000000000000000000000e+40", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.093294777021479729147119238554967297499000000000000000000000000e+39, "3.093294777021479729147119238554967297499000000000000000000000000e+39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.155176275192359061296447275633302204250000000000000000000000000e+38, "1.155176275192359061296447275633302204250000000000000000000000000e+38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.907505708457079284974986712721395225000000000000000000000000000e+36, "3.907505708457079284974986712721395225000000000000000000000000000e+36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.195848283940498442888394846136646210000000000000000000000000000e+35, "1.195848283940498442888394846136646210000000000000000000000000000e+35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.305934675041764670409270520636101000000000000000000000000000000e+33, "3.305934675041764670409270520636101000000000000000000000000000000e+33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.238840089027488915014959267151000000000000000000000000000000000e+31, "8.238840089027488915014959267151000000000000000000000000000000000e+31", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.846167161648076059624793804150000000000000000000000000000000000e+30, "1.846167161648076059624793804150000000000000000000000000000000000e+30", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.707826341119682695847826052600000000000000000000000000000000000e+28, "3.707826341119682695847826052600000000000000000000000000000000000e+28", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.648183019818072129964867660000000000000000000000000000000000000e+26, "6.648183019818072129964867660000000000000000000000000000000000000e+26", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.059080011923383455919277000000000000000000000000000000000000000e+25, "1.059080011923383455919277000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.490144286132397218940500000000000000000000000000000000000000000e+23, "1.490144286132397218940500000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.838362455658776519186000000000000000000000000000000000000000000e+21, "1.838362455658776519186000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.970532718044669378600000000000000000000000000000000000000000000e+19, "1.970532718044669378600000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.814183952293757550000000000000000000000000000000000000000000000e+17, "1.814183952293757550000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.413370614847675000000000000000000000000000000000000000000000000e+15, "1.413370614847675000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.134958017031000000000000000000000000000000000000000000000000000e+12, "9.134958017031000000000000000000000000000000000000000000000000000e+12", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.765795079100000000000000000000000000000000000000000000000000000e+10, "4.765795079100000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.928125650000000000000000000000000000000000000000000000000000000e+08, "1.928125650000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.675250000000000000000000000000000000000000000000000000000000000e+05, "5.675250000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.081000000000000000000000000000000000000000000000000000000000000e+03, "1.081000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[48] = { + static_cast(boost::math::tools::make_big_value( 1.775732062655417998910881298714821053061055705608286949609421120e+58, "1.775732062655417998910881298714821053061055705608286949609421120e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.688437299644448784121592662352787426980194425446481703306505899e+58, "2.688437299644448784121592662352787426980194425446481703306505899e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.990941408817264621124181941423397180231807676408175000011574647e+58, "1.990941408817264621124181941423397180231807676408175000011574647e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.611362716446299768312931282360230566955098878347512701289885826e+57, "9.611362716446299768312931282360230566955098878347512701289885826e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.401071382066693821667231534775770086983519477562699643517826070e+57, "3.401071382066693821667231534775770086983519477562699643517826070e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.404885497858970433702192998314287586471872015950314081905843790e+56, "9.404885497858970433702192998314287586471872015950314081905843790e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.115877029354588030985670444733795075439494699793733843615128537e+56, "2.115877029354588030985670444733795075439494699793733843615128537e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.981190790128533233774351539949086864384527026303253658346042487e+55, "3.981190790128533233774351539949086864384527026303253658346042487e+55", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.391693345003088328615594164751621620795026048184784616056424156e+54, "6.391693345003088328615594164751621620795026048184784616056424156e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.889256530644592752851605934648543064680013184446459552930302708e+53, "8.889256530644592752851605934648543064680013184446459552930302708e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.083600502252557317792851907104175947655615832167024966482957198e+53, "1.083600502252557317792851907104175947655615832167024966482957198e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.168663303100387254423547467716347840589509950430146037235024663e+52, "1.168663303100387254423547467716347840589509950430146037235024663e+52", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.123598327107617380847613820395680616677588511868146055764672247e+51, "1.123598327107617380847613820395680616677588511868146055764672247e+51", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.689997752127767317102012222013845618089045780981297513260591263e+49, "9.689997752127767317102012222013845618089045780981297513260591263e+49", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.534390868711924145397558028431517797916157184545344400315049888e+48, "7.534390868711924145397558028431517797916157184545344400315049888e+48", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.304302698603539256283286371502868034443493795813215278491516590e+47, "5.304302698603539256283286371502868034443493795813215278491516590e+47", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.393109140624987047793401361048831961769792029208766436336102130e+46, "3.393109140624987047793401361048831961769792029208766436336102130e+46", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.978018543190809154654104033779556195143800802618966016721119650e+45, "1.978018543190809154654104033779556195143800802618966016721119650e+45", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.053360999285885098804414279382371819392475408561904784568215676e+44, "1.053360999285885098804414279382371819392475408561904784568215676e+44", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.134477518753880004346650767299407142912151189519394755303948278e+42, "5.134477518753880004346650767299407142912151189519394755303948278e+42", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.294423222517027804991661400849986263936601088969957809227734095e+41, "2.294423222517027804991661400849986263936601088969957809227734095e+41", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.411090410120803602405769061472811786006792830932395177026805674e+39, "9.411090410120803602405769061472811786006792830932395177026805674e+39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.546364324011365762789375386661337991434000702963811196005801731e+38, "3.546364324011365762789375386661337991434000702963811196005801731e+38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.228448949533845774618310075362255075191314754073111861819975658e+37, "1.228448949533845774618310075362255075191314754073111861819975658e+37", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.912781600174900095022672513908490962899309128877584272045832513e+35, "3.912781600174900095022672513908490962899309128877584272045832513e+35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.145953154225327686809754524860534768156895534588187817885425867e+34, "1.145953154225327686809754524860534768156895534588187817885425867e+34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.085123669861365984774838320924008647858451270384142925874188908e+32, "3.085123669861365984774838320924008647858451270384142925874188908e+32", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.630367231261397170650842427640465271470437848007390468680241668e+30, "7.630367231261397170650842427640465271470437848007390468680241668e+30", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.732182596346604787991836614669276692020582495778773122326853797e+29, "1.732182596346604787991836614669276692020582495778773122326853797e+29", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.604810530255586389021528105443008249789929772232910820974558737e+27, "3.604810530255586389021528105443008249789929772232910820974558737e+27", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.866283281281868197964883431828004811500103664332499479032936741e+25, "6.866283281281868197964883431828004811500103664332499479032936741e+25", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.194674953754173153419535571352963617418336620849047024493757781e+24, "1.194674953754173153419535571352963617418336620849047024493757781e+24", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.894136566262225941799684575793203365634052117390221232065529506e+22, "1.894136566262225941799684575793203365634052117390221232065529506e+22", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.728530091896234109430773225830735206267902257956559214561779937e+20, "2.728530091896234109430773225830735206267902257956559214561779937e+20", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.558479853180206010560597094150305393424259777860361999786422123e+18, "3.558479853180206010560597094150305393424259777860361999786422123e+18", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.183799294403182487629551851184805610521945574359855930862189385e+16, "4.183799294403182487629551851184805610521945574359855930862189385e+16", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.411871423439005125979602342436157376541872925894678545707600871e+14, "4.411871423439005125979602342436157376541872925894678545707600871e+14", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.146934230284030660663814250662713645615827253848318877256260252e+12, "4.146934230284030660663814250662713645615827253848318877256260252e+12", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.448218665084135299794121636822853382005896647323977605040284573e+10, "3.448218665084135299794121636822853382005896647323977605040284573e+10", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.512810104228409918190743070957013357446861162954554120244345275e+08, "2.512810104228409918190743070957013357446861162954554120244345275e+08", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.586025460907685522041021408846741988415862331430490056017676558e+06, "1.586025460907685522041021408846741988415862331430490056017676558e+06", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.540359114012197595748944623835295064565126012703153392373623351e+03, "8.540359114012197595748944623835295064565126012703153392373623351e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.845554430040583564794301575257907183920519062724643766057340299e+01, "3.845554430040583564794301575257907183920519062724643766057340299e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.408536849955106342184570268692357634552350288861587703063273018e-01, "1.408536849955106342184570268692357634552350288861587703063273018e-01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.030953654039823541442226125506893371879437951634029024402619056e-04, "4.030953654039823541442226125506893371879437951634029024402619056e-04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.454172918244607114802676127860508419821673596398248024962237789e-07, "8.454172918244607114802676127860508419821673596398248024962237789e-07", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.155627562127299657410444702080985966726894475302009989071093439e-09, "1.155627562127299657410444702080985966726894475302009989071093439e-09", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.725246714864934496649491688787278190129598018071339049048385845e-13, "7.725246714864934496649491688787278190129598018071339049048385845e-13", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[48] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.502622159812088949850305428800254892961651752960000000000000000e+57, "5.502622159812088949850305428800254892961651752960000000000000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.430336111272256671478593169569751383305061494947840000000000000e+58, "2.430336111272256671478593169569751383305061494947840000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.920361290698585974808779016476219830728024276336640000000000000e+58, "4.920361290698585974808779016476219830728024276336640000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.149178946896205138947217427059336370288899808821248000000000000e+58, "6.149178946896205138947217427059336370288899808821248000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.374105269656119699331051574067858017333550280343552000000000000e+58, "5.374105269656119699331051574067858017333550280343552000000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.521316226597066883749849655326023294027593332332429312000000000e+58, "3.521316226597066883749849655326023294027593332332429312000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.808864152650289891915479515152146571014320216782405632000000000e+58, "1.808864152650289891915479515152146571014320216782405632000000000e+58", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.514810409642252571378917003183814999063638859346214912000000000e+57, "7.514810409642252571378917003183814999063638859346214912000000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.583350992233550434239775839017811699814141926043903590400000000e+57, "2.583350992233550434239775839017811699814141926043903590400000000e+57", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.478403249251559174520099458337662519939088809134875607040000000e+56, "7.478403249251559174520099458337662519939088809134875607040000000e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.848344883280695333961708798743230793633983609036568330240000000e+56, "1.848344883280695333961708798743230793633983609036568330240000000e+56", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.943873277267014936040757307088314776495222166971439104000000000e+55, "3.943873277267014936040757307088314776495222166971439104000000000e+55", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.331069721888505257142927693659482094449571844495257600000000000e+54, "7.331069721888505257142927693659482094449571844495257600000000000e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.196124539826947758881834650235619760202156354268084224000000000e+54, "1.196124539826947758881834650235619760202156354268084224000000000e+54", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.723744838816127002822609734027860811982593574672547840000000000e+53, "1.723744838816127002822609734027860811982593574672547840000000000e+53", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.205691767196054136766333529400075228162139411801728000000000000e+52, "2.205691767196054136766333529400075228162139411801728000000000000e+52", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.517213632743192166819003098472340901249838381523200000000000000e+51, "2.517213632743192166819003098472340901249838381523200000000000000e+51", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.571722144655713179046526371841394014407124514352640000000000000e+50, "2.571722144655713179046526371841394014407124514352640000000000000e+50", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.359512744028577584409389641902976782871564427046400000000000000e+49, "2.359512744028577584409389641902976782871564427046400000000000000e+49", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.949188285585060392916084953872833077002135851920000000000000000e+48, "1.949188285585060392916084953872833077002135851920000000000000000e+48", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.452967188675463645529736303316005271151737332000000000000000000e+47, "1.452967188675463645529736303316005271151737332000000000000000000e+47", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.790015208782962556675223159728484084908850744000000000000000000e+45, "9.790015208782962556675223159728484084908850744000000000000000000e+45", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.970673071264242753610155919125826961862567840000000000000000000e+44, "5.970673071264242753610155919125826961862567840000000000000000000e+44", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.299166890445957751586491053313346243255473500000000000000000000e+43, "3.299166890445957751586491053313346243255473500000000000000000000e+43", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.652735578141047520337049888545244673386975000000000000000000000e+42, "1.652735578141047520337049888545244673386975000000000000000000000e+42", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.508428802270485256066710729742536448661900000000000000000000000e+40, "7.508428802270485256066710729742536448661900000000000000000000000e+40", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.093294777021479729147119238554967297499000000000000000000000000e+39, "3.093294777021479729147119238554967297499000000000000000000000000e+39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.155176275192359061296447275633302204250000000000000000000000000e+38, "1.155176275192359061296447275633302204250000000000000000000000000e+38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.907505708457079284974986712721395225000000000000000000000000000e+36, "3.907505708457079284974986712721395225000000000000000000000000000e+36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.195848283940498442888394846136646210000000000000000000000000000e+35, "1.195848283940498442888394846136646210000000000000000000000000000e+35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.305934675041764670409270520636101000000000000000000000000000000e+33, "3.305934675041764670409270520636101000000000000000000000000000000e+33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.238840089027488915014959267151000000000000000000000000000000000e+31, "8.238840089027488915014959267151000000000000000000000000000000000e+31", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.846167161648076059624793804150000000000000000000000000000000000e+30, "1.846167161648076059624793804150000000000000000000000000000000000e+30", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.707826341119682695847826052600000000000000000000000000000000000e+28, "3.707826341119682695847826052600000000000000000000000000000000000e+28", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.648183019818072129964867660000000000000000000000000000000000000e+26, "6.648183019818072129964867660000000000000000000000000000000000000e+26", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.059080011923383455919277000000000000000000000000000000000000000e+25, "1.059080011923383455919277000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.490144286132397218940500000000000000000000000000000000000000000e+23, "1.490144286132397218940500000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.838362455658776519186000000000000000000000000000000000000000000e+21, "1.838362455658776519186000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.970532718044669378600000000000000000000000000000000000000000000e+19, "1.970532718044669378600000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.814183952293757550000000000000000000000000000000000000000000000e+17, "1.814183952293757550000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.413370614847675000000000000000000000000000000000000000000000000e+15, "1.413370614847675000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.134958017031000000000000000000000000000000000000000000000000000e+12, "9.134958017031000000000000000000000000000000000000000000000000000e+12", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.765795079100000000000000000000000000000000000000000000000000000e+10, "4.765795079100000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.928125650000000000000000000000000000000000000000000000000000000e+08, "1.928125650000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.675250000000000000000000000000000000000000000000000000000000000e+05, "5.675250000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.081000000000000000000000000000000000000000000000000000000000000e+03, "1.081000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[47] = { + static_cast(boost::math::tools::make_big_value( 1.059629332377126683204423480567078764834299559082175332563440691e+01, "1.059629332377126683204423480567078764834299559082175332563440691e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.045539783916612448318159279915745234781500064405838259582295756e+02, "-1.045539783916612448318159279915745234781500064405838259582295756e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.784116147862702971548198855631720823614071322755242269800139953e+02, "4.784116147862702971548198855631720823614071322755242269800139953e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.347627123899697763041970836639890836066182746484603984701614322e+03, "-1.347627123899697763041970836639890836066182746484603984701614322e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.616287350264343765684251764154979472791739226517501453422663702e+03, "2.616287350264343765684251764154979472791739226517501453422663702e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.713882062539651653939339395399443747287004395732955159091898814e+03, "-3.713882062539651653939339395399443747287004395732955159091898814e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.991169606573224259776909844091992693404451938778998047720606365e+03, "3.991169606573224259776909844091992693404451938778998047720606365e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.317302161605094814956529918647229867233820698992970037871348037e+03, "-3.317302161605094814956529918647229867233820698992970037871348037e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.160243421312714521088457044577429625205805822189897013706603525e+03, "2.160243421312714521088457044577429625205805822189897013706603525e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.109943233027050100899811890306430189301581767622560123811853152e+03, "-1.109943233027050100899811890306430189301581767622560123811853152e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.510589694767723034579229465791750718722450232983242500655372350e+02, "4.510589694767723034579229465791750718722450232983242500655372350e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.447631000703120050516586541372187152390222336990410786008441418e+02, "-1.447631000703120050516586541372187152390222336990410786008441418e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.650513815713423478665128697883383003943391843803280033790640056e+01, "3.650513815713423478665128697883383003943391843803280033790640056e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.169833252147741984016531016457108860830636610643268300442548571e+00, "-7.169833252147741984016531016457108860830636610643268300442548571e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.082891222574188256195988224106955541928146669677565424595939508e+00, "1.082891222574188256195988224106955541928146669677565424595939508e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.236107424816170540654753273736991964308279435358993150196240041e-01, "-1.236107424816170540654753273736991964308279435358993150196240041e-01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.042295614972976540486053879488442847688158698802215145729595300e-02, "1.042295614972976540486053879488442847688158698802215145729595300e-02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.301008161384761854991230670333450694872613042265540662425668275e-04, "-6.301008161384761854991230670333450694872613042265540662425668275e-04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.626174700692043436308812511757112824553679923076031241653340508e-05, "2.626174700692043436308812511757112824553679923076031241653340508e-05", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.165638597797307942127436742547456896168876912136407736672893749e-07, "-7.165638597797307942127436742547456896168876912136407736672893749e-07", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.193760947891421842393017150194414897043594152709554867681454093e-08, "1.193760947891421842393017150194414897043594152709554867681454093e-08", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.102566205604210639065160857917396944102487766555058309172771685e-10, "-1.102566205604210639065160857917396944102487766555058309172771685e-10", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.915816623470797626925445072607835810426224865943397673652473644e-13, "4.915816623470797626925445072607835810426224865943397673652473644e-13", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.588275837841705058968991523347781566219989845111381889185487327e-16, "-8.588275837841705058968991523347781566219989845111381889185487327e-16", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.200550301285945062259329336559146630395284987411539369061121774e-19, "4.200550301285945062259329336559146630395284987411539369061121774e-19", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.164333226683698411437894680594408940426530663957731548446585176e-23, "-3.164333226683698411437894680594408940426530663957731548446585176e-23", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.066415481671710192926882432742434212829003971627792457166443068e-28, "1.066415481671710192926882432742434212829003971627792457166443068e-28", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.794259516500627365643093960688415401054083199354112116216326548e-35, "1.794259516500627365643093960688415401054083199354112116216326548e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.109766027021453750770079684473469373477285891593627979028234104e-35, "-4.109766027021453750770079684473469373477285891593627979028234104e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.857040454431507009464118652247309465880198950544005451066913133e-35, "7.857040454431507009464118652247309465880198950544005451066913133e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.257636833252205356462338019252188768182918234805529456629813332e-34, "-1.257636833252205356462338019252188768182918234805529456629813332e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.657386968948568677903872677704817552898314429680193647771915640e-34, "1.657386968948568677903872677704817552898314429680193647771915640e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.807368757318279512579151153998249666772948741065806312921477647e-34, "-1.807368757318279512579151153998249666772948741065806312921477647e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.661046240741398691824399424582067048482718145278248186045239803e-34, "1.661046240741398691824399424582067048482718145278248186045239803e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.310274358393495831279259654715581878034928245769119610060724565e-34, "-1.310274358393495831279259654715581878034928245769119610060724565e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.979289812994200254512860775692570111131240734486735844065571645e-35, "8.979289812994200254512860775692570111131240734486735844065571645e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.374132043246630393307108400571746261019561481928368054130159659e-35, "-5.374132043246630393307108400571746261019561481928368054130159659e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.807680467889122570534300256450516518962725443297886143108832476e-35, "2.807680467889122570534300256450516518962725443297886143108832476e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.273791157694681089776609329544693948790210894828257493359951461e-35, "-1.273791157694681089776609329544693948790210894828257493359951461e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.971177216154470328027539744763226999793762414262864963697237346e-36, "4.971177216154470328027539744763226999793762414262864963697237346e-36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.645869582759689501568146144102914403686604774258048281344406053e-36, "-1.645869582759689501568146144102914403686604774258048281344406053e-36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.533836765077295478897031652308024155740827573708543095934776509e-37, "4.533836765077295478897031652308024155740827573708543095934776509e-37", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.011071482407693628614243045457397049948479637840391111641112292e-37, "-1.011071482407693628614243045457397049948479637840391111641112292e-37", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.753334959707221495336088007359122169612976692723773645699626150e-38, "1.753334959707221495336088007359122169612976692723773645699626150e-38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.217604773736938924265403811396189809599754278055061061653740309e-39, "-2.217604773736938924265403811396189809599754278055061061653740309e-39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.819104328189909539214493755590516594857915205552841395610714917e-40, "1.819104328189909539214493755590516594857915205552841395610714917e-40", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.261124772729210946163851510369531392121538686694430629664292782e-42, "-7.261124772729210946163851510369531392121538686694430629664292782e-42", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[47] = { + static_cast(boost::math::tools::make_big_value( 1.201442621036266842137537764128372139686555918574926377003612763e+02, "1.201442621036266842137537764128372139686555918574926377003612763e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.185467427150643969519910927764836582205108528009141221591420898e+03, "-1.185467427150643969519910927764836582205108528009141221591420898e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.424388386017623557963301151646679462091516489317860889362683594e+03, "5.424388386017623557963301151646679462091516489317860889362683594e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.527983998220780910263892115033927387104053611029099941633323011e+04, "-1.527983998220780910263892115033927387104053611029099941633323011e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.966432728352315714505545454293409301356907573727621630702827634e+04, "2.966432728352315714505545454293409301356907573727621630702827634e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.210921746972897898551337991192707389898034825880579655985363009e+04, "-4.210921746972897898551337991192707389898034825880579655985363009e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.525319492963037163576188790739239848749059077112768508582824310e+04, "4.525319492963037163576188790739239848749059077112768508582824310e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.761266399512640929192286468240357629226481512485264527650043412e+04, "-3.761266399512640929192286468240357629226481512485264527650043412e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.449355108314973517543246836489412427594992113516547680523282212e+04, "2.449355108314973517543246836489412427594992113516547680523282212e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.258490177973741431378782429416242097479994678322390199981700552e+04, "-1.258490177973741431378782429416242097479994678322390199981700552e+04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.114255088752286384038861754183366335220682008583459292808501983e+03, "5.114255088752286384038861754183366335220682008583459292808501983e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.641371685961506906939690430062582517060728808639566257675679493e+03, "-1.641371685961506906939690430062582517060728808639566257675679493e+03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.139072742579462987548668350779672609568514018384674745960251434e+02, "4.139072742579462987548668350779672609568514018384674745960251434e+02", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.129392978890804438983060711164783076784089453197491087525720250e+01, "-8.129392978890804438983060711164783076784089453197491087525720250e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.227817717944841986447189375517242505918979312023367060292099051e+01, "1.227817717944841986447189375517242505918979312023367060292099051e+01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.401539292067249253713639886818857395065226008969910929456090178e+00, "-1.401539292067249253713639886818857395065226008969910929456090178e+00", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.181789081601278618540976740818676551399023595924451938057596056e-01, "1.181789081601278618540976740818676551399023595924451938057596056e-01", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.144290488450459735914078985115746320918090890348935029860425141e-03, "-7.144290488450459735914078985115746320918090890348935029860425141e-03", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.977643331768050273059868974450773270172308183228656321879824795e-04, "2.977643331768050273059868974450773270172308183228656321879824795e-04", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.124636941696344229278652214634921673116603924841964381194849043e-06, "-8.124636941696344229278652214634921673116603924841964381194849043e-06", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.353525462444406600575359080915245707387262742058104197063680358e-07, "1.353525462444406600575359080915245707387262742058104197063680358e-07", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.250125861423094782405286690199652039727315544398975014264972834e-09, "-1.250125861423094782405286690199652039727315544398975014264972834e-09", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.573714720964717327652547152474097356959063887913062262865877352e-12, "5.573714720964717327652547152474097356959063887913062262865877352e-12", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.737669879005051560419153179757554889911318336987864449783329044e-15, "-9.737669879005051560419153179757554889911318336987864449783329044e-15", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.762722217636305077074994367900679148917691897585712642440813437e-18, "4.762722217636305077074994367900679148917691897585712642440813437e-18", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.587825185218585020252537180920386716805319681061835516115435092e-22, "-3.587825185218585020252537180920386716805319681061835516115435092e-22", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.209136980512837161314713015292452549173388035330975386269996826e-27, "1.209136980512837161314713015292452549173388035330975386269996826e-27", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.034390508507134900778125110328032318737425888723900242108805840e-34, "2.034390508507134900778125110328032318737425888723900242108805840e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.659788018772143666295222723749466460348336784193790467337277007e-34, "-4.659788018772143666295222723749466460348336784193790467337277007e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.908571128342935499766722474863105091718059244706787068658556651e-34, "8.908571128342935499766722474863105091718059244706787068658556651e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.425950044120254934054607924023969978647876123112048584684333719e-33, "-1.425950044120254934054607924023969978647876123112048584684333719e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.879199908120536747953526966437055347446296944118172532473563579e-33, "1.879199908120536747953526966437055347446296944118172532473563579e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.049254197314637745167349860869170443784687973315125511356920644e-33, "-2.049254197314637745167349860869170443784687973315125511356920644e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.883348910945891785870183207161008885784794173754432580579430117e-33, "1.883348910945891785870183207161008885784794173754432580579430117e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.485632203001929498321635338807138918181560966989477820879657556e-33, "-1.485632203001929498321635338807138918181560966989477820879657556e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.018101439657813295290872898460623215815148336073781084176896879e-33, "1.018101439657813295290872898460623215815148336073781084176896879e-33", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.093367832078140478972419022586567008505333455627897676553352131e-34, "-6.093367832078140478972419022586567008505333455627897676553352131e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.183440545955440848970303491445824299419388286256245840846211512e-34, "3.183440545955440848970303491445824299419388286256245840846211512e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.444266348988579122529259208173467560400718346248315966198898381e-34, "-1.444266348988579122529259208173467560400718346248315966198898381e-34", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.636484383471871096369253024129613184534143941833907586683970329e-35, "5.636484383471871096369253024129613184534143941833907586683970329e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.866141116496477515961611479835778926021343627571438400431425496e-35, "-1.866141116496477515961611479835778926021343627571438400431425496e-35", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.140613382384541819628458619521408963917801187880958447868987984e-36, "5.140613382384541819628458619521408963917801187880958447868987984e-36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.146386132171160390143187663792496413753249459594650450672610453e-36, "-1.146386132171160390143187663792496413753249459594650450672610453e-36", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.987988898740147227778865012441676866493607979490727350027458052e-37, "1.987988898740147227778865012441676866493607979490727350027458052e-37", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.514393298082843730831623322496784440966181704206301582735570257e-38, "-2.514393298082843730831623322496784440966181704206301582735570257e-38", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.062560373914843383483799612278119836498689222815662595453851079e-39, "2.062560373914843383483799612278119836498689222815662595453851079e-39", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.232902310328177520527925464546117674377821202617522000849431630e-41, "-8.232902310328177520527925464546117674377821202617522000849431630e-41", std::integral_constant::value) && ((201 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 2.880805098265409469604492187500000000000000000000000000000000000e+01; } +}; + + + + + + +struct lanczos49MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[49] = { + static_cast(boost::math::tools::make_big_value( 2.019754080776483553135944314398390557182640085494778723336498544843678485e+75, "2.019754080776483553135944314398390557182640085494778723336498544843678485e+75", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.676059842235360762770131859925648183945167646928679564649946220888559950e+75, "2.676059842235360762770131859925648183945167646928679564649946220888559950e+75", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.735650057396761011129552305882284776566019938011364428733911563803428382e+75, "1.735650057396761011129552305882284776566019938011364428733911563803428382e+75", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.344111322348095681337661934126816558843997557802467558098296633193647235e+74, "7.344111322348095681337661934126816558843997557802467558098296633193647235e+74", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.279680216265226689865713732197298481387164441051031689408254603978998739e+74, "2.279680216265226689865713732197298481387164441051031689408254603978998739e+74", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.534520884978570988754896701605114795240254179745381857143817149573644190e+73, "5.534520884978570988754896701605114795240254179745381857143817149573644190e+73", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.094111428842887690996413081740290562974159836498138544655694952917058279e+73, "1.094111428842887690996413081740290562974159836498138544655694952917058279e+73", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.810579629726532069935485995735078752851873354363515145898406449827612179e+72, "1.810579629726532069935485995735078752851873354363515145898406449827612179e+72", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.558918434547693216059693184449337082460551934950816980580247364223027781e+71, "2.558918434547693216059693184449337082460551934950816980580247364223027781e+71", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.135873934032978624782044873078145389831812962597897650459872577452106819e+70, "3.135873934032978624782044873078145389831812962597897650459872577452106819e+70", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.371686637133152315568960647279607142944608875215381633194517073295482279e+69, "3.371686637133152315568960647279607142944608875215381633194517073295482279e+69", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.210709791290211789451664416279176396010610028867877916229859938579263979e+68, "3.210709791290211789451664416279176396010610028867877916229859938579263979e+68", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.728493971517374186383948573740973812742868532549695728659376828743835354e+67, "2.728493971517374186383948573740973812742868532549695728659376828743835354e+67", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.082196640005602972025690170863702787506422900608580581233509996818990072e+66, "2.082196640005602972025690170863702787506422900608580581233509996818990072e+66", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.434296904963427729210616126543061543796855074189151534322145897294331943e+65, "1.434296904963427729210616126543061543796855074189151534322145897294331943e+65", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.956561957668034323532429269801091280845027370525277092791205986418388937e+63, "8.956561957668034323532429269801091280845027370525277092791205986418388937e+63", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.088465031117387833989029481250197681372395074774197408003458965955199114e+62, "5.088465031117387833989029481250197681372395074774197408003458965955199114e+62", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.638006253255673292005995366039132327048285444095672469721651872147026836e+61, "2.638006253255673292005995366039132327048285444095672469721651872147026836e+61", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.251091350064240218784436940525650498454117574503185703454335896105827459e+60, "1.251091350064240218784436940525650498454117574503185703454335896105827459e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.438965470269742797671507642697325276853822736866823134892262314489634493e+58, "5.438965470269742797671507642697325276853822736866823134892262314489634493e+58", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.171096428020164782492194583597894107448038723781192404665010946856416728e+57, "2.171096428020164782492194583597894107448038723781192404665010946856416728e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.967964763783296071512049792468354332039332869323402055488486515880211228e+55, "7.967964763783296071512049792468354332039332869323402055488486515880211228e+55", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.691239511306362286583973595898917873397629545053239582674237238671075149e+54, "2.691239511306362286583973595898917873397629545053239582674237238671075149e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.371351678345135454487045322888974392983710298168736348320865063481886470e+52, "8.371351678345135454487045322888974392983710298168736348320865063481886470e+52", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.399139456864000364822305296187724318277750756512114883045860699513780982e+51, "2.399139456864000364822305296187724318277750756512114883045860699513780982e+51", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.335644907596902422235465624341780552277299385700659659374735347476790554e+49, "6.335644907596902422235465624341780552277299385700659659374735347476790554e+49", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.541494306852766687136536628805359613169443442681232300932385167150904206e+48, "1.541494306852766687136536628805359613169443442681232300932385167150904206e+48", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.454056970723993494338669836718832149990196703371093557999871225274488103e+46, "3.454056970723993494338669836718832149990196703371093557999871225274488103e+46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.122804036582476347394286398036300142213667443126058369432667730381406969e+44, "7.122804036582476347394286398036300142213667443126058369432667730381406969e+44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.350437044906396962588019269622122085882249454809361766675217669398941902e+43, "1.350437044906396962588019269622122085882249454809361766675217669398941902e+43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.350870345849974415762276588597695308720927596639430565914494820338490132e+41, "2.350870345849974415762276588597695308720927596639430565914494820338490132e+41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.751385019528115548010259296564491721747559138159547937603014471132985302e+39, "3.751385019528115548010259296564491721747559138159547937603014471132985302e+39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.476113159838159765344429146854859477076267913220368138623944281045558949e+37, "5.476113159838159765344429146854859477076267913220368138623944281045558949e+37", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.294398437121931983845715884547145127710330599817550100565429763115048575e+35, "7.294398437121931983845715884547145127710330599817550100565429763115048575e+35", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.839781945206891229035081139535266037057033378415390353746447012903101485e+33, "8.839781945206891229035081139535266037057033378415390353746447012903101485e+33", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.711123560991297649877080280435694393772679378388200862936651880878974513e+31, "9.711123560991297649877080280435694393772679378388200862936651880878974513e+31", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.629549637595714724789129505098155944312207076674498749184233965222505036e+29, "9.629549637595714724789129505098155944312207076674498749184233965222505036e+29", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.574490956477982663124058935512682291631619753616365947349506147258465402e+27, "8.574490956477982663124058935512682291631619753616365947349506147258465402e+27", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.813448512582564107136706674347542806763477703915847701777955330517207527e+25, "6.813448512582564107136706674347542806763477703915847701777955330517207527e+25", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.794883897023788035285405896000621807947409236640451176090748912226153397e+23, "4.794883897023788035285405896000621807947409236640451176090748912226153397e+23", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.960479107645842137800504870276268649357196518321705636965540139043447991e+21, "2.960479107645842137800504870276268649357196518321705636965540139043447991e+21", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.584873693858658935208259218348427715203386574579073396812006362138544628e+19, "1.584873693858658935208259218348427715203386574579073396812006362138544628e+19", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.245936834930690813978996898166861135901321349975150652784783993349872251e+16, "7.245936834930690813978996898166861135901321349975150652784783993349872251e+16", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.773017141345068472510554017030953209437181800565207451480397068178339458e+14, "2.773017141345068472510554017030953209437181800565207451480397068178339458e+14", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.641092177320087625773994531564401851985558319657745034892144486195046163e+11, "8.641092177320087625773994531564401851985558319657745034892144486195046163e+11", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.105900602857710093040451403979744395599050533242553243284994146810134883e+09, "2.105900602857710093040451403979744395599050533242553243284994146810134883e+09", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.764831079995208797424885873124263386851285031310243195313947355076198006e+06, "3.764831079995208797424885873124263386851285031310243195313947355076198006e+06", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.390800780998954208500039666019609185743083611214630479125238184115750385e+03, "4.390800780998954208500039666019609185743083611214630479125238184115750385e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.506628274631000502415765284811045253006986740609938316629923576327386304e+00, "2.506628274631000502415765284811045253006986740609938316629923576327386304e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[49] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.586232415111681806429643551536119799691976323891200000000000000000000000e+59, "2.586232415111681806429643551536119799691976323891200000000000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.147760594457772724544789095126583405046340554378444800000000000000000000e+60, "1.147760594457772724544789095126583405046340554378444800000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.336873167741057974874912069439520834275222024827699200000000000000000000e+60, "2.336873167741057974874912069439520834275222024827699200000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.939317717948202275053279980882650292343063152909352960000000000000000000e+60, "2.939317717948202275053279980882650292343063152909352960000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.587321266207338310075066414082486631849657629849681920000000000000000000e+60, "2.587321266207338310075066414082486631849657629849681920000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.708759679197182632355739853743909528366304368999677296640000000000000000e+60, "1.708759679197182632355739853743909528366304368999677296640000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.853793140116069180377738686747691213170064352110549401600000000000000000e+59, "8.853793140116069180377738686747691213170064352110549401600000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.712847307796887697739638943011607706661342285570961571840000000000000000e+59, "3.712847307796887697739638943011607706661342285570961571840000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.289323070446191229806483814370209648903283093834096836608000000000000000e+59, "1.289323070446191229806483814370209648903283093834096836608000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.773184626371587855448424329320482554352785932897781894348800000000000000e+58, "3.773184626371587855448424329320482554352785932897781894348800000000000000e+58", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.435061276344423987072041299926950982073631843385358712832000000000000000e+57, "9.435061276344423987072041299926950982073631843385358712832000000000000000e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.038454928643566553335326814205831024316152779380233211904000000000000000e+57, "2.038454928643566553335326814205831024316152779380233211904000000000000000e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.839990097014298964461251746728788062040820983609914982400000000000000000e+56, "3.839990097014298964461251746728788062040820983609914982400000000000000000e+56", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.354892309375504992458915625473361082395092049509521612800000000000000000e+55, "6.354892309375504992458915625473361082395092049509521612800000000000000000e+55", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.297725282262744672148100400166565576520346155229059072000000000000000000e+54, "9.297725282262744672148100400166565576520346155229059072000000000000000000e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.209049614463758144562437732220821438434464881014066944000000000000000000e+54, "1.209049614463758144562437732220821438434464881014066944000000000000000000e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.403659584108905732081564809222007746403637980496076800000000000000000000e+53, "1.403659584108905732081564809222007746403637980496076800000000000000000000e+53", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.460430771262504410833767704612689276896332359898060800000000000000000000e+52, "1.460430771262504410833767704612689276896332359898060800000000000000000000e+52", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.366143204159002782577065768878538489390347732147072000000000000000000000e+51, "1.366143204159002782577065768878538489390347732147072000000000000000000000e+51", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.152069768627836143111498892510529224478160293107040000000000000000000000e+50, "1.152069768627836143111498892510529224478160293107040000000000000000000000e+50", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.778134072359739526905845579458057851415301312320000000000000000000000000e+48, "8.778134072359739526905845579458057851415301312320000000000000000000000000e+48", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.054274336803456047167091188388392791058897181680000000000000000000000000e+47, "6.054274336803456047167091188388392791058897181680000000000000000000000000e+47", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.785217864372490349864295597961987080566291959200000000000000000000000000e+46, "3.785217864372490349864295597961987080566291959200000000000000000000000000e+46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.147675745636024418606666386969855430516329329000000000000000000000000000e+45, "2.147675745636024418606666386969855430516329329000000000000000000000000000e+45", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.106702410770888109717062552947599620817425600000000000000000000000000000e+44, "1.106702410770888109717062552947599620817425600000000000000000000000000000e+44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.181697115208175590688403931524236804258068000000000000000000000000000000e+42, "5.181697115208175590688403931524236804258068000000000000000000000000000000e+42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.204691425427143998305817115095088274690720000000000000000000000000000000e+41, "2.204691425427143998305817115095088274690720000000000000000000000000000000e+41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.522623270425567317240421434031487657474000000000000000000000000000000000e+39, "8.522623270425567317240421434031487657474000000000000000000000000000000000e+39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.991703958167186325234691030612357960000000000000000000000000000000000000e+38, "2.991703958167186325234691030612357960000000000000000000000000000000000000e+38", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.527992642977421966550442489563632412000000000000000000000000000000000000e+36, "9.527992642977421966550442489563632412000000000000000000000000000000000000e+36", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.749637581210127837980751990835613680000000000000000000000000000000000000e+35, "2.749637581210127837980751990835613680000000000000000000000000000000000000e+35", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.178189516884684460466301376197071000000000000000000000000000000000000000e+33, "7.178189516884684460466301376197071000000000000000000000000000000000000000e+33", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.691582574877344639525149014665600000000000000000000000000000000000000000e+32, "1.691582574877344639525149014665600000000000000000000000000000000000000000e+32", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.588845541974326926673272048872000000000000000000000000000000000000000000e+30, "3.588845541974326926673272048872000000000000000000000000000000000000000000e+30", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.832472360434176596931313852800000000000000000000000000000000000000000000e+28, "6.832472360434176596931313852800000000000000000000000000000000000000000000e+28", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.162585907585797437278546956000000000000000000000000000000000000000000000e+27, "1.162585907585797437278546956000000000000000000000000000000000000000000000e+27", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.759447826405610148821312000000000000000000000000000000000000000000000000e+25, "1.759447826405610148821312000000000000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.354174640292022182957920000000000000000000000000000000000000000000000000e+23, "2.354174640292022182957920000000000000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.764512833139771127128000000000000000000000000000000000000000000000000000e+21, "2.764512833139771127128000000000000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.823199175622735427100000000000000000000000000000000000000000000000000000e+19, "2.823199175622735427100000000000000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.478468141272164800000000000000000000000000000000000000000000000000000000e+17, "2.478468141272164800000000000000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.842713641648132000000000000000000000000000000000000000000000000000000000e+15, "1.842713641648132000000000000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.137488170420800000000000000000000000000000000000000000000000000000000000e+13, "1.137488170420800000000000000000000000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.672014134600000000000000000000000000000000000000000000000000000000000000e+10, "5.672014134600000000000000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.194862400000000000000000000000000000000000000000000000000000000000000000e+08, "2.194862400000000000000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.183320000000000000000000000000000000000000000000000000000000000000000000e+05, "6.183320000000000000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.128000000000000000000000000000000000000000000000000000000000000000000000e+03, "1.128000000000000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[49] = { + static_cast(boost::math::tools::make_big_value( 9.256115936295239128792053510340342045264892843178101822334871337037830072e+59, "9.256115936295239128792053510340342045264892843178101822334871337037830072e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.226382973449509462464247401218271019985727521806127065773488938845990367e+60, "1.226382973449509462464247401218271019985727521806127065773488938845990367e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.954125855720840120393676022050001333138789037332565663424594891457273557e+59, "7.954125855720840120393676022050001333138789037332565663424594891457273557e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.365654586155298475098646391183374531128854691159534781627889669107191405e+59, "3.365654586155298475098646391183374531128854691159534781627889669107191405e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.044730374864121201936514442517987939299764008179567577221682561782183421e+59, "1.044730374864121201936514442517987939299764008179567577221682561782183421e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.536356651078758500509516730725625323443004425012359430385110182685573948e+58, "2.536356651078758500509516730725625323443004425012359430385110182685573948e+58", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.014086778674585662580239648780048641118590040590185584314710995851825637e+57, "5.014086778674585662580239648780048641118590040590185584314710995851825637e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.297512615100351568281310997196097430272736169985311846063847409602541101e+56, "8.297512615100351568281310997196097430272736169985311846063847409602541101e+56", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.172699484909110833455814713100736399837181820940085502574724938707290372e+56, "1.172699484909110833455814713100736399837181820940085502574724938707290372e+56", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.437106278000765568297205273500695563702563420274384149002742312586130286e+55, "1.437106278000765568297205273500695563702563420274384149002742312586130286e+55", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.545174371038470657228461270859888251519093095798232203286784662979129719e+54, "1.545174371038470657228461270859888251519093095798232203286784662979129719e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.471402006255895070535216946049289412987253853074246902793428565040300946e+53, "1.471402006255895070535216946049289412987253853074246902793428565040300946e+53", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.250412452299054568666234182931337401773386777590706330586351790579683785e+52, "1.250412452299054568666234182931337401773386777590706330586351790579683785e+52", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.542277292811232416618979097150690892713986488440887554977845301225180167e+50, "9.542277292811232416618979097150690892713986488440887554977845301225180167e+50", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.573086578098175124839634461979173468237189761083032074786971884241523043e+49, "6.573086578098175124839634461979173468237189761083032074786971884241523043e+49", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.104607420271440962257749252277010146224322860594339170999893725175800398e+48, "4.104607420271440962257749252277010146224322860594339170999893725175800398e+48", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.331938462909285706991247107187321645123045527742414883815000495606636547e+47, "2.331938462909285706991247107187321645123045527742414883815000495606636547e+47", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.208943799307442534797422457740696336724404643783689597868534121046756796e+46, "1.208943799307442534797422457740696336724404643783689597868534121046756796e+46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.733493346199244389057953770564978235470425412393741328222813802783023596e+44, "5.733493346199244389057953770564978235470425412393741328222813802783023596e+44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.492565577437473684677047557246888601845840521959370888739670894941330993e+43, "2.492565577437473684677047557246888601845840521959370888739670894941330993e+43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.949686666262532681847746981577965659951530620900061798663932175932503947e+41, "9.949686666262532681847746981577965659951530620900061798663932175932503947e+41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.651553737747111429808666993553840522239787479567412806226997545642698201e+40, "3.651553737747111429808666993553840522239787479567412806226997545642698201e+40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.233339502372167653077823100186702309252932859938068579827741608727620372e+39, "1.233339502372167653077823100186702309252932859938068579827741608727620372e+39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.836417632015534931979173072268670137192644539820843175043472436022533106e+37, "3.836417632015534931979173072268670137192644539820843175043472436022533106e+37", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.099476078371695988128239701316213720767789442435824569996795481661867708e+36, "1.099476078371695988128239701316213720767789442435824569996795481661867708e+36", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.903495249944998411669955533495843613032560579446280190215596256375769138e+34, "2.903495249944998411669955533495843613032560579446280190215596256375769138e+34", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.064350138053898858268455142115215057417819864153422362951139202939062254e+32, "7.064350138053898858268455142115215057417819864153422362951139202939062254e+32", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.582922994233975143266417356893351025577967930478759984258796518122317112e+31, "1.582922994233975143266417356893351025577967930478759984258796518122317112e+31", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.264234026390622585348908134631186844315412961960282698027228844566912117e+29, "3.264234026390622585348908134631186844315412961960282698027228844566912117e+29", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.188774153889105680535092985608022230760508397240005354866271201170463092e+27, "6.188774153889105680535092985608022230760508397240005354866271201170463092e+27", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.077355341399798609786211120408446935756994848842131485074396331912972263e+26, "1.077355341399798609786211120408446935756994848842131485074396331912972263e+26", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.719182300108746375704686202821491852452619639378413670885143111968297622e+24, "1.719182300108746375704686202821491852452619639378413670885143111968297622e+24", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.509589596583338412898049035294868361167322854043341291672085090640104583e+22, "2.509589596583338412898049035294868361167322854043341291672085090640104583e+22", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.342872197271389972201661238004898097226547537612646678471852083509061055e+20, "3.342872197271389972201661238004898097226547537612646678471852083509061055e+20", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.051089551701679946626603411942133093477647785693757342688765248578133558e+18, "4.051089551701679946626603411942133093477647785693757342688765248578133558e+18", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.450407423742747934005020832364099630124534867513398798024857849571995697e+16, "4.450407423742747934005020832364099630124534867513398798024857849571995697e+16", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.413023778896356322547226273989314105826233010702360664846872922408122652e+14, "4.413023778896356322547226273989314105826233010702360664846872922408122652e+14", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.929512168994516762673517469057078217752079550440541815733308359698355209e+12, "3.929512168994516762673517469057078217752079550440541815733308359698355209e+12", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.122462776963280343259527700358220850883119067227711325233658329309622143e+10, "3.122462776963280343259527700358220850883119067227711325233658329309622143e+10", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.197396290684303702682694949348422316362810937601334045965871833844532390e+08, "2.197396290684303702682694949348422316362810937601334045965871833844532390e+08", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.356726450420886407112529306259506900505875228060535982041959265851381932e+06, "1.356726450420886407112529306259506900505875228060535982041959265851381932e+06", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.263148912218322814862431970673685825699419657740452507847522864799628960e+03, "7.263148912218322814862431970673685825699419657740452507847522864799628960e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.320663245567314255422944457710191091603773917350053498982455870821336578e+01, "3.320663245567314255422944457710191091603773917350053498982455870821336578e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.270816501767199044429825237923512258332267743288560304635568302760089360e-01, "1.270816501767199044429825237923512258332267743288560304635568302760089360e-01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.960034133400021433681975737071902053498506976351095156717280432287769760e-04, "3.960034133400021433681975737071902053498506976351095156717280432287769760e-04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.650907660437171004901238983264357806498757360812524606971708594836581635e-07, "9.650907660437171004901238983264357806498757360812524606971708594836581635e-07", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.725344352001816640635025885398718044955247687225228912342703408863775468e-09, "1.725344352001816640635025885398718044955247687225228912342703408863775468e-09", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.012213341659767638341287600182102653785253052492980766472349845276996656e-12, "2.012213341659767638341287600182102653785253052492980766472349845276996656e-12", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.148735984247176123115370642724455566337349193609892794757225210307646070e-15, "1.148735984247176123115370642724455566337349193609892794757225210307646070e-15", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[49] = { + static_cast(boost::math::tools::make_big_value( 0.000000000000000000000000000000000000000000000000000000000000000000000000e+00, "0.000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.586232415111681806429643551536119799691976323891200000000000000000000000e+59, "2.586232415111681806429643551536119799691976323891200000000000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.147760594457772724544789095126583405046340554378444800000000000000000000e+60, "1.147760594457772724544789095126583405046340554378444800000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.336873167741057974874912069439520834275222024827699200000000000000000000e+60, "2.336873167741057974874912069439520834275222024827699200000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.939317717948202275053279980882650292343063152909352960000000000000000000e+60, "2.939317717948202275053279980882650292343063152909352960000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.587321266207338310075066414082486631849657629849681920000000000000000000e+60, "2.587321266207338310075066414082486631849657629849681920000000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.708759679197182632355739853743909528366304368999677296640000000000000000e+60, "1.708759679197182632355739853743909528366304368999677296640000000000000000e+60", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.853793140116069180377738686747691213170064352110549401600000000000000000e+59, "8.853793140116069180377738686747691213170064352110549401600000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.712847307796887697739638943011607706661342285570961571840000000000000000e+59, "3.712847307796887697739638943011607706661342285570961571840000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.289323070446191229806483814370209648903283093834096836608000000000000000e+59, "1.289323070446191229806483814370209648903283093834096836608000000000000000e+59", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.773184626371587855448424329320482554352785932897781894348800000000000000e+58, "3.773184626371587855448424329320482554352785932897781894348800000000000000e+58", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.435061276344423987072041299926950982073631843385358712832000000000000000e+57, "9.435061276344423987072041299926950982073631843385358712832000000000000000e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.038454928643566553335326814205831024316152779380233211904000000000000000e+57, "2.038454928643566553335326814205831024316152779380233211904000000000000000e+57", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.839990097014298964461251746728788062040820983609914982400000000000000000e+56, "3.839990097014298964461251746728788062040820983609914982400000000000000000e+56", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.354892309375504992458915625473361082395092049509521612800000000000000000e+55, "6.354892309375504992458915625473361082395092049509521612800000000000000000e+55", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.297725282262744672148100400166565576520346155229059072000000000000000000e+54, "9.297725282262744672148100400166565576520346155229059072000000000000000000e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.209049614463758144562437732220821438434464881014066944000000000000000000e+54, "1.209049614463758144562437732220821438434464881014066944000000000000000000e+54", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.403659584108905732081564809222007746403637980496076800000000000000000000e+53, "1.403659584108905732081564809222007746403637980496076800000000000000000000e+53", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.460430771262504410833767704612689276896332359898060800000000000000000000e+52, "1.460430771262504410833767704612689276896332359898060800000000000000000000e+52", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.366143204159002782577065768878538489390347732147072000000000000000000000e+51, "1.366143204159002782577065768878538489390347732147072000000000000000000000e+51", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.152069768627836143111498892510529224478160293107040000000000000000000000e+50, "1.152069768627836143111498892510529224478160293107040000000000000000000000e+50", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.778134072359739526905845579458057851415301312320000000000000000000000000e+48, "8.778134072359739526905845579458057851415301312320000000000000000000000000e+48", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.054274336803456047167091188388392791058897181680000000000000000000000000e+47, "6.054274336803456047167091188388392791058897181680000000000000000000000000e+47", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.785217864372490349864295597961987080566291959200000000000000000000000000e+46, "3.785217864372490349864295597961987080566291959200000000000000000000000000e+46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.147675745636024418606666386969855430516329329000000000000000000000000000e+45, "2.147675745636024418606666386969855430516329329000000000000000000000000000e+45", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.106702410770888109717062552947599620817425600000000000000000000000000000e+44, "1.106702410770888109717062552947599620817425600000000000000000000000000000e+44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.181697115208175590688403931524236804258068000000000000000000000000000000e+42, "5.181697115208175590688403931524236804258068000000000000000000000000000000e+42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.204691425427143998305817115095088274690720000000000000000000000000000000e+41, "2.204691425427143998305817115095088274690720000000000000000000000000000000e+41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.522623270425567317240421434031487657474000000000000000000000000000000000e+39, "8.522623270425567317240421434031487657474000000000000000000000000000000000e+39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.991703958167186325234691030612357960000000000000000000000000000000000000e+38, "2.991703958167186325234691030612357960000000000000000000000000000000000000e+38", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.527992642977421966550442489563632412000000000000000000000000000000000000e+36, "9.527992642977421966550442489563632412000000000000000000000000000000000000e+36", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.749637581210127837980751990835613680000000000000000000000000000000000000e+35, "2.749637581210127837980751990835613680000000000000000000000000000000000000e+35", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.178189516884684460466301376197071000000000000000000000000000000000000000e+33, "7.178189516884684460466301376197071000000000000000000000000000000000000000e+33", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.691582574877344639525149014665600000000000000000000000000000000000000000e+32, "1.691582574877344639525149014665600000000000000000000000000000000000000000e+32", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.588845541974326926673272048872000000000000000000000000000000000000000000e+30, "3.588845541974326926673272048872000000000000000000000000000000000000000000e+30", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.832472360434176596931313852800000000000000000000000000000000000000000000e+28, "6.832472360434176596931313852800000000000000000000000000000000000000000000e+28", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.162585907585797437278546956000000000000000000000000000000000000000000000e+27, "1.162585907585797437278546956000000000000000000000000000000000000000000000e+27", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.759447826405610148821312000000000000000000000000000000000000000000000000e+25, "1.759447826405610148821312000000000000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.354174640292022182957920000000000000000000000000000000000000000000000000e+23, "2.354174640292022182957920000000000000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.764512833139771127128000000000000000000000000000000000000000000000000000e+21, "2.764512833139771127128000000000000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.823199175622735427100000000000000000000000000000000000000000000000000000e+19, "2.823199175622735427100000000000000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.478468141272164800000000000000000000000000000000000000000000000000000000e+17, "2.478468141272164800000000000000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.842713641648132000000000000000000000000000000000000000000000000000000000e+15, "1.842713641648132000000000000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.137488170420800000000000000000000000000000000000000000000000000000000000e+13, "1.137488170420800000000000000000000000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.672014134600000000000000000000000000000000000000000000000000000000000000e+10, "5.672014134600000000000000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.194862400000000000000000000000000000000000000000000000000000000000000000e+08, "2.194862400000000000000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.183320000000000000000000000000000000000000000000000000000000000000000000e+05, "6.183320000000000000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.128000000000000000000000000000000000000000000000000000000000000000000000e+03, "1.128000000000000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.000000000000000000000000000000000000000000000000000000000000000000000000e+00, "1.000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[48] = { + static_cast(boost::math::tools::make_big_value( 1.233965513689195496302526816415068018137532804347903252026160914018410959e+01, "1.233965513689195496302526816415068018137532804347903252026160914018410959e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.432567696701419045483804034990696504881298696037704685583731202573594084e+02, "-1.432567696701419045483804034990696504881298696037704685583731202573594084e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.800990151010204780591569831451389602736047219596430673280355834870101274e+02, "7.800990151010204780591569831451389602736047219596430673280355834870101274e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.648373417629954217779547889047207255669324591553480603234009701221311635e+03, "-2.648373417629954217779547889047207255669324591553480603234009701221311635e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.284437059737535030909183878223579768026497336818714964176813046702885009e+03, "6.284437059737535030909183878223579768026497336818714964176813046702885009e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.107670081863262975759677889098250504331506870772724719160419469778560968e+04, "-1.107670081863262975759677889098250504331506870772724719160419469778560968e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.504360049237893454280746661699303420195288960483588101185311510511921407e+04, "1.504360049237893454280746661699303420195288960483588101185311510511921407e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.611963690317610801367925234041815344408602188860817148261094946859641055e+04, "-1.611963690317610801367925234041815344408602188860817148261094946859641055e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.384196825969374886217890731633708081987015968697189525652444057097652970e+04, "1.384196825969374886217890731633708081987015968697189525652444057097652970e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.622790278065968351142661698209916105231451436587332112667311309898112907e+03, "-9.622790278065968351142661698209916105231451436587332112667311309898112907e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.449580263451402816852387882691399098166718792531955596134468390704873784e+03, "5.449580263451402816852387882691399098166718792531955596134468390704873784e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.521891259305373384442177581056279631601936059906718384076120380236152660e+03, "-2.521891259305373384442177581056279631601936059906718384076120380236152660e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.540905879286304237452585078525021002948388724011947750659051968465604420e+02, "9.540905879286304237452585078525021002948388724011947750659051968465604420e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.945234350579576646146368625320015500721771847656877764914364796999018932e+02, "-2.945234350579576646146368625320015500721771847656877764914364796999018932e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.387416831492605275144126841246803690906548552137287238128485938487779304e+01, "7.387416831492605275144126841246803690906548552137287238128485938487779304e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.495798927786732788454640929952042349030889163403974404914516146280530443e+01, "-1.495798927786732788454640929952042349030889163403974404914516146280530443e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.422943482445615791699986810123527175351383953692494761445061153868299970e+00, "2.422943482445615791699986810123527175351383953692494761445061153868299970e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.102903565532198274392276413606953369815588940855811878456066484772851432e-01, "-3.102903565532198274392276413606953369815588940855811878456066484772851432e-01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.094535028891646496546262084074169534843273855151767819779938179094208188e-02, "3.094535028891646496546262084074169534843273855151767819779938179094208188e-02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.358095366769232988323350838247191988585424776577310286935330610243011743e-03, "-2.358095366769232988323350838247191988585424776577310286935330610243011743e-03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.340530976890392038064297300042596231921772020705486053763028541479656280e-04, "1.340530976890392038064297300042596231921772020705486053763028541479656280e-04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.516126555541810552632615941497264105370152230590961486150754875983890898e-06, "-5.516126555541810552632615941497264105370152230590961486150754875983890898e-06", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.581070770182358530034488215134552244420314579258249233845063889274308385e-07, "1.581070770182358530034488215134552244420314579258249233845063889274308385e-07", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.004041803560396287949218893554883846494476801309699018606217164405518118e-09, "-3.004041803560396287949218893554883846494476801309699018606217164405518118e-09", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.544940513373792201443764129828570298376651506143103507977578771056330357e-11, "3.544940513373792201443764129828570298376651506143103507977578771056330357e-11", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.379886756316120706725450388823927894039691498002769785120646242635823255e-13, "-2.379886756316120706725450388823927894039691498002769785120646242635823255e-13", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.045944766231461555774689284231476775257484866624431880423176393512207387e-16, "8.045944766231461555774689284231476775257484866624431880423176393512207387e-16", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.148008349481903710728852060629194581596537318553456161574664356163226596e-18, "-1.148008349481903710728852060629194581596537318553456161574664356163226596e-18", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.275939213508899016428747078031525836021120921513924955762486505940940452e-22, "5.275939213508899016428747078031525836021120921513924955762486505940940452e-22", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.002074313199153828387282409848698339315167131865367803807278126600553143e-26, "-5.002074313199153828387282409848698339315167131865367803807278126600553143e-26", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.312111841788085794021549817149806212210409562054999023338937587332395908e-31, "4.312111841788085794021549817149806212210409562054999023338937587332395908e-31", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.626943187621427535665396572257733498961554813667830477603994486170242725e-38, "-5.626943187621427535665396572257733498961554813667830477603994486170242725e-38", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.301342661659868689654008011518619781951990528882947953585638647826710208e-40, "1.301342661659868689654008011518619781951990528882947953585638647826710208e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.943206436729179344584590804980950978078020765463364229230497237642990035e-40, "-1.943206436729179344584590804980950978078020765463364229230497237642990035e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.427985516258891942239250982488681113868086410604389604401061682071089711e-40, "2.427985516258891942239250982488681113868086410604389604401061682071089711e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.507315406936486999900039292673781706696418133992677762607195734544800586e-40, "-2.507315406936486999900039292673781706696418133992677762607195734544800586e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.128602212783277628616662270027724563712726585388232543952969868791288808e-40, "2.128602212783277628616662270027724563712726585388232543952969868791288808e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.491772665541813784561971549986243397968726526748411110109050933398474269e-40, "-1.491772665541813784561971549986243397968726526748411110109050933398474269e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.703534948980953284999107504304646577995487754638088095508324603995172100e-41, "8.703534948980953284999107504304646577995487754638088095508324603995172100e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.254734374358011114570777363031532176229997594050978074992481078060588238e-41, "-4.254734374358011114570777363031532176229997594050978074992481078060588238e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.744400882431682663010546719169103111178937911186079762496396144974231758e-41, "1.744400882431682663010546719169103111178937911186079762496396144974231758e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.962681142344559707919656870822506290159603512929253279249408502104315114e-42, "-5.962681142344559707919656870822506290159603512929253279249408502104315114e-42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.676028721091677637759913537058723470799950761402802553076562435074866681e-42, "1.676028721091677637759913537058723470799950761402802553076562435074866681e-42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.784145301171889911387402141919770031244273301985414474074193734901497838e-43, "-3.784145301171889911387402141919770031244273301985414474074193734901497838e-43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.609382025715763421062067113377305459236198785081684246167946524325632358e-44, "6.609382025715763421062067113377305459236198785081684246167946524325632358e-44", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.390549764136377795654766730143252213193890014751189315315457960953487009e-45, "-8.390549764136377795654766730143252213193890014751189315315457960953487009e-45", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.892571860428412953244204670046307154753124542150699703190076405369134986e-46, "6.892571860428412953244204670046307154753124542150699703190076405369134986e-46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.750996769906711001487027901108989269217518777400665423098451353536180397e-47, "-2.750996769906711001487027901108989269217518777400665423098451353536180397e-47", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[48] = { + static_cast(boost::math::tools::make_big_value( 1.614127734928823683399031924928203896697519780457812139739363243361356121e+02, "1.614127734928823683399031924928203896697519780457812139739363243361356121e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.873915620620241270111954934939697069495813017577862172724257417200307532e+03, "-1.873915620620241270111954934939697069495813017577862172724257417200307532e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.020433263568799913803105156119729477192007677199414299858195073560627451e+04, "1.020433263568799913803105156119729477192007677199414299858195073560627451e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.464288862550385816890047588667703388387049707546055857832236105882063068e+04, "-3.464288862550385816890047588667703388387049707546055857832236105882063068e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.220557255453323997837181773609238378313171107809994660932186398177260086e+04, "8.220557255453323997837181773609238378313171107809994660932186398177260086e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.448922988893760252035044756495535237100474172953062930583429032976738764e+05, "-1.448922988893760252035044756495535237100474172953062930583429032976738764e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.967825884804576295373543809345485166700533400342174877153161242305801190e+05, "1.967825884804576295373543809345485166700533400342174877153161242305801190e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.108580240999530194943835615053920860235079936071561387017856553284307741e+05, "-2.108580240999530194943835615053920860235079936071561387017856553284307741e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.810642568703399030220299393722324927217417866857948859237865608524037352e+05, "1.810642568703399030220299393722324927217417866857948859237865608524037352e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.258739608434628125323282855631713548863857229929349389847042534864564944e+05, "-1.258739608434628125323282855631713548863857229929349389847042534864564944e+05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.128496339139347963949841917163532287235353252857530075762245657435637432e+04, "7.128496339139347963949841917163532287235353252857530075762245657435637432e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.298839862995292241245807816785011319551976707839297599695370993581498944e+04, "-3.298839862995292241245807816785011319551976707839297599695370993581498944e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.248028459892634227909925496833936295152351078572924268478121601580013392e+04, "1.248028459892634227909925496833936295152351078572924268478121601580013392e+04", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.852607223132643180520259993802350485519940462836224552121831884016060957e+03, "-3.852607223132643180520259993802350485519940462836224552121831884016060957e+03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.663344935420648740647632834149137036410170363282848810726789852512040974e+02, "9.663344935420648740647632834149137036410170363282848810726789852512040974e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.956627238308290890004850312580119602770863155061517303602115059073018915e+02, "-1.956627238308290890004850312580119602770863155061517303602115059073018915e+02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.169408084580850119987259593698335014334975914638255180200227109093248923e+01, "3.169408084580850119987259593698335014334975914638255180200227109093248923e+01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.058851441448441752395908342271882717629330686791993331066549580482119207e+00, "-4.058851441448441752395908342271882717629330686791993331066549580482119207e+00", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.047904711622988136321913253467026391205138759157051345098701122533901641e-01, "4.047904711622988136321913253467026391205138759157051345098701122533901641e-01", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.084581449711468658856874852797634685668605539676219540421511092086784257e-02, "-3.084581449711468658856874852797634685668605539676219540421511092086784257e-02", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.753524069615947925605286028020036313127948537531901833841745089038345419e-03, "1.753524069615947925605286028020036313127948537531901833841745089038345419e-03", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.215544327537876774584851905154058374732203881621234998864896154317725107e-05, "-7.215544327537876774584851905154058374732203881621234998864896154317725107e-05", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.068169776809028066872463505146223239383722607505095101927453621607143258e-06, "2.068169776809028066872463505146223239383722607505095101927453621607143258e-06", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.929532177536816530254915957100118239727512976366989010196601003141928983e-08, "-3.929532177536816530254915957100118239727512976366989010196601003141928983e-08", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.637071893688824301043677755554700799944720607401583032240419889530137613e-10, "4.637071893688824301043677755554700799944720607401583032240419889530137613e-10", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.113086368090515818656083953394041201305628629939937324183681568207995992e-12, "-3.113086368090515818656083953394041201305628629939937324183681568207995992e-12", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.052475329075586591944149534403412432330839345810529801140374324740860043e-14, "1.052475329075586591944149534403412432330839345810529801140374324740860043e-14", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.501688739492061913271178171928421774535209059448213231063121542726735922e-17, "-1.501688739492061913271178171928421774535209059448213231063121542726735922e-17", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.901359655394917555561825304708227606591126162154019191593957327845941711e-21, "6.901359655394917555561825304708227606591126162154019191593957327845941711e-21", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.543121984804052902464306048576584437634232699686221158393201347605610557e-25, "-6.543121984804052902464306048576584437634232699686221158393201347605610557e-25", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.640594686585611716813857202286477090235259523435190405734068397561049518e-30, "5.640594686585611716813857202286477090235259523435190405734068397561049518e-30", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.360501538535076761830231649645320930651740695652757112015168140991871811e-37, "-7.360501538535076761830231649645320930651740695652757112015168140991871811e-37", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.702262550718545671102818966852852449667460777654069395734978498316238097e-39, "1.702262550718545671102818966852852449667460777654069395734978498316238097e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.541872823365472358451692936741339351955915607098512711275660224596475692e-39, "-2.541872823365472358451692936741339351955915607098512711275660224596475692e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.176003476857354088823169817786505980377842772003301806663816129924483628e-39, "3.176003476857354088823169817786505980377842772003301806663816129924483628e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.279773456918425628141724849602711155924011970103858226014129388572719403e-39, "-3.279773456918425628141724849602711155924011970103858226014129388572719403e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.784385649492108496180681575852127700091310578360977342260193352159187181e-39, "2.784385649492108496180681575852127700091310578360977342260193352159187181e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.951360558254817806983487356566692526413661637802019026539779594905551108e-39, "-1.951360558254817806983487356566692526413661637802019026539779594905551108e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.138493498985334706374097781200574458692873800531006014767134080212447095e-39, "1.138493498985334706374097781200574458692873800531006014767134080212447095e-39", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.565540270144127561133019747139820473778629043608866511009741796439135919e-40, "-5.565540270144127561133019747139820473778629043608866511009741796439135919e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.281818911412862056602174736820614290615384940807745468773991962352596562e-40, "2.281818911412862056602174736820614290615384940807745468773991962352596562e-40", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.799674220733213250330301520376602557698625350979839820580611411813901622e-41, "-7.799674220733213250330301520376602557698625350979839820580611411813901622e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.192382536820850868749995412323169490150589703968805623276375892630104761e-41, "2.192382536820850868749995412323169490150589703968805623276375892630104761e-41", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.949971304595638285364920838869349221534754917093372730956379282259345856e-42, "-4.949971304595638285364920838869349221534754917093372730956379282259345856e-42", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.645611826340683772044616248727903964535937439036743879074020086333544390e-43, "8.645611826340683772044616248727903964535937439036743879074020086333544390e-43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.097552479007470044347986004697357054639788223386746160457893283010512693e-43, "-1.097552479007470044347986004697357054639788223386746160457893283010512693e-43", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.016047273189589762707582112298788030798897468010511171850691914431226857e-45, "9.016047273189589762707582112298788030798897468010511171850691914431226857e-45", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.598528593988298984798384438686079221879557020145063999565131046963034260e-46, "-3.598528593988298984798384438686079221879557020145063999565131046963034260e-46", std::integral_constant::value) && ((234 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 3.531905273437499914734871708787977695465087890625000000000000000000000000e+01; } +}; + +inline double lanczos_g_near_1_and_2(const lanczos49MP&) +{ + return 33.54638671875000; +} + + + + + + + +struct lanczos52MP : public std::integral_constant +{ + template + static T lanczos_sum(const T& z) + { + static const T num[52] = { + static_cast(boost::math::tools::make_big_value( 6.2155666558597192337239536765115831322604714024167432764126799013946738944179064162e+86, "6.2155666558597192337239536765115831322604714024167432764126799013946738944179064162e+86", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.4127424062560995063147129656553600039438028633959646865531341376543275935920940510e+86, "6.4127424062560995063147129656553600039438028633959646865531341376543275935920940510e+86", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2432219642804430367752303997394644425738553439619047355470691880100895245432999409e+86, "3.2432219642804430367752303997394644425738553439619047355470691880100895245432999409e+86", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0716287209474721369403884015994122665163651602768597920624758793936677215462844844e+86, "1.0716287209474721369403884015994122665163651602768597920624758793936677215462844844e+86", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6014675657079399574912415792629561012344641595734333223485162579517263855066064448e+85, "2.6014675657079399574912415792629561012344641595734333223485162579517263855066064448e+85", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.9469676695440316675866392095745726625355531618465991865275205877617243118858829897e+84, "4.9469676695440316675866392095745726625355531618465991865275205877617243118858829897e+84", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.6725271559955312030697432949232367888201769834554225137624859446813736913045818789e+83, "7.6725271559955312030697432949232367888201769834554225137624859446813736913045818789e+83", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.9780497929717466762906957902715326245615108291247102827737801883575021795143342955e+82, "9.9780497929717466762906957902715326245615108291247102827737801883575021795143342955e+82", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1101996681004003890634693624249367763382356608502270377869975360325542360496573703e+82, "1.1101996681004003890634693624249367763382356608502270377869975360325542360496573703e+82", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0730494939748425861290791265310097852481749101609248058586423168275758843014930972e+81, "1.0730494939748425861290791265310097852481749101609248058586423168275758843014930972e+81", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.1172053614337336389459663390209768009612090987295451850767107564157925998672033369e+79, "9.1172053614337336389459663390209768009612090987295451850767107564157925998672033369e+79", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.8745706482859815560001340912167784132864948819270481387088631069414787418480398968e+78, "6.8745706482859815560001340912167784132864948819270481387088631069414787418480398968e+78", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.6357176185157048005266104227745750047123126912102898052446617690907900639513363491e+77, "4.6357176185157048005266104227745750047123126912102898052446617690907900639513363491e+77", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8133959284164525780065088214012765730887094925955713435258703832914376223639644932e+76, "2.8133959284164525780065088214012765730887094925955713435258703832914376223639644932e+76", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5448240429477602353083070839059087571962149587434416045281607922549720081768160509e+75, "1.5448240429477602353083070839059087571962149587434416045281607922549720081768160509e+75", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.7087163798498299832185901789792446192843546181020939291287863440328666852365937976e+73, "7.7087163798498299832185901789792446192843546181020939291287863440328666852365937976e+73", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.5087881343681529988104227139117041222747015656224230641710513581568311157611360164e+72, "3.5087881343681529988104227139117041222747015656224230641710513581568311157611360164e+72", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4613990031561986058105893353533330535471171288800176856715938119122276074192401252e+71, "1.4613990031561986058105893353533330535471171288800176856715938119122276074192401252e+71", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.5842870550209699690118875938391296069620575640884684638841925128818533345720622707e+69, "5.5842870550209699690118875938391296069620575640884684638841925128818533345720622707e+69", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.9620974233284411294099207169175001352700074635064713292874723705223947089062735699e+68, "1.9620974233284411294099207169175001352700074635064713292874723705223947089062735699e+68", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.3508670578887212089913735806070046196943428333276779526487779234259460474649929457e+66, "6.3508670578887212089913735806070046196943428333276779526487779234259460474649929457e+66", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.8965656059697746722951241391165378222796048954133067890004635351203115571283351365e+65, "1.8965656059697746722951241391165378222796048954133067890004635351203115571283351365e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.2318932193708961851167812069245962898666936025147808964284039760031905048392189838e+63, "5.2318932193708961851167812069245962898666936025147808964284039760031905048392189838e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3345087899695578368548637479429057252399026780996532026306572668368481753083446035e+62, "1.3345087899695578368548637479429057252399026780996532026306572668368481753083446035e+62", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1496377806602727082710361157715063723084394483433707624016834119253720339362659524e+60, "3.1496377806602727082710361157715063723084394483433707624016834119253720339362659524e+60", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.8813988021021593903128761372635593523664342047294885462297735355749747492567917846e+58, "6.8813988021021593903128761372635593523664342047294885462297735355749747492567917846e+58", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3920956168650489448209669451137968296707297452484593173253158710325555644182737609e+57, "1.3920956168650489448209669451137968296707297452484593173253158710325555644182737609e+57", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6075799130233642952967048487438119546115615639287311948474085370143960495152991553e+55, "2.6075799130233642952967048487438119546115615639287311948474085370143960495152991553e+55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.5215062065032735365892761801093050964342794846560150713881139044884954246649618411e+53, "4.5215062065032735365892761801093050964342794846560150713881139044884954246649618411e+53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.2544625196666558309461059934941389307783421507071758131936839820683873609174384275e+51, "7.2544625196666558309461059934941389307783421507071758131936839820683873609174384275e+51", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0762146929190267795931737389984769617036500590695127135611707890269647516827819385e+50, "1.0762146929190267795931737389984769617036500590695127135611707890269647516827819385e+50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4748530311527356370488285932357594780386892716488623785717991900210848418789146683e+48, "1.4748530311527356370488285932357594780386892716488623785717991900210848418789146683e+48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.8647515097879595082625933421641550420004206477055484917914396725134286781971556627e+46, "1.8647515097879595082625933421641550420004206477055484917914396725134286781971556627e+46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1719649433541326415406560692060639805792580579388667358862336598215919709516402950e+44, "2.1719649433541326415406560692060639805792580579388667358862336598215919709516402950e+44", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.3261545166351967601378626266818200343311913249759151579277193749871910741821474852e+42, "2.3261545166351967601378626266818200343311913249759151579277193749871910741821474852e+42", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2856597199911108057679518458817252978491416960383076400280909448497251424577297828e+40, "2.2856597199911108057679518458817252978491416960383076400280909448497251424577297828e+40", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0550442252418806202988575468283015522717243147245311227478147425985867569431393246e+38, "2.0550442252418806202988575468283015522717243147245311227478147425985867569431393246e+38", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6853992677311201643273807677942992750803865734634293875367989072577697582186788546e+36, "1.6853992677311201643273807677942992750803865734634293875367989072577697582186788546e+36", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2561436609157539906689091056055983931948431067099841829117491622768568140084478954e+34, "1.2561436609157539906689091056055983931948431067099841829117491622768568140084478954e+34", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.4705206401662673954957473131998048608819946981033942322942114785407455940229233196e+31, "8.4705206401662673954957473131998048608819946981033942322942114785407455940229233196e+31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.1407133281903210341367420024686210845937006762879607281383052013961468193494392782e+29, "5.1407133281903210341367420024686210845937006762879607281383052013961468193494392782e+29", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.7901285852211406723998154843259068960125192963338996339928284868353890653815257694e+27, "2.7901285852211406723998154843259068960125192963338996339928284868353890653815257694e+27", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3438998631585891046402379167404007265944767353624748363650936091693896699924614422e+25, "1.3438998631585891046402379167404007265944767353624748363650936091693896699924614422e+25", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.6902706401090767936392657986442523138728548699749092883267263725876049498265301615e+22, "5.6902706401090767936392657986442523138728548699749092883267263725876049498265301615e+22", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0929659841192947874271802260842934838560431084502779238527946412041140734245143884e+20, "2.0929659841192947874271802260842934838560431084502779238527946412041140734245143884e+20", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5862712170406726646812829026907981494912831615106789457689818325123973212320279526e+17, "6.5862712170406726646812829026907981494912831615106789457689818325123973212320279526e+17", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7379005522986464990683100411983090503131358664627225315444053238030719367736285441e+15, "1.7379005522986464990683100411983090503131358664627225315444053238030719367736285441e+15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.7401492854176051649551304067922101744785432102294852270917872876250420006402939364e+12, "3.7401492854176051649551304067922101744785432102294852270917872876250420006402939364e+12", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.3052097444388598287826452442622724171650622602495079541553039504582845036611195233e+09, "6.3052097444388598287826452442622724171650622602495079541553039504582845036611195233e+09", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.8093796662195533917872631136981728293723308532958487302137409818490410036072819019e+06, "7.8093796662195533917872631136981728293723308532958487302137409818490410036072819019e+06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.3192906485096381210566149918556620595525679738152760526187454875638091923687554946e+03, "6.3192906485096381210566149918556620595525679738152760526187454875638091923687554946e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.5066282746310005024157652848110452530069867406099383166299235763422936546004304390e+00, "2.5066282746310005024157652848110452530069867406099383166299235763422936546004304390e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[52] = { + static_cast(boost::math::tools::make_big_value( 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0414093201713378043612608166064768844377641568960512000000000000000000000000000000e+64, "3.0414093201713378043612608166064768844377641568960512000000000000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3683925049359750564345782687270252191318781054337155072000000000000000000000000000e+65, "1.3683925049359750564345782687270252191318781054337155072000000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8312047394413543873001574618939688475496532684433218600960000000000000000000000000e+65, "2.8312047394413543873001574618939688475496532684433218600960000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.6266290361540649084000356943724186480051615706407501824000000000000000000000000000e+65, "3.6266290361540649084000356943724186480051615706407501824000000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2578261522689833134479268958172001145701798207577980403712000000000000000000000000e+65, "3.2578261522689833134479268958172001145701798207577980403712000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2001844261052005486660334218376501837226733355004196185702400000000000000000000000e+65, "2.2001844261052005486660334218376501837226733355004196185702400000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1681037008119350981332433342566749327534832358109654944841728000000000000000000000e+65, "1.1681037008119350981332433342566749327534832358109654944841728000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.0293361153311185534392570196926631029364162024577328008396800000000000000000000000e+64, "5.0293361153311185534392570196926631029364162024577328008396800000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7968291458361430782020246122299560311802074147902210076049408000000000000000000000e+64, "1.7968291458361430782020246122299560311802074147902210076049408000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4212998306869600977887871207212578754682594793002122395254784000000000000000000000e+63, "5.4212998306869600977887871207212578754682594793002122395254784000000000000000000000e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4006322967557247180769968530346138316658911433773347563153653760000000000000000000e+63, "1.4006322967557247180769968530346138316658911433773347563153653760000000000000000000e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1334912462852682149761710693821775975226278702191992823808000000000000000000000000e+62, "3.1334912462852682149761710693821775975226278702191992823808000000000000000000000000e+62", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.1263921790865468343839418571823409266633338824655665334886400000000000000000000000e+61, "6.1263921790865468343839418571823409266633338824655665334886400000000000000000000000e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0548002159482240692664043366538929906734975613031337827840000000000000000000000000e+61, "1.0548002159482240692664043366538929906734975613031337827840000000000000000000000000e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6095781466700764043324234378972985924892034584990590768742400000000000000000000000e+60, "1.6095781466700764043324234378972985924892034584990590768742400000000000000000000000e+60", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1887214284827766716471402753528692603931747042835394432000000000000000000000000000e+59, "2.1887214284827766716471402753528692603931747042835394432000000000000000000000000000e+59", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6644926572075096083148238618984385847884240529010940198400000000000000000000000000e+58, "2.6644926572075096083148238618984385847884240529010940198400000000000000000000000000e+58", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9154102380883742873084802432628398856163736124576909120000000000000000000000000000e+57, "2.9154102380883742873084802432628398856163736124576909120000000000000000000000000000e+57", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8768151045628896730547232493410634338494669305466040192000000000000000000000000000e+56, "2.8768151045628896730547232493410634338494669305466040192000000000000000000000000000e+56", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.5674503027583263140245049650089911892130421780961760000000000000000000000000000000e+55, "2.5674503027583263140245049650089911892130421780961760000000000000000000000000000000e+55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0774565729992714117801952876016228015049549176491224000000000000000000000000000000e+54, "2.0774565729992714117801952876016228015049549176491224000000000000000000000000000000e+54", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5271995659293168127377699172748774995796493494870600000000000000000000000000000000e+53, "1.5271995659293168127377699172748774995796493494870600000000000000000000000000000000e+53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0217297271367563021376459886512004721472442416486880000000000000000000000000000000e+52, "1.0217297271367563021376459886512004721472442416486880000000000000000000000000000000e+52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.2295402510227377004563262212164474005108576587500000000000000000000000000000000000e+50, "6.2295402510227377004563262212164474005108576587500000000000000000000000000000000000e+50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4652078765044198452095090589463630638929867781650000000000000000000000000000000000e+49, "3.4652078765044198452095090589463630638929867781650000000000000000000000000000000000e+49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7599751702378955591170076678443001141850220448750000000000000000000000000000000000e+48, "1.7599751702378955591170076678443001141850220448750000000000000000000000000000000000e+48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.1661954970720573655661780303655361431161958585000000000000000000000000000000000000e+46, "8.1661954970720573655661780303655361431161958585000000000000000000000000000000000000e+46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4624589782073664468902246801624082962588775000000000000000000000000000000000000000e+45, "3.4624589782073664468902246801624082962588775000000000000000000000000000000000000000e+45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3415303241063823936930939721131813816093940000000000000000000000000000000000000000e+44, "1.3415303241063823936930939721131813816093940000000000000000000000000000000000000000e+44", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7484118887814252101652801793318408875609500000000000000000000000000000000000000000e+42, "4.7484118887814252101652801793318408875609500000000000000000000000000000000000000000e+42", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5345701242523770267594030980609724717749800000000000000000000000000000000000000000e+41, "1.5345701242523770267594030980609724717749800000000000000000000000000000000000000000e+41", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.5242293875075726230709587746676742825000000000000000000000000000000000000000000000e+39, "4.5242293875075726230709587746676742825000000000000000000000000000000000000000000000e+39", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2153799706792737162996155167868591485000000000000000000000000000000000000000000000e+38, "1.2153799706792737162996155167868591485000000000000000000000000000000000000000000000e+38", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9704836232659058554494106146940431250000000000000000000000000000000000000000000000e+36, "2.9704836232659058554494106146940431250000000000000000000000000000000000000000000000e+36", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5926306456751344865378122278650335000000000000000000000000000000000000000000000000e+34, "6.5926306456751344865378122278650335000000000000000000000000000000000000000000000000e+34", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3255133142885196993084362383550000000000000000000000000000000000000000000000000000e+33, "1.3255133142885196993084362383550000000000000000000000000000000000000000000000000000e+33", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.4074634262098477202456261501600000000000000000000000000000000000000000000000000000e+31, "2.4074634262098477202456261501600000000000000000000000000000000000000000000000000000e+31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9362537824702021303895557050000000000000000000000000000000000000000000000000000000e+29, "3.9362537824702021303895557050000000000000000000000000000000000000000000000000000000e+29", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7695574975175958167624223800000000000000000000000000000000000000000000000000000000e+27, "5.7695574975175958167624223800000000000000000000000000000000000000000000000000000000e+27", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.5430949131153796097540000000000000000000000000000000000000000000000000000000000000e+25, "7.5430949131153796097540000000000000000000000000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.7427444047045863749135000000000000000000000000000000000000000000000000000000000000e+23, "8.7427444047045863749135000000000000000000000000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.9163115009072256171250000000000000000000000000000000000000000000000000000000000000e+21, "8.9163115009072256171250000000000000000000000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9274383168492884295000000000000000000000000000000000000000000000000000000000000000e+19, "7.9274383168492884295000000000000000000000000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.0731790610548750000000000000000000000000000000000000000000000000000000000000000000e+17, "6.0731790610548750000000000000000000000000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9491312919646000000000000000000000000000000000000000000000000000000000000000000000e+15, "3.9491312919646000000000000000000000000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1366198225750000000000000000000000000000000000000000000000000000000000000000000000e+13, "2.1366198225750000000000000000000000000000000000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.3570498490000000000000000000000000000000000000000000000000000000000000000000000000e+10, "9.3570498490000000000000000000000000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1862250000000000000000000000000000000000000000000000000000000000000000000000000000e+08, "3.1862250000000000000000000000000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9135000000000000000000000000000000000000000000000000000000000000000000000000000000e+05, "7.9135000000000000000000000000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2750000000000000000000000000000000000000000000000000000000000000000000000000000000e+03, "1.2750000000000000000000000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00, "1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + template + static T lanczos_sum_expG_scaled(const T& z) + { + static const T num[52] = { + static_cast(boost::math::tools::make_big_value( 1.2968364952374867351881152115042817894191583875220489481700563388077315440993668645e+65, "1.2968364952374867351881152115042817894191583875220489481700563388077315440993668645e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3379758994539627857606593702434364057385206718035611620158459666404856221820703129e+65, "1.3379758994539627857606593702434364057385206718035611620158459666404856221820703129e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.7667661507089657936560642518188013126674666141084536651063996312630940638352438169e+64, "6.7667661507089657936560642518188013126674666141084536651063996312630940638352438169e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2358817974531517479015567958773172164495426366469934483861648449503257164430597676e+64, "2.2358817974531517479015567958773172164495426366469934483861648449503257164430597676e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4277884337482721045863559292777143585727342521289738221346249419373476553706960477e+63, "5.4277884337482721045863559292777143585727342521289738221346249419373476553706960477e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0321517843552558179026592998573667333331808062275687745076218349815677074985963362e+63, "1.0321517843552558179026592998573667333331808062275687745076218349815677074985963362e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6008215787076020416349896191435806440785263359504290408274535992043818825469757467e+62, "1.6008215787076020416349896191435806440785263359504290408274535992043818825469757467e+62", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0818534880683055883178218002277669005830432150690130666222387190067193078388546735e+61, "2.0818534880683055883178218002277669005830432150690130666222387190067193078388546735e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.3163575041638782544481444410280012073460223217514438140658322833554580013590099428e+60, "2.3163575041638782544481444410280012073460223217514438140658322833554580013590099428e+60", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2388461455413602821779255933063678852868399289922539164611151211712717693487661387e+59, "2.2388461455413602821779255933063678852868399289922539164611151211712717693487661387e+59", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.9022440433706121764851738708000810548525373575286185895490944900856672029848122464e+58, "1.9022440433706121764851738708000810548525373575286185895490944900856672029848122464e+58", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4343332795539887118781806263726922877784774015269102474184340994778721415926159254e+57, "1.4343332795539887118781806263726922877784774015269102474184340994778721415926159254e+57", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.6721153873219058826376914786734034750310419590675042405183247501763477751707551977e+55, "9.6721153873219058826376914786734034750310419590675042405183247501763477751707551977e+55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.8699628167986487178009534272364155924157279822557444996249799757685987843467799627e+54, "5.8699628167986487178009534272364155924157279822557444996249799757685987843467799627e+54", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2231722520846745745100754786781488061001048923809737738337722261187091800649653747e+53, "3.2231722520846745745100754786781488061001048923809737738337722261187091800649653747e+53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6083722187098822924476598339806607838145759265459316214837904824198871273160389130e+52, "1.6083722187098822924476598339806607838145759265459316214837904824198871273160389130e+52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.3208522386531907691637761481331075921814846045082743370064300808114976199945037122e+50, "7.3208522386531907691637761481331075921814846045082743370064300808114976199945037122e+50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0491114749931089548713463433723654679587396917777106103842119656518486449033314603e+49, "3.0491114749931089548713463433723654679587396917777106103842119656518486449033314603e+49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1651242201716492163343440840407055970036142959703118121095709130441296636187948680e+48, "1.1651242201716492163343440840407055970036142959703118121095709130441296636187948680e+48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.0937853081905503955154539906393844955264076759979726863680373891843152853217317289e+46, "4.0937853081905503955154539906393844955264076759979726863680373891843152853217317289e+46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3250660210211249438634406634827812076838178133500698949898645633350310552370070845e+45, "1.3250660210211249438634406634827812076838178133500698949898645633350310552370070845e+45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9570575453729198045577937136948643736522682229986841993417806493265120889607818521e+43, "3.9570575453729198045577937136948643736522682229986841993417806493265120889607818521e+43", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0915995985127530070498760979124015775616748288243587047367665303776535820627821806e+42, "1.0915995985127530070498760979124015775616748288243587047367665303776535820627821806e+42", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.7843635148151485646319955417265990806303645948936943738048724343049029864512194310e+40, "2.7843635148151485646319955417265990806303645948936943738048724343049029864512194310e+40", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5715089981189796608580098957107087883056675964697423692398096552244865201126563742e+38, "6.5715089981189796608580098957107087883056675964697423692398096552244865201126563742e+38", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4357579282713452366310121777478478833619311278663562587227576970753556113485917320e+37, "1.4357579282713452366310121777478478833619311278663562587227576970753556113485917320e+37", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9045145853415845950075255530781663873014618840017618405203106705648527948595759022e+35, "2.9045145853415845950075255530781663873014618840017618405203106705648527948595759022e+35", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4405414384364870662900944749199576151689786973539596080446881216688775114111401244e+33, "5.4405414384364870662900944749199576151689786973539596080446881216688775114111401244e+33", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.4338208995125086931437020109275839003754703899452696411395381222142064582727164193e+31, "9.4338208995125086931437020109275839003754703899452696411395381222142064582727164193e+31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5135951828248789401437398422210292739440102976394266807495518051141687446206426902e+30, "1.5135951828248789401437398422210292739440102976394266807495518051141687446206426902e+30", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2454501218684993019799803589484969919745689383924985827556442495293105857928357346e+28, "2.2454501218684993019799803589484969919745689383924985827556442495293105857928357346e+28", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0771824063818140076215034706980442595962662610399835096143334152833816531221628660e+26, "3.0771824063818140076215034706980442595962662610399835096143334152833816531221628660e+26", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.8906795572088352821870480514365587413988764084322141604846302060067104077934035979e+24, "3.8906795572088352821870480514365587413988764084322141604846302060067104077934035979e+24", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.5316598805398286987903918997966274192433403859480290402541541527289805994033568970e+22, "4.5316598805398286987903918997966274192433403859480290402541541527289805994033568970e+22", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.8533661333839969582529636915290426021792269810841946250308753325085094758818317464e+20, "4.8533661333839969582529636915290426021792269810841946250308753325085094758818317464e+20", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7688764431225908123092120518561018783609436337842987641148647520393460757258932651e+18, "4.7688764431225908123092120518561018783609436337842987641148647520393460757258932651e+18", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.2877126063932361367573287637428749753108811218139980724742491890986894871059180965e+16, "4.2877126063932361367573287637428749753108811218139980724742491890986894871059180965e+16", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.5164730755154849065370365582371664006783859248354506763822538105452920154803662025e+14, "3.5164730755154849065370365582371664006783859248354506763822538105452920154803662025e+14", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6208599037402680475080806960664748732421517587082652352333314249266933718172853538e+12, "2.6208599037402680475080806960664748732421517587082652352333314249266933718172853538e+12", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7673175927530323929887314159232706831613273850912577130092484125942772196619237882e+10, "1.7673175927530323929887314159232706831613273850912577130092484125942772196619237882e+10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0725755228231653548395606930605822556041123469753556193146323302002970112193491322e+08, "1.0725755228231653548395606930605822556041123469753556193146323302002970112193491322e+08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.8214170582643892131251904381692606071847290625764371754232909841174413907293095377e+05, "5.8214170582643892131251904381692606071847290625764371754232909841174413907293095377e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8039573621910762166001861467061356387294777080327106241940313632291985560896860294e+03, "2.8039573621910762166001861467061356387294777080327106241940313632291985560896860294e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1872369877837204032074079418146123055615124618000942960799358353269625124323889098e+01, "1.1872369877837204032074079418146123055615124618000942960799358353269625124323889098e+01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.3668338250989578832466315465536077672534713261875481920848252453271529995224516632e-02, "4.3668338250989578832466315465536077672534713261875481920848252453271529995224516632e-02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3741815275584317532245789502116967720634823787379160467839166784058598703361284195e-04, "1.3741815275584317532245789502116967720634823787379160467839166784058598703361284195e-04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.6260135014231198723283200126807995474827979567257597700738272144468899515236872878e-07, "3.6260135014231198723283200126807995474827979567257597700738272144468899515236872878e-07", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.8035718374820798318368374097127140964803349360705519156103446564446533105562174708e-10, "7.8035718374820798318368374097127140964803349360705519156103446564446533105562174708e-10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3155399273220963343988533731471377905809634204429087235409329216539588313353641052e-12, "1.3155399273220963343988533731471377905809634204429087235409329216539588313353641052e-12", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6293749415061585604836546051163481302110136557722031417335367202114639560092787049e-15, "1.6293749415061585604836546051163481302110136557722031417335367202114639560092787049e-15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3184778139696006596104645792244972612333458493576785210966728195969324996631733257e-18, "1.3184778139696006596104645792244972612333458493576785210966728195969324996631733257e-18", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.2299125832253333486600023635817464870204660970908989075481425992405717273229096642e-22, "5.2299125832253333486600023635817464870204660970908989075481425992405717273229096642e-22", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T denom[52] = { + static_cast(boost::math::tools::make_big_value( 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0414093201713378043612608166064768844377641568960512000000000000000000000000000000e+64, "3.0414093201713378043612608166064768844377641568960512000000000000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3683925049359750564345782687270252191318781054337155072000000000000000000000000000e+65, "1.3683925049359750564345782687270252191318781054337155072000000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8312047394413543873001574618939688475496532684433218600960000000000000000000000000e+65, "2.8312047394413543873001574618939688475496532684433218600960000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.6266290361540649084000356943724186480051615706407501824000000000000000000000000000e+65, "3.6266290361540649084000356943724186480051615706407501824000000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2578261522689833134479268958172001145701798207577980403712000000000000000000000000e+65, "3.2578261522689833134479268958172001145701798207577980403712000000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.2001844261052005486660334218376501837226733355004196185702400000000000000000000000e+65, "2.2001844261052005486660334218376501837226733355004196185702400000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1681037008119350981332433342566749327534832358109654944841728000000000000000000000e+65, "1.1681037008119350981332433342566749327534832358109654944841728000000000000000000000e+65", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.0293361153311185534392570196926631029364162024577328008396800000000000000000000000e+64, "5.0293361153311185534392570196926631029364162024577328008396800000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7968291458361430782020246122299560311802074147902210076049408000000000000000000000e+64, "1.7968291458361430782020246122299560311802074147902210076049408000000000000000000000e+64", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4212998306869600977887871207212578754682594793002122395254784000000000000000000000e+63, "5.4212998306869600977887871207212578754682594793002122395254784000000000000000000000e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4006322967557247180769968530346138316658911433773347563153653760000000000000000000e+63, "1.4006322967557247180769968530346138316658911433773347563153653760000000000000000000e+63", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1334912462852682149761710693821775975226278702191992823808000000000000000000000000e+62, "3.1334912462852682149761710693821775975226278702191992823808000000000000000000000000e+62", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.1263921790865468343839418571823409266633338824655665334886400000000000000000000000e+61, "6.1263921790865468343839418571823409266633338824655665334886400000000000000000000000e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0548002159482240692664043366538929906734975613031337827840000000000000000000000000e+61, "1.0548002159482240692664043366538929906734975613031337827840000000000000000000000000e+61", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6095781466700764043324234378972985924892034584990590768742400000000000000000000000e+60, "1.6095781466700764043324234378972985924892034584990590768742400000000000000000000000e+60", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1887214284827766716471402753528692603931747042835394432000000000000000000000000000e+59, "2.1887214284827766716471402753528692603931747042835394432000000000000000000000000000e+59", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6644926572075096083148238618984385847884240529010940198400000000000000000000000000e+58, "2.6644926572075096083148238618984385847884240529010940198400000000000000000000000000e+58", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9154102380883742873084802432628398856163736124576909120000000000000000000000000000e+57, "2.9154102380883742873084802432628398856163736124576909120000000000000000000000000000e+57", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.8768151045628896730547232493410634338494669305466040192000000000000000000000000000e+56, "2.8768151045628896730547232493410634338494669305466040192000000000000000000000000000e+56", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.5674503027583263140245049650089911892130421780961760000000000000000000000000000000e+55, "2.5674503027583263140245049650089911892130421780961760000000000000000000000000000000e+55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0774565729992714117801952876016228015049549176491224000000000000000000000000000000e+54, "2.0774565729992714117801952876016228015049549176491224000000000000000000000000000000e+54", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5271995659293168127377699172748774995796493494870600000000000000000000000000000000e+53, "1.5271995659293168127377699172748774995796493494870600000000000000000000000000000000e+53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0217297271367563021376459886512004721472442416486880000000000000000000000000000000e+52, "1.0217297271367563021376459886512004721472442416486880000000000000000000000000000000e+52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.2295402510227377004563262212164474005108576587500000000000000000000000000000000000e+50, "6.2295402510227377004563262212164474005108576587500000000000000000000000000000000000e+50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4652078765044198452095090589463630638929867781650000000000000000000000000000000000e+49, "3.4652078765044198452095090589463630638929867781650000000000000000000000000000000000e+49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.7599751702378955591170076678443001141850220448750000000000000000000000000000000000e+48, "1.7599751702378955591170076678443001141850220448750000000000000000000000000000000000e+48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.1661954970720573655661780303655361431161958585000000000000000000000000000000000000e+46, "8.1661954970720573655661780303655361431161958585000000000000000000000000000000000000e+46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.4624589782073664468902246801624082962588775000000000000000000000000000000000000000e+45, "3.4624589782073664468902246801624082962588775000000000000000000000000000000000000000e+45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3415303241063823936930939721131813816093940000000000000000000000000000000000000000e+44, "1.3415303241063823936930939721131813816093940000000000000000000000000000000000000000e+44", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.7484118887814252101652801793318408875609500000000000000000000000000000000000000000e+42, "4.7484118887814252101652801793318408875609500000000000000000000000000000000000000000e+42", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.5345701242523770267594030980609724717749800000000000000000000000000000000000000000e+41, "1.5345701242523770267594030980609724717749800000000000000000000000000000000000000000e+41", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.5242293875075726230709587746676742825000000000000000000000000000000000000000000000e+39, "4.5242293875075726230709587746676742825000000000000000000000000000000000000000000000e+39", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2153799706792737162996155167868591485000000000000000000000000000000000000000000000e+38, "1.2153799706792737162996155167868591485000000000000000000000000000000000000000000000e+38", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9704836232659058554494106146940431250000000000000000000000000000000000000000000000e+36, "2.9704836232659058554494106146940431250000000000000000000000000000000000000000000000e+36", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5926306456751344865378122278650335000000000000000000000000000000000000000000000000e+34, "6.5926306456751344865378122278650335000000000000000000000000000000000000000000000000e+34", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3255133142885196993084362383550000000000000000000000000000000000000000000000000000e+33, "1.3255133142885196993084362383550000000000000000000000000000000000000000000000000000e+33", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.4074634262098477202456261501600000000000000000000000000000000000000000000000000000e+31, "2.4074634262098477202456261501600000000000000000000000000000000000000000000000000000e+31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9362537824702021303895557050000000000000000000000000000000000000000000000000000000e+29, "3.9362537824702021303895557050000000000000000000000000000000000000000000000000000000e+29", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7695574975175958167624223800000000000000000000000000000000000000000000000000000000e+27, "5.7695574975175958167624223800000000000000000000000000000000000000000000000000000000e+27", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.5430949131153796097540000000000000000000000000000000000000000000000000000000000000e+25, "7.5430949131153796097540000000000000000000000000000000000000000000000000000000000000e+25", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.7427444047045863749135000000000000000000000000000000000000000000000000000000000000e+23, "8.7427444047045863749135000000000000000000000000000000000000000000000000000000000000e+23", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.9163115009072256171250000000000000000000000000000000000000000000000000000000000000e+21, "8.9163115009072256171250000000000000000000000000000000000000000000000000000000000000e+21", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9274383168492884295000000000000000000000000000000000000000000000000000000000000000e+19, "7.9274383168492884295000000000000000000000000000000000000000000000000000000000000000e+19", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.0731790610548750000000000000000000000000000000000000000000000000000000000000000000e+17, "6.0731790610548750000000000000000000000000000000000000000000000000000000000000000000e+17", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9491312919646000000000000000000000000000000000000000000000000000000000000000000000e+15, "3.9491312919646000000000000000000000000000000000000000000000000000000000000000000000e+15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1366198225750000000000000000000000000000000000000000000000000000000000000000000000e+13, "2.1366198225750000000000000000000000000000000000000000000000000000000000000000000000e+13", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.3570498490000000000000000000000000000000000000000000000000000000000000000000000000e+10, "9.3570498490000000000000000000000000000000000000000000000000000000000000000000000000e+10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1862250000000000000000000000000000000000000000000000000000000000000000000000000000e+08, "3.1862250000000000000000000000000000000000000000000000000000000000000000000000000000e+08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9135000000000000000000000000000000000000000000000000000000000000000000000000000000e+05, "7.9135000000000000000000000000000000000000000000000000000000000000000000000000000000e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2750000000000000000000000000000000000000000000000000000000000000000000000000000000e+03, "1.2750000000000000000000000000000000000000000000000000000000000000000000000000000000e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00, "1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + return boost::math::tools::evaluate_rational(num, denom, z); + } + + + template + static T lanczos_sum_near_1(const T& dz) + { + static const T d[56] = { + static_cast(boost::math::tools::make_big_value( 1.4249481633301349696310814410227012806541100102720500928500445853537331413655453290e+01, "1.4249481633301349696310814410227012806541100102720500928500445853537331413655453290e+01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9263209672927829270913652941762375058727326960303110137656951784697992824730035351e+02, "-1.9263209672927829270913652941762375058727326960303110137656951784697992824730035351e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2326134462101140657073655882621393643823409472993225649429843685598155061860815843e+03, "1.2326134462101140657073655882621393643823409472993225649429843685598155061860815843e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.9662801801612054404095225935108977904002486830482176026791636595192650184999106786e+03, "-4.9662801801612054404095225935108977904002486830482176026791636595192650184999106786e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4138906470545941456294493142170199869989528110729651897652377168498087934667952997e+04, "1.4138906470545941456294493142170199869989528110729651897652377168498087934667952997e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.0258375230969759913527502498295624381557778356817817750999982139142785355759733840e+04, "-3.0258375230969759913527502498295624381557778356817817750999982139142785355759733840e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.0558030423043855628646211274492485894483342086566824594162146024985516781169314244e+04, "5.0558030423043855628646211274492485894483342086566824594162146024985516781169314244e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.7626679132766782666656123523498939281680490327213627146988312255304416262392894908e+04, "-6.7626679132766782666656123523498939281680490327213627146988312255304416262392894908e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.3671346711777066286093979449135095463576878628561846047759456811238250487006378990e+04, "7.3671346711777066286093979449135095463576878628561846047759456811238250487006378990e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.6153175690992245402186127652781399642963298842199508872954793356226534605339323333e+04, "-6.6153175690992245402186127652781399642963298842199508872954793356226534605339323333e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.9373755602608411416894250529851681229919578866115774473369305562033628341735461195e+04, "4.9373755602608411416894250529851681229919578866115774473369305562033628341735461195e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.0800169087178819510009898255169517991710412699732186488007608833012065028092686003e+04, "-3.0800169087178819510009898255169517991710412699732186488007608833012065028092686003e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.6113163429881357240014185384821233436360839107514932109343845514870210427965645190e+04, "1.6113163429881357240014185384821233436360839107514932109343845514870210427965645190e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.0800055208994526950912019754052939899262033086446277779400918426435279835354194130e+03, "-7.0800055208994526950912019754052939899262033086446277779400918426435279835354194130e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.6124888869258097801249338962341633267998552553797818622228028001697157538310910762e+03, "2.6124888869258097801249338962341633267998552553797818622228028001697157538310910762e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.0821345203062947277822243784585588745042841720677807798397954250617939305106506107e+02, "-8.0821345203062947277822243784585588745042841720677807798397954250617939305106506107e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0897234684613304316686535121178451999373954297009955842614973223259353042645941321e+02, "2.0897234684613304316686535121178451999373954297009955842614973223259353042645941321e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.4950083481830885847356672064097545823284701899839135264776743195466249025042048810e+01, "-4.4950083481830885847356672064097545823284701899839135264776743195466249025042048810e+01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.9937323326320843218449977911798288651196634496462091472078054583251005505547883394e+00, "7.9937323326320843218449977911798288651196634496462091472078054583251005505547883394e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.1659790383945267871585567047493689107693027444469426401770619301894048344984407423e+00, "-1.1659790383945267871585567047493689107693027444469426401770619301894048344984407423e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.3811750187329199929662456874823737031712476205965338135458988288637511665389967467e-01, "1.3811750187329199929662456874823737031712476205965338135458988288637511665389967467e-01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.3126057597099554726738230571307233576246752870932752732642137542414937991213738675e-02, "-1.3126057597099554726738230571307233576246752870932752732642137542414937991213738675e-02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.8603278118738070120786476302797971799214428999935477462676132231556636610008100990e-04, "9.8603278118738070120786476302797971799214428999935477462676132231556636610008100990e-04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.7497497499750147559650543128496209797619661773802614023013669364107360500260024694e-05, "-5.7497497499750147559650543128496209797619661773802614023013669364107360500260024694e-05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.5455669051693660429433444114100199274899990967149528799831986363426701813268631682e-06, "2.5455669051693660429433444114100199274899990967149528799831986363426701813268631682e-06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.3264707731119706730021053355613906861401420453549875829176477978488700910763350933e-08, "-8.3264707731119706730021053355613906861401420453549875829176477978488700910763350933e-08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.9452716333766656109625805591981088427443890665155986807469770654997947109460588842e-09, "1.9452716333766656109625805591981088427443890665155986807469770654997947109460588842e-09", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.1107270143427404085533822649150071785436589803547989849458232547054059840123879700e-11, "-3.1107270143427404085533822649150071785436589803547989849458232547054059840123879700e-11", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2247407103283988605835624937345007318815870047594787786390767998944461846883100894e-13, "3.2247407103283988605835624937345007318815870047594787786390767998944461846883100894e-13", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.0188429331847134597398824340892444962476368435762668313929678602451262836436731615e-15, "-2.0188429331847134597398824340892444962476368435762668313929678602451262836436731615e-15", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.9431143198672109701045920614322844783143358661530851155605617982604226639477903946e-18, "6.9431143198672109701045920614322844783143358661530851155605617982604226639477903946e-18", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.1511473493622067561750500375000264321547190996454590396416983138367840485620637483e-20, "-1.1511473493622067561750500375000264321547190996454590396416983138367840485620637483e-20", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.6282967029324804059233959451615215356643254329321661581764544172041721688288262211e-24, "7.6282967029324804059233959451615215356643254329321661581764544172041721688288262211e-24", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.5217584051959451141711566663295724419583710296958056943098481375601920843969902641e-27, "-1.5217584051959451141711566663295724419583710296958056943098481375601920843969902641e-27", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7686779496951341450129898316334506462294006086177935245787611395642697303462481134e-32, "5.7686779496951341450129898316334506462294006086177935245787611395642697303462481134e-32", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.8183279898437068462121010262051285364082674967144808177521395570040237794774928143e-37, "-1.8183279898437068462121010262051285364082674967144808177521395570040237794774928143e-37", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.2301356317533360807190133199588525842189842444453020346114472115201441728418314131e-45, "8.2301356317533360807190133199588525842189842444453020346114472115201441728418314131e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0538087755476779873724252308339637373681982420524344896439951953765025296864700289e-46, "2.0538087755476779873724252308339637373681982420524344896439951953765025296864700289e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.7368861518094102628071448870890238982875711317443189777819779346097156832497387210e-46, "-2.7368861518094102628071448870890238982875711317443189777819779346097156832497387210e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.2127031296187719256650789211253726767816659542004125362087789737915250037588745613e-46, "3.2127031296187719256650789211253726767816659542004125362087789737915250037588745613e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.2845218026163010098046208410081722573197086178079121337275774350592686815176989662e-46, "-3.2845218026163010098046208410081722573197086178079121337275774350592686815176989662e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9013371187879239559027439498823204927228357549709009148789220121477613502450061401e-46, "2.9013371187879239559027439498823204927228357549709009148789220121477613502450061401e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.2089862298013055403993867290116144511841012233395353799752061257869549127164945780e-46, "-2.2089862298013055403993867290116144511841012233395353799752061257869549127164945780e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4527554216741432380141011585082087141319941270266854468232919279949735902352803053e-46, "1.4527554216741432380141011585082087141319941270266854468232919279949735902352803053e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.2837166837027744593760237442711271028335526295415770894642075176684832265233618094e-47, "-8.2837166837027744593760237442711271028335526295415770894642075176684832265233618094e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.1059350216220761035803511769514044782618497241929104348673618588819476720900045601e-47, "4.1059350216220761035803511769514044782618497241929104348673618588819476720900045601e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.7687314351211090978609979306272584841117647148823431923713385159635722296908466519e-47, "-1.7687314351211090978609979306272584841117647148823431923713385159635722296908466519e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.5969462796000208210556070606779102539560199436191964981433237450523523642860510077e-48, "6.5969462796000208210556070606779102539560199436191964981433237450523523642860510077e-48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.1139078862715122066066654151520960142401928001906787354175105139384536625985592872e-48, "-2.1139078862715122066066654151520960142401928001906787354175105139384536625985592872e-48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.7479750622279993094858160487261517850737208803407757126835554161719741165140561935e-49, "5.7479750622279993094858160487261517850737208803407757126835554161719741165140561935e-49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.3023257271883644155548861805986381464362072120660374852325331311980696768011868477e-49, "-1.3023257271883644155548861805986381464362072120660374852325331311980696768011868477e-49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.3944877765920457854470382189260552086188360983214813092431218719428924850775816044e-50, "2.3944877765920457854470382189260552086188360983214813092431218719428924850775816044e-50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.4340311277195491754628728769381617236158442845382974748650525927232846582643581377e-51, "-3.4340311277195491754628728769381617236158442845382974748650525927232846582643581377e-51", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.6046447704173152191387256911138439680611975514728905319266554977285611063458373730e-52, "3.6046447704173152191387256911138439680611975514728905319266554977285611063458373730e-52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.4634008445755689570224291035627638546740260971523702032261365019321949141711275488e-53, "-2.4634008445755689570224291035627638546740260971523702032261365019321949141711275488e-53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.2246731300220072906782081133065950352668949898418513030190006777980796985877588993e-55, "8.2246731300220072906782081133065950352668949898418513030190006777980796985877588993e-55", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T result = 0; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (k * dz + k * k); + } + return result; + } + + template + static T lanczos_sum_near_2(const T& dz) + { + static const T d[56] = { + static_cast(boost::math::tools::make_big_value( 2.1359871474796665853092357455924330354587340093067807143261699873815704783987359772e+02, "2.1359871474796665853092357455924330354587340093067807143261699873815704783987359772e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.8875414095359657817766255009397774415784763914903057809977502598124862632510767554e+03, "-2.8875414095359657817766255009397774415784763914903057809977502598124862632510767554e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.8476787764422274017528261804071971508619123082396685980448133660376964287516316704e+04, "1.8476787764422274017528261804071971508619123082396685980448133660376964287516316704e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -7.4444186171772165373465718949072340109367841198406244729719893501352272283072463708e+04, "-7.4444186171772165373465718949072340109367841198406244729719893501352272283072463708e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1194120093410237139270201027497804988299179344758829377397770385486861046469631203e+05, "2.1194120093410237139270201027497804988299179344758829377397770385486861046469631203e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.5357088952571626888790834841289410266972526362527135768453266364708511931775492144e+05, "-4.5357088952571626888790834841289410266972526362527135768453266364708511931775492144e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.5786127498932741985489606333645851990301122033327283854824446437684628190530769575e+05, "7.5786127498932741985489606333645851990301122033327283854824446437684628190530769575e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.0137191034145345260388746496030657014468720426439135322862142167063250610782207818e+06, "-1.0137191034145345260388746496030657014468720426439135322862142167063250610782207818e+06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1043282398857092560432546685968118908647431787644471096079379813564778477126420342e+06, "1.1043282398857092560432546685968118908647431787644471096079379813564778477126420342e+06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -9.9163139177426012658354764048015319057833754923450432555380434933570665536720208880e+05, "-9.9163139177426012658354764048015319057833754923450432555380434933570665536720208880e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 7.4010907978229491816684804764341724977655263945662331641124141340242633003517508734e+05, "7.4010907978229491816684804764341724977655263945662331641124141340242633003517508734e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.6169234084041844689042685434707229435012900685910183054712320472809843835362299874e+05, "-4.6169234084041844689042685434707229435012900685910183054712320472809843835362299874e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.4153517213588660353769404140539796364318846647922938442928982516763682295297524025e+05, "2.4153517213588660353769404140539796364318846647922938442928982516763682295297524025e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.0612877847699383856310204418767999963941175773527544927951233517414654065993562292e+05, "-1.0612877847699383856310204418767999963941175773527544927951233517414654065993562292e+05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.9161022337583429443319078749411063125143924304273472659235111671109967684138896371e+04, "3.9161022337583429443319078749411063125143924304273472659235111671109967684138896371e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.2115062080034682817602956663792443265985654149672855657063890194977099012713284199e+04, "-1.2115062080034682817602956663792443265985654149672855657063890194977099012713284199e+04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.1324805949350810193947943179103430601921304099416931772402636138580376468344900971e+03, "3.1324805949350810193947943179103430601921304099416931772402636138580376468344900971e+03", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -6.7379854977281995958474241831424455939028898406040636148869222006236410315246590813e+02, "-6.7379854977281995958474241831424455939028898406040636148869222006236410315246590813e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1982547830365481876880107367272973441376153376561639433022240961322166151300388030e+02, "1.1982547830365481876880107367272973441376153376561639433022240961322166151300388030e+02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.7477942737376629095840094280792553329439356352076603742418189295402785845496828618e+01, "-1.7477942737376629095840094280792553329439356352076603742418189295402785845496828618e+01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.0703715155075453775002558378654461695986020593253642834916629665157095201951753511e+00, "2.0703715155075453775002558378654461695986020593253642834916629665157095201951753511e+00", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9675866846243159020907742164534290169104130230063615572789631974066350817947062221e-01, "-1.9675866846243159020907742164534290169104130230063615572789631974066350817947062221e-01", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.4780561158714357685758956261017689353220221023341472401836356861114284203430539079e-02, "1.4780561158714357685758956261017689353220221023341472401836356861114284203430539079e-02", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -8.6188339219787319686113112867608363101891398970645607178011869309209804235190901119e-04, "-8.6188339219787319686113112867608363101891398970645607178011869309209804235190901119e-04", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.8157866597647120851117681906042345217930339391652255480834165995078338419417330285e-05, "3.8157866597647120851117681906042345217930339391652255480834165995078338419417330285e-05", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.2481320382678181695580703583602390565135442535050898393382403247198998298046344360e-06, "-1.2481320382678181695580703583602390565135442535050898393382403247198998298046344360e-06", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.9159483230174733349570293758760922152980844047473628166544981799492351078480622954e-08, "2.9159483230174733349570293758760922152980844047473628166544981799492351078480622954e-08", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.6629576379996951454117430064764364032095890196838102664116218770332578145496215211e-10, "-4.6629576379996951454117430064764364032095890196838102664116218770332578145496215211e-10", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.8338633562069325240602901391334379837235954960205324388722028354858275502279946625e-12, "4.8338633562069325240602901391334379837235954960205324388722028354858275502279946625e-12", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.0262311774099493927119217222064229499121659914970978765047236920420564019570051218e-14, "-3.0262311774099493927119217222064229499121659914970978765047236920420564019570051218e-14", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.0407678912374899180410563256969325940215095079830235805022567411720384237429934979e-16, "1.0407678912374899180410563256969325940215095079830235805022567411720384237429934979e-16", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.7255616775185743686583950617043659309702235282144322436444914063380593981448767314e-19, "-1.7255616775185743686583950617043659309702235282144322436444914063380593981448767314e-19", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.1434762424301802086970046614089097993428600914262940192954247147222512140342020251e-22, "1.1434762424301802086970046614089097993428600914262940192954247147222512140342020251e-22", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.2811050104947718753668138286684667456060595320836882460657390484001848305710926658e-26, "-2.2811050104947718753668138286684667456060595320836882460657390484001848305710926658e-26", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.6472071585409775242391978767682093973522869636260937895265262698161653967448170294e-31, "8.6472071585409775242391978767682093973522869636260937895265262698161653967448170294e-31", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.7256607055318261608651300407042778032797661723154154620044497458638616772687293939e-36, "-2.7256607055318261608651300407042778032797661723154154620044497458638616772687293939e-36", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2336914691939376212057695014798607076719945066572302277992040650923577371403732374e-43, "1.2336914691939376212057695014798607076719945066572302277992040650923577371403732374e-43", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.0786447260639215447891518190226750925343851277049431943886851989702400712288529676e-45, "3.0786447260639215447891518190226750925343851277049431943886851989702400712288529676e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.1025728477854679597292503557220243198932574654689944030312971203381791545284070615e-45, "-4.1025728477854679597292503557220243198932574654689944030312971203381791545284070615e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.8158191084622128024881877808372136805034582816867095109911304441480739442791111504e-45, "4.8158191084622128024881877808372136805034582816867095109911304441480739442791111504e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -4.9234747877490011456140079812669308237793558885580849786063897631770733025035207671e-45, "-4.9234747877490011456140079812669308237793558885580849786063897631770733025035207671e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 4.3490836759659078559291835803157452697088321139262167213210146255834532556301891370e-45, "4.3490836759659078559291835803157452697088321139262167213210146255834532556301891370e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.3112546247213856964589957649093570444521154190936715486464158458810486032666803106e-45, "-3.3112546247213856964589957649093570444521154190936715486464158458810486032666803106e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 2.1776700296770363161098741319363506481285657595677761712371712460328658791045355723e-45, "2.1776700296770363161098741319363506481285657595677761712371712460328658791045355723e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.2417232307174566390298057341943116719841715593695502126267674406446096534743228763e-45, "-1.2417232307174566390298057341943116719841715593695502126267674406446096534743228763e-45", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 6.1547673524314003744185487198857922344498908431160001720400958944740800214791613435e-46, "6.1547673524314003744185487198857922344498908431160001720400958944740800214791613435e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -2.6513158232596442320093540701345954468693696224501434722041096230050093398371645003e-46, "-2.6513158232596442320093540701345954468693696224501434722041096230050093398371645003e-46", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 9.8887754856348531434071033903412118519453856283236928328635658056271487149248163047e-47, "9.8887754856348531434071033903412118519453856283236928328635658056271487149248163047e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.1687328649763305634603605974128554276109745864508580830005398092245895954643537734e-47, "-3.1687328649763305634603605974128554276109745864508580830005398092245895954643537734e-47", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 8.6161736776863672083691176367303804395378775987877354282547095064819083181262752062e-48, "8.6161736776863672083691176367303804395378775987877354282547095064819083181262752062e-48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -1.9521769890951289875720183789100014523337064918766622763963203875214061068994800866e-48, "-1.9521769890951289875720183789100014523337064918766622763963203875214061068994800866e-48", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 3.5893201221052508883479696840784788679013550155716308694609078334579681197829045250e-49, "3.5893201221052508883479696840784788679013550155716308694609078334579681197829045250e-49", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -5.1475882011819285876938214420399142925361432312238692258191602240316479716676925358e-50, "-5.1475882011819285876938214420399142925361432312238692258191602240316479716676925358e-50", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 5.4033368363711826759446617519812384260206693934532562051784267615057052651438166096e-51, "5.4033368363711826759446617519812384260206693934532562051784267615057052651438166096e-51", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -3.6926203201715401183464726950807528731521709827951454941037337126228208878967951308e-52, "-3.6926203201715401183464726950807528731521709827951454941037337126228208878967951308e-52", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 1.2328726440751392123787631395330686880390176572387043105330275032212649717981066795e-53, "1.2328726440751392123787631395330686880390176572387043105330275032212649717981066795e-53", std::integral_constant::value) && ((267 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + }; + T result = 0; + T z = dz + 2; + for (unsigned k = 1; k <= sizeof(d) / sizeof(d[0]); ++k) + { + result += (-d[k - 1] * dz) / (z + k * z + k * k - 1); + } + return result; + } + + static double g() { return 4.9921416015624998863131622783839702606201171875000000000000000000000000000000000000e+01; } +}; + +inline double lanczos_g_near_1_and_2(const lanczos52MP&) +{ + return 38.73733398437500; +} + + + + + +struct undefined_lanczos : public std::integral_constant::max)() - 1> { }; + +template +struct lanczos +{ + static constexpr auto target_precision = policies::precision::type::value <= 0 ? (std::numeric_limits::max)()-2 : + policies::precision::type::value; + + using type = typename std::conditional<(target_precision <= lanczos6m24::value), lanczos6m24, + typename std::conditional<(target_precision <= lanczos13m53::value), lanczos13m53, + typename std::conditional<(target_precision <= lanczos11::value), lanczos11, + typename std::conditional<(target_precision <= lanczos17m64::value), lanczos17m64, + typename std::conditional<(target_precision <= lanczos24m113::value), lanczos24m113, + typename std::conditional<(target_precision <= lanczos27MP::value), lanczos27MP, + typename std::conditional<(target_precision <= lanczos35MP::value), lanczos35MP, + typename std::conditional<(target_precision <= lanczos48MP::value), lanczos48MP, + typename std::conditional<(target_precision <= lanczos49MP::value), lanczos49MP, + typename std::conditional<(target_precision <= lanczos52MP::value), lanczos52MP, undefined_lanczos>::type + >::type>::type>::type>::type>::type>::type>::type>::type + >::type; +}; + +} +} +} + + + +# 1 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" 1 +# 13 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 1 3 4 +# 31 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 1 3 4 +# 31 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 1 3 4 +# 44 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 3 4 + +# 44 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 3 4 +typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); +typedef int __m32 __attribute__ ((__vector_size__ (4), __may_alias__)); +typedef short __m16 __attribute__ ((__vector_size__ (2), __may_alias__)); + + +typedef int __m64_u __attribute__ ((__vector_size__ (8), __may_alias__, __aligned__ (1))); +typedef int __m32_u __attribute__ ((__vector_size__ (4), + __may_alias__, __aligned__ (1))); +typedef short __m16_u __attribute__ ((__vector_size__ (2), + __may_alias__, __aligned__ (1))); + + +typedef int __v2si __attribute__ ((__vector_size__ (8))); +typedef short __v4hi __attribute__ ((__vector_size__ (8))); +typedef char __v8qi __attribute__ ((__vector_size__ (8))); +typedef long long __v1di __attribute__ ((__vector_size__ (8))); +typedef float __v2sf __attribute__ ((__vector_size__ (8))); + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_empty (void) +{ + __builtin_ia32_emms (); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_empty (void) +{ + _mm_empty (); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi32_si64 (int __i) +{ + return (__m64) __builtin_ia32_vec_init_v2si (__i, 0); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_from_int (int __i) +{ + return _mm_cvtsi32_si64 (__i); +} + + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_from_int64 (long long __i) +{ + return (__m64) __i; +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_m64 (long long __i) +{ + return (__m64) __i; +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64x_si64 (long long __i) +{ + return (__m64) __i; +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pi64x (long long __i) +{ + return (__m64) __i; +} + + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_si32 (__m64 __i) +{ + return __builtin_ia32_vec_ext_v2si ((__v2si)__i, 0); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_to_int (__m64 __i) +{ + return _mm_cvtsi64_si32 (__i); +} + + + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_to_int64 (__m64 __i) +{ + return (long long)__i; +} + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtm64_si64 (__m64 __i) +{ + return (long long)__i; +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_si64x (__m64 __i) +{ + return (long long)__i; +} + + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_packsswb ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_packsswb (__m64 __m1, __m64 __m2) +{ + return _mm_packs_pi16 (__m1, __m2); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_packssdw ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_packssdw (__m64 __m1, __m64 __m2) +{ + return _mm_packs_pi32 (__m1, __m2); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_pu16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_packuswb ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_packuswb (__m64 __m1, __m64 __m2) +{ + return _mm_packs_pu16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpckhbw ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpckhbw (__m64 __m1, __m64 __m2) +{ + return _mm_unpackhi_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpckhwd ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpckhwd (__m64 __m1, __m64 __m2) +{ + return _mm_unpackhi_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpckhdq ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpckhdq (__m64 __m1, __m64 __m2) +{ + return _mm_unpackhi_pi32 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpcklbw ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpcklbw (__m64 __m1, __m64 __m2) +{ + return _mm_unpacklo_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpcklwd ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpcklwd (__m64 __m1, __m64 __m2) +{ + return _mm_unpacklo_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_punpckldq ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_punpckldq (__m64 __m1, __m64 __m2) +{ + return _mm_unpacklo_pi32 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddb (__m64 __m1, __m64 __m2) +{ + return _mm_add_pi8 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddw (__m64 __m1, __m64 __m2) +{ + return _mm_add_pi16 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddd ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddd (__m64 __m1, __m64 __m2) +{ + return _mm_add_pi32 (__m1, __m2); +} +# 334 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 3 4 +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_si64 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddq ((__v1di)__m1, (__v1di)__m2); +} + + + + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddsb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddsb (__m64 __m1, __m64 __m2) +{ + return _mm_adds_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddsw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddsw (__m64 __m1, __m64 __m2) +{ + return _mm_adds_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_pu8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddusb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddusb (__m64 __m1, __m64 __m2) +{ + return _mm_adds_pu8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_pu16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_paddusw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_paddusw (__m64 __m1, __m64 __m2) +{ + return _mm_adds_pu16 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubb (__m64 __m1, __m64 __m2) +{ + return _mm_sub_pi8 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubw (__m64 __m1, __m64 __m2) +{ + return _mm_sub_pi16 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubd ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubd (__m64 __m1, __m64 __m2) +{ + return _mm_sub_pi32 (__m1, __m2); +} +# 450 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/mmintrin.h" 3 4 +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_si64 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubq ((__v1di)__m1, (__v1di)__m2); +} + + + + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubsb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubsb (__m64 __m1, __m64 __m2) +{ + return _mm_subs_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubsw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubsw (__m64 __m1, __m64 __m2) +{ + return _mm_subs_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_pu8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubusb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubusb (__m64 __m1, __m64 __m2) +{ + return _mm_subs_pu8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_pu16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_psubusw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psubusw (__m64 __m1, __m64 __m2) +{ + return _mm_subs_pu16 (__m1, __m2); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_madd_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pmaddwd ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmaddwd (__m64 __m1, __m64 __m2) +{ + return _mm_madd_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mulhi_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pmulhw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmulhw (__m64 __m1, __m64 __m2) +{ + return _mm_mulhi_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mullo_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pmullw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmullw (__m64 __m1, __m64 __m2) +{ + return _mm_mullo_pi16 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_pi16 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psllw ((__v4hi)__m, (__v4hi)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psllw (__m64 __m, __m64 __count) +{ + return _mm_sll_pi16 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_pi16 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psllwi ((__v4hi)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psllwi (__m64 __m, int __count) +{ + return _mm_slli_pi16 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_pi32 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_pslld ((__v2si)__m, (__v2si)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pslld (__m64 __m, __m64 __count) +{ + return _mm_sll_pi32 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_pi32 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_pslldi ((__v2si)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pslldi (__m64 __m, int __count) +{ + return _mm_slli_pi32 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_si64 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psllq ((__v1di)__m, (__v1di)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psllq (__m64 __m, __m64 __count) +{ + return _mm_sll_si64 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_si64 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psllqi ((__v1di)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psllqi (__m64 __m, int __count) +{ + return _mm_slli_si64 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sra_pi16 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psraw ((__v4hi)__m, (__v4hi)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psraw (__m64 __m, __m64 __count) +{ + return _mm_sra_pi16 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srai_pi16 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psrawi ((__v4hi)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrawi (__m64 __m, int __count) +{ + return _mm_srai_pi16 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sra_pi32 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psrad ((__v2si)__m, (__v2si)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrad (__m64 __m, __m64 __count) +{ + return _mm_sra_pi32 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srai_pi32 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psradi ((__v2si)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psradi (__m64 __m, int __count) +{ + return _mm_srai_pi32 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_pi16 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psrlw ((__v4hi)__m, (__v4hi)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrlw (__m64 __m, __m64 __count) +{ + return _mm_srl_pi16 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_pi16 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psrlwi ((__v4hi)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrlwi (__m64 __m, int __count) +{ + return _mm_srli_pi16 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_pi32 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psrld ((__v2si)__m, (__v2si)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrld (__m64 __m, __m64 __count) +{ + return _mm_srl_pi32 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_pi32 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psrldi ((__v2si)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrldi (__m64 __m, int __count) +{ + return _mm_srli_pi32 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_si64 (__m64 __m, __m64 __count) +{ + return (__m64) __builtin_ia32_psrlq ((__v1di)__m, (__v1di)__count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrlq (__m64 __m, __m64 __count) +{ + return _mm_srl_si64 (__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_si64 (__m64 __m, int __count) +{ + return (__m64) __builtin_ia32_psrlqi ((__v1di)__m, __count); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psrlqi (__m64 __m, int __count) +{ + return _mm_srli_si64 (__m, __count); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_and_si64 (__m64 __m1, __m64 __m2) +{ + return __builtin_ia32_pand (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pand (__m64 __m1, __m64 __m2) +{ + return _mm_and_si64 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_andnot_si64 (__m64 __m1, __m64 __m2) +{ + return __builtin_ia32_pandn (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pandn (__m64 __m1, __m64 __m2) +{ + return _mm_andnot_si64 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_or_si64 (__m64 __m1, __m64 __m2) +{ + return __builtin_ia32_por (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_por (__m64 __m1, __m64 __m2) +{ + return _mm_or_si64 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_xor_si64 (__m64 __m1, __m64 __m2) +{ + return __builtin_ia32_pxor (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pxor (__m64 __m1, __m64 __m2) +{ + return _mm_xor_si64 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpeqb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpeqb (__m64 __m1, __m64 __m2) +{ + return _mm_cmpeq_pi8 (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_pi8 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpgtb ((__v8qi)__m1, (__v8qi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpgtb (__m64 __m1, __m64 __m2) +{ + return _mm_cmpgt_pi8 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpeqw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpeqw (__m64 __m1, __m64 __m2) +{ + return _mm_cmpeq_pi16 (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_pi16 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpgtw ((__v4hi)__m1, (__v4hi)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpgtw (__m64 __m1, __m64 __m2) +{ + return _mm_cmpgt_pi16 (__m1, __m2); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpeqd ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpeqd (__m64 __m1, __m64 __m2) +{ + return _mm_cmpeq_pi32 (__m1, __m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_pi32 (__m64 __m1, __m64 __m2) +{ + return (__m64) __builtin_ia32_pcmpgtd ((__v2si)__m1, (__v2si)__m2); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pcmpgtd (__m64 __m1, __m64 __m2) +{ + return _mm_cmpgt_pi32 (__m1, __m2); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setzero_si64 (void) +{ + return (__m64)0LL; +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pi32 (int __i1, int __i0) +{ + return (__m64) __builtin_ia32_vec_init_v2si (__i0, __i1); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pi16 (short __w3, short __w2, short __w1, short __w0) +{ + return (__m64) __builtin_ia32_vec_init_v4hi (__w0, __w1, __w2, __w3); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pi8 (char __b7, char __b6, char __b5, char __b4, + char __b3, char __b2, char __b1, char __b0) +{ + return (__m64) __builtin_ia32_vec_init_v8qi (__b0, __b1, __b2, __b3, + __b4, __b5, __b6, __b7); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_pi32 (int __i0, int __i1) +{ + return _mm_set_pi32 (__i1, __i0); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_pi16 (short __w0, short __w1, short __w2, short __w3) +{ + return _mm_set_pi16 (__w3, __w2, __w1, __w0); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_pi8 (char __b0, char __b1, char __b2, char __b3, + char __b4, char __b5, char __b6, char __b7) +{ + return _mm_set_pi8 (__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_pi32 (int __i) +{ + return _mm_set_pi32 (__i, __i); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_pi16 (short __w) +{ + return _mm_set_pi16 (__w, __w, __w, __w); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_pi8 (char __b) +{ + return _mm_set_pi8 (__b, __b, __b, __b, __b, __b, __b, __b); +} +# 32 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 2 3 4 + + + + + +enum _mm_hint +{ + + _MM_HINT_ET0 = 7, + _MM_HINT_ET1 = 6, + _MM_HINT_T0 = 3, + _MM_HINT_T1 = 2, + _MM_HINT_T2 = 1, + _MM_HINT_NTA = 0 +}; +# 69 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); + + +typedef float __m128_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); + + +typedef float __v4sf __attribute__ ((__vector_size__ (16))); +# 109 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_undefined_ps (void) +{ + __m128 __Y = __Y; + return __Y; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setzero_ps (void) +{ + return __extension__ (__m128){ 0.0f, 0.0f, 0.0f, 0.0f }; +} + + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_addss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_subss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_mulss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_div_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_divss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sqrt_ss (__m128 __A) +{ + return (__m128) __builtin_ia32_sqrtss ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_rcp_ss (__m128 __A) +{ + return (__m128) __builtin_ia32_rcpss ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_rsqrt_ss (__m128 __A) +{ + return (__m128) __builtin_ia32_rsqrtss ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_minss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_maxss ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_ps (__m128 __A, __m128 __B) +{ + return (__m128) ((__v4sf)__A + (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_ps (__m128 __A, __m128 __B) +{ + return (__m128) ((__v4sf)__A - (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_ps (__m128 __A, __m128 __B) +{ + return (__m128) ((__v4sf)__A * (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_div_ps (__m128 __A, __m128 __B) +{ + return (__m128) ((__v4sf)__A / (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sqrt_ps (__m128 __A) +{ + return (__m128) __builtin_ia32_sqrtps ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_rcp_ps (__m128 __A) +{ + return (__m128) __builtin_ia32_rcpps ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_rsqrt_ps (__m128 __A) +{ + return (__m128) __builtin_ia32_rsqrtps ((__v4sf)__A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_minps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_maxps ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_and_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_andps (__A, __B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_andnot_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_andnps (__A, __B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_or_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_orps (__A, __B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_xor_ps (__m128 __A, __m128 __B) +{ + return __builtin_ia32_xorps (__A, __B); +} + + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpeqss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpltss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmple_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpless ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movss ((__v4sf) __A, + (__v4sf) + __builtin_ia32_cmpltss ((__v4sf) __B, + (__v4sf) + __A)); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpge_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movss ((__v4sf) __A, + (__v4sf) + __builtin_ia32_cmpless ((__v4sf) __B, + (__v4sf) + __A)); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpneq_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpneqss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnlt_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpnltss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnle_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpnless ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpngt_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movss ((__v4sf) __A, + (__v4sf) + __builtin_ia32_cmpnltss ((__v4sf) __B, + (__v4sf) + __A)); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnge_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movss ((__v4sf) __A, + (__v4sf) + __builtin_ia32_cmpnless ((__v4sf) __B, + (__v4sf) + __A)); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpord_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpordss ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpunord_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpunordss ((__v4sf)__A, (__v4sf)__B); +} + + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpeqps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpltps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmple_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpleps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpgtps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpge_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpgeps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpneq_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpneqps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnlt_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpnltps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnle_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpnleps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpngt_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpngtps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnge_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpngeps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpord_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpordps ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpunord_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_cmpunordps ((__v4sf)__A, (__v4sf)__B); +} + + + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comieq_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comieq ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comilt_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comilt ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comile_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comile ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comigt_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comigt ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comige_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comige ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comineq_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_comineq ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomieq_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomieq ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomilt_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomilt ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomile_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomile ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomigt_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomigt ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomige_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomige ((__v4sf)__A, (__v4sf)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomineq_ss (__m128 __A, __m128 __B) +{ + return __builtin_ia32_ucomineq ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_si32 (__m128 __A) +{ + return __builtin_ia32_cvtss2si ((__v4sf) __A); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvt_ss2si (__m128 __A) +{ + return _mm_cvtss_si32 (__A); +} + + + + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_si64 (__m128 __A) +{ + return __builtin_ia32_cvtss2si64 ((__v4sf) __A); +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_si64x (__m128 __A) +{ + return __builtin_ia32_cvtss2si64 ((__v4sf) __A); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_pi32 (__m128 __A) +{ + return (__m64) __builtin_ia32_cvtps2pi ((__v4sf) __A); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvt_ps2pi (__m128 __A) +{ + return _mm_cvtps_pi32 (__A); +} + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttss_si32 (__m128 __A) +{ + return __builtin_ia32_cvttss2si ((__v4sf) __A); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtt_ss2si (__m128 __A) +{ + return _mm_cvttss_si32 (__A); +} + + + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttss_si64 (__m128 __A) +{ + return __builtin_ia32_cvttss2si64 ((__v4sf) __A); +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttss_si64x (__m128 __A) +{ + return __builtin_ia32_cvttss2si64 ((__v4sf) __A); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttps_pi32 (__m128 __A) +{ + return (__m64) __builtin_ia32_cvttps2pi ((__v4sf) __A); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtt_ps2pi (__m128 __A) +{ + return _mm_cvttps_pi32 (__A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi32_ss (__m128 __A, int __B) +{ + return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvt_si2ss (__m128 __A, int __B) +{ + return _mm_cvtsi32_ss (__A, __B); +} + + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_ss (__m128 __A, long long __B) +{ + return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64x_ss (__m128 __A, long long __B) +{ + return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); +} + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi32_ps (__m128 __A, __m64 __B) +{ + return (__m128) __builtin_ia32_cvtpi2ps ((__v4sf) __A, (__v2si)__B); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvt_pi2ps (__m128 __A, __m64 __B) +{ + return _mm_cvtpi32_ps (__A, __B); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi16_ps (__m64 __A) +{ + __v4hi __sign; + __v2si __hisi, __losi; + __v4sf __zero, __ra, __rb; + + + + + __sign = __builtin_ia32_pcmpgtw ((__v4hi)0LL, (__v4hi)__A); + + + __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, __sign); + __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, __sign); + + + __zero = (__v4sf) _mm_setzero_ps (); + __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); + __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); + + return (__m128) __builtin_ia32_movlhps (__ra, __rb); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpu16_ps (__m64 __A) +{ + __v2si __hisi, __losi; + __v4sf __zero, __ra, __rb; + + + __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, (__v4hi)0LL); + __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, (__v4hi)0LL); + + + __zero = (__v4sf) _mm_setzero_ps (); + __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); + __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); + + return (__m128) __builtin_ia32_movlhps (__ra, __rb); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi8_ps (__m64 __A) +{ + __v8qi __sign; + + + + + __sign = __builtin_ia32_pcmpgtb ((__v8qi)0LL, (__v8qi)__A); + + + __A = (__m64) __builtin_ia32_punpcklbw ((__v8qi)__A, __sign); + + return _mm_cvtpi16_ps(__A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpu8_ps(__m64 __A) +{ + __A = (__m64) __builtin_ia32_punpcklbw ((__v8qi)__A, (__v8qi)0LL); + return _mm_cvtpu16_ps(__A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi32x2_ps(__m64 __A, __m64 __B) +{ + __v4sf __zero = (__v4sf) _mm_setzero_ps (); + __v4sf __sfa = __builtin_ia32_cvtpi2ps (__zero, (__v2si)__A); + __v4sf __sfb = __builtin_ia32_cvtpi2ps (__sfa, (__v2si)__B); + return (__m128) __builtin_ia32_movlhps (__sfa, __sfb); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_pi16(__m128 __A) +{ + __v4sf __hisf = (__v4sf)__A; + __v4sf __losf = __builtin_ia32_movhlps (__hisf, __hisf); + __v2si __hisi = __builtin_ia32_cvtps2pi (__hisf); + __v2si __losi = __builtin_ia32_cvtps2pi (__losf); + return (__m64) __builtin_ia32_packssdw (__hisi, __losi); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_pi8(__m128 __A) +{ + __v4hi __tmp = (__v4hi) _mm_cvtps_pi16 (__A); + return (__m64) __builtin_ia32_packsswb (__tmp, (__v4hi)0LL); +} +# 755 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_unpckhps ((__v4sf)__A, (__v4sf)__B); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_unpcklps ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadh_pi (__m128 __A, __m64 const *__P) +{ + return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (const __v2sf *)__P); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeh_pi (__m64 *__P, __m128 __A) +{ + __builtin_ia32_storehps ((__v2sf *)__P, (__v4sf)__A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movehl_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movhlps ((__v4sf)__A, (__v4sf)__B); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movelh_ps (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_ia32_movlhps ((__v4sf)__A, (__v4sf)__B); +} + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadl_pi (__m128 __A, __m64 const *__P) +{ + return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (const __v2sf *)__P); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storel_pi (__m64 *__P, __m128 __A) +{ + __builtin_ia32_storelps ((__v2sf *)__P, (__v4sf)__A); +} + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movemask_ps (__m128 __A) +{ + return __builtin_ia32_movmskps ((__v4sf)__A); +} + + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_getcsr (void) +{ + return __builtin_ia32_stmxcsr (); +} + + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_GET_EXCEPTION_STATE (void) +{ + return _mm_getcsr() & 0x003f; +} + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_GET_EXCEPTION_MASK (void) +{ + return _mm_getcsr() & 0x1f80; +} + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_GET_ROUNDING_MODE (void) +{ + return _mm_getcsr() & 0x6000; +} + +extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_GET_FLUSH_ZERO_MODE (void) +{ + return _mm_getcsr() & 0x8000; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setcsr (unsigned int __I) +{ + __builtin_ia32_ldmxcsr (__I); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_SET_EXCEPTION_STATE(unsigned int __mask) +{ + _mm_setcsr((_mm_getcsr() & ~0x003f) | __mask); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_SET_EXCEPTION_MASK (unsigned int __mask) +{ + _mm_setcsr((_mm_getcsr() & ~0x1f80) | __mask); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_SET_ROUNDING_MODE (unsigned int __mode) +{ + _mm_setcsr((_mm_getcsr() & ~0x6000) | __mode); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_MM_SET_FLUSH_ZERO_MODE (unsigned int __mode) +{ + _mm_setcsr((_mm_getcsr() & ~0x8000) | __mode); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_ss (float __F) +{ + return __extension__ (__m128)(__v4sf){ __F, 0.0f, 0.0f, 0.0f }; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_ps (float __F) +{ + return __extension__ (__m128)(__v4sf){ __F, __F, __F, __F }; +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_ps1 (float __F) +{ + return _mm_set1_ps (__F); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_ss (float const *__P) +{ + return _mm_set_ss (*__P); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load1_ps (float const *__P) +{ + return _mm_set1_ps (*__P); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_ps1 (float const *__P) +{ + return _mm_load1_ps (__P); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_ps (float const *__P) +{ + return *(__m128 *)__P; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_ps (float const *__P) +{ + return *(__m128_u *)__P; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadr_ps (float const *__P) +{ + __v4sf __tmp = *(__v4sf *)__P; + return (__m128) __builtin_ia32_shufps (__tmp, __tmp, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3))); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_ps (const float __Z, const float __Y, const float __X, const float __W) +{ + return __extension__ (__m128)(__v4sf){ __W, __X, __Y, __Z }; +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_ps (float __Z, float __Y, float __X, float __W) +{ + return __extension__ (__m128)(__v4sf){ __Z, __Y, __X, __W }; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_ss (float *__P, __m128 __A) +{ + *__P = ((__v4sf)__A)[0]; +} + +extern __inline float __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_f32 (__m128 __A) +{ + return ((__v4sf)__A)[0]; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_ps (float *__P, __m128 __A) +{ + *(__m128 *)__P = __A; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_ps (float *__P, __m128 __A) +{ + *(__m128_u *)__P = __A; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store1_ps (float *__P, __m128 __A) +{ + __v4sf __va = (__v4sf)__A; + __v4sf __tmp = __builtin_ia32_shufps (__va, __va, (((0) << 6) | ((0) << 4) | ((0) << 2) | (0))); + _mm_storeu_ps (__P, __tmp); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_ps1 (float *__P, __m128 __A) +{ + _mm_store1_ps (__P, __A); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storer_ps (float *__P, __m128 __A) +{ + __v4sf __va = (__v4sf)__A; + __v4sf __tmp = __builtin_ia32_shufps (__va, __va, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3))); + _mm_store_ps (__P, __tmp); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_move_ss (__m128 __A, __m128 __B) +{ + return (__m128) __builtin_shuffle ((__v4sf)__A, (__v4sf)__B, + __extension__ + (__attribute__((__vector_size__ (16))) int) + {4,1,2,3}); +} +# 1063 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_pi16 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pmaxsw ((__v4hi)__A, (__v4hi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmaxsw (__m64 __A, __m64 __B) +{ + return _mm_max_pi16 (__A, __B); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_pu8 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pmaxub ((__v8qi)__A, (__v8qi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmaxub (__m64 __A, __m64 __B) +{ + return _mm_max_pu8 (__A, __B); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_pi16 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pminsw ((__v4hi)__A, (__v4hi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pminsw (__m64 __A, __m64 __B) +{ + return _mm_min_pi16 (__A, __B); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_pu8 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pminub ((__v8qi)__A, (__v8qi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pminub (__m64 __A, __m64 __B) +{ + return _mm_min_pu8 (__A, __B); +} + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movemask_pi8 (__m64 __A) +{ + return __builtin_ia32_pmovmskb ((__v8qi)__A); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmovmskb (__m64 __A) +{ + return _mm_movemask_pi8 (__A); +} + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mulhi_pu16 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pmulhuw ((__v4hi)__A, (__v4hi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pmulhuw (__m64 __A, __m64 __B) +{ + return _mm_mulhi_pu16 (__A, __B); +} +# 1165 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_maskmove_si64 (__m64 __A, __m64 __N, char *__P) +{ + + + + typedef long long __v2di __attribute__ ((__vector_size__ (16))); + typedef char __v16qi __attribute__ ((__vector_size__ (16))); + + __v2di __A128 = __extension__ (__v2di) { ((__v1di) __A)[0], 0 }; + __v2di __N128 = __extension__ (__v2di) { ((__v1di) __N)[0], 0 }; + + + long long unsigned int offset = ((long long unsigned int) __P) & 0xf; + if (offset) + { + + + if (offset > 8) + offset = 8; + __P = (char *) (((long long unsigned int) __P) - offset); + + + switch (offset) + { + case 1: + __A128 = __builtin_ia32_pslldqi128 (__A128, 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 8); + break; + case 2: + __A128 = __builtin_ia32_pslldqi128 (__A128, 2 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 2 * 8); + break; + case 3: + __A128 = __builtin_ia32_pslldqi128 (__A128, 3 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 3 * 8); + break; + case 4: + __A128 = __builtin_ia32_pslldqi128 (__A128, 4 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 4 * 8); + break; + case 5: + __A128 = __builtin_ia32_pslldqi128 (__A128, 5 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 5 * 8); + break; + case 6: + __A128 = __builtin_ia32_pslldqi128 (__A128, 6 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 6 * 8); + break; + case 7: + __A128 = __builtin_ia32_pslldqi128 (__A128, 7 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 7 * 8); + break; + case 8: + __A128 = __builtin_ia32_pslldqi128 (__A128, 8 * 8); + __N128 = __builtin_ia32_pslldqi128 (__N128, 8 * 8); + break; + default: + break; + } + } + __builtin_ia32_maskmovdqu ((__v16qi)__A128, (__v16qi)__N128, __P); + + + +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_maskmovq (__m64 __A, __m64 __N, char *__P) +{ + _mm_maskmove_si64 (__A, __N, __P); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_avg_pu8 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pavgb ((__v8qi)__A, (__v8qi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pavgb (__m64 __A, __m64 __B) +{ + return _mm_avg_pu8 (__A, __B); +} + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_avg_pu16 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_pavgw ((__v4hi)__A, (__v4hi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_pavgw (__m64 __A, __m64 __B) +{ + return _mm_avg_pu16 (__A, __B); +} + + + + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sad_pu8 (__m64 __A, __m64 __B) +{ + return (__m64) __builtin_ia32_psadbw ((__v8qi)__A, (__v8qi)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_m_psadbw (__m64 __A, __m64 __B) +{ + return _mm_sad_pu8 (__A, __B); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_pi (__m64 *__P, __m64 __A) +{ + __builtin_ia32_movntq ((unsigned long long *)__P, (unsigned long long)__A); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_ps (float *__P, __m128 __A) +{ + __builtin_ia32_movntps (__P, (__v4sf)__A); +} + + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sfence (void) +{ + __builtin_ia32_sfence (); +} +# 1316 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +# 1 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 1 3 4 +# 1317 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 2 3 4 +# 1328 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/xmmintrin.h" 3 4 +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_pause (void) +{ + __builtin_ia32_pause (); +} +# 32 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 2 3 4 +# 40 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +typedef double __v2df __attribute__ ((__vector_size__ (16))); +typedef long long __v2di __attribute__ ((__vector_size__ (16))); +typedef unsigned long long __v2du __attribute__ ((__vector_size__ (16))); +typedef int __v4si __attribute__ ((__vector_size__ (16))); +typedef unsigned int __v4su __attribute__ ((__vector_size__ (16))); +typedef short __v8hi __attribute__ ((__vector_size__ (16))); +typedef unsigned short __v8hu __attribute__ ((__vector_size__ (16))); +typedef char __v16qi __attribute__ ((__vector_size__ (16))); +typedef signed char __v16qs __attribute__ ((__vector_size__ (16))); +typedef unsigned char __v16qu __attribute__ ((__vector_size__ (16))); + + + +typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); +typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); + + +typedef long long __m128i_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); +typedef double __m128d_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); + + + + + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_sd (double __F) +{ + return __extension__ (__m128d){ __F, 0.0 }; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_pd (double __F) +{ + return __extension__ (__m128d){ __F, __F }; +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pd1 (double __F) +{ + return _mm_set1_pd (__F); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_pd (double __W, double __X) +{ + return __extension__ (__m128d){ __X, __W }; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_pd (double __W, double __X) +{ + return __extension__ (__m128d){ __W, __X }; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_undefined_pd (void) +{ + __m128d __Y = __Y; + return __Y; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setzero_pd (void) +{ + return __extension__ (__m128d){ 0.0, 0.0 }; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_move_sd (__m128d __A, __m128d __B) +{ + return __extension__ (__m128d) __builtin_shuffle ((__v2df)__A, (__v2df)__B, (__v2di){2, 1}); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_pd (double const *__P) +{ + return *(__m128d *)__P; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_pd (double const *__P) +{ + return *(__m128d_u *)__P; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load1_pd (double const *__P) +{ + return _mm_set1_pd (*__P); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_sd (double const *__P) +{ + return _mm_set_sd (*__P); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_pd1 (double const *__P) +{ + return _mm_load1_pd (__P); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadr_pd (double const *__P) +{ + __m128d __tmp = _mm_load_pd (__P); + return __builtin_ia32_shufpd (__tmp, __tmp, (((0) << 1) | (1))); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_pd (double *__P, __m128d __A) +{ + *(__m128d *)__P = __A; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_pd (double *__P, __m128d __A) +{ + *(__m128d_u *)__P = __A; +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_sd (double *__P, __m128d __A) +{ + *__P = ((__v2df)__A)[0]; +} + +extern __inline double __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_f64 (__m128d __A) +{ + return ((__v2df)__A)[0]; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storel_pd (double *__P, __m128d __A) +{ + _mm_store_sd (__P, __A); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeh_pd (double *__P, __m128d __A) +{ + *__P = ((__v2df)__A)[1]; +} + + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store1_pd (double *__P, __m128d __A) +{ + _mm_store_pd (__P, __builtin_ia32_shufpd (__A, __A, (((0) << 1) | (0)))); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_pd1 (double *__P, __m128d __A) +{ + _mm_store1_pd (__P, __A); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storer_pd (double *__P, __m128d __A) +{ + _mm_store_pd (__P, __builtin_ia32_shufpd (__A, __A, (((0) << 1) | (1)))); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi128_si32 (__m128i __A) +{ + return __builtin_ia32_vec_ext_v4si ((__v4si)__A, 0); +} + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi128_si64 (__m128i __A) +{ + return ((__v2di)__A)[0]; +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi128_si64x (__m128i __A) +{ + return ((__v2di)__A)[0]; +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_pd (__m128d __A, __m128d __B) +{ + return (__m128d) ((__v2df)__A + (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_addsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_pd (__m128d __A, __m128d __B) +{ + return (__m128d) ((__v2df)__A - (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_subsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_pd (__m128d __A, __m128d __B) +{ + return (__m128d) ((__v2df)__A * (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_mulsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_div_pd (__m128d __A, __m128d __B) +{ + return (__m128d) ((__v2df)__A / (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_div_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_divsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sqrt_pd (__m128d __A) +{ + return (__m128d)__builtin_ia32_sqrtpd ((__v2df)__A); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sqrt_sd (__m128d __A, __m128d __B) +{ + __v2df __tmp = __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); + return (__m128d)__builtin_ia32_sqrtsd ((__v2df)__tmp); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_minpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_minsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_maxpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_maxsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_and_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_andpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_andnot_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_andnpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_or_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_orpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_xor_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_xorpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpeqpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpltpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmple_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmplepd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpgtpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpge_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpgepd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpneq_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpneqpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnlt_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpnltpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnle_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpnlepd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpngt_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpngtpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnge_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpngepd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpord_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpordpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpunord_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpunordpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpeqsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpltsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmple_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmplesd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpltsd ((__v2df) __B, + (__v2df) + __A)); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpge_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmplesd ((__v2df) __B, + (__v2df) + __A)); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpneq_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpneqsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnlt_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpnltsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnle_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpnlesd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpngt_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpnltsd ((__v2df) __B, + (__v2df) + __A)); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpnge_sd (__m128d __A, __m128d __B) +{ + return (__m128d) __builtin_ia32_movsd ((__v2df) __A, + (__v2df) + __builtin_ia32_cmpnlesd ((__v2df) __B, + (__v2df) + __A)); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpord_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpordsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpunord_sd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_cmpunordsd ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comieq_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdeq ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comilt_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdlt ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comile_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdle ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comigt_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdgt ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comige_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdge ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_comineq_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_comisdneq ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomieq_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdeq ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomilt_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdlt ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomile_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdle ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomigt_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdgt ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomige_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdge ((__v2df)__A, (__v2df)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_ucomineq_sd (__m128d __A, __m128d __B) +{ + return __builtin_ia32_ucomisdneq ((__v2df)__A, (__v2df)__B); +} + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi64x (long long __q1, long long __q0) +{ + return __extension__ (__m128i)(__v2di){ __q0, __q1 }; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi64 (__m64 __q1, __m64 __q0) +{ + return _mm_set_epi64x ((long long)__q1, (long long)__q0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi32 (int __q3, int __q2, int __q1, int __q0) +{ + return __extension__ (__m128i)(__v4si){ __q0, __q1, __q2, __q3 }; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi16 (short __q7, short __q6, short __q5, short __q4, + short __q3, short __q2, short __q1, short __q0) +{ + return __extension__ (__m128i)(__v8hi){ + __q0, __q1, __q2, __q3, __q4, __q5, __q6, __q7 }; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set_epi8 (char __q15, char __q14, char __q13, char __q12, + char __q11, char __q10, char __q09, char __q08, + char __q07, char __q06, char __q05, char __q04, + char __q03, char __q02, char __q01, char __q00) +{ + return __extension__ (__m128i)(__v16qi){ + __q00, __q01, __q02, __q03, __q04, __q05, __q06, __q07, + __q08, __q09, __q10, __q11, __q12, __q13, __q14, __q15 + }; +} + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi64x (long long __A) +{ + return _mm_set_epi64x (__A, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi64 (__m64 __A) +{ + return _mm_set_epi64 (__A, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi32 (int __A) +{ + return _mm_set_epi32 (__A, __A, __A, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi16 (short __A) +{ + return _mm_set_epi16 (__A, __A, __A, __A, __A, __A, __A, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_set1_epi8 (char __A) +{ + return _mm_set_epi8 (__A, __A, __A, __A, __A, __A, __A, __A, + __A, __A, __A, __A, __A, __A, __A, __A); +} + + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_epi64 (__m64 __q0, __m64 __q1) +{ + return _mm_set_epi64 (__q1, __q0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_epi32 (int __q0, int __q1, int __q2, int __q3) +{ + return _mm_set_epi32 (__q3, __q2, __q1, __q0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_epi16 (short __q0, short __q1, short __q2, short __q3, + short __q4, short __q5, short __q6, short __q7) +{ + return _mm_set_epi16 (__q7, __q6, __q5, __q4, __q3, __q2, __q1, __q0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setr_epi8 (char __q00, char __q01, char __q02, char __q03, + char __q04, char __q05, char __q06, char __q07, + char __q08, char __q09, char __q10, char __q11, + char __q12, char __q13, char __q14, char __q15) +{ + return _mm_set_epi8 (__q15, __q14, __q13, __q12, __q11, __q10, __q09, __q08, + __q07, __q06, __q05, __q04, __q03, __q02, __q01, __q00); +} + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_load_si128 (__m128i const *__P) +{ + return *__P; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si128 (__m128i_u const *__P) +{ + return *__P; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadl_epi64 (__m128i_u const *__P) +{ + return _mm_set_epi64 ((__m64)0LL, *(__m64_u *)__P); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si64 (void const *__P) +{ + return _mm_loadl_epi64 ((__m128i_u *)__P); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si32 (void const *__P) +{ + return _mm_set_epi32 (*(int *)__P, (int)0, (int)0, (int)0); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadu_si16 (void const *__P) +{ + return _mm_set_epi16 (*(short *)__P, (short)0, (short)0, (short)0, + (short)0, (short)0, (short)0, (short)0); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_store_si128 (__m128i *__P, __m128i __B) +{ + *__P = __B; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si128 (__m128i_u *__P, __m128i __B) +{ + *__P = __B; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storel_epi64 (__m128i_u *__P, __m128i __B) +{ + *(__m64_u *)__P = (__m64) ((__v2di)__B)[0]; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si64 (void *__P, __m128i __B) +{ + _mm_storel_epi64 ((__m128i_u *)__P, __B); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si32 (void *__P, __m128i __B) +{ + *(__m32_u *)__P = (__m32) ((__v4si)__B)[0]; +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_storeu_si16 (void *__P, __m128i __B) +{ + *(__m16_u *)__P = (__m16) ((__v8hi)__B)[0]; +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movepi64_pi64 (__m128i __B) +{ + return (__m64) ((__v2di)__B)[0]; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movpi64_epi64 (__m64 __A) +{ + return _mm_set_epi64 ((__m64)0LL, __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_move_epi64 (__m128i __A) +{ + return (__m128i)__builtin_ia32_movq128 ((__v2di) __A); +} + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_undefined_si128 (void) +{ + __m128i __Y = __Y; + return __Y; +} + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_setzero_si128 (void) +{ + return __extension__ (__m128i)(__v4si){ 0, 0, 0, 0 }; +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtepi32_pd (__m128i __A) +{ + return (__m128d)__builtin_ia32_cvtdq2pd ((__v4si) __A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtepi32_ps (__m128i __A) +{ + return (__m128)__builtin_ia32_cvtdq2ps ((__v4si) __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpd_epi32 (__m128d __A) +{ + return (__m128i)__builtin_ia32_cvtpd2dq ((__v2df) __A); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpd_pi32 (__m128d __A) +{ + return (__m64)__builtin_ia32_cvtpd2pi ((__v2df) __A); +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpd_ps (__m128d __A) +{ + return (__m128)__builtin_ia32_cvtpd2ps ((__v2df) __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttpd_epi32 (__m128d __A) +{ + return (__m128i)__builtin_ia32_cvttpd2dq ((__v2df) __A); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttpd_pi32 (__m128d __A) +{ + return (__m64)__builtin_ia32_cvttpd2pi ((__v2df) __A); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtpi32_pd (__m64 __A) +{ + return (__m128d)__builtin_ia32_cvtpi2pd ((__v2si) __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_epi32 (__m128 __A) +{ + return (__m128i)__builtin_ia32_cvtps2dq ((__v4sf) __A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttps_epi32 (__m128 __A) +{ + return (__m128i)__builtin_ia32_cvttps2dq ((__v4sf) __A); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtps_pd (__m128 __A) +{ + return (__m128d)__builtin_ia32_cvtps2pd ((__v4sf) __A); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_si32 (__m128d __A) +{ + return __builtin_ia32_cvtsd2si ((__v2df) __A); +} + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_si64 (__m128d __A) +{ + return __builtin_ia32_cvtsd2si64 ((__v2df) __A); +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_si64x (__m128d __A) +{ + return __builtin_ia32_cvtsd2si64 ((__v2df) __A); +} + + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttsd_si32 (__m128d __A) +{ + return __builtin_ia32_cvttsd2si ((__v2df) __A); +} + + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttsd_si64 (__m128d __A) +{ + return __builtin_ia32_cvttsd2si64 ((__v2df) __A); +} + + +extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvttsd_si64x (__m128d __A) +{ + return __builtin_ia32_cvttsd2si64 ((__v2df) __A); +} + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsd_ss (__m128 __A, __m128d __B) +{ + return (__m128)__builtin_ia32_cvtsd2ss ((__v4sf) __A, (__v2df) __B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi32_sd (__m128d __A, int __B) +{ + return (__m128d)__builtin_ia32_cvtsi2sd ((__v2df) __A, __B); +} + + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_sd (__m128d __A, long long __B) +{ + return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64x_sd (__m128d __A, long long __B) +{ + return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); +} + + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtss_sd (__m128d __A, __m128 __B) +{ + return (__m128d)__builtin_ia32_cvtss2sd ((__v2df) __A, (__v4sf)__B); +} +# 956 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_unpckhpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_pd (__m128d __A, __m128d __B) +{ + return (__m128d)__builtin_ia32_unpcklpd ((__v2df)__A, (__v2df)__B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadh_pd (__m128d __A, double const *__B) +{ + return (__m128d)__builtin_ia32_loadhpd ((__v2df)__A, __B); +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_loadl_pd (__m128d __A, double const *__B) +{ + return (__m128d)__builtin_ia32_loadlpd ((__v2df)__A, __B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movemask_pd (__m128d __A) +{ + return __builtin_ia32_movmskpd ((__v2df)__A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_packsswb128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packs_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_packssdw128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_packus_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_packuswb128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckhbw128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckhwd128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckhdq128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpackhi_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckhqdq128 ((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpcklbw128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpcklwd128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpckldq128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_unpacklo_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_punpcklqdq128 ((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qu)__A + (__v16qu)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hu)__A + (__v8hu)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4su)__A + (__v4su)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_add_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A + (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_paddsb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_paddsw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_paddusb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_adds_epu16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_paddusw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qu)__A - (__v16qu)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hu)__A - (__v8hu)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4su)__A - (__v4su)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sub_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A - (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psubsb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psubsw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psubusb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_subs_epu16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psubusw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_madd_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmaddwd128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mulhi_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmulhw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mullo_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hu)__A * (__v8hu)__B); +} + +extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_su32 (__m64 __A, __m64 __B) +{ + return (__m64)__builtin_ia32_pmuludq ((__v2si)__A, (__v2si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mul_epu32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmuludq128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_epi16 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psllwi128 ((__v8hi)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_epi32 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_pslldi128 ((__v4si)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_slli_epi64 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psllqi128 ((__v2di)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srai_epi16 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psrawi128 ((__v8hi)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srai_epi32 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psradi128 ((__v4si)__A, __B); +} +# 1243 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_epi16 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psrlwi128 ((__v8hi)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_epi32 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psrldi128 ((__v4si)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srli_epi64 (__m128i __A, int __B) +{ + return (__m128i)__builtin_ia32_psrlqi128 ((__v2di)__A, __B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psllw128((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pslld128((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sll_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psllq128((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sra_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psraw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sra_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psrad128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psrlw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psrld128 ((__v4si)__A, (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_srl_epi64 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psrlq128 ((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_and_si128 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A & (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_andnot_si128 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pandn128 ((__v2di)__A, (__v2di)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_or_si128 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A | (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_xor_si128 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v2du)__A ^ (__v2du)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qi)__A == (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hi)__A == (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpeq_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4si)__A == (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qs)__A < (__v16qs)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hi)__A < (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmplt_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4si)__A < (__v4si)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_epi8 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v16qs)__A > (__v16qs)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v8hi)__A > (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cmpgt_epi32 (__m128i __A, __m128i __B) +{ + return (__m128i) ((__v4si)__A > (__v4si)__B); +} +# 1407 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmaxsw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_max_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmaxub128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_epi16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pminsw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_min_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pminub128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_movemask_epi8 (__m128i __A) +{ + return __builtin_ia32_pmovmskb128 ((__v16qi)__A); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mulhi_epu16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pmulhuw128 ((__v8hi)__A, (__v8hi)__B); +} +# 1470 "D:/compilers/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/emmintrin.h" 3 4 +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_maskmoveu_si128 (__m128i __A, __m128i __B, char *__C) +{ + __builtin_ia32_maskmovdqu ((__v16qi)__A, (__v16qi)__B, __C); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_avg_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pavgb128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_avg_epu16 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_pavgw128 ((__v8hi)__A, (__v8hi)__B); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_sad_epu8 (__m128i __A, __m128i __B) +{ + return (__m128i)__builtin_ia32_psadbw128 ((__v16qi)__A, (__v16qi)__B); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_si32 (int *__A, int __B) +{ + __builtin_ia32_movnti (__A, __B); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_si64 (long long int *__A, long long int __B) +{ + __builtin_ia32_movnti64 (__A, __B); +} + + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_si128 (__m128i *__A, __m128i __B) +{ + __builtin_ia32_movntdq ((__v2di *)__A, (__v2di)__B); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_stream_pd (double *__A, __m128d __B) +{ + __builtin_ia32_movntpd (__A, (__v2df)__B); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_clflush (void const *__A) +{ + __builtin_ia32_clflush (__A); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_lfence (void) +{ + __builtin_ia32_lfence (); +} + +extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_mfence (void) +{ + __builtin_ia32_mfence (); +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi32_si128 (int __A) +{ + return _mm_set_epi32 (0, 0, 0, __A); +} + + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64_si128 (long long __A) +{ + return _mm_set_epi64x (0, __A); +} + + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtsi64x_si128 (long long __A) +{ + return _mm_set_epi64x (0, __A); +} + + + + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castpd_ps(__m128d __A) +{ + return (__m128) __A; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castpd_si128(__m128d __A) +{ + return (__m128i) __A; +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castps_pd(__m128 __A) +{ + return (__m128d) __A; +} + +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castps_si128(__m128 __A) +{ + return (__m128i) __A; +} + +extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castsi128_ps(__m128i __A) +{ + return (__m128) __A; +} + +extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +_mm_castsi128_pd(__m128i __A) +{ + return (__m128d) __A; +} +# 14 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" 2 + + + + + + + + +# 21 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" +namespace boost{ namespace math{ namespace lanczos{ + +template <> +inline double lanczos13m53::lanczos_sum(const double& x) +{ + static const __attribute__((__aligned__(16))) double coeff[26] = { + static_cast(2.506628274631000270164908177133837338626L), + static_cast(1u), + static_cast(210.8242777515793458725097339207133627117L), + static_cast(66u), + static_cast(8071.672002365816210638002902272250613822L), + static_cast(1925u), + static_cast(186056.2653952234950402949897160456992822L), + static_cast(32670u), + static_cast(2876370.628935372441225409051620849613599L), + static_cast(357423u), + static_cast(31426415.58540019438061423162831820536287L), + static_cast(2637558u), + static_cast(248874557.8620541565114603864132294232163L), + static_cast(13339535u), + static_cast(1439720407.311721673663223072794912393972L), + static_cast(45995730u), + static_cast(6039542586.35202800506429164430729792107L), + static_cast(105258076u), + static_cast(17921034426.03720969991975575445893111267L), + static_cast(150917976u), + static_cast(35711959237.35566804944018545154716670596L), + static_cast(120543840u), + static_cast(42919803642.64909876895789904700198885093L), + static_cast(39916800u), + static_cast(23531376880.41075968857200767445163675473L), + static_cast(0u) + }; + + static const double lim = 4.31965e+25; + + if (x > lim) + { + double z = 1 / x; + return ((((((((((((coeff[24] * z + coeff[22]) * z + coeff[20]) * z + coeff[18]) * z + coeff[16]) * z + coeff[14]) * z + coeff[12]) * z + coeff[10]) * z + coeff[8]) * z + coeff[6]) * z + coeff[4]) * z + coeff[2]) * z + coeff[0]) / ((((((((((((coeff[25] * z + coeff[23]) * z + coeff[21]) * z + coeff[19]) * z + coeff[17]) * z + coeff[15]) * z + coeff[13]) * z + coeff[11]) * z + coeff[9]) * z + coeff[7]) * z + coeff[5]) * z + coeff[3]) * z + coeff[1]); + } + + __m128d vx = _mm_load1_pd(&x); + __m128d sum_even = _mm_load_pd(coeff); + __m128d sum_odd = _mm_load_pd(coeff+2); + __m128d nc_odd, nc_even; + __m128d vx2 = _mm_mul_pd(vx, vx); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 4); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 6); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 8); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 10); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 12); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 14); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 16); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 18); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 20); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 22); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 24); + sum_odd = _mm_mul_pd(sum_odd, vx); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_even = _mm_add_pd(sum_even, sum_odd); + + + double __attribute__((__aligned__(16))) t[2]; + _mm_store_pd(t, sum_even); + + return t[0] / t[1]; +} + +template <> +inline double lanczos13m53::lanczos_sum_expG_scaled(const double& x) +{ + static const __attribute__((__aligned__(16))) double coeff[26] = { + static_cast(0.006061842346248906525783753964555936883222L), + static_cast(1u), + static_cast(0.5098416655656676188125178644804694509993L), + static_cast(66u), + static_cast(19.51992788247617482847860966235652136208L), + static_cast(1925u), + static_cast(449.9445569063168119446858607650988409623L), + static_cast(32670u), + static_cast(6955.999602515376140356310115515198987526L), + static_cast(357423u), + static_cast(75999.29304014542649875303443598909137092L), + static_cast(2637558u), + static_cast(601859.6171681098786670226533699352302507L), + static_cast(13339535u), + static_cast(3481712.15498064590882071018964774556468L), + static_cast(45995730u), + static_cast(14605578.08768506808414169982791359218571L), + static_cast(105258076u), + static_cast(43338889.32467613834773723740590533316085L), + static_cast(150917976u), + static_cast(86363131.28813859145546927288977868422342L), + static_cast(120543840u), + static_cast(103794043.1163445451906271053616070238554L), + static_cast(39916800u), + static_cast(56906521.91347156388090791033559122686859L), + static_cast(0u) + }; + + static const double lim = 4.76886e+25; + + if (x > lim) + { + double z = 1 / x; + return ((((((((((((coeff[24] * z + coeff[22]) * z + coeff[20]) * z + coeff[18]) * z + coeff[16]) * z + coeff[14]) * z + coeff[12]) * z + coeff[10]) * z + coeff[8]) * z + coeff[6]) * z + coeff[4]) * z + coeff[2]) * z + coeff[0]) / ((((((((((((coeff[25] * z + coeff[23]) * z + coeff[21]) * z + coeff[19]) * z + coeff[17]) * z + coeff[15]) * z + coeff[13]) * z + coeff[11]) * z + coeff[9]) * z + coeff[7]) * z + coeff[5]) * z + coeff[3]) * z + coeff[1]); + } + + __m128d vx = _mm_load1_pd(&x); + __m128d sum_even = _mm_load_pd(coeff); + __m128d sum_odd = _mm_load_pd(coeff+2); + __m128d nc_odd, nc_even; + __m128d vx2 = _mm_mul_pd(vx, vx); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 4); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 6); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 8); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 10); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 12); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 14); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 16); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 18); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 20); + sum_odd = _mm_mul_pd(sum_odd, vx2); + nc_odd = _mm_load_pd(coeff + 22); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_odd = _mm_add_pd(sum_odd, nc_odd); + + sum_even = _mm_mul_pd(sum_even, vx2); + nc_even = _mm_load_pd(coeff + 24); + sum_odd = _mm_mul_pd(sum_odd, vx); + sum_even = _mm_add_pd(sum_even, nc_even); + sum_even = _mm_add_pd(sum_even, sum_odd); + + + double __attribute__((__aligned__(16))) t[2]; + _mm_store_pd(t, sum_even); + + return t[0] / t[1]; +} +# 227 "../../../../boost/math/special_functions/detail/lanczos_sse2.hpp" +} +} +} +# 2708 "../../../../boost/math/special_functions/lanczos.hpp" 2 +# 33 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/detail/igamma_large.hpp" 1 +# 62 "../../../../boost/math/special_functions/detail/igamma_large.hpp" +namespace boost{ namespace math{ + + +export template +typename tools::promote_args::type erf(T z); +export template +typename tools::promote_args::type erfc(T z); + + +namespace detail{ + + + + +template +inline T igamma_temme_large(T, T, const Policy& , std::integral_constant const *) +{ + + +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" 3 + (void) ((!!( +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" + 0 +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" 3 + )) || (_assert( +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" + "0" +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" 3 + ,"../../../../boost/math/special_functions/detail/igamma_large.hpp",80),0)) +# 80 "../../../../boost/math/special_functions/detail/igamma_large.hpp" + ; + return 0; +} + + + + +template +T igamma_temme_large(T a, T x, const Policy& pol, std::integral_constant const *) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T sigma = (x - a) / a; + T phi = -boost::math::log1pmx(sigma, pol); + T y = a * phi; + T z = sqrt(2 * phi); + if(x < a) + z = -z; + + T workspace[13]; + + static const T C0[] = { + boost::math::tools::make_big_value( -0.333333333333333333333, "-0.333333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0833333333333333333333, "0.0833333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0148148148148148148148, "-0.0148148148148148148148", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00115740740740740740741, "0.00115740740740740740741", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000352733686067019400353, "0.000352733686067019400353", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0001787551440329218107, "-0.0001787551440329218107", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.39192631785224377817e-4, "0.39192631785224377817e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.218544851067999216147e-5, "-0.218544851067999216147e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.18540622107151599607e-5, "-0.18540622107151599607e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.829671134095308600502e-6, "0.829671134095308600502e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.176659527368260793044e-6, "-0.176659527368260793044e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.670785354340149858037e-8, "0.670785354340149858037e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.102618097842403080426e-7, "0.102618097842403080426e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.438203601845335318655e-8, "-0.438203601845335318655e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.914769958223679023418e-9, "0.914769958223679023418e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.255141939949462497669e-10, "-0.255141939949462497669e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.583077213255042506746e-10, "-0.583077213255042506746e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.243619480206674162437e-10, "0.243619480206674162437e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.502766928011417558909e-11, "-0.502766928011417558909e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[0] = tools::evaluate_polynomial(C0, z); + + static const T C1[] = { + boost::math::tools::make_big_value( -0.00185185185185185185185, "-0.00185185185185185185185", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00347222222222222222222, "-0.00347222222222222222222", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00264550264550264550265, "0.00264550264550264550265", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000990226337448559670782, "-0.000990226337448559670782", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000205761316872427983539, "0.000205761316872427983539", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.40187757201646090535e-6, "-0.40187757201646090535e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.18098550334489977837e-4, "-0.18098550334489977837e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.764916091608111008464e-5, "0.764916091608111008464e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.161209008945634460038e-5, "-0.161209008945634460038e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.464712780280743434226e-8, "0.464712780280743434226e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137863344691572095931e-6, "0.137863344691572095931e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.575254560351770496402e-7, "-0.575254560351770496402e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119516285997781473243e-7, "0.119516285997781473243e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.175432417197476476238e-10, "-0.175432417197476476238e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.100915437106004126275e-8, "-0.100915437106004126275e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.416279299184258263623e-9, "0.416279299184258263623e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.856390702649298063807e-10, "-0.856390702649298063807e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[1] = tools::evaluate_polynomial(C1, z); + + static const T C2[] = { + boost::math::tools::make_big_value( 0.00413359788359788359788, "0.00413359788359788359788", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00268132716049382716049, "-0.00268132716049382716049", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000771604938271604938272, "0.000771604938271604938272", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.200938786008230452675e-5, "0.200938786008230452675e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000107366532263651605215, "-0.000107366532263651605215", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.529234488291201254164e-4, "0.529234488291201254164e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.127606351886187277134e-4, "-0.127606351886187277134e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.342357873409613807419e-7, "0.342357873409613807419e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137219573090629332056e-5, "0.137219573090629332056e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.629899213838005502291e-6, "-0.629899213838005502291e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.142806142060642417916e-6, "0.142806142060642417916e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.204770984219908660149e-9, "-0.204770984219908660149e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.140925299108675210533e-7, "-0.140925299108675210533e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.622897408492202203356e-8, "0.622897408492202203356e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.136704883966171134993e-8, "-0.136704883966171134993e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[2] = tools::evaluate_polynomial(C2, z); + + static const T C3[] = { + boost::math::tools::make_big_value( 0.000649434156378600823045, "0.000649434156378600823045", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000229472093621399176955, "0.000229472093621399176955", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000469189494395255712128, "-0.000469189494395255712128", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000267720632062838852962, "0.000267720632062838852962", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.756180167188397641073e-4, "-0.756180167188397641073e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.239650511386729665193e-6, "-0.239650511386729665193e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.110826541153473023615e-4, "0.110826541153473023615e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.56749528269915965675e-5, "-0.56749528269915965675e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.142309007324358839146e-5, "0.142309007324358839146e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.278610802915281422406e-10, "-0.278610802915281422406e-10", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.169584040919302772899e-6, "-0.169584040919302772899e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.809946490538808236335e-7, "0.809946490538808236335e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.191111684859736540607e-7, "-0.191111684859736540607e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[3] = tools::evaluate_polynomial(C3, z); + + static const T C4[] = { + boost::math::tools::make_big_value( -0.000861888290916711698605, "-0.000861888290916711698605", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000784039221720066627474, "0.000784039221720066627474", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000299072480303190179733, "-0.000299072480303190179733", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.146384525788434181781e-5, "-0.146384525788434181781e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.664149821546512218666e-4, "0.664149821546512218666e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.396836504717943466443e-4, "-0.396836504717943466443e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113757269706784190981e-4, "0.113757269706784190981e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.250749722623753280165e-9, "0.250749722623753280165e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.169541495365583060147e-5, "-0.169541495365583060147e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.890750753220530968883e-6, "0.890750753220530968883e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.229293483400080487057e-6, "-0.229293483400080487057e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[4] = tools::evaluate_polynomial(C4, z); + + static const T C5[] = { + boost::math::tools::make_big_value( -0.000336798553366358150309, "-0.000336798553366358150309", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.697281375836585777429e-4, "-0.697281375836585777429e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000277275324495939207873, "0.000277275324495939207873", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000199325705161888477003, "-0.000199325705161888477003", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.679778047793720783882e-4, "0.679778047793720783882e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.141906292064396701483e-6, "0.141906292064396701483e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.135940481897686932785e-4, "-0.135940481897686932785e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.801847025633420153972e-5, "0.801847025633420153972e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.229148117650809517038e-5, "-0.229148117650809517038e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[5] = tools::evaluate_polynomial(C5, z); + + static const T C6[] = { + boost::math::tools::make_big_value( 0.000531307936463992223166, "0.000531307936463992223166", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000592166437353693882865, "-0.000592166437353693882865", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000270878209671804482771, "0.000270878209671804482771", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.790235323266032787212e-6, "0.790235323266032787212e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.815396936756196875093e-4, "-0.815396936756196875093e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.561168275310624965004e-4, "0.561168275310624965004e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.183291165828433755673e-4, "-0.183291165828433755673e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.307961345060330478256e-8, "-0.307961345060330478256e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.346515536880360908674e-5, "0.346515536880360908674e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.20291327396058603727e-5, "-0.20291327396058603727e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.57887928631490037089e-6, "0.57887928631490037089e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[6] = tools::evaluate_polynomial(C6, z); + + static const T C7[] = { + boost::math::tools::make_big_value( 0.000344367606892377671254, "0.000344367606892377671254", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.517179090826059219337e-4, "0.517179090826059219337e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000334931610811422363117, "-0.000334931610811422363117", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000281269515476323702274, "0.000281269515476323702274", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000109765822446847310235, "-0.000109765822446847310235", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.127410090954844853795e-6, "-0.127410090954844853795e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.277444515115636441571e-4, "0.277444515115636441571e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.182634888057113326614e-4, "-0.182634888057113326614e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.578769494973505239894e-5, "0.578769494973505239894e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[7] = tools::evaluate_polynomial(C7, z); + + static const T C8[] = { + boost::math::tools::make_big_value( -0.000652623918595309418922, "-0.000652623918595309418922", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000839498720672087279993, "0.000839498720672087279993", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000438297098541721005061, "-0.000438297098541721005061", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.696909145842055197137e-6, "-0.696909145842055197137e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000166448466420675478374, "0.000166448466420675478374", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000127835176797692185853, "-0.000127835176797692185853", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.462995326369130429061e-4, "0.462995326369130429061e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[8] = tools::evaluate_polynomial(C8, z); + + static const T C9[] = { + boost::math::tools::make_big_value( -0.000596761290192746250124, "-0.000596761290192746250124", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.720489541602001055909e-4, "-0.720489541602001055909e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000678230883766732836162, "0.000678230883766732836162", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0006401475260262758451, "-0.0006401475260262758451", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000277501076343287044992, "0.000277501076343287044992", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[9] = tools::evaluate_polynomial(C9, z); + + static const T C10[] = { + boost::math::tools::make_big_value( 0.00133244544948006563713, "0.00133244544948006563713", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0019144384985654775265, "-0.0019144384985654775265", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00110893691345966373396, "0.00110893691345966373396", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[10] = tools::evaluate_polynomial(C10, z); + + static const T C11[] = { + boost::math::tools::make_big_value( 0.00157972766073083495909, "0.00157972766073083495909", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000162516262783915816899, "0.000162516262783915816899", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00206334210355432762645, "-0.00206334210355432762645", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00213896861856890981541, "0.00213896861856890981541", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00101085593912630031708, "-0.00101085593912630031708", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[11] = tools::evaluate_polynomial(C11, z); + + static const T C12[] = { + boost::math::tools::make_big_value( -0.00407251211951401664727, "-0.00407251211951401664727", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00640336283380806979482, "0.00640336283380806979482", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00404101610816766177474, "-0.00404101610816766177474", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[12] = tools::evaluate_polynomial(C12, z); + + T result = tools::evaluate_polynomial<13, T, T>(workspace, 1/a); + result *= exp(-y) / sqrt(2 * constants::pi() * a); + if(x < a) + result = -result; + + result += boost::math::erfc(sqrt(y), pol) / 2; + + return result; +} + + + + +template +T igamma_temme_large(T a, T x, const Policy& pol, std::integral_constant const *) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T sigma = (x - a) / a; + T phi = -boost::math::log1pmx(sigma, pol); + T y = a * phi; + T z = sqrt(2 * phi); + if(x < a) + z = -z; + + T workspace[10]; + + static const T C0[] = { + static_cast(-0.33333333333333333L), + static_cast(0.083333333333333333L), + static_cast(-0.014814814814814815L), + static_cast(0.0011574074074074074L), + static_cast(0.0003527336860670194L), + static_cast(-0.00017875514403292181L), + static_cast(0.39192631785224378e-4L), + static_cast(-0.21854485106799922e-5L), + static_cast(-0.185406221071516e-5L), + static_cast(0.8296711340953086e-6L), + static_cast(-0.17665952736826079e-6L), + static_cast(0.67078535434014986e-8L), + static_cast(0.10261809784240308e-7L), + static_cast(-0.43820360184533532e-8L), + static_cast(0.91476995822367902e-9L), + }; + workspace[0] = tools::evaluate_polynomial(C0, z); + + static const T C1[] = { + static_cast(-0.0018518518518518519L), + static_cast(-0.0034722222222222222L), + static_cast(0.0026455026455026455L), + static_cast(-0.00099022633744855967L), + static_cast(0.00020576131687242798L), + static_cast(-0.40187757201646091e-6L), + static_cast(-0.18098550334489978e-4L), + static_cast(0.76491609160811101e-5L), + static_cast(-0.16120900894563446e-5L), + static_cast(0.46471278028074343e-8L), + static_cast(0.1378633446915721e-6L), + static_cast(-0.5752545603517705e-7L), + static_cast(0.11951628599778147e-7L), + }; + workspace[1] = tools::evaluate_polynomial(C1, z); + + static const T C2[] = { + static_cast(0.0041335978835978836L), + static_cast(-0.0026813271604938272L), + static_cast(0.00077160493827160494L), + static_cast(0.20093878600823045e-5L), + static_cast(-0.00010736653226365161L), + static_cast(0.52923448829120125e-4L), + static_cast(-0.12760635188618728e-4L), + static_cast(0.34235787340961381e-7L), + static_cast(0.13721957309062933e-5L), + static_cast(-0.6298992138380055e-6L), + static_cast(0.14280614206064242e-6L), + }; + workspace[2] = tools::evaluate_polynomial(C2, z); + + static const T C3[] = { + static_cast(0.00064943415637860082L), + static_cast(0.00022947209362139918L), + static_cast(-0.00046918949439525571L), + static_cast(0.00026772063206283885L), + static_cast(-0.75618016718839764e-4L), + static_cast(-0.23965051138672967e-6L), + static_cast(0.11082654115347302e-4L), + static_cast(-0.56749528269915966e-5L), + static_cast(0.14230900732435884e-5L), + }; + workspace[3] = tools::evaluate_polynomial(C3, z); + + static const T C4[] = { + static_cast(-0.0008618882909167117L), + static_cast(0.00078403922172006663L), + static_cast(-0.00029907248030319018L), + static_cast(-0.14638452578843418e-5L), + static_cast(0.66414982154651222e-4L), + static_cast(-0.39683650471794347e-4L), + static_cast(0.11375726970678419e-4L), + }; + workspace[4] = tools::evaluate_polynomial(C4, z); + + static const T C5[] = { + static_cast(-0.00033679855336635815L), + static_cast(-0.69728137583658578e-4L), + static_cast(0.00027727532449593921L), + static_cast(-0.00019932570516188848L), + static_cast(0.67977804779372078e-4L), + static_cast(0.1419062920643967e-6L), + static_cast(-0.13594048189768693e-4L), + static_cast(0.80184702563342015e-5L), + static_cast(-0.22914811765080952e-5L), + }; + workspace[5] = tools::evaluate_polynomial(C5, z); + + static const T C6[] = { + static_cast(0.00053130793646399222L), + static_cast(-0.00059216643735369388L), + static_cast(0.00027087820967180448L), + static_cast(0.79023532326603279e-6L), + static_cast(-0.81539693675619688e-4L), + static_cast(0.56116827531062497e-4L), + static_cast(-0.18329116582843376e-4L), + }; + workspace[6] = tools::evaluate_polynomial(C6, z); + + static const T C7[] = { + static_cast(0.00034436760689237767L), + static_cast(0.51717909082605922e-4L), + static_cast(-0.00033493161081142236L), + static_cast(0.0002812695154763237L), + static_cast(-0.00010976582244684731L), + }; + workspace[7] = tools::evaluate_polynomial(C7, z); + + static const T C8[] = { + static_cast(-0.00065262391859530942L), + static_cast(0.00083949872067208728L), + static_cast(-0.00043829709854172101L), + }; + workspace[8] = tools::evaluate_polynomial(C8, z); + workspace[9] = static_cast(-0.00059676129019274625L); + + T result = tools::evaluate_polynomial<10, T, T>(workspace, 1/a); + result *= exp(-y) / sqrt(2 * constants::pi() * a); + if(x < a) + result = -result; + + result += boost::math::erfc(sqrt(y), pol) / 2; + + return result; +} + + + + +template +T igamma_temme_large(T a, T x, const Policy& pol, std::integral_constant const *) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T sigma = (x - a) / a; + T phi = -boost::math::log1pmx(sigma, pol); + T y = a * phi; + T z = sqrt(2 * phi); + if(x < a) + z = -z; + + T workspace[3]; + + static const T C0[] = { + static_cast(-0.333333333L), + static_cast(0.0833333333L), + static_cast(-0.0148148148L), + static_cast(0.00115740741L), + static_cast(0.000352733686L), + static_cast(-0.000178755144L), + static_cast(0.391926318e-4L), + }; + workspace[0] = tools::evaluate_polynomial(C0, z); + + static const T C1[] = { + static_cast(-0.00185185185L), + static_cast(-0.00347222222L), + static_cast(0.00264550265L), + static_cast(-0.000990226337L), + static_cast(0.000205761317L), + }; + workspace[1] = tools::evaluate_polynomial(C1, z); + + static const T C2[] = { + static_cast(0.00413359788L), + static_cast(-0.00268132716L), + static_cast(0.000771604938L), + }; + workspace[2] = tools::evaluate_polynomial(C2, z); + + T result = tools::evaluate_polynomial(workspace, 1/a); + result *= exp(-y) / sqrt(2 * constants::pi() * a); + if(x < a) + result = -result; + + result += boost::math::erfc(sqrt(y), pol) / 2; + + return result; +} + + + + + + + +template +T igamma_temme_large(T a, T x, const Policy& pol, std::integral_constant const *) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T sigma = (x - a) / a; + T phi = -boost::math::log1pmx(sigma, pol); + T y = a * phi; + T z = sqrt(2 * phi); + if(x < a) + z = -z; + + T workspace[14]; + + static const T C0[] = { + boost::math::tools::make_big_value( -0.333333333333333333333333333333333333, "-0.333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0833333333333333333333333333333333333, "0.0833333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0148148148148148148148148148148148148, "-0.0148148148148148148148148148148148148", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00115740740740740740740740740740740741, "0.00115740740740740740740740740740740741", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0003527336860670194003527336860670194, "0.0003527336860670194003527336860670194", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000178755144032921810699588477366255144, "-0.000178755144032921810699588477366255144", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.391926317852243778169704095630021556e-4, "0.391926317852243778169704095630021556e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.218544851067999216147364295512443661e-5, "-0.218544851067999216147364295512443661e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.185406221071515996070179883622956325e-5, "-0.185406221071515996070179883622956325e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.829671134095308600501624213166443227e-6, "0.829671134095308600501624213166443227e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.17665952736826079304360054245742403e-6, "-0.17665952736826079304360054245742403e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.670785354340149858036939710029613572e-8, "0.670785354340149858036939710029613572e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.102618097842403080425739573227252951e-7, "0.102618097842403080425739573227252951e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.438203601845335318655297462244719123e-8, "-0.438203601845335318655297462244719123e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.914769958223679023418248817633113681e-9, "0.914769958223679023418248817633113681e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.255141939949462497668779537993887013e-10, "-0.255141939949462497668779537993887013e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.583077213255042506746408945040035798e-10, "-0.583077213255042506746408945040035798e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.243619480206674162436940696707789943e-10, "0.243619480206674162436940696707789943e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.502766928011417558909054985925744366e-11, "-0.502766928011417558909054985925744366e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.110043920319561347708374174497293411e-12, "0.110043920319561347708374174497293411e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.337176326240098537882769884169200185e-12, "0.337176326240098537882769884169200185e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.13923887224181620659193661848957998e-12, "-0.13923887224181620659193661848957998e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.285348938070474432039669099052828299e-13, "0.285348938070474432039669099052828299e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.513911183424257261899064580300494205e-15, "-0.513911183424257261899064580300494205e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.197522882943494428353962401580710912e-14, "-0.197522882943494428353962401580710912e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.809952115670456133407115668702575255e-15, "0.809952115670456133407115668702575255e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.165225312163981618191514820265351162e-15, "-0.165225312163981618191514820265351162e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.253054300974788842327061090060267385e-17, "0.253054300974788842327061090060267385e-17", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.116869397385595765888230876507793475e-16, "0.116869397385595765888230876507793475e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.477003704982048475822167804084816597e-17, "-0.477003704982048475822167804084816597e-17", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.969912605905623712420709685898585354e-18, "0.969912605905623712420709685898585354e-18", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[0] = tools::evaluate_polynomial(C0, z); + + static const T C1[] = { + boost::math::tools::make_big_value( -0.00185185185185185185185185185185185185, "-0.00185185185185185185185185185185185185", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00347222222222222222222222222222222222, "-0.00347222222222222222222222222222222222", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0026455026455026455026455026455026455, "0.0026455026455026455026455026455026455", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000990226337448559670781893004115226337, "-0.000990226337448559670781893004115226337", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000205761316872427983539094650205761317, "0.000205761316872427983539094650205761317", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.401877572016460905349794238683127572e-6, "-0.401877572016460905349794238683127572e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.180985503344899778370285914867533523e-4, "-0.180985503344899778370285914867533523e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.76491609160811100846374214980916921e-5, "0.76491609160811100846374214980916921e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.16120900894563446003775221882217767e-5, "-0.16120900894563446003775221882217767e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.464712780280743434226135033938722401e-8, "0.464712780280743434226135033938722401e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137863344691572095931187533077488877e-6, "0.137863344691572095931187533077488877e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.575254560351770496402194531835048307e-7, "-0.575254560351770496402194531835048307e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119516285997781473243076536699698169e-7, "0.119516285997781473243076536699698169e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.175432417197476476237547551202312502e-10, "-0.175432417197476476237547551202312502e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.100915437106004126274577504686681675e-8, "-0.100915437106004126274577504686681675e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.416279299184258263623372347219858628e-9, "0.416279299184258263623372347219858628e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.856390702649298063807431562579670208e-10, "-0.856390702649298063807431562579670208e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.606721510160475861512701762169919581e-13, "0.606721510160475861512701762169919581e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.716249896481148539007961017165545733e-11, "0.716249896481148539007961017165545733e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.293318664377143711740636683615595403e-11, "-0.293318664377143711740636683615595403e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.599669636568368872330374527568788909e-12, "0.599669636568368872330374527568788909e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.216717865273233141017100472779701734e-15, "-0.216717865273233141017100472779701734e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.497833997236926164052815522048108548e-13, "-0.497833997236926164052815522048108548e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.202916288237134247736694804325894226e-13, "0.202916288237134247736694804325894226e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.413125571381061004935108332558187111e-14, "-0.413125571381061004935108332558187111e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.828651623988309644380188591057589316e-18, "0.828651623988309644380188591057589316e-18", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.341003088693333279336339355910600992e-15, "0.341003088693333279336339355910600992e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.138541953028939715357034547426313703e-15, "-0.138541953028939715357034547426313703e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.281234665322887466568860332727259483e-16, "0.281234665322887466568860332727259483e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[1] = tools::evaluate_polynomial(C1, z); + + static const T C2[] = { + boost::math::tools::make_big_value( 0.0041335978835978835978835978835978836, "0.0041335978835978835978835978835978836", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00268132716049382716049382716049382716, "-0.00268132716049382716049382716049382716", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000771604938271604938271604938271604938, "0.000771604938271604938271604938271604938", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.200938786008230452674897119341563786e-5, "0.200938786008230452674897119341563786e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000107366532263651605215391223621676297, "-0.000107366532263651605215391223621676297", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.529234488291201254164217127180090143e-4, "0.529234488291201254164217127180090143e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.127606351886187277133779191392360117e-4, "-0.127606351886187277133779191392360117e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.34235787340961380741902003904747389e-7, "0.34235787340961380741902003904747389e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137219573090629332055943852926020279e-5, "0.137219573090629332055943852926020279e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.629899213838005502290672234278391876e-6, "-0.629899213838005502290672234278391876e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.142806142060642417915846008822771748e-6, "0.142806142060642417915846008822771748e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.204770984219908660149195854409200226e-9, "-0.204770984219908660149195854409200226e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.140925299108675210532930244154315272e-7, "-0.140925299108675210532930244154315272e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.622897408492202203356394293530327112e-8, "0.622897408492202203356394293530327112e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.136704883966171134992724380284402402e-8, "-0.136704883966171134992724380284402402e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.942835615901467819547711211663208075e-12, "0.942835615901467819547711211663208075e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.128722524000893180595479368872770442e-9, "0.128722524000893180595479368872770442e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.556459561343633211465414765894951439e-10, "-0.556459561343633211465414765894951439e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119759355463669810035898150310311343e-10, "0.119759355463669810035898150310311343e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.416897822518386350403836626692480096e-14, "-0.416897822518386350403836626692480096e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.109406404278845944099299008640802908e-11, "-0.109406404278845944099299008640802908e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.4662239946390135746326204922464679e-12, "0.4662239946390135746326204922464679e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.990510576390690597844122258212382301e-13, "-0.990510576390690597844122258212382301e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.189318767683735145056885183170630169e-16, "0.189318767683735145056885183170630169e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.885922187259112726176031067028740667e-14, "0.885922187259112726176031067028740667e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.373782039804640545306560251777191937e-14, "-0.373782039804640545306560251777191937e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.786883363903515525774088394065960751e-15, "0.786883363903515525774088394065960751e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[2] = tools::evaluate_polynomial(C2, z); + + static const T C3[] = { + boost::math::tools::make_big_value( 0.000649434156378600823045267489711934156, "0.000649434156378600823045267489711934156", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000229472093621399176954732510288065844, "0.000229472093621399176954732510288065844", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000469189494395255712128140111679206329, "-0.000469189494395255712128140111679206329", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000267720632062838852962309752433209223, "0.000267720632062838852962309752433209223", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.756180167188397641072538191879755666e-4, "-0.756180167188397641072538191879755666e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.239650511386729665193314027333231723e-6, "-0.239650511386729665193314027333231723e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.110826541153473023614770299726861227e-4, "0.110826541153473023614770299726861227e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.567495282699159656749963105701560205e-5, "-0.567495282699159656749963105701560205e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.14230900732435883914551894470580433e-5, "0.14230900732435883914551894470580433e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.278610802915281422405802158211174452e-10, "-0.278610802915281422405802158211174452e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.16958404091930277289864168795820267e-6, "-0.16958404091930277289864168795820267e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.809946490538808236335278504852724081e-7, "0.809946490538808236335278504852724081e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.191111684859736540606728140872727635e-7, "-0.191111684859736540606728140872727635e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.239286204398081179686413514022282056e-11, "0.239286204398081179686413514022282056e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.206201318154887984369925818486654549e-8, "0.206201318154887984369925818486654549e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.946049666185513217375417988510192814e-9, "-0.946049666185513217375417988510192814e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.215410497757749078380130268468744512e-9, "0.215410497757749078380130268468744512e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.138882333681390304603424682490735291e-13, "-0.138882333681390304603424682490735291e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.218947616819639394064123400466489455e-10, "-0.218947616819639394064123400466489455e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.979099895117168512568262802255883368e-11, "0.979099895117168512568262802255883368e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.217821918801809621153859472011393244e-11, "-0.217821918801809621153859472011393244e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.62088195734079014258166361684972205e-16, "0.62088195734079014258166361684972205e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.212697836327973697696702537114614471e-12, "0.212697836327973697696702537114614471e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.934468879151743333127396765626749473e-13, "-0.934468879151743333127396765626749473e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.204536712267828493249215913063207436e-13, "0.204536712267828493249215913063207436e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[3] = tools::evaluate_polynomial(C3, z); + + static const T C4[] = { + boost::math::tools::make_big_value( -0.000861888290916711698604702719929057378, "-0.000861888290916711698604702719929057378", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00078403922172006662747403488144228885, "0.00078403922172006662747403488144228885", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000299072480303190179733389609932819809, "-0.000299072480303190179733389609932819809", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.146384525788434181781232535690697556e-5, "-0.146384525788434181781232535690697556e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.664149821546512218665853782451862013e-4, "0.664149821546512218665853782451862013e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.396836504717943466443123507595386882e-4, "-0.396836504717943466443123507595386882e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113757269706784190980552042885831759e-4, "0.113757269706784190980552042885831759e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.250749722623753280165221942390057007e-9, "0.250749722623753280165221942390057007e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.169541495365583060147164356781525752e-5, "-0.169541495365583060147164356781525752e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.890750753220530968882898422505515924e-6, "0.890750753220530968882898422505515924e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.229293483400080487057216364891158518e-6, "-0.229293483400080487057216364891158518e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.295679413754404904696572852500004588e-10, "0.295679413754404904696572852500004588e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.288658297427087836297341274604184504e-7, "0.288658297427087836297341274604184504e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.141897394378032193894774303903982717e-7, "-0.141897394378032193894774303903982717e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.344635804994648970659527720474194356e-8, "0.344635804994648970659527720474194356e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.230245171745280671320192735850147087e-12, "-0.230245171745280671320192735850147087e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.394092330280464052750697640085291799e-9, "-0.394092330280464052750697640085291799e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.186023389685045019134258533045185639e-9, "0.186023389685045019134258533045185639e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.435632300505661804380678327446262424e-10, "-0.435632300505661804380678327446262424e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.127860010162962312660550463349930726e-14, "0.127860010162962312660550463349930726e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.467927502665791946200382739991760062e-11, "0.467927502665791946200382739991760062e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.214924647061348285410535341910721086e-11, "-0.214924647061348285410535341910721086e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.490881561480965216323649688463984082e-12, "0.490881561480965216323649688463984082e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[4] = tools::evaluate_polynomial(C4, z); + + static const T C5[] = { + boost::math::tools::make_big_value( -0.000336798553366358150308767592718210002, "-0.000336798553366358150308767592718210002", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.697281375836585777429398828575783308e-4, "-0.697281375836585777429398828575783308e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00027727532449593920787336425196507501, "0.00027727532449593920787336425196507501", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000199325705161888477003360405280844238, "-0.000199325705161888477003360405280844238", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.679778047793720783881640176604435742e-4, "0.679778047793720783881640176604435742e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.141906292064396701483392727105575757e-6, "0.141906292064396701483392727105575757e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.135940481897686932784583938837504469e-4, "-0.135940481897686932784583938837504469e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.80184702563342015397192571980419684e-5, "0.80184702563342015397192571980419684e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.229148117650809517038048790128781806e-5, "-0.229148117650809517038048790128781806e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.325247355129845395166230137750005047e-9, "-0.325247355129845395166230137750005047e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.346528464910852649559195496827579815e-6, "0.346528464910852649559195496827579815e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.184471871911713432765322367374920978e-6, "-0.184471871911713432765322367374920978e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.482409670378941807563762631738989002e-7, "0.482409670378941807563762631738989002e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.179894667217435153025754291716644314e-13, "-0.179894667217435153025754291716644314e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.630619450001352343517516981425944698e-8, "-0.630619450001352343517516981425944698e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.316241762877456793773762181540969623e-8, "0.316241762877456793773762181540969623e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.784092425369742929000839303523267545e-9, "-0.784092425369742929000839303523267545e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[5] = tools::evaluate_polynomial(C5, z); + + static const T C6[] = { + boost::math::tools::make_big_value( 0.00053130793646399222316574854297762391, "0.00053130793646399222316574854297762391", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000592166437353693882864836225604401187, "-0.000592166437353693882864836225604401187", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000270878209671804482771279183488328692, "0.000270878209671804482771279183488328692", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.790235323266032787212032944390816666e-6, "0.790235323266032787212032944390816666e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.815396936756196875092890088464682624e-4, "-0.815396936756196875092890088464682624e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.561168275310624965003775619041471695e-4, "0.561168275310624965003775619041471695e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.183291165828433755673259749374098313e-4, "-0.183291165828433755673259749374098313e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.307961345060330478256414192546677006e-8, "-0.307961345060330478256414192546677006e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.346515536880360908673728529745376913e-5, "0.346515536880360908673728529745376913e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.202913273960586037269527254582695285e-5, "-0.202913273960586037269527254582695285e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.578879286314900370889997586203187687e-6, "0.578879286314900370889997586203187687e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.233863067382665698933480579231637609e-12, "0.233863067382665698933480579231637609e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.88286007463304835250508524317926246e-7, "-0.88286007463304835250508524317926246e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.474359588804081278032150770595852426e-7, "0.474359588804081278032150770595852426e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.125454150207103824457130611214783073e-7, "-0.125454150207103824457130611214783073e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[6] = tools::evaluate_polynomial(C6, z); + + static const T C7[] = { + boost::math::tools::make_big_value( 0.000344367606892377671254279625108523655, "0.000344367606892377671254279625108523655", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.517179090826059219337057843002058823e-4, "0.517179090826059219337057843002058823e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000334931610811422363116635090580012327, "-0.000334931610811422363116635090580012327", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000281269515476323702273722110707777978, "0.000281269515476323702273722110707777978", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000109765822446847310235396824500789005, "-0.000109765822446847310235396824500789005", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.127410090954844853794579954588107623e-6, "-0.127410090954844853794579954588107623e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.277444515115636441570715073933712622e-4, "0.277444515115636441570715073933712622e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.182634888057113326614324442681892723e-4, "-0.182634888057113326614324442681892723e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.578769494973505239894178121070843383e-5, "0.578769494973505239894178121070843383e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.493875893393627039981813418398565502e-9, "0.493875893393627039981813418398565502e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.105953670140260427338098566209633945e-5, "-0.105953670140260427338098566209633945e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.616671437611040747858836254004890765e-6, "0.616671437611040747858836254004890765e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.175629733590604619378669693914265388e-6, "-0.175629733590604619378669693914265388e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[7] = tools::evaluate_polynomial(C7, z); + + static const T C8[] = { + boost::math::tools::make_big_value( -0.000652623918595309418922034919726622692, "-0.000652623918595309418922034919726622692", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000839498720672087279993357516764983445, "0.000839498720672087279993357516764983445", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000438297098541721005061087953050560377, "-0.000438297098541721005061087953050560377", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.696909145842055197136911097362072702e-6, "-0.696909145842055197136911097362072702e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00016644846642067547837384572662326101, "0.00016644846642067547837384572662326101", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000127835176797692185853344001461664247, "-0.000127835176797692185853344001461664247", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.462995326369130429061361032704489636e-4, "0.462995326369130429061361032704489636e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.455790986792270771162749294232219616e-8, "0.455790986792270771162749294232219616e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.105952711258051954718238500312872328e-4, "-0.105952711258051954718238500312872328e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.678334290486516662273073740749269432e-5, "0.678334290486516662273073740749269432e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.210754766662588042469972680229376445e-5, "-0.210754766662588042469972680229376445e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[8] = tools::evaluate_polynomial(C8, z); + + static const T C9[] = { + boost::math::tools::make_big_value( -0.000596761290192746250124390067179459605, "-0.000596761290192746250124390067179459605", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.720489541602001055908571930225015052e-4, "-0.720489541602001055908571930225015052e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000678230883766732836161951166000673426, "0.000678230883766732836161951166000673426", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000640147526026275845100045652582354779, "-0.000640147526026275845100045652582354779", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000277501076343287044992374518205845463, "0.000277501076343287044992374518205845463", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.181970083804651510461686554030325202e-6, "0.181970083804651510461686554030325202e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.847950711706850318239732559632810086e-4, "-0.847950711706850318239732559632810086e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.610519208250153101764709122740859458e-4, "0.610519208250153101764709122740859458e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.210739201834048624082975255893773306e-4, "-0.210739201834048624082975255893773306e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[9] = tools::evaluate_polynomial(C9, z); + + static const T C10[] = { + boost::math::tools::make_big_value( 0.00133244544948006563712694993432717968, "0.00133244544948006563712694993432717968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00191443849856547752650089885832852254, "-0.00191443849856547752650089885832852254", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0011089369134596637339607446329267522, "0.0011089369134596637339607446329267522", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.993240412264229896742295262075817566e-6, "0.993240412264229896742295262075817566e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000508745012930931989848393025305956774, "-0.000508745012930931989848393025305956774", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00042735056665392884328432271160040444, "0.00042735056665392884328432271160040444", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000168588537679107988033552814662382059, "-0.000168588537679107988033552814662382059", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[10] = tools::evaluate_polynomial(C10, z); + + static const T C11[] = { + boost::math::tools::make_big_value( 0.00157972766073083495908785631307733022, "0.00157972766073083495908785631307733022", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000162516262783915816898635123980270998, "0.000162516262783915816898635123980270998", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00206334210355432762645284467690276817, "-0.00206334210355432762645284467690276817", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00213896861856890981541061922797693947, "0.00213896861856890981541061922797693947", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00101085593912630031708085801712479376, "-0.00101085593912630031708085801712479376", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[11] = tools::evaluate_polynomial(C11, z); + + static const T C12[] = { + boost::math::tools::make_big_value( -0.00407251211951401664727281097914544601, "-0.00407251211951401664727281097914544601", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00640336283380806979482363809026579583, "0.00640336283380806979482363809026579583", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00404101610816766177473974858518094879, "-0.00404101610816766177473974858518094879", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + workspace[12] = tools::evaluate_polynomial(C12, z); + workspace[13] = -0.0059475779383993002845382844736066323L; + + T result = tools::evaluate_polynomial(workspace, T(1/a)); + result *= exp(-y) / sqrt(2 * constants::pi() * a); + if(x < a) + result = -result; + + result += boost::math::erfc(sqrt(y), pol) / 2; + + return result; +} + +} +} +} +# 34 "../../../../boost/math/special_functions/gamma.hpp" 2 + +# 1 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" 1 +# 25 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" +namespace boost{ namespace math{ namespace detail{ + + + + +template +T gamma_imp(T z, const Policy& pol, const Lanczos& l); +template +T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l); + + + + +template +T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& , const Lanczos&) +{ + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result = 0; + if(z < tools::epsilon()) + { + result = -log(z); + } + else if((zm1 == 0) || (zm2 == 0)) + { + + } + else if(z > 2) + { + + + + + if(z >= 3) + { + do + { + z -= 1; + zm2 -= 1; + result += log(z); + }while(z >= 3); + + zm2 = z - 2; + } +# 90 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const T P[] = { + static_cast(boost::math::tools::make_big_value( -0.180355685678449379109e-1, "-0.180355685678449379109e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.25126649619989678683e-1, "0.25126649619989678683e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.494103151567532234274e-1, "0.494103151567532234274e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.172491608709613993966e-1, "0.172491608709613993966e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.259453563205438108893e-3, "-0.259453563205438108893e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.541009869215204396339e-3, "-0.541009869215204396339e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.324588649825948492091e-4, "-0.324588649825948492091e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T Q[] = { + static_cast(boost::math::tools::make_big_value( 0.1e1, "0.1e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.196202987197795200688e1, "0.196202987197795200688e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.148019669424231326694e1, "0.148019669424231326694e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.541391432071720958364e0, "0.541391432071720958364e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.988504251128010129477e-1, "0.988504251128010129477e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.82130967464889339326e-2, "0.82130967464889339326e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.224936291922115757597e-3, "0.224936291922115757597e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.223352763208617092964e-6, "-0.223352763208617092964e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + + static const float Y = 0.158963680267333984375e0f; + + T r = zm2 * (z + 1); + T R = tools::evaluate_polynomial(P, zm2); + R /= tools::evaluate_polynomial(Q, zm2); + + result += r * Y + r * R; + } + else + { + + + + + if(z < 1) + { + result += -log(z); + zm2 = zm1; + zm1 = z; + z += 1; + } + + + + + if(z <= 1.5) + { +# 155 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const float Y = 0.52815341949462890625f; + + static const T P[] = { + static_cast(boost::math::tools::make_big_value( 0.490622454069039543534e-1, "0.490622454069039543534e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.969117530159521214579e-1, "-0.969117530159521214579e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.414983358359495381969e0, "-0.414983358359495381969e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.406567124211938417342e0, "-0.406567124211938417342e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.158413586390692192217e0, "-0.158413586390692192217e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.240149820648571559892e-1, "-0.240149820648571559892e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.100346687696279557415e-2, "-0.100346687696279557415e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T Q[] = { + static_cast(boost::math::tools::make_big_value( 0.1e1, "0.1e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.302349829846463038743e1, "0.302349829846463038743e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.348739585360723852576e1, "0.348739585360723852576e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.191415588274426679201e1, "0.191415588274426679201e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.507137738614363510846e0, "0.507137738614363510846e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.577039722690451849648e-1, "0.577039722690451849648e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.195768102601107189171e-2, "0.195768102601107189171e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + + T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1); + T prefix = zm1 * zm2; + + result += prefix * Y + prefix * r; + } + else + { +# 200 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const float Y = 0.452017307281494140625f; + + static const T P[] = { + static_cast(boost::math::tools::make_big_value( -0.292329721830270012337e-1, "-0.292329721830270012337e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.144216267757192309184e0, "0.144216267757192309184e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.142440390738631274135e0, "-0.142440390738631274135e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.542809694055053558157e-1, "0.542809694055053558157e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.850535976868336437746e-2, "-0.850535976868336437746e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.431171342679297331241e-3, "0.431171342679297331241e-3", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + static const T Q[] = { + static_cast(boost::math::tools::make_big_value( 0.1e1, "0.1e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.150169356054485044494e1, "-0.150169356054485044494e1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.846973248876495016101e0, "0.846973248876495016101e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.220095151814995745555e0, "-0.220095151814995745555e0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( 0.25582797155975869989e-1, "0.25582797155975869989e-1", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.100666795539143372762e-2, "-0.100666795539143372762e-2", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), + static_cast(boost::math::tools::make_big_value( -0.827193521891290553639e-6, "-0.827193521891290553639e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())) + }; + T r = zm2 * zm1; + T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2)); + + result += r * Y + r * R; + } + } + return result; +} +template +T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& , const Lanczos&) +{ + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result = 0; + if(z < tools::epsilon()) + { + result = -log(z); + ; + } + else if((zm1 == 0) || (zm2 == 0)) + { + + } + else if(z > 2) + { + + + + + if(z >= 3) + { + do + { + z -= 1; + result += log(z); + }while(z >= 3); + zm2 = z - 2; + } + ; + ; + ; +# 277 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const T P[] = { + boost::math::tools::make_big_value( -0.018035568567844937910504030027467476655, "-0.018035568567844937910504030027467476655", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.013841458273109517271750705401202404195, "0.013841458273109517271750705401202404195", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.062031842739486600078866923383017722399, "0.062031842739486600078866923383017722399", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.052518418329052161202007865149435256093, "0.052518418329052161202007865149435256093", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.01881718142472784129191838493267755758, "0.01881718142472784129191838493267755758", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0025104830367021839316463675028524702846, "0.0025104830367021839316463675028524702846", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00021043176101831873281848891452678568311, "-0.00021043176101831873281848891452678568311", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00010249622350908722793327719494037981166, "-0.00010249622350908722793327719494037981166", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.11381479670982006841716879074288176994e-4, "-0.11381479670982006841716879074288176994e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.49999811718089980992888533630523892389e-6, "-0.49999811718089980992888533630523892389e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.70529798686542184668416911331718963364e-8, "-0.70529798686542184668416911331718963364e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.5877485070422317542808137697939233685, "2.5877485070422317542808137697939233685", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.8797959228352591788629602533153837126, "2.8797959228352591788629602533153837126", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.8030885955284082026405495275461180977, "1.8030885955284082026405495275461180977", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.69774331297747390169238306148355428436, "0.69774331297747390169238306148355428436", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.17261566063277623942044077039756583802, "0.17261566063277623942044077039756583802", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.02729301254544230229429621192443000121, "0.02729301254544230229429621192443000121", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0026776425891195270663133581960016620433, "0.0026776425891195270663133581960016620433", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00015244249160486584591370355730402168106, "0.00015244249160486584591370355730402168106", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.43997034032479866020546814475414346627e-5, "0.43997034032479866020546814475414346627e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.46295080708455613044541885534408170934e-7, "0.46295080708455613044541885534408170934e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.93326638207459533682980757982834180952e-11, "-0.93326638207459533682980757982834180952e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.42316456553164995177177407325292867513e-13, "0.42316456553164995177177407325292867513e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T R = tools::evaluate_polynomial(P, zm2); + R /= tools::evaluate_polynomial(Q, zm2); + + static const float Y = 0.158963680267333984375F; + + T r = zm2 * (z + 1); + + result += r * Y + r * R; + ; + } + else + { + + + + + if(z < 1) + { + result += -log(z); + zm2 = zm1; + zm1 = z; + z += 1; + } + ; + ; + ; + + + + if(z <= 1.35) + { +# 353 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const float Y = 0.54076099395751953125f; + + static const T P[] = { + boost::math::tools::make_big_value( 0.036454670944013329356512090082402429697, "0.036454670944013329356512090082402429697", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.066235835556476033710068679907798799959, "-0.066235835556476033710068679907798799959", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.67492399795577182387312206593595565371, "-0.67492399795577182387312206593595565371", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.4345555263962411429855341651960000166, "-1.4345555263962411429855341651960000166", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.4894319559821365820516771951249649563, "-1.4894319559821365820516771951249649563", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.87210277668067964629483299712322411566, "-0.87210277668067964629483299712322411566", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.29602090537771744401524080430529369136, "-0.29602090537771744401524080430529369136", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0561832587517836908929331992218879676, "-0.0561832587517836908929331992218879676", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0053236785487328044334381502530383140443, "-0.0053236785487328044334381502530383140443", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00018629360291358130461736386077971890789, "-0.00018629360291358130461736386077971890789", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.10164985672213178500790406939467614498e-6, "-0.10164985672213178500790406939467614498e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.13680157145361387405588201461036338274e-8, "0.13680157145361387405588201461036338274e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.9106336261005990534095838574132225599, "4.9106336261005990534095838574132225599", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 10.258804800866438510889341082793078432, "10.258804800866438510889341082793078432", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 11.88588976846826108836629960537466889, "11.88588976846826108836629960537466889", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.3455000546999704314454891036700998428, "8.3455000546999704314454891036700998428", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.6428823682421746343233362007194282703, "3.6428823682421746343233362007194282703", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.97465989807254572142266753052776132252, "0.97465989807254572142266753052776132252", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.15121052897097822172763084966793352524, "0.15121052897097822172763084966793352524", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.012017363555383555123769849654484594893, "0.012017363555383555123769849654484594893", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0003583032812720649835431669893011257277, "0.0003583032812720649835431669893011257277", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1); + T prefix = zm1 * zm2; + + result += prefix * Y + prefix * r; + ; + } + else if(z <= 1.625) + { +# 406 "../../../../boost/math/special_functions/detail/lgamma_small.hpp" + static const float Y = 0.483787059783935546875f; + + static const T P[] = { + boost::math::tools::make_big_value( -0.017977422421608624353488126610933005432, "-0.017977422421608624353488126610933005432", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.18484528905298309555089509029244135703, "0.18484528905298309555089509029244135703", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.40401251514859546989565001431430884082, "-0.40401251514859546989565001431430884082", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.40277179799147356461954182877921388182, "0.40277179799147356461954182877921388182", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.21993421441282936476709677700477598816, "-0.21993421441282936476709677700477598816", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.069595742223850248095697771331107571011, "0.069595742223850248095697771331107571011", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.012681481427699686635516772923547347328, "-0.012681481427699686635516772923547347328", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0012489322866834830413292771335113136034, "0.0012489322866834830413292771335113136034", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.57058739515423112045108068834668269608e-4, "-0.57058739515423112045108068834668269608e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.8207548771933585614380644961342925976e-6, "0.8207548771933585614380644961342925976e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.9629552288944259229543137757200262073, "-2.9629552288944259229543137757200262073", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.7118380799042118987185957298964772755, "3.7118380799042118987185957298964772755", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.5569815272165399297600586376727357187, "-2.5569815272165399297600586376727357187", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.0546764918220835097855665680632153367, "1.0546764918220835097855665680632153367", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.26574021300894401276478730940980810831, "-0.26574021300894401276478730940980810831", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.03996289731752081380552901986471233462, "0.03996289731752081380552901986471233462", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0033398680924544836817826046380586480873, "-0.0033398680924544836817826046380586480873", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00013288854760548251757651556792598235735, "0.00013288854760548251757651556792598235735", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.17194794958274081373243161848194745111e-5, "-0.17194794958274081373243161848194745111e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T r = zm2 * zm1; + T R = tools::evaluate_polynomial(P, T(0.625 - zm1)) / tools::evaluate_polynomial(Q, T(0.625 - zm1)); + + result += r * Y + r * R; + ; + } + else + { + + + + + + + + static const float Y = 0.443811893463134765625f; + + static const T P[] = { + boost::math::tools::make_big_value( -0.021027558364667626231512090082402429494, "-0.021027558364667626231512090082402429494", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.15128811104498736604523586803722368377, "0.15128811104498736604523586803722368377", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.26249631480066246699388544451126410278, "-0.26249631480066246699388544451126410278", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.21148748610533489823742352180628489742, "0.21148748610533489823742352180628489742", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.093964130697489071999873506148104370633, "-0.093964130697489071999873506148104370633", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.024292059227009051652542804957550866827, "0.024292059227009051652542804957550866827", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0036284453226534839926304745756906117066, "-0.0036284453226534839926304745756906117066", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0002939230129315195346843036254392485984, "0.0002939230129315195346843036254392485984", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.11088589183158123733132268042570710338e-4, "-0.11088589183158123733132268042570710338e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.13240510580220763969511741896361984162e-6, "0.13240510580220763969511741896361984162e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.4240003754444040525462170802796471996, "-2.4240003754444040525462170802796471996", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.4868383476933178722203278602342786002, "2.4868383476933178722203278602342786002", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.4047068395206343375520721509193698547, "-1.4047068395206343375520721509193698547", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.47583809087867443858344765659065773369, "0.47583809087867443858344765659065773369", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.09865724264554556400463655444270700132, "-0.09865724264554556400463655444270700132", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.012238223514176587501074150988445109735, "0.012238223514176587501074150988445109735", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00084625068418239194670614419707491797097, "-0.00084625068418239194670614419707491797097", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.2796574430456237061420839429225710602e-4, "0.2796574430456237061420839429225710602e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.30202973883316730694433702165188835331e-6, "-0.30202973883316730694433702165188835331e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + + T r = zm2 * zm1; + T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2)); + + result += r * Y + r * R; + ; + } + } + ; + return result; +} +template +T lgamma_small_imp(T z, T zm1, T zm2, const std::integral_constant&, const Policy& pol, const Lanczos& l) +{ + + + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result = 0; + if(z < tools::epsilon()) + { + result = -log(z); + } + else if(z < 0.5) + { + + result = log(gamma_imp(z, pol, Lanczos())); + } + else if(z >= 3) + { + + result = log(gamma_imp(z, pol, Lanczos())); + } + else if(z >= 1.5) + { + + T dz = zm2; + result = dz * log((z + lanczos_g_near_1_and_2(l) - T(0.5)) / boost::math::constants::e()); + result += boost::math::log1p(dz / (lanczos_g_near_1_and_2(l) + T(1.5)), pol) * T(1.5); + result += boost::math::log1p(Lanczos::lanczos_sum_near_2(dz), pol); + } + else + { + + T dz = zm1; + result = dz * log((z + lanczos_g_near_1_and_2(l) - T(0.5)) / boost::math::constants::e()); + result += boost::math::log1p(dz / (lanczos_g_near_1_and_2(l) + T(0.5)), pol) / 2; + result += boost::math::log1p(Lanczos::lanczos_sum_near_1(dz), pol); + } + return result; +} + +}}} +# 36 "../../../../boost/math/special_functions/gamma.hpp" 2 + +# 1 "../../../../boost/math/special_functions/polygamma.hpp" 1 +# 14 "../../../../boost/math/special_functions/polygamma.hpp" +# 1 "../../../../boost/math/special_functions/factorials.hpp" 1 +# 19 "../../../../boost/math/special_functions/factorials.hpp" +# 1 "../../../../boost/math/special_functions/gamma.hpp" 1 +# 20 "../../../../boost/math/special_functions/factorials.hpp" 2 + + +namespace boost { namespace math +{ + +export template +inline T factorial(unsigned i, const Policy& pol) +{ + static_assert(!std::is_integral::value, "Type T must not be an integral type"); + + + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if(i <= max_factorial::value) + return unchecked_factorial(i); + T result = boost::math::tgamma(static_cast(i+1), pol); + if(result > tools::max_value()) + return result; + return floor(result + 0.5f); +} + +export template +inline T factorial(unsigned i) +{ + return factorial(i, policies::policy<>()); +} +# 69 "../../../../boost/math/special_functions/factorials.hpp" +export template +T double_factorial(unsigned i, const Policy& pol) +{ + static_assert(!std::is_integral::value, "Type T must not be an integral type"); + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if(i & 1) + { + + if(i < max_factorial::value) + { + unsigned n = (i - 1) / 2; + return ceil(unchecked_factorial(i) / (ldexp(T(1), (int)n) * unchecked_factorial(n)) - 0.5f); + } + + + + + T result = boost::math::tgamma(static_cast(i) / 2 + 1, pol) / sqrt(constants::pi()); + if(ldexp(tools::max_value(), -static_cast(i+1) / 2) > result) + return ceil(result * ldexp(T(1), static_cast(i+1) / 2) - 0.5f); + } + else + { + + unsigned n = i / 2; + T result = factorial(n, pol); + if(ldexp(tools::max_value(), -(int)n) > result) + return result * ldexp(T(1), (int)n); + } + + + + return policies::raise_overflow_error("boost::math::double_factorial<%1%>(unsigned)", 0, pol); +} + +export template +inline T double_factorial(unsigned i) +{ + return double_factorial(i, policies::policy<>()); +} + +namespace detail{ + +template +T rising_factorial_imp(T x, int n, const Policy& pol) +{ + static_assert(!std::is_integral::value, "Type T must not be an integral type"); + if(x < 0) + { +# 126 "../../../../boost/math/special_functions/factorials.hpp" + bool inv = false; + if(n < 0) + { + x += n; + n = -n; + inv = true; + } + T result = ((n&1) ? -1 : 1) * falling_factorial(-x, n, pol); + if(inv) + result = 1 / result; + return result; + } + if(n == 0) + return 1; + if(x == 0) + { + if(n < 0) + return -boost::math::tgamma_delta_ratio(x + 1, static_cast(-n), pol); + else + return 0; + } + if((x < 1) && (x + n < 0)) + { + T val = boost::math::tgamma_delta_ratio(1 - x, static_cast(-n), pol); + return (n & 1) ? T(-val) : val; + } + + + + + + return 1 / boost::math::tgamma_delta_ratio(x, static_cast(n), pol); +} + +template +inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) +{ + static_assert(!std::is_integral::value, "Type T must not be an integral type"); + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if(x == 0) + return 0; + if(x < 0) + { + + + + + return (n&1 ? -1 : 1) * rising_factorial(-x, n, pol); + } + if(n == 0) + return 1; + if(x < 0.5f) + { + + + + if(n > max_factorial::value - 2) + { + + + T t1 = x * boost::math::falling_factorial(x - 1, max_factorial::value - 2, pol); + T t2 = boost::math::falling_factorial(x - max_factorial::value + 1, n - max_factorial::value + 1, pol); + if(tools::max_value() / fabs(t1) < fabs(t2)) + return boost::math::sign(t1) * boost::math::sign(t2) * policies::raise_overflow_error("boost::math::falling_factorial<%1%>", 0, pol); + return t1 * t2; + } + return x * boost::math::falling_factorial(x - 1, n - 1, pol); + } + if(x <= n - 1) + { + + + + + T xp1 = x + 1; + unsigned n2 = itrunc((T)floor(xp1), pol); + if(n2 == xp1) + return 0; + T result = boost::math::tgamma_delta_ratio(xp1, -static_cast(n2), pol); + x -= n2; + result *= x; + ++n2; + if(n2 < n) + result *= falling_factorial(x - 1, n - n2, pol); + return result; + } + + + + + + + + return boost::math::tgamma_delta_ratio(x + 1, -static_cast(n), pol); +} + +} + +export template +inline typename tools::promote_args::type + falling_factorial(RT x, unsigned n) +{ + typedef typename tools::promote_args::type result_type; + return detail::falling_factorial_imp( + static_cast(x), n, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + falling_factorial(RT x, unsigned n, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::falling_factorial_imp( + static_cast(x), n, pol); +} + +export template +inline typename tools::promote_args::type + rising_factorial(RT x, int n) +{ + typedef typename tools::promote_args::type result_type; + return detail::rising_factorial_imp( + static_cast(x), n, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + rising_factorial(RT x, int n, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::rising_factorial_imp( + static_cast(x), n, pol); +} + +} +} +# 15 "../../../../boost/math/special_functions/polygamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/detail/polygamma.hpp" 1 +# 24 "../../../../boost/math/special_functions/detail/polygamma.hpp" +# 1 "../../../../boost/math/special_functions/zeta.hpp" 1 +# 22 "../../../../boost/math/special_functions/zeta.hpp" +# 1 "../../../../boost/math/special_functions/sin_pi.hpp" 1 +# 23 "../../../../boost/math/special_functions/sin_pi.hpp" +namespace boost{ namespace math{ namespace detail{ + +template +inline T sin_pi_imp(T x, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if(x < 0) + return -sin_pi_imp(T(-x), pol); + + bool invert; + if(x < 0.5) + return sin(constants::pi() * x); + if(x < 1) + { + invert = true; + x = -x; + } + else + invert = false; + + T rem = floor(x); + if(abs(floor(rem/2)*2 - rem) > std::numeric_limits::epsilon()) + { + invert = !invert; + } + rem = x - rem; + if(rem > 0.5f) + rem = 1 - rem; + if(rem == 0.5f) + return static_cast(invert ? -1 : 1); + + rem = sin(constants::pi() * rem); + return invert ? T(-rem) : rem; +} + +} + +export template +inline typename tools::promote_args::type sin_pi(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<>, + + + policies::overflow_error >::type forwarding_policy; + return policies::checked_narrowing_cast(boost::math::detail::sin_pi_imp(x, forwarding_policy()), "sin_pi"); +} + +export template +inline typename tools::promote_args::type sin_pi(T x) +{ + return boost::math::sin_pi(x, policies::policy<>()); +} + +} +} +# 23 "../../../../boost/math/special_functions/zeta.hpp" 2 +# 34 "../../../../boost/math/special_functions/zeta.hpp" +namespace boost{ namespace math{ namespace detail{ +# 145 "../../../../boost/math/special_functions/zeta.hpp" +template +T zeta_polynomial_series(T s, T sc, Policy const &) +{ + + + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + int n = itrunc(T(log(boost::math::tools::epsilon()) / -2)); + 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 * (-powm1(T(2), sc))); +} + +template +T zeta_imp_prec(T s, T sc, const Policy& pol, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result; + if(s >= policies::digits()) + return 1; + result = zeta_polynomial_series(s, sc, pol); +# 200 "../../../../boost/math/special_functions/zeta.hpp" + return result; +} + +template +inline T zeta_imp_prec(T s, T sc, const Policy&, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result; + if(s < 1) + { + + + + + static const T P[6] = { + static_cast(0.24339294433593750202L), + static_cast(-0.49092470516353571651L), + static_cast(0.0557616214776046784287L), + static_cast(-0.00320912498879085894856L), + static_cast(0.000451534528645796438704L), + static_cast(-0.933241270357061460782e-5L), + }; + static const T Q[6] = { + static_cast(1L), + static_cast(-0.279960334310344432495L), + static_cast(0.0419676223309986037706L), + static_cast(-0.00413421406552171059003L), + static_cast(0.00024978985622317935355L), + static_cast(-0.101855788418564031874e-4L), + }; + result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); + result -= 1.2433929443359375F; + result += (sc); + result /= (sc); + } + else if(s <= 2) + { + + + static const T P[6] = { + static_cast(0.577215664901532860516L), + static_cast(0.243210646940107164097L), + static_cast(0.0417364673988216497593L), + static_cast(0.00390252087072843288378L), + static_cast(0.000249606367151877175456L), + static_cast(0.110108440976732897969e-4L), + }; + static const T Q[6] = { + static_cast(1.0), + static_cast(0.295201277126631761737L), + static_cast(0.043460910607305495864L), + static_cast(0.00434930582085826330659L), + static_cast(0.000255784226140488490982L), + static_cast(0.10991819782396112081e-4L), + }; + result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc)); + result += 1 / (-sc); + } + else if(s <= 4) + { + + + static const float Y = 0.6986598968505859375; + static const T P[6] = { + static_cast(-0.0537258300023595030676L), + static_cast(0.0445163473292365591906L), + static_cast(0.0128677673534519952905L), + static_cast(0.00097541770457391752726L), + static_cast(0.769875101573654070925e-4L), + static_cast(0.328032510000383084155e-5L), + }; + static const T Q[7] = { + 1.0f, + static_cast(0.33383194553034051422L), + static_cast(0.0487798431291407621462L), + static_cast(0.00479039708573558490716L), + static_cast(0.000270776703956336357707L), + static_cast(0.106951867532057341359e-4L), + static_cast(0.236276623974978646399e-7L), + }; + result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2)); + result += Y + 1 / (-sc); + } + else if(s <= 7) + { + + + + + static const T P[6] = { + static_cast(-2.49710190602259410021L), + static_cast(-2.60013301809475665334L), + static_cast(-0.939260435377109939261L), + static_cast(-0.138448617995741530935L), + static_cast(-0.00701721240549802377623L), + static_cast(-0.229257310594893932383e-4L), + }; + static const T Q[9] = { + 1.0f, + static_cast(0.706039025937745133628L), + static_cast(0.15739599649558626358L), + static_cast(0.0106117950976845084417L), + static_cast(-0.36910273311764618902e-4L), + static_cast(0.493409563927590008943e-5L), + static_cast(-0.234055487025287216506e-6L), + static_cast(0.718833729365459760664e-8L), + static_cast(-0.1129200113474947419e-9L), + }; + result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4)); + result = 1 + exp(result); + } + else if(s < 15) + { + + + + static const T P[7] = { + static_cast(-4.78558028495135619286L), + static_cast(-1.89197364881972536382L), + static_cast(-0.211407134874412820099L), + static_cast(-0.000189204758260076688518L), + static_cast(0.00115140923889178742086L), + static_cast(0.639949204213164496988e-4L), + static_cast(0.139348932445324888343e-5L), + }; + static const T Q[9] = { + 1.0f, + static_cast(0.244345337378188557777L), + static_cast(0.00873370754492288653669L), + static_cast(-0.00117592765334434471562L), + static_cast(-0.743743682899933180415e-4L), + static_cast(-0.21750464515767984778e-5L), + static_cast(0.471001264003076486547e-8L), + static_cast(-0.833378440625385520576e-10L), + static_cast(0.699841545204845636531e-12L), + }; + result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7)); + result = 1 + exp(result); + } + else if(s < 36) + { + + + static const T P[8] = { + static_cast(-10.3948950573308896825L), + static_cast(-2.85827219671106697179L), + static_cast(-0.347728266539245787271L), + static_cast(-0.0251156064655346341766L), + static_cast(-0.00119459173416968685689L), + static_cast(-0.382529323507967522614e-4L), + static_cast(-0.785523633796723466968e-6L), + static_cast(-0.821465709095465524192e-8L), + }; + static const T Q[10] = { + 1.0f, + static_cast(0.208196333572671890965L), + static_cast(0.0195687657317205033485L), + static_cast(0.00111079638102485921877L), + static_cast(0.408507746266039256231e-4L), + static_cast(0.955561123065693483991e-6L), + static_cast(0.118507153474022900583e-7L), + static_cast(0.222609483627352615142e-14L), + }; + result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15)); + result = 1 + exp(result); + } + else if(s < 56) + { + result = 1 + pow(T(2), -s); + } + else + { + result = 1; + } + return result; +} + +template +T zeta_imp_prec(T s, T sc, const Policy&, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result; + if(s < 1) + { + + + + + static const T P[6] = { + boost::math::tools::make_big_value( 0.243392944335937499969, "0.243392944335937499969", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.496837806864865688082, "-0.496837806864865688082", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0680008039723709987107, "0.0680008039723709987107", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00511620413006619942112, "-0.00511620413006619942112", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000455369899250053003335, "0.000455369899250053003335", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.279496685273033761927e-4, "-0.279496685273033761927e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[7] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.30425480068225790522, "-0.30425480068225790522", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.050052748580371598736, "0.050052748580371598736", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00519355671064700627862, "-0.00519355671064700627862", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000360623385771198350257, "0.000360623385771198350257", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.159600883054550987633e-4, "-0.159600883054550987633e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.339770279812410586032e-6, "0.339770279812410586032e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); + result -= 1.2433929443359375F; + result += (sc); + result /= (sc); + } + else if(s <= 2) + { + + + + + static const T P[6] = { + boost::math::tools::make_big_value( 0.577215664901532860605, "0.577215664901532860605", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.222537368917162139445, "0.222537368917162139445", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0356286324033215682729, "0.0356286324033215682729", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00304465292366350081446, "0.00304465292366350081446", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000178102511649069421904, "0.000178102511649069421904", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.700867470265983665042e-5, "0.700867470265983665042e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[7] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.259385759149531030085, "0.259385759149531030085", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0373974962106091316854, "0.0373974962106091316854", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00332735159183332820617, "0.00332735159183332820617", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000188690420706998606469, "0.000188690420706998606469", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.635994377921861930071e-5, "0.635994377921861930071e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.226583954978371199405e-7, "0.226583954978371199405e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc)); + result += 1 / (-sc); + } + else if(s <= 4) + { + + + static const float Y = 0.6986598968505859375; + static const T P[7] = { + boost::math::tools::make_big_value( -0.053725830002359501027, "-0.053725830002359501027", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0470551187571475844778, "0.0470551187571475844778", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0101339410415759517471, "0.0101339410415759517471", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00100240326666092854528, "0.00100240326666092854528", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.685027119098122814867e-4, "0.685027119098122814867e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.390972820219765942117e-5, "0.390972820219765942117e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.540319769113543934483e-7, "0.540319769113543934483e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[8] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.286577739726542730421, "0.286577739726542730421", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0447355811517733225843, "0.0447355811517733225843", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00430125107610252363302, "0.00430125107610252363302", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000284956969089786662045, "0.000284956969089786662045", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.116188101609848411329e-4, "0.116188101609848411329e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.278090318191657278204e-6, "0.278090318191657278204e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.19683620233222028478e-8, "-0.19683620233222028478e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2)); + result += Y + 1 / (-sc); + } + else if(s <= 7) + { + + static const T P[8] = { + boost::math::tools::make_big_value( -2.49710190602259407065, "-2.49710190602259407065", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.36664913245960625334, "-3.36664913245960625334", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.77180020623777595452, "-1.77180020623777595452", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.464717885249654313933, "-0.464717885249654313933", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0643694921293579472583, "-0.0643694921293579472583", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00464265386202805715487, "-0.00464265386202805715487", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000165556579779704340166, "-0.000165556579779704340166", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.252884970740994069582e-5, "-0.252884970740994069582e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[9] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.01300131390690459085, "1.01300131390690459085", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.387898115758643503827, "0.387898115758643503827", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0695071490045701135188, "0.0695071490045701135188", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00586908595251442839291, "0.00586908595251442839291", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000217752974064612188616, "0.000217752974064612188616", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.397626583349419011731e-5, "0.397626583349419011731e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.927884739284359700764e-8, "-0.927884739284359700764e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119810501805618894381e-9, "0.119810501805618894381e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4)); + result = 1 + exp(result); + } + else if(s < 15) + { + + + static const T P[9] = { + boost::math::tools::make_big_value( -4.78558028495135548083, "-4.78558028495135548083", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.23873322238609358947, "-3.23873322238609358947", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.892338582881021799922, "-0.892338582881021799922", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.131326296217965913809, "-0.131326296217965913809", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0115651591773783712996, "-0.0115651591773783712996", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000657728968362695775205, "-0.000657728968362695775205", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.252051328129449973047e-4, "-0.252051328129449973047e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.626503445372641798925e-6, "-0.626503445372641798925e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.815696314790853893484e-8, "-0.815696314790853893484e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[9] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.525765665400123515036, "0.525765665400123515036", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.10852641753657122787, "0.10852641753657122787", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0115669945375362045249, "0.0115669945375362045249", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000732896513858274091966, "0.000732896513858274091966", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.30683952282420248448e-4, "0.30683952282420248448e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.819649214609633126119e-6, "0.819649214609633126119e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.117957556472335968146e-7, "0.117957556472335968146e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.193432300973017671137e-12, "-0.193432300973017671137e-12", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 7)) / tools::evaluate_polynomial(Q, T(s - 7)); + result = 1 + exp(result); + } + else if(s < 42) + { + + + static const T P[9] = { + boost::math::tools::make_big_value( -10.3948950573308861781, "-10.3948950573308861781", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.82646012777913950108, "-2.82646012777913950108", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.342144362739570333665, "-0.342144362739570333665", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0249285145498722647472, "-0.0249285145498722647472", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00122493108848097114118, "-0.00122493108848097114118", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.423055371192592850196e-4, "-0.423055371192592850196e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.1025215577185967488e-5, "-0.1025215577185967488e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.165096762663509467061e-7, "-0.165096762663509467061e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.145392555873022044329e-9, "-0.145392555873022044329e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[10] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.205135978585281988052, "0.205135978585281988052", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0192359357875879453602, "0.0192359357875879453602", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00111496452029715514119, "0.00111496452029715514119", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.434928449016693986857e-4, "0.434928449016693986857e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.116911068726610725891e-5, "0.116911068726610725891e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.206704342290235237475e-7, "0.206704342290235237475e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.209772836100827647474e-9, "0.209772836100827647474e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.939798249922234703384e-16, "-0.939798249922234703384e-16", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.264584017421245080294e-18, "0.264584017421245080294e-18", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 15)) / tools::evaluate_polynomial(Q, T(s - 15)); + result = 1 + exp(result); + } + else if(s < 63) + { + result = 1 + pow(T(2), -s); + } + else + { + result = 1; + } + return result; +} + +template +T zeta_imp_prec(T s, T sc, const Policy&, const std::integral_constant&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T result; + if(s < 1) + { + + + + + + static const T P[10] = { + boost::math::tools::make_big_value( -1.0, "-1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0353008629988648122808504280990313668, "-0.0353008629988648122808504280990313668", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0107795651204927743049369868548706909, "0.0107795651204927743049369868548706909", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000523961870530500751114866884685172975, "0.000523961870530500751114866884685172975", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.661805838304910731947595897966487515e-4, "-0.661805838304910731947595897966487515e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.658932670403818558510656304189164638e-5, "-0.658932670403818558510656304189164638e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.103437265642266106533814021041010453e-6, "-0.103437265642266106533814021041010453e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.116818787212666457105375746642927737e-7, "0.116818787212666457105375746642927737e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.660690993901506912123512551294239036e-9, "0.660690993901506912123512551294239036e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113103113698388531428914333768142527e-10, "0.113103113698388531428914333768142527e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[11] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.387483472099602327112637481818565459, "-0.387483472099602327112637481818565459", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0802265315091063135271497708694776875, "0.0802265315091063135271497708694776875", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0110727276164171919280036408995078164, "-0.0110727276164171919280036408995078164", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00112552716946286252000434849173787243, "0.00112552716946286252000434849173787243", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.874554160748626916455655180296834352e-4, "-0.874554160748626916455655180296834352e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.530097847491828379568636739662278322e-5, "0.530097847491828379568636739662278322e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.248461553590496154705565904497247452e-6, "-0.248461553590496154705565904497247452e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.881834921354014787309644951507523899e-8, "0.881834921354014787309644951507523899e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.217062446168217797598596496310953025e-9, "-0.217062446168217797598596496310953025e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.315823200002384492377987848307151168e-11, "0.315823200002384492377987848307151168e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); + result += (sc); + result /= (sc); + } + else if(s <= 2) + { + + + + static const T P[10] = { + boost::math::tools::make_big_value( 0.577215664901532860606512090082402431, "0.577215664901532860606512090082402431", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.255597968739771510415479842335906308, "0.255597968739771510415479842335906308", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0494056503552807274142218876983542205, "0.0494056503552807274142218876983542205", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00551372778611700965268920983472292325, "0.00551372778611700965268920983472292325", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00043667616723970574871427830895192731, "0.00043667616723970574871427830895192731", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.268562259154821957743669387915239528e-4, "0.268562259154821957743669387915239528e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.109249633923016310141743084480436612e-5, "0.109249633923016310141743084480436612e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.273895554345300227466534378753023924e-7, "0.273895554345300227466534378753023924e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.583103205551702720149237384027795038e-9, "0.583103205551702720149237384027795038e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.835774625259919268768735944711219256e-11, "-0.835774625259919268768735944711219256e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[11] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.316661751179735502065583176348292881, "0.316661751179735502065583176348292881", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0540401806533507064453851182728635272, "0.0540401806533507064453851182728635272", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00598621274107420237785899476374043797, "0.00598621274107420237785899476374043797", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000474907812321704156213038740142079615, "0.000474907812321704156213038740142079615", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.272125421722314389581695715835862418e-4, "0.272125421722314389581695715835862418e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.112649552156479800925522445229212933e-5, "0.112649552156479800925522445229212933e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.301838975502992622733000078063330461e-7, "0.301838975502992622733000078063330461e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.422960728687211282539769943184270106e-9, "0.422960728687211282539769943184270106e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.377105263588822468076813329270698909e-11, "-0.377105263588822468076813329270698909e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.581926559304525152432462127383600681e-13, "-0.581926559304525152432462127383600681e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(-sc)) / tools::evaluate_polynomial(Q, T(-sc)); + result += 1 / (-sc); + } + else if(s <= 4) + { + + + + + static const float Y = 0.6986598968505859375; + static const T P[11] = { + boost::math::tools::make_big_value( -0.0537258300023595010275848333539748089, "-0.0537258300023595010275848333539748089", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0429086930802630159457448174466342553, "0.0429086930802630159457448174466342553", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0136148228754303412510213395034056857, "0.0136148228754303412510213395034056857", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00190231601036042925183751238033763915, "0.00190231601036042925183751238033763915", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000186880390916311438818302549192456581, "0.000186880390916311438818302549192456581", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.145347370745893262394287982691323657e-4, "0.145347370745893262394287982691323657e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.805843276446813106414036600485884885e-6, "0.805843276446813106414036600485884885e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.340818159286739137503297172091882574e-7, "0.340818159286739137503297172091882574e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.115762357488748996526167305116837246e-8, "0.115762357488748996526167305116837246e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.231904754577648077579913403645767214e-10, "0.231904754577648077579913403645767214e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.340169592866058506675897646629036044e-12, "0.340169592866058506675897646629036044e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[12] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.363755247765087100018556983050520554, "0.363755247765087100018556983050520554", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0696581979014242539385695131258321598, "0.0696581979014242539385695131258321598", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00882208914484611029571547753782014817, "0.00882208914484611029571547753782014817", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000815405623261946661762236085660996718, "0.000815405623261946661762236085660996718", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.571366167062457197282642344940445452e-4, "0.571366167062457197282642344940445452e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.309278269271853502353954062051797838e-5, "0.309278269271853502353954062051797838e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.12822982083479010834070516053794262e-6, "0.12822982083479010834070516053794262e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.397876357325018976733953479182110033e-8, "0.397876357325018976733953479182110033e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.8484432107648683277598472295289279e-10, "0.8484432107648683277598472295289279e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.105677416606909614301995218444080615e-11, "0.105677416606909614301995218444080615e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.547223964564003701979951154093005354e-15, "0.547223964564003701979951154093005354e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 2)) / tools::evaluate_polynomial(Q, T(s - 2)); + result += Y + 1 / (-sc); + } + else if(s <= 6) + { + + + + static const T Y = 3.28348541259765625F; + + static const T P[13] = { + boost::math::tools::make_big_value( 0.786383506575062179339611614117697622, "0.786383506575062179339611614117697622", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.495766593395271370974685959652073976, "0.495766593395271370974685959652073976", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.409116737851754766422360889037532228, "-0.409116737851754766422360889037532228", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.57340744006238263817895456842655987, "-0.57340744006238263817895456842655987", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.280479899797421910694892949057963111, "-0.280479899797421910694892949057963111", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0753148409447590257157585696212649869, "-0.0753148409447590257157585696212649869", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0122934003684672788499099362823748632, "-0.0122934003684672788499099362823748632", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00126148398446193639247961370266962927, "-0.00126148398446193639247961370266962927", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.828465038179772939844657040917364896e-4, "-0.828465038179772939844657040917364896e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.361008916706050977143208468690645684e-5, "-0.361008916706050977143208468690645684e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.109879825497910544424797771195928112e-6, "-0.109879825497910544424797771195928112e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.214539416789686920918063075528797059e-8, "-0.214539416789686920918063075528797059e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.15090220092460596872172844424267351e-10, "-0.15090220092460596872172844424267351e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[14] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.69490865837142338462982225731926485, "1.69490865837142338462982225731926485", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.22697696630994080733321401255942464, "1.22697696630994080733321401255942464", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.495409420862526540074366618006341533, "0.495409420862526540074366618006341533", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.122368084916843823462872905024259633, "0.122368084916843823462872905024259633", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0191412993625268971656513890888208623, "0.0191412993625268971656513890888208623", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00191401538628980617753082598351559642, "0.00191401538628980617753082598351559642", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000123318142456272424148930280876444459, "0.000123318142456272424148930280876444459", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.531945488232526067889835342277595709e-5, "0.531945488232526067889835342277595709e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.161843184071894368337068779669116236e-6, "0.161843184071894368337068779669116236e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.305796079600152506743828859577462778e-8, "0.305796079600152506743828859577462778e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.233582592298450202680170811044408894e-10, "0.233582592298450202680170811044408894e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.275363878344548055574209713637734269e-13, "-0.275363878344548055574209713637734269e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.221564186807357535475441900517843892e-15, "0.221564186807357535475441900517843892e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 4)) / tools::evaluate_polynomial(Q, T(s - 4)); + result -= Y; + result = 1 + exp(result); + } + else if(s < 10) + { + + + + static const T P[13] = { + boost::math::tools::make_big_value( -4.0545627381873738086704293881227365, "-4.0545627381873738086704293881227365", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.70088348734699134347906176097717782, "-4.70088348734699134347906176097717782", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.36921550900925512951976617607678789, "-2.36921550900925512951976617607678789", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.684322583796369508367726293719322866, "-0.684322583796369508367726293719322866", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.126026534540165129870721937592996324, "-0.126026534540165129870721937592996324", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.015636903921778316147260572008619549, "-0.015636903921778316147260572008619549", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00135442294754728549644376325814460807, "-0.00135442294754728549644376325814460807", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.842793965853572134365031384646117061e-4, "-0.842793965853572134365031384646117061e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.385602133791111663372015460784978351e-5, "-0.385602133791111663372015460784978351e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.130458500394692067189883214401478539e-6, "-0.130458500394692067189883214401478539e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.315861074947230418778143153383660035e-8, "-0.315861074947230418778143153383660035e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.500334720512030826996373077844707164e-10, "-0.500334720512030826996373077844707164e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.420204769185233365849253969097184005e-12, "-0.420204769185233365849253969097184005e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[14] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.97663511666410096104783358493318814, "0.97663511666410096104783358493318814", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.40878780231201806504987368939673249, "0.40878780231201806504987368939673249", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0963890666609396058945084107597727252, "0.0963890666609396058945084107597727252", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0142207619090854604824116070866614505, "0.0142207619090854604824116070866614505", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00139010220902667918476773423995750877, "0.00139010220902667918476773423995750877", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.940669540194694997889636696089994734e-4, "0.940669540194694997889636696089994734e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.458220848507517004399292480807026602e-5, "0.458220848507517004399292480807026602e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.16345521617741789012782420625435495e-6, "0.16345521617741789012782420625435495e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.414007452533083304371566316901024114e-8, "0.414007452533083304371566316901024114e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.68701473543366328016953742622661377e-10, "0.68701473543366328016953742622661377e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.603461891080716585087883971886075863e-12, "0.603461891080716585087883971886075863e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.294670713571839023181857795866134957e-16, "0.294670713571839023181857795866134957e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.147003914536437243143096875069813451e-18, "-0.147003914536437243143096875069813451e-18", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 6)) / tools::evaluate_polynomial(Q, T(s - 6)); + result = 1 + exp(result); + } + else if(s < 17) + { + + + static const T P[13] = { + boost::math::tools::make_big_value( -6.91319491921722925920883787894829678, "-6.91319491921722925920883787894829678", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.65491257639481960248690596951049048, "-3.65491257639481960248690596951049048", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.813557553449954526442644544105257881, "-0.813557553449954526442644544105257881", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0994317301685870959473658713841138083, "-0.0994317301685870959473658713841138083", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00726896610245676520248617014211734906, "-0.00726896610245676520248617014211734906", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000317253318715075854811266230916762929, "-0.000317253318715075854811266230916762929", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.66851422826636750855184211580127133e-5, "-0.66851422826636750855184211580127133e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.879464154730985406003332577806849971e-7, "0.879464154730985406003332577806849971e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113838903158254250631678791998294628e-7, "0.113838903158254250631678791998294628e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.379184410304927316385211327537817583e-9, "0.379184410304927316385211327537817583e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.612992858643904887150527613446403867e-11, "0.612992858643904887150527613446403867e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.347873737198164757035457841688594788e-13, "0.347873737198164757035457841688594788e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.289187187441625868404494665572279364e-15, "-0.289187187441625868404494665572279364e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[14] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.427310044448071818775721584949868806, "0.427310044448071818775721584949868806", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.074602514873055756201435421385243062, "0.074602514873055756201435421385243062", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00688651562174480772901425121653945942, "0.00688651562174480772901425121653945942", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000360174847635115036351323894321880445, "0.000360174847635115036351323894321880445", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.973556847713307543918865405758248777e-5, "0.973556847713307543918865405758248777e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.853455848314516117964634714780874197e-8, "-0.853455848314516117964634714780874197e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.118203513654855112421673192194622826e-7, "-0.118203513654855112421673192194622826e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.462521662511754117095006543363328159e-9, "-0.462521662511754117095006543363328159e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.834212591919475633107355719369463143e-11, "-0.834212591919475633107355719369463143e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.5354594751002702935740220218582929e-13, "-0.5354594751002702935740220218582929e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.406451690742991192964889603000756203e-15, "0.406451690742991192964889603000756203e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.887948682401000153828241615760146728e-19, "0.887948682401000153828241615760146728e-19", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.34980761098820347103967203948619072e-21, "-0.34980761098820347103967203948619072e-21", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 10)) / tools::evaluate_polynomial(Q, T(s - 10)); + result = 1 + exp(result); + } + else if(s < 30) + { + + + + static const T P[13] = { + boost::math::tools::make_big_value( -11.7824798233959252791987402769438322, "-11.7824798233959252791987402769438322", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.36131215284987731928174218354118102, "-4.36131215284987731928174218354118102", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.732260980060982349410898496846972204, "-0.732260980060982349410898496846972204", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0744985185694913074484248803015717388, "-0.0744985185694913074484248803015717388", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00517228281320594683022294996292250527, "-0.00517228281320594683022294996292250527", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000260897206152101522569969046299309939, "-0.000260897206152101522569969046299309939", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.989553462123121764865178453128769948e-5, "-0.989553462123121764865178453128769948e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.286916799741891410827712096608826167e-6, "-0.286916799741891410827712096608826167e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.637262477796046963617949532211619729e-8, "-0.637262477796046963617949532211619729e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.106796831465628373325491288787760494e-9, "-0.106796831465628373325491288787760494e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.129343095511091870860498356205376823e-11, "-0.129343095511091870860498356205376823e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.102397936697965977221267881716672084e-13, "-0.102397936697965977221267881716672084e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.402663128248642002351627980255756363e-16, "-0.402663128248642002351627980255756363e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[14] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.311288325355705609096155335186466508, "0.311288325355705609096155335186466508", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0438318468940415543546769437752132748, "0.0438318468940415543546769437752132748", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00374396349183199548610264222242269536, "0.00374396349183199548610264222242269536", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000218707451200585197339671707189281302, "0.000218707451200585197339671707189281302", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.927578767487930747532953583797351219e-5, "0.927578767487930747532953583797351219e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.294145760625753561951137473484889639e-6, "0.294145760625753561951137473484889639e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.704618586690874460082739479535985395e-8, "0.704618586690874460082739479535985395e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.126333332872897336219649130062221257e-9, "0.126333332872897336219649130062221257e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.16317315713773503718315435769352765e-11, "0.16317315713773503718315435769352765e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.137846712823719515148344938160275695e-13, "0.137846712823719515148344938160275695e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.580975420554224366450994232723910583e-16, "0.580975420554224366450994232723910583e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.291354445847552426900293580511392459e-22, "-0.291354445847552426900293580511392459e-22", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.73614324724785855925025452085443636e-25, "0.73614324724785855925025452085443636e-25", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 17)) / tools::evaluate_polynomial(Q, T(s - 17)); + result = 1 + exp(result); + } + else if(s < 74) + { + + + static const T P[14] = { + boost::math::tools::make_big_value( -20.7944102007844314586649688802236072, "-20.7944102007844314586649688802236072", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.95759941987499442499908748130192187, "-4.95759941987499442499908748130192187", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.563290752832461751889194629200298688, "-0.563290752832461751889194629200298688", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0406197001137935911912457120706122877, "-0.0406197001137935911912457120706122877", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0020846534789473022216888863613422293, "-0.0020846534789473022216888863613422293", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.808095978462109173749395599401375667e-4, "-0.808095978462109173749395599401375667e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.244706022206249301640890603610060959e-5, "-0.244706022206249301640890603610060959e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.589477682919645930544382616501666572e-7, "-0.589477682919645930544382616501666572e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.113699573675553496343617442433027672e-8, "-0.113699573675553496343617442433027672e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.174767860183598149649901223128011828e-10, "-0.174767860183598149649901223128011828e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.210051620306761367764549971980026474e-12, "-0.210051620306761367764549971980026474e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.189187969537370950337212675466400599e-14, "-0.189187969537370950337212675466400599e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.116313253429564048145641663778121898e-16, "-0.116313253429564048145641663778121898e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.376708747782400769427057630528578187e-19, "-0.376708747782400769427057630528578187e-19", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[16] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.205076752981410805177554569784219717, "0.205076752981410805177554569784219717", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0202526722696670378999575738524540269, "0.0202526722696670378999575738524540269", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.001278305290005994980069466658219057, "0.001278305290005994980069466658219057", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.576404779858501791742255670403304787e-4, "0.576404779858501791742255670403304787e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.196477049872253010859712483984252067e-5, "0.196477049872253010859712483984252067e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.521863830500876189501054079974475762e-7, "0.521863830500876189501054079974475762e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.109524209196868135198775445228552059e-8, "0.109524209196868135198775445228552059e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.181698713448644481083966260949267825e-10, "0.181698713448644481083966260949267825e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.234793316975091282090312036524695562e-12, "0.234793316975091282090312036524695562e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.227490441461460571047545264251399048e-14, "0.227490441461460571047545264251399048e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.151500292036937400913870642638520668e-16, "0.151500292036937400913870642638520668e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.543475775154780935815530649335936121e-19, "0.543475775154780935815530649335936121e-19", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.241647013434111434636554455083309352e-28, "0.241647013434111434636554455083309352e-28", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.557103423021951053707162364713587374e-31, "-0.557103423021951053707162364713587374e-31", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.618708773442584843384712258199645166e-34, "0.618708773442584843384712258199645166e-34", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = tools::evaluate_polynomial(P, T(s - 30)) / tools::evaluate_polynomial(Q, T(s - 30)); + result = 1 + exp(result); + } + else if(s < 117) + { + result = 1 + pow(T(2), -s); + } + else + { + result = 1; + } + return result; +} + +template +T zeta_imp_odd_integer(int s, const T&, const Policy&, const std::true_type&) +{ + static const T results[] = { + boost::math::tools::make_big_value( 1.2020569031595942853997381615114500, "1.2020569031595942853997381615114500", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0369277551433699263313654864570342, "1.0369277551433699263313654864570342", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0083492773819228268397975498497968, "1.0083492773819228268397975498497968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0020083928260822144178527692324121, "1.0020083928260822144178527692324121", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0004941886041194645587022825264699, "1.0004941886041194645587022825264699", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0001227133475784891467518365263574, "1.0001227133475784891467518365263574", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000305882363070204935517285106451, "1.0000305882363070204935517285106451", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000076371976378997622736002935630, "1.0000076371976378997622736002935630", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000019082127165539389256569577951, "1.0000019082127165539389256569577951", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000004769329867878064631167196044, "1.0000004769329867878064631167196044", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000001192199259653110730677887189, "1.0000001192199259653110730677887189", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000298035035146522801860637051, "1.0000000298035035146522801860637051", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000074507117898354294919810042, "1.0000000074507117898354294919810042", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000018626597235130490064039099, "1.0000000018626597235130490064039099", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000004656629065033784072989233, "1.0000000004656629065033784072989233", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000001164155017270051977592974, "1.0000000001164155017270051977592974", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000291038504449709968692943, "1.0000000000291038504449709968692943", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000072759598350574810145209, "1.0000000000072759598350574810145209", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000018189896503070659475848, "1.0000000000018189896503070659475848", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000004547473783042154026799, "1.0000000000004547473783042154026799", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000001136868407680227849349, "1.0000000000001136868407680227849349", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000284217097688930185546, "1.0000000000000284217097688930185546", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000071054273952108527129, "1.0000000000000071054273952108527129", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000017763568435791203275, "1.0000000000000017763568435791203275", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000004440892103143813364, "1.0000000000000004440892103143813364", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000001110223025141066134, "1.0000000000000001110223025141066134", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000277555756213612417, "1.0000000000000000277555756213612417", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000069388939045441537, "1.0000000000000000069388939045441537", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000017347234760475766, "1.0000000000000000017347234760475766", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000004336808690020650, "1.0000000000000000004336808690020650", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000001084202172494241, "1.0000000000000000001084202172494241", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000271050543122347, "1.0000000000000000000271050543122347", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000067762635780452, "1.0000000000000000000067762635780452", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000016940658945098, "1.0000000000000000000016940658945098", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000004235164736273, "1.0000000000000000000004235164736273", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000001058791184068, "1.0000000000000000000001058791184068", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000264697796017, "1.0000000000000000000000264697796017", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000066174449004, "1.0000000000000000000000066174449004", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000016543612251, "1.0000000000000000000000016543612251", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000004135903063, "1.0000000000000000000000004135903063", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000001033975766, "1.0000000000000000000000001033975766", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000258493941, "1.0000000000000000000000000258493941", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000064623485, "1.0000000000000000000000000064623485", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000016155871, "1.0000000000000000000000000016155871", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000004038968, "1.0000000000000000000000000004038968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000001009742, "1.0000000000000000000000000001009742", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000252435, "1.0000000000000000000000000000252435", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000063109, "1.0000000000000000000000000000063109", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000015777, "1.0000000000000000000000000000015777", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000003944, "1.0000000000000000000000000000003944", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000986, "1.0000000000000000000000000000000986", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000247, "1.0000000000000000000000000000000247", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000062, "1.0000000000000000000000000000000062", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000015, "1.0000000000000000000000000000000015", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000004, "1.0000000000000000000000000000000004", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), boost::math::tools::make_big_value( 1.0000000000000000000000000000000001, "1.0000000000000000000000000000000001", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + return s > 113 ? 1 : results[(s - 3) / 2]; +} + +template +T zeta_imp_odd_integer(int s, const T& sc, const Policy& pol, const std::false_type&) +{ + + + + static thread_local bool is_init = false; + static thread_local T results[50] = {}; + static thread_local int digits = tools::digits(); + int current_digits = tools::digits(); + if(digits != current_digits) + { + + is_init = false; + } + if(!is_init) + { + is_init = true; + digits = current_digits; + for(unsigned k = 0; k < sizeof(results) / sizeof(results[0]); ++k) + { + T arg = k * 2 + 3; + T c_arg = 1 - arg; + results[k] = zeta_polynomial_series(arg, c_arg, pol); + } + } + unsigned index = (s - 3) / 2; + return index >= sizeof(results) / sizeof(results[0]) ? zeta_polynomial_series(T(s), sc, pol): results[index]; +} + +template +T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const char* function = "boost::math::zeta<%1%>"; + if(sc == 0) + return policies::raise_pole_error( + function, + "Evaluation of zeta function at pole %1%", + s, pol); + T result; + + + + if(s > policies::digits()) + return 1; + + + + if(floor(s) == s) + { + + + + try + { + + int v = itrunc(s); + if(v == s) + { + if(v < 0) + { + if(((-v) & 1) == 0) + return 0; + int n = (-v + 1) / 2; + if(n <= (int)boost::math::max_bernoulli_b2n::value) + return T((-v & 1) ? -1 : 1) * boost::math::unchecked_bernoulli_b2n(n) / (1 - v); + } + else if((v & 1) == 0) + { + if(((v / 2) <= (int)boost::math::max_bernoulli_b2n::value) && (v <= (int)boost::math::max_factorial::value)) + return T(((v / 2 - 1) & 1) ? -1 : 1) * ldexp(T(1), v - 1) * pow(constants::pi(), v) * + boost::math::unchecked_bernoulli_b2n(v / 2) / boost::math::unchecked_factorial(v); + return T(((v / 2 - 1) & 1) ? -1 : 1) * ldexp(T(1), v - 1) * pow(constants::pi(), v) * + boost::math::bernoulli_b2n(v / 2) / boost::math::factorial(v, pol); + } + else + return zeta_imp_odd_integer(v, sc, pol, std::integral_constant()); + } + + } + catch(const boost::math::rounding_error&){} + catch(const std::overflow_error&){} + + } + + if(fabs(s) < tools::root_epsilon()) + { + result = -0.5f - constants::log_root_two_pi() * s; + } + else if(s < 0) + { + std::swap(s, sc); + if(floor(sc/2) == sc/2) + result = 0; + else + { + if(s > max_factorial::value) + { + T mult = boost::math::sin_pi(0.5f * sc, pol) * 2 * zeta_imp(s, sc, pol, tag); + result = boost::math::lgamma(s, pol); + result -= s * log(2 * constants::pi()); + if(result > tools::log_max_value()) + return sign(mult) * policies::raise_overflow_error(function, 0, pol); + result = exp(result); + if(tools::max_value() / fabs(mult) < result) + return boost::math::sign(mult) * policies::raise_overflow_error(function, 0, pol); + result *= mult; + } + else + { + result = boost::math::sin_pi(0.5f * sc, pol) + * 2 * pow(2 * constants::pi(), -s) + * boost::math::tgamma(s, pol) + * zeta_imp(s, sc, pol, tag); + } + } + } + else + { + result = zeta_imp_prec(s, sc, pol, tag); + } + return result; +} + +template +struct zeta_initializer +{ + struct init + { + init() + { + do_init(tag()); + } + static void do_init(const std::integral_constant&){ boost::math::zeta(static_cast(5), Policy()); } + static void do_init(const std::integral_constant&){ boost::math::zeta(static_cast(5), Policy()); } + static void do_init(const std::integral_constant&) + { + boost::math::zeta(static_cast(0.5), Policy()); + boost::math::zeta(static_cast(1.5), Policy()); + boost::math::zeta(static_cast(3.5), Policy()); + boost::math::zeta(static_cast(6.5), Policy()); + boost::math::zeta(static_cast(14.5), Policy()); + boost::math::zeta(static_cast(40.5), Policy()); + + boost::math::zeta(static_cast(5), Policy()); + } + static void do_init(const std::integral_constant&) + { + boost::math::zeta(static_cast(0.5), Policy()); + boost::math::zeta(static_cast(1.5), Policy()); + boost::math::zeta(static_cast(3.5), Policy()); + boost::math::zeta(static_cast(5.5), Policy()); + boost::math::zeta(static_cast(9.5), Policy()); + boost::math::zeta(static_cast(16.5), Policy()); + boost::math::zeta(static_cast(25.5), Policy()); + boost::math::zeta(static_cast(70.5), Policy()); + + boost::math::zeta(static_cast(5), Policy()); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename zeta_initializer::init zeta_initializer::initializer; + +} + +export template +inline typename tools::promote_args::type zeta(T s, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + typedef std::integral_constant tag_type; + + detail::zeta_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::zeta_imp( + static_cast(s), + static_cast(1 - static_cast(s)), + forwarding_policy(), + tag_type()), "boost::math::zeta<%1%>(%1%)"); +} + +export template +inline typename tools::promote_args::type zeta(T s) +{ + return zeta(s, policies::policy<>()); +} + +}} +# 25 "../../../../boost/math/special_functions/detail/polygamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/digamma.hpp" 1 +# 35 "../../../../boost/math/special_functions/digamma.hpp" +namespace boost{ +namespace math{ +namespace detail{ + + + + +inline unsigned digamma_large_lim(const std::integral_constant*) +{ return 20; } +inline unsigned digamma_large_lim(const std::integral_constant*) +{ return 20; } +inline unsigned digamma_large_lim(const void*) +{ return 10; } +# 58 "../../../../boost/math/special_functions/digamma.hpp" +template +inline T digamma_imp_large(T x, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const T P[] = { + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0083333333333333333333333333333333333333333333333333, "-0.0083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.003968253968253968253968253968253968253968253968254, "0.003968253968253968253968253968253968253968253968254", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0041666666666666666666666666666666666666666666666667, "-0.0041666666666666666666666666666666666666666666666667", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0075757575757575757575757575757575757575757575757576, "0.0075757575757575757575757575757575757575757575757576", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.021092796092796092796092796092796092796092796092796, "-0.021092796092796092796092796092796092796092796092796", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.44325980392156862745098039215686274509803921568627, "-0.44325980392156862745098039215686274509803921568627", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.0539543302701197438039543302701197438039543302701, "3.0539543302701197438039543302701197438039543302701", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -26.456212121212121212121212121212121212121212121212, "-26.456212121212121212121212121212121212121212121212", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 281.4601449275362318840579710144927536231884057971, "281.4601449275362318840579710144927536231884057971", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3607.510546398046398046398046398046398046398046398, "-3607.510546398046398046398046398046398046398046398", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 54827.583333333333333333333333333333333333333333333, "54827.583333333333333333333333333333333333333333333", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -974936.82385057471264367816091954022988505747126437, "-974936.82385057471264367816091954022988505747126437", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 20052695.796688078946143462272494530559046688078946, "20052695.796688078946143462272494530559046688078946", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -472384867.72162990196078431372549019607843137254902, "-472384867.72162990196078431372549019607843137254902", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 12635724795.916666666666666666666666666666666666667, "12635724795.916666666666666666666666666666666666667", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + x -= 1; + T result = log(x); + result += 1 / (2 * x); + T z = 1 / (x*x); + result -= z * tools::evaluate_polynomial(P, z); + return result; +} + + + +template +inline T digamma_imp_large(T x, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const T P[] = { + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0083333333333333333333333333333333333333333333333333, "-0.0083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.003968253968253968253968253968253968253968253968254, "0.003968253968253968253968253968253968253968253968254", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0041666666666666666666666666666666666666666666666667, "-0.0041666666666666666666666666666666666666666666666667", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0075757575757575757575757575757575757575757575757576, "0.0075757575757575757575757575757575757575757575757576", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.021092796092796092796092796092796092796092796092796, "-0.021092796092796092796092796092796092796092796092796", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.44325980392156862745098039215686274509803921568627, "-0.44325980392156862745098039215686274509803921568627", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.0539543302701197438039543302701197438039543302701, "3.0539543302701197438039543302701197438039543302701", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -26.456212121212121212121212121212121212121212121212, "-26.456212121212121212121212121212121212121212121212", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 281.4601449275362318840579710144927536231884057971, "281.4601449275362318840579710144927536231884057971", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + x -= 1; + T result = log(x); + result += 1 / (2 * x); + T z = 1 / (x*x); + result -= z * tools::evaluate_polynomial(P, z); + return result; +} + + + +template +inline T digamma_imp_large(T x, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const T P[] = { + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0083333333333333333333333333333333333333333333333333, "-0.0083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.003968253968253968253968253968253968253968253968254, "0.003968253968253968253968253968253968253968253968254", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0041666666666666666666666666666666666666666666666667, "-0.0041666666666666666666666666666666666666666666666667", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0075757575757575757575757575757575757575757575757576, "0.0075757575757575757575757575757575757575757575757576", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.021092796092796092796092796092796092796092796092796, "-0.021092796092796092796092796092796092796092796092796", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.44325980392156862745098039215686274509803921568627, "-0.44325980392156862745098039215686274509803921568627", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + x -= 1; + T result = log(x); + result += 1 / (2 * x); + T z = 1 / (x*x); + result -= z * tools::evaluate_polynomial(P, z); + return result; +} + + + +template +inline T digamma_imp_large(T x, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const T P[] = { + boost::math::tools::make_big_value( 0.083333333333333333333333333333333333333333333333333, "0.083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((24 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0083333333333333333333333333333333333333333333333333, "-0.0083333333333333333333333333333333333333333333333333", std::integral_constant::value) && ((24 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.003968253968253968253968253968253968253968253968254, "0.003968253968253968253968253968253968253968253968254", std::integral_constant::value) && ((24 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + x -= 1; + T result = log(x); + result += 1 / (2 * x); + T z = 1 / (x*x); + result -= z * tools::evaluate_polynomial(P, z); + return result; +} + + + + +template +struct digamma_series_func +{ +private: + int k; + T xx; + T term; +public: + digamma_series_func(T x) : k(1), xx(x * x), term(1 / (x * x)) {} + T operator()() + { + T result = term * boost::math::bernoulli_b2n(k) / (2 * k); + term /= xx; + ++k; + return result; + } + typedef T result_type; +}; + +template +inline T digamma_imp_large(T x, const Policy& pol, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + digamma_series_func s(x); + T result = log(x) - 1 / (2 * x); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, -result); + result = -result; + policies::check_series_iterations("boost::math::digamma<%1%>(%1%)", max_iter, pol); + return result; +} + + + + + +template +T digamma_imp_1_2(T x, const std::integral_constant*) +{ +# 213 "../../../../boost/math/special_functions/digamma.hpp" + static const float Y = 0.99558162689208984375F; + + static const T root1 = T(1569415565) / 1073741824uL; + static const T root2 = (T(381566830) / 1073741824uL) / 1073741824uL; + static const T root3 = ((T(111616537) / 1073741824uL) / 1073741824uL) / 1073741824uL; + static const T root4 = (((T(503992070) / 1073741824uL) / 1073741824uL) / 1073741824uL) / 1073741824uL; + static const T root5 = boost::math::tools::make_big_value( 0.52112228569249997894452490385577338504019838794544e-36, "0.52112228569249997894452490385577338504019838794544e-36", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + + static const T P[] = { + boost::math::tools::make_big_value( 0.25479851061131551526977464225335883769, "0.25479851061131551526977464225335883769", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.18684290534374944114622235683619897417, "-0.18684290534374944114622235683619897417", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.80360876047931768958995775910991929922, "-0.80360876047931768958995775910991929922", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.67227342794829064330498117008564270136, "-0.67227342794829064330498117008564270136", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.26569010991230617151285010695543858005, "-0.26569010991230617151285010695543858005", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.05775672694575986971640757748003553385, "-0.05775672694575986971640757748003553385", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0071432147823164975485922555833274240665, "-0.0071432147823164975485922555833274240665", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00048740753910766168912364555706064993274, "-0.00048740753910766168912364555706064993274", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.16454996865214115723416538844975174761e-4, "-0.16454996865214115723416538844975174761e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.20327832297631728077731148515093164955e-6, "-0.20327832297631728077731148515093164955e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.6210924610812025425088411043163287646, "2.6210924610812025425088411043163287646", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.6850757078559596612621337395886392594, "2.6850757078559596612621337395886392594", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.4320913706209965531250495490639289418, "1.4320913706209965531250495490639289418", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.4410872083455009362557012239501953402, "0.4410872083455009362557012239501953402", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.081385727399251729505165509278152487225, "0.081385727399251729505165509278152487225", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0089478633066857163432104815183858149496, "0.0089478633066857163432104815183858149496", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00055861622855066424871506755481997374154, "0.00055861622855066424871506755481997374154", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.1760168552357342401304462967950178554e-4, "0.1760168552357342401304462967950178554e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.20585454493572473724556649516040874384e-6, "0.20585454493572473724556649516040874384e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.90745971844439990284514121823069162795e-11, "-0.90745971844439990284514121823069162795e-11", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.48857673606545846774761343500033283272e-13, "0.48857673606545846774761343500033283272e-13", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + T g = x - root1; + g -= root2; + g -= root3; + g -= root4; + g -= root5; + T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); + T result = g * Y + g * r; + + return result; +} + + + +template +T digamma_imp_1_2(T x, const std::integral_constant*) +{ +# 275 "../../../../boost/math/special_functions/digamma.hpp" + static const float Y = 0.99558162689208984375F; + + static const T root1 = T(1569415565) / 1073741824uL; + static const T root2 = (T(381566830) / 1073741824uL) / 1073741824uL; + static const T root3 = boost::math::tools::make_big_value( 0.9016312093258695918615325266959189453125e-19, "0.9016312093258695918615325266959189453125e-19", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + + static const T P[] = { + boost::math::tools::make_big_value( 0.254798510611315515235, "0.254798510611315515235", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.314628554532916496608, "-0.314628554532916496608", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.665836341559876230295, "-0.665836341559876230295", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.314767657147375752913, "-0.314767657147375752913", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0541156266153505273939, "-0.0541156266153505273939", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00289268368333918761452, "-0.00289268368333918761452", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.1195759927055347547, "2.1195759927055347547", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.54350554664961128724, "1.54350554664961128724", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.486986018231042975162, "0.486986018231042975162", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0660481487173569812846, "0.0660481487173569812846", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00298999662592323990972, "0.00298999662592323990972", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.165079794012604905639e-5, "-0.165079794012604905639e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.317940243105952177571e-7, "0.317940243105952177571e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T g = x - root1; + g -= root2; + g -= root3; + T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); + T result = g * Y + g * r; + + return result; +} + + + +template +T digamma_imp_1_2(T x, const std::integral_constant*) +{ +# 325 "../../../../boost/math/special_functions/digamma.hpp" + static const float Y = 0.99558162689208984F; + + static const T root1 = T(1569415565) / 1073741824uL; + static const T root2 = (T(381566830) / 1073741824uL) / 1073741824uL; + static const T root3 = boost::math::tools::make_big_value( 0.9016312093258695918615325266959189453125e-19, "0.9016312093258695918615325266959189453125e-19", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + + static const T P[] = { + boost::math::tools::make_big_value( 0.25479851061131551, "0.25479851061131551", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.32555031186804491, "-0.32555031186804491", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.65031853770896507, "-0.65031853770896507", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.28919126444774784, "-0.28919126444774784", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.045251321448739056, "-0.045251321448739056", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0020713321167745952, "-0.0020713321167745952", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.0767117023730469, "2.0767117023730469", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.4606242909763515, "1.4606242909763515", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.43593529692665969, "0.43593529692665969", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.054151797245674225, "0.054151797245674225", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0021284987017821144, "0.0021284987017821144", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.55789841321675513e-6, "-0.55789841321675513e-6", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T g = x - root1; + g -= root2; + g -= root3; + T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); + T result = g * Y + g * r; + + return result; +} + + + +template +inline T digamma_imp_1_2(T x, const std::integral_constant*) +{ +# 374 "../../../../boost/math/special_functions/digamma.hpp" + static const float Y = 0.99558162689208984f; + static const T root = 1532632.0f / 1048576; + static const T root_minor = static_cast(0.3700660185912626595423257213284682051735604e-6L); + static const T P[] = { + 0.25479851023250261e0f, + -0.44981331915268368e0f, + -0.43916936919946835e0f, + -0.61041765350579073e-1f + }; + static const T Q[] = { + 0.1e1, + 0.15890202430554952e1f, + 0.65341249856146947e0f, + 0.63851690523355715e-1f + }; + T g = x - root; + g -= root_minor; + T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); + T result = g * Y + g * r; + + return result; +} + +template +T digamma_imp(T x, const Tag* t, const Policy& pol) +{ + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 0; + + + + if(x <= -1) + { + + x = 1 - x; + + T remainder = x - floor(x); + + if(remainder > 0.5) + { + remainder -= 1; + } + + + + if(remainder == 0) + { + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, (1-x), pol); + } + result = constants::pi() / tan(constants::pi() * remainder); + } + if(x == 0) + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, x, pol); + + + + + if(x >= digamma_large_lim(t)) + { + result += digamma_imp_large(x, t); + } + else + { + + + + while(x > 2) + { + x -= 1; + result += 1/x; + } + + + + while(x < 1) + { + result -= 1/x; + x += 1; + } + result += digamma_imp_1_2(x, t); + } + return result; +} + +template +T digamma_imp(T x, const std::integral_constant* t, const Policy& pol) +{ + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 0; + + + + if(x <= -1) + { + + x = 1 - x; + + T remainder = x - floor(x); + + if(remainder > 0.5) + { + remainder -= 1; + } + + + + if(remainder == 0) + { + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, (1 - x), pol); + } + result = constants::pi() / tan(constants::pi() * remainder); + } + if(x == 0) + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, x, pol); + + + + + + + + int lim = 10 + ((tools::digits() - 50) * 240L) / 950; + T two_x = ldexp(x, 1); + if(x >= lim) + { + result += digamma_imp_large(x, pol, t); + } + else if(floor(x) == x) + { + + + + + result = -constants::euler(); + T val = 1; + while(val < x) + { + result += 1 / val; + val += 1; + } + } + else if(floor(two_x) == two_x) + { + + + + + result = -2 * constants::ln_two() - constants::euler(); + int n = itrunc(x); + if(n) + { + for(int k = 1; k < n; ++k) + result += 1 / T(k); + for(int k = n; k <= 2 * n - 1; ++k) + result += 2 / T(k); + } + } + else + { + + + + while(x < lim) + { + result -= 1 / x; + x += 1; + } + result += digamma_imp_large(x, pol, t); + } + return result; +} + + + +template +struct digamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + do_init(std::integral_constant()); + } + void do_init(const std::true_type&) + { + boost::math::digamma(T(1.5), Policy()); + boost::math::digamma(T(500), Policy()); + } + void do_init(const std::false_type&){} + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename digamma_initializer::init digamma_initializer::initializer; + +} + +export template +inline typename tools::promote_args::type + digamma(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef std::integral_constant 113) ? 0 : + precision_type::value <= 24 ? 24 : + precision_type::value <= 53 ? 53 : + precision_type::value <= 64 ? 64 : + precision_type::value <= 113 ? 113 : 0 > tag_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + + detail::digamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::digamma_imp( + static_cast(x), + static_cast(0), forwarding_policy()), "boost::math::digamma<%1%>(%1%)"); +} + +export template +inline typename tools::promote_args::type + digamma(T x) +{ + return digamma(x, policies::policy<>()); +} + +} +} +# 26 "../../../../boost/math/special_functions/detail/polygamma.hpp" 2 + +# 1 "../../../../boost/math/special_functions/cos_pi.hpp" 1 +# 23 "../../../../boost/math/special_functions/cos_pi.hpp" +namespace boost{ namespace math{ namespace detail{ + +template +T cos_pi_imp(T x, const Policy&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + bool invert = false; + if(fabs(x) < 0.25) + return cos(constants::pi() * x); + + if(x < 0) + { + x = -x; + } + T rem = floor(x); + if(abs(floor(rem/2)*2 - rem) > std::numeric_limits::epsilon()) + { + invert = !invert; + } + rem = x - rem; + if(rem > 0.5f) + { + rem = 1 - rem; + invert = !invert; + } + if(rem == 0.5f) + return 0; + + if(rem > 0.25f) + { + rem = 0.5f - rem; + rem = sin(constants::pi() * rem); + } + else + rem = cos(constants::pi() * rem); + return invert ? T(-rem) : rem; +} + +} + +export template +inline typename tools::promote_args::type cos_pi(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<>, + + + policies::overflow_error >::type forwarding_policy; + return policies::checked_narrowing_cast(boost::math::detail::cos_pi_imp(x, forwarding_policy()), "cos_pi"); +} + +export template +inline typename tools::promote_args::type cos_pi(T x) +{ + return boost::math::cos_pi(x, policies::policy<>()); +} + +} +} +# 28 "../../../../boost/math/special_functions/detail/polygamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/pow.hpp" 1 +# 22 "../../../../boost/math/special_functions/pow.hpp" +namespace boost { +namespace math { + + + + + + +namespace detail { + + +template +struct positive_power +{ + template + static constexpr T result(T base) + { + T power = positive_power::result(base); + return power * power; + } +}; + +template +struct positive_power +{ + template + static constexpr T result(T base) + { + T power = positive_power::result(base); + return base * power * power; + } +}; + +template <> +struct positive_power<1, 1> +{ + template + static constexpr T result(T base){ return base; } +}; + + +template +struct power_if_positive +{ + template + static constexpr T result(T base, const Policy&) + { return positive_power::result(base); } +}; + +template +struct power_if_positive +{ + template + static constexpr T result(T base, const Policy& policy) + { + if (base == 0) + { + return policies::raise_overflow_error( + "boost::math::pow(%1%)", + "Attempted to compute a negative power of 0", + policy + ); + } + + return T(1) / positive_power<-N>::result(base); + } +}; + +template <> +struct power_if_positive<0, true> +{ + template + static constexpr T result(T base, const Policy& policy) + { + if (base == 0) + { + return policies::raise_indeterminate_result_error( + "boost::math::pow(%1%)", + "The result of pow<0>(%1%) is undetermined", + base, + T(1), + policy + ); + } + + return T(1); + } +}; + + +template +struct select_power_if_positive +{ + using type = power_if_positive= 0)>; +}; + + +} + + +export template +constexpr inline typename tools::promote_args::type pow(T base, const Policy& policy) +{ + using result_type = typename tools::promote_args::type; + return detail::select_power_if_positive::type::result(static_cast(base), policy); +} + +export template +constexpr inline typename tools::promote_args::type pow(T base) +{ return pow(base, policies::policy<>()); } + + + + + +} +} +# 29 "../../../../boost/math/special_functions/detail/polygamma.hpp" 2 +# 40 "../../../../boost/math/special_functions/detail/polygamma.hpp" +namespace boost { namespace math { namespace detail{ + + template + T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol, const char* function) + { + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + + + if(n + x == x) + { + + if(n == 1) return 1 / x; + T nlx = n * log(x); + if((nlx < tools::log_max_value()) && (n < (int)max_factorial::value)) + return ((n & 1) ? 1 : -1) * boost::math::factorial(n - 1, pol) * pow(x, -n); + else + return ((n & 1) ? 1 : -1) * exp(boost::math::lgamma(T(n), pol) - n * log(x)); + } + T term, sum, part_term; + T x_squared = x * x; +# 84 "../../../../boost/math/special_functions/detail/polygamma.hpp" + part_term = ((n > (int)boost::math::max_factorial::value) && (T(n) * n > tools::log_max_value())) + ? T(0) : static_cast(boost::math::factorial(n - 1, pol) * pow(x, -n - 1)); + if(part_term == 0) + { + + + part_term = static_cast(boost::math::lgamma(n, pol) - (n + 1) * log(x)); + sum = exp(part_term + log(n + 2 * x) - boost::math::constants::ln_two()); + part_term += log(T(n) * (n + 1)) - boost::math::constants::ln_two() - log(x); + part_term = exp(part_term); + } + else + { + sum = part_term * (n + 2 * x) / 2; + part_term *= (T(n) * (n + 1)) / 2; + part_term /= x; + } + + + + if(sum == 0) + return sum; + + for(unsigned k = 1;;) + { + term = part_term * boost::math::bernoulli_b2n(k, pol); + sum += term; + + + + if(fabs(term / sum) < tools::epsilon()) + break; + + + + ++k; + part_term *= T(n + 2 * k - 2) * (n - 1 + 2 * k); + part_term /= (2 * k - 1) * 2 * k; + part_term /= x_squared; + + + + if(k > policies::get_max_series_iterations()) + { + return policies::raise_evaluation_error(function, "Series did not converge, closest value was %1%", sum, pol); + } + } + + if((n - 1) & 1) + sum = -sum; + + return sum; + } + + template + T polygamma_attransitionplus(const int n, const T& x, const Policy& pol, const char* function) + { + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + const int d4d = static_cast(0.4F * policies::digits_base10()); + const int N = d4d + (4 * n); + const int m = n; + const int iter = N - itrunc(x); + + if(iter > (int)policies::get_max_series_iterations()) + return policies::raise_evaluation_error(function, ("Exceeded maximum series evaluations evaluating at n = " + std::to_string(n) + " and x = %1%").c_str(), x, pol); + + const int minus_m_minus_one = -m - 1; + + T z(x); + T sum0(0); + T z_plus_k_pow_minus_m_minus_one(0); + + + if(log(z + iter) * minus_m_minus_one > -tools::log_max_value()) + { + for(int k = 1; k <= iter; ++k) + { + z_plus_k_pow_minus_m_minus_one = pow(z, minus_m_minus_one); + sum0 += z_plus_k_pow_minus_m_minus_one; + z += 1; + } + sum0 *= boost::math::factorial(n, pol); + } + else + { + for(int k = 1; k <= iter; ++k) + { + T log_term = log(z) * minus_m_minus_one + boost::math::lgamma(T(n + 1), pol); + sum0 += exp(log_term); + z += 1; + } + } + if((n - 1) & 1) + sum0 = -sum0; + + return sum0 + polygamma_atinfinityplus(n, z, pol, function); + } + + template + T polygamma_nearzero(int n, T x, const Policy& pol, const char* function) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; +# 197 "../../../../boost/math/special_functions/detail/polygamma.hpp" + T scale = boost::math::factorial(n, pol); + + + + + T factorial_part = 1; + + + + + + T prefix = pow(x, n + 1); + if(prefix == 0) + return boost::math::policies::raise_overflow_error(function, 0, pol); + prefix = 1 / prefix; + + + + + if(prefix > 2 / policies::get_epsilon()) + return ((n & 1) ? 1 : -1) * + (tools::max_value() / prefix < scale ? policies::raise_overflow_error(function, 0, pol) : prefix * scale); + + + + + + + + T sum = prefix; + for(unsigned k = 0;;) + { + + T term = factorial_part * boost::math::zeta(T(k + n + 1), pol); + sum += term; + + if(fabs(term) < fabs(sum * boost::math::policies::get_epsilon())) + break; + + + + ++k; + factorial_part *= (-x * (n + k)) / k; + + + + if(k > policies::get_max_series_iterations()) + return policies::raise_evaluation_error(function, "Series did not converge, best value is %1%", sum, pol); + } + + + + if(boost::math::tools::max_value() / scale < sum) + return boost::math::policies::raise_overflow_error(function, 0, pol); + sum *= scale; + return n & 1 ? sum : T(-sum); + } + + + + + + template + typename Table::value_type::reference dereference_table(Table& table, unsigned row, unsigned power) + { + return table[row][power / 2]; + } + + + + template + T poly_cot_pi(int n, T x, T xc, const Policy& pol, const char* function) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; +# 298 "../../../../boost/math/special_functions/detail/polygamma.hpp" + T s = fabs(x) < fabs(xc) ? boost::math::sin_pi(x, pol) : boost::math::sin_pi(xc, pol); + T c = boost::math::cos_pi(x, pol); + switch(n) + { + case 1: + return -constants::pi() / (s * s); + case 2: + { + return 2 * constants::pi() * constants::pi() * c / boost::math::pow<3>(s, pol); + } + case 3: + { + constexpr int P[] = { -2, -4 }; + return boost::math::pow<3>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<4>(s, pol); + } + case 4: + { + constexpr int P[] = { 16, 8 }; + return boost::math::pow<4>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<5>(s, pol); + } + case 5: + { + constexpr int P[] = { -16, -88, -16 }; + return boost::math::pow<5>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<6>(s, pol); + } + case 6: + { + constexpr int P[] = { 272, 416, 32 }; + return boost::math::pow<6>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<7>(s, pol); + } + case 7: + { + constexpr int P[] = { -272, -2880, -1824, -64 }; + return boost::math::pow<7>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<8>(s, pol); + } + case 8: + { + constexpr int P[] = { 7936, 24576, 7680, 128 }; + return boost::math::pow<8>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<9>(s, pol); + } + case 9: + { + constexpr int P[] = { -7936, -137216, -185856, -31616, -256 }; + return boost::math::pow<9>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<10>(s, pol); + } + case 10: + { + constexpr int P[] = { 353792, 1841152, 1304832, 128512, 512 }; + return boost::math::pow<10>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<11>(s, pol); + } + case 11: + { + constexpr int P[] = { -353792, -9061376, -21253376, -8728576, -518656, -1024}; + return boost::math::pow<11>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<12>(s, pol); + } + case 12: + { + constexpr int P[] = { 22368256, 175627264, 222398464, 56520704, 2084864, 2048 }; + return boost::math::pow<12>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<13>(s, pol); + } + + case 13: + { + constexpr long long P[] = { -22368256LL, -795300864LL, -2868264960LL, -2174832640LL, -357888000LL, -8361984LL, -4096 }; + return boost::math::pow<13>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<14>(s, pol); + } + case 14: + { + constexpr long long P[] = { 1903757312LL, 21016670208LL, 41731645440LL, 20261765120LL, 2230947840LL, 33497088LL, 8192 }; + return boost::math::pow<14>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<15>(s, pol); + } + case 15: + { + constexpr long long P[] = { -1903757312LL, -89702612992LL, -460858269696LL, -559148810240LL, -182172651520LL, -13754155008LL, -134094848LL, -16384 }; + return boost::math::pow<15>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<16>(s, pol); + } + case 16: + { + constexpr long long P[] = { 209865342976LL, 3099269660672LL, 8885192097792LL, 7048869314560LL, 1594922762240LL, 84134068224LL, 536608768LL, 32768 }; + return boost::math::pow<16>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<17>(s, pol); + } + case 17: + { + constexpr long long P[] = { -209865342976LL, -12655654469632LL, -87815735738368LL, -155964390375424LL, -84842998005760LL, -13684856848384LL, -511780323328LL, -2146926592LL, -65536 }; + return boost::math::pow<17>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<18>(s, pol); + } + case 18: + { + constexpr long long P[] = { 29088885112832LL, 553753414467584LL, 2165206642589696LL, 2550316668551168LL, 985278548541440LL, 115620218667008LL, 3100738912256LL, 8588754944LL, 131072 }; + return boost::math::pow<18>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<19>(s, pol); + } + case 19: + { + constexpr long long P[] = { -29088885112832LL, -2184860175433728LL, -19686087844429824LL, -48165109676113920LL, -39471306959486976LL, -11124607890751488LL, -965271355195392LL, -18733264797696LL, -34357248000LL, -262144 }; + return boost::math::pow<19>(constants::pi(), pol) * tools::evaluate_even_polynomial(P, c) / boost::math::pow<20>(s, pol); + } + case 20: + { + constexpr long long P[] = { 4951498053124096LL, 118071834535526400LL, 603968063567560704LL, 990081991141490688LL, 584901762421358592LL, 122829335169859584LL, 7984436548730880LL, 112949304754176LL, 137433710592LL, 524288 }; + return boost::math::pow<20>(constants::pi(), pol) * c * tools::evaluate_even_polynomial(P, c) / boost::math::pow<21>(s, pol); + } + + } +# 409 "../../../../boost/math/special_functions/detail/polygamma.hpp" + if((unsigned)n / 2u > policies::get_max_series_iterations()) + return policies::raise_evaluation_error(function, "The value of n is so large that we're unable to compute the result in reasonable time, best guess is %1%", 0, pol); + + static std::mutex m; + std::lock_guard l(m); + + static int digits = tools::digits(); + static std::vector > table(1, std::vector(1, T(-1))); + + int current_digits = tools::digits(); + + if(digits != current_digits) + { + + table = std::vector >(1, std::vector(1, T(-1))); + digits = current_digits; + } + + int index = n - 1; + + if(index >= (int)table.size()) + { + for(int i = (int)table.size() - 1; i < index; ++i) + { + int offset = i & 1; + int sin_order = i + 2; + int max_cos_order = sin_order - 1; + int max_columns = (max_cos_order - offset) / 2; + int next_offset = offset ? 0 : 1; + int next_max_columns = (max_cos_order + 1 - next_offset) / 2; + table.push_back(std::vector(next_max_columns + 1, T(0))); + + for(int column = 0; column <= max_columns; ++column) + { + int cos_order = 2 * column + offset; + +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + (void) ((!!( +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" + column < (int)table[i].size() +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + )) || (_assert( +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" + "column < (int)table[i].size()" +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + ,"../../../../boost/math/special_functions/detail/polygamma.hpp",444),0)) +# 444 "../../../../boost/math/special_functions/detail/polygamma.hpp" + ; + +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + (void) ((!!( +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" + (cos_order + 1) / 2 < (int)table[i + 1].size() +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + )) || (_assert( +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" + "(cos_order + 1) / 2 < (int)table[i + 1].size()" +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" 3 + ,"../../../../boost/math/special_functions/detail/polygamma.hpp",445),0)) +# 445 "../../../../boost/math/special_functions/detail/polygamma.hpp" + ; + table[i + 1][(cos_order + 1) / 2] += ((cos_order - sin_order) * table[i][column]) / (sin_order - 1); + if(cos_order) + table[i + 1][(cos_order - 1) / 2] += (-cos_order * table[i][column]) / (sin_order - 1); + } + } + + } + T sum = boost::math::tools::evaluate_even_polynomial(&table[index][0], c, table[index].size()); + if(index & 1) + sum *= c; + if(sum == 0) + return sum; + + + + + T power_terms = n * log(boost::math::constants::pi()); + if(s == 0) + return sum * boost::math::policies::raise_overflow_error(function, 0, pol); + power_terms -= log(fabs(s)) * (n + 1); + power_terms += boost::math::lgamma(T(n), pol); + power_terms += log(fabs(sum)); + + if(power_terms > boost::math::tools::log_max_value()) + return sum * boost::math::policies::raise_overflow_error(function, 0, pol); + + return exp(power_terms) * ((s < 0) && ((n + 1) & 1) ? -1 : 1) * boost::math::sign(sum); + } + + template + struct polygamma_initializer + { + struct init + { + init() + { + + boost::math::polygamma(30, T(-2.5f), Policy()); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } + }; + + template + const typename polygamma_initializer::init polygamma_initializer::initializer; + + template + inline T polygamma_imp(const int n, T x, const Policy &pol) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + static const char* function = "boost::math::polygamma<%1%>(int, %1%)"; + polygamma_initializer::initializer.force_instantiate(); + if(n < 0) + return policies::raise_domain_error(function, "Order must be >= 0, but got %1%", static_cast(n), pol); + if(x < 0) + { + if(floor(x) == x) + { + + + + if(lltrunc(x) & 1) + return policies::raise_overflow_error(function, 0, pol); + else + return policies::raise_pole_error(function, "Evaluation at negative integer %1%", x, pol); + } + T z = 1 - x; + T result = polygamma_imp(n, z, pol) + constants::pi() * poly_cot_pi(n, z, x, pol, function); + return n & 1 ? T(-result) : result; + } + + + + + + + + T small_x_limit = (std::min)(T(T(5) / n), T(0.25f)); + if(x < small_x_limit) + { + return polygamma_nearzero(n, x, pol, function); + } + else if(x > 0.4F * policies::digits_base10() + 4.0f * n) + { + return polygamma_atinfinityplus(n, x, pol, function); + } + else if(x == 1) + { + return (n & 1 ? 1 : -1) * boost::math::factorial(n, pol) * boost::math::zeta(T(n + 1), pol); + } + else if(x == 0.5f) + { + T result = (n & 1 ? 1 : -1) * boost::math::factorial(n, pol) * boost::math::zeta(T(n + 1), pol); + if(fabs(result) >= ldexp(tools::max_value(), -n - 1)) + return boost::math::sign(result) * policies::raise_overflow_error(function, 0, pol); + result *= ldexp(T(1), n + 1) - 1; + return result; + } + else + { + return polygamma_attransitionplus(n, x, pol, function); + } + } + +} } } +# 16 "../../../../boost/math/special_functions/polygamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/trigamma.hpp" 1 +# 22 "../../../../boost/math/special_functions/trigamma.hpp" +# 1 "../../../../boost/math/special_functions/polygamma.hpp" 1 +# 23 "../../../../boost/math/special_functions/trigamma.hpp" 2 +# 34 "../../../../boost/math/special_functions/trigamma.hpp" +namespace boost{ +namespace math{ +namespace detail{ + +template +T polygamma_imp(const int n, T x, const Policy &pol); + +template +T trigamma_prec(T x, const std::integral_constant*, const Policy&) +{ + + static const T offset = boost::math::tools::make_big_value( 2.1093254089355469, "2.1093254089355469", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + static const T P_1_2[] = { + boost::math::tools::make_big_value( -1.1093280605946045, "-1.1093280605946045", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.8310674472619321, "-3.8310674472619321", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.3703848401898283, "-3.3703848401898283", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.28080574467981213, "0.28080574467981213", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.6638069578676164, "1.6638069578676164", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.64468386819102836, "0.64468386819102836", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_1_2[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.4535389668541151, "3.4535389668541151", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.5208926987851437, "4.5208926987851437", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.7012734178351534, "2.7012734178351534", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.64468798399785611, "0.64468798399785611", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.20314516859987728e-6, "-0.20314516859987728e-6", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + static const T P_2_4[] = { + boost::math::tools::make_big_value( -0.13803835004508849e-7, "-0.13803835004508849e-7", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.50000049158540261, "0.50000049158540261", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.6077979838469348, "1.6077979838469348", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.5645435828098254, "2.5645435828098254", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.0534873203680393, "2.0534873203680393", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.74566981111565923, "0.74566981111565923", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_2_4[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.8822787662376169, "2.8822787662376169", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.1681660554090917, "4.1681660554090917", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.7853527819234466, "2.7853527819234466", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.74967671848044792, "0.74967671848044792", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00057069112416246805, "-0.00057069112416246805", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + + static const T P_4_inf[] = { + static_cast(0.68947581948701249e-17L), + static_cast(0.49999999999998975L), + static_cast(1.0177274392923795L), + static_cast(2.498208511343429L), + static_cast(2.1921221359427595L), + static_cast(1.5897035272532764L), + static_cast(0.40154388356961734L), + }; + static const T Q_4_inf[] = { + static_cast(1.0L), + static_cast(1.7021215452463932L), + static_cast(4.4290431747556469L), + static_cast(2.9745631894384922L), + static_cast(2.3013614809773616L), + static_cast(0.28360399799075752L), + static_cast(0.022892987908906897L), + }; + + if(x <= 2) + { + return (offset + boost::math::tools::evaluate_polynomial(P_1_2, x) / tools::evaluate_polynomial(Q_1_2, x)) / (x * x); + } + else if(x <= 4) + { + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_2_4, y) / tools::evaluate_polynomial(Q_2_4, y)) / x; + } + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_4_inf, y) / tools::evaluate_polynomial(Q_4_inf, y)) / x; +} + +template +T trigamma_prec(T x, const std::integral_constant*, const Policy&) +{ + + static const T offset_1_2 = boost::math::tools::make_big_value( 2.109325408935546875, "2.109325408935546875", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + static const T P_1_2[] = { + boost::math::tools::make_big_value( -1.10932535608960258341, "-1.10932535608960258341", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.18793841543017129052, "-4.18793841543017129052", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.63865531898487734531, "-4.63865531898487734531", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.919832884430500908047, "-0.919832884430500908047", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.68074038333180423012, "1.68074038333180423012", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.21172611429185622377, "1.21172611429185622377", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.259635673503366427284, "0.259635673503366427284", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_1_2[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.77521119359546982995, "3.77521119359546982995", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 5.664338024578956321, "5.664338024578956321", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.25995134879278028361, "4.25995134879278028361", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.62956638448940402182, "1.62956638448940402182", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.259635512844691089868, "0.259635512844691089868", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.629642219810618032207e-8, "0.629642219810618032207e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + static const T P_2_8[] = { + boost::math::tools::make_big_value( -0.387540035162952880976e-11, "-0.387540035162952880976e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.500000000276430504, "0.500000000276430504", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.21926880986360957306, "3.21926880986360957306", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 10.2550347708483445775, "10.2550347708483445775", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 18.9002075150709144043, "18.9002075150709144043", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 21.0357215832399705625, "21.0357215832399705625", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 13.4346512182925923978, "13.4346512182925923978", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.98656291026448279118, "3.98656291026448279118", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_2_8[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 6.10520430478613667724, "6.10520430478613667724", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 18.475001060603645512, "18.475001060603645512", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 31.7087534567758405638, "31.7087534567758405638", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 31.908814523890465398, "31.908814523890465398", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 17.4175479039227084798, "17.4175479039227084798", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.98749106958394941276, "3.98749106958394941276", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000115917322224411128566, "-0.000115917322224411128566", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + + static const T P_8_inf[] = { + boost::math::tools::make_big_value( -0.263527875092466899848e-19, "-0.263527875092466899848e-19", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.500000000000000058145, "0.500000000000000058145", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0730121433777364138677, "0.0730121433777364138677", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.94505878379957149534, "1.94505878379957149534", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0517092358874932620529, "0.0517092358874932620529", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.07995383547483921121, "1.07995383547483921121", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_8_inf[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.187309046577818095504, "-0.187309046577818095504", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.95255391645238842975, "3.95255391645238842975", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.14743283327078949087, "-1.14743283327078949087", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.52989799376344914499, "2.52989799376344914499", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.627414303172402506396, "-0.627414303172402506396", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.141554248216425512536, "0.141554248216425512536", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + if(x <= 2) + { + return (offset_1_2 + boost::math::tools::evaluate_polynomial(P_1_2, x) / tools::evaluate_polynomial(Q_1_2, x)) / (x * x); + } + else if(x <= 8) + { + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_2_8, y) / tools::evaluate_polynomial(Q_2_8, y)) / x; + } + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_8_inf, y) / tools::evaluate_polynomial(Q_8_inf, y)) / x; +} + +template +T trigamma_prec(T x, const std::integral_constant*, const Policy&) +{ + + + static const T P_1_2[] = { + boost::math::tools::make_big_value( -0.999999999999999082554457936871832533, "-0.999999999999999082554457936871832533", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.71237311120865266379041700054847734, "-4.71237311120865266379041700054847734", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -7.94125711970499027763789342500817316, "-7.94125711970499027763789342500817316", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -5.74657746697664735258222071695644535, "-5.74657746697664735258222071695644535", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.404213349456398905981223965160595687, "-0.404213349456398905981223965160595687", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.47877781178642876561595890095758896, "2.47877781178642876561595890095758896", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.07714151702455125992166949812126433, "2.07714151702455125992166949812126433", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.858877899162360138844032265418028567, "0.858877899162360138844032265418028567", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.20499222604410032375789018837922397, "0.20499222604410032375789018837922397", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0272103140348194747360175268778415049, "0.0272103140348194747360175268778415049", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0015764849020876949848954081173520686, "0.0015764849020876949848954081173520686", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_1_2[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.71237311120863419878375031457715223, "4.71237311120863419878375031457715223", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 9.58619118655339853449127952145877467, "9.58619118655339853449127952145877467", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 11.0940067269829372437561421279054968, "11.0940067269829372437561421279054968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.09075424749327792073276309969037885, "8.09075424749327792073276309969037885", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.87705890159891405185343806884451286, "3.87705890159891405185343806884451286", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.22758678701914477836330837816976782, "1.22758678701914477836330837816976782", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.249092040606385004109672077814668716, "0.249092040606385004109672077814668716", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0295750413900655597027079600025569048, "0.0295750413900655597027079600025569048", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00157648490200498142247694709728858139, "0.00157648490200498142247694709728858139", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.161264050344059471721062360645432809e-14, "0.161264050344059471721062360645432809e-14", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + static const T P_2_4[] = { + boost::math::tools::make_big_value( -2.55843734739907925764326773972215085, "-2.55843734739907925764326773972215085", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -12.2830208240542011967952466273455887, "-12.2830208240542011967952466273455887", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -23.9195022162767993526575786066414403, "-23.9195022162767993526575786066414403", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -24.9256431504823483094158828285470862, "-24.9256431504823483094158828285470862", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -14.7979122765478779075108064826412285, "-14.7979122765478779075108064826412285", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -4.46654453928610666393276765059122272, "-4.46654453928610666393276765059122272", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0191439033405649675717082465687845002, "-0.0191439033405649675717082465687845002", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.515412052554351265708917209749037352, "0.515412052554351265708917209749037352", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.195378348786064304378247325360320038, "0.195378348786064304378247325360320038", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0334761282624174313035014426794245393, "0.0334761282624174313035014426794245393", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.002373665205942206348500250056602687, "0.002373665205942206348500250056602687", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_2_4[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.80098558454419907830670928248659245, "4.80098558454419907830670928248659245", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 9.99220727843170133895059300223445265, "9.99220727843170133895059300223445265", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 11.8896146167631330735386697123464976, "11.8896146167631330735386697123464976", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.96613256683809091593793565879092581, "8.96613256683809091593793565879092581", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.47254136149624110878909334574485751, "4.47254136149624110878909334574485751", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.48600982028196527372434773913633152, "1.48600982028196527372434773913633152", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.319570735766764237068541501137990078, "0.319570735766764237068541501137990078", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0407358345787680953107374215319322066, "0.0407358345787680953107374215319322066", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00237366520593271641375755486420859837, "0.00237366520593271641375755486420859837", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.239554887903526152679337256236302116e-15, "0.239554887903526152679337256236302116e-15", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.294749244740618656265237072002026314e-17, "-0.294749244740618656265237072002026314e-17", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + static const T y_offset_2_4 = boost::math::tools::make_big_value( 3.558437347412109375, "3.558437347412109375", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + + + static const T P_4_8[] = { + boost::math::tools::make_big_value( 0.166626112697021464248967707021688845e-16, "0.166626112697021464248967707021688845e-16", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.499999999999997739552090249208808197, "0.499999999999997739552090249208808197", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 6.40270945019053817915772473771553187, "6.40270945019053817915772473771553187", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 41.3833374155000608013677627389343329, "41.3833374155000608013677627389343329", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 166.803341854562809335667241074035245, "166.803341854562809335667241074035245", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 453.39964786925369319960722793414521, "453.39964786925369319960722793414521", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 851.153712317697055375935433362983944, "851.153712317697055375935433362983944", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1097.70657567285059133109286478004458, "1097.70657567285059133109286478004458", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 938.431232478455316020076349367632922, "938.431232478455316020076349367632922", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 487.268001604651932322080970189930074, "487.268001604651932322080970189930074", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 119.953445242335730062471193124820659, "119.953445242335730062471193124820659", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_4_8[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 12.4720855670474488978638945855932398, "12.4720855670474488978638945855932398", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 78.6093129753298570701376952709727391, "78.6093129753298570701376952709727391", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 307.470246050318322489781182863190127, "307.470246050318322489781182863190127", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 805.140686101151538537565264188630079, "805.140686101151538537565264188630079", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1439.12019760292146454787601409644413, "1439.12019760292146454787601409644413", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1735.6105285756048831268586001383127, "1735.6105285756048831268586001383127", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1348.32500712856328019355198611280536, "1348.32500712856328019355198611280536", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 607.225985860570846699704222144650563, "607.225985860570846699704222144650563", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 119.952317857277045332558673164517227, "119.952317857277045332558673164517227", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000140165918355036060868680809129436084, "0.000140165918355036060868680809129436084", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + + + static const T P_8_16[] = { + boost::math::tools::make_big_value( -0.184828315274146610610872315609837439e-19, "-0.184828315274146610610872315609837439e-19", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.500000000000000004122475157735807738, "0.500000000000000004122475157735807738", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.02533865247313349284875558880415875, "3.02533865247313349284875558880415875", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 13.5995927517457371243039532492642734, "13.5995927517457371243039532492642734", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 35.3132224283087906757037999452941588, "35.3132224283087906757037999452941588", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 67.1639424550714159157603179911505619, "67.1639424550714159157603179911505619", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 83.5767733658513967581959839367419891, "83.5767733658513967581959839367419891", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 71.073491212235705900866411319363501, "71.073491212235705900866411319363501", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 35.8621515614725564575893663483998663, "35.8621515614725564575893663483998663", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.72152231639983491987779743154333318, "8.72152231639983491987779743154333318", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_8_16[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 5.71734397161293452310624822415866372, "5.71734397161293452310624822415866372", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 25.293404179620438179337103263274815, "25.293404179620438179337103263274815", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 62.2619767967468199111077640625328469, "62.2619767967468199111077640625328469", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 113.955048909238993473389714972250235, "113.955048909238993473389714972250235", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 130.807138328938966981862203944329408, "130.807138328938966981862203944329408", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 102.423146902337654110717764213057753, "102.423146902337654110717764213057753", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 44.0424772805245202514468199602123565, "44.0424772805245202514468199602123565", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.89898032477904072082994913461386099, "8.89898032477904072082994913461386099", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0296627336872039988632793863671456398, "-0.0296627336872039988632793863671456398", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + + + static const T P_16_inf[] = { + boost::math::tools::make_big_value( 0.0, "0.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.500000000000000000000000000000087317, "0.500000000000000000000000000000087317", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.345625669885456215194494735902663968, "0.345625669885456215194494735902663968", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 9.62895499360842232127552650044647769, "9.62895499360842232127552650044647769", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.5936085382439026269301003761320812, "3.5936085382439026269301003761320812", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 49.459599118438883265036646019410669, "49.459599118438883265036646019410669", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 7.77519237321893917784735690560496607, "7.77519237321893917784735690560496607", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 74.4536074488178075948642351179304121, "74.4536074488178075948642351179304121", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.75209340397069050436806159297952699, "2.75209340397069050436806159297952699", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 23.9292359711471667884504840186561598, "23.9292359711471667884504840186561598", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q_16_inf[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.357918006437579097055656138920742037, "0.357918006437579097055656138920742037", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 19.1386039850709849435325005484512944, "19.1386039850709849435325005484512944", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.874349081464143606016221431763364517, "0.874349081464143606016221431763364517", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 98.6516097434855572678195488061432509, "98.6516097434855572678195488061432509", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -16.1051972833382893468655223662534306, "-16.1051972833382893468655223662534306", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 154.316860216253720989145047141653727, "154.316860216253720989145047141653727", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -40.2026880424378986053105969312264534, "-40.2026880424378986053105969312264534", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 60.1679136674264778074736441126810223, "60.1679136674264778074736441126810223", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -13.3414844622256422644504472438320114, "-13.3414844622256422644504472438320114", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.53795636200649908779512969030363442, "2.53795636200649908779512969030363442", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + + if(x <= 2) + { + return (2 + boost::math::tools::evaluate_polynomial(P_1_2, x) / tools::evaluate_polynomial(Q_1_2, x)) / (x * x); + } + else if(x <= 4) + { + return (y_offset_2_4 + boost::math::tools::evaluate_polynomial(P_2_4, x) / tools::evaluate_polynomial(Q_2_4, x)) / (x * x); + } + else if(x <= 8) + { + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_4_8, y) / tools::evaluate_polynomial(Q_4_8, y)) / x; + } + else if(x <= 16) + { + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_8_16, y) / tools::evaluate_polynomial(Q_8_16, y)) / x; + } + T y = 1 / x; + return (1 + tools::evaluate_polynomial(P_16_inf, y) / tools::evaluate_polynomial(Q_16_inf, y)) / x; +} + +template +T trigamma_imp(T x, const Tag* t, const Policy& pol) +{ + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 0; + + + + if(x <= 0) + { + + T z = 1 - x; + + if(floor(x) == x) + { + return policies::raise_pole_error("boost::math::trigamma<%1%>(%1%)", 0, (1-x), pol); + } + T s = fabs(x) < fabs(z) ? boost::math::sin_pi(x, pol) : boost::math::sin_pi(z, pol); + return -trigamma_imp(z, t, pol) + boost::math::pow<2>(constants::pi()) / (s * s); + } + if(x < 1) + { + result = 1 / (x * x); + x += 1; + } + return result + trigamma_prec(x, t, pol); +} + +template +T trigamma_imp(T x, const std::integral_constant*, const Policy& pol) +{ + return polygamma_imp(1, x, pol); +} + + + +template +struct trigamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + do_init(std::integral_constant()); + } + void do_init(const std::true_type&) + { + boost::math::trigamma(T(2.5), Policy()); + } + void do_init(const std::false_type&){} + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename trigamma_initializer::init trigamma_initializer::initializer; + +} + +export template +inline typename tools::promote_args::type + trigamma(T x, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + + detail::trigamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::trigamma_imp( + static_cast(x), + static_cast(0), forwarding_policy()), "boost::math::trigamma<%1%>(%1%)"); +} + +export template +inline typename tools::promote_args::type + trigamma(T x) +{ + return trigamma(x, policies::policy<>()); +} + +} +} +# 17 "../../../../boost/math/special_functions/polygamma.hpp" 2 + +namespace boost { namespace math { + + + template + inline typename tools::promote_args::type polygamma(const int n, T x, const Policy& pol) + { + + + + if(n == 0) + return boost::math::digamma(x, pol); + if(n == 1) + return boost::math::trigamma(x, pol); + + + + + + + + + + + typedef typename tools::promote_args::type result_type; + + + + + typedef typename policies::evaluation::type value_type; +# 57 "../../../../boost/math/special_functions/polygamma.hpp" + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + + + + + + return policies::checked_narrowing_cast( + detail::polygamma_imp(n, static_cast(x), forwarding_policy()), + "boost::math::polygamma<%1%>(int, %1%)"); + } + + template + inline typename tools::promote_args::type polygamma(const int n, T x) + { + return boost::math::polygamma(n, x, policies::policy<>()); + } + +} } +# 38 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 59 "../../../../boost/math/special_functions/gamma.hpp" +namespace boost{ namespace math{ + +namespace detail{ + +template +inline bool is_odd(T v, const std::true_type&) +{ + int i = static_cast(v); + return i&1; +} +template +inline bool is_odd(T v, const std::false_type&) +{ + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T modulus = v - 2 * floor(v/2); + return static_cast(modulus != 0); +} +template +inline bool is_odd(T v) +{ + return is_odd(v, ::std::is_convertible()); +} + +template +T sinpx(T z) +{ + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + int sign = 1; + if(z < 0) + { + z = -z; + } + T fl = floor(z); + T dist; + if(is_odd(fl)) + { + fl += 1; + dist = fl - z; + sign = -sign; + } + else + { + dist = z - fl; + } + +# 106 "../../../../boost/math/special_functions/gamma.hpp" 3 + (void) ((!!( +# 106 "../../../../boost/math/special_functions/gamma.hpp" + fl >= 0 +# 106 "../../../../boost/math/special_functions/gamma.hpp" 3 + )) || (_assert( +# 106 "../../../../boost/math/special_functions/gamma.hpp" + "fl >= 0" +# 106 "../../../../boost/math/special_functions/gamma.hpp" 3 + ,"../../../../boost/math/special_functions/gamma.hpp",106),0)) +# 106 "../../../../boost/math/special_functions/gamma.hpp" + ; + if(dist > 0.5) + dist = 1 - dist; + T result = sin(dist*boost::math::constants::pi()); + return sign*z*result; +} + + + +template +T gamma_imp(T z, const Policy& pol, const Lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 1; +# 130 "../../../../boost/math/special_functions/gamma.hpp" + static const char* function = "boost::math::tgamma<%1%>(%1%)"; + + if(z <= 0) + { + if(floor(z) == z) + return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); + if(z <= -20) + { + result = gamma_imp(T(-z), pol, l) * sinpx(z); + ; + if((fabs(result) < 1) && (tools::max_value() * fabs(result) < boost::math::constants::pi())) + return -boost::math::sign(result) * policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + result = -boost::math::constants::pi() / result; + if(result == 0) + return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); + if((boost::math::fpclassify)(result) == (int) +# 145 "../../../../boost/math/special_functions/gamma.hpp" 3 + (0x0400 | 0x4000) +# 145 "../../../../boost/math/special_functions/gamma.hpp" + ) + return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); + ; + return result; + } + + + while(z < 0) + { + result /= z; + z += 1; + } + } + ; + if((floor(z) == z) && (z < max_factorial::value)) + { + result *= unchecked_factorial(itrunc(z, pol) - 1); + ; + } + else if (z < tools::root_epsilon()) + { + if (z < 1 / tools::max_value()) + result = policies::raise_overflow_error(function, 0, pol); + result *= 1 / z - constants::euler(); + } + else + { + result *= Lanczos::lanczos_sum(z); + T zgh = (z + static_cast(Lanczos::g()) - boost::math::constants::half()); + T lzgh = log(zgh); + ; + ; + if(z * lzgh > tools::log_max_value()) + { + + ; + if(lzgh * z / 2 > tools::log_max_value()) + return boost::math::sign(result) * policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + T hp = pow(zgh, (z / 2) - T(0.25)); + ; + result *= hp / exp(zgh); + ; + if(tools::max_value() / hp < result) + return boost::math::sign(result) * policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + result *= hp; + ; + } + else + { + ; + ; + ; + result *= pow(zgh, z - boost::math::constants::half()) / exp(zgh); + ; + } + } + return result; +} + + + +template +T lgamma_imp(T z, const Policy& pol, const Lanczos& l, int* sign = 0) +{ +# 218 "../../../../boost/math/special_functions/gamma.hpp" + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::lgamma<%1%>(%1%)"; + + T result = 0; + int sresult = 1; + if(z <= -tools::root_epsilon()) + { + + if(floor(z) == z) + return policies::raise_pole_error(function, "Evaluation of lgamma at a negative integer %1%.", z, pol); + + T t = sinpx(z); + z = -z; + if(t < 0) + { + t = -t; + } + else + { + sresult = -sresult; + } + result = log(boost::math::constants::pi()) - lgamma_imp(z, pol, l) - log(t); + } + else if (z < tools::root_epsilon()) + { + if (0 == z) + return policies::raise_pole_error(function, "Evaluation of lgamma at %1%.", z, pol); + if (4 * fabs(z) < tools::epsilon()) + result = -log(fabs(z)); + else + result = log(fabs(1 / z - constants::euler())); + if (z < 0) + sresult = -1; + } + else if(z < 15) + { + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + + result = lgamma_small_imp(z, T(z - 1), T(z - 2), tag_type(), pol, l); + } + else if((z >= 3) && (z < 100) && (std::numeric_limits::max_exponent >= 1024)) + { + + result = log(gamma_imp(z, pol, l)); + } + else + { + + T zgh = static_cast(z + Lanczos::g() - boost::math::constants::half()); + result = log(zgh) - 1; + result *= z - 0.5f; + + + + if(result * tools::epsilon() < 20) + result += log(Lanczos::lanczos_sum_expG_scaled(z)); + } + + if(sign) + *sign = sresult; + return result; +} + + + + +template +struct upper_incomplete_gamma_fract +{ +private: + T z, a; + int k; +public: + typedef std::pair result_type; + + upper_incomplete_gamma_fract(T a1, T z1) + : z(z1-a1+1), a(a1), k(0) + { + } + + result_type operator()() + { + ++k; + z += 2; + return result_type(k * (a - k), z); + } +}; + +template +inline T upper_gamma_fraction(T a, T z, T eps) +{ + + + + upper_incomplete_gamma_fract f(a, z); + return 1 / (z - a + 1 + boost::math::tools::continued_fraction_a(f, eps)); +} + +template +struct lower_incomplete_gamma_series +{ +private: + T a, z, result; +public: + typedef T result_type; + lower_incomplete_gamma_series(T a1, T z1) : a(a1), z(z1), result(1){} + + T operator()() + { + T r = result; + a += 1; + result *= z/a; + return r; + } +}; + +template +inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0) +{ + + + + lower_incomplete_gamma_series s(a, z); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + T factor = policies::get_epsilon(); + T result = boost::math::tools::sum_series(s, factor, max_iter, init_value); + policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol); + return result; +} + + + + + +template +std::size_t highest_bernoulli_index() +{ + const float digits10_of_type = (std::numeric_limits::is_specialized + ? static_cast(std::numeric_limits::digits10) + : static_cast(boost::math::tools::digits() * 0.301F)); + + + return static_cast(18.0F + (0.6F * digits10_of_type)); +} + +template +int minimum_argument_for_bernoulli_recursion() +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + const float digits10_of_type = (std::numeric_limits::is_specialized + ? (float) std::numeric_limits::digits10 + : (float) (boost::math::tools::digits() * 0.301F)); + + int min_arg = (int) (digits10_of_type * 1.7F); + + if(digits10_of_type < 50.0F) + { +# 394 "../../../../boost/math/special_functions/gamma.hpp" + const float d2_minus_one = ((digits10_of_type / 0.301F) - 1.0F); + const float limit = ceil(exp((d2_minus_one * log(2.0F)) / 20.0F)); + + min_arg = (int) ((std::min)(digits10_of_type * 1.7F, limit)); + } + + return min_arg; +} + +template +T scaled_tgamma_no_lanczos(const T& z, const Policy& pol, bool islog = false) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + + + +# 412 "../../../../boost/math/special_functions/gamma.hpp" 3 + (void) ((!!( +# 412 "../../../../boost/math/special_functions/gamma.hpp" + minimum_argument_for_bernoulli_recursion() <= z +# 412 "../../../../boost/math/special_functions/gamma.hpp" 3 + )) || (_assert( +# 412 "../../../../boost/math/special_functions/gamma.hpp" + "minimum_argument_for_bernoulli_recursion() <= z" +# 412 "../../../../boost/math/special_functions/gamma.hpp" 3 + ,"../../../../boost/math/special_functions/gamma.hpp",412),0)) +# 412 "../../../../boost/math/special_functions/gamma.hpp" + ; + + + + const std::size_t number_of_bernoullis_b2n = policies::get_max_series_iterations(); + + T one_over_x_pow_two_n_minus_one = 1 / z; + const T one_over_x2 = one_over_x_pow_two_n_minus_one * one_over_x_pow_two_n_minus_one; + T sum = (boost::math::bernoulli_b2n(1) / 2) * one_over_x_pow_two_n_minus_one; + const T target_epsilon_to_break_loop = sum * boost::math::tools::epsilon(); + const T half_ln_two_pi_over_z = sqrt(boost::math::constants::two_pi() / z); + T last_term = 2 * sum; + + for (std::size_t n = 2U;; ++n) + { + one_over_x_pow_two_n_minus_one *= one_over_x2; + + const std::size_t n2 = static_cast(n * 2U); + + const T term = (boost::math::bernoulli_b2n(static_cast(n)) * one_over_x_pow_two_n_minus_one) / (n2 * (n2 - 1U)); + + if ((n >= 3U) && (abs(term) < target_epsilon_to_break_loop)) + { + + + + + + break; + } + if (n > number_of_bernoullis_b2n) + return policies::raise_evaluation_error("scaled_tgamma_no_lanczos<%1%>()", "Exceeded maximum series iterations without reaching convergence, best approximation was %1%", T(exp(sum) * half_ln_two_pi_over_z), pol); + + sum += term; + + + T fterm = fabs(term); + if(fterm > last_term) + return policies::raise_evaluation_error("scaled_tgamma_no_lanczos<%1%>()", "Series became divergent without reaching convergence, best approximation was %1%", T(exp(sum) * half_ln_two_pi_over_z), pol); + last_term = fterm; + } + + + T scaled_gamma_value = islog ? T(sum + log(half_ln_two_pi_over_z)) : T(exp(sum) * half_ln_two_pi_over_z); + return scaled_gamma_value; +} + + +template +T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign = 0); + +template +T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::tgamma<%1%>(%1%)"; + + + const bool is_at_zero = (z == 0); + + if((boost::math::isnan)(z) || (is_at_zero) || ((boost::math::isinf)(z) && (z < 0))) + return policies::raise_domain_error(function, "Evaluation of tgamma at %1%.", z, pol); + + const bool b_neg = (z < 0); + + const bool floor_of_z_is_equal_to_z = (floor(z) == z); + + + if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial::value)) + { + return boost::math::unchecked_factorial(itrunc(z) - 1); + } + + + T zz((!b_neg) ? z : -z); + + + if(zz < tools::cbrt_epsilon()) + { + const T a0(1); + const T a1(boost::math::constants::euler()); + const T six_euler_squared((boost::math::constants::euler() * boost::math::constants::euler()) * 6); + const T a2((six_euler_squared - boost::math::constants::pi_sqr()) / 12); + + const T inverse_tgamma_series = z * ((a2 * z + a1) * z + a0); + + return 1 / inverse_tgamma_series; + } + + + + const int min_arg_for_recursion = minimum_argument_for_bernoulli_recursion(); + + int n_recur; + + if(zz < min_arg_for_recursion) + { + n_recur = boost::math::itrunc(min_arg_for_recursion - zz) + 1; + + zz += n_recur; + } + else + { + n_recur = 0; + } + if (!n_recur) + { + if (zz > tools::log_max_value()) + return policies::raise_overflow_error(function, 0, pol); + if (log(zz) * zz / 2 > tools::log_max_value()) + return policies::raise_overflow_error(function, 0, pol); + } + T gamma_value = scaled_tgamma_no_lanczos(zz, pol); + T power_term = pow(zz, zz / 2); + T exp_term = exp(-zz); + gamma_value *= (power_term * exp_term); + if(!n_recur && (tools::max_value() / power_term < gamma_value)) + return policies::raise_overflow_error(function, 0, pol); + gamma_value *= power_term; + + + if(n_recur) + { + + + + + + zz = fabs(z) + 1; + for(int k = 1; k < n_recur; ++k) + { + gamma_value /= zz; + zz += 1; + } + gamma_value /= fabs(z); + } + + + if(b_neg) + { + + + + + + if(floor_of_z_is_equal_to_z) + return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); + + gamma_value *= sinpx(z); + + ; + + const bool result_is_too_large_to_represent = ( (abs(gamma_value) < 1) + && ((tools::max_value() * abs(gamma_value)) < boost::math::constants::pi())); + + if(result_is_too_large_to_represent) + return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); + + gamma_value = -boost::math::constants::pi() / gamma_value; + ; + + if(gamma_value == 0) + return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); + + if((boost::math::fpclassify)(gamma_value) == static_cast( +# 577 "../../../../boost/math/special_functions/gamma.hpp" 3 + (0x0400 | 0x4000) +# 577 "../../../../boost/math/special_functions/gamma.hpp" + )) + return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", gamma_value, pol); + } + + return gamma_value; +} + +template +inline T log_gamma_near_1(const T& z, Policy const& pol) +{ + + + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + +# 594 "../../../../boost/math/special_functions/gamma.hpp" 3 + (void) ((!!( +# 594 "../../../../boost/math/special_functions/gamma.hpp" + fabs(z) < 1 +# 594 "../../../../boost/math/special_functions/gamma.hpp" 3 + )) || (_assert( +# 594 "../../../../boost/math/special_functions/gamma.hpp" + "fabs(z) < 1" +# 594 "../../../../boost/math/special_functions/gamma.hpp" 3 + ,"../../../../boost/math/special_functions/gamma.hpp",594),0)) +# 594 "../../../../boost/math/special_functions/gamma.hpp" + ; + + T result = -constants::euler() * z; + + T power_term = z * z / 2; + int n = 2; + T term = 0; + + do + { + term = power_term * boost::math::polygamma(n - 1, T(1), pol); + result += term; + ++n; + power_term *= z / n; + } while (fabs(result) * tools::epsilon() < fabs(term)); + + return result; +} + +template +T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::lgamma<%1%>(%1%)"; + + + const bool is_at_zero = (z == 0); + + if(is_at_zero) + return policies::raise_domain_error(function, "Evaluation of lgamma at zero %1%.", z, pol); + if((boost::math::isnan)(z)) + return policies::raise_domain_error(function, "Evaluation of lgamma at %1%.", z, pol); + if((boost::math::isinf)(z)) + return policies::raise_overflow_error(function, 0, pol); + + const bool b_neg = (z < 0); + + const bool floor_of_z_is_equal_to_z = (floor(z) == z); + + + if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial::value)) + { + if (sign) + *sign = 1; + return log(boost::math::unchecked_factorial(itrunc(z) - 1)); + } + + + T zz((!b_neg) ? z : -z); + + const int min_arg_for_recursion = minimum_argument_for_bernoulli_recursion(); + + T log_gamma_value; + + if (zz < min_arg_for_recursion) + { + + + + if (sign) + * sign = 1; + if(fabs(z - 1) < 0.25) + { + log_gamma_value = log_gamma_near_1(T(zz - 1), pol); + } + else if(fabs(z - 2) < 0.25) + { + log_gamma_value = log_gamma_near_1(T(zz - 2), pol) + log(zz - 1); + } + else if (z > -tools::root_epsilon()) + { + + + if (sign) + *sign = z < 0 ? -1 : 1; + return log(abs(gamma_imp(z, pol, lanczos::undefined_lanczos()))); + } + else + { + + + T g = gamma_imp(zz, pol, lanczos::undefined_lanczos()); + if (sign) + { + *sign = g < 0 ? -1 : 1; + } + log_gamma_value = log(abs(g)); + } + } + else + { + + T sum = scaled_tgamma_no_lanczos(zz, pol, true); + log_gamma_value = zz * (log(zz) - 1) + sum; + } + + int sign_of_result = 1; + + if(b_neg) + { + + + + + if(floor_of_z_is_equal_to_z) + return policies::raise_pole_error(function, "Evaluation of lgamma at a negative integer %1%.", z, pol); + + T t = sinpx(z); + + if(t < 0) + { + t = -t; + } + else + { + sign_of_result = -sign_of_result; + } + + log_gamma_value = - log_gamma_value + + log(boost::math::constants::pi()) + - log(t); + } + + if(sign != static_cast(0U)) { *sign = sign_of_result; } + + return log_gamma_value; +} + + + + + +template +T tgammap1m1_imp(T dz, Policy const& pol, const Lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename policies::precision::type precision_type; + + typedef std::integral_constant tag_type; + + T result; + if(dz < 0) + { + if(dz < -0.5) + { + + result = boost::math::tgamma(1+dz, pol) - 1; + ; + } + else + { + + result = boost::math::expm1(-boost::math::log1p(dz, pol) + + lgamma_small_imp(dz+2, dz + 1, dz, tag_type(), pol, l), pol); + ; + } + } + else + { + if(dz < 2) + { + + result = boost::math::expm1(lgamma_small_imp(dz+1, dz, dz-1, tag_type(), pol, l), pol); + ; + } + else + { + + result = boost::math::tgamma(1+dz, pol) - 1; + ; + } + } + + return result; +} + +template +inline T tgammap1m1_imp(T z, Policy const& pol, + const ::boost::math::lanczos::undefined_lanczos&) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if(fabs(z) < 0.55) + { + return boost::math::expm1(log_gamma_near_1(z, pol)); + } + return boost::math::expm1(boost::math::lgamma(1 + z, pol)); +} + + + + +template +struct small_gamma2_series +{ + typedef T result_type; + + small_gamma2_series(T a_, T x_) : result(-x_), x(-x_), apn(a_+1), n(1){} + + T operator()() + { + T r = result / (apn); + result *= x; + result /= ++n; + apn += 1; + return r; + } + +private: + T result, x, apn; + int n; +}; + + + + +template +T full_igamma_prefix(T a, T z, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T prefix; + if (z > tools::max_value()) + return 0; + T alz = a * log(z); + + if(z >= 1) + { + if((alz < tools::log_max_value()) && (-z > tools::log_min_value())) + { + prefix = pow(z, a) * exp(-z); + } + else if(a >= 1) + { + prefix = pow(z / exp(z/a), a); + } + else + { + prefix = exp(alz - z); + } + } + else + { + if(alz > tools::log_min_value()) + { + prefix = pow(z, a) * exp(-z); + } + else if(z/a < tools::log_max_value()) + { + prefix = pow(z / exp(z/a), a); + } + else + { + prefix = exp(alz - z); + } + } + + + + + if((boost::math::fpclassify)(prefix) == (int) +# 860 "../../../../boost/math/special_functions/gamma.hpp" 3 + (0x0100 | 0x0400) +# 860 "../../../../boost/math/special_functions/gamma.hpp" + ) + return policies::raise_overflow_error("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol); + + return prefix; +} + + + + +template +T regularised_gamma_prefix(T a, T z, const Policy& pol, const Lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if (z >= tools::max_value()) + return 0; + T agh = a + static_cast(Lanczos::g()) - T(0.5); + T prefix; + T d = ((z - a) - static_cast(Lanczos::g()) + T(0.5)) / agh; + + if(a < 1) + { +# 890 "../../../../boost/math/special_functions/gamma.hpp" + if(z <= tools::log_min_value()) + { + + return exp(a * log(z) - z - lgamma_imp(a, pol, l)); + } + else + { + + + return pow(z, a) * exp(-z) / gamma_imp(a, pol, l); + } + } + else if((fabs(d*d*a) <= 100) && (a > 150)) + { + + prefix = a * boost::math::log1pmx(d, pol) + z * static_cast(0.5 - Lanczos::g()) / agh; + prefix = exp(prefix); + } + else + { + + + + + + T alz = a * log(z / agh); + T amz = a - z; + if(((std::min)(alz, amz) <= tools::log_min_value()) || ((std::max)(alz, amz) >= tools::log_max_value())) + { + T amza = amz / a; + if(((std::min)(alz, amz)/2 > tools::log_min_value()) && ((std::max)(alz, amz)/2 < tools::log_max_value())) + { + + T sq = pow(z / agh, a / 2) * exp(amz / 2); + prefix = sq * sq; + } + else if(((std::min)(alz, amz)/4 > tools::log_min_value()) && ((std::max)(alz, amz)/4 < tools::log_max_value()) && (z > a)) + { + + T sq = pow(z / agh, a / 4) * exp(amz / 4); + prefix = sq * sq; + prefix *= prefix; + } + else if((amza > tools::log_min_value()) && (amza < tools::log_max_value())) + { + prefix = pow((z * exp(amza)) / agh, a); + } + else + { + prefix = exp(alz + amz); + } + } + else + { + prefix = pow(z / agh, a) * exp(amz); + } + } + prefix *= sqrt(agh / boost::math::constants::e()) / Lanczos::lanczos_sum_expG_scaled(a); + return prefix; +} + + + +template +T regularised_gamma_prefix(T a, T z, const Policy& pol, const lanczos::undefined_lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if((a < 1) && (z < 1)) + { + + return pow(z, a) * exp(-z) / boost::math::tgamma(a, pol); + } + else if(a > minimum_argument_for_bernoulli_recursion()) + { + T scaled_gamma = scaled_tgamma_no_lanczos(a, pol); + T power_term = pow(z / a, a / 2); + T a_minus_z = a - z; + if ((0 == power_term) || (fabs(a_minus_z) > tools::log_max_value())) + { + + return exp(a * log(z / a) + a_minus_z - log(scaled_gamma)); + } + return (power_term * exp(a_minus_z)) * (power_term / scaled_gamma); + } + else + { + + + + + const int min_z = minimum_argument_for_bernoulli_recursion(); + long shift = 1 + ltrunc(min_z - a); + T result = regularised_gamma_prefix(T(a + shift), z, pol, l); + if (result != 0) + { + for (long i = 0; i < shift; ++i) + { + result /= z; + result *= a + i; + } + return result; + } + else + { + + + + + + T scaled_gamma = scaled_tgamma_no_lanczos(T(a + shift), pol); + T power_term_1 = pow(z / (a + shift), a); + T power_term_2 = pow(a + shift, -shift); + T power_term_3 = exp(a + shift - z); + if ((0 == power_term_1) || (0 == power_term_2) || (0 == power_term_3) || (fabs(a + shift - z) > tools::log_max_value())) + { + + + return exp(a * log(z) - z - boost::math::lgamma(a, pol)); + } + result = power_term_1 * power_term_2 * power_term_3 / scaled_gamma; + for (long i = 0; i < shift; ++i) + { + result *= a + i; + } + return result; + } + } +} + + + +template +inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool invert = false, T* pderivative = 0) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + T result; + result = boost::math::tgamma1pm1(a, pol); + if(pgam) + *pgam = (result + 1) / a; + T p = boost::math::powm1(x, a, pol); + result -= p; + result /= a; + detail::small_gamma2_series s(a, x); + std::uintmax_t max_iter = policies::get_max_series_iterations() - 10; + p += 1; + if(pderivative) + *pderivative = p / (*pgam * exp(x)); + T init_value = invert ? *pgam : 0; + result = -p * tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, (init_value - result) / p); + policies::check_series_iterations("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol); + if(invert) + result = -result; + return result; +} + + + +template +inline T finite_gamma_q(T a, T x, Policy const& pol, T* pderivative = 0) +{ + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T e = exp(-x); + T sum = e; + if(sum != 0) + { + T term = sum; + for(unsigned n = 1; n < a; ++n) + { + term /= n; + term *= x; + sum += term; + } + } + if(pderivative) + { + *pderivative = e * pow(x, a) / boost::math::unchecked_factorial(itrunc(T(a - 1), pol)); + } + return sum; +} + + + +template +T finite_half_gamma_q(T a, T x, T* p_derivative, const Policy& pol) +{ + + + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T e = boost::math::erfc(sqrt(x), pol); + if((e != 0) && (a > 1)) + { + T term = exp(-x) / sqrt(constants::pi() * x); + term *= x; + static const T half = T(1) / 2; + term /= half; + T sum = term; + for(unsigned n = 2; n < a; ++n) + { + term /= n - half; + term *= x; + sum += term; + } + e += sum; + if(p_derivative) + { + *p_derivative = 0; + } + } + else if(p_derivative) + { + + *p_derivative = sqrt(x) * exp(-x) / constants::root_pi(); + } + return e; +} + + + +template +struct incomplete_tgamma_large_x_series +{ + typedef T result_type; + incomplete_tgamma_large_x_series(const T& a, const T& x) + : a_poch(a - 1), z(x), term(1) {} + T operator()() + { + T result = term; + term *= a_poch / z; + a_poch -= 1; + return result; + } + T a_poch, z, term; +}; + +template +T incomplete_tgamma_large_x(const T& a, const T& x, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + incomplete_tgamma_large_x_series s(a, x); + std::uintmax_t max_iter = boost::math::policies::get_max_series_iterations(); + T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); + boost::math::policies::check_series_iterations("boost::math::tgamma<%1%>(%1%,%1%)", max_iter, pol); + return result; +} + + + + + +template +T gamma_incomplete_imp(T a, T x, bool normalised, bool invert, + const Policy& pol, T* p_derivative) +{ + static const char* function = "boost::math::gamma_p<%1%>(%1%, %1%)"; + if(a <= 0) + return policies::raise_domain_error(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol); + if(x < 0) + return policies::raise_domain_error(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol); + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + typedef typename lanczos::lanczos::type lanczos_type; + + T result = 0; + + if(a >= max_factorial::value && !normalised) + { +# 1175 "../../../../boost/math/special_functions/gamma.hpp" + if(invert && (a * 4 < x)) + { + + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + result += log(upper_gamma_fraction(a, x, policies::get_epsilon())); + } + else if(!invert && (a > 4 * x)) + { + + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + T init_value = 0; + result += log(detail::lower_gamma_series(a, x, pol, init_value) / a); + } + else + { + result = gamma_incomplete_imp(a, x, true, invert, pol, p_derivative); + if(result == 0) + { + if(invert) + { + + result = 1 + 1 / (12 * a) + 1 / (288 * a * a); + result = log(result) - a + (a - 0.5f) * log(a) + log(boost::math::constants::root_two_pi()); + if(p_derivative) + *p_derivative = exp(a * log(x) - x); + } + else + { + + + + result = a * log(x) - x; + if(p_derivative) + *p_derivative = exp(result); + T init_value = 0; + result += log(detail::lower_gamma_series(a, x, pol, init_value) / a); + } + } + else + { + result = log(result) + boost::math::lgamma(a, pol); + } + } + if(result > tools::log_max_value()) + return policies::raise_overflow_error(function, 0, pol); + return exp(result); + } + + +# 1227 "../../../../boost/math/special_functions/gamma.hpp" 3 + (void) ((!!( +# 1227 "../../../../boost/math/special_functions/gamma.hpp" + (p_derivative == 0) || normalised +# 1227 "../../../../boost/math/special_functions/gamma.hpp" 3 + )) || (_assert( +# 1227 "../../../../boost/math/special_functions/gamma.hpp" + "(p_derivative == 0) || normalised" +# 1227 "../../../../boost/math/special_functions/gamma.hpp" 3 + ,"../../../../boost/math/special_functions/gamma.hpp",1227),0)) +# 1227 "../../../../boost/math/special_functions/gamma.hpp" + ; + + bool is_int, is_half_int; + bool is_small_a = (a < 30) && (a <= x + 1) && (x < tools::log_max_value()); + if(is_small_a) + { + T fa = floor(a); + is_int = (fa == a); + is_half_int = is_int ? false : (fabs(fa - a) == 0.5f); + } + else + { + is_int = is_half_int = false; + } + + int eval_method; + + if(is_int && (x > 0.6)) + { + + invert = !invert; + eval_method = 0; + } + else if(is_half_int && (x > 0.2)) + { + + invert = !invert; + eval_method = 1; + } + else if((x < tools::root_epsilon()) && (a > 1)) + { + eval_method = 6; + } + else if ((x > 1000) && ((a < x) || (fabs(a - 50) / x < 1))) + { + + invert = !invert; + eval_method = 7; + } + else if(x < 0.5) + { + + + + if(-0.4 / log(x) < a) + { + eval_method = 2; + } + else + { + eval_method = 3; + } + } + else if(x < 1.1) + { + + + + if(x * 0.75f < a) + { + eval_method = 2; + } + else + { + eval_method = 3; + } + } + else + { + + + + + + bool use_temme = false; + if(normalised && std::numeric_limits::is_specialized && (a > 20)) + { + T sigma = fabs((x-a)/a); + if((a > 200) && (policies::digits() <= 113)) + { +# 1315 "../../../../boost/math/special_functions/gamma.hpp" + if(20 / a > sigma * sigma) + use_temme = true; + } + else if(policies::digits() <= 64) + { + + + + if(sigma < 0.4) + use_temme = true; + } + } + if(use_temme) + { + eval_method = 5; + } + else + { +# 1341 "../../../../boost/math/special_functions/gamma.hpp" + if(x - (1 / (3 * x)) < a) + { + eval_method = 2; + } + else + { + eval_method = 4; + invert = !invert; + } + } + } + + switch(eval_method) + { + case 0: + { + result = finite_gamma_q(a, x, pol, p_derivative); + if(!normalised) + result *= boost::math::tgamma(a, pol); + break; + } + case 1: + { + result = finite_half_gamma_q(a, x, p_derivative, pol); + if(!normalised) + result *= boost::math::tgamma(a, pol); + if(p_derivative && (*p_derivative == 0)) + *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); + break; + } + case 2: + { + + result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol); + if(p_derivative) + *p_derivative = result; + if(result != 0) + { +# 1391 "../../../../boost/math/special_functions/gamma.hpp" + T init_value = 0; + bool optimised_invert = false; + if(invert) + { + init_value = (normalised ? 1 : boost::math::tgamma(a, pol)); + if(normalised || (result >= 1) || (tools::max_value() * result > init_value)) + { + init_value /= result; + if(normalised || (a < 1) || (tools::max_value() / a > init_value)) + { + init_value *= -a; + optimised_invert = true; + } + else + init_value = 0; + } + else + init_value = 0; + } + result *= detail::lower_gamma_series(a, x, pol, init_value) / a; + if(optimised_invert) + { + invert = false; + result = -result; + } + } + break; + } + case 3: + { + + invert = !invert; + T g; + result = tgamma_small_upper_part(a, x, pol, &g, invert, p_derivative); + invert = false; + if(normalised) + result /= g; + break; + } + case 4: + { + + result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol); + if(p_derivative) + *p_derivative = result; + if(result != 0) + result *= upper_gamma_fraction(a, x, policies::get_epsilon()); + break; + } + case 5: + { +# 1450 "../../../../boost/math/special_functions/gamma.hpp" + typedef typename policies::precision::type precision_type; + + typedef std::integral_constant tag_type; + + result = igamma_temme_large(a, x, pol, static_cast(0)); + if(x >= a) + invert = !invert; + if(p_derivative) + *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); + break; + } + case 6: + { + + + if(!normalised) + result = pow(x, a) / (a); + else + { + try + { + result = pow(x, a) / boost::math::tgamma(a + 1, pol); + } + catch (const std::overflow_error&) + { + result = 0; + } + } + result *= 1 - a * x / (a + 1); + if (p_derivative) + *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); + break; + } + case 7: + { + + + result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol); + if (p_derivative) + *p_derivative = result; + result /= x; + if (result != 0) + result *= incomplete_tgamma_large_x(a, x, pol); + break; + } + } + + if(normalised && (result > 1)) + result = 1; + if(invert) + { + T gam = normalised ? 1 : boost::math::tgamma(a, pol); + result = gam - result; + } + if(p_derivative) + { + + + + if((x < 1) && (tools::max_value() * x < *p_derivative)) + { + + *p_derivative = tools::max_value() / 2; + } + + *p_derivative /= x; + } + + return result; +} + + + + +template +T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const Lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + if(z < tools::epsilon()) + { +# 1544 "../../../../boost/math/special_functions/gamma.hpp" + if(boost::math::max_factorial::value < delta) + { + T ratio = tgamma_delta_ratio_imp_lanczos(delta, T(boost::math::max_factorial::value - delta), pol, l); + ratio *= z; + ratio *= boost::math::unchecked_factorial(boost::math::max_factorial::value - 1); + return 1 / ratio; + } + else + { + return 1 / (z * boost::math::tgamma(z + delta, pol)); + } + } + T zgh = static_cast(z + Lanczos::g() - constants::half()); + T result; + if(z + delta == z) + { + if (fabs(delta / zgh) < boost::math::tools::epsilon()) + { + + + + + + result = exp(-delta); + } + else + + result = 1; + } + else + { + if(fabs(delta) < 10) + { + result = exp((constants::half() - z) * boost::math::log1p(delta / zgh, pol)); + } + else + { + result = pow(zgh / (zgh + delta), z - constants::half()); + } + + result *= Lanczos::lanczos_sum(z) / Lanczos::lanczos_sum(T(z + delta)); + } + result *= pow(constants::e() / (zgh + delta), delta); + return result; +} + + + +template +T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const lanczos::undefined_lanczos& l) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; +# 1604 "../../../../boost/math/special_functions/gamma.hpp" + long numerator_shift = 0; + long denominator_shift = 0; + const int min_z = minimum_argument_for_bernoulli_recursion(); + + if (min_z > z) + numerator_shift = 1 + ltrunc(min_z - z); + if (min_z > z + delta) + denominator_shift = 1 + ltrunc(min_z - z - delta); + + + + + if (numerator_shift == 0 && denominator_shift == 0) + { + T scaled_tgamma_num = scaled_tgamma_no_lanczos(z, pol); + T scaled_tgamma_denom = scaled_tgamma_no_lanczos(T(z + delta), pol); + T result = scaled_tgamma_num / scaled_tgamma_denom; + result *= exp(z * boost::math::log1p(-delta / (z + delta), pol)) * pow((delta + z) / constants::e(), -delta); + return result; + } + + + + + T zz = z + numerator_shift; + T dd = delta - (numerator_shift - denominator_shift); + T ratio = tgamma_delta_ratio_imp_lanczos(zz, dd, pol, l); + + + + + for (long long i = 0; i < numerator_shift; ++i) + { + ratio /= (z + i); + if (i < denominator_shift) + ratio *= (z + delta + i); + } + for (long long i = numerator_shift; i < denominator_shift; ++i) + { + ratio *= (z + delta + i); + } + return ratio; +} + +template +T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if((z <= 0) || (z + delta <= 0)) + { + + return boost::math::tgamma(z, pol) / boost::math::tgamma(z + delta, pol); + } + + if(floor(delta) == delta) + { + if(floor(z) == z) + { + + + + + if((z <= max_factorial::value) && (z + delta <= max_factorial::value)) + { + return unchecked_factorial((unsigned)itrunc(z, pol) - 1) / unchecked_factorial((unsigned)itrunc(T(z + delta), pol) - 1); + } + } + if(fabs(delta) < 20) + { + + + + if(delta == 0) + return 1; + if(delta < 0) + { + z -= 1; + T result = z; + while(0 != (delta += 1)) + { + z -= 1; + result *= z; + } + return result; + } + else + { + T result = 1 / z; + while(0 != (delta -= 1)) + { + z += 1; + result /= z; + } + return result; + } + } + } + typedef typename lanczos::lanczos::type lanczos_type; + return tgamma_delta_ratio_imp_lanczos(z, delta, pol, lanczos_type()); +} + +template +T tgamma_ratio_imp(T x, T y, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + if((x <= 0) || (boost::math::isinf)(x)) + return policies::raise_domain_error("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got a=%1%).", x, pol); + if((y <= 0) || (boost::math::isinf)(y)) + return policies::raise_domain_error("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", y, pol); + + if(x <= tools::min_value()) + { + + T shift = ldexp(T(1), tools::digits()); + return shift * tgamma_ratio_imp(T(x * shift), y, pol); + } + + if((x < max_factorial::value) && (y < max_factorial::value)) + { + + return boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + } + T prefix = 1; + if(x < 1) + { + if(y < 2 * max_factorial::value) + { + + + prefix /= x; + x += 1; + while(y >= max_factorial::value) + { + y -= 1; + prefix /= y; + } + return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + } + + + + return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol)); + } + if(y < 1) + { + if(x < 2 * max_factorial::value) + { + + + prefix *= y; + y += 1; + while(x >= max_factorial::value) + { + x -= 1; + prefix *= x; + } + return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol); + } + + + + return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol)); + } + + + + return boost::math::tgamma_delta_ratio(x, y - x, pol); +} + +template +T gamma_p_derivative_imp(T a, T x, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + if(a <= 0) + return policies::raise_domain_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol); + if(x < 0) + return policies::raise_domain_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol); + + + + if(x == 0) + { + return (a > 1) ? 0 : + (a == 1) ? 1 : policies::raise_overflow_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol); + } + + + + typedef typename lanczos::lanczos::type lanczos_type; + T f1 = detail::regularised_gamma_prefix(a, x, pol, lanczos_type()); + if((x < 1) && (tools::max_value() * x < f1)) + { + + return policies::raise_overflow_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol); + } + if(f1 == 0) + { + + f1 = a * log(x) - x - lgamma(a, pol) - log(x); + f1 = exp(f1); + } + else + f1 /= x; + + return f1; +} + +template +inline typename tools::promote_args::type + tgamma(T z, const Policy& , const std::true_type) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename lanczos::lanczos::type evaluation_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + return policies::checked_narrowing_cast(detail::gamma_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)"); +} + +template +struct igamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + + typedef std::integral_constant tag_type; + + do_init(tag_type()); + } + template + static void do_init(const std::integral_constant&) + { + + + + + if(std::numeric_limits::digits) + { + boost::math::gamma_p(static_cast(400), static_cast(400), Policy()); + } + } + static void do_init(const std::integral_constant&){} + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename igamma_initializer::init igamma_initializer::initializer; + +template +struct lgamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + + do_init(tag_type()); + } + static void do_init(const std::integral_constant&) + { + boost::math::lgamma(static_cast(2.5), Policy()); + boost::math::lgamma(static_cast(1.25), Policy()); + boost::math::lgamma(static_cast(1.75), Policy()); + } + static void do_init(const std::integral_constant&) + { + boost::math::lgamma(static_cast(2.5), Policy()); + boost::math::lgamma(static_cast(1.25), Policy()); + boost::math::lgamma(static_cast(1.5), Policy()); + boost::math::lgamma(static_cast(1.75), Policy()); + } + static void do_init(const std::integral_constant&) + { + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename lgamma_initializer::init lgamma_initializer::initializer; + +template +inline typename tools::promote_args::type + tgamma(T1 a, T2 z, const Policy&, const std::false_type) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + igamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::gamma_incomplete_imp(static_cast(a), + static_cast(z), false, true, + forwarding_policy(), static_cast(0)), "boost::math::tgamma<%1%>(%1%, %1%)"); +} + +template +inline typename tools::promote_args::type + tgamma(T1 a, T2 z, const std::false_type& tag) +{ + return tgamma(a, z, policies::policy<>(), tag); +} + + +} + +export template +inline typename tools::promote_args::type + tgamma(T z) +{ + return tgamma(z, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + lgamma(T z, int* sign, const Policy&) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename lanczos::lanczos::type evaluation_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::lgamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::lgamma_imp(static_cast(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)"); +} + +export template +inline typename tools::promote_args::type + lgamma(T z, int* sign) +{ + return lgamma(z, sign, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + lgamma(T x, const Policy& pol) +{ + return ::boost::math::lgamma(x, 0, pol); +} + +export template +inline typename tools::promote_args::type + lgamma(T x) +{ + return ::boost::math::lgamma(x, 0, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + tgamma1pm1(T z, const Policy& ) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename lanczos::lanczos::type evaluation_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + return policies::checked_narrowing_cast::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)"); +} + +export template +inline typename tools::promote_args::type + tgamma1pm1(T z) +{ + return tgamma1pm1(z, policies::policy<>()); +} + + + + +export template +inline typename tools::promote_args::type + tgamma(T1 a, T2 z) +{ + + + + + typedef typename policies::is_policy::type maybe_policy; + return detail::tgamma(a, z, maybe_policy()); +} +export template +inline typename tools::promote_args::type + tgamma(T1 a, T2 z, const Policy& pol) +{ + return detail::tgamma(a, z, pol, std::false_type()); +} + + + +export template +inline typename tools::promote_args::type + tgamma_lower(T1 a, T2 z, const Policy&) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::igamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::gamma_incomplete_imp(static_cast(a), + static_cast(z), false, false, + forwarding_policy(), static_cast(0)), "tgamma_lower<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + tgamma_lower(T1 a, T2 z) +{ + return tgamma_lower(a, z, policies::policy<>()); +} + + + +export template +inline typename tools::promote_args::type + gamma_q(T1 a, T2 z, const Policy& ) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::igamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::gamma_incomplete_imp(static_cast(a), + static_cast(z), true, true, + forwarding_policy(), static_cast(0)), "gamma_q<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + gamma_q(T1 a, T2 z) +{ + return gamma_q(a, z, policies::policy<>()); +} + + + +export template +inline typename tools::promote_args::type + gamma_p(T1 a, T2 z, const Policy&) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::igamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast( + detail::gamma_incomplete_imp(static_cast(a), + static_cast(z), true, false, + forwarding_policy(), static_cast(0)), "gamma_p<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + gamma_p(T1 a, T2 z) +{ + return gamma_p(a, z, policies::policy<>()); +} + + +export template +inline typename tools::promote_args::type + tgamma_delta_ratio(T1 z, T2 delta, const Policy& ) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + return policies::checked_narrowing_cast(detail::tgamma_delta_ratio_imp(static_cast(z), static_cast(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + tgamma_delta_ratio(T1 z, T2 delta) +{ + return tgamma_delta_ratio(z, delta, policies::policy<>()); +} +export template +inline typename tools::promote_args::type + tgamma_ratio(T1 a, T2 b, const Policy&) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + return policies::checked_narrowing_cast(detail::tgamma_ratio_imp(static_cast(a), static_cast(b), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + tgamma_ratio(T1 a, T2 b) +{ + return tgamma_ratio(a, b, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + gamma_p_derivative(T1 a, T2 x, const Policy&) +{ + + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + return policies::checked_narrowing_cast(detail::gamma_p_derivative_imp(static_cast(a), static_cast(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)"); +} +export template +inline typename tools::promote_args::type + gamma_p_derivative(T1 a, T2 x) +{ + return gamma_p_derivative(a, x, policies::policy<>()); +} + +} +} + + + + + +# 1 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" 1 +# 13 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" +# 1 "../../../../boost/math/tools/tuple.hpp" 1 +# 12 "../../../../boost/math/tools/tuple.hpp" +namespace boost{ namespace math{ + +using ::std::tuple; + + +using ::std::ignore; +using ::std::make_tuple; +using ::std::tie; +using ::std::get; + + +using ::std::tuple_size; +using ::std::tuple_element; + +}} +# 14 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" 2 + + + + + + + +namespace boost{ namespace math{ + +namespace detail{ + +template +T find_inverse_s(T p, T q) +{ +# 36 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T t; + if(p < 0.5) + { + t = sqrt(-2 * log(p)); + } + else + { + t = sqrt(-2 * log(q)); + } + static const double a[4] = { 3.31125922108741, 11.6616720288968, 4.28342155967104, 0.213623493715853 }; + static const double b[5] = { 1, 6.61053765625462, 6.40691597760039, 1.27364489782223, 0.3611708101884203e-1 }; + T s = t - tools::evaluate_polynomial(a, t) / tools::evaluate_polynomial(b, t); + if(p < 0.5) + s = -s; + return s; +} + +template +T didonato_SN(T a, T x, unsigned N, T tolerance = 0) +{ +# 65 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + T sum = 1; + if(N >= 1) + { + T partial = x / (a + 1); + sum += partial; + for(unsigned i = 2; i <= N; ++i) + { + partial *= x / (a + i); + sum += partial; + if(partial < tolerance) + break; + } + } + return sum; +} + +template +inline T didonato_FN(T p, T a, T x, unsigned N, T tolerance, const Policy& pol) +{ +# 92 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T u = log(p) + boost::math::lgamma(a + 1, pol); + return exp((u + x - log(didonato_SN(a, x, N, tolerance))) / a); +} + +template +T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits) +{ +# 109 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result; + *p_has_10_digits = false; + + if(a == 1) + { + result = -log(q); + ; + } + else if(a < 1) + { + T g = boost::math::tgamma(a, pol); + T b = q * g; + ; + ; + if((b > 0.6) || ((b >= 0.45) && (a >= 0.3))) + { + + + + + + + + T u; + if((b * q > 1e-8) && (q > 1e-5)) + { + u = pow(p * g * a, 1 / a); + ; + } + else + { + u = exp((-q / a) - constants::euler()); + ; + } + result = u / (1 - (u / (a + 1))); + ; + } + else if((a < 0.3) && (b >= 0.35)) + { + + T t = exp(-constants::euler() - b); + T u = t * exp(t); + result = t * exp(u); + ; + } + else if((b > 0.15) || (a >= 0.3)) + { + + T y = -log(b); + T u = y - (1 - a) * log(y); + result = y - (1 - a) * log(u) - log(1 + (1 - a) / (1 + u)); + ; + } + else if (b > 0.1) + { + + T y = -log(b); + T u = y - (1 - a) * log(y); + result = y - (1 - a) * log(u) - log((u * u + 2 * (3 - a) * u + (2 - a) * (3 - a)) / (u * u + (5 - a) * u + 2)); + ; + } + else + { + + T y = -log(b); + T c1 = (a - 1) * log(y); + T c1_2 = c1 * c1; + T c1_3 = c1_2 * c1; + T c1_4 = c1_2 * c1_2; + T a_2 = a * a; + T a_3 = a_2 * a; + + T c2 = (a - 1) * (1 + c1); + T c3 = (a - 1) * (-(c1_2 / 2) + (a - 2) * c1 + (3 * a - 5) / 2); + T c4 = (a - 1) * ((c1_3 / 3) - (3 * a - 5) * c1_2 / 2 + (a_2 - 6 * a + 7) * c1 + (11 * a_2 - 46 * a + 47) / 6); + T c5 = (a - 1) * (-(c1_4 / 4) + + (11 * a - 17) * c1_3 / 6 + + (-3 * a_2 + 13 * a -13) * c1_2 + + (2 * a_3 - 25 * a_2 + 72 * a - 61) * c1 / 2 + + (25 * a_3 - 195 * a_2 + 477 * a - 379) / 12); + + T y_2 = y * y; + T y_3 = y_2 * y; + T y_4 = y_2 * y_2; + result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4); + ; + if(b < 1e-28f) + *p_has_10_digits = true; + } + } + else + { + + T s = find_inverse_s(p, q); + + ; + + T s_2 = s * s; + T s_3 = s_2 * s; + T s_4 = s_2 * s_2; + T s_5 = s_4 * s; + T ra = sqrt(a); + + ; + + T w = a + s * ra + (s * s -1) / 3; + w += (s_3 - 7 * s) / (36 * ra); + w -= (3 * s_4 + 7 * s_2 - 16) / (810 * a); + w += (9 * s_5 + 256 * s_3 - 433 * s) / (38880 * a * ra); + + ; + + if((a >= 500) && (fabs(1 - w / a) < 1e-6)) + { + result = w; + *p_has_10_digits = true; + ; + } + else if (p > 0.5) + { + if(w < 3 * a) + { + result = w; + ; + } + else + { + T D = (std::max)(T(2), T(a * (a - 1))); + T lg = boost::math::lgamma(a, pol); + T lb = log(q) + lg; + if(lb < -D * 2.3) + { + + T y = -lb; + T c1 = (a - 1) * log(y); + T c1_2 = c1 * c1; + T c1_3 = c1_2 * c1; + T c1_4 = c1_2 * c1_2; + T a_2 = a * a; + T a_3 = a_2 * a; + + T c2 = (a - 1) * (1 + c1); + T c3 = (a - 1) * (-(c1_2 / 2) + (a - 2) * c1 + (3 * a - 5) / 2); + T c4 = (a - 1) * ((c1_3 / 3) - (3 * a - 5) * c1_2 / 2 + (a_2 - 6 * a + 7) * c1 + (11 * a_2 - 46 * a + 47) / 6); + T c5 = (a - 1) * (-(c1_4 / 4) + + (11 * a - 17) * c1_3 / 6 + + (-3 * a_2 + 13 * a -13) * c1_2 + + (2 * a_3 - 25 * a_2 + 72 * a - 61) * c1 / 2 + + (25 * a_3 - 195 * a_2 + 477 * a - 379) / 12); + + T y_2 = y * y; + T y_3 = y_2 * y; + T y_4 = y_2 * y_2; + result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4); + ; + } + else + { + + T u = -lb + (a - 1) * log(w) - log(1 + (1 - a) / (1 + w)); + result = -lb + (a - 1) * log(u) - log(1 + (1 - a) / (1 + u)); + ; + } + } + } + else + { + T z = w; + T ap1 = a + 1; + T ap2 = a + 2; + if(w < 0.15f * ap1) + { + + T v = log(p) + boost::math::lgamma(ap1, pol); + z = exp((v + w) / a); + s = boost::math::log1p(z / ap1 * (1 + z / ap2), pol); + z = exp((v + z - s) / a); + s = boost::math::log1p(z / ap1 * (1 + z / ap2), pol); + z = exp((v + z - s) / a); + s = boost::math::log1p(z / ap1 * (1 + z / ap2 * (1 + z / (a + 3))), pol); + z = exp((v + z - s) / a); + ; + } + + if((z <= 0.01 * ap1) || (z > 0.7 * ap1)) + { + result = z; + if(z <= 0.002 * ap1) + *p_has_10_digits = true; + ; + } + else + { + + T ls = log(didonato_SN(a, z, 100, T(1e-4))); + T v = log(p) + boost::math::lgamma(ap1, pol); + z = exp((v + z - ls) / a); + result = z * (1 - (a * log(z) - z - v + ls) / (a - z)); + + ; + } + } + } + return result; +} + +template +struct gamma_p_inverse_func +{ + gamma_p_inverse_func(T a_, T p_, bool inv) : a(a_), p(p_), invert(inv) + { +# 331 "../../../../boost/math/special_functions/detail/igamma_inverse.hpp" + if(p > 0.9) + { + p = 1 - p; + invert = !invert; + } + } + + boost::math::tuple operator()(const T& x)const + { + + + + + + typedef typename policies::evaluation::type value_type; + + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T f, f1; + value_type ft; + f = static_cast(boost::math::detail::gamma_incomplete_imp( + static_cast(a), + static_cast(x), + true, invert, + forwarding_policy(), &ft)); + f1 = static_cast(ft); + T f2; + T div = (a - x - 1) / x; + f2 = f1; + if((fabs(div) > 1) && (tools::max_value() / fabs(div) < f2)) + { + + f2 = -tools::max_value() / 2; + } + else + { + f2 *= div; + } + + if(invert) + { + f1 = -f1; + f2 = -f2; + } + + return boost::math::make_tuple(static_cast(f - p), f1, f2); + } +private: + T a, p; + bool invert; +}; + +template +T gamma_p_inv_imp(T a, T p, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::gamma_p_inv<%1%>(%1%, %1%)"; + + ; + ; + + if(a <= 0) + return policies::raise_domain_error(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol); + if((p < 0) || (p > 1)) + return policies::raise_domain_error(function, "Probability must be in the range [0,1] in the incomplete gamma function inverse (got p=%1%).", p, pol); + if(p == 1) + return policies::raise_overflow_error(function, 0, Policy()); + if(p == 0) + return 0; + bool has_10_digits; + T guess = detail::find_inverse_gamma(a, p, 1 - p, pol, &has_10_digits); + if((policies::digits() <= 36) && has_10_digits) + return guess; + T lower = tools::min_value(); + if(guess <= lower) + guess = tools::min_value(); + ; + + + + + + + unsigned digits = policies::digits(); + if(digits < 30) + { + digits *= 2; + digits /= 3; + } + else + { + digits /= 2; + digits -= 1; + } + if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon()))) + digits = policies::digits() - 2; + + + + std::uintmax_t max_iter = policies::get_max_root_iterations(); + guess = tools::halley_iterate( + detail::gamma_p_inverse_func(a, p, false), + guess, + lower, + tools::max_value(), + digits, + max_iter); + policies::check_root_iterations(function, max_iter, pol); + ; + if(guess == lower) + guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); + return guess; +} + +template +T gamma_q_inv_imp(T a, T q, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + static const char* function = "boost::math::gamma_q_inv<%1%>(%1%, %1%)"; + + if(a <= 0) + return policies::raise_domain_error(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol); + if((q < 0) || (q > 1)) + return policies::raise_domain_error(function, "Probability must be in the range [0,1] in the incomplete gamma function inverse (got q=%1%).", q, pol); + if(q == 0) + return policies::raise_overflow_error(function, 0, Policy()); + if(q == 1) + return 0; + bool has_10_digits; + T guess = detail::find_inverse_gamma(a, 1 - q, q, pol, &has_10_digits); + if((policies::digits() <= 36) && has_10_digits) + return guess; + T lower = tools::min_value(); + if(guess <= lower) + guess = tools::min_value(); + + + + + + + unsigned digits = policies::digits(); + if(digits < 30) + { + digits *= 2; + digits /= 3; + } + else + { + digits /= 2; + digits -= 1; + } + if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon()))) + digits = policies::digits(); + + + + std::uintmax_t max_iter = policies::get_max_root_iterations(); + guess = tools::halley_iterate( + detail::gamma_p_inverse_func(a, q, true), + guess, + lower, + tools::max_value(), + digits, + max_iter); + policies::check_root_iterations(function, max_iter, pol); + if(guess == lower) + guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); + return guess; +} + +} + +export template +inline typename tools::promote_args::type + gamma_p_inv(T1 a, T2 p, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::gamma_p_inv_imp( + static_cast(a), + static_cast(p), pol); +} + +export template +inline typename tools::promote_args::type + gamma_q_inv(T1 a, T2 p, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + return detail::gamma_q_inv_imp( + static_cast(a), + static_cast(p), pol); +} + +export template +inline typename tools::promote_args::type + gamma_p_inv(T1 a, T2 p) +{ + return gamma_p_inv(a, p, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + gamma_q_inv(T1 a, T2 p) +{ + return gamma_q_inv(a, p, policies::policy<>()); +} + +} +} +# 2216 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/detail/gamma_inva.hpp" 1 +# 25 "../../../../boost/math/special_functions/detail/gamma_inva.hpp" +namespace boost{ namespace math{ namespace detail{ + +template +struct gamma_inva_t +{ + gamma_inva_t(T z_, T p_, bool invert_) : z(z_), p(p_), invert(invert_) {} + T operator()(T a) + { + return invert ? p - boost::math::gamma_q(a, z, Policy()) : boost::math::gamma_p(a, z, Policy()) - p; + } +private: + T z, p; + bool invert; +}; + +template +T inverse_poisson_cornish_fisher(T lambda, T p, T q, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T m = lambda; + + T sigma = sqrt(lambda); + + T sk = 1 / sigma; + + + + T x = boost::math::erfc_inv(p > q ? 2 * q : 2 * p, pol) * constants::root_two(); + + if(p < 0.5) + x = -x; + T x2 = x * x; + + T w = x + sk * (x2 - 1) / 6; + + + + + + + + w = m + sigma * w; + return w > tools::min_value() ? w : tools::min_value(); +} + +template +T gamma_inva_imp(const T& z, const T& p, const T& q, const Policy& pol) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + + + if(p == 0) + { + return policies::raise_overflow_error("boost::math::gamma_p_inva<%1%>(%1%, %1%)", 0, Policy()); + } + if(q == 0) + { + return tools::min_value(); + } + + + + + gamma_inva_t f(z, (p < q) ? p : q, (p < q) ? false : true); + + + + tools::eps_tolerance tol(policies::digits()); + + + + + + + + T guess; + T factor = 8; + if(z >= 1) + { +# 114 "../../../../boost/math/special_functions/detail/gamma_inva.hpp" + guess = 1 + inverse_poisson_cornish_fisher(z, q, p, pol); + if(z > 5) + { + if(z > 1000) + factor = 1.01f; + else if(z > 50) + factor = 1.1f; + else if(guess > 10) + factor = 1.25f; + else + factor = 2; + if(guess < 1.1) + factor = 8; + } + } + else if(z > 0.5) + { + guess = z * 1.2f; + } + else + { + guess = -0.4f / log(z); + } + + + + std::uintmax_t max_iter = policies::get_max_root_iterations(); + + + + + + + std::pair r = bracket_and_solve_root(f, guess, factor, false, tol, max_iter, pol); + if(max_iter >= policies::get_max_root_iterations()) + return policies::raise_evaluation_error("boost::math::gamma_p_inva<%1%>(%1%, %1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol); + return (r.first + r.second) / 2; +} + +} + +export template +inline typename tools::promote_args::type + gamma_p_inva(T1 x, T2 p, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + if(p == 0) + { + policies::raise_overflow_error("boost::math::gamma_p_inva<%1%>(%1%, %1%)", 0, Policy()); + } + if(p == 1) + { + return tools::min_value(); + } + + return policies::checked_narrowing_cast( + detail::gamma_inva_imp( + static_cast(x), + static_cast(p), + static_cast(1 - static_cast(p)), + pol), "boost::math::gamma_p_inva<%1%>(%1%, %1%)"); +} + +export template +inline typename tools::promote_args::type + gamma_q_inva(T1 x, T2 q, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + if(q == 1) + { + policies::raise_overflow_error("boost::math::gamma_q_inva<%1%>(%1%, %1%)", 0, Policy()); + } + if(q == 0) + { + return tools::min_value(); + } + + return policies::checked_narrowing_cast( + detail::gamma_inva_imp( + static_cast(x), + static_cast(1 - static_cast(q)), + static_cast(q), + pol), "boost::math::gamma_q_inva<%1%>(%1%, %1%)"); +} + +export template +inline typename tools::promote_args::type + gamma_p_inva(T1 x, T2 p) +{ + return boost::math::gamma_p_inva(x, p, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type + gamma_q_inva(T1 x, T2 q) +{ + return boost::math::gamma_q_inva(x, q, policies::policy<>()); +} + +} +} +# 2217 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 1 "../../../../boost/math/special_functions/erf.hpp" 1 +# 32 "../../../../boost/math/special_functions/erf.hpp" +namespace boost{ namespace math{ + +namespace detail +{ + + + + +template +struct erf_asympt_series_t +{ + erf_asympt_series_t(T z) : xx(2 * -z * z), tk(1) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + result = -exp(-z * z) / sqrt(boost::math::constants::pi()); + result /= z; + } + + typedef T result_type; + + T operator()() + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T r = result; + result *= tk / xx; + tk += 2; + if( fabs(r) < fabs(result)) + result = 0; + return r; + } +private: + T result; + T xx; + int tk; +}; + + + +template +inline float erf_asymptotic_limit_N(const T&) +{ + return (std::numeric_limits::max)(); +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 2.8F; +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 4.3F; +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 4.8F; +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 6.5F; +} +inline float erf_asymptotic_limit_N(const std::integral_constant&) +{ + return 6.8F; +} + +template +inline T erf_asymptotic_limit() +{ + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + return erf_asymptotic_limit_N(tag_type()); +} + +template +struct erf_series_near_zero +{ + typedef T result_type; + T term; + T zz; + int k; + erf_series_near_zero(const T& z) : term(z), zz(-z * z), k(0) {} + + T operator()() + { + T result = term / (2 * k + 1); + term *= zz / ++k; + return result; + } +}; + +template +T erf_series_near_zero_sum(const T& x, const Policy& pol) +{ + + + + + erf_series_near_zero sum(x); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + T result = constants::two_div_root_pi() * tools::kahan_sum_series(sum, tools::digits(), max_iter); + policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); + return result; +} + +template +T erf_imp(T z, bool invert, const Policy& pol, const Tag& t) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + ; + + if(z < 0) + { + if(!invert) + return -erf_imp(T(-z), invert, pol, t); + else + return 1 + erf_imp(T(-z), false, pol, t); + } + + T result; + + if(!invert && (z > detail::erf_asymptotic_limit())) + { + detail::erf_asympt_series_t s(z); + std::uintmax_t max_iter = policies::get_max_series_iterations(); + result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter, 1); + policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); + } + else + { + T x = z * z; + if(z < 1.3f) + { + + + + result = erf_series_near_zero_sum(z, pol); + } + else if(x > 1 / tools::epsilon()) + { + + invert = !invert; + result = exp(-x) / (constants::root_pi() * z); + } + else + { + + invert = !invert; + result = z * exp(-x); + result /= boost::math::constants::root_pi(); + result *= upper_gamma_fraction(T(0.5f), x, policies::get_epsilon()); + } + } + if(invert) + result = 1 - result; + return result; +} + +template +T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant& t) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + ; + + if ((boost::math::isnan)(z)) + return policies::raise_denorm_error("boost::math::erf<%1%>(%1%)", "Expected a finite argument but got %1%", z, pol); + + if(z < 0) + { + if(!invert) + return -erf_imp(T(-z), invert, pol, t); + else if(z < -0.5) + return 2 - erf_imp(T(-z), invert, pol, t); + else + return 1 + erf_imp(T(-z), false, pol, t); + } + + T result; + + + + + + + if(z < 0.5) + { + + + + if(z < 1e-10) + { + if(z == 0) + { + result = T(0); + } + else + { + static const T c = boost::math::tools::make_big_value( 0.003379167095512573896158903121545171688, "0.003379167095512573896158903121545171688", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + result = static_cast(z * 1.125f + z * c); + } + } + else + { + + + + + + static const T Y = 1.044948577880859375f; + static const T P[] = { + boost::math::tools::make_big_value( 0.0834305892146531832907, "0.0834305892146531832907", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.338165134459360935041, "-0.338165134459360935041", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0509990735146777432841, "-0.0509990735146777432841", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00772758345802133288487, "-0.00772758345802133288487", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000322780120964605683831, "-0.000322780120964605683831", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.455004033050794024546, "0.455004033050794024546", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0875222600142252549554, "0.0875222600142252549554", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00858571925074406212772, "0.00858571925074406212772", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000370900071787748000569, "0.000370900071787748000569", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + T zz = z * z; + result = z * (Y + tools::evaluate_polynomial(P, zz) / tools::evaluate_polynomial(Q, zz)); + } + } + else if(invert ? (z < 28) : (z < 5.93f)) + { + + + + invert = !invert; + if(z < 1.5f) + { + + + + + static const T Y = 0.405935764312744140625f; + static const T P[] = { + boost::math::tools::make_big_value( -0.098090592216281240205, "-0.098090592216281240205", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.178114665841120341155, "0.178114665841120341155", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.191003695796775433986, "0.191003695796775433986", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0888900368967884466578, "0.0888900368967884466578", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0195049001251218801359, "0.0195049001251218801359", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00180424538297014223957, "0.00180424538297014223957", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.84759070983002217845, "1.84759070983002217845", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.42628004845511324508, "1.42628004845511324508", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.578052804889902404909, "0.578052804889902404909", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.12385097467900864233, "0.12385097467900864233", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0113385233577001411017, "0.0113385233577001411017", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.337511472483094676155e-5, "0.337511472483094676155e-5", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + ; + ; + ; + ; + result = Y + tools::evaluate_polynomial(P, T(z - 0.5)) / tools::evaluate_polynomial(Q, T(z - 0.5)); + ; + result *= exp(-z * z) / z; + ; + } + else if(z < 2.5f) + { + + + + + static const T Y = 0.50672817230224609375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0243500476207698441272, "-0.0243500476207698441272", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0386540375035707201728, "0.0386540375035707201728", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.04394818964209516296, "0.04394818964209516296", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0175679436311802092299, "0.0175679436311802092299", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00323962406290842133584, "0.00323962406290842133584", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000235839115596880717416, "0.000235839115596880717416", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.53991494948552447182, "1.53991494948552447182", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.982403709157920235114, "0.982403709157920235114", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.325732924782444448493, "0.325732924782444448493", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0563921837420478160373, "0.0563921837420478160373", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00410369723978904575884, "0.00410369723978904575884", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 1.5)) / tools::evaluate_polynomial(Q, T(z - 1.5)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 26)); + hi = ldexp(hi, expon - 26); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 4.5f) + { + + + + + static const T Y = 0.5405750274658203125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.00295276716530971662634, "0.00295276716530971662634", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0137384425896355332126, "0.0137384425896355332126", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00840807615555585383007, "0.00840807615555585383007", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00212825620914618649141, "0.00212825620914618649141", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000250269961544794627958, "0.000250269961544794627958", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.113212406648847561139e-4, "0.113212406648847561139e-4", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.04217814166938418171, "1.04217814166938418171", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.442597659481563127003, "0.442597659481563127003", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0958492726301061423444, "0.0958492726301061423444", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0105982906484876531489, "0.0105982906484876531489", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000479411269521714493907, "0.000479411269521714493907", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 3.5)) / tools::evaluate_polynomial(Q, T(z - 3.5)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 26)); + hi = ldexp(hi, expon - 26); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else + { + + + + + static const T Y = 0.5579090118408203125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.00628057170626964891937, "0.00628057170626964891937", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0175389834052493308818, "0.0175389834052493308818", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.212652252872804219852, "-0.212652252872804219852", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.687717681153649930619, "-0.687717681153649930619", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.5518551727311523996, "-2.5518551727311523996", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.22729451764143718517, "-3.22729451764143718517", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -2.8175401114513378771, "-2.8175401114513378771", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.79257750980575282228, "2.79257750980575282228", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 11.0567237927800161565, "11.0567237927800161565", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 15.930646027911794143, "15.930646027911794143", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 22.9367376522880577224, "22.9367376522880577224", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 13.5064170191802889145, "13.5064170191802889145", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 5.48409182238641741584, "5.48409182238641741584", std::integral_constant::value) && ((53 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 26)); + hi = ldexp(hi, expon - 26); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + } + else + { + + + + result = 0; + invert = !invert; + } + + if(invert) + { + result = 1 - result; + } + + return result; +} + + +template +T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant& t) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + ; + + if(z < 0) + { + if(!invert) + return -erf_imp(T(-z), invert, pol, t); + else if(z < -0.5) + return 2 - erf_imp(T(-z), invert, pol, t); + else + return 1 + erf_imp(T(-z), false, pol, t); + } + + T result; + + + + + + + if(z < 0.5) + { + + + + if(z == 0) + { + result = 0; + } + else if(z < 1e-10) + { + static const T c = boost::math::tools::make_big_value( 0.003379167095512573896158903121545171688, "0.003379167095512573896158903121545171688", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + result = z * 1.125 + z * c; + } + else + { + + + + + static const T Y = 1.044948577880859375f; + static const T P[] = { + boost::math::tools::make_big_value( 0.0834305892146531988966, "0.0834305892146531988966", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.338097283075565413695, "-0.338097283075565413695", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0509602734406067204596, "-0.0509602734406067204596", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00904906346158537794396, "-0.00904906346158537794396", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000489468651464798669181, "-0.000489468651464798669181", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.200305626366151877759e-4, "-0.200305626366151877759e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.455817300515875172439, "0.455817300515875172439", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0916537354356241792007, "0.0916537354356241792007", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0102722652675910031202, "0.0102722652675910031202", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000650511752687851548735, "0.000650511752687851548735", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.189532519105655496778e-4, "0.189532519105655496778e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z))); + } + } + else if(invert ? (z < 110) : (z < 6.6f)) + { + + + + invert = !invert; + if(z < 1.5) + { + + + + + static const T Y = 0.405935764312744140625f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0980905922162812031672, "-0.0980905922162812031672", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.159989089922969141329, "0.159989089922969141329", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.222359821619935712378, "0.222359821619935712378", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.127303921703577362312, "0.127303921703577362312", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0384057530342762400273, "0.0384057530342762400273", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00628431160851156719325, "0.00628431160851156719325", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000441266654514391746428, "0.000441266654514391746428", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.266689068336295642561e-7, "0.266689068336295642561e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.03237474985469469291, "2.03237474985469469291", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.78355454954969405222, "1.78355454954969405222", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.867940326293760578231, "0.867940326293760578231", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.248025606990021698392, "0.248025606990021698392", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0396649631833002269861, "0.0396649631833002269861", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00279220237309449026796, "0.00279220237309449026796", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 32)); + hi = ldexp(hi, expon - 32); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 2.5) + { + + + + + static const T Y = 0.50672817230224609375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.024350047620769840217, "-0.024350047620769840217", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0343522687935671451309, "0.0343522687935671451309", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0505420824305544949541, "0.0505420824305544949541", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0257479325917757388209, "0.0257479325917757388209", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00669349844190354356118, "0.00669349844190354356118", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00090807914416099524444, "0.00090807914416099524444", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.515917266698050027934e-4, "0.515917266698050027934e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.71657861671930336344, "1.71657861671930336344", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.26409634824280366218, "1.26409634824280366218", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.512371437838969015941, "0.512371437838969015941", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.120902623051120950935, "0.120902623051120950935", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0158027197831887485261, "0.0158027197831887485261", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000897871370778031611439, "0.000897871370778031611439", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 32)); + hi = ldexp(hi, expon - 32); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 4.5) + { + + + + + static const T Y = 0.5405750274658203125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.0029527671653097284033, "0.0029527671653097284033", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0141853245895495604051, "0.0141853245895495604051", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0104959584626432293901, "0.0104959584626432293901", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00343963795976100077626, "0.00343963795976100077626", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00059065441194877637899, "0.00059065441194877637899", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.523435380636174008685e-4, "0.523435380636174008685e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.189896043050331257262e-5, "0.189896043050331257262e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.19352160185285642574, "1.19352160185285642574", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.603256964363454392857, "0.603256964363454392857", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.165411142458540585835, "0.165411142458540585835", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0259729870946203166468, "0.0259729870946203166468", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00221657568292893699158, "0.00221657568292893699158", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.804149464190309799804e-4, "0.804149464190309799804e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 3.5f)) / tools::evaluate_polynomial(Q, T(z - 3.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 32)); + hi = ldexp(hi, expon - 32); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else + { + + + + + static const T Y = 0.55825519561767578125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.00593438793008050214106, "0.00593438793008050214106", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0280666231009089713937, "0.0280666231009089713937", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.141597835204583050043, "-0.141597835204583050043", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.978088201154300548842, "-0.978088201154300548842", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -5.47351527796012049443, "-5.47351527796012049443", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -13.8677304660245326627, "-13.8677304660245326627", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -27.1274948720539821722, "-27.1274948720539821722", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -29.2545152747009461519, "-29.2545152747009461519", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -16.8865774499799676937, "-16.8865774499799676937", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.72948911186645394541, "4.72948911186645394541", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 23.6750543147695749212, "23.6750543147695749212", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 60.0021517335693186785, "60.0021517335693186785", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 131.766251645149522868, "131.766251645149522868", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 178.167924971283482513, "178.167924971283482513", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 182.499390505915222699, "182.499390505915222699", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 104.365251479578577989, "104.365251479578577989", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 30.8365511891224291717, "30.8365511891224291717", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 32)); + hi = ldexp(hi, expon - 32); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + } + else + { + + + + result = 0; + invert = !invert; + } + + if(invert) + { + result = 1 - result; + } + + return result; +} + + +template +T erf_imp(T z, bool invert, const Policy& pol, const std::integral_constant& t) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + ; + + if(z < 0) + { + if(!invert) + return -erf_imp(T(-z), invert, pol, t); + else if(z < -0.5) + return 2 - erf_imp(T(-z), invert, pol, t); + else + return 1 + erf_imp(T(-z), false, pol, t); + } + + T result; + + + + + + + if(z < 0.5) + { + + + + if(z == 0) + { + result = 0; + } + else if(z < 1e-20) + { + static const T c = boost::math::tools::make_big_value( 0.003379167095512573896158903121545171688, "0.003379167095512573896158903121545171688", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()); + result = z * 1.125 + z * c; + } + else + { + + + + + static const T Y = 1.0841522216796875f; + static const T P[] = { + boost::math::tools::make_big_value( 0.0442269454158250738961589031215451778, "0.0442269454158250738961589031215451778", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.35549265736002144875335323556961233, "-0.35549265736002144875335323556961233", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0582179564566667896225454670863270393, "-0.0582179564566667896225454670863270393", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0112694696904802304229950538453123925, "-0.0112694696904802304229950538453123925", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.000805730648981801146251825329609079099, "-0.000805730648981801146251825329609079099", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.566304966591936566229702842075966273e-4, "-0.566304966591936566229702842075966273e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.169655010425186987820201021510002265e-5, "-0.169655010425186987820201021510002265e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.344448249920445916714548295433198544e-7, "-0.344448249920445916714548295433198544e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.466542092785657604666906909196052522, "0.466542092785657604666906909196052522", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.100005087012526447295176964142107611, "0.100005087012526447295176964142107611", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0128341535890117646540050072234142603, "0.0128341535890117646540050072234142603", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00107150448466867929159660677016658186, "0.00107150448466867929159660677016658186", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.586168368028999183607733369248338474e-4, "0.586168368028999183607733369248338474e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.196230608502104324965623171516808796e-5, "0.196230608502104324965623171516808796e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.313388521582925207734229967907890146e-7, "0.313388521582925207734229967907890146e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z))); + } + } + else if(invert ? (z < 110) : (z < 8.65f)) + { + + + + invert = !invert; + if(z < 1) + { + + + + + static const T Y = 0.371877193450927734375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0640320213544647969396032886581290455, "-0.0640320213544647969396032886581290455", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.200769874440155895637857443946706731, "0.200769874440155895637857443946706731", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.378447199873537170666487408805779826, "0.378447199873537170666487408805779826", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.30521399466465939450398642044975127, "0.30521399466465939450398642044975127", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.146890026406815277906781824723458196, "0.146890026406815277906781824723458196", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0464837937749539978247589252732769567, "0.0464837937749539978247589252732769567", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00987895759019540115099100165904822903, "0.00987895759019540115099100165904822903", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00137507575429025512038051025154301132, "0.00137507575429025512038051025154301132", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0001144764551085935580772512359680516, "0.0001144764551085935580772512359680516", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.436544865032836914773944382339900079e-5, "0.436544865032836914773944382339900079e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.47651182872457465043733800302427977, "2.47651182872457465043733800302427977", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.78706486002517996428836400245547955, "2.78706486002517996428836400245547955", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.87295924621659627926365005293130693, "1.87295924621659627926365005293130693", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.829375825174365625428280908787261065, "0.829375825174365625428280908787261065", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.251334771307848291593780143950311514, "0.251334771307848291593780143950311514", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0522110268876176186719436765734722473, "0.0522110268876176186719436765734722473", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00718332151250963182233267040106902368, "0.00718332151250963182233267040106902368", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000595279058621482041084986219276392459, "0.000595279058621482041084986219276392459", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.226988669466501655990637599399326874e-4, "0.226988669466501655990637599399326874e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.270666232259029102353426738909226413e-10, "0.270666232259029102353426738909226413e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 1.5) + { + + + + + static const T Y = 0.45658016204833984375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0289965858925328393392496555094848345, "-0.0289965858925328393392496555094848345", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0868181194868601184627743162571779226, "0.0868181194868601184627743162571779226", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.169373435121178901746317404936356745, "0.169373435121178901746317404936356745", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.13350446515949251201104889028133486, "0.13350446515949251201104889028133486", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0617447837290183627136837688446313313, "0.0617447837290183627136837688446313313", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0185618495228251406703152962489700468, "0.0185618495228251406703152962489700468", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00371949406491883508764162050169531013, "0.00371949406491883508764162050169531013", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000485121708792921297742105775823900772, "0.000485121708792921297742105775823900772", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.376494706741453489892108068231400061e-4, "0.376494706741453489892108068231400061e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.133166058052466262415271732172490045e-5, "0.133166058052466262415271732172490045e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.32970330146503867261275580968135126, "2.32970330146503867261275580968135126", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.46325715420422771961250513514928746, "2.46325715420422771961250513514928746", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.55307882560757679068505047390857842, "1.55307882560757679068505047390857842", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.644274289865972449441174485441409076, "0.644274289865972449441174485441409076", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.182609091063258208068606847453955649, "0.182609091063258208068606847453955649", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0354171651271241474946129665801606795, "0.0354171651271241474946129665801606795", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00454060370165285246451879969534083997, "0.00454060370165285246451879969534083997", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000349871943711566546821198612518656486, "0.000349871943711566546821198612518656486", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.123749319840299552925421880481085392e-4, "0.123749319840299552925421880481085392e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 1.0f)) / tools::evaluate_polynomial(Q, T(z - 1.0f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 2.25) + { + + + + + static const T Y = 0.50250148773193359375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0201233630504573402185161184151016606, "-0.0201233630504573402185161184151016606", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0331864357574860196516686996302305002, "0.0331864357574860196516686996302305002", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0716562720864787193337475444413405461, "0.0716562720864787193337475444413405461", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0545835322082103985114927569724880658, "0.0545835322082103985114927569724880658", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0236692635189696678976549720784989593, "0.0236692635189696678976549720784989593", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00656970902163248872837262539337601845, "0.00656970902163248872837262539337601845", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00120282643299089441390490459256235021, "0.00120282643299089441390490459256235021", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000142123229065182650020762792081622986, "0.000142123229065182650020762792081622986", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.991531438367015135346716277792989347e-5, "0.991531438367015135346716277792989347e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.312857043762117596999398067153076051e-6, "0.312857043762117596999398067153076051e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.13506082409097783827103424943508554, "2.13506082409097783827103424943508554", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.06399257267556230937723190496806215, "2.06399257267556230937723190496806215", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.18678481279932541314830499880691109, "1.18678481279932541314830499880691109", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.447733186643051752513538142316799562, "0.447733186643051752513538142316799562", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.11505680005657879437196953047542148, "0.11505680005657879437196953047542148", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.020163993632192726170219663831914034, "0.020163993632192726170219663831914034", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00232708971840141388847728782209730585, "0.00232708971840141388847728782209730585", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000160733201627963528519726484608224112, "0.000160733201627963528519726484608224112", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.507158721790721802724402992033269266e-5, "0.507158721790721802724402992033269266e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.18647774409821470950544212696270639e-12, "0.18647774409821470950544212696270639e-12", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if (z < 3) + { + + + + + static const T Y = 0.52896785736083984375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.00902152521745813634562524098263360074, "-0.00902152521745813634562524098263360074", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0145207142776691539346923710537580927, "0.0145207142776691539346923710537580927", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0301681239582193983824211995978678571, "0.0301681239582193983824211995978678571", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0215548540823305814379020678660434461, "0.0215548540823305814379020678660434461", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00864683476267958365678294164340749949, "0.00864683476267958365678294164340749949", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00219693096885585491739823283511049902, "0.00219693096885585491739823283511049902", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000364961639163319762492184502159894371, "0.000364961639163319762492184502159894371", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.388174251026723752769264051548703059e-4, "0.388174251026723752769264051548703059e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.241918026931789436000532513553594321e-5, "0.241918026931789436000532513553594321e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.676586625472423508158937481943649258e-7, "0.676586625472423508158937481943649258e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.93669171363907292305550231764920001, "1.93669171363907292305550231764920001", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.69468476144051356810672506101377494, "1.69468476144051356810672506101377494", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.880023580986436640372794392579985511, "0.880023580986436640372794392579985511", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.299099106711315090710836273697708402, "0.299099106711315090710836273697708402", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0690593962363545715997445583603382337, "0.0690593962363545715997445583603382337", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0108427016361318921960863149875360222, "0.0108427016361318921960863149875360222", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00111747247208044534520499324234317695, "0.00111747247208044534520499324234317695", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.686843205749767250666787987163701209e-4, "0.686843205749767250666787987163701209e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.192093541425429248675532015101904262e-5, "0.192093541425429248675532015101904262e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 2.25f)) / tools::evaluate_polynomial(Q, T(z - 2.25f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 3.5) + { + + + + + static const T Y = 0.54037380218505859375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0033703486408887424921155540591370375, "-0.0033703486408887424921155540591370375", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0104948043110005245215286678898115811, "0.0104948043110005245215286678898115811", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0148530118504000311502310457390417795, "0.0148530118504000311502310457390417795", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00816693029245443090102738825536188916, "0.00816693029245443090102738825536188916", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00249716579989140882491939681805594585, "0.00249716579989140882491939681805594585", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0004655591010047353023978045800916647, "0.0004655591010047353023978045800916647", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.531129557920045295895085236636025323e-4, "0.531129557920045295895085236636025323e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.343526765122727069515775194111741049e-5, "0.343526765122727069515775194111741049e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.971120407556888763695313774578711839e-7, "0.971120407556888763695313774578711839e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.59911256167540354915906501335919317, "1.59911256167540354915906501335919317", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.136006830764025173864831382946934, "1.136006830764025173864831382946934", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.468565867990030871678574840738423023, "0.468565867990030871678574840738423023", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.122821824954470343413956476900662236, "0.122821824954470343413956476900662236", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0209670914950115943338996513330141633, "0.0209670914950115943338996513330141633", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00227845718243186165620199012883547257, "0.00227845718243186165620199012883547257", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000144243326443913171313947613547085553, "0.000144243326443913171313947613547085553", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.407763415954267700941230249989140046e-5, "0.407763415954267700941230249989140046e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 3.0f)) / tools::evaluate_polynomial(Q, T(z - 3.0f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 5.5) + { + + + + + static const T Y = 0.55000019073486328125f; + static const T P[] = { + boost::math::tools::make_big_value( 0.00118142849742309772151454518093813615, "0.00118142849742309772151454518093813615", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0072201822885703318172366893469382745, "0.0072201822885703318172366893469382745", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0078782276276860110721875733778481505, "0.0078782276276860110721875733778481505", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00418229166204362376187593976656261146, "0.00418229166204362376187593976656261146", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00134198400587769200074194304298642705, "0.00134198400587769200074194304298642705", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000283210387078004063264777611497435572, "0.000283210387078004063264777611497435572", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.405687064094911866569295610914844928e-4, "0.405687064094911866569295610914844928e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.39348283801568113807887364414008292e-5, "0.39348283801568113807887364414008292e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.248798540917787001526976889284624449e-6, "0.248798540917787001526976889284624449e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.929502490223452372919607105387474751e-8, "0.929502490223452372919607105387474751e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.156161469668275442569286723236274457e-9, "0.156161469668275442569286723236274457e-9", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.52955245103668419479878456656709381, "1.52955245103668419479878456656709381", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.06263944820093830054635017117417064, "1.06263944820093830054635017117417064", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.441684612681607364321013134378316463, "0.441684612681607364321013134378316463", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.121665258426166960049773715928906382, "0.121665258426166960049773715928906382", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0232134512374747691424978642874321434, "0.0232134512374747691424978642874321434", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00310778180686296328582860464875562636, "0.00310778180686296328582860464875562636", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000288361770756174705123674838640161693, "0.000288361770756174705123674838640161693", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.177529187194133944622193191942300132e-4, "0.177529187194133944622193191942300132e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.655068544833064069223029299070876623e-6, "0.655068544833064069223029299070876623e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.11005507545746069573608988651927452e-7, "0.11005507545746069573608988651927452e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 4.5f)) / tools::evaluate_polynomial(Q, T(z - 4.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 7.5) + { + + + + + static const T Y = 0.5574436187744140625f; + static const T P[] = { + boost::math::tools::make_big_value( 0.000293236907400849056269309713064107674, "0.000293236907400849056269309713064107674", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00225110719535060642692275221961480162, "0.00225110719535060642692275221961480162", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00190984458121502831421717207849429799, "0.00190984458121502831421717207849429799", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000747757733460111743833929141001680706, "0.000747757733460111743833929141001680706", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000170663175280949889583158597373928096, "0.000170663175280949889583158597373928096", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.246441188958013822253071608197514058e-4, "0.246441188958013822253071608197514058e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.229818000860544644974205957895688106e-5, "0.229818000860544644974205957895688106e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.134886977703388748488480980637704864e-6, "0.134886977703388748488480980637704864e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.454764611880548962757125070106650958e-8, "0.454764611880548962757125070106650958e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.673002744115866600294723141176820155e-10, "0.673002744115866600294723141176820155e-10", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.12843690320861239631195353379313367, "1.12843690320861239631195353379313367", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.569900657061622955362493442186537259, "0.569900657061622955362493442186537259", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.169094404206844928112348730277514273, "0.169094404206844928112348730277514273", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0324887449084220415058158657252147063, "0.0324887449084220415058158657252147063", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00419252877436825753042680842608219552, "0.00419252877436825753042680842608219552", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00036344133176118603523976748563178578, "0.00036344133176118603523976748563178578", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.204123895931375107397698245752850347e-4, "0.204123895931375107397698245752850347e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.674128352521481412232785122943508729e-6, "0.674128352521481412232785122943508729e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.997637501418963696542159244436245077e-8, "0.997637501418963696542159244436245077e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z - 6.5f)) / tools::evaluate_polynomial(Q, T(z - 6.5f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else if(z < 11.5) + { + + + + + static const T Y = 0.56083202362060546875f; + static const T P[] = { + boost::math::tools::make_big_value( 0.000282420728751494363613829834891390121, "0.000282420728751494363613829834891390121", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00175387065018002823433704079355125161, "0.00175387065018002823433704079355125161", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0021344978564889819420775336322920375, "0.0021344978564889819420775336322920375", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00124151356560137532655039683963075661, "0.00124151356560137532655039683963075661", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000423600733566948018555157026862139644, "0.000423600733566948018555157026862139644", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.914030340865175237133613697319509698e-4, "0.914030340865175237133613697319509698e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.126999927156823363353809747017945494e-4, "0.126999927156823363353809747017945494e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.110610959842869849776179749369376402e-5, "0.110610959842869849776179749369376402e-5", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.55075079477173482096725348704634529e-7, "0.55075079477173482096725348704634529e-7", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.119735694018906705225870691331543806e-8, "0.119735694018906705225870691331543806e-8", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.69889613396167354566098060039549882, "1.69889613396167354566098060039549882", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.28824647372749624464956031163282674, "1.28824647372749624464956031163282674", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.572297795434934493541628008224078717, "0.572297795434934493541628008224078717", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.164157697425571712377043857240773164, "0.164157697425571712377043857240773164", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0315311145224594430281219516531649562, "0.0315311145224594430281219516531649562", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00405588922155632380812945849777127458, "0.00405588922155632380812945849777127458", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000336929033691445666232029762868642417, "0.000336929033691445666232029762868642417", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.164033049810404773469413526427932109e-4, "0.164033049810404773469413526427932109e-4", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.356615210500531410114914617294694857e-6, "0.356615210500531410114914617294694857e-6", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(z / 2 - 4.75f)) / tools::evaluate_polynomial(Q, T(z / 2 - 4.75f)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + else + { + + + + + static const T Y = 0.5632686614990234375f; + static const T P[] = { + boost::math::tools::make_big_value( 0.000920922048732849448079451574171836943, "0.000920922048732849448079451574171836943", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00321439044532288750501700028748922439, "0.00321439044532288750501700028748922439", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.250455263029390118657884864261823431, "-0.250455263029390118657884864261823431", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.906807635364090342031792404764598142, "-0.906807635364090342031792404764598142", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -8.92233572835991735876688745989985565, "-8.92233572835991735876688745989985565", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -21.7797433494422564811782116907878495, "-21.7797433494422564811782116907878495", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -91.1451915251976354349734589601171659, "-91.1451915251976354349734589601171659", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -144.1279109655993927069052125017673, "-144.1279109655993927069052125017673", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -313.845076581796338665519022313775589, "-313.845076581796338665519022313775589", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -273.11378811923343424081101235736475, "-273.11378811923343424081101235736475", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -271.651566205951067025696102600443452, "-271.651566205951067025696102600443452", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -60.0530577077238079968843307523245547, "-60.0530577077238079968843307523245547", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.49040448075464744191022350947892036, "3.49040448075464744191022350947892036", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 34.3563592467165971295915749548313227, "34.3563592467165971295915749548313227", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 84.4993232033879023178285731843850461, "84.4993232033879023178285731843850461", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 376.005865281206894120659401340373818, "376.005865281206894120659401340373818", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 629.95369438888946233003926191755125, "629.95369438888946233003926191755125", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1568.35771983533158591604513304269098, "1568.35771983533158591604513304269098", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1646.02452040831961063640827116581021, "1646.02452040831961063640827116581021", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2299.96860633240298708910425594484895, "2299.96860633240298708910425594484895", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1222.73204392037452750381340219906374, "1222.73204392037452750381340219906374", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 799.359797306084372350264298361110448, "799.359797306084372350264298361110448", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 72.7415265778588087243442792401576737, "72.7415265778588087243442792401576737", std::integral_constant::value) && ((113 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + }; + result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z)); + T hi, lo; + int expon; + hi = floor(ldexp(frexp(z, &expon), 56)); + hi = ldexp(hi, expon - 56); + lo = z - hi; + T sq = z * z; + T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo; + result *= exp(-sq) * exp(-err_sqr) / z; + } + } + else + { + + + + result = 0; + invert = !invert; + } + + if(invert) + { + result = 1 - result; + } + + return result; +} + +template +struct erf_initializer +{ + struct init + { + init() + { + do_init(tag()); + } + static void do_init(const std::integral_constant&){} + static void do_init(const std::integral_constant&) + { + boost::math::erf(static_cast(1e-12), Policy()); + boost::math::erf(static_cast(0.25), Policy()); + boost::math::erf(static_cast(1.25), Policy()); + boost::math::erf(static_cast(2.25), Policy()); + boost::math::erf(static_cast(4.25), Policy()); + boost::math::erf(static_cast(5.25), Policy()); + } + static void do_init(const std::integral_constant&) + { + boost::math::erf(static_cast(1e-12), Policy()); + boost::math::erf(static_cast(0.25), Policy()); + boost::math::erf(static_cast(1.25), Policy()); + boost::math::erf(static_cast(2.25), Policy()); + boost::math::erf(static_cast(4.25), Policy()); + boost::math::erf(static_cast(5.25), Policy()); + } + static void do_init(const std::integral_constant&) + { + boost::math::erf(static_cast(1e-22), Policy()); + boost::math::erf(static_cast(0.25), Policy()); + boost::math::erf(static_cast(1.25), Policy()); + boost::math::erf(static_cast(2.125), Policy()); + boost::math::erf(static_cast(2.75), Policy()); + boost::math::erf(static_cast(3.25), Policy()); + boost::math::erf(static_cast(5.25), Policy()); + boost::math::erf(static_cast(7.25), Policy()); + boost::math::erf(static_cast(11.25), Policy()); + boost::math::erf(static_cast(12.5), Policy()); + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename erf_initializer::init erf_initializer::initializer; + +} + +export template +inline typename tools::promote_args::type erf(T z, const Policy& ) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + ; + ; + ; + + typedef std::integral_constant tag_type; + + ; + + detail::erf_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::erf_imp( + static_cast(z), + false, + forwarding_policy(), + tag_type()), "boost::math::erf<%1%>(%1%, %1%)"); +} + +export template +inline typename tools::promote_args::type erfc(T z, const Policy& ) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + ; + ; + ; + + typedef std::integral_constant tag_type; + + ; + + detail::erf_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::erf_imp( + static_cast(z), + true, + forwarding_policy(), + tag_type()), "boost::math::erfc<%1%>(%1%, %1%)"); +} + +export template +inline typename tools::promote_args::type erf(T z) +{ + return boost::math::erf(z, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type erfc(T z) +{ + return boost::math::erfc(z, policies::policy<>()); +} + +} +} + +# 1 "../../../../boost/math/special_functions/detail/erf_inv.hpp" 1 +# 20 "../../../../boost/math/special_functions/detail/erf_inv.hpp" +namespace boost{ namespace math{ + +namespace detail{ + + + + +template +T erf_inv_imp(const T& p, const T& q, const Policy&, const std::integral_constant*) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + + T result = 0; + + if(p <= 0.5) + { +# 48 "../../../../boost/math/special_functions/detail/erf_inv.hpp" + static const float Y = 0.0891314744949340820313f; + static const T P[] = { + boost::math::tools::make_big_value( -0.000508781949658280665617, "-0.000508781949658280665617", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00836874819741736770379, "-0.00836874819741736770379", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0334806625409744615033, "0.0334806625409744615033", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0126926147662974029034, "-0.0126926147662974029034", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0365637971411762664006, "-0.0365637971411762664006", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0219878681111168899165, "0.0219878681111168899165", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00822687874676915743155, "0.00822687874676915743155", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00538772965071242932965, "-0.00538772965071242932965", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.970005043303290640362, "-0.970005043303290640362", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -1.56574558234175846809, "-1.56574558234175846809", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.56221558398423026363, "1.56221558398423026363", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.662328840472002992063, "0.662328840472002992063", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.71228902341542847553, "-0.71228902341542847553", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.0527396382340099713954, "-0.0527396382340099713954", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0795283687341571680018, "0.0795283687341571680018", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00233393759374190016776, "-0.00233393759374190016776", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000886216390456424707504, "0.000886216390456424707504", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T g = p * (p + 10); + T r = tools::evaluate_polynomial(P, p) / tools::evaluate_polynomial(Q, p); + result = g * Y + g * r; + } + else if(q >= 0.25) + { +# 89 "../../../../boost/math/special_functions/detail/erf_inv.hpp" + static const float Y = 2.249481201171875f; + static const T P[] = { + boost::math::tools::make_big_value( -0.202433508355938759655, "-0.202433508355938759655", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.105264680699391713268, "0.105264680699391713268", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 8.37050328343119927838, "8.37050328343119927838", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 17.6447298408374015486, "17.6447298408374015486", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -18.8510648058714251895, "-18.8510648058714251895", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -44.6382324441786960818, "-44.6382324441786960818", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 17.445385985570866523, "17.445385985570866523", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 21.1294655448340526258, "21.1294655448340526258", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -3.67192254707729348546, "-3.67192254707729348546", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 6.24264124854247537712, "6.24264124854247537712", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.9713437953343869095, "3.9713437953343869095", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -28.6608180499800029974, "-28.6608180499800029974", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -20.1432634680485188801, "-20.1432634680485188801", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 48.5609213108739935468, "48.5609213108739935468", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 10.8268667355460159008, "10.8268667355460159008", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -22.6436933413139721736, "-22.6436933413139721736", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.72114765761200282724, "1.72114765761200282724", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T g = sqrt(-2 * log(q)); + T xs = q - 0.25f; + T r = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = g / (Y + r); + } + else + { +# 138 "../../../../boost/math/special_functions/detail/erf_inv.hpp" + T x = sqrt(-log(q)); + if(x < 3) + { + + static const float Y = 0.807220458984375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.131102781679951906451, "-0.131102781679951906451", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.163794047193317060787, "-0.163794047193317060787", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.117030156341995252019, "0.117030156341995252019", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.387079738972604337464, "0.387079738972604337464", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.337785538912035898924, "0.337785538912035898924", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.142869534408157156766, "0.142869534408157156766", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0290157910005329060432, "0.0290157910005329060432", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00214558995388805277169, "0.00214558995388805277169", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.679465575181126350155e-6, "-0.679465575181126350155e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.285225331782217055858e-7, "0.285225331782217055858e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.681149956853776992068e-9, "-0.681149956853776992068e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 3.46625407242567245975, "3.46625407242567245975", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 5.38168345707006855425, "5.38168345707006855425", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 4.77846592945843778382, "4.77846592945843778382", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 2.59301921623620271374, "2.59301921623620271374", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.848854343457902036425, "0.848854343457902036425", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.152264338295331783612, "0.152264338295331783612", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.01105924229346489121, "0.01105924229346489121", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 1.125f; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 6) + { + + static const float Y = 0.93995571136474609375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0350353787183177984712, "-0.0350353787183177984712", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00222426529213447927281, "-0.00222426529213447927281", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0185573306514231072324, "0.0185573306514231072324", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00950804701325919603619, "0.00950804701325919603619", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00187123492819559223345, "0.00187123492819559223345", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000157544617424960554631, "0.000157544617424960554631", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.460469890584317994083e-5, "0.460469890584317994083e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.230404776911882601748e-9, "-0.230404776911882601748e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.266339227425782031962e-11, "0.266339227425782031962e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 1.3653349817554063097, "1.3653349817554063097", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.762059164553623404043, "0.762059164553623404043", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.220091105764131249824, "0.220091105764131249824", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0341589143670947727934, "0.0341589143670947727934", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00263861676657015992959, "0.00263861676657015992959", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.764675292302794483503e-4, "0.764675292302794483503e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 3; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 18) + { + + static const float Y = 0.98362827301025390625f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0167431005076633737133, "-0.0167431005076633737133", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.00112951438745580278863, "-0.00112951438745580278863", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00105628862152492910091, "0.00105628862152492910091", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000209386317487588078668, "0.000209386317487588078668", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.149624783758342370182e-4, "0.149624783758342370182e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.449696789927706453732e-6, "0.449696789927706453732e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.462596163522878599135e-8, "0.462596163522878599135e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.281128735628831791805e-13, "-0.281128735628831791805e-13", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.99055709973310326855e-16, "0.99055709973310326855e-16", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.591429344886417493481, "0.591429344886417493481", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.138151865749083321638, "0.138151865749083321638", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0160746087093676504695, "0.0160746087093676504695", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000964011807005165528527, "0.000964011807005165528527", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.275335474764726041141e-4, "0.275335474764726041141e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.282243172016108031869e-6, "0.282243172016108031869e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 6; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 44) + { + + static const float Y = 0.99714565277099609375f; + static const T P[] = { + boost::math::tools::make_big_value( -0.0024978212791898131227, "-0.0024978212791898131227", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.779190719229053954292e-5, "-0.779190719229053954292e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.254723037413027451751e-4, "0.254723037413027451751e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.162397777342510920873e-5, "0.162397777342510920873e-5", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.396341011304801168516e-7, "0.396341011304801168516e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.411632831190944208473e-9, "0.411632831190944208473e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.145596286718675035587e-11, "0.145596286718675035587e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.116765012397184275695e-17, "-0.116765012397184275695e-17", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.207123112214422517181, "0.207123112214422517181", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0169410838120975906478, "0.0169410838120975906478", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.000690538265622684595676, "0.000690538265622684595676", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.145007359818232637924e-4, "0.145007359818232637924e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.144437756628144157666e-6, "0.144437756628144157666e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.509761276599778486139e-9, "0.509761276599778486139e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 18; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else + { + + static const float Y = 0.99941349029541015625f; + static const T P[] = { + boost::math::tools::make_big_value( -0.000539042911019078575891, "-0.000539042911019078575891", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.28398759004727721098e-6, "-0.28398759004727721098e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.899465114892291446442e-6, "0.899465114892291446442e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.229345859265920864296e-7, "0.229345859265920864296e-7", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.225561444863500149219e-9, "0.225561444863500149219e-9", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.947846627503022684216e-12, "0.947846627503022684216e-12", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.135880130108924861008e-14, "0.135880130108924861008e-14", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( -0.348890393399948882918e-21, "-0.348890393399948882918e-21", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + static const T Q[] = { + boost::math::tools::make_big_value( 1.0, "1.0", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.0845746234001899436914, "0.0845746234001899436914", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.00282092984726264681981, "0.00282092984726264681981", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.468292921940894236786e-4, "0.468292921940894236786e-4", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.399968812193862100054e-6, "0.399968812193862100054e-6", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.161809290887904476097e-8, "0.161809290887904476097e-8", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()), + boost::math::tools::make_big_value( 0.231558608310259605225e-11, "0.231558608310259605225e-11", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible()) + }; + T xs = x - 44; + T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + } + return result; +} + +template +struct erf_roots +{ + boost::math::tuple operator()(const T& guess) + { + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; + T derivative = sign * (2 / sqrt(constants::pi())) * exp(-(guess * guess)); + T derivative2 = -2 * guess * derivative; + return boost::math::make_tuple(((sign > 0) ? static_cast(boost::math::erf(guess, Policy()) - target) : static_cast(boost::math::erfc(guess, Policy())) - target), derivative, derivative2); + } + erf_roots(T z, int s) : target(z), sign(s) {} +private: + T target; + int sign; +}; + +template +T erf_inv_imp(const T& p, const T& q, const Policy& pol, const std::integral_constant*) +{ + + + + T guess = erf_inv_imp(p, q, pol, static_cast const*>(0)); + T result; + + + + + if(policies::digits() > 64) + { + std::uintmax_t max_iter = policies::get_max_root_iterations(); + if(p <= 0.5) + { + result = tools::halley_iterate(detail::erf_roots::type, Policy>(p, 1), guess, static_cast(0), tools::max_value(), (policies::digits() * 2) / 3, max_iter); + } + else + { + result = tools::halley_iterate(detail::erf_roots::type, Policy>(q, -1), guess, static_cast(0), tools::max_value(), (policies::digits() * 2) / 3, max_iter); + } + policies::check_root_iterations("boost::math::erf_inv<%1%>", max_iter, pol); + } + else + { + result = guess; + } + return result; +} + +template +struct erf_inv_initializer +{ + struct init + { + init() + { + do_init(); + } + static bool is_value_non_zero(T); + static void do_init() + { + + + + if(std::numeric_limits::digits) + { + boost::math::erf_inv(static_cast(0.25), Policy()); + boost::math::erf_inv(static_cast(0.55), Policy()); + boost::math::erf_inv(static_cast(0.95), Policy()); + boost::math::erfc_inv(static_cast(1e-15), Policy()); + + + + + + if(is_value_non_zero(static_cast(boost::math::tools::make_big_value( 1e-130, "1e-130", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())))) + boost::math::erfc_inv(static_cast(boost::math::tools::make_big_value( 1e-130, "1e-130", std::integral_constant::value) && ((64 <= boost::math::tools::numeric_traits::digits) || std::is_floating_point::value || (boost::math::tools::numeric_traits::is_specialized && (boost::math::tools::numeric_traits::digits10 <= boost::math::tools::numeric_traits::digits10))) >(), std::is_constructible())), Policy()); +# 369 "../../../../boost/math/special_functions/detail/erf_inv.hpp" + if(is_value_non_zero(static_cast(boost::math::tools::make_big_value(0.0L, "1e-800", std::integral_constant::value || (boost::math::tools::numeric_traits::is_specialized && boost::math::tools::numeric_traits::max_exponent <= boost::math::tools::numeric_traits::max_exponent && boost::math::tools::numeric_traits::digits <= boost::math::tools::numeric_traits::digits)>(), std::is_constructible())))) + boost::math::erfc_inv(static_cast(boost::math::tools::make_big_value(0.0L, "1e-800", std::integral_constant::value || (boost::math::tools::numeric_traits::is_specialized && boost::math::tools::numeric_traits::max_exponent <= boost::math::tools::numeric_traits::max_exponent && boost::math::tools::numeric_traits::digits <= boost::math::tools::numeric_traits::digits)>(), std::is_constructible())), Policy()); + if(is_value_non_zero(static_cast(boost::math::tools::make_big_value(0.0L, "1e-900", std::integral_constant::value || (boost::math::tools::numeric_traits::is_specialized && boost::math::tools::numeric_traits::max_exponent <= boost::math::tools::numeric_traits::max_exponent && boost::math::tools::numeric_traits::digits <= boost::math::tools::numeric_traits::digits)>(), std::is_constructible())))) + boost::math::erfc_inv(static_cast(boost::math::tools::make_big_value(0.0L, "1e-900", std::integral_constant::value || (boost::math::tools::numeric_traits::is_specialized && boost::math::tools::numeric_traits::max_exponent <= boost::math::tools::numeric_traits::max_exponent && boost::math::tools::numeric_traits::digits <= boost::math::tools::numeric_traits::digits)>(), std::is_constructible())), Policy()); + + } + } + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename erf_inv_initializer::init erf_inv_initializer::initializer; + +template +bool erf_inv_initializer::init::is_value_non_zero(T v) +{ + + + + return v != 0; +} + +} + +export template +typename tools::promote_args::type erfc_inv(T z, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + + + + + static const char* function = "boost::math::erfc_inv<%1%>(%1%, %1%)"; + if((z < 0) || (z > 2)) + return policies::raise_domain_error(function, "Argument outside range [0,2] in inverse erfc function (got p=%1%).", z, pol); + if(z == 0) + return policies::raise_overflow_error(function, 0, pol); + if(z == 2) + return -policies::raise_overflow_error(function, 0, pol); + + + + + + result_type p, q, s; + if(z > 1) + { + q = 2 - z; + p = 1 - q; + s = -1; + } + else + { + p = 1 - z; + q = z; + s = 1; + } + + + + + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + + + + + typedef typename policies::evaluation::type eval_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + detail::erf_inv_initializer::force_instantiate(); + + + + + return s * policies::checked_narrowing_cast( + detail::erf_inv_imp(static_cast(p), static_cast(q), forwarding_policy(), static_cast(0)), function); +} + +export template +typename tools::promote_args::type erf_inv(T z, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + + + + + static const char* function = "boost::math::erf_inv<%1%>(%1%, %1%)"; + if((z < -1) || (z > 1)) + return policies::raise_domain_error(function, "Argument outside range [-1, 1] in inverse erf function (got p=%1%).", z, pol); + if(z == 1) + return policies::raise_overflow_error(function, 0, pol); + if(z == -1) + return -policies::raise_overflow_error(function, 0, pol); + if(z == 0) + return 0; + + + + + + result_type p, q, s; + if(z < 0) + { + p = -z; + q = 1 - p; + s = -1; + } + else + { + p = z; + q = 1 - z; + s = 1; + } + + + + + typedef typename policies::precision::type precision_type; + typedef std::integral_constant tag_type; + + + + + typedef typename policies::evaluation::type eval_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + + + + + typedef typename policies::evaluation::type eval_type; + + detail::erf_inv_initializer::force_instantiate(); + + + + return s * policies::checked_narrowing_cast( + detail::erf_inv_imp(static_cast(p), static_cast(q), forwarding_policy(), static_cast(0)), function); +} + +export template +inline typename tools::promote_args::type erfc_inv(T z) +{ + return erfc_inv(z, policies::policy<>()); +} + +export template +inline typename tools::promote_args::type erf_inv(T z) +{ + return erf_inv(z, policies::policy<>()); +} + +} +} +# 1266 "../../../../boost/math/special_functions/erf.hpp" 2 +# 2218 "../../../../boost/math/special_functions/gamma.hpp" 2 +# 196 "../../module/sf.cxx" 2 diff --git a/test/modules/test_constants.cpp b/test/modules/test_constants.cpp new file mode 100644 index 0000000000..06a0879135 --- /dev/null +++ b/test/modules/test_constants.cpp @@ -0,0 +1,23 @@ +// Copyright John Maddock 2022. + +// 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) + +#include +#include +#include + +import boost.math.constants; + +int main() +{ + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::constants::pi() << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::constants::pi() << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::constants::pi() << std::endl; + + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::float_constants::pi << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::double_constants::pi << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::long_double_constants::pi << std::endl; +} diff --git a/test/modules/test_core.cpp b/test/modules/test_core.cpp new file mode 100644 index 0000000000..7e45187d20 --- /dev/null +++ b/test/modules/test_core.cpp @@ -0,0 +1,109 @@ +// Copyright John Maddock 2022. + +// 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) + +#include +#include +#include +#include +#include +#include +#include + +import boost.math.core; + +int main() +{ + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::sign(-1.245f) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::sign(-1.245) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::sign(-1.245L) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::signbit(-1.245f) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::signbit(-1.245) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::signbit(-1.245L) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::changesign(-1.245f) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::changesign(-1.245) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::changesign(-1.245L) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::copysign(1.0f, -1.245f) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::copysign(1.0, -1.245) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::copysign(1.0L, -1.245L) << std::endl; + + std::cout << boost::math::fpclassify(1.0f) << std::endl; + std::cout << boost::math::isnormal(1.0f) << std::endl; + std::cout << boost::math::isnan(1.0f) << std::endl; + std::cout << boost::math::isinf(1.0f) << std::endl; + std::cout << boost::math::isfinite(1.0f) << std::endl; + std::cout << boost::math::fpclassify(1.0) << std::endl; + std::cout << boost::math::isnormal(1.0) << std::endl; + std::cout << boost::math::isnan(1.0) << std::endl; + std::cout << boost::math::isinf(1.0) << std::endl; + std::cout << boost::math::isfinite(1.0) << std::endl; + std::cout << boost::math::fpclassify(1.0L) << std::endl; + std::cout << boost::math::isnormal(1.0L) << std::endl; + std::cout << boost::math::isnan(1.0L) << std::endl; + std::cout << boost::math::isinf(1.0L) << std::endl; + std::cout << boost::math::isfinite(1.0L) << std::endl; + + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::trunc(3.14) << std::endl; + std::cout << boost::math::itrunc(3.14) << std::endl; + std::cout << boost::math::ltrunc(3.14) << std::endl; + std::cout << boost::math::lltrunc(3.14) << std::endl; + std::cout << boost::math::iconvert(3.14, boost::math::policies::make_policy()) << std::endl; + std::cout << boost::math::lconvert(3.14, boost::math::policies::make_policy()) << std::endl; + std::cout << boost::math::llconvert(3.14, boost::math::policies::make_policy()) << std::endl; + + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::float_next(3.1456789876) << std::endl; + std::cout << std::setprecision(std::numeric_limits::max_digits10) << boost::math::float_prior(3.1456789876) << std::endl; + std::cout << boost::math::float_distance(3.1456789876, boost::math::float_prior(3.1456789876)) << std::endl; + std::cout << boost::math::float_distance(3.1456789876, boost::math::float_advance(3.1456789876, 2)) << std::endl; + + auto f = [](double x) { return 3 * x - 2; }; + std::uintmax_t max_iter = 300; + std::cout << boost::math::tools::toms748_solve(f, 0.0, 4.0, f(0.0), f(4.0), boost::math::tools::eps_tolerance(), max_iter, boost::math::policies::make_policy()).first << std::endl; + max_iter = 300; + std::cout << boost::math::tools::toms748_solve(f, 0.0, 4.0, boost::math::tools::eps_tolerance(), max_iter, boost::math::policies::make_policy()).first << std::endl; + max_iter = 300; + std::cout << boost::math::tools::toms748_solve(f, 0.0, 4.0, f(0.0), f(4.0), boost::math::tools::eps_tolerance(), max_iter).first << std::endl; + max_iter = 300; + std::cout << boost::math::tools::toms748_solve(f, 0.0, 4.0, boost::math::tools::eps_tolerance(), max_iter).first << std::endl; + max_iter = 300; + std::cout << boost::math::tools::bracket_and_solve_root(f, 1.0, 2.0, true, boost::math::tools::eps_tolerance(), max_iter, boost::math::policies::make_policy()).first << std::endl; + max_iter = 300; + std::cout << boost::math::tools::bracket_and_solve_root(f, 1.0, 2.0, true, boost::math::tools::eps_tolerance(), max_iter).first << std::endl; + + max_iter = 300; + std::cout << boost::math::tools::bisect(f, 0.0, 3.0, boost::math::tools::eps_tolerance(), max_iter, boost::math::policies::make_policy()).first << std::endl; + max_iter = 300; + std::cout << boost::math::tools::bisect(f, 0.0, 3.0, boost::math::tools::eps_tolerance(), max_iter).first << std::endl; + max_iter = 300; + std::cout << boost::math::tools::bisect(f, 0.0, 3.0, boost::math::tools::eps_tolerance()).first << std::endl; + max_iter = 300; + auto f2 = [](double x) { return std::make_tuple(3 * x - 2, 3.0); }; + std::cout << boost::math::tools::newton_raphson_iterate(f2, 2.0, 0.0, 4.0, 50, max_iter) << std::endl; + std::cout << boost::math::tools::newton_raphson_iterate(f2, 2.0, 0.0, 4.0, 50) << std::endl; + auto f3 = [](double x) { return std::make_tuple(3 * x * x - 5 * x - 3, 6 * x - 5, 6.0); }; + max_iter = 200; + std::cout << boost::math::tools::halley_iterate(f3, 2.0, 1.0, 5.0, 50, max_iter) << std::endl; + max_iter = 200; + std::cout << boost::math::tools::halley_iterate(f3, 2.0, 1.0, 5.0, 50) << std::endl; + max_iter = 200; + std::cout << boost::math::tools::schroder_iterate(f3, 2.0, 1.0, 5.0, 50, max_iter) << std::endl; + max_iter = 200; + std::cout << boost::math::tools::schroder_iterate(f3, 2.0, 1.0, 5.0, 50) << std::endl; + max_iter = 200; + std::cout << boost::math::tools::schroeder_iterate(f3, 2.0, 1.0, 5.0, 50, max_iter) << std::endl; + max_iter = 200; + std::cout << boost::math::tools::schroeder_iterate(f3, 2.0, 1.0, 5.0, 50) << std::endl; + auto f4 = [](std::complex z) { return std::make_pair(z * z + 1.0, 2.0 * z); }; + std::cout << boost::math::tools::complex_newton(f4, std::complex(0)) << std::endl; + std::cout << boost::math::tools::quadratic_roots(1.0, 0.0, -1.0).first << std::endl; + + double coef[] = { 1, 4, -3, 5, -2 }; + double coef2[] = { 5, -7, 1, -2, 0 }; + std::cout << boost::math::tools::evaluate_polynomial(coef, 2.0) << std::endl; + std::cout << boost::math::tools::evaluate_even_polynomial(coef, 2.0) << std::endl; + std::cout << boost::math::tools::evaluate_odd_polynomial(coef, 2.0) << std::endl; + std::cout << boost::math::tools::evaluate_rational(coef, coef2, 2.0) << std::endl; +} diff --git a/test/modules/test_policy.cpp b/test/modules/test_policy.cpp new file mode 100644 index 0000000000..8f4d48cc2c --- /dev/null +++ b/test/modules/test_policy.cpp @@ -0,0 +1,145 @@ + +// Copyright John Maddock 2022. + +// 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) + +#include +#include + +import boost.math.core; + +template +bool check_same(const P1&, const P2&) +{ + if(!std::is_same::value) + { + std::cout << "P1 = " << typeid(P1).name() << std::endl; + std::cout << "P2 = " << typeid(P2).name() << std::endl; + } + return std::is_same::value; +} + + +int main() +{ + using namespace boost::math::policies; + using namespace boost; + static_assert((std::is_same >::domain_error_type, domain_error >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type>::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, pole_error >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type>::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, overflow_error >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type>::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + static_assert((std::is_same >::underflow_error_type, underflow_error >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type>::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + static_assert((std::is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + static_assert((std::is_same >::denorm_error_type, denorm_error >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type>::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + static_assert((std::is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + static_assert((std::is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); + static_assert((std::is_same >::evaluation_error_type, evaluation_error >::value)); + static_assert((std::is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type>::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + static_assert((std::is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + static_assert((std::is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); + static_assert((std::is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + static_assert((std::is_same >::indeterminate_result_error_type, indeterminate_result_error >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type>::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + static_assert((std::is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + static_assert((std::is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); + static_assert((std::is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + static_assert((std::is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); + static_assert((std::is_same >::precision_type, digits2<20> >::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + static_assert((std::is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + static_assert((std::is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); + static_assert((std::is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + static_assert((std::is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type >::value)); + static_assert((std::is_same >::promote_float_type, promote_float >::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + static_assert((std::is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + static_assert((std::is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); + static_assert((std::is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + static_assert((std::is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type >::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, promote_double >::value)); + static_assert((std::is_same >::discrete_quantile_type, policy<>::discrete_quantile_type>::value)); + + static_assert((std::is_same >::domain_error_type, policy<>::domain_error_type >::value)); + static_assert((std::is_same >::pole_error_type, policy<>::pole_error_type >::value)); + static_assert((std::is_same >::overflow_error_type, policy<>::overflow_error_type >::value)); + static_assert((std::is_same >::underflow_error_type, policy<>::underflow_error_type >::value)); + static_assert((std::is_same >::denorm_error_type, policy<>::denorm_error_type >::value)); + static_assert((std::is_same >::evaluation_error_type, policy<>::evaluation_error_type >::value)); + static_assert((std::is_same >::indeterminate_result_error_type, policy<>::indeterminate_result_error_type >::value)); + static_assert((std::is_same >::precision_type, policy<>::precision_type >::value)); + static_assert((std::is_same >::promote_float_type, policy<>::promote_float_type>::value)); + static_assert((std::is_same >::promote_double_type, policy<>::promote_double_type>::value)); + static_assert((std::is_same >::discrete_quantile_type, discrete_quantile >::value)); + +} // BOOST_AUTO_TEST_CASE( test_main ) + + + diff --git a/test/modules/test_sf.cpp b/test/modules/test_sf.cpp new file mode 100644 index 0000000000..2b42c061a0 --- /dev/null +++ b/test/modules/test_sf.cpp @@ -0,0 +1,49 @@ +// Copyright John Maddock 2022. + +// 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) + +#include +#include +#include +#include +#include +#include + +import boost.math.special_functions; + +int main() +{ + std::cout << boost::math::tgamma(2.5) << std::endl; + std::cout << boost::math::lgamma(2.5) << std::endl; + std::cout << boost::math::tgamma1pm1(2.5) << std::endl; + std::cout << boost::math::digamma(2.5) << std::endl; + std::cout << boost::math::trigamma(2.5) << std::endl; + std::cout << boost::math::tgamma_ratio(2.5, 2.75) << std::endl; + std::cout << boost::math::tgamma_delta_ratio(2.5, -0.25) << std::endl; + std::cout << boost::math::gamma_p(2.5, 3.25) << std::endl; + std::cout << boost::math::gamma_q(2.5, 3.25) << std::endl; + std::cout << boost::math::tgamma(2.5, 3.25) << std::endl; + std::cout << boost::math::tgamma_lower(2.5, 3.25) << std::endl; + std::cout << boost::math::gamma_p_inv(2.5, 0.5) << std::endl; + std::cout << boost::math::gamma_q_inv(2.5, 0.5) << std::endl; + std::cout << boost::math::gamma_q_inva(2.5, 0.5) << std::endl; + std::cout << boost::math::gamma_p_inva(2.5, 0.5) << std::endl; + std::cout << boost::math::gamma_p_derivative(2.5, 2.75) << std::endl; + std::cout << boost::math::factorial(7) << std::endl; + std::cout << boost::math::unchecked_factorial(7) << std::endl; + std::cout << boost::math::double_factorial(7) << std::endl; + std::cout << boost::math::rising_factorial(12.5, 7) << std::endl; + std::cout << boost::math::falling_factorial(12.5, 7) << std::endl; + std::cout << boost::math::erf(1.5) << std::endl; + std::cout << boost::math::erfc(1.5) << std::endl; + std::cout << boost::math::erf_inv(0.5) << std::endl; + std::cout << boost::math::erfc_inv(0.5) << std::endl; + std::cout << boost::math::zeta(0.5) << std::endl; + std::cout << boost::math::sin_pi(0.5) << std::endl; + std::cout << boost::math::cos_pi(0.5) << std::endl; + std::cout << boost::math::log1p(0.5) << std::endl; + std::cout << boost::math::expm1(0.5) << std::endl; +}