From 9c6f195e4d385c6216fcb7f5b04e1efd666256d5 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Wed, 8 Jan 2014 22:58:11 +0100 Subject: [PATCH 01/69] Implement cubed root of epsilon and preliminary multiprecision tgamma() and lgamma() for very small argument. --- .../boost/math/special_functions/gamma.hpp | 11 ++++-- include/boost/math/tools/precision.hpp | 39 +++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index a188647e9..10e31c076 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -389,13 +389,18 @@ T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&) { return boost::math::unchecked_factorial(itrunc(z) - 1); } - // Special case for ultra-small z: - if(!b_neg && (z < tools::epsilon())) - return 1 / z; // Make a local, unsigned copy of the input argument. T zz((!b_neg) ? z : -z); + // Special case for ultra-small z: + if(zz < tools::cbrt_epsilon()) + { + const T inverse_tgamma_series = z * (1 + (z * boost::math::constants::euler())); + + return 1 / inverse_tgamma_series; + } + // Scale the argument up for the calculation of lgamma, // and use downward recursion later for the final result. const T min_arg_for_recursion = minimum_argument_for_bernoulli_recursion(); diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index 66d275427..b89465d0e 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -279,6 +279,38 @@ inline T root_epsilon_imp(const T*, const Tag&) return r_eps; } +template +inline T cbrt_epsilon_imp(const mpl::int_<24>&) +{ + return static_cast(0.0049215666011518482998719164346805794944150447839903L); +} + +template +inline T cbrt_epsilon_imp(const T*, const mpl::int_<53>&) +{ + return static_cast(6.05545445239333906078989272793696693569753008995e-6L); +} + +template +inline T cbrt_epsilon_imp(const T*, const mpl::int_<64>&) +{ + return static_cast(4.76837158203125e-7L); +} + +template +inline T cbrt_epsilon_imp(const T*, const mpl::int_<113>&) +{ + return static_cast(5.7749313854154005630396773604745549542403508090496e-12L); +} + +template +inline T cbrt_epsilon_imp(const T*, const Tag&) +{ + BOOST_MATH_STD_USING + static const T cbrt_eps = pow(tools::epsilon(), T(1) / 3); + return cbrt_eps; +} + template inline T forth_root_epsilon_imp(const T*, const mpl::int_<24>&) { @@ -320,6 +352,13 @@ inline T root_epsilon() return detail::root_epsilon_imp(static_cast(0), tag_type()); } +template +inline T cbrt_epsilon() +{ + typedef mpl::int_< (::std::numeric_limits::radix == 2) ? std::numeric_limits::digits : 0> tag_type; + return detail::cbrt_epsilon_imp(static_cast(0), tag_type()); +} + template inline T forth_root_epsilon() { From cd74da0ed157ef9927474223f610fe2923236d53 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Fri, 10 Jan 2014 08:35:43 +0100 Subject: [PATCH 02/69] Add tiny argument treatment to multiprecision tgamma(). Add tools cbrt_epsilon(). --- include/boost/math/special_functions/gamma.hpp | 7 ++++++- include/boost/math/tools/precision.hpp | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/boost/math/special_functions/gamma.hpp b/include/boost/math/special_functions/gamma.hpp index 10e31c076..1b03012fd 100644 --- a/include/boost/math/special_functions/gamma.hpp +++ b/include/boost/math/special_functions/gamma.hpp @@ -396,7 +396,12 @@ T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&) // Special case for ultra-small z: if(zz < tools::cbrt_epsilon()) { - const T inverse_tgamma_series = z * (1 + (z * boost::math::constants::euler())); + 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; } diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index b89465d0e..e3ab5aa4e 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -17,6 +17,7 @@ #include #include #include +#include // These two are for LDBL_MAN_DIG: #include @@ -306,8 +307,8 @@ inline T cbrt_epsilon_imp(const T*, const mpl::int_<113>&) template inline T cbrt_epsilon_imp(const T*, const Tag&) { - BOOST_MATH_STD_USING - static const T cbrt_eps = pow(tools::epsilon(), T(1) / 3); + using boost::math::cbrt; + static const T cbrt_eps = cbrt(tools::epsilon()); return cbrt_eps; } From c363d125f4bff67e37de453553e1721f1ae31b55 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Fri, 10 Jan 2014 08:36:28 +0100 Subject: [PATCH 03/69] Initial commit of a very rudimentary sketch of . --- include/boost/math/tools/cstdfloat.hpp | 143 +++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 include/boost/math/tools/cstdfloat.hpp diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp new file mode 100644 index 000000000..fe7b0941d --- /dev/null +++ b/include/boost/math/tools/cstdfloat.hpp @@ -0,0 +1,143 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright Christopher Kormanyos 2014. +// Copyright John Maddock 2014. +// Copyright Paul Bristow 2014. +// Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + +#ifndef _BOOST_CSTDFLOAT_2014_01_09_HPP_ + #define _BOOST_CSTDFLOAT_2014_01_09_HPP_ + + #include + #include + #include + + // This is the beginning of the preamble. + + // In this preamble, the preprocessor is used to query certain + // preprocessor definitions in order to detect the presence of + // built-in floating-point types having specified widths. + + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 + + #if defined(FLT_MAX_EXP) && ((FLT_MAX_EXP == 128) && (FLT_RADIX == 2)) + #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 + #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 + #else + #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 0 + #endif + + #if defined(DBL_MAX_EXP) && ((DBL_MAX_EXP == 1024) && (FLT_RADIX == 2)) + #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 + #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 + #else + #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 0 + #endif + + #if (0) + #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 + #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 + #else + #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0 + #endif + + #if (0) + #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 + #else + #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0 + #endif + + // This is the end of preamble and the beginning of the typedefs. + + // Here, we define the floating-point typedefs having specified widths + // based on the proeprocessor analysis in the preamble above. + // An assessment of IEEE-754 comformance is also carried out. + + #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) + typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float32_t; + BOOST_STATIC_ASSERT(std::numeric_limits<::float32_t>::is_iec559 == true); + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) + typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float64_t; + BOOST_STATIC_ASSERT(std::numeric_limits<::float64_t>::is_iec559 == true); + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) + typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float80_t; + BOOST_STATIC_ASSERT(std::numeric_limits<::float80_t>::is_iec559 == true); + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_NATIVE_TYPE == 1) + typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_NATIVE_TYPE float128_t; + BOOST_STATIC_ASSERT(std::numeric_limits<::float128_t>::is_iec559 == true); + #endif + + #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) + typedef float32_t floatmax_t; + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) + typedef float64_t floatmax_t; + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) + typedef float80_t floatmax_t; + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) + typedef float128_t floatmax_t; + #else + #error undefined floating-point width for cstdfloat + #endif + + // Here, we inject the floating-point typedefs having + // specified widths into the namespace boost. + namespace boost + { + #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) + using ::float32_t; + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) + using ::float64_t; + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) + using ::float80_t; + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) + using ::float128_t; + #endif + + #if(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH != 0) + using ::floatmax_t; + #endif + } + + // Here, we define macros that are used for initializing floating-point + // literal values for the floating-point typedefs having specified widths. + + #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) + #define FLOAT32_C(x) (x ## F) + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) + #define FLOAT64_C(x) (x) + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) + #define FLOAT80_C(x) (x ## L) + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) + #define FLOAT128_C(x) (x ## L) + #endif + +#endif // _BOOST_CSTDFLOAT_2014_01_09_HPP_ From e373870c01c02130f2a156d5c7937a441caa8ba1 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Fri, 10 Jan 2014 19:37:33 +0100 Subject: [PATCH 04/69] Preliminary concept implemntation of . --- include/boost/math/tools/cstdfloat.hpp | 220 +++++++++++++++++-------- 1 file changed, 155 insertions(+), 65 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index fe7b0941d..a2eed3961 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -11,19 +11,21 @@ #define _BOOST_CSTDFLOAT_2014_01_09_HPP_ #include - #include #include // This is the beginning of the preamble. // In this preamble, the preprocessor is used to query certain - // preprocessor definitions in order to detect the presence of - // built-in floating-point types having specified widths. + // preprocessor definitions from . With these queries, + // an attempt is made to automatically detect the presence of + // built-in floating-point types having specified widths, + // and these are also thought to be conformant with IEEE-754. #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 - #if defined(FLT_MAX_EXP) && ((FLT_MAX_EXP == 128) && (FLT_RADIX == 2)) - #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float + #if (defined(FLT_RADIX) && defined(FLT_MANT_DIG) && defined(FLT_MAX_EXP)) \ + && ((FLT_RADIX == 2) && (FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128)) + #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 @@ -31,8 +33,9 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 0 #endif - #if defined(DBL_MAX_EXP) && ((DBL_MAX_EXP == 1024) && (FLT_RADIX == 2)) - #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double + #if (defined(FLT_RADIX) && defined(DBL_MANT_DIG) && defined(DBL_MAX_EXP)) \ + && ((FLT_RADIX == 2) && (DBL_MANT_DIG == 53) && (DBL_MAX_EXP == 1024)) + #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 @@ -40,8 +43,9 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 0 #endif - #if (0) - #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double + #if (defined(FLT_RADIX) && defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP)) \ + && ((FLT_RADIX == 2) && (LDBL_MANT_DIG == 63) && (LDBL_MAX_EXP == 16384)) + #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 @@ -49,8 +53,9 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0 #endif - #if (0) - #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double + #if (defined(FLT_RADIX) && defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP)) \ + && ((FLT_RADIX == 2) && (LDBL_MANT_DIG == 113) && (LDBL_MAX_EXP == 16384)) + #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 @@ -58,86 +63,171 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0 #endif - // This is the end of preamble and the beginning of the typedefs. + #if (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0) \ + && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ + && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ + && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0) + #error The compiler does not support any of the required floating-point types for . + #endif + + // This is the end of the preamble and the beginning of the type definitions. // Here, we define the floating-point typedefs having specified widths - // based on the proeprocessor analysis in the preamble above. - // An assessment of IEEE-754 comformance is also carried out. + // based on the proeprocessor analysis from the preamble above. + + // These type definitions are defined in the global namespace, + // and the corresponding types are prefixed with "_boost". + + // For simplicity, the least and fast types are type defined identically + // as the corresponding fixed-width type. This behavior can, however, + // be modified in order to be optimized for a given compiler implementation. + + // In addition, a clear assessment of IEEE-754 comformance is carried out + // using compile-time assertion. #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float32_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::float32_t>::is_iec559 == true); + typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE boost_float32_t; + typedef boost_float32_t boost_float_fast32_t; + typedef boost_float32_t boost_float_least32_t; + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::digits == 24); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::max_exponent == 128); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float64_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::float64_t>::is_iec559 == true); + typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE boost_float64_t; + typedef boost_float64_t boost_float_fast64_t; + typedef boost_float64_t boost_float_least64_t; + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::digits == 53); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::max_exponent == 1024); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float80_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::float80_t>::is_iec559 == true); + typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE boost_float80_t; + typedef boost_float80_t boost_float_fast80_t; + typedef boost_float80_t boost_float_least80_t; + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::digits == 63); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::max_exponent == 16384); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_NATIVE_TYPE float128_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::float128_t>::is_iec559 == true); + typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_NATIVE_TYPE boost_float128_t; + typedef boost_float128_t boost_float_fast128_t; + typedef boost_float128_t boost_float_least128_t; + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::digits == 113); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::max_exponent == 16384); #endif - #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) - typedef float32_t floatmax_t; - #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) - typedef float64_t floatmax_t; - #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) - typedef float80_t floatmax_t; - #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) - typedef float128_t floatmax_t; - #else - #error undefined floating-point width for cstdfloat - #endif - - // Here, we inject the floating-point typedefs having - // specified widths into the namespace boost. - namespace boost - { - #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - using ::float32_t; - #endif - - #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - using ::float64_t; - #endif - - #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - using ::float80_t; - #endif - - #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - using ::float128_t; - #endif - - #if(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH != 0) - using ::floatmax_t; - #endif - } - - // Here, we define macros that are used for initializing floating-point - // literal values for the floating-point typedefs having specified widths. + // The following section contains the first group of macros that + // are used for initializing floating-point literal values. + // The types of all three forms (fixed-width, least-width, and fast-width) + // in precisions of 32, 64, 80, 128 are handled. #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - #define FLOAT32_C(x) (x ## F) + #define BOOST_FLOAT32_C(x) (x ## F) + #define BOOST_FLOAT_32_MIN FLT_MIN + #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN + #define BOOST_FLOAT_LEAST32_MIN BOOST_FLOAT_32_MIN + #define BOOST_FLOAT_32_MAX FLT_MAX + #define BOOST_FLOAT_FAST32_MAX BOOST_FLOAT_32_MAX + #define BOOST_FLOAT_LEAST32_MAX BOOST_FLOAT_32_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - #define FLOAT64_C(x) (x) + #define BOOST_FLOAT64_C(x) (x) + #define BOOST_FLOAT_64_MIN FLT_MIN + #define BOOST_FLOAT_FAST64_MIN BOOST_FLOAT_64_MIN + #define BOOST_FLOAT_LEAST64_MIN BOOST_FLOAT_64_MIN + #define BOOST_FLOAT_64_MAX FLT_MAX + #define BOOST_FLOAT_FAST64_MAX BOOST_FLOAT_64_MAX + #define BOOST_FLOAT_LEAST64_MAX BOOST_FLOAT_64_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - #define FLOAT80_C(x) (x ## L) + #define BOOST_FLOAT80_C(x) (x ## L) + #define BOOST_FLOAT_80_MIN FLT_MIN + #define BOOST_FLOAT_FAST80_MIN BOOST_FLOAT_80_MIN + #define BOOST_FLOAT_LEAST80_MIN BOOST_FLOAT_80_MIN + #define BOOST_FLOAT_80_MAX FLT_MAX + #define BOOST_FLOAT_FAST80_MAX BOOST_FLOAT_80_MAX + #define BOOST_FLOAT_LEAST80_MAX BOOST_FLOAT_80_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - #define FLOAT128_C(x) (x ## L) + #define BOOST_FLOAT128_C(x) (x ## L) + #define BOOST_FLOAT_128_MIN FLT_MIN + #define BOOST_FLOAT_FAST128_MIN BOOST_FLOAT_128_MIN + #define BOOST_FLOAT_LEAST128_MIN BOOST_FLOAT_128_MIN + #define BOOST_FLOAT_128_MAX FLT_MAX + #define BOOST_FLOAT_FAST128_MAX BOOST_FLOAT_128_MAX + #define BOOST_FLOAT_LEAST128_MAX BOOST_FLOAT_128_MAX #endif + // The following section contains the second group of macros that + // are used for initializing floating-point literal values. + // floating-point typedefs having specified widths. + // The types of the max-form are handled. + + #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) + typedef boost_float32_t boost_floatmax_t; + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_32_MAX + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) + typedef boost_float64_t boost_floatmax_t; + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT64_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_64_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_64_MAX + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) + typedef boost_float80_t boost_floatmax_t; + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT80_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) + typedef boost_float128_t boost_floatmax_t; + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_128_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_128_MAX + #else + #error The maximum available floating-point width for cstdfloat is undefined. + #endif + + // Here, define floating-point typedefs having specified widths + // in the namespace boost. + namespace boost + { + #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) + typedef ::boost_float32_t float32_t; + typedef ::boost_float_fast32_t float_fast32_t; + typedef ::boost_float_least32_t float_least32_t; + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) + typedef ::boost_float64_t float64_t; + typedef ::boost_float_fast64_t float_fast64_t; + typedef ::boost_float_least64_t float_least64_t; + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) + typedef ::boost_float80_t float80_t; + typedef ::boost_float_fast80_t float_fast80_t; + typedef ::boost_float_least80_t float_least80_t; + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) + typedef ::boost_float128_t float128_t; + typedef ::boost_float_fast128_t float_fast128_t; + typedef ::boost_float_least128_t float_least128_t; + #endif + + typedef ::boost_floatmax_t floatmax_t; + } + #endif // _BOOST_CSTDFLOAT_2014_01_09_HPP_ From 16efa7b842c6a3481a6f5734e035010fda456d46 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Fri, 10 Jan 2014 20:15:09 +0100 Subject: [PATCH 05/69] Correct the min/max values in the macros. --- include/boost/math/tools/cstdfloat.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index a2eed3961..e9c13098c 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -132,40 +132,40 @@ #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) #define BOOST_FLOAT32_C(x) (x ## F) - #define BOOST_FLOAT_32_MIN FLT_MIN + #define BOOST_FLOAT_32_MIN BOOST_FLOAT32_C(1.175494351e-38) #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOAT_LEAST32_MIN BOOST_FLOAT_32_MIN - #define BOOST_FLOAT_32_MAX FLT_MAX + #define BOOST_FLOAT_32_MAX BOOST_FLOAT64_C(3.402823466e+38) #define BOOST_FLOAT_FAST32_MAX BOOST_FLOAT_32_MAX #define BOOST_FLOAT_LEAST32_MAX BOOST_FLOAT_32_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) #define BOOST_FLOAT64_C(x) (x) - #define BOOST_FLOAT_64_MIN FLT_MIN + #define BOOST_FLOAT_64_MIN BOOST_FLOAT64_C(2.2250738585072014e-308) #define BOOST_FLOAT_FAST64_MIN BOOST_FLOAT_64_MIN #define BOOST_FLOAT_LEAST64_MIN BOOST_FLOAT_64_MIN - #define BOOST_FLOAT_64_MAX FLT_MAX + #define BOOST_FLOAT_64_MAX BOOST_FLOAT64_C(1.7976931348623158e+308) #define BOOST_FLOAT_FAST64_MAX BOOST_FLOAT_64_MAX #define BOOST_FLOAT_LEAST64_MAX BOOST_FLOAT_64_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) #define BOOST_FLOAT80_C(x) (x ## L) - #define BOOST_FLOAT_80_MIN FLT_MIN + #define BOOST_FLOAT_80_MIN BOOST_FLOAT80_C(3.3621031431120935062627E-4932) #define BOOST_FLOAT_FAST80_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOAT_LEAST80_MIN BOOST_FLOAT_80_MIN - #define BOOST_FLOAT_80_MAX FLT_MAX + #define BOOST_FLOAT_80_MAX BOOST_FLOAT80_C(1.1897314953572317650213E+4932) #define BOOST_FLOAT_FAST80_MAX BOOST_FLOAT_80_MAX #define BOOST_FLOAT_LEAST80_MAX BOOST_FLOAT_80_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) #define BOOST_FLOAT128_C(x) (x ## L) - #define BOOST_FLOAT_128_MIN FLT_MIN + #define BOOST_FLOAT_128_MIN BOOST_FLOAT128_C(3.362103143112093506262677817321752603E-4932) #define BOOST_FLOAT_FAST128_MIN BOOST_FLOAT_128_MIN #define BOOST_FLOAT_LEAST128_MIN BOOST_FLOAT_128_MIN - #define BOOST_FLOAT_128_MAX FLT_MAX + #define BOOST_FLOAT_128_MAX BOOST_FLOAT128_C(1.189731495357231765085759326628007016E+4932) #define BOOST_FLOAT_FAST128_MAX BOOST_FLOAT_128_MAX #define BOOST_FLOAT_LEAST128_MAX BOOST_FLOAT_128_MAX #endif @@ -199,8 +199,8 @@ #error The maximum available floating-point width for cstdfloat is undefined. #endif - // Here, define floating-point typedefs having specified widths - // in the namespace boost. + // Here, we define floating-point typedefs having specified widths + // within the namespace boost. namespace boost { #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) From caf895fd237059cdf7bc5b783724eb800ee97093 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Fri, 10 Jan 2014 20:25:15 +0100 Subject: [PATCH 06/69] Manual merge from bernoulli-numbers branch to bernoulli-tgamma branch. --- doc/constants/constants.qbk | 6 +- doc/equations/bernoulli_numbers.mml | 52 +++ doc/equations/bernoulli_numbers.png | Bin 0 -> 2208 bytes doc/equations/bernoulli_numbers.svg | 341 ++++++++++++++++++ doc/equations/tangent_numbers.mml | 57 +++ doc/equations/tangent_numbers.png | Bin 0 -> 2593 bytes doc/equations/tangent_numbers.svg | 2 + doc/internals/roots.qbk | 2 +- doc/math.qbk | 12 +- doc/overview/common_overviews.qbk | 7 +- doc/sf/bernoulli_numbers.qbk | 207 +++++++++++ example/bernoulli_example.cpp | 210 +++++++++++ .../boost/math/policies/error_handling.hpp | 42 +++ .../math/special_functions/bernoulli.hpp | 2 +- .../detail/bernoulli_details.hpp | 26 +- 15 files changed, 943 insertions(+), 23 deletions(-) create mode 100644 doc/equations/bernoulli_numbers.mml create mode 100644 doc/equations/bernoulli_numbers.png create mode 100644 doc/equations/bernoulli_numbers.svg create mode 100644 doc/equations/tangent_numbers.mml create mode 100644 doc/equations/tangent_numbers.png create mode 100644 doc/equations/tangent_numbers.svg create mode 100644 doc/sf/bernoulli_numbers.qbk create mode 100644 example/bernoulli_example.cpp diff --git a/doc/constants/constants.qbk b/doc/constants/constants.qbk index 4424ac104..d095860df 100644 --- a/doc/constants/constants.qbk +++ b/doc/constants/constants.qbk @@ -70,7 +70,7 @@ You can see the full list of available constants at [link math_toolkit.constants Some examples of using constants are at [@../../example/constants_eg1.cpp constants_eg1]. -[endsect] +[endsect] [/section:non_templ Use in non-template code] [section:templ Use in template code] @@ -379,10 +379,12 @@ This section lists the mathematical constants, their use(s) (and sometimes ratio ] [/table] -[note Integer values are *not included* in this list of math constants, however interesting, +[note Integer values are [*not included] in this list of math constants, however interesting, because they can be so easily and exactly constructed, even for UDT, for example: `static_cast(42)`.] [tip If you know the approximate value of the constant, you can search for the value to find Boost.Math chosen name in this table.] +[tip Bernoulli numbers are available at __bernoulli_numbers.] +[tip Factorials are available at __factorial.] [endsect] [/section:constants The constants] diff --git a/doc/equations/bernoulli_numbers.mml b/doc/equations/bernoulli_numbers.mml new file mode 100644 index 000000000..e250e076f --- /dev/null +++ b/doc/equations/bernoulli_numbers.mml @@ -0,0 +1,52 @@ + + + + + B + j + + = + + + + + 1 + + + + + j + 2 + + + 1 + + + + + j + + T + + j + / + 2 + + + + + + + 4 + j + + + + 2 + j + + + + + + \ No newline at end of file diff --git a/doc/equations/bernoulli_numbers.png b/doc/equations/bernoulli_numbers.png new file mode 100644 index 0000000000000000000000000000000000000000..bb43536127feaccdeed5547b1d032e295febf444 GIT binary patch literal 2208 zcmeAS@N?(olHy`uVBq!ia0y~yV3@?fz@W#$#=yXExY(hAfq{Xg*vT`5gM)*kh9jke zfq{Xuz$3Dlfk9$32s8e_zABZ0fkCpwHKHUqKdq!Zu_%?Hyu4g5GcUV1Ik6yBFTW^# z_B$IX1_lmUPZ!6KiaBrZX0M3}6+Q6r{#(~ux4%!Gb#2tn?@fQN+x$H$dws2*tW+v%-Hkj&E1p`ngtXnQ5;`(h z^B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6`e$jC<(eBN^OnzLPP)7C)mhtMjYCsKpI3blHS~&| z9r)47@U3p{v?ZYxvKk6p$A-_|b=Y>u2Ty*~PrB^S_@1E00{PZQs zvQEjWY<9=1dpdXS#vXcoa#wS^>eEY^^UtQtGB|eKeBru4CAre|KlV<4DSL2z3i~#b zg=cMI8m~Xos291{T^*(Dx4ukI@Nd|osEvPLR;qn@f84rM2(# zWh0l~DM{o$lj}6Qa)xY+w5-is)4lj!E}4y@~+ktE)+vc&t+Inh?IalaR&E_?ImZDCaL + + + + + + + + image/svg+xml + + + + + B + + j + + + = + + + + ( + + + + + + + 1 + + + + ) + + + + + j + + + 2 + + + + + + + + 1 + + + + + + j + + T + + j + + / + + + 2 + + + + + + + ( + + + 4 + + j + + + + + + 2 + + j + + + + + ) + + + + + diff --git a/doc/equations/tangent_numbers.mml b/doc/equations/tangent_numbers.mml new file mode 100644 index 000000000..5d5d8e244 --- /dev/null +++ b/doc/equations/tangent_numbers.mml @@ -0,0 +1,57 @@ + + + + + + T + j + + = + + + + + 1 + + + + j + + 1 + + + + 2 + + 2 + j + + + + + + 2 + + 2 + n + + + + 1 + + + + + B + + 2 + n + + + + 2 + n + + + + \ No newline at end of file diff --git a/doc/equations/tangent_numbers.png b/doc/equations/tangent_numbers.png new file mode 100644 index 0000000000000000000000000000000000000000..c82fb438e4af1c51272eb50da6b9d693764d9443 GIT binary patch literal 2593 zcmeAS@N?(olHy`uVBq!ia0y~yV7SJ>z@Wgv#=yXkr_rXxz`(##?Bp53!NI{%!;#X# zz`(#+;1OBOz#vot!i@LQEaktG3V`^>M5b2vd8Vq)8q_8Xx|-ru3R^f9>GSt~f4{wc|NWg?pFDZ8M>vA}3_}~EJo7Qe{j1ZK z78U(su4g`1{H>jly|H+5TG(XQ-lC#k7WuBtFBPBv;8?(LC2XymWvArKNB7tss3iEf zm0I4}$rbVRjXdie_B*b66|2rECDa_*^44Sie(l7_e71QkWen??%OBlm>|@RIia7W1 zNY(?n1j!BjKV&9FScX39K5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xw;-}sjJE9zgCFSx6*K%zGJ2T%=b}WWa>7y<~!%LpVpMp*`%@EJmF8x zetu7Lo=Cgf6PzoU@9}+&SmVI^O11LO3g^uU-VukUoN+8Yee0#g<&)-Ty0*?dwW8s< zGWTrRcVF@z%$ibJz9`-H_TyWcCzvw$7k&KlPk+L6<-;x)j?XEc$f&HbO(?;vtAbr} zmDvJ^=SO^8tbQmyy7^1L=$+);Wgj?Xnx*m`kNwnh`5G@VVHxAfhB6iBYc&$Kj}_;? zZJF}(x&rrXTZh{dn6IqAQxw6rd68JfoDX&t>i^csn12gOHtdQkPd@arPeI|tj)t_8 z7e%f|{|+!In8Nz((LX-3^;r(0(I7Itelh6oOF1G*UQ7xCUbfexpQj1(w@_q_TcbC{xmj)7B)V_TXV~{R=KX^7H3?}v?tFW^qI-8;c>eV1JBj0q4OVAGDxLNe590o9{PlpY zMwg0Sc+ju?{mK(}W%g9xSJ>-#a&q@aKAE*F${Opfj5%Ju-}~_Lr=miokN=mh)GxH^ zn%m>dxVH3eeao#jrMzdCf|u5?)y|($$@1U!#pdogbN(IDof74GcDa}Kh4`h7HI3{S zzt_z4*~fdL$%Li#)|cg5-TlrbT-kniHfMX*vgh~Zmz2rup4nBybp68qs~vOZg#6(* Yp7J>9!{^*^1_lNOPgg&ebxsLQ0H+zuMgRZ+ literal 0 HcmV?d00001 diff --git a/doc/equations/tangent_numbers.svg b/doc/equations/tangent_numbers.svg new file mode 100644 index 000000000..455838832 --- /dev/null +++ b/doc/equations/tangent_numbers.svg @@ -0,0 +1,2 @@ + +Tj=(1)j122j(22n1)B2n2n \ No newline at end of file diff --git a/doc/internals/roots.qbk b/doc/internals/roots.qbk index 662092519..36a6faf5e 100644 --- a/doc/internals/roots.qbk +++ b/doc/internals/roots.qbk @@ -1,4 +1,4 @@ - [section:roots Root Finding With Derivatives: Newton-Raphson, Halley & Schroeder] +[section:roots Root Finding With Derivatives: Newton-Raphson, Halley & Schroeder] [h4 Synopsis] diff --git a/doc/math.qbk b/doc/math.qbk index 7356fb92b..eb233b79b 100644 --- a/doc/math.qbk +++ b/doc/math.qbk @@ -1,13 +1,13 @@ [book Math Toolkit [quickbook 1.6] - [copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013 Paul A. Bristow, Christopher Kormanyos, Hubert Holin, Bruno Lalande, John Maddock, Johan Råde, Gautam Sewani, Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang] + [copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013 Paul A. Bristow, Christopher Kormanyos, Hubert Holin, Bruno Lalande, John Maddock, Johan Råde, Gautam Sewani, Benjamin Sobotta, Thijs van den Berg, Daryle Walker, Xiaogang Zhang and Nikhar Agrawal] [/purpose ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22] [license 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]) ] - [authors [Bristow, Paul A.], [Holin, Hubert], [Kormanyos, Christopher], [Lalande, Bruno], [Maddock, John], [Råde, Johan], [Sobotta, Benjamin], [Sewani, Gautam], [van den Berg, Thijs], [Walker, Daryle], [Zhang, Xiaogang] ] + [authors [Bristow, Paul A.], [Holin, Hubert], [Kormanyos, Christopher], [Lalande, Bruno], [Maddock, John], [Råde, Johan], [Sobotta, Benjamin], [Sewani, Gautam], [van den Berg, Thijs], [Walker, Daryle], [Zhang, Xiaogang], [Agrawal, Nikhar]] [/last-revision $Date$] [version 1.8.3] ] @@ -149,6 +149,9 @@ and use the function's name as the link text.] [def __ellint_2 [link math_toolkit.ellint.ellint_2 ellint_2]] [def __ellint_3 [link math_toolkit.ellint.ellint_3 ellint_3]] +[/ Bernoulli functions and numbers] +[def __bernoulli_numbers [link math_toolkit.bernoulli.bernoulli_numbers bernoulli_numbers]] + [/Bessel functions] [def __cyl_bessel_j [link math_toolkit.bessel.bessel_first cyl_bessel_j]] [def __cyl_neumann [link math_toolkit.bessel.bessel_first cyl_neumann]] @@ -385,6 +388,7 @@ using the quantile function on the [NAME] distribution. The describe how to change the rounding policy for these distributions. ] [/ caution] + ] [/ template discrete_quantile_warning] [block '''''' @@ -444,6 +448,8 @@ and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22. [include sf/factorials.qbk] +[include sf/bernoulli_numbers.qbk] + [section:sf_beta Beta Functions] [include sf/beta.qbk] [include sf/ibeta.qbk] @@ -583,7 +589,7 @@ and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22. [endmathpart] [/ math.qbk - Copyright 2008, 2010, 2012, 2013 John Maddock and Paul A. Bristow. + Copyright 2008, 2010, 2012, 2013, 2014 John Maddock and Paul A. Bristow. 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). diff --git a/doc/overview/common_overviews.qbk b/doc/overview/common_overviews.qbk index b1e1253cf..bf10defd3 100644 --- a/doc/overview/common_overviews.qbk +++ b/doc/overview/common_overviews.qbk @@ -205,7 +205,8 @@ regression tests: cd into boost-root/libs/math/test and do a: bjam mytoolset where "mytoolset" is the name of the -[@../../../../tools/build/index.html Boost.Build] toolset used for your +[@http://www.boost.org/doc/html/bbv2.html Boost.Build] +toolset used for your compiler. The chances are that [*many of the accuracy tests will fail at this stage] - don't panic - the default acceptable error tolerances are quite tight, especially for long double types with an extended @@ -216,8 +217,8 @@ the failing tests and make a judgement as to whether the error rates are acceptable or not. ] -[/ math.qbk - Copyright 2007, 2012 John Maddock and Paul A. Bristow. +[/ common_overviews.qbk + Copyright 2007, 2012, 2014 John Maddock and Paul A. Bristow. 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). diff --git a/doc/sf/bernoulli_numbers.qbk b/doc/sf/bernoulli_numbers.qbk new file mode 100644 index 000000000..6ef84ae5f --- /dev/null +++ b/doc/sf/bernoulli_numbers.qbk @@ -0,0 +1,207 @@ +[section:bernoulli_numbers Bernoulli Numbers] + +[@https://en.wikipedia.org/wiki/Bernoulli_number Bernoulli numbers] +are a sequence of rational numbers useful for the Taylor series expansion, +Euler-Maclaurin formula, and the Riemann zeta function. + +Bernoulli numbers are used in evaluation of some Boost.Math functions, +including the __tgamma, __lgamma and polygamma functions. + +[h4 Single Bernoulli number] + +[h4 Synopsis] + +`` +#include +`` + + namespace boost { namespace math { + + template + T bernoulli_b2n(const int i); // Single Bernoulli number (default policy). + + template + T bernoulli_b2n(const int i, const Policy &pol); // User policy for errors etc. + + }} // namespaces + +[h4 Description] + +Both return the (2 * i)[super th] Bernoulli number. + +The final __Policy argument is optional and can be used to control the behaviour of the function: +how it handles errors, what level of precision to use, etc. + +Refer to __policy_section for more details. + +[h4 Examples] + +[import ../../example/bernoulli_example.cpp] +[bernoulli_example_1] + +[bernoulli_output_1] + +[h4 Single (unchecked) Bernoulli number] + +[h4 Synopsis] +`` +#include + +`` + + template + inline T unchecked_bernoulli_b2n(unsigned n); + +`unchecked_bernoulli_b2n` provides access to Bernoulli numbers [*without any checks for overflow or invalid parameters]. +(Not recommended for normal use, but bypassing overflow checks is quicker.) + + template <> + struct max_bernoulli_index::value + +The largest value you can (without overflow) pass to `unchecked_bernoulli_b2n<>` +is `max_bernoulli_b2n<>::value`. + +For example, `boost::math::max_bernoulli_b2n::value` is 129. + +[h4 Multiple Bernoulli Numbers] + +[h4 Synopsis] + +`` +#include +`` + + namespace boost { namespace math { + + // Multiple Bernoulli numbers (default policy). + template + OutputIterator bernoulli_b2n( + int start_index, + unsigned number_of_bernoullis_b2n, + OutputIterator out_it); + + // Multiple Bernoulli numbers (user policy). + template + OutputIterator bernoulli_b2n( + int start_index, + unsigned number_of_bernoullis_b2n, + OutputIterator out_it, + const Policy& pol); + }} // namespaces + +[h4 Description] + +Two versions of the Bernoulli number function are provided to compute multiple Bernoulli numbers +with one call (one with default policy and the other allowing a user-defined policy). + +These return a series of Bernoulli numbers: + + Bernoulli(2*start_index), + Bernoulli(2*(start_index+1)) + ... + Bernoulli(2*(number_of_bernoullis_b2n-1)) + +[h4 Examples] +[bernoulli_example_2] +[bernoulli_output_2] +[bernoulli_example_3] +[bernoulli_output_3] +[bernoulli_example_4] +[bernoulli_output_4] + +The source of this example is at [../../example/bernoulli_example.cpp bernoulli_example.cpp] + +[h4 Accuracy] + +All the functions usually return values within one ULP (unit in the last place) for the floating-point type. + +[h4 Implementation] + +The implementation details are in [@../../include/boost/math/special_functions/detail/bernoulli_details.hpp bernoulli_details.hpp]. + +For `i <= max_bernoulli_index::value` this is implemented by table lookup; +for larger values of `i`, this is implemented by the Tangent Numbers algorithm as described in the paper: +Fast Computation of Bernoulli, Tangent and Secant Numbers, Richard P. Brent and David Harvey, +[@http://arxiv.org/pdf/1108.0286v3.pdf] (2011). + +[@http://mathworld.wolfram.com/TangentNumber.html Tangent (or Zag) numbers] +(an even alternating permutation number) are defined +and their generating function is also given therein. + + [/@http://mathworld.wolfram.com/images/equations/TangentNumber/Inline15.gif] + +The relation of Tangent numbers with Bernoulli numbers ['B[sub i]] +is given by Brent and Harvey's equation 14: + +__spaces[equation tangent_numbers] + +Their relation with Bernoulli numbers ['B[sub i]] are defined by + +if i > 0 and i is even then +__spaces[equation bernoulli_numbers] [br] +elseif i == 0 then ['B[sub i]] = 1 [br] +elseif i == 1 then ['B[sub i]] = -1/2 [br] +elseif i < 0 or i is odd then ['B[sub i]] = 0 + +[/@http://s7.postimg.org/mygi2kror/bernoulli_1.png] + +[endsect] [/section:bernoulli_numbers Bernoulli Numbers] + + +[section:tangent_numbers Tangent Numbers] + +[@http://en.wikipedia.org/wiki/Tangent_numbers Tangent numbers], +also called a zag function. See also +[@http://mathworld.wolfram.com/TangentNumber.html Tangent number]. + +From the number, An, of alternating permutations of the set {1, ..., n}, +the numbers A2n+1 with odd indices are called tangent numbers or zag numbers. +The first few values are 1, 2, 16, 272, 7936, 353792, 22368256, 1903757312 ... +(sequence [@http://oeis.org/A000182 A000182 in OEIS]). +They are called tangent numbers because they appear as +numerators in the Maclaurin series of tan x. + +Tangent numbers are used in the computation of Bernoulli numbers, +but are also made available here. + +[h4 Synopsis] +`` +#include +`` + + template + T tangent_t2n(const int i); // Single tangent number (default policy). + + template + T tangent_t2n(const int i, const Policy &pol); // Single tangent number (user policy). + + // Multiple tangent numbers (default policy). + template + OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_tangent_t2n, + OutputIterator out_it); + + // Multiple tangent numbers (user policy). + template + OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_tangent_t2n, + OutputIterator out_it, + const Policy& pol); + +[h4 Examples] + +[tangent_example_1] + +The output is: +[tangent_output_1] + +The source of this example is at [../../example/bernoulli_example.cpp bernoulli_example.cpp] + +[endsect] [/section:tangent_numbers Tangent Numbers] + +[/ + Copyright 2013, 2014 Nikhar Agrawal, Christopher Kormanyos, John Maddock, Paul A. Bristow. + 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). +] diff --git a/example/bernoulli_example.cpp b/example/bernoulli_example.cpp new file mode 100644 index 000000000..ed373c6fe --- /dev/null +++ b/example/bernoulli_example.cpp @@ -0,0 +1,210 @@ +// Copyright Paul A. Bristow 2013. +// Copyright Nakhar Agrawal 2013. +// Copyright John Maddock 2013. +// Copyright Christopher Kormanyos 2013. + +// 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) + +#pragma warning (disable : 4100) // unreferenced formal parameter. +#pragma warning (disable : 4127) // conditional expression is constant. + +//#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include + +#include + +/* First 50 from 2 to 100 inclusive: */ +/* TABLE[N[BernoulliB[n], 200], {n,2,100,2}] */ + +//SC_(0.1666666666666666666666666666666666666666), +//SC_(-0.0333333333333333333333333333333333333333), +//SC_(0.0238095238095238095238095238095238095238), +//SC_(-0.0333333333333333333333333333333333333333), +//SC_(0.0757575757575757575757575757575757575757), +//SC_(-0.2531135531135531135531135531135531135531), +//SC_(1.1666666666666666666666666666666666666666), +//SC_(-7.0921568627450980392156862745098039215686), +//SC_(54.9711779448621553884711779448621553884711), + +int main() +{ + //[bernoulli_example_1 + +/*`A simple example computes the value of `Bernoulli(2)` where the return type is `double`. + + +*/ + try + { // It is always wise to use try'n'catch blocks around Boost.Math functions + // so that any informative error messages can be displayed in the catch block. + std::cout + << std::setprecision(std::numeric_limits::digits10) + << boost::math::bernoulli_b2n(2) << std::endl; + +/*`So B[sub 4] == -1/30 == -0.0333333333333333 + +If we use Boost.Multiprecision and its 50 decimal digit floating-point type `cpp_dec_float_50`, +we can calculate the value of much larger numbers like `Bernoulli(100)` +and also obtain much higher precision. +*/ + + std::cout + << std::setprecision(std::numeric_limits::digits10) + << boost::math::bernoulli_b2n(100) << std::endl; + +//] //[/bernoulli_example_1] + +//[bernoulli_example_2 +/*`We can compute and save all the float-precision Bernoulli numbers from one call. +*/ + std::vector bn; // Space for 32-bit `float` precision Bernoulli numbers. + + // Start with Bernoulli number 0. + boost::math::bernoulli_b2n(0, 32, std::back_inserter(bn)); // Fill vector with even Bernoulli numbers. + + for(size_t i = 0; i < bn.size(); i++) + { // Show vector of even Bernoulli numbers, showing all significant decimal digits. + std::cout << std::setprecision(std::numeric_limits::digits10) + << i*2 << ' ' + << bn[i] + << std::endl; + } +//] //[/bernoulli_example_2] + + } + catch(const std::exception& ex) + { + std::cout << "Thrown Exception caught: " << ex.what() << std::endl; + } + + +//[bernoulli_example_3 +/*`Of course, for any floating-point type, there is a maximum Bernoulli number that can be computed + before it overflows the exponent. + By default policy, if we try to compute too high a Bernoulli number, an exception will be thrown. +*/ + try + { + std::cout + << std::setprecision(std::numeric_limits::digits10) + << "Bernoulli number " << 33 * 2 <(33) << std::endl; + } + catch (std::exception ex) + { + std::cout << "Thrown Exception caught: " << ex.what() << std::endl; + } + +/*` +and we will get a helpful error message (provided try'n'catch blocks are used). +*/ + +//] //[/bernoulli_example_3] + +//[bernoulli_example_4 +/*`Users can determine from `max_bernoulli_b2n<>::value` +the largest Bernoulli number you can evaluate for any type +(or safely pass to `unchecked_bernoulli_b2n<>`). + +For example: +*/ + std::cout << "boost::math::max_bernoulli_b2n::value = " << boost::math::max_bernoulli_b2n::value << std::endl; + std::cout << "Maximum Bernoulli number using float is " << boost::math::bernoulli_b2n( boost::math::max_bernoulli_b2n::value) << std::endl; + std::cout << "boost::math::max_bernoulli_b2n::value = " << boost::math::max_bernoulli_b2n::value << std::endl; + std::cout << "Maximum Bernoulli number using double is " << boost::math::bernoulli_b2n( boost::math::max_bernoulli_b2n::value) << std::endl; + //] //[/bernoulli_example_4] + +//[tangent_example_1 + +/*`We can compute and save a few Tangent numbers. +*/ + std::vector tn; // Space for some `float` precision Tangent numbers. + + // Start with Bernoulli number 0. + boost::math::tangent_t2n(1, 6, std::back_inserter(tn)); // Fill vector with even Tangent numbers. + + for(size_t i = 0; i < tn.size(); i++) + { // Show vector of even Tangent numbers, showing all significant decimal digits. + std::cout << std::setprecision(std::numeric_limits::digits10) + << " " + << tn[i]; + } + std::cout << std::endl; + +//] [/tangent_example_1] + +// 1, 2, 16, 272, 7936, 353792, 22368256, 1903757312 + + + +} // int main() + +/* + +//[bernoulli_output_1 + -3.6470772645191354362138308865549944904868234686191e+215 +//] //[/bernoulli_output_1] + +//[bernoulli_output_2 + + 0 1 + 2 0.166667 + 4 -0.0333333 + 6 0.0238095 + 8 -0.0333333 + 10 0.0757576 + 12 -0.253114 + 14 1.16667 + 16 -7.09216 + 18 54.9712 + 20 -529.124 + 22 6192.12 + 24 -86580.3 + 26 1.42552e+006 + 28 -2.72982e+007 + 30 6.01581e+008 + 32 -1.51163e+010 + 34 4.29615e+011 + 36 -1.37117e+013 + 38 4.88332e+014 + 40 -1.92966e+016 + 42 8.41693e+017 + 44 -4.03381e+019 + 46 2.11507e+021 + 48 -1.20866e+023 + 50 7.50087e+024 + 52 -5.03878e+026 + 54 3.65288e+028 + 56 -2.84988e+030 + 58 2.38654e+032 + 60 -2.14e+034 + 62 2.0501e+036 +//] //[/bernoulli_output_2] + +//[bernoulli_output_3 + Bernoulli number 66 + Thrown Exception caught: Error in function boost::math::bernoulli_b2n(n): + Overflow evaluating function at 33 +//] //[/bernoulli_output_3] +//[bernoulli_output_4 + boost::math::max_bernoulli_b2n::value = 32 + Maximum Bernoulli number using float is -2.0938e+038 + boost::math::max_bernoulli_b2n::value = 129 + Maximum Bernoulli number using double is 1.33528e+306 +//] //[/bernoulli_output_4] + + +//[tangent_output_1 + 1 2 16 272 7936 353792 +//] [/tangent_output_1] + + + +*/ + + diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index e7dbb4020..3e8efb982 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -249,6 +249,31 @@ template inline T raise_overflow_error( const char* , const char* , + const T&, + const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value(); +} + +template +inline T raise_overflow_error( + const char* , + const char* , + const ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>&) +{ + errno = ERANGE; + // This may or may not do the right thing, but the user asked for the error + // to be silent so here we go anyway: + return std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value(); +} + +template +inline T raise_overflow_error( + const char* , + const char* , + const T&, const ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>&) { errno = ERANGE; @@ -266,6 +291,23 @@ inline T raise_overflow_error( return user_overflow_error(function, message, std::numeric_limits::infinity()); } +template +inline T raise_overflow_error( + const char* function, + const char* message, + const T& val, + const ::boost::math::policies::overflow_error< ::boost::math::policies::user_error>&) +{ + std::string fmsg("Error in function "); +#ifndef BOOST_NO_RTTI + fmsg += (boost::format(function) % typeid(T).name()).str(); +#else + fmsg += function; +#endif + int prec = 2 + (boost::math::policies::digits >() * 30103UL) / 100000UL; + std::string msg = do_format(boost::format(message), boost::io::group(std::setprecision(prec), val)); + return user_overflow_error(fmsg.c_str(), msg.c_str(), std::numeric_limits::infinity()); +} template inline T raise_underflow_error( diff --git a/include/boost/math/special_functions/bernoulli.hpp b/include/boost/math/special_functions/bernoulli.hpp index b283ff938..b2feae3a0 100644 --- a/include/boost/math/special_functions/bernoulli.hpp +++ b/include/boost/math/special_functions/bernoulli.hpp @@ -30,7 +30,7 @@ OutputIterator bernoulli_number_imp(OutputIterator out, std::size_t start, std:: for(std::size_t i = (std::max)(static_cast(max_bernoulli_b2n::value + 1), start); i < start + n; ++i) { // We must overflow: - *out = (i & 1 ? 1 : -1) * policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(n)", 0, pol); + *out = (i & 1 ? 1 : -1) * policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(n)", 0, T(i), pol); ++out; } return out; diff --git a/include/boost/math/special_functions/detail/bernoulli_details.hpp b/include/boost/math/special_functions/detail/bernoulli_details.hpp index d57043697..e3a69d27d 100644 --- a/include/boost/math/special_functions/detail/bernoulli_details.hpp +++ b/include/boost/math/special_functions/detail/bernoulli_details.hpp @@ -86,7 +86,7 @@ T b2n_asymptotic(int n) + (((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, Policy()) + ? policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, nx, Policy()) : exp(approximate_log_of_bernoulli_bn)); } @@ -98,7 +98,7 @@ T t2n_asymptotic(int n) 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, Policy()); + 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) @@ -420,7 +420,7 @@ public: } for(; n; ++start, --n) { - *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, pol); + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(start), pol); ++out; } return out; @@ -437,7 +437,7 @@ public: for(std::size_t i = (std::max)(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, pol) : bn[i]; + *out = (i >= m_overflow_limit) ? policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol) : bn[i]; ++out; } #elif defined(BOOST_MATH_NO_ATOMIC_INT) @@ -453,7 +453,7 @@ public: for(std::size_t i = (std::max)(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, pol) : bn[i]; + *out = (i >= m_overflow_limit) ? policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(i), pol) : bn[i]; ++out; } @@ -481,7 +481,7 @@ public: 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, pol) : bn[static_cast(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; } @@ -523,7 +523,7 @@ public: } for(; n; ++start, --n) { - *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, pol); + *out = policies::raise_overflow_error("boost::math::bernoulli_b2n<%1%>(std::size_t)", 0, T(start), pol); ++out; } return out; @@ -541,11 +541,11 @@ public: 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, pol); + *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, pol); + *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(); } @@ -565,11 +565,11 @@ public: 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, pol); + *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, pol); + *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(); } @@ -601,11 +601,11 @@ public: 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, pol); + *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, pol); + *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(); } From cdc7b3b8ccbbacfc8be1d62081878baf1c939728 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Fri, 10 Jan 2014 22:49:32 +0100 Subject: [PATCH 07/69] Improved floating-point type detection for a wider range of compilers. --- include/boost/math/tools/cstdfloat.hpp | 223 ++++++++++++++++++------- 1 file changed, 163 insertions(+), 60 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index e9c13098c..98d5460e7 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -2,17 +2,22 @@ // Copyright Christopher Kormanyos 2014. // Copyright John Maddock 2014. // Copyright Paul Bristow 2014. -// Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// 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) // #ifndef _BOOST_CSTDFLOAT_2014_01_09_HPP_ #define _BOOST_CSTDFLOAT_2014_01_09_HPP_ #include + #include #include + // implements floating-point typedefs having + // specified widths, as described in N3626 (proposed for C++14). + // See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf + // This is the beginning of the preamble. // In this preamble, the preprocessor is used to query certain @@ -23,50 +28,152 @@ #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 - #if (defined(FLT_RADIX) && defined(FLT_MANT_DIG) && defined(FLT_MAX_EXP)) \ - && ((FLT_RADIX == 2) && (FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128)) - #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float - #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH - #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 - #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 - #else #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 0 - #endif - - #if (defined(FLT_RADIX) && defined(DBL_MANT_DIG) && defined(DBL_MAX_EXP)) \ - && ((FLT_RADIX == 2) && (DBL_MANT_DIG == 53) && (DBL_MAX_EXP == 1024)) - #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double - #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH - #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 - #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 - #else #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 0 - #endif - - #if (defined(FLT_RADIX) && defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP)) \ - && ((FLT_RADIX == 2) && (LDBL_MANT_DIG == 63) && (LDBL_MAX_EXP == 16384)) - #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double - #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH - #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 - #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 - #else #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0 + #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0 + + #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float + #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float + #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float + #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float + + #define BOOST_FLOAT32_C(x) (x ## F) + #define BOOST_FLOAT64_C(x) (x ## F) + #define BOOST_FLOAT80_C(x) (x ## F) + #define BOOST_FLOAT128_C(x) (x ## F) + + #if (!defined(FLT_RADIX) && (FLT_RADIX != 2)) + #error The compiler does not support radix-2 floating-point types for . #endif - #if (defined(FLT_RADIX) && defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP)) \ - && ((FLT_RADIX == 2) && (LDBL_MANT_DIG == 113) && (LDBL_MAX_EXP == 16384)) - #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double - #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH - #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 - #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 - #else - #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0 + // Check if built-in float is equivalent to float32_t, float64_t, float80_t, or float128_t. + #if(defined(FLT_MANT_DIG) && defined(FLT_MAX_EXP)) + #if ((FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128)) + #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 + #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 + #undef BOOST_FLOAT32_C + #define BOOST_FLOAT32_C(x) (x ## F) + #elif((FLT_MANT_DIG == 53) && (FLT_MAX_EXP == 1024)) + #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 + #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 + #undef BOOST_FLOAT64_C + #define BOOST_FLOAT64_C(x) (x ## F) + #elif((FLT_MANT_DIG == 63) && (FLT_MAX_EXP == 16384)) + #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 + #undef BOOST_FLOAT80_C + #define BOOST_FLOAT80_C(x) (x ## F) + #elif((FLT_MANT_DIG == 113) && (FLT_MAX_EXP == 16384)) + #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 + #undef BOOST_FLOAT128_C + #define BOOST_FLOAT128_C(x) (x ## F) + #endif #endif - #if (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0) \ - && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ - && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ - && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0) + // Check if built-in double is equivalent to float32_t, float64_t, float80_t, or float128_t. + #if(defined(DBL_MANT_DIG) && defined(DBL_MAX_EXP)) + #if ((DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128)) + #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 + #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 + #undef BOOST_FLOAT32_C + #define BOOST_FLOAT32_C(x) (x) + #elif((DBL_MANT_DIG == 53) && (DBL_MAX_EXP == 1024)) + #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 + #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 + #undef BOOST_FLOAT64_C + #define BOOST_FLOAT64_C(x) (x) + #elif((DBL_MANT_DIG == 63) && (DBL_MAX_EXP == 16384)) + #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 + #undef BOOST_FLOAT80_C + #define BOOST_FLOAT80_C(x) (x) + #elif((DBL_MANT_DIG == 113) && (DBL_MAX_EXP == 16384)) + #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 + #undef BOOST_FLOAT128_C + #define BOOST_FLOAT128_C(x) (x) + #endif + #endif + + // Check if built-in long double is equivalent to float32_t, float64_t, float80_t, or float128_t. + #if(defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP)) + #if ((LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128)) + #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE long double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 + #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 + #undef BOOST_FLOAT32_C + #define BOOST_FLOAT32_C(x) (x ## L) + #elif((LDBL_MANT_DIG == 53) && (LDBL_MAX_EXP == 1024)) + #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE long double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 + #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 + #undef BOOST_FLOAT64_C + #define BOOST_FLOAT64_C(x) (x ## L) + #elif((LDBL_MANT_DIG == 63) && (LDBL_MAX_EXP == 16384)) + #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 + #undef BOOST_FLOAT80_C + #define BOOST_FLOAT80_C(x) (x ## L) + #elif((LDBL_MANT_DIG == 113) && (LDBL_MAX_EXP == 16384)) + #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 + #undef BOOST_FLOAT128_C + #define BOOST_FLOAT128_C(x) (x ## L) + #endif + #endif + + #if ( (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0) \ + && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ + && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ + && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) #error The compiler does not support any of the required floating-point types for . #endif @@ -90,9 +197,9 @@ typedef boost_float32_t boost_float_fast32_t; typedef boost_float32_t boost_float_least32_t; BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::digits == 24); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::max_exponent == 128); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::digits == 24); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::max_exponent == 128); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) @@ -100,8 +207,8 @@ typedef boost_float64_t boost_float_fast64_t; typedef boost_float64_t boost_float_least64_t; BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::digits == 53); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::digits == 53); BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::max_exponent == 1024); #endif @@ -109,9 +216,9 @@ typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE boost_float80_t; typedef boost_float80_t boost_float_fast80_t; typedef boost_float80_t boost_float_least80_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::digits == 63); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::digits == 63); BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::max_exponent == 16384); #endif @@ -119,9 +226,9 @@ typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_NATIVE_TYPE boost_float128_t; typedef boost_float128_t boost_float_fast128_t; typedef boost_float128_t boost_float_least128_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::digits == 113); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::digits == 113); BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::max_exponent == 16384); #endif @@ -131,17 +238,15 @@ // in precisions of 32, 64, 80, 128 are handled. #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - #define BOOST_FLOAT32_C(x) (x ## F) #define BOOST_FLOAT_32_MIN BOOST_FLOAT32_C(1.175494351e-38) #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOAT_LEAST32_MIN BOOST_FLOAT_32_MIN - #define BOOST_FLOAT_32_MAX BOOST_FLOAT64_C(3.402823466e+38) + #define BOOST_FLOAT_32_MAX BOOST_FLOAT32_C(3.402823466e+38) #define BOOST_FLOAT_FAST32_MAX BOOST_FLOAT_32_MAX #define BOOST_FLOAT_LEAST32_MAX BOOST_FLOAT_32_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - #define BOOST_FLOAT64_C(x) (x) #define BOOST_FLOAT_64_MIN BOOST_FLOAT64_C(2.2250738585072014e-308) #define BOOST_FLOAT_FAST64_MIN BOOST_FLOAT_64_MIN #define BOOST_FLOAT_LEAST64_MIN BOOST_FLOAT_64_MIN @@ -151,7 +256,6 @@ #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - #define BOOST_FLOAT80_C(x) (x ## L) #define BOOST_FLOAT_80_MIN BOOST_FLOAT80_C(3.3621031431120935062627E-4932) #define BOOST_FLOAT_FAST80_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOAT_LEAST80_MIN BOOST_FLOAT_80_MIN @@ -161,7 +265,6 @@ #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - #define BOOST_FLOAT128_C(x) (x ## L) #define BOOST_FLOAT_128_MIN BOOST_FLOAT128_C(3.362103143112093506262677817321752603E-4932) #define BOOST_FLOAT_FAST128_MIN BOOST_FLOAT_128_MIN #define BOOST_FLOAT_LEAST128_MIN BOOST_FLOAT_128_MIN @@ -176,22 +279,22 @@ // The types of the max-form are handled. #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) - typedef boost_float32_t boost_floatmax_t; + typedef boost_float32_t boost_floatmax_t; #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_32_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) - typedef boost_float64_t boost_floatmax_t; + typedef boost_float64_t boost_floatmax_t; #define BOOST_FLOATMAX_C(x) BOOST_FLOAT64_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_64_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_64_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) - typedef boost_float80_t boost_floatmax_t; + typedef boost_float80_t boost_floatmax_t; #define BOOST_FLOATMAX_C(x) BOOST_FLOAT80_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) - typedef boost_float128_t boost_floatmax_t; + typedef boost_float128_t boost_floatmax_t; #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_128_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_128_MAX From af02c1634e85c41a2f2af37d9322643b62ba89b5 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Fri, 10 Jan 2014 23:20:00 +0100 Subject: [PATCH 08/69] Correct errors found via GCC for AVR tiny 8-bit microcontroller. --- include/boost/math/tools/cstdfloat.hpp | 45 +++++++++++++------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index 98d5460e7..e840a22bd 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -21,10 +21,11 @@ // This is the beginning of the preamble. // In this preamble, the preprocessor is used to query certain - // preprocessor definitions from . With these queries, - // an attempt is made to automatically detect the presence of - // built-in floating-point types having specified widths, - // and these are also thought to be conformant with IEEE-754. + // preprocessor definitions from . Based on the results + // of these queries, an attempt is made to automatically detect + // the presence of built-in floating-point types having specified + // widths. These are *thought* to be conformant with IEEE-754, + // whereby an unequivocal test based on numeric_limits follows below. #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 @@ -196,40 +197,40 @@ typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE boost_float32_t; typedef boost_float32_t boost_float_fast32_t; typedef boost_float32_t boost_float_least32_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::digits == 24); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float32_t>::max_exponent == 128); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::digits == 24); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::max_exponent == 128); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE boost_float64_t; typedef boost_float64_t boost_float_fast64_t; typedef boost_float64_t boost_float_least64_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::digits == 53); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float64_t>::max_exponent == 1024); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::digits == 53); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::max_exponent == 1024); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE boost_float80_t; typedef boost_float80_t boost_float_fast80_t; typedef boost_float80_t boost_float_least80_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::digits == 63); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float80_t>::max_exponent == 16384); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::digits == 63); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::max_exponent == 16384); #endif - #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_NATIVE_TYPE boost_float128_t; + #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) + typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE boost_float128_t; typedef boost_float128_t boost_float_fast128_t; typedef boost_float128_t boost_float_least128_t; - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::digits == 113); - BOOST_STATIC_ASSERT(std::numeric_limits<::boost_float128_t>::max_exponent == 16384); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::digits == 113); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::max_exponent == 16384); #endif // The following section contains the first group of macros that From d6bbde4a84b9719be2c4bbc3f76c2f168f5a88c5 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sat, 11 Jan 2014 12:22:12 +0100 Subject: [PATCH 09/69] Clean up comments, etc. in preliminary . --- include/boost/math/tools/cstdfloat.hpp | 174 +++++++++++++------------ 1 file changed, 88 insertions(+), 86 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index e840a22bd..060363403 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -27,6 +27,8 @@ // widths. These are *thought* to be conformant with IEEE-754, // whereby an unequivocal test based on numeric_limits follows below. + // First, we will pre-load some preprocessor definitions with + // dummy values. #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 0 @@ -44,7 +46,7 @@ #define BOOST_FLOAT80_C(x) (x ## F) #define BOOST_FLOAT128_C(x) (x ## F) - #if (!defined(FLT_RADIX) && (FLT_RADIX != 2)) + #if (!defined(FLT_RADIX) || ((defined(FLT_RADIX) && (FLT_RADIX != 2)))) #error The compiler does not support radix-2 floating-point types for . #endif @@ -181,7 +183,7 @@ // This is the end of the preamble and the beginning of the type definitions. // Here, we define the floating-point typedefs having specified widths - // based on the proeprocessor analysis from the preamble above. + // based on the preprocessor analysis from the preamble above. // These type definitions are defined in the global namespace, // and the corresponding types are prefixed with "_boost". @@ -194,113 +196,112 @@ // using compile-time assertion. #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE boost_float32_t; - typedef boost_float32_t boost_float_fast32_t; - typedef boost_float32_t boost_float_least32_t; - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::digits == 24); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::max_exponent == 128); + typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE boost_float32_t; + typedef boost_float32_t boost_float_fast32_t; + typedef boost_float32_t boost_float_least32_t; + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::digits == 24); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::max_exponent == 128); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE boost_float64_t; - typedef boost_float64_t boost_float_fast64_t; - typedef boost_float64_t boost_float_least64_t; - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::digits == 53); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::max_exponent == 1024); + typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE boost_float64_t; + typedef boost_float64_t boost_float_fast64_t; + typedef boost_float64_t boost_float_least64_t; + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::digits == 53); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::max_exponent == 1024); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE boost_float80_t; - typedef boost_float80_t boost_float_fast80_t; - typedef boost_float80_t boost_float_least80_t; - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::digits == 63); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::max_exponent == 16384); + typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE boost_float80_t; + typedef boost_float80_t boost_float_fast80_t; + typedef boost_float80_t boost_float_least80_t; + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::digits == 63); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::max_exponent == 16384); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE boost_float128_t; - typedef boost_float128_t boost_float_fast128_t; - typedef boost_float128_t boost_float_least128_t; - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::digits == 113); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::max_exponent == 16384); + typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE boost_float128_t; + typedef boost_float128_t boost_float_fast128_t; + typedef boost_float128_t boost_float_least128_t; + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::digits == 113); + BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::max_exponent == 16384); #endif // The following section contains the first group of macros that // are used for initializing floating-point literal values. - // The types of all three forms (fixed-width, least-width, and fast-width) - // in precisions of 32, 64, 80, 128 are handled. + // The types of the three forms (fixed-width, least-width, and fast-width) + // in bit-counts of 32, 64, 80, 128 are handled. #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - #define BOOST_FLOAT_32_MIN BOOST_FLOAT32_C(1.175494351e-38) - #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN - #define BOOST_FLOAT_LEAST32_MIN BOOST_FLOAT_32_MIN - #define BOOST_FLOAT_32_MAX BOOST_FLOAT32_C(3.402823466e+38) - #define BOOST_FLOAT_FAST32_MAX BOOST_FLOAT_32_MAX - #define BOOST_FLOAT_LEAST32_MAX BOOST_FLOAT_32_MAX + #define BOOST_FLOAT_32_MIN BOOST_FLOAT32_C(1.175494351e-38) + #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN + #define BOOST_FLOAT_LEAST32_MIN BOOST_FLOAT_32_MIN + #define BOOST_FLOAT_32_MAX BOOST_FLOAT32_C(3.402823466e+38) + #define BOOST_FLOAT_FAST32_MAX BOOST_FLOAT_32_MAX + #define BOOST_FLOAT_LEAST32_MAX BOOST_FLOAT_32_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - #define BOOST_FLOAT_64_MIN BOOST_FLOAT64_C(2.2250738585072014e-308) - #define BOOST_FLOAT_FAST64_MIN BOOST_FLOAT_64_MIN - #define BOOST_FLOAT_LEAST64_MIN BOOST_FLOAT_64_MIN - #define BOOST_FLOAT_64_MAX BOOST_FLOAT64_C(1.7976931348623158e+308) - #define BOOST_FLOAT_FAST64_MAX BOOST_FLOAT_64_MAX - #define BOOST_FLOAT_LEAST64_MAX BOOST_FLOAT_64_MAX + #define BOOST_FLOAT_64_MIN BOOST_FLOAT64_C(2.2250738585072014e-308) + #define BOOST_FLOAT_FAST64_MIN BOOST_FLOAT_64_MIN + #define BOOST_FLOAT_LEAST64_MIN BOOST_FLOAT_64_MIN + #define BOOST_FLOAT_64_MAX BOOST_FLOAT64_C(1.7976931348623158e+308) + #define BOOST_FLOAT_FAST64_MAX BOOST_FLOAT_64_MAX + #define BOOST_FLOAT_LEAST64_MAX BOOST_FLOAT_64_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - #define BOOST_FLOAT_80_MIN BOOST_FLOAT80_C(3.3621031431120935062627E-4932) - #define BOOST_FLOAT_FAST80_MIN BOOST_FLOAT_80_MIN - #define BOOST_FLOAT_LEAST80_MIN BOOST_FLOAT_80_MIN - #define BOOST_FLOAT_80_MAX BOOST_FLOAT80_C(1.1897314953572317650213E+4932) - #define BOOST_FLOAT_FAST80_MAX BOOST_FLOAT_80_MAX - #define BOOST_FLOAT_LEAST80_MAX BOOST_FLOAT_80_MAX + #define BOOST_FLOAT_80_MIN BOOST_FLOAT80_C(3.3621031431120935062627E-4932) + #define BOOST_FLOAT_FAST80_MIN BOOST_FLOAT_80_MIN + #define BOOST_FLOAT_LEAST80_MIN BOOST_FLOAT_80_MIN + #define BOOST_FLOAT_80_MAX BOOST_FLOAT80_C(1.1897314953572317650213E+4932) + #define BOOST_FLOAT_FAST80_MAX BOOST_FLOAT_80_MAX + #define BOOST_FLOAT_LEAST80_MAX BOOST_FLOAT_80_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - #define BOOST_FLOAT_128_MIN BOOST_FLOAT128_C(3.362103143112093506262677817321752603E-4932) - #define BOOST_FLOAT_FAST128_MIN BOOST_FLOAT_128_MIN - #define BOOST_FLOAT_LEAST128_MIN BOOST_FLOAT_128_MIN - #define BOOST_FLOAT_128_MAX BOOST_FLOAT128_C(1.189731495357231765085759326628007016E+4932) - #define BOOST_FLOAT_FAST128_MAX BOOST_FLOAT_128_MAX - #define BOOST_FLOAT_LEAST128_MAX BOOST_FLOAT_128_MAX + #define BOOST_FLOAT_128_MIN BOOST_FLOAT128_C(3.362103143112093506262677817321752603E-4932) + #define BOOST_FLOAT_FAST128_MIN BOOST_FLOAT_128_MIN + #define BOOST_FLOAT_LEAST128_MIN BOOST_FLOAT_128_MIN + #define BOOST_FLOAT_128_MAX BOOST_FLOAT128_C(1.189731495357231765085759326628007016E+4932) + #define BOOST_FLOAT_FAST128_MAX BOOST_FLOAT_128_MAX + #define BOOST_FLOAT_LEAST128_MAX BOOST_FLOAT_128_MAX #endif // The following section contains the second group of macros that // are used for initializing floating-point literal values. - // floating-point typedefs having specified widths. // The types of the max-form are handled. #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) - typedef boost_float32_t boost_floatmax_t; - #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) - #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN - #define BOOST_FLOATMAX_MAX BOOST_FLOAT_32_MAX + typedef boost_float32_t boost_floatmax_t; + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_32_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) - typedef boost_float64_t boost_floatmax_t; - #define BOOST_FLOATMAX_C(x) BOOST_FLOAT64_C(x) - #define BOOST_FLOATMAX_MIN BOOST_FLOAT_64_MIN - #define BOOST_FLOATMAX_MAX BOOST_FLOAT_64_MAX + typedef boost_float64_t boost_floatmax_t; + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT64_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_64_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_64_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) - typedef boost_float80_t boost_floatmax_t; - #define BOOST_FLOATMAX_C(x) BOOST_FLOAT80_C(x) - #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN - #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX + typedef boost_float80_t boost_floatmax_t; + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT80_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) - typedef boost_float128_t boost_floatmax_t; - #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x) - #define BOOST_FLOATMAX_MIN BOOST_FLOAT_128_MIN - #define BOOST_FLOATMAX_MAX BOOST_FLOAT_128_MAX + typedef boost_float128_t boost_floatmax_t; + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_128_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_128_MAX #else - #error The maximum available floating-point width for cstdfloat is undefined. + #error The maximum available floating-point width for cstdfloat is undefined. #endif // Here, we define floating-point typedefs having specified widths @@ -308,30 +309,31 @@ namespace boost { #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - typedef ::boost_float32_t float32_t; - typedef ::boost_float_fast32_t float_fast32_t; - typedef ::boost_float_least32_t float_least32_t; + typedef ::boost_float32_t float32_t; + typedef ::boost_float_fast32_t float_fast32_t; + typedef ::boost_float_least32_t float_least32_t; #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - typedef ::boost_float64_t float64_t; - typedef ::boost_float_fast64_t float_fast64_t; - typedef ::boost_float_least64_t float_least64_t; + typedef ::boost_float64_t float64_t; + typedef ::boost_float_fast64_t float_fast64_t; + typedef ::boost_float_least64_t float_least64_t; #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - typedef ::boost_float80_t float80_t; - typedef ::boost_float_fast80_t float_fast80_t; - typedef ::boost_float_least80_t float_least80_t; + typedef ::boost_float80_t float80_t; + typedef ::boost_float_fast80_t float_fast80_t; + typedef ::boost_float_least80_t float_least80_t; #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - typedef ::boost_float128_t float128_t; - typedef ::boost_float_fast128_t float_fast128_t; - typedef ::boost_float_least128_t float_least128_t; + typedef ::boost_float128_t float128_t; + typedef ::boost_float_fast128_t float_fast128_t; + typedef ::boost_float_least128_t float_least128_t; #endif typedef ::boost_floatmax_t floatmax_t; } + // namespace boost #endif // _BOOST_CSTDFLOAT_2014_01_09_HPP_ From 839f605a3f1e938d97f14b6487cd0127d8e72a57 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sat, 11 Jan 2014 21:38:25 +0100 Subject: [PATCH 10/69] Manual merge of changes from bernoulli-numbers branch to bernoulli-tgamma branch. --- doc/equations/bernoulli_numbers.png | Bin 2208 -> 2763 bytes doc/equations/bernoulli_numbers.svg | 343 +-------------------------- doc/equations/bernoulli_numbers2.mml | 230 ++++++++++++++++++ doc/equations/bernoulli_numbers2.png | Bin 0 -> 9624 bytes doc/equations/bernoulli_numbers2.svg | 2 + doc/equations/generate.sh | 9 +- doc/sf/bernoulli_numbers.qbk | 60 +++-- example/bernoulli_example.cpp | 11 +- 8 files changed, 281 insertions(+), 374 deletions(-) create mode 100644 doc/equations/bernoulli_numbers2.mml create mode 100644 doc/equations/bernoulli_numbers2.png create mode 100644 doc/equations/bernoulli_numbers2.svg diff --git a/doc/equations/bernoulli_numbers.png b/doc/equations/bernoulli_numbers.png index bb43536127feaccdeed5547b1d032e295febf444..f8de0ef35f62f956b8d88fe98b3d60aa6f3a1b24 100644 GIT binary patch delta 2731 zcmZ1=cv@7kGr-TCmrII^fq{Y7)59f*fq`Kb0|SEr2O9$e!^?`~`4bhTxP?j>7=%g~ z@1@CCOmtJP=koA$aSW-L^LB3KnwU`8HZ@=&Ut}8zG{?D|}DYMO_+LzQFD6T(Ha(n&OS@Z9)ZDrN9 z_qfGgapv2vu+NunZ-`ti`9r}Ws6N4c!D`))UB$1WRR@AU$J#+L8yWLm! zs3>MCT)6%%%kwzX^IP*oULU*lFFbJ1mg(ne41{;AzUt#KOXDS<=XItVamm%CYu>4B z+#;@-azSiMn_{Mffn0@6@_$*?y9$}J-6}W!W!hl*AwjZt-+{(00qr^5QIG3?h&aBF zoW5=GlE4G|4s3Mz?yEtE%g2-0JgovRt({~iY^zwhSU2Nlq4kBt z-`bIBn_05{eGFbO`P8mQ3t29^+3w)5u&pn&zxvJTflC5|qw5br19RTw+|O=o9#+f} z()+`+J_RRe80m+NT$h{nLu-TGH+hadqGwgObL@pq z-)Hq>+ZV2%oa=bHZT8E^$UUSRNnHe+4?tUQ3cZmrW^YA@|pL&s=)>BGJDhh!?`HL@%=*9dmc`WzVq17LT+=;niCV}-F#oyp?Q>@uzv!83fd{6Z zWV-FmaqRZ24SU@#RUg=LWX<=$+xypDs9`H`lzMi{D$316%IiY#Kb9O`9S^OGte*_+ zxoX%Q%d=Rj1xxqrXpW7&=Wyv7i~b4Wm2TVa{!95G;8V}`_tAH|13?dp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Fc^50&l8hx6?s{0&Ch^nz_aFEAE`hUE8}CJwxJh*LcL&z>&qxyQSXttI z>73{)?VpaUY>Ou!Ny=+~wkh;}!jq7vrYG)JgcjL^zc%B~3E=a&o|QiR$;PH$9qT7& zJzoXL_rH?ff4iYSRP*baaw@6Jto>v-huDP=yx zr8X+_&egkBoIKub|4!NTRaJn?+s~i)CbmyY{jywA-E-D!jY|&_+3y8?{OPL1utVvm zjb}>6yUSA3>pM48zN$5Q#_@2DiIB_N3r@R^-kqDeC+wET*=MO$>r>AKR##?h0Rjat)3sRT8asKnRFsk_R_ZPb-#P+*a z)OJ64c|k?*`j5q|>|McAa<}s}PswZkJ(Fqi(R%S0NB=WqH|B2Y3uoEJz`(%Z>FVdQ I&MBb@0O{R25C8xG diff --git a/doc/equations/bernoulli_numbers.svg b/doc/equations/bernoulli_numbers.svg index e1963536f..dec5eb1d3 100644 --- a/doc/equations/bernoulli_numbers.svg +++ b/doc/equations/bernoulli_numbers.svg @@ -1,341 +1,2 @@ - - - - - - - - - image/svg+xml - - - - - B - - j - - - = - - - - ( - - - - - - - 1 - - - - ) - - - - - j - - - 2 - - - - - - - - 1 - - - - - - j - - T - - j - - / - - - 2 - - - - - - - ( - - - 4 - - j - - - - - - 2 - - j - - - - - ) - - - - - + +Bj=(1)j21jTj/2(4j2j) \ No newline at end of file diff --git a/doc/equations/bernoulli_numbers2.mml b/doc/equations/bernoulli_numbers2.mml new file mode 100644 index 000000000..53816d7e5 --- /dev/null +++ b/doc/equations/bernoulli_numbers2.mml @@ -0,0 +1,230 @@ + + + + + + + + + + ln + + ( + + + B + n + + + ) + + + + + + = + + + + + + ( + + + + + 1 + + + 2 + + + + + n + + + ) + + ln + + + ( + + n + + ) + + + + + ( + + + + + 1 + + + 2 + + + + n + + + ) + + + ln + + + ( + + π + + + ) + + + + + ( + + + + + 3 + + + 2 + + + + n + + + ) + + + ln + + + ( + + 2 + + ) + + + R + + + ( + + n + + ) + + + + + + + + R + + ( + + n + + ) + + + + + + = + + + + + n + + ( + + + 1 + + + + 1 + + 12 + + + + ( + + + 1 + + + 1 + 30 + + + + ( + + + 1 + + + 2 + 7 + + + + n + + + + 2 + + + + + ) + + + n + + + + 2 + + + + + ) + + + n + + + + 2 + + + + + ) + + + + + + + matrix {ln(B_n) # "=" # ({1} over {2} + n)ln(n) + ({1} over {2} - n)ln(%pi%) + ({3} over {2} - n)ln(2) - R(n) +## +R(n) # "=" # n(1 - {1} over 12 (1 - 1 over 30 (1 - 2 over 7 n^{-2})n^{-2})n^{-2}) } + + \ No newline at end of file diff --git a/doc/equations/bernoulli_numbers2.png b/doc/equations/bernoulli_numbers2.png new file mode 100644 index 0000000000000000000000000000000000000000..c88976447b92eebb04ed161b7e9826f86322a45a GIT binary patch literal 9624 zcmeAS@N?(olHy`uVBq!ia0y~yV0^~Fz+lC}#=yXkD)CF7fq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgcEaktG3V{v%0F?3zaGCoUqxl&1dfSE#X>qJT{t$2!*k8gTb!<18h0~R zukBi-;TX!9mF@J#RVR1Vv`dM!Gv@O29{qP9 z`9R47{{xP^Pt}}*7Y8qvJTZaKcz5t6vjbke&s3c&4K|0X`m*|EndnPOv3oMDGu!QB>n4y2O&B8ZhJ&+4Ei^V zcaoLIt@ulmdY>(o@Q_m1yc(yqGP`10eaON&e3ST2gob(j(wp>c)s{O&ikY^ahowX7 zG$(B7T;f={uHO5Si0AK+g=-E@Y73p^FZuMHV&==L>C&g(DQ3Q(;ys_KoMAPi`IYIb zOFW|DF7;Ke`#!a#XG!s@fUxr^dp)AuFI9N%_Ix#YhuH?l+~w&`VQW=a&R?>J`)0-; z?S*spP1<(4w3hcl&Vh!PX>L2^6RaN?Er@QqCwznThsKo8><^M2q&}!i*sJvE9m5=k zH<6tEXTKbLd;I$Is(&B$gqzJe&*ER(c=Et4&MNl@9uH&_>RMCR$h>+wTlL;{y#mGy z%g>b>FIIbjoDeqjUlA8T$L6!{^&A$+fNK5txI_=Ecg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Z3As?UxIJ-f`cXzx#3T z)>yfU`3rv;@PFH{`{D40<6B-TW-9EHnmtEvmJYD z_7`nk)oq-$=u}>4!|KiZbj*^bEjf7bp}KQhh)0yVyThzDhfDWAPQ9*acq?kh-8U*W zTN3sEWE||iTpU?(e?eNnZ?7n&Hy_V7LZ&kc%wYZHIJ66U=kmh!kp?n;b7`iTt|&X>0BFn?Qo zVEvgl6F2C-va3;*Jbo~(EYYYx&6%U;lS*D+m0 +ln(Bn)=(12+n)ln(n)+(12n)ln(π)+(32n)ln(2)R(n)R(n)=n(1112(1130(127n2)n2)n2) \ No newline at end of file diff --git a/doc/equations/generate.sh b/doc/equations/generate.sh index 27d1d5eff..77e0427da 100755 --- a/doc/equations/generate.sh +++ b/doc/equations/generate.sh @@ -7,9 +7,9 @@ # # Paths to tools come first, change these to match your system: # -math2svg='m:\download\open\SVGMath-0.3.1\math2svg.py' -python=/cygdrive/c/Python26/python.exe -inkscape=/cygdrive/c/progra~1/Inkscape/inkscape +math2svg='d:\download\open\SVGMath-0.3.1\math2svg.py' +python=/cygdrive/c/Python27/python.exe +inkscape=/cygdrive/c/progra~1/Inkscape/inkscape.exe # Image DPI: dpi=120 @@ -18,7 +18,7 @@ for mmlfile in $*; do pngfile=$(basename $svgfile .svg).png tempfile=temp.mml # strip html wrappers put in by MathCast: - cat $mmlfile | tr -d "\r\n" | sed -e 's/.*\(]*>.*<\/math>\).*/\1/' > $tempfile + cat $mmlfile | tr -d "\r\n" | sed -e 's/.*\(]*>.*<\/math>\).*/\1/' -e 's///g' -e 's/<\/semantics>//g' > $tempfile echo Generating $svgfile $python $math2svg $tempfile > $svgfile @@ -31,3 +31,4 @@ done + diff --git a/doc/sf/bernoulli_numbers.qbk b/doc/sf/bernoulli_numbers.qbk index 6ef84ae5f..8551216e3 100644 --- a/doc/sf/bernoulli_numbers.qbk +++ b/doc/sf/bernoulli_numbers.qbk @@ -18,16 +18,23 @@ including the __tgamma, __lgamma and polygamma functions. namespace boost { namespace math { template - T bernoulli_b2n(const int i); // Single Bernoulli number (default policy). + T bernoulli_b2n(const int n); // Single Bernoulli number (default policy). template - T bernoulli_b2n(const int i, const Policy &pol); // User policy for errors etc. + T bernoulli_b2n(const int n, const Policy &pol); // User policy for errors etc. }} // namespaces [h4 Description] -Both return the (2 * i)[super th] Bernoulli number. +Both return the (2 * n)[super th] Bernoulli number B[sub 2n]. + +Note that since all odd numbered Bernoulli numbers are zero (apart from B[sub 1] which is [plusminus][frac12]) +the interface will only return the even numbered Bernoulli numbers. + +This function uses fast table lookup for low-indexed Bernoulli numbers, while larger values are calculated +as needed and then cached. The caching mechanism requires a certain amount of thread safety code, so +`unchecked_bernoulli_b2n` may provide a better interface for performance critical code. The final __Policy argument is optional and can be used to control the behaviour of the function: how it handles errors, what level of precision to use, etc. @@ -45,23 +52,32 @@ Refer to __policy_section for more details. [h4 Synopsis] `` -#include +#include `` + template <> + struct max_bernoulli_b2n; + template inline T unchecked_bernoulli_b2n(unsigned n); `unchecked_bernoulli_b2n` provides access to Bernoulli numbers [*without any checks for overflow or invalid parameters]. -(Not recommended for normal use, but bypassing overflow checks is quicker.) +It is implemented as a direct (and very fast) table lookup, and while not recomended for general use it can be useful +inside inner loops where the ultimate performance is required, and error checking is moved outside the loop. - template <> - struct max_bernoulli_index::value +The largest value you can pass to `unchecked_bernoulli_b2n<>` is `max_bernoulli_b2n<>::value`: passing values greater than +that will result in a buffer overrun error, so it's clearly important to place the error handling in your own code +when using this direct interface. -The largest value you can (without overflow) pass to `unchecked_bernoulli_b2n<>` -is `max_bernoulli_b2n<>::value`. +The value of `boost::math::max_bernoulli_b2n::value` varies by the type T, for types `float`/`double`/`long double` +it's the largest value which doesn't overflow the target type: for example, `boost::math::max_bernoulli_b2n::value` is 129. +However, for multiprecision types, it's the largest value for which the result can be represented as the ratio of two 64-bit +integers, for example `boost::math::max_bernoulli_b2n::value` is just 17. Of course +larger indexes can be passed to `bernoulli_b2n(n)`, but then then you loose fast table lookup (i.e. values may need to be calculated). -For example, `boost::math::max_bernoulli_b2n::value` is 129. +[bernoulli_example_4] +[bernoulli_output_4] [h4 Multiple Bernoulli Numbers] @@ -96,20 +112,15 @@ with one call (one with default policy and the other allowing a user-defined pol These return a series of Bernoulli numbers: - Bernoulli(2*start_index), - Bernoulli(2*(start_index+1)) - ... - Bernoulli(2*(number_of_bernoullis_b2n-1)) +[:B[sub 2*start_index],B[sub 2*(start_index+1)],...,B[sub 2*(start_index+number_of_bernoullis_b2n-1)]] [h4 Examples] [bernoulli_example_2] [bernoulli_output_2] [bernoulli_example_3] [bernoulli_output_3] -[bernoulli_example_4] -[bernoulli_output_4] -The source of this example is at [../../example/bernoulli_example.cpp bernoulli_example.cpp] +The source of this example is at [@../../example/bernoulli_example.cpp bernoulli_example.cpp] [h4 Accuracy] @@ -117,9 +128,10 @@ All the functions usually return values within one ULP (unit in the last place) [h4 Implementation] -The implementation details are in [@../../include/boost/math/special_functions/detail/bernoulli_details.hpp bernoulli_details.hpp]. +The implementation details are in [@../../include/boost/math/special_functions/detail/bernoulli_details.hpp bernoulli_details.hpp] +and [@../../include/boost/math/special_functions/detail/unchecked_bernoulli.hpp unchecked_bernoulli.hpp]. -For `i <= max_bernoulli_index::value` this is implemented by table lookup; +For `i <= max_bernoulli_index::value` this is implemented by simple table lookup from a statically initialized table; for larger values of `i`, this is implemented by the Tangent Numbers algorithm as described in the paper: Fast Computation of Bernoulli, Tangent and Secant Numbers, Richard P. Brent and David Harvey, [@http://arxiv.org/pdf/1108.0286v3.pdf] (2011). @@ -128,8 +140,6 @@ Fast Computation of Bernoulli, Tangent and Secant Numbers, Richard P. Brent and (an even alternating permutation number) are defined and their generating function is also given therein. - [/@http://mathworld.wolfram.com/images/equations/TangentNumber/Inline15.gif] - The relation of Tangent numbers with Bernoulli numbers ['B[sub i]] is given by Brent and Harvey's equation 14: @@ -143,7 +153,13 @@ elseif i == 0 then ['B[sub i]] = 1 [br] elseif i == 1 then ['B[sub i]] = -1/2 [br] elseif i < 0 or i is odd then ['B[sub i]] = 0 -[/@http://s7.postimg.org/mygi2kror/bernoulli_1.png] +Note that computed values are stored in a fixed-size table, access is thread safe via atomic operations (i.e. lock +free programming), this imparts a much lower overhead on access to cached values than might overwise be expected - +typically for multiprecision types the cost of thread synchronisation is negligable, while for built in types +this code is not normally executed anyway. For very large arguments which cannot be reasonably computed or +stored in our cache, an asymptotic expansion [@http://www.luschny.de/math/primes/bernincl.html due to Luschny] is used: + +[equation bernoulli_numbers2] [endsect] [/section:bernoulli_numbers Bernoulli Numbers] diff --git a/example/bernoulli_example.cpp b/example/bernoulli_example.cpp index ed373c6fe..5a2c58969 100644 --- a/example/bernoulli_example.cpp +++ b/example/bernoulli_example.cpp @@ -34,7 +34,8 @@ int main() { //[bernoulli_example_1 -/*`A simple example computes the value of `Bernoulli(2)` where the return type is `double`. +/*`A simple example computes the value of B[sub 4] where the return type is `double`, +note that the argument to bernoulli_b2n is ['2] not ['4] since it computes B[sub 2N]. */ @@ -48,7 +49,7 @@ int main() /*`So B[sub 4] == -1/30 == -0.0333333333333333 If we use Boost.Multiprecision and its 50 decimal digit floating-point type `cpp_dec_float_50`, -we can calculate the value of much larger numbers like `Bernoulli(100)` +we can calculate the value of much larger numbers like B[sub 200] and also obtain much higher precision. */ @@ -107,11 +108,7 @@ and we will get a helpful error message (provided try'n'catch blocks are used). //] //[/bernoulli_example_3] //[bernoulli_example_4 -/*`Users can determine from `max_bernoulli_b2n<>::value` -the largest Bernoulli number you can evaluate for any type -(or safely pass to `unchecked_bernoulli_b2n<>`). - -For example: +/*For example: */ std::cout << "boost::math::max_bernoulli_b2n::value = " << boost::math::max_bernoulli_b2n::value << std::endl; std::cout << "Maximum Bernoulli number using float is " << boost::math::bernoulli_b2n( boost::math::max_bernoulli_b2n::value) << std::endl; From 83ca3c282b8cd6be1c65ab7e28faa8493fafd863 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sun, 12 Jan 2014 15:52:51 +0100 Subject: [PATCH 11/69] now stops at the least of float, double, or long double when querying . --- include/boost/math/tools/cstdfloat.hpp | 152 +++++++++++-------------- 1 file changed, 66 insertions(+), 86 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index 060363403..d0caeb1f3 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -52,7 +52,7 @@ // Check if built-in float is equivalent to float32_t, float64_t, float80_t, or float128_t. #if(defined(FLT_MANT_DIG) && defined(FLT_MAX_EXP)) - #if ((FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128)) + #if ((FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -61,7 +61,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 #undef BOOST_FLOAT32_C #define BOOST_FLOAT32_C(x) (x ## F) - #elif((FLT_MANT_DIG == 53) && (FLT_MAX_EXP == 1024)) + #elif((FLT_MANT_DIG == 53) && (FLT_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -70,7 +70,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 #undef BOOST_FLOAT64_C #define BOOST_FLOAT64_C(x) (x ## F) - #elif((FLT_MANT_DIG == 63) && (FLT_MAX_EXP == 16384)) + #elif((FLT_MANT_DIG == 63) && (FLT_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -79,7 +79,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 #undef BOOST_FLOAT80_C #define BOOST_FLOAT80_C(x) (x ## F) - #elif((FLT_MANT_DIG == 113) && (FLT_MAX_EXP == 16384)) + #elif((FLT_MANT_DIG == 113) && (FLT_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -93,7 +93,7 @@ // Check if built-in double is equivalent to float32_t, float64_t, float80_t, or float128_t. #if(defined(DBL_MANT_DIG) && defined(DBL_MAX_EXP)) - #if ((DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128)) + #if ((DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -102,7 +102,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 #undef BOOST_FLOAT32_C #define BOOST_FLOAT32_C(x) (x) - #elif((DBL_MANT_DIG == 53) && (DBL_MAX_EXP == 1024)) + #elif((DBL_MANT_DIG == 53) && (DBL_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -111,7 +111,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 #undef BOOST_FLOAT64_C #define BOOST_FLOAT64_C(x) (x) - #elif((DBL_MANT_DIG == 63) && (DBL_MAX_EXP == 16384)) + #elif((DBL_MANT_DIG == 63) && (DBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -120,7 +120,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 #undef BOOST_FLOAT80_C #define BOOST_FLOAT80_C(x) (x) - #elif((DBL_MANT_DIG == 113) && (DBL_MAX_EXP == 16384)) + #elif((DBL_MANT_DIG == 113) && (DBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -134,7 +134,7 @@ // Check if built-in long double is equivalent to float32_t, float64_t, float80_t, or float128_t. #if(defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP)) - #if ((LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128)) + #if ((LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -143,7 +143,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 #undef BOOST_FLOAT32_C #define BOOST_FLOAT32_C(x) (x ## L) - #elif((LDBL_MANT_DIG == 53) && (LDBL_MAX_EXP == 1024)) + #elif((LDBL_MANT_DIG == 53) && (LDBL_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -152,7 +152,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 #undef BOOST_FLOAT64_C #define BOOST_FLOAT64_C(x) (x ## L) - #elif((LDBL_MANT_DIG == 63) && (LDBL_MAX_EXP == 16384)) + #elif((LDBL_MANT_DIG == 63) && (LDBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -161,7 +161,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 #undef BOOST_FLOAT80_C #define BOOST_FLOAT80_C(x) (x ## L) - #elif((LDBL_MANT_DIG == 113) && (LDBL_MAX_EXP == 16384)) + #elif((LDBL_MANT_DIG == 113) && (LDBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -173,6 +173,9 @@ #endif #endif + // This is the end of the preamble. Now we use the results + // of the queries in the preamble. + #if ( (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ @@ -180,61 +183,6 @@ #error The compiler does not support any of the required floating-point types for . #endif - // This is the end of the preamble and the beginning of the type definitions. - - // Here, we define the floating-point typedefs having specified widths - // based on the preprocessor analysis from the preamble above. - - // These type definitions are defined in the global namespace, - // and the corresponding types are prefixed with "_boost". - - // For simplicity, the least and fast types are type defined identically - // as the corresponding fixed-width type. This behavior can, however, - // be modified in order to be optimized for a given compiler implementation. - - // In addition, a clear assessment of IEEE-754 comformance is carried out - // using compile-time assertion. - - #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE boost_float32_t; - typedef boost_float32_t boost_float_fast32_t; - typedef boost_float32_t boost_float_least32_t; - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::digits == 24); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float32_t>::max_exponent == 128); - #endif - - #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE boost_float64_t; - typedef boost_float64_t boost_float_fast64_t; - typedef boost_float64_t boost_float_least64_t; - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::digits == 53); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float64_t>::max_exponent == 1024); - #endif - - #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE boost_float80_t; - typedef boost_float80_t boost_float_fast80_t; - typedef boost_float80_t boost_float_least80_t; - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::digits == 63); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float80_t>::max_exponent == 16384); - #endif - - #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE boost_float128_t; - typedef boost_float128_t boost_float_fast128_t; - typedef boost_float128_t boost_float_least128_t; - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::digits == 113); - BOOST_STATIC_ASSERT(std::numeric_limits< ::boost_float128_t>::max_exponent == 16384); - #endif - // The following section contains the first group of macros that // are used for initializing floating-point literal values. // The types of the three forms (fixed-width, least-width, and fast-width) @@ -281,22 +229,18 @@ // The types of the max-form are handled. #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) - typedef boost_float32_t boost_floatmax_t; #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_32_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) - typedef boost_float64_t boost_floatmax_t; #define BOOST_FLOATMAX_C(x) BOOST_FLOAT64_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_64_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_64_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) - typedef boost_float80_t boost_floatmax_t; #define BOOST_FLOATMAX_C(x) BOOST_FLOAT80_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) - typedef boost_float128_t boost_floatmax_t; #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_128_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_128_MAX @@ -304,35 +248,71 @@ #error The maximum available floating-point width for cstdfloat is undefined. #endif - // Here, we define floating-point typedefs having specified widths - // within the namespace boost. + // Here, we define the floating-point typedefs having specified widths. + // The types are defined in the namespace boost. + + // For simplicity, the least and fast types are type defined identically + // as the corresponding fixed-width type. This behavior can, however, + // be modified in order to be optimized for a given compiler implementation. + + // In addition, a clear assessment of IEEE-754 comformance is carried out + // using compile-time assertion. + namespace boost { #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - typedef ::boost_float32_t float32_t; - typedef ::boost_float_fast32_t float_fast32_t; - typedef ::boost_float_least32_t float_least32_t; + typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float32_t; + typedef float32_t float_fast32_t; + typedef float32_t float_least32_t; + + BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits::digits == 24); + BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 128); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - typedef ::boost_float64_t float64_t; - typedef ::boost_float_fast64_t float_fast64_t; - typedef ::boost_float_least64_t float_least64_t; + typedef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float64_t; + typedef float64_t float_fast64_t; + typedef float64_t float_least64_t; + + BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits::digits == 53); + BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 1024); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - typedef ::boost_float80_t float80_t; - typedef ::boost_float_fast80_t float_fast80_t; - typedef ::boost_float_least80_t float_least80_t; + typedef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float80_t; + typedef float80_t float_fast80_t; + typedef float80_t float_least80_t; + + BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits::digits == 63); + BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 16384); #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - typedef ::boost_float128_t float128_t; - typedef ::boost_float_fast128_t float_fast128_t; - typedef ::boost_float_least128_t float_least128_t; + typedef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float128_t; + typedef float128_t float_fast128_t; + typedef float128_t float_least128_t; + + BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits::digits == 113); + BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 16384); #endif - typedef ::boost_floatmax_t floatmax_t; + #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) + typedef float32_t floatmax_t; + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) + typedef float64_t floatmax_t; + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) + typedef float80_t floatmax_t; + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) + typedef float128_t floatmax_t; + #endif } // namespace boost From 6855c355989a2087a0ac0c5119af4f75f0b770af Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sun, 12 Jan 2014 19:35:38 +0100 Subject: [PATCH 12/69] In , add support for __float128 from GCC's libquadmath. --- include/boost/math/tools/cstdfloat.hpp | 61 ++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index d0caeb1f3..57ec99e2d 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -13,6 +13,7 @@ #include #include #include + #include // implements floating-point typedefs having // specified widths, as described in N3626 (proposed for C++14). @@ -173,6 +174,20 @@ #endif #endif + // Check if __float128 from GCC's libquadmath is supported. + // Here, we use the BOOST_MATH_USE_FLOAT128 pre-processor + // definition from boost/math/tools/config.hpp. + #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0) && defined(BOOST_MATH_USE_FLOAT128) + #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE + #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE __float128 + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 + #undef BOOST_FLOAT128_C + #define BOOST_FLOAT128_C(x) (x ## Q) + #endif + // This is the end of the preamble. Now we use the results // of the queries in the preamble. @@ -180,6 +195,22 @@ && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) + + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + + #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE + #undef BOOST_FLOAT32_C + #undef BOOST_FLOAT64_C + #undef BOOST_FLOAT80_C + #undef BOOST_FLOAT128_C + #error The compiler does not support any of the required floating-point types for . #endif @@ -228,18 +259,42 @@ // are used for initializing floating-point literal values. // The types of the max-form are handled. + // In addition, unused pre-processor definitions previously + // initialized with dummy values are herewith un-defined. + #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_32_MAX + + #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE + #undef BOOST_FLOAT64_C + #undef BOOST_FLOAT80_C + #undef BOOST_FLOAT128_C #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT64_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_64_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_64_MAX + + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE + #undef BOOST_FLOAT80_C + #undef BOOST_FLOAT128_C #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT80_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX + + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE + #undef BOOST_FLOAT80_C #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_128_MIN @@ -304,11 +359,11 @@ BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 16384); #endif - #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) + #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) typedef float32_t floatmax_t; - #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) typedef float64_t floatmax_t; - #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) typedef float80_t floatmax_t; #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) typedef float128_t floatmax_t; From cd6f694730c279aa7fb424ca15396e2a77c9000c Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Mon, 13 Jan 2014 20:00:56 +0100 Subject: [PATCH 13/69] Improve clarity of . --- include/boost/math/tools/cstdfloat.hpp | 136 ++++++++----------------- 1 file changed, 44 insertions(+), 92 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index 57ec99e2d..6931b5385 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -7,6 +7,10 @@ // or copy at http://www.boost.org/LICENSE_1_0.txt) // +// implements floating-point typedefs having +// specified widths, as described in N3626 (proposed for C++14). +// See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf + #ifndef _BOOST_CSTDFLOAT_2014_01_09_HPP_ #define _BOOST_CSTDFLOAT_2014_01_09_HPP_ @@ -15,10 +19,6 @@ #include #include - // implements floating-point typedefs having - // specified widths, as described in N3626 (proposed for C++14). - // See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf - // This is the beginning of the preamble. // In this preamble, the preprocessor is used to query certain @@ -28,164 +28,140 @@ // widths. These are *thought* to be conformant with IEEE-754, // whereby an unequivocal test based on numeric_limits follows below. - // First, we will pre-load some preprocessor definitions with - // dummy values. + // In addition, macros that are used for initializing floating-point + // literal values and minimum and maximum values are defined. + + // First, we will pre-load the maximum available width + // preprocessor definition with a dummy value. + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 - #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 0 - #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 0 - #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0 - #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0 - - #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float - #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float - #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float - #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float - - #define BOOST_FLOAT32_C(x) (x ## F) - #define BOOST_FLOAT64_C(x) (x ## F) - #define BOOST_FLOAT80_C(x) (x ## F) - #define BOOST_FLOAT128_C(x) (x ## F) - #if (!defined(FLT_RADIX) || ((defined(FLT_RADIX) && (FLT_RADIX != 2)))) - #error The compiler does not support radix-2 floating-point types for . + #error The compiler does not support radix-2 floating-point types required for . #endif // Check if built-in float is equivalent to float32_t, float64_t, float80_t, or float128_t. #if(defined(FLT_MANT_DIG) && defined(FLT_MAX_EXP)) #if ((FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 - #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 - #undef BOOST_FLOAT32_C #define BOOST_FLOAT32_C(x) (x ## F) + #define BOOST_FLOAT_32_MIN FLT_MIN + #define BOOST_FLOAT_32_MAX FLT_MAX #elif((FLT_MANT_DIG == 53) && (FLT_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 - #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 - #undef BOOST_FLOAT64_C #define BOOST_FLOAT64_C(x) (x ## F) + #define BOOST_FLOAT_64_MIN FLT_MIN + #define BOOST_FLOAT_64_MAX FLT_MAX #elif((FLT_MANT_DIG == 63) && (FLT_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 - #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 - #undef BOOST_FLOAT80_C #define BOOST_FLOAT80_C(x) (x ## F) + #define BOOST_FLOAT_80_MIN FLT_MIN + #define BOOST_FLOAT_80_MAX FLT_MAX #elif((FLT_MANT_DIG == 113) && (FLT_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 - #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 - #undef BOOST_FLOAT128_C #define BOOST_FLOAT128_C(x) (x ## F) + #define BOOST_FLOAT_128_MIN FLT_MIN + #define BOOST_FLOAT_128_MAX FLT_MAX #endif #endif // Check if built-in double is equivalent to float32_t, float64_t, float80_t, or float128_t. #if(defined(DBL_MANT_DIG) && defined(DBL_MAX_EXP)) #if ((DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 - #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 - #undef BOOST_FLOAT32_C #define BOOST_FLOAT32_C(x) (x) + #define BOOST_FLOAT_32_MIN DBL_MIN + #define BOOST_FLOAT_32_MAX DBL_MAX #elif((DBL_MANT_DIG == 53) && (DBL_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 - #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 - #undef BOOST_FLOAT64_C #define BOOST_FLOAT64_C(x) (x) + #define BOOST_FLOAT_64_MIN DBL_MIN + #define BOOST_FLOAT_64_MAX DBL_MAX #elif((DBL_MANT_DIG == 63) && (DBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 - #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 - #undef BOOST_FLOAT80_C #define BOOST_FLOAT80_C(x) (x) + #define BOOST_FLOAT_80_MIN DBL_MIN + #define BOOST_FLOAT_80_MAX DBL_MAX #elif((DBL_MANT_DIG == 113) && (DBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 - #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 - #undef BOOST_FLOAT128_C #define BOOST_FLOAT128_C(x) (x) + #define BOOST_FLOAT_128_MIN DBL_MIN + #define BOOST_FLOAT_128_MAX DBL_MAX #endif #endif // Check if built-in long double is equivalent to float32_t, float64_t, float80_t, or float128_t. #if(defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP)) #if ((LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 - #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 - #undef BOOST_FLOAT32_C #define BOOST_FLOAT32_C(x) (x ## L) + #define BOOST_FLOAT_32_MIN LDBL_MIN + #define BOOST_FLOAT_32_MAX LDBL_MAX #elif((LDBL_MANT_DIG == 53) && (LDBL_MAX_EXP == 1024) && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 - #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 - #undef BOOST_FLOAT64_C #define BOOST_FLOAT64_C(x) (x ## L) + #define BOOST_FLOAT_64_MIN LDBL_MIN + #define BOOST_FLOAT_64_MAX LDBL_MAX #elif((LDBL_MANT_DIG == 63) && (LDBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 - #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 - #undef BOOST_FLOAT80_C #define BOOST_FLOAT80_C(x) (x ## L) + #define BOOST_FLOAT_80_MIN LDBL_MIN + #define BOOST_FLOAT_80_MAX LDBL_MAX #elif((LDBL_MANT_DIG == 113) && (LDBL_MAX_EXP == 16384) && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) - #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 - #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 - #undef BOOST_FLOAT128_C #define BOOST_FLOAT128_C(x) (x ## L) + #define BOOST_FLOAT_128_MIN LDBL_MIN + #define BOOST_FLOAT_128_MAX LDBL_MAX #endif #endif // Check if __float128 from GCC's libquadmath is supported. // Here, we use the BOOST_MATH_USE_FLOAT128 pre-processor - // definition from boost/math/tools/config.hpp. + // definition from . #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0) && defined(BOOST_MATH_USE_FLOAT128) - #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE __float128 #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 - #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 - #undef BOOST_FLOAT128_C #define BOOST_FLOAT128_C(x) (x ## Q) + #define BOOST_FLOAT_128_MIN FLT128_MIN + #define BOOST_FLOAT_128_MAX FLT128_MAX #endif // This is the end of the preamble. Now we use the results @@ -195,23 +171,7 @@ && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) - - #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH - - #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE - #undef BOOST_FLOAT32_C - #undef BOOST_FLOAT64_C - #undef BOOST_FLOAT80_C - #undef BOOST_FLOAT128_C - - #error The compiler does not support any of the required floating-point types for . + #error The compiler does not support any of the floating-point types required for . #endif // The following section contains the first group of macros that @@ -220,37 +180,29 @@ // in bit-counts of 32, 64, 80, 128 are handled. #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) - #define BOOST_FLOAT_32_MIN BOOST_FLOAT32_C(1.175494351e-38) #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOAT_LEAST32_MIN BOOST_FLOAT_32_MIN - #define BOOST_FLOAT_32_MAX BOOST_FLOAT32_C(3.402823466e+38) #define BOOST_FLOAT_FAST32_MAX BOOST_FLOAT_32_MAX #define BOOST_FLOAT_LEAST32_MAX BOOST_FLOAT_32_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 1) - #define BOOST_FLOAT_64_MIN BOOST_FLOAT64_C(2.2250738585072014e-308) #define BOOST_FLOAT_FAST64_MIN BOOST_FLOAT_64_MIN #define BOOST_FLOAT_LEAST64_MIN BOOST_FLOAT_64_MIN - #define BOOST_FLOAT_64_MAX BOOST_FLOAT64_C(1.7976931348623158e+308) #define BOOST_FLOAT_FAST64_MAX BOOST_FLOAT_64_MAX #define BOOST_FLOAT_LEAST64_MAX BOOST_FLOAT_64_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 1) - #define BOOST_FLOAT_80_MIN BOOST_FLOAT80_C(3.3621031431120935062627E-4932) #define BOOST_FLOAT_FAST80_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOAT_LEAST80_MIN BOOST_FLOAT_80_MIN - #define BOOST_FLOAT_80_MAX BOOST_FLOAT80_C(1.1897314953572317650213E+4932) #define BOOST_FLOAT_FAST80_MAX BOOST_FLOAT_80_MAX #define BOOST_FLOAT_LEAST80_MAX BOOST_FLOAT_80_MAX #endif #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) - #define BOOST_FLOAT_128_MIN BOOST_FLOAT128_C(3.362103143112093506262677817321752603E-4932) #define BOOST_FLOAT_FAST128_MIN BOOST_FLOAT_128_MIN #define BOOST_FLOAT_LEAST128_MIN BOOST_FLOAT_128_MIN - #define BOOST_FLOAT_128_MAX BOOST_FLOAT128_C(1.189731495357231765085759326628007016E+4932) #define BOOST_FLOAT_FAST128_MAX BOOST_FLOAT_128_MAX #define BOOST_FLOAT_LEAST128_MAX BOOST_FLOAT_128_MAX #endif @@ -259,7 +211,7 @@ // are used for initializing floating-point literal values. // The types of the max-form are handled. - // In addition, unused pre-processor definitions previously + // In addition, all unused pre-processor definitions previously // initialized with dummy values are herewith un-defined. #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) @@ -292,15 +244,15 @@ #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX - #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE - #undef BOOST_FLOAT80_C + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE + #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE + #undef BOOST_FLOAT128_C #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_128_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_128_MAX #else - #error The maximum available floating-point width for cstdfloat is undefined. + #error The maximum available floating-point width for is undefined. #endif // Here, we define the floating-point typedefs having specified widths. From a8eff735fd59c53ebafec3271242e1a719ba9521 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Mon, 13 Jan 2014 20:21:33 +0100 Subject: [PATCH 14/69] Re-correct the logic of un-defines in . --- include/boost/math/tools/cstdfloat.hpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index 6931b5385..e0e630eb4 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -36,6 +36,11 @@ #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 + #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 0 + #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 0 + #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0 + #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0 + #if (!defined(FLT_RADIX) || ((defined(FLT_RADIX) && (FLT_RADIX != 2)))) #error The compiler does not support radix-2 floating-point types required for . #endif @@ -46,6 +51,7 @@ #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 + #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 #define BOOST_FLOAT32_C(x) (x ## F) #define BOOST_FLOAT_32_MIN FLT_MIN @@ -54,6 +60,7 @@ #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 + #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 #define BOOST_FLOAT64_C(x) (x ## F) #define BOOST_FLOAT_64_MIN FLT_MIN @@ -62,6 +69,7 @@ #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 #define BOOST_FLOAT80_C(x) (x ## F) #define BOOST_FLOAT_80_MIN FLT_MIN @@ -70,6 +78,7 @@ #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 #define BOOST_FLOAT128_C(x) (x ## F) #define BOOST_FLOAT_128_MIN FLT_MIN @@ -83,6 +92,7 @@ #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 + #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 #define BOOST_FLOAT32_C(x) (x) #define BOOST_FLOAT_32_MIN DBL_MIN @@ -91,6 +101,7 @@ #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 + #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 #define BOOST_FLOAT64_C(x) (x) #define BOOST_FLOAT_64_MIN DBL_MIN @@ -99,6 +110,7 @@ #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 #define BOOST_FLOAT80_C(x) (x) #define BOOST_FLOAT_80_MIN DBL_MIN @@ -107,6 +119,7 @@ #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 #define BOOST_FLOAT128_C(x) (x) #define BOOST_FLOAT_128_MIN DBL_MIN @@ -120,6 +133,7 @@ #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 + #undef BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 1 #define BOOST_FLOAT32_C(x) (x ## L) #define BOOST_FLOAT_32_MIN LDBL_MIN @@ -128,6 +142,7 @@ #define BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 64 + #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 1 #define BOOST_FLOAT64_C(x) (x ## L) #define BOOST_FLOAT_64_MIN LDBL_MIN @@ -136,6 +151,7 @@ #define BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 80 + #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 1 #define BOOST_FLOAT80_C(x) (x ## L) #define BOOST_FLOAT_80_MIN LDBL_MIN @@ -144,6 +160,7 @@ #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 #define BOOST_FLOAT128_C(x) (x ## L) #define BOOST_FLOAT_128_MIN LDBL_MIN @@ -158,6 +175,7 @@ #define BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE __float128 #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 128 + #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 1 #define BOOST_FLOAT128_C(x) (x ## Q) #define BOOST_FLOAT_128_MIN FLT128_MIN @@ -219,9 +237,6 @@ #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_32_MAX - #undef BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE @@ -233,8 +248,6 @@ #define BOOST_FLOATMAX_MIN BOOST_FLOAT_64_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_64_MAX - #undef BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #undef BOOST_FLOAT80_C @@ -244,7 +257,6 @@ #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX - #undef BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE #undef BOOST_FLOAT128_C #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) From 93f0d2271c1bb71a597c7d5cfad2edc91508b199 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Mon, 13 Jan 2014 22:42:44 +0100 Subject: [PATCH 15/69] Improve the comments in . --- include/boost/math/tools/cstdfloat.hpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index e0e630eb4..0b82cc37e 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -29,10 +29,10 @@ // whereby an unequivocal test based on numeric_limits follows below. // In addition, macros that are used for initializing floating-point - // literal values and minimum and maximum values are defined. + // literal values and some basic min/max values are defined. - // First, we will pre-load the maximum available width - // preprocessor definition with a dummy value. + // First, we will pre-load certain preprocessor definitions + // with a dummy value. #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 @@ -41,6 +41,7 @@ #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0 #define BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE 0 + // Ensure that the compiler has a radix-2 floating-point representation. #if (!defined(FLT_RADIX) || ((defined(FLT_RADIX) && (FLT_RADIX != 2)))) #error The compiler does not support radix-2 floating-point types required for . #endif @@ -183,8 +184,9 @@ #endif // This is the end of the preamble. Now we use the results - // of the queries in the preamble. + // of the queries that have been obtained in the preamble. + // Ensure that the compiler has any suitable floating-point type whatsoever. #if ( (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ @@ -192,10 +194,8 @@ #error The compiler does not support any of the floating-point types required for . #endif - // The following section contains the first group of macros that - // are used for initializing floating-point literal values. - // The types of the three forms (fixed-width, least-width, and fast-width) - // in bit-counts of 32, 64, 80, 128 are handled. + // The following section contains the various min/max macros + // for the *leastN and *fastN types. #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN @@ -225,12 +225,11 @@ #define BOOST_FLOAT_LEAST128_MAX BOOST_FLOAT_128_MAX #endif - // The following section contains the second group of macros that - // are used for initializing floating-point literal values. - // The types of the max-form are handled. + // The following section contains the various min/max macros + // for the *floatmax types. - // In addition, all unused pre-processor definitions previously - // initialized with dummy values are herewith un-defined. + // In addition, all unused pre-processor definitions are + // herewith un-defined. #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) From 45a097e93bae3885e6a5902281ebce477e1fa0fd Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Tue, 14 Jan 2014 22:40:24 +0100 Subject: [PATCH 16/69] To , add support for tiny floats float16_t and float24_t. --- include/boost/math/tools/cstdfloat.hpp | 142 ++++++++++++++++++++----- 1 file changed, 115 insertions(+), 27 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index 0b82cc37e..863e46861 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -36,6 +36,8 @@ #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 + #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE 0 + #define BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE 0 #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 0 #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 0 #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0 @@ -46,9 +48,27 @@ #error The compiler does not support radix-2 floating-point types required for . #endif - // Check if built-in float is equivalent to float32_t, float64_t, float80_t, or float128_t. + // Check if built-in float is equivalent to float16_t, float24_t, float32_t, float64_t, float80_t, or float128_t. #if(defined(FLT_MANT_DIG) && defined(FLT_MAX_EXP)) - #if ((FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) + #if ((FLT_MANT_DIG == 11) && (FLT_MAX_EXP == 16) && (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 0)) + #define BOOST_CSTDFLOAT_FLOAT16_NATIVE_TYPE float + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 16 + #undef BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE 1 + #define BOOST_FLOAT16_C(x) (x ## F) + #define BOOST_FLOAT_16_MIN FLT_MIN + #define BOOST_FLOAT_16_MAX FLT_MAX + #elif((FLT_MANT_DIG == 16) && (FLT_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) + #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE float + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 + #undef BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE 1 + #define BOOST_FLOAT24_C(x) (x ## F) + #define BOOST_FLOAT_24_MIN FLT_MIN + #define BOOST_FLOAT_24_MAX FLT_MAX + #elif((FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 @@ -87,9 +107,27 @@ #endif #endif - // Check if built-in double is equivalent to float32_t, float64_t, float80_t, or float128_t. + // Check if built-in double is equivalent to float16_t, float24_t, float32_t, float64_t, float80_t, or float128_t. #if(defined(DBL_MANT_DIG) && defined(DBL_MAX_EXP)) - #if ((DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) + #if ((DBL_MANT_DIG == 11) && (DBL_MAX_EXP == 16) && (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 0)) + #define BOOST_CSTDFLOAT_FLOAT16_NATIVE_TYPE double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 16 + #undef BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE 1 + #define BOOST_FLOAT16_C(x) (x) + #define BOOST_FLOAT_16_MIN DBL_MIN + #define BOOST_FLOAT_16_MAX DBL_MAX + #elif((DBL_MANT_DIG == 16) && (DBL_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) + #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 + #undef BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE 1 + #define BOOST_FLOAT24_C(x) (x) + #define BOOST_FLOAT_24_MIN DBL_MIN + #define BOOST_FLOAT_24_MAX DBL_MAX + #elif((DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 @@ -128,9 +166,27 @@ #endif #endif - // Check if built-in long double is equivalent to float32_t, float64_t, float80_t, or float128_t. + // Check if built-in long double is equivalent to float16_t, float24_t, float32_t, float64_t, float80_t, or float128_t. #if(defined(LDBL_MANT_DIG) && defined(LDBL_MAX_EXP)) - #if ((LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) + #if ((LDBL_MANT_DIG == 11) && (LDBL_MAX_EXP == 16) && (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 0)) + #define BOOST_CSTDFLOAT_FLOAT16_NATIVE_TYPE long double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 16 + #undef BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE 1 + #define BOOST_FLOAT16_C(x) (x ## L) + #define BOOST_FLOAT_16_MIN LDBL_MIN + #define BOOST_FLOAT_16_MAX LDBL_MAX + #elif((LDBL_MANT_DIG == 16) && (LDBL_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) + #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE long double + #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH + #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 + #undef BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE + #define BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE 1 + #define BOOST_FLOAT24_C(x) (x ## L) + #define BOOST_FLOAT_24_MIN LDBL_MIN + #define BOOST_FLOAT_24_MAX LDBL_MAX + #elif((LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 32 @@ -187,7 +243,9 @@ // of the queries that have been obtained in the preamble. // Ensure that the compiler has any suitable floating-point type whatsoever. - #if ( (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0) \ + #if ( (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 0) \ + && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0) \ + && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0)) @@ -197,6 +255,20 @@ // The following section contains the various min/max macros // for the *leastN and *fastN types. + #if(BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 1) + #define BOOST_FLOAT_FAST16_MIN BOOST_FLOAT_16_MIN + #define BOOST_FLOAT_LEAST16_MIN BOOST_FLOAT_16_MIN + #define BOOST_FLOAT_FAST16_MAX BOOST_FLOAT_16_MAX + #define BOOST_FLOAT_LEAST16_MAX BOOST_FLOAT_16_MAX + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 1) + #define BOOST_FLOAT_FAST24_MIN BOOST_FLOAT_24_MIN + #define BOOST_FLOAT_LEAST24_MIN BOOST_FLOAT_24_MIN + #define BOOST_FLOAT_FAST24_MAX BOOST_FLOAT_24_MAX + #define BOOST_FLOAT_LEAST24_MAX BOOST_FLOAT_24_MAX + #endif + #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOAT_LEAST32_MIN BOOST_FLOAT_32_MIN @@ -228,36 +300,26 @@ // The following section contains the various min/max macros // for the *floatmax types. - // In addition, all unused pre-processor definitions are - // herewith un-defined. - - #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) + #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 16) + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT16_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_16_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_16_MAX + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 24) + #define BOOST_FLOATMAX_C(x) BOOST_FLOAT24_C(x) + #define BOOST_FLOATMAX_MIN BOOST_FLOAT_24_MIN + #define BOOST_FLOATMAX_MAX BOOST_FLOAT_24_MAX + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_32_MAX - - #undef BOOST_CSTDFLOAT_FLOAT64_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE - #undef BOOST_FLOAT64_C - #undef BOOST_FLOAT80_C - #undef BOOST_FLOAT128_C #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT64_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_64_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_64_MAX - - #undef BOOST_CSTDFLOAT_FLOAT80_NATIVE_TYPE - #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE - #undef BOOST_FLOAT80_C - #undef BOOST_FLOAT128_C #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 80) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT80_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_80_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_80_MAX - - #undef BOOST_CSTDFLOAT_FLOAT128_NATIVE_TYPE - #undef BOOST_FLOAT128_C #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT128_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_128_MIN @@ -278,6 +340,28 @@ namespace boost { + #if(BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 1) + typedef BOOST_CSTDFLOAT_FLOAT16_NATIVE_TYPE float16_t; + typedef float16_t float_fast16_t; + typedef float16_t float_least16_t; + + BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits::digits == 11); + BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 16); + #endif + + #if(BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 1) + typedef BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE float24_t; + typedef float24_t float_fast24_t; + typedef float24_t float_least24_t; + + BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); + BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); + BOOST_STATIC_ASSERT(std::numeric_limits::digits == 16); + BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 64); + #endif + #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float32_t; typedef float32_t float_fast32_t; @@ -322,7 +406,11 @@ BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 16384); #endif - #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) + #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 16) + typedef float16_t floatmax_t; + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 24) + typedef float24_t floatmax_t; + #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) typedef float32_t floatmax_t; #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) typedef float64_t floatmax_t; From deb2daac045b92a82cf816baaafc5db4ea14f902 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Wed, 15 Jan 2014 11:38:10 +0100 Subject: [PATCH 17/69] In corrected the number of digits in float24_t. --- include/boost/math/tools/cstdfloat.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index 863e46861..2cf3b68fa 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -59,7 +59,7 @@ #define BOOST_FLOAT16_C(x) (x ## F) #define BOOST_FLOAT_16_MIN FLT_MIN #define BOOST_FLOAT_16_MAX FLT_MAX - #elif((FLT_MANT_DIG == 16) && (FLT_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) + #elif((FLT_MANT_DIG == 17) && (FLT_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 @@ -118,7 +118,7 @@ #define BOOST_FLOAT16_C(x) (x) #define BOOST_FLOAT_16_MIN DBL_MIN #define BOOST_FLOAT_16_MAX DBL_MAX - #elif((DBL_MANT_DIG == 16) && (DBL_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) + #elif((DBL_MANT_DIG == 17) && (DBL_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 @@ -177,7 +177,7 @@ #define BOOST_FLOAT16_C(x) (x ## L) #define BOOST_FLOAT_16_MIN LDBL_MIN #define BOOST_FLOAT_16_MAX LDBL_MAX - #elif((LDBL_MANT_DIG == 16) && (LDBL_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) + #elif((LDBL_MANT_DIG == 17) && (LDBL_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 @@ -358,7 +358,7 @@ BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits::digits == 16); + BOOST_STATIC_ASSERT(std::numeric_limits::digits == 17); BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 64); #endif From 3d61999cea4b3e596acf951969f07d62659a750c Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sat, 18 Jan 2014 15:05:16 +0100 Subject: [PATCH 18/69] A few tweaks in and preliminary text-based docs. --- include/boost/math/tools/cstdfloat.hpp | 2 + include/boost/math/tools/cstdfloat.hpp.txt | 153 +++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 include/boost/math/tools/cstdfloat.hpp.txt diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index 2cf3b68fa..a6b295f24 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -418,6 +418,8 @@ typedef float80_t floatmax_t; #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 128) typedef float128_t floatmax_t; + #else + #error The maximum available floating-point width for is undefined. #endif } // namespace boost diff --git a/include/boost/math/tools/cstdfloat.hpp.txt b/include/boost/math/tools/cstdfloat.hpp.txt new file mode 100644 index 000000000..f4a6f4f24 --- /dev/null +++ b/include/boost/math/tools/cstdfloat.hpp.txt @@ -0,0 +1,153 @@ +Standardized Floating-Point Typedef's + +Overview + +The header provides standardized +floating-point typedef's having specified widths. +These are useful for writing portable code because they +should behave identically on all platforms. +All typedef's are in namespace boost. + +The typedef's include float16_t, float32_t, float64_t, float128_t, +their corresponding least and fast types, +and the corresponding maximum-width type. +The typedef's are based on underlying built-in types +such as float, double, or long double, or based on other compiler-specific +non-standardized types such as __float128. +The underlying types of these typedef's must conform with +the corresponding specifications of binary16, binary32, binary64, +and binary128 in IEEE-754 floating-point format +[http://en.wikipedia.org/wiki/IEEE_floating_point]. + +The typedef's are based on N3626 +[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf] +proposed for a new C++14 standard header and N1703 +[http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1703.pdf] +proposed for a new C language standard header . + +The 128-bit floating-point type, of great interest in scientific and +numeric programming, is not required in the boost header, +and may not be supplied for all platforms/compilers, because compiler +support for a 128-bit floating-point type is not mandated by either +the C standard or C++ standard. + +The following code uses in combination with + to compute the Jahnke-Emden-Lambda +function. + +TBD: code... + +See cstdfloat_test.cpp for a more detailed test program. + + +Rationale + +The implementation of is designed to utilize , +defined in the 1989 C standard. The preprocessor is used to query certain +preprocessor definitions in such as FLT_MAX, DBL_MAX, etc. +Based on the results of these queries, an attempt is made to automatically +detect the presence of built-in floating-point types having specified widths. +An unequivocal test regarding conformance with IEEE-754 based on +std::numeric_limits<> is performed with BOOST_STATIC_ASSERT. + +The header makes the standardized floating-point +typedef's safely available in namespace boost without placing any names +in namespace std. The intention is to complement rather than compete +with a potential future C++ Standard Library that may contain these typedef's. +Should some future C++ standard include and , +then will continue to function, but will become redundant +and may be safely deprecated. + +Because is a boost header, its name conform to the +boost header naming conventions, not the C++ Standard Library header +naming conventions. + +Please note that can not synthesize or create +a typedef if the underlying type is not provided by the compiler. +For example, if a compiler does not have an underlying floating-point +type with 128 bits (highly sought-after in scientific and numeric programming), +then float128_t and ist corresponding least and fast types are not +provided by . + + +Caveat Emptor + +As an implementation artifact, certain C macro names from +may possibly be visible to users of . +Don't rely on using these macros; they are not part of any Boost-specified interface. +Use std::numeric_limits<> for floating-point ranges, etc. instead. + + +Exact-Width Floating-Point Typedef's + +The typedef float#_t, with # replaced by the width, designates a +floating-point type of exactly # bits; for example float32_t denotes +a single-precision floating-point type with 24 binary mantissa digits +(including one xxx bit) and 8 binary exponent digits with approximately +7 decimal digits of precision. + +Floating-point types are specified with (optionally) implementation-specific +widths and formats. However, if a platform supports underlying +floating-point types (conformant with IEEE-754) with widths of +16, 32, 64, 128 bits, or any combination thereof, +then does provide the corresponding typedef's +float16_t, float32_t, float64_t, float128_t, +their corresponding least and fast types, +and the corresponding maximum-width type + +The absence of float128_t is indicated by the macro BOOST_NO_FLOAT128_T. + +Fastest minimum-width floating-point typedef's + +The typedef float_least#_t, with # replaced by the width, designates a +floating-point type with a width of at least # bits, such that no +floating-point type with lesser size has at least the specified width. +Thus, float_least32_t denotes the smallest floating-point type with +a width of at least 32 bits. + +Minimum-width floating-point types are provided for all existing +exact-width floating-point types on a given platform. + +For example, is a platfrom supports float32_t and float64_t, +then float_least32_t and float_least64_t will also be supported, etc. + + +Fastest minimum-width floating-point typedef's + +The typedef float_fast#_t, with # replaced by the width, designates +the fastest floating-point type with a width of at least # bits. + +There is no guarantee that these types are fastest for all purposes. +In any case, however, they satisfy the precision and width requirements. + +Fastest minimum-width floating-point types are provided for all existing +exact-width floating-point types on a given platform. + +For example, is a platfrom supports float32_t and float64_t, +then float_fast32_t and float_fast64_t will also be supported, etc. + +Greatest-width floating-point typedef + +The typedef floatmax_t designates a floating-point type capable of representing +any value of any floating-point type. + +The greatest-width typedef is provided for all platforms. + +Floating-Point Constant Macros + +All macros of the type BOOST_FLOAT16_C, BOOST_FLOAT32_C, BOOST_FLOAT64_C, +BOOST_FLOAT128_C, BOOST_FLOATMAX_C are always defined after inclusion of +. These allow floating-point constants of at +least the specified width to be declared. + +For example: + +#include + +// Here Pythagoras' constant with approximately 7 decimal digits +// of precision is created with the correct suffix applied: +static const boost::float32_t pi = BOOST_FLOAT32_C3.1415926536); + +// Here the Euler-gamma constant with approximately 34 decimal digits +// of precision is created with the correct suffix applied: +static const boost::float128_t euler = BOOST_FLOAT128_C(0.57721566490153286060651209008240243104216); From 9c62c70dff9efbae887acba2ce590fe5b918b571 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sat, 18 Jan 2014 15:18:55 +0100 Subject: [PATCH 19/69] Remove float24_t from . Imrove the preliminary docs. --- include/boost/math/tools/cstdfloat.hpp | 56 +--------------------- include/boost/math/tools/cstdfloat.hpp.txt | 23 +++++++-- 2 files changed, 22 insertions(+), 57 deletions(-) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index a6b295f24..cb726dd96 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -37,7 +37,6 @@ #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 0 #define BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE 0 - #define BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE 0 #define BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE 0 #define BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE 0 #define BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE 0 @@ -59,15 +58,6 @@ #define BOOST_FLOAT16_C(x) (x ## F) #define BOOST_FLOAT_16_MIN FLT_MIN #define BOOST_FLOAT_16_MAX FLT_MAX - #elif((FLT_MANT_DIG == 17) && (FLT_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) - #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE float - #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH - #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 - #undef BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE - #define BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE 1 - #define BOOST_FLOAT24_C(x) (x ## F) - #define BOOST_FLOAT_24_MIN FLT_MIN - #define BOOST_FLOAT_24_MAX FLT_MAX #elif((FLT_MANT_DIG == 24) && (FLT_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -118,15 +108,6 @@ #define BOOST_FLOAT16_C(x) (x) #define BOOST_FLOAT_16_MIN DBL_MIN #define BOOST_FLOAT_16_MAX DBL_MAX - #elif((DBL_MANT_DIG == 17) && (DBL_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) - #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE double - #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH - #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 - #undef BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE - #define BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE 1 - #define BOOST_FLOAT24_C(x) (x) - #define BOOST_FLOAT_24_MIN DBL_MIN - #define BOOST_FLOAT_24_MAX DBL_MAX #elif((DBL_MANT_DIG == 24) && (DBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -177,15 +158,6 @@ #define BOOST_FLOAT16_C(x) (x ## L) #define BOOST_FLOAT_16_MIN LDBL_MIN #define BOOST_FLOAT_16_MAX LDBL_MAX - #elif((LDBL_MANT_DIG == 17) && (LDBL_MAX_EXP == 64) && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0)) - #define BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE long double - #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH - #define BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH 24 - #undef BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE - #define BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE 1 - #define BOOST_FLOAT24_C(x) (x ## L) - #define BOOST_FLOAT_24_MIN LDBL_MIN - #define BOOST_FLOAT_24_MAX LDBL_MAX #elif((LDBL_MANT_DIG == 24) && (LDBL_MAX_EXP == 128) && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0)) #define BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE long double #undef BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH @@ -225,7 +197,8 @@ #endif #endif - // Check if __float128 from GCC's libquadmath is supported. + // Check if __float128 from GCC's libquadmath or ICC's /Qlong-double + // flag is supported. // Here, we use the BOOST_MATH_USE_FLOAT128 pre-processor // definition from . #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0) && defined(BOOST_MATH_USE_FLOAT128) @@ -244,7 +217,6 @@ // Ensure that the compiler has any suitable floating-point type whatsoever. #if ( (BOOST_CSTDFLOAT_HAS_FLOAT16_NATIVE_TYPE == 0) \ - && (BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT64_NATIVE_TYPE == 0) \ && (BOOST_CSTDFLOAT_HAS_FLOAT80_NATIVE_TYPE == 0) \ @@ -262,13 +234,6 @@ #define BOOST_FLOAT_LEAST16_MAX BOOST_FLOAT_16_MAX #endif - #if(BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 1) - #define BOOST_FLOAT_FAST24_MIN BOOST_FLOAT_24_MIN - #define BOOST_FLOAT_LEAST24_MIN BOOST_FLOAT_24_MIN - #define BOOST_FLOAT_FAST24_MAX BOOST_FLOAT_24_MAX - #define BOOST_FLOAT_LEAST24_MAX BOOST_FLOAT_24_MAX - #endif - #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) #define BOOST_FLOAT_FAST32_MIN BOOST_FLOAT_32_MIN #define BOOST_FLOAT_LEAST32_MIN BOOST_FLOAT_32_MIN @@ -304,10 +269,6 @@ #define BOOST_FLOATMAX_C(x) BOOST_FLOAT16_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_16_MIN #define BOOST_FLOATMAX_MAX BOOST_FLOAT_16_MAX - #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 24) - #define BOOST_FLOATMAX_C(x) BOOST_FLOAT24_C(x) - #define BOOST_FLOATMAX_MIN BOOST_FLOAT_24_MIN - #define BOOST_FLOATMAX_MAX BOOST_FLOAT_24_MAX #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) #define BOOST_FLOATMAX_C(x) BOOST_FLOAT32_C(x) #define BOOST_FLOATMAX_MIN BOOST_FLOAT_32_MIN @@ -351,17 +312,6 @@ BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 16); #endif - #if(BOOST_CSTDFLOAT_HAS_FLOAT24_NATIVE_TYPE == 1) - typedef BOOST_CSTDFLOAT_FLOAT24_NATIVE_TYPE float24_t; - typedef float24_t float_fast24_t; - typedef float24_t float_least24_t; - - BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); - BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); - BOOST_STATIC_ASSERT(std::numeric_limits::digits == 17); - BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 64); - #endif - #if(BOOST_CSTDFLOAT_HAS_FLOAT32_NATIVE_TYPE == 1) typedef BOOST_CSTDFLOAT_FLOAT32_NATIVE_TYPE float32_t; typedef float32_t float_fast32_t; @@ -408,8 +358,6 @@ #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 16) typedef float16_t floatmax_t; - #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 24) - typedef float24_t floatmax_t; #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 32) typedef float32_t floatmax_t; #elif(BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 64) diff --git a/include/boost/math/tools/cstdfloat.hpp.txt b/include/boost/math/tools/cstdfloat.hpp.txt index f4a6f4f24..afb86658b 100644 --- a/include/boost/math/tools/cstdfloat.hpp.txt +++ b/include/boost/math/tools/cstdfloat.hpp.txt @@ -32,10 +32,27 @@ support for a 128-bit floating-point type is not mandated by either the C standard or C++ standard. The following code uses in combination with - to compute the Jahnke-Emden-Lambda -function. + to compute a simplified +version of the Jahnke-Emden-Lambda function. Here, we use +a floating-point type with exactly 64 bits (i.e., float64_t). +If we were to use, for instance, built-in double, +then there would be no guarantee that the code would +behave identically on all platforms, with float64_t from +, however, there is. Here, we know that +this code is portable and uses a floating-point type +with approximately 15 decimal digits of precision. -TBD: code... +#include +#include +#include + +boost::float64_t jahnke_emden_lambda(boost::float64_t v, boost::float64_t x) +{ + const boost::float64_t gamma_v_plus_one = boost::math::tgamma(v + 1); + const boost::float64_t x_half_pow_v = std::pow(x /2, v); + + return gamma_v_plus_one * boost::math::cyl_bessel_j(x, v) / x_half_pow_v; +} See cstdfloat_test.cpp for a more detailed test program. From 0557af86a39b6b0bd3b297deb204e9a557e88957 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sat, 18 Jan 2014 21:42:23 +0100 Subject: [PATCH 20/69] In , add support for the BOOST_NO_FLOAT128_T preprocessor definition. --- include/boost/math/tools/cstdfloat.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/boost/math/tools/cstdfloat.hpp index cb726dd96..0599add59 100644 --- a/include/boost/math/tools/cstdfloat.hpp +++ b/include/boost/math/tools/cstdfloat.hpp @@ -255,7 +255,10 @@ #define BOOST_FLOAT_LEAST80_MAX BOOST_FLOAT_80_MAX #endif + #define BOOST_NO_FLOAT128_T + #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 1) + #undef BOOST_NO_FLOAT128_T #define BOOST_FLOAT_FAST128_MIN BOOST_FLOAT_128_MIN #define BOOST_FLOAT_LEAST128_MIN BOOST_FLOAT_128_MIN #define BOOST_FLOAT_FAST128_MAX BOOST_FLOAT_128_MAX From 68b2228e43ace1447f0f6a8f100a7019768af7e3 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sat, 18 Jan 2014 21:43:04 +0100 Subject: [PATCH 21/69] Initial commit of cstdfloat.qbk. --- tools/doc/cstdfloat.qbk | 249 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 249 insertions(+) create mode 100644 tools/doc/cstdfloat.qbk diff --git a/tools/doc/cstdfloat.qbk b/tools/doc/cstdfloat.qbk new file mode 100644 index 000000000..bced199ff --- /dev/null +++ b/tools/doc/cstdfloat.qbk @@ -0,0 +1,249 @@ +[book Standardized Floating-Point typedefs for C and C++ + + [quickbook 1.7] + [copyright 2014 Christopher Kormanyos, John Maddock, Paul A. Bristow] + [license + 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]) + ] + [authors [Kormanyos, Christopher], [Maddock, John], [Bristow, Paul A.] ] + [last-revision $Date$] + [/version 1.8.3] +] + +[template tr1[] [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Technical Report on C++ Library Extensions]] +[template C99[] [@http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf C99 Standard ISO/IEC 9899:1999]] + +[def __gsl [@http://www.gnu.org/software/gsl/ GSL-1.9]] +[def __glibc [@http://www.gnu.org/software/libc/ GNU C Lib]] +[def __hpc [@http://docs.hp.com/en/B9106-90010/index.html HP-UX C Library]] +[def __cephes [@http://www.netlib.org/cephes/ Cephes]] +[def __NTL [@http://www.shoup.net/ntl/ NTL A Library for doing Number Theory]] +[def __NTL_RR [@http://shoup.net/ntl/doc/RR.txt NTL::RR]] +[def __NTL_quad_float [@http://shoup.net/ntl/doc/quad_float.txt NTL::quad_float]] +[def __MPFR [@http://www.mpfr.org/ GNU MPFR library]] +[def __GMP [@http://gmplib.org/ GNU Multiple Precision Arithmetic Library]] +[def __multiprecision [@http://www.boost.org/doc/libs/1_53_0_beta1/libs/multiprecision/doc/html/index.html Boost.Multiprecision]] +[def __cpp_dec_float [@http://www.boost.org/doc/libs/1_53_0_beta1/libs/multiprecision/doc/html/boost_multiprecision/tut/floats/cpp_dec_float.html cpp_dec_float]] +[def __R [@http://www.r-project.org/ The R Project for Statistical Computing]] +[def __godfrey [link godfrey Godfrey]] +[def __pugh [link pugh Pugh]] +[def __NaN [@http://en.wikipedia.org/wiki/NaN NaN]] +[def __errno [@http://en.wikipedia.org/wiki/Errno `::errno`]] +[def __Mathworld [@http://mathworld.wolfram.com Wolfram MathWorld]] +[def __Mathematica [@http://www.wolfram.com/products/mathematica/index.html Wolfram Mathematica]] +[def __WolframAlpha [@http://www.wolframalpha.com/ Wolfram Alpha]] +[def __TOMS748 [@http://portal.acm.org/citation.cfm?id=210111 TOMS Algorithm 748: enclosing zeros of continuous functions]] +[def __TOMS910 [@http://portal.acm.org/citation.cfm?id=1916469 TOMS Algorithm 910: A Portable C++ Multiple-Precision System for Special-Function Calculations]] +[def __why_complements [link why_complements why complements?]] +[def __complements [link math_toolkit.stat_tut.overview.complements complements]] +[def __performance [link perf performance]] +[def __building [link math_toolkit.building building libraries]] +[def __e_float [@http://calgo.acm.org/910.zip e_float (TOMS Algorithm 910)]] +[def __Abramowitz_Stegun M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions, NBS (1964)] +[def __DMLF [@http://dlmf.nist.gov/ NIST Digital Library of Mathematical Functions]] +[def __IEEE754 [@http://en.wikipedia.org/wiki/IEEE_floating_point IEEE_floating_point]] +[def __N3626 [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf N3626]] +[def __N1703 [@http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1703.pdf N1703]] + +[/ Some composite templates] +[template super[x]''''''[x]''''''] +[template sub[x]''''''[x]''''''] +[template floor[x]'''⌊'''[x]'''⌋'''] +[template floorlr[x][lfloor][x][rfloor]] +[template ceil[x] '''⌈'''[x]'''⌉'''] + +[/template header_file[file] [@../../../../[file] [file]]] + +[note A printer-friendly PDF version of this manual is also available.] + +[section:overview Overview] + +The header `` provides optional standardized +floating-point `typedef`s having specified widths. +These are useful for writing portable code because they +should behave identically on all platforms. +All `typedef`s are in `namespace boost`. + +The `typedef`s include `float16_t, float32_t, float64_t, float128_t`, +their corresponding least and fast types, +and the corresponding maximum-width type. +The `typedef`s are based on underlying built-in types +such as `float`, `double`, or `long double`, or based on other compiler-specific +non-standardized types such as `__float128`. +The underlying types of these typedef's must conform with +the corresponding specifications of binary16, binary32, binary64, +and binary128 in __IEEE754 floating-point format +[@http://en.wikipedia.org/wiki/IEEE_floating_point]. + +The typedef's are based on __N3626 +proposed for a new C++14 standard header `` and +__N1703 proposed for a new C language standard header ``. + +The 128-bit floating-point type, of great interest in scientific and +numeric programming, is not required in the boost header, +and may not be supplied for all platforms/compilers, because compiler +support for a 128-bit floating-point type is not mandated by either +the C standard or the C++ standard. + +The following code uses `` in combination with +`` to compute a simplified +version of the Jahnke-Emden-Lambda function. Here, we use +a floating-point type with exactly 64 bits (i.e., `float64_t`). +If we were to use, for instance, built-in `double`, +then there would be no guarantee that the code would +behave identically on all platforms. With `float64_t` from +``, however, this is very likely. +Using `float64_t`, we know that +this code is portable and uses a floating-point type +with approximately 15 decimal digits of precision. + + #include + #include + #include + + boost::float64_t jahnke_emden_lambda(boost::float64_t v, boost::float64_t x) + { + const boost::float64_t gamma_v_plus_one = boost::math::tgamma(v + 1); + const boost::float64_t x_half_pow_v = std::pow(x /2, v); + + return gamma_v_plus_one * boost::math::cyl_bessel_j(x, v) / x_half_pow_v; + } + +See `cstdfloat_test.cpp` for a more detailed test program. + +[endsect] [/section:overview Overview] + +[section:rationale Rationale] + +The implementation of `` is designed to utilize ``, +defined in the 1989 C standard. The preprocessor is used to query certain +preprocessor definitions in `` such as FLT_MAX, DBL_MAX, etc. +Based on the results of these queries, an attempt is made to automatically +detect the presence of built-in floating-point types having specified widths. +An unequivocal test regarding conformance with __IEEE754 (IEC599) based on +[@ http://en.cppreference.com/w/cpp/types/numeric_limits/is_iec559 `std::numeric_limits<>::is_iec559`] +is performed with `BOOST_STATIC_ASSERT`. + +The header `` makes the standardized floating-point +`typedef`s safely available in `namespace boost` without placing any names +in `namespace std`. The intention is to complement rather than compete +with a potential future C++ Standard Library that may contain these `typedef`s. +Should some future C++ standard include `` and ``, +then `` will continue to function, but will become redundant +and may be safely deprecated. + +Because `` is a boost header, its name conforms to the +boost header naming conventions, not the C++ Standard Library header +naming conventions. + +[note + [*cannot synthesize or create +a `typedef` if the underlying type is not provided by the compiler]. +For example, if a compiler does not have an underlying floating-point +type with 128 bits (highly sought-after in scientific and numeric programming), +then `float128_t` and its corresponding least and fast types are not +provided by `.] + +[warning +As an implementation artifact, certain C macro names from `` +may possibly be visible to users of ``. +Don't rely on using these macros; they are not part of any Boost-specified interface. +Use `std::numeric_limits<>` for floating-point ranges, etc. instead.] + +[endsect] [/section:rationale Rationale] + +[section:exact_typdefs Exact-Width Floating-Point `typedef`s] + +The `typedef float#_t`, with # replaced by the width, designates a +floating-point type of exactly # bits. For example `float32_t` denotes +a single-precision floating-point type with with approximately +7 decimal digits of precision (equivalent to binary16 in __IEEE754). + +Floating-point types in C and C++ are specified to be allowed to have +(optionally) implementation-specific widths and formats. +However, if a platform supports underlying +floating-point types (conformant with __IEEE754) with widths of +16, 32, 64, 128 bits, or any combination thereof, +then `` does provide the corresponding `typedef`s +`float16_t, float32_t, float64_t, float128_t,` +their corresponding least and fast types, +and the corresponding maximum-width type + +The absence of `float128_t` is indicated by the macro `BOOST_NO_FLOAT128_T`. + +[endsect] [/section:exact_typdefs Exact-Width Floating-Point `typedef`s] + + +[section:fastest_typdefs Fastest minimum-width floating-point `typedef`s] + +The `typedef float_least#_t`, with # replaced by the width, designates a +floating-point type with a [*width of at least # bits], such that no +floating-point type with lesser size has at least the specified width. +Thus, `float_least32_t` denotes the smallest floating-point type with +a width of at least 32 bits. + +Minimum-width floating-point types are provided for all existing +exact-width floating-point types on a given platform. + +For example, if a platfrom supports `float32_t` and `float64_t`, +then `float_least32_t` and `float_least64_t` will also be supported, etc. + +[endsect] [/section:fastest_typdefs Fastest minimum-width floating-point `typedef`s] + +[section:fastest_typdefs Fastest minimum-width floating-point `typedef`s] + +The typedef `float_fast#_t`, with # replaced by the width, designates +the [*fastest] floating-point type with a width of at least # bits. + +There is no absolute guarantee that these types are the fastest for all purposes. +In any case, however, they satisfy the precision and width requirements. + +Fastest minimum-width floating-point types are provided for all existing +exact-width floating-point types on a given platform. + +For example, if a platform supports `float32_t` and `float64_t`, +then `float_fast32_t` and `float_fast64_t` will also be supported, etc. + +[endsect] [/section:fastest_typdefs Fastest minimum-width floating-point `typedef`s] + +[section:greatest_typdefs Greatest-width floating-point typedef] + +The `typedef floatmax_t` designates a floating-point type capable of representing +any value of any floating-point type in a given platform. + +The greatest-width typedef is provided for all platforms. + +[endsect] [/section:greatest_typdefs Greatest-width floating-point typedef] + +[section:macros Floating-Point Constant Macros] + +All macros of the type `BOOST_FLOAT16_C, BOOST_FLOAT32_C, BOOST_FLOAT64_C, +BOOST_FLOAT128_C, BOOST_FLOATMAX_C` are always defined after inclusion of +``. These allow floating-point constants of at +least the specified width to be declared. + +For example: + + #include + + // Declare Pythagoras' constant with approximately 7 decimal digits of precision. + static const boost::float32_t pi = BOOST_FLOAT32_C(3.1415926536); + + // Declare the Euler-gamma constant with approximately 34 decimal digits of precision. + static const boost::float128_t euler = BOOST_FLOAT128_C(0.57721566490153286060651209008240243104216); + +[endsect] [/section:macros Floating-Point Constant Macros] + + +[/ cstdfloat.qbk + Copyright 2014 Christopher Kormanyos, John Maddock and Paul A. Bristow. + 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). +] + + + + From 036945c71f99a6c1d124c5f6bcdbef7e1e8016c4 Mon Sep 17 00:00:00 2001 From: Nikhar Agrawal Date: Sun, 19 Jan 2014 15:21:34 +0530 Subject: [PATCH 22/69] Added work done on polygamma function during GSoC --- .../special_functions/detail/polygamma.hpp | 405 ++++++++++++++++++ .../math/special_functions/polygamma.hpp | 78 ++++ 2 files changed, 483 insertions(+) create mode 100644 include/boost/math/special_functions/detail/polygamma.hpp create mode 100644 include/boost/math/special_functions/polygamma.hpp diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp new file mode 100644 index 000000000..fc3d15298 --- /dev/null +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -0,0 +1,405 @@ + +/////////////////////////////////////////////////////////////////////////////// +// Copyright 2013 Nikhar Agrawal +// Copyright 2013 Christopher Kormanyos +// Copyright 2013 John Maddock +// Copyright 2013 Paul Bristow +// 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) + +#ifndef _BOOST_POLYGAMMA_DETAIL_2013_07_30_HPP_ + #define _BOOST_POLYGAMMA_DETAIL_2013_07_30_HPP_ + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + namespace boost { namespace math { namespace detail { + + template + struct max_iteration + { + //TODO Derive a suitable formula based on the precision of T + static const int value=2500; + }; + + template + bool factorial_overflow(const int n) + { + // Use Stirling's approximation to check if n! would overflow when data type is T. + static const long int max_precision = std::numeric_limits::max_exponent10; + + T nn = T(n); + T log_n = log(nn); + T n_log_n = n * log_n; + T n_log_n_minus_n = n_log_n - n; + T base_10 = n_log_n_minus_n/log(10); + long int base_10_ceil = boost::math::ltrunc(base_10) + 1; + + // Since nlogn - n < log(n!) by a small margin, we add 10 as safety measure. + return (((base_10_ceil + 10) > max_precision )? 1 : 0); + } + + template + int possible_factorial_overflow_index() + { + // we use binary search to determine a good approximation for an index that might overflow + + int upper_limit = max_iteration::value; + int lower_limit = 8; + + if(factorial_overflow(upper_limit) == 0) + { + return upper_limit; + } + + while(upper_limit > (lower_limit + 4)) + { + const int mid = (upper_limit + lower_limit) / 2; + + if(factorial_overflow(mid) == 0) + { + lower_limit = mid; + } + else + { + upper_limit = mid; + } + } + + return lower_limit; + } + + template + T digamma_atinfinityplus(const int, const T &x, const Policy&) + { + BOOST_MATH_STD_USING + + // calculate a high bernoulli number upfront to make use of cache + unsigned int bernoulli_index = 100; + boost::math::bernoulli_b2n(bernoulli_index); + + T z(x); + T log_z(log(z)); + T one_over_2z= T(1) / (2 * z); + T sum(0); + + for(int two_k = 2; two_k < max_iteration::value; two_k += 2) + { + if(two_k/2 > static_cast(bernoulli_index)) + { + try + { + int temp = static_cast(bernoulli_index * 1.5F); + boost::math::bernoulli_b2n(temp); + bernoulli_index = temp; + } + catch(...) + { + break; + } + } + + T term(1); + T one_over_two_k = T(1) / two_k; + T z_pow_two_k = pow(z, static_cast(two_k)); + T one_over_z_pow_two_k = T(1) / z_pow_two_k; + T bernoulli_term = boost::math::bernoulli_b2n(two_k / 2); + + term = (bernoulli_term * one_over_two_k) * one_over_z_pow_two_k; + + if(term == 0) + { + continue; + } + + sum += term; + + T term_base_10_exp = ((term < 0) ? -term : term); + T sum_base_10_exp = ((sum < 0) ? -sum : sum); + + int exponent_value; + + static_cast(frexp(term_base_10_exp, &exponent_value)); + term_base_10_exp = T(exponent_value) * 0.303F; + + static_cast(frexp(sum_base_10_exp, &exponent_value)); + sum_base_10_exp = T(exponent_value) * 0.303F; + + long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); + long int tol = std::numeric_limits::digits10; + + + if((two_k > 24) && (order_check < -tol)) + { + break; + } + } + + return (log_z - one_over_2z) - sum; + } + + template + T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol) // for large values of x such as for x> 400 + { + BOOST_MATH_STD_USING + + if(n == 0) + { + return digamma_atinfinityplus(n, x, pol); + } + + //TODO try calculating for bernoulli_index= max_iteration, if error then set bernoulli_index=100 + unsigned int bernoulli_index = 100; + boost::math::bernoulli_b2n(bernoulli_index); + + const bool b_negate = ((n % 2) == 0); + + const T n_minus_one_fact = boost::math::factorial(n - 1); + const T nn = T(n); + const T n_fact = n_minus_one_fact * nn; + const T one_over_z = T(1) / x; + const T one_over_z2 = one_over_z * one_over_z; + const T one_over_z_pow_n = T(1) / pow(x, n); + T one_over_x_pow_two_k_plus_n = one_over_z_pow_n * one_over_z2; + T two_k_plus_n_minus_one = nn + T(1); + T two_k_plus_n_minus_one_fact = n_fact * (n + 1); //(n+3)! ? + T one_over_two_k_fact = T(1) / 2; + T sum = ( (boost::math::bernoulli_b2n(1) * two_k_plus_n_minus_one_fact) + * (one_over_two_k_fact * one_over_x_pow_two_k_plus_n)); + + // Perform the Bernoulli series expansion. + for(int two_k = 4; two_k < max_iteration::value; two_k += 2) + { + if((two_k / 2) > static_cast(bernoulli_index)) + { + try + { + //TODO the multiplication factor should depend upon T, small precision, smaller multiplication factor + int temp = static_cast(bernoulli_index * 2.0F); + boost::math::bernoulli_b2n(temp); + bernoulli_index = temp; + } + catch(...) + { + break; + } + } + + one_over_x_pow_two_k_plus_n *= one_over_z2; + two_k_plus_n_minus_one_fact *= ++two_k_plus_n_minus_one; + two_k_plus_n_minus_one_fact *= ++two_k_plus_n_minus_one; + one_over_two_k_fact /= static_cast(two_k * static_cast(two_k - static_cast(1))); + + const T term = ( (boost::math::bernoulli_b2n(two_k/2) * two_k_plus_n_minus_one_fact) + * (one_over_two_k_fact * one_over_x_pow_two_k_plus_n)); + + if(term == 0) + { + continue; + } + + sum += term; + + T term_base_10_exp = ((term < 0) ? -term : term); + T sum_base_10_exp = ((sum < 0) ? -sum : sum); + + int exponent_value; + + static_cast(frexp(term_base_10_exp, &exponent_value)); + term_base_10_exp = T(exponent_value) * 0.303F; + + static_cast(frexp(sum_base_10_exp, &exponent_value)); + sum_base_10_exp = T(exponent_value) * 0.303F; + + long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); + long int tol = std::numeric_limits::digits10; + + if((two_k > 24) && (order_check < -tol)) + { + break; + } + } + + sum += ((((n_minus_one_fact * (nn + (x * static_cast(2)))) * one_over_z_pow_n) * one_over_z) / 2); + + return ((!b_negate) ? sum : -sum); + } + + template + T polygamma_attransitionplus(const int n, const T& x, const Policy&) + { + // this doesn't work for digamma either + + // Use Euler-Maclaurin summation. + + // Use N = (0.4 * digits) + (4 * n) + BOOST_MATH_STD_USING + const int d4d = static_cast(0.4F * std::numeric_limits::digits10); + const int N4dn = static_cast(d4d + (4 * n)); + const int N = static_cast((std::min)(N4dn, (std::numeric_limits::max)())); + const int m = n; + + const int minus_m_minus_one = -m - 1; + + T z(x); + T sum0(0); + T z_plus_k_pow_minus_m_minus_one(0); + + for(int k = 1; k <= N; ++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; + } + + const T one_over_z_plus_N_pow_minus_m = pow(z, -m); + const T one_over_z_plus_N_pow_minus_m_minus_one = one_over_z_plus_N_pow_minus_m / z; + + const T term0 = one_over_z_plus_N_pow_minus_m_minus_one / 2; + const T term1 = one_over_z_plus_N_pow_minus_m / m; + + T sum1 = T(0); + T one_over_two_k_fact = T(1) / 2; + int mk = m + 1; + T am = T(mk); + const T one_over_z_plus_N_squared = T(1) / (z * z); + T one_over_z_plus_N_pow_minus_m_minus_two_k = one_over_z_plus_N_pow_minus_m * one_over_z_plus_N_squared; + + for(int k = 1; k < max_iteration::value; ++k) + { + const int two_k = 2 * k; // k << 1 + + const T term = ((boost::math::bernoulli_b2n(two_k / 2) * am) * one_over_two_k_fact) * one_over_z_plus_N_pow_minus_m_minus_two_k; + + T term_base_10_exp = ((term < 0) ? -term : term); + T sum_base_10_exp = ((sum1 < 0) ? -sum1 : sum1); + + int exponent_value; + + static_cast(frexp(term_base_10_exp, &exponent_value)); + term_base_10_exp = T(exponent_value) * 0.303F; + + static_cast(frexp(sum_base_10_exp, &exponent_value)); + sum_base_10_exp = T(exponent_value) * 0.303F; + + long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); + long int tol = std::numeric_limits::digits10; + + if((two_k > 24) && (order_check < -tol)) + { + break; + } + + sum1 += term; + + one_over_two_k_fact /= (two_k + 1); + one_over_two_k_fact /= (two_k + 2); + + ++mk; + am *= mk; + ++mk; + am *= mk; + + one_over_z_plus_N_pow_minus_m_minus_two_k *= one_over_z_plus_N_squared; + } + + const T pg = (((sum0 + term0) + term1) + sum1) * factorial(m); + + const bool b_negate = ((m % 2) == 0); + + return ((!b_negate) ? pg : -pg); + } + + template + T polygamma_nearzero(const int n, const T& x, const Policy&) + { + BOOST_MATH_STD_USING + // not defined for digamma + + // Use a series expansion for x near zero which uses poly_gamma(m, 1) which, + // in turn, uses the Riemann zeta function for integer arguments. + // http://functions.wolfram.com/GammaBetaErf/PolyGamma2/06/01/03/01/02/ + const bool b_negate = (( n % 2 ) == 0 ) ; + + const T n_fact = boost::math::factorial(n); + const T z_pow_n_plus_one = pow(x, static_cast(n + 1)); + const T n_fact_over_pow_term = n_fact / z_pow_n_plus_one; + const T term0 = !b_negate ? n_fact_over_pow_term : -n_fact_over_pow_term; + + T one_over_k_fact = T(1); + T z_pow_k = T(1); + T k_plus_n_fact = boost::math::factorial(n); + T k_plus_n_plus_one = T(n + 1); + const T pg_kn = k_plus_n_fact * boost::math::zeta(k_plus_n_plus_one); + bool b_neg_term = ((n % 2) == 0); + T sum = ((!b_neg_term) ? pg_kn : -pg_kn); + + for(int k = 1; k < max_iteration::value; k++) + { + k_plus_n_fact *= k_plus_n_plus_one++; + one_over_k_fact /= k; + z_pow_k *= x; + + const T pg = k_plus_n_fact * boost::math::zeta(k_plus_n_plus_one); + + const T term = (pg * z_pow_k) * one_over_k_fact; + + T term_base_10_exp = ((term < 0) ? -term : term); + T sum_base_10_exp = ((sum < 0) ? -sum : sum); + + int exponent_value; + + static_cast(frexp(term_base_10_exp, &exponent_value)); + term_base_10_exp = T(exponent_value) * 0.303F; + + static_cast(frexp(sum_base_10_exp, &exponent_value)); + sum_base_10_exp = T(exponent_value) * 0.303F; + + long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); + long int tol = std::numeric_limits::digits10; + + if((k > 12) && (order_check < -tol)) + { + break; + } + + b_neg_term = !b_neg_term; + + ((!b_neg_term) ? sum += term : sum -= term); + } + + return term0 + sum; + + } + + template + inline T polygamma_imp(const int n, T x, const Policy &pol) + { + if(x < 0.5F) + { + return polygamma_nearzero(n, x, pol); + } + else if (x > 400.0F) + { + return polygamma_atinfinityplus(n, x, pol); //just a test return value + } + else + { + return polygamma_attransitionplus(n, x, pol); + } + } + +} } } // namespace boost::math::detail + +#endif // _BOOST_POLYGAMMA_DETAIL_2013_07_30_HPP_ + diff --git a/include/boost/math/special_functions/polygamma.hpp b/include/boost/math/special_functions/polygamma.hpp new file mode 100644 index 000000000..b96716721 --- /dev/null +++ b/include/boost/math/special_functions/polygamma.hpp @@ -0,0 +1,78 @@ + +/////////////////////////////////////////////////////////////////////////////// +// Copyright 2013 Nikhar Agrawal +// Copyright 2013 Christopher Kormanyos +// Copyright 2013 John Maddock +// Copyright 2013 Paul Bristow +// 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) + +#ifndef _BOOST_POLYGAMMA_2013_07_30_HPP_ + #define _BOOST_POLYGAMMA_2013_07_30_HPP_ + + #include + #include + #include + #include "detail/polygamma.hpp" + + namespace boost { namespace math { + + template + struct promoteftod + { + typedef T type; + }; + + template<> + struct promoteftod + { + typedef double type; + }; + + template + inline T polygamma(const int n, T x, const Policy &pol) + { + typedef typename promoteftod::type result_type; +// std::cout<<"~:"< + inline T polygamma(const int n, T x) + { + return boost::math::polygamma(n,x,policies::policy<>()); + } + + template + inline T digamma(T x, const Policy &pol) + { + return boost::math::polygamma(0,x,pol); + } + + template + inline T digamma(T x) + { + return boost::math::digamma(x,policies::policy<>()); + } + + template + inline T trigamma(T x, const Policy &pol) + { + return boost::math::polygamma(1,x,pol); + } + + template + inline T trigamma(T x) + { + return boost::math::trigamma(x,policies::policy<>()); + } + + +} } // namespace boost::math + +#endif // _BOOST_BERNOULLI_2013_05_30_HPP_ + From 5fc976c306b9658b7a2e8fcfe73f2dd8773763b3 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sun, 19 Jan 2014 11:22:40 +0100 Subject: [PATCH 23/69] Move header to mainstream Boost. --- include/{boost/math/tools => }/cstdfloat.hpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename include/{boost/math/tools => }/cstdfloat.hpp (100%) diff --git a/include/boost/math/tools/cstdfloat.hpp b/include/cstdfloat.hpp similarity index 100% rename from include/boost/math/tools/cstdfloat.hpp rename to include/cstdfloat.hpp From b02d5473e8a040efda579a87681fedb78cfca8db Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sun, 19 Jan 2014 11:23:22 +0100 Subject: [PATCH 24/69] Correct a few typos in doc for . --- tools/doc/cstdfloat.qbk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/doc/cstdfloat.qbk b/tools/doc/cstdfloat.qbk index bced199ff..5d9b2fd78 100644 --- a/tools/doc/cstdfloat.qbk +++ b/tools/doc/cstdfloat.qbk @@ -106,7 +106,7 @@ with approximately 15 decimal digits of precision. boost::float64_t jahnke_emden_lambda(boost::float64_t v, boost::float64_t x) { const boost::float64_t gamma_v_plus_one = boost::math::tgamma(v + 1); - const boost::float64_t x_half_pow_v = std::pow(x /2, v); + const boost::float64_t x_half_pow_v = std::pow(x / 2, v); return gamma_v_plus_one * boost::math::cyl_bessel_j(x, v) / x_half_pow_v; } @@ -158,14 +158,14 @@ Use `std::numeric_limits<>` for floating-point ranges, etc. instead.] The `typedef float#_t`, with # replaced by the width, designates a floating-point type of exactly # bits. For example `float32_t` denotes -a single-precision floating-point type with with approximately -7 decimal digits of precision (equivalent to binary16 in __IEEE754). +a single-precision floating-point type with approximately +7 decimal digits of precision (equivalent to binary32 in __IEEE754). -Floating-point types in C and C++ are specified to be allowed to have -(optionally) implementation-specific widths and formats. -However, if a platform supports underlying -floating-point types (conformant with __IEEE754) with widths of -16, 32, 64, 128 bits, or any combination thereof, +Floating-point types specified in C and C++ are allowed to have +implementation-specific widths and formats. +However, if a platform supports underlying floating-point types +(conformant with __IEEE754) with widths of 16, 32, 64, 128 bits, +or any combination thereof, then `` does provide the corresponding `typedef`s `float16_t, float32_t, float64_t, float128_t,` their corresponding least and fast types, From fcbd3d6e25886a44ce294b3dff13edc230cb9a75 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sun, 19 Jan 2014 12:45:53 +0100 Subject: [PATCH 25/69] Move to the proper directory. --- include/{ => boost}/cstdfloat.hpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename include/{ => boost}/cstdfloat.hpp (100%) diff --git a/include/cstdfloat.hpp b/include/boost/cstdfloat.hpp similarity index 100% rename from include/cstdfloat.hpp rename to include/boost/cstdfloat.hpp From 82824159ed41d6a70757af33ee6b9cc8f9888434 Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Sun, 19 Jan 2014 21:24:55 +0100 Subject: [PATCH 26/69] Clean up cbrt_epsilon and . --- include/boost/cstdfloat.hpp | 8 +- include/boost/math/tools/cstdfloat.hpp.txt | 170 --------------------- include/boost/math/tools/precision.hpp | 5 +- 3 files changed, 8 insertions(+), 175 deletions(-) delete mode 100644 include/boost/math/tools/cstdfloat.hpp.txt diff --git a/include/boost/cstdfloat.hpp b/include/boost/cstdfloat.hpp index 0599add59..dc58965df 100644 --- a/include/boost/cstdfloat.hpp +++ b/include/boost/cstdfloat.hpp @@ -197,8 +197,9 @@ #endif #endif - // Check if __float128 from GCC's libquadmath or ICC's /Qlong-double - // flag is supported. + // Check if __float128 from GCC's libquadmath or if (potentially) + // ICC's /Qlong-double flag is supported. + // TODO: Should we allow BOOST_MATH_USE_FLOAT128 for ICC? // Here, we use the BOOST_MATH_USE_FLOAT128 pre-processor // definition from . #if(BOOST_CSTDFLOAT_HAS_FLOAT128_NATIVE_TYPE == 0) && defined(BOOST_MATH_USE_FLOAT128) @@ -353,10 +354,13 @@ typedef float128_t float_fast128_t; typedef float128_t float_least128_t; + // TODO: Is it sensible (in any way) to supply a specialization of numeric_limits for GCC's __float128? + #if !defined(BOOST_MATH_USE_FLOAT128) BOOST_STATIC_ASSERT(std::numeric_limits::is_iec559 == true); BOOST_STATIC_ASSERT(std::numeric_limits::radix == 2); BOOST_STATIC_ASSERT(std::numeric_limits::digits == 113); BOOST_STATIC_ASSERT(std::numeric_limits::max_exponent == 16384); + #endif #endif #if (BOOST_CSTDFLOAT_MAXIMUM_AVAILABLE_WIDTH == 16) diff --git a/include/boost/math/tools/cstdfloat.hpp.txt b/include/boost/math/tools/cstdfloat.hpp.txt deleted file mode 100644 index afb86658b..000000000 --- a/include/boost/math/tools/cstdfloat.hpp.txt +++ /dev/null @@ -1,170 +0,0 @@ -Standardized Floating-Point Typedef's - -Overview - -The header provides standardized -floating-point typedef's having specified widths. -These are useful for writing portable code because they -should behave identically on all platforms. -All typedef's are in namespace boost. - -The typedef's include float16_t, float32_t, float64_t, float128_t, -their corresponding least and fast types, -and the corresponding maximum-width type. -The typedef's are based on underlying built-in types -such as float, double, or long double, or based on other compiler-specific -non-standardized types such as __float128. -The underlying types of these typedef's must conform with -the corresponding specifications of binary16, binary32, binary64, -and binary128 in IEEE-754 floating-point format -[http://en.wikipedia.org/wiki/IEEE_floating_point]. - -The typedef's are based on N3626 -[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf] -proposed for a new C++14 standard header and N1703 -[http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1703.pdf] -proposed for a new C language standard header . - -The 128-bit floating-point type, of great interest in scientific and -numeric programming, is not required in the boost header, -and may not be supplied for all platforms/compilers, because compiler -support for a 128-bit floating-point type is not mandated by either -the C standard or C++ standard. - -The following code uses in combination with - to compute a simplified -version of the Jahnke-Emden-Lambda function. Here, we use -a floating-point type with exactly 64 bits (i.e., float64_t). -If we were to use, for instance, built-in double, -then there would be no guarantee that the code would -behave identically on all platforms, with float64_t from -, however, there is. Here, we know that -this code is portable and uses a floating-point type -with approximately 15 decimal digits of precision. - -#include -#include -#include - -boost::float64_t jahnke_emden_lambda(boost::float64_t v, boost::float64_t x) -{ - const boost::float64_t gamma_v_plus_one = boost::math::tgamma(v + 1); - const boost::float64_t x_half_pow_v = std::pow(x /2, v); - - return gamma_v_plus_one * boost::math::cyl_bessel_j(x, v) / x_half_pow_v; -} - -See cstdfloat_test.cpp for a more detailed test program. - - -Rationale - -The implementation of is designed to utilize , -defined in the 1989 C standard. The preprocessor is used to query certain -preprocessor definitions in such as FLT_MAX, DBL_MAX, etc. -Based on the results of these queries, an attempt is made to automatically -detect the presence of built-in floating-point types having specified widths. -An unequivocal test regarding conformance with IEEE-754 based on -std::numeric_limits<> is performed with BOOST_STATIC_ASSERT. - -The header makes the standardized floating-point -typedef's safely available in namespace boost without placing any names -in namespace std. The intention is to complement rather than compete -with a potential future C++ Standard Library that may contain these typedef's. -Should some future C++ standard include and , -then will continue to function, but will become redundant -and may be safely deprecated. - -Because is a boost header, its name conform to the -boost header naming conventions, not the C++ Standard Library header -naming conventions. - -Please note that can not synthesize or create -a typedef if the underlying type is not provided by the compiler. -For example, if a compiler does not have an underlying floating-point -type with 128 bits (highly sought-after in scientific and numeric programming), -then float128_t and ist corresponding least and fast types are not -provided by . - - -Caveat Emptor - -As an implementation artifact, certain C macro names from -may possibly be visible to users of . -Don't rely on using these macros; they are not part of any Boost-specified interface. -Use std::numeric_limits<> for floating-point ranges, etc. instead. - - -Exact-Width Floating-Point Typedef's - -The typedef float#_t, with # replaced by the width, designates a -floating-point type of exactly # bits; for example float32_t denotes -a single-precision floating-point type with 24 binary mantissa digits -(including one xxx bit) and 8 binary exponent digits with approximately -7 decimal digits of precision. - -Floating-point types are specified with (optionally) implementation-specific -widths and formats. However, if a platform supports underlying -floating-point types (conformant with IEEE-754) with widths of -16, 32, 64, 128 bits, or any combination thereof, -then does provide the corresponding typedef's -float16_t, float32_t, float64_t, float128_t, -their corresponding least and fast types, -and the corresponding maximum-width type - -The absence of float128_t is indicated by the macro BOOST_NO_FLOAT128_T. - -Fastest minimum-width floating-point typedef's - -The typedef float_least#_t, with # replaced by the width, designates a -floating-point type with a width of at least # bits, such that no -floating-point type with lesser size has at least the specified width. -Thus, float_least32_t denotes the smallest floating-point type with -a width of at least 32 bits. - -Minimum-width floating-point types are provided for all existing -exact-width floating-point types on a given platform. - -For example, is a platfrom supports float32_t and float64_t, -then float_least32_t and float_least64_t will also be supported, etc. - - -Fastest minimum-width floating-point typedef's - -The typedef float_fast#_t, with # replaced by the width, designates -the fastest floating-point type with a width of at least # bits. - -There is no guarantee that these types are fastest for all purposes. -In any case, however, they satisfy the precision and width requirements. - -Fastest minimum-width floating-point types are provided for all existing -exact-width floating-point types on a given platform. - -For example, is a platfrom supports float32_t and float64_t, -then float_fast32_t and float_fast64_t will also be supported, etc. - -Greatest-width floating-point typedef - -The typedef floatmax_t designates a floating-point type capable of representing -any value of any floating-point type. - -The greatest-width typedef is provided for all platforms. - -Floating-Point Constant Macros - -All macros of the type BOOST_FLOAT16_C, BOOST_FLOAT32_C, BOOST_FLOAT64_C, -BOOST_FLOAT128_C, BOOST_FLOATMAX_C are always defined after inclusion of -. These allow floating-point constants of at -least the specified width to be declared. - -For example: - -#include - -// Here Pythagoras' constant with approximately 7 decimal digits -// of precision is created with the correct suffix applied: -static const boost::float32_t pi = BOOST_FLOAT32_C3.1415926536); - -// Here the Euler-gamma constant with approximately 34 decimal digits -// of precision is created with the correct suffix applied: -static const boost::float128_t euler = BOOST_FLOAT128_C(0.57721566490153286060651209008240243104216); diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index e3ab5aa4e..bf60db12d 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -17,7 +17,6 @@ #include #include #include -#include // These two are for LDBL_MAN_DIG: #include @@ -307,8 +306,8 @@ inline T cbrt_epsilon_imp(const T*, const mpl::int_<113>&) template inline T cbrt_epsilon_imp(const T*, const Tag&) { - using boost::math::cbrt; - static const T cbrt_eps = cbrt(tools::epsilon()); + BOOST_MATH_STD_USING; + static const T cbrt_eps = pow(tools::epsilon(), T(1) / 3); return cbrt_eps; } From 0209dced1dfb794bddda641b24f417c4e8c3fbb5 Mon Sep 17 00:00:00 2001 From: Nikhar Agrawal Date: Fri, 7 Feb 2014 03:04:55 +0530 Subject: [PATCH 27/69] Removed unnecessary upfront bernoulli number calculation now that they can be cached --- .../special_functions/detail/polygamma.hpp | 38 +------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index fc3d15298..acfe77b5e 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -84,10 +84,6 @@ { BOOST_MATH_STD_USING - // calculate a high bernoulli number upfront to make use of cache - unsigned int bernoulli_index = 100; - boost::math::bernoulli_b2n(bernoulli_index); - T z(x); T log_z(log(z)); T one_over_2z= T(1) / (2 * z); @@ -95,19 +91,7 @@ for(int two_k = 2; two_k < max_iteration::value; two_k += 2) { - if(two_k/2 > static_cast(bernoulli_index)) - { - try - { - int temp = static_cast(bernoulli_index * 1.5F); - boost::math::bernoulli_b2n(temp); - bernoulli_index = temp; - } - catch(...) - { - break; - } - } + T term(1); T one_over_two_k = T(1) / two_k; @@ -156,11 +140,7 @@ if(n == 0) { return digamma_atinfinityplus(n, x, pol); - } - - //TODO try calculating for bernoulli_index= max_iteration, if error then set bernoulli_index=100 - unsigned int bernoulli_index = 100; - boost::math::bernoulli_b2n(bernoulli_index); + } const bool b_negate = ((n % 2) == 0); @@ -180,20 +160,6 @@ // Perform the Bernoulli series expansion. for(int two_k = 4; two_k < max_iteration::value; two_k += 2) { - if((two_k / 2) > static_cast(bernoulli_index)) - { - try - { - //TODO the multiplication factor should depend upon T, small precision, smaller multiplication factor - int temp = static_cast(bernoulli_index * 2.0F); - boost::math::bernoulli_b2n(temp); - bernoulli_index = temp; - } - catch(...) - { - break; - } - } one_over_x_pow_two_k_plus_n *= one_over_z2; two_k_plus_n_minus_one_fact *= ++two_k_plus_n_minus_one; From 5f89e70efd2945897b3e73be9ce6eefaf51d26cd Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 21 Oct 2014 13:12:26 +0100 Subject: [PATCH 28/69] [Polygamma] Add test cases. Rewrite polygamma_atinfinityplus to avoid spurious underflow/overflow. Rewrite polygamma_attransitionplus to call polygamma_atinfinityplus rather than have it's own routine. Change condition which selects when polygamma_atinfinityplus can be called. --- .../special_functions/detail/polygamma.hpp | 260 ++++++------------ test/test_polygamma.cpp | 52 ++++ test/test_polygamma.hpp | 137 +++++++++ 3 files changed, 276 insertions(+), 173 deletions(-) create mode 100644 test/test_polygamma.cpp create mode 100644 test/test_polygamma.hpp diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index acfe77b5e..e86855c36 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -23,61 +23,7 @@ #include #include - namespace boost { namespace math { namespace detail { - - template - struct max_iteration - { - //TODO Derive a suitable formula based on the precision of T - static const int value=2500; - }; - - template - bool factorial_overflow(const int n) - { - // Use Stirling's approximation to check if n! would overflow when data type is T. - static const long int max_precision = std::numeric_limits::max_exponent10; - - T nn = T(n); - T log_n = log(nn); - T n_log_n = n * log_n; - T n_log_n_minus_n = n_log_n - n; - T base_10 = n_log_n_minus_n/log(10); - long int base_10_ceil = boost::math::ltrunc(base_10) + 1; - - // Since nlogn - n < log(n!) by a small margin, we add 10 as safety measure. - return (((base_10_ceil + 10) > max_precision )? 1 : 0); - } - - template - int possible_factorial_overflow_index() - { - // we use binary search to determine a good approximation for an index that might overflow - - int upper_limit = max_iteration::value; - int lower_limit = 8; - - if(factorial_overflow(upper_limit) == 0) - { - return upper_limit; - } - - while(upper_limit > (lower_limit + 4)) - { - const int mid = (upper_limit + lower_limit) / 2; - - if(factorial_overflow(mid) == 0) - { - lower_limit = mid; - } - else - { - upper_limit = mid; - } - } - - return lower_limit; - } + namespace boost { namespace math { template T digamma_atinfinityplus(const int, const T &x, const Policy&) @@ -135,85 +81,104 @@ template T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol) // for large values of x such as for x> 400 { + // See http://functions.wolfram.com/GammaBetaErf/PolyGamma2/06/02/0001/ BOOST_MATH_STD_USING - - if(n == 0) + // + // sum == current value of accumulated sum. + // term == value of current term to be added to sum. + // part_term == value of current term excluding the Bernoulli number part + // + T term, sum, part_term; + T x_squared = x * x; + // + // Start by setting part_term to: + // + // (n-1)! / x^(n+1) + // + // which is common to both the first term of the series (with k = 1) + // and to the leading part. + // We can then get to the leading term by: + // + // part_term * (n + 2 * x) / 2 + // + // and to the first term in the series + // (excluding the Bernoulli number) by: + // + // part_term n * (n + 1) / (2x) + // + // If either the factorial would overflow, + // or the power term underflows, this just gets set to 0 and then we + // know that we have to use logs for the initial terms: + // + part_term = ((n > boost::math::max_factorial::value) && (n * n > tools::log_max_value())) + ? 0 : boost::math::factorial(n - 1, pol) * pow(x, -n - 1); + if(part_term == 0) { - return digamma_atinfinityplus(n, x, pol); + // Either n is very large, or the power term underflows, + // set the initial values of part_term, term and sum via logs: + part_term = 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(n * (n + 1)) - boost::math::constants::ln_two() - log(x); + part_term = exp(part_term); } - - const bool b_negate = ((n % 2) == 0); - - const T n_minus_one_fact = boost::math::factorial(n - 1); - const T nn = T(n); - const T n_fact = n_minus_one_fact * nn; - const T one_over_z = T(1) / x; - const T one_over_z2 = one_over_z * one_over_z; - const T one_over_z_pow_n = T(1) / pow(x, n); - T one_over_x_pow_two_k_plus_n = one_over_z_pow_n * one_over_z2; - T two_k_plus_n_minus_one = nn + T(1); - T two_k_plus_n_minus_one_fact = n_fact * (n + 1); //(n+3)! ? - T one_over_two_k_fact = T(1) / 2; - T sum = ( (boost::math::bernoulli_b2n(1) * two_k_plus_n_minus_one_fact) - * (one_over_two_k_fact * one_over_x_pow_two_k_plus_n)); - - // Perform the Bernoulli series expansion. - for(int two_k = 4; two_k < max_iteration::value; two_k += 2) + else { + sum = part_term * (n + 2 * x) / 2; + part_term *= n * (n + 1) / 2; + part_term /= x; + } + // + // If the leading term is 0, so is the result: + // + if(sum == 0) + return sum; - one_over_x_pow_two_k_plus_n *= one_over_z2; - two_k_plus_n_minus_one_fact *= ++two_k_plus_n_minus_one; - two_k_plus_n_minus_one_fact *= ++two_k_plus_n_minus_one; - one_over_two_k_fact /= static_cast(two_k * static_cast(two_k - static_cast(1))); - - const T term = ( (boost::math::bernoulli_b2n(two_k/2) * two_k_plus_n_minus_one_fact) - * (one_over_two_k_fact * one_over_x_pow_two_k_plus_n)); - - if(term == 0) - { - continue; - } - + for(unsigned k = 1;;) + { + term = part_term * boost::math::bernoulli_b2n(k, pol); sum += term; - - T term_base_10_exp = ((term < 0) ? -term : term); - T sum_base_10_exp = ((sum < 0) ? -sum : sum); - - int exponent_value; - - static_cast(frexp(term_base_10_exp, &exponent_value)); - term_base_10_exp = T(exponent_value) * 0.303F; - - static_cast(frexp(sum_base_10_exp, &exponent_value)); - sum_base_10_exp = T(exponent_value) * 0.303F; - - long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); - long int tol = std::numeric_limits::digits10; - - if((two_k > 24) && (order_check < -tol)) + // + // Normal termination condition: + // + if(fabs(term / sum) < tools::epsilon()) + break; + // + // Increment our counter, and move part_term on to the next value: + // + ++k; + part_term *= (n + 2 * k - 2) * (n - 1 + 2 * k); + part_term /= (2 * k - 1) * 2 * k; + part_term /= x_squared; + // + // Emergency get out termination condition: + // + if(k > policies::get_max_series_iterations()) { - break; + policies::raise_evaluation_error( + "polygamma<%1%>(int, %1%)", + "Series did not converge, closest value was %1%", sum, pol); + break; } } + + if((n - 1) & 1) + sum = -sum; - sum += ((((n_minus_one_fact * (nn + (x * static_cast(2)))) * one_over_z_pow_n) * one_over_z) / 2); - - return ((!b_negate) ? sum : -sum); + return sum; } template - T polygamma_attransitionplus(const int n, const T& x, const Policy&) + T polygamma_attransitionplus(const int n, const T& x, const Policy& pol) { - // this doesn't work for digamma either + // See: http://functions.wolfram.com/GammaBetaErf/PolyGamma2/16/01/01/0017/ - // Use Euler-Maclaurin summation. - - // Use N = (0.4 * digits) + (4 * n) + // Use N = (0.4 * digits) + (4 * n) for target value for x: BOOST_MATH_STD_USING const int d4d = static_cast(0.4F * std::numeric_limits::digits10); const int N4dn = static_cast(d4d + (4 * n)); const int N = static_cast((std::min)(N4dn, (std::numeric_limits::max)())); const int m = n; + const int iter = N - itrunc(x); const int minus_m_minus_one = -m - 1; @@ -221,69 +186,18 @@ T sum0(0); T z_plus_k_pow_minus_m_minus_one(0); - for(int k = 1; k <= N; ++k) + // Forward recursion to larger x: + 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; } + sum0 *= boost::math::factorial(n); + if((n - 1) & 1) + sum0 = -sum0; - const T one_over_z_plus_N_pow_minus_m = pow(z, -m); - const T one_over_z_plus_N_pow_minus_m_minus_one = one_over_z_plus_N_pow_minus_m / z; - - const T term0 = one_over_z_plus_N_pow_minus_m_minus_one / 2; - const T term1 = one_over_z_plus_N_pow_minus_m / m; - - T sum1 = T(0); - T one_over_two_k_fact = T(1) / 2; - int mk = m + 1; - T am = T(mk); - const T one_over_z_plus_N_squared = T(1) / (z * z); - T one_over_z_plus_N_pow_minus_m_minus_two_k = one_over_z_plus_N_pow_minus_m * one_over_z_plus_N_squared; - - for(int k = 1; k < max_iteration::value; ++k) - { - const int two_k = 2 * k; // k << 1 - - const T term = ((boost::math::bernoulli_b2n(two_k / 2) * am) * one_over_two_k_fact) * one_over_z_plus_N_pow_minus_m_minus_two_k; - - T term_base_10_exp = ((term < 0) ? -term : term); - T sum_base_10_exp = ((sum1 < 0) ? -sum1 : sum1); - - int exponent_value; - - static_cast(frexp(term_base_10_exp, &exponent_value)); - term_base_10_exp = T(exponent_value) * 0.303F; - - static_cast(frexp(sum_base_10_exp, &exponent_value)); - sum_base_10_exp = T(exponent_value) * 0.303F; - - long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); - long int tol = std::numeric_limits::digits10; - - if((two_k > 24) && (order_check < -tol)) - { - break; - } - - sum1 += term; - - one_over_two_k_fact /= (two_k + 1); - one_over_two_k_fact /= (two_k + 2); - - ++mk; - am *= mk; - ++mk; - am *= mk; - - one_over_z_plus_N_pow_minus_m_minus_two_k *= one_over_z_plus_N_squared; - } - - const T pg = (((sum0 + term0) + term1) + sum1) * factorial(m); - - const bool b_negate = ((m % 2) == 0); - - return ((!b_negate) ? pg : -pg); + return sum0 + polygamma_atinfinityplus(n, z, pol); } template @@ -355,9 +269,9 @@ { return polygamma_nearzero(n, x, pol); } - else if (x > 400.0F) + else if(x > 0.4F * std::numeric_limits::digits10 + 4 * n) { - return polygamma_atinfinityplus(n, x, pol); //just a test return value + return polygamma_atinfinityplus(n, x, pol); } else { diff --git a/test/test_polygamma.cpp b/test/test_polygamma.cpp new file mode 100644 index 000000000..c42ca6df6 --- /dev/null +++ b/test/test_polygamma.cpp @@ -0,0 +1,52 @@ +// (C) Copyright John Maddock 2014. +// 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 "test_polygamma.hpp" + + +void expected_results() +{ + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + const char* largest_type; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + if(boost::math::policies::digits >() == boost::math::policies::digits >()) + { + largest_type = "(long\\s+)?double"; + } + else + { + largest_type = "long double"; + } +#else + largest_type = "(long\\s+)?double"; +#endif + + // + // Finish off by printing out the compiler/stdlib/platform names, + // we do this to make it easier to mark up expected error rates. + // + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; +} + +BOOST_AUTO_TEST_CASE( test_main ) +{ + expected_results(); + BOOST_MATH_CONTROL_FP; + + //test_polygamma(0.0F, "float"); + test_polygamma(0.0, "double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + test_polygamma(0.0L, "long double"); + //test_polygamma(boost::math::concepts::real_concept(0.1), "real_concept"); +#endif +} + + + diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp new file mode 100644 index 000000000..fe5433f3e --- /dev/null +++ b/test/test_polygamma.hpp @@ -0,0 +1,137 @@ +// Copyright John Maddock 20 +// Copyright Paul A. Bristow 2007, 2009 +// 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) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#include +#define BOOST_TEST_MAIN +#include +#include +#include +#include +#include +#include +#include +#include "functor.hpp" + +#include "handle_test_result.hpp" +#include "table_type.hpp" + +#ifndef SC_ +#define SC_(x) static_cast::type>(BOOST_JOIN(x, L)) +#endif + +template +void do_test_polygamma(const T& data, const char* type_name, const char* test_name) +{ + typedef Real value_type; + + typedef value_type(*pg)(int, value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::polygamma; +#else + pg funcp = boost::math::polygamma; +#endif + + boost::math::tools::test_result result; + + std::cout << "Testing " << test_name << " with type " << type_name + << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; + + // + // test polygamma against data: + // + result = boost::math::tools::test_hetero( + data, + bind_func_int1(funcp, 0, 1), + extract_result(2)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::polygamma", test_name); + std::cout << std::endl; +} + +template +void test_polygamma(T, const char* name) +{ + typedef typename table_type::type value_type; + + boost::array, 384> data = + { { + { 1, SC_(0.1250000), SC_(65.388133444988034473142999334395961) }, { 1, SC_(2.250000), SC_(0.55732915450711073927131911933522402) }, { 1, SC_(4.375000), SC_(0.25666408805722660683906428275458774) }, { 1, SC_(6.500000), SC_(0.16628453574995823763989666631218566) }, { 1, SC_(8.625000), SC_(0.12292237374423990274075995315923687) }, { 1, SC_(10.75000), SC_(0.097483848201852104395946001854344927) }, { 1, SC_(12.87500), SC_(0.080764208092843621858393487209278638) }, { 1, SC_(15.00000), SC_(0.068938227847683806226155216756371670) }, { 1, SC_(17.12500), SC_(0.060132263162293455894576107399989891) }, { 1, SC_(19.25000), SC_(0.053320703915617277211139745531295189) }, { 1, SC_(21.37500), SC_(0.047895038036916716105500109226810942) }, { 1, SC_(23.50000), SC_(0.043471416266946770249685779030294199) }, { 1, SC_(25.62500), SC_(0.039795743807625238080963836217545550) }, { 1, SC_(27.75000), SC_(0.036693131333593477569076090983653779) }, { 1, SC_(29.87500), SC_(0.034039266877179098641898178094001935) }, { 1, SC_(32.00000), SC_(0.031743366520302090126581680438741427) }, { 1, SC_(34.12500), SC_(0.029737585673522726661363528635488348) }, { 1, SC_(36.25000), SC_(0.027970204614894933106878169214392067) }, { 1, SC_(38.37500), SC_(0.026401106865951764123858232364900665) }, { 1, SC_(40.50000), SC_(0.024998698201356741322280011143883922) }, { 1, SC_(42.62500), SC_(0.023737757818075642720991864115881164) }, { 1, SC_(44.75000), SC_(0.022597908441287364284087900916682571) }, { 1, SC_(46.87500), SC_(0.021562506914486557632388530071308920) }, { 1, SC_(49.00000), SC_(0.020617826354560516060031453062401102) }, { 1, SC_(51.12500), SC_(0.019752444228552790805040230288386135) }, { 1, SC_(53.25000), SC_(0.018956778300513446216011889734099110) }, { 1, SC_(55.37500), SC_(0.018222730375562878627773770314126276) }, { 1, SC_(57.50000), SC_(0.017543409716574620734228673575882677) }, { 1, SC_(59.62500), SC_(0.016912916093398919581541485278641593) }, { 1, SC_(61.75000), SC_(0.016326167985389235938281994221076159) }, { 1, SC_(63.87500), SC_(0.015778765341125640054231784371915358) }, { 1, SC_(66.00000), SC_(0.015266879048806385777045778219279459) }, { 1, SC_(68.12500), SC_(0.014787161242916062152535888615850260) }, { 1, SC_(70.25000), SC_(0.014336672004276912093324664070489886) }, { 1, SC_(72.37500), SC_(0.013912819061256593888508241399678441) }, { 1, SC_(74.50000), SC_(0.013513307879079644573772830117155790) }, { 1, SC_(76.62500), SC_(0.013136100107643257539226305043251166) }, { 1, SC_(78.75000), SC_(0.012779378799112389298746113446648982) }, { 1, SC_(80.87500), SC_(0.012441519142554280549428650598112729) }, { 1, SC_(83.00000), SC_(0.012121063720980953787190412456820037) }, { 1, SC_(85.12500), SC_(0.011816701495952671887865236708275449) }, { 1, SC_(87.25000), SC_(0.011527249880640584213306489206202069) }, { 1, SC_(89.37500), SC_(0.011251639384481213426240562514542477) }, { 1, SC_(91.50000), SC_(0.010988900409103388104670465071922664) }, { 1, SC_(93.62500), SC_(0.010738151851930343087942933225290955) }, { 1, SC_(95.75000), SC_(0.010498591235178571927709342934117247) }, { 1, SC_(97.87500), SC_(0.010269486127251686167359605922136260) }, { 1, SC_(100.0000), SC_(0.010050166663333571395245668465701423) }, + { 2, SC_(0.1250000), -SC_(1025.7533381181356825956689300565174) }, { 2, SC_(2.250000), -SC_(0.30373993753692033333796717884398989) }, { 2, SC_(4.375000), -SC_(0.065528725397877855792664680804766330) }, { 2, SC_(6.500000), -SC_(0.027587910706876798794117450572831562) }, { 2, SC_(8.625000), -SC_(0.015091062676061564388822078971884395) }, { 2, SC_(10.75000), -SC_(0.0094956196449265900776488965631791775) }, { 2, SC_(12.87500), -SC_(0.0065193261909178260169885198194705291) }, { 2, SC_(15.00000), -SC_(0.0047506027165515547467791223768191188) }, { 2, SC_(17.12500), -SC_(0.0036148020016626802195565448384834283) }, { 2, SC_(19.25000), -SC_(0.0028424250740909855631736845850335535) }, { 2, SC_(21.37500), -SC_(0.0022934967923297751145806065882712900) }, { 2, SC_(23.50000), -SC_(0.0018894667868625909895476094900477678) }, { 2, SC_(25.62500), -SC_(0.0015834924252652953218803111387922996) }, { 2, SC_(27.75000), -SC_(0.0013462349527320363170378913859580860) }, { 2, SC_(29.87500), -SC_(0.0011585598948326545653381467670779893) }, { 2, SC_(32.00000), -SC_(0.0010075567602140907392185110593117265) }, { 2, SC_(34.12500), -SC_(0.00088425886906787461365402045268994574) }, { 2, SC_(36.25000), -SC_(0.00078228136778540401396894643668418462) }, { 2, SC_(38.37500), -SC_(0.00069697797537723210697105880606724159) }, { 2, SC_(40.50000), -SC_(0.00062490237932923289658683588812998732) }, { 2, SC_(42.62500), -SC_(0.00056345469641484389456121935536309197) }, { 2, SC_(44.75000), -SC_(0.00051064374134295093656385520125286421) }, { 2, SC_(46.87500), -SC_(0.00046492369550612086723038302919171885) }, { 2, SC_(49.00000), -SC_(0.00042507970884222510504308867471824948) }, { 2, SC_(51.12500), -SC_(0.00039014637079445100439645401142194535) }, { 2, SC_(53.25000), -SC_(0.00035934868438211062777790080207505881) }, { 2, SC_(55.37500), -SC_(0.00033205871518117505559928737076624192) }, { 2, SC_(57.50000), -SC_(0.00030776333242771756953580263456220628) }, { 2, SC_(59.62500), -SC_(0.00028603991345613245802207114123372414) }, { 2, SC_(61.75000), -SC_(0.00026653784162151616772904552992231739) }, { 2, SC_(63.87500), -SC_(0.00024896427102287300629668349085350311) }, { 2, SC_(66.00000), -SC_(0.00023307306946180321476975587412226332) }, { 2, SC_(68.12500), -SC_(0.00021865615382096049855997233359992101) }, { 2, SC_(70.25000), -SC_(0.00020553664405312492990454318541834320) }, { 2, SC_(72.37500), -SC_(0.00019356341228034103704385457246984425) }, { 2, SC_(74.50000), -SC_(0.00018260671130395075946075978013398780) }, { 2, SC_(76.62500), -SC_(0.00017255464497899193114313963889049197) }, { 2, SC_(78.75000), -SC_(0.00016331030013937037094502788633900241) }, { 2, SC_(80.87500), -SC_(0.00015478940207215993505449988937898640) }, { 2, SC_(83.00000), -SC_(0.00014691838710034332570083901051760808) }, { 2, SC_(85.12500), -SC_(0.00013963280957351165370765015817038278) }, { 2, SC_(87.25000), -SC_(0.00013287601856558888563037791437997733) }, { 2, SC_(89.37500), -SC_(0.00012659805332837531702241737466058293) }, { 2, SC_(91.50000), -SC_(0.00012075471712784846612240303590084686) }, { 2, SC_(93.62500), -SC_(0.00011530679728326736002584104318350829) }, { 2, SC_(95.75000), -SC_(0.00011021940561565095981861374083495299) }, { 2, SC_(97.87500), -SC_(0.00010546141852085692313553484671110170) }, { 2, SC_(100.0000), -SC_(0.00010100499983334999700083300446059382) }, + { 3, SC_(0.1250000), SC_(24580.143419063566218511004446647010) }, + { 3, SC_(2.250000), SC_(0.32454400918839602279124382903505677) }, + { 3, SC_(4.375000), SC_(0.033289201205556512286673394063908247) }, + { 3, SC_(6.500000), SC_(0.0091336635043781405048050655353658508) }, + { 3, SC_(8.625000), SC_(0.0037008460120616755687668778806054328) }, + { 3, SC_(10.75000), SC_(0.0018484328773891268475922730275004208) }, + { 3, SC_(12.87500), SC_(0.0010519186241203463873018930415985105) }, + { 3, SC_(15.00000), SC_(0.00065447977828273734841733708901750530) }, + { 3, SC_(17.12500), SC_(0.00043447135395979214393136263736764201) }, + { 3, SC_(19.25000), SC_(0.00030297696415718385912539504824566570) }, + { 3, SC_(21.37500), SC_(0.00021961042047214603636739002880115737) }, + { 3, SC_(23.50000), SC_(0.00016422394665239820056068884910278128) }, + { 3, SC_(25.62500), SC_(0.00012599930135391694524067581601102767) }, + { 3, SC_(27.75000), SC_(0.000098773010741268191080883613389009048) }, + { 3, SC_(29.87500), SC_(0.000078857844307768334137453508928722671) }, + { 3, SC_(32.00000), SC_(0.000063955754777976299576673673574642423) }, + { 3, SC_(34.12500), SC_(0.000052583702941352521813139097855885393) }, + { 3, SC_(36.25000), SC_(0.000043755438122384003302367816109980192) }, + { 3, SC_(38.37500), SC_(0.000036797707573246758497786056137200200) }, + { 3, SC_(40.50000), SC_(0.000031240239710655936422248716017582946) }, + { 3, SC_(42.62500), SC_(0.000026747791378195202271687207455056302) }, + { 3, SC_(44.75000), SC_(0.000023076997706632396178157160717335565) }, + { 3, SC_(46.87500), SC_(0.000020048287815935784161580614536631137) }, + { 3, SC_(49.00000), SC_(0.000017527197874026635143654793647828466) }, + { 3, SC_(51.12500), SC_(0.000015411686998050652806770684541876757) }, + { 3, SC_(53.25000), SC_(0.000013623370966529973793708331754693666) }, + { 3, SC_(55.37500), SC_(0.000012101363299593660023105041673385376) }, + { 3, SC_(57.50000), SC_(0.000010797882726896889062768134787291884) }, + { 3, SC_(59.62500), SC_(9.6750769605707758334815857396558355e-6) }, + { 3, SC_(61.75000), SC_(8.7026966259856900409582330070865268e-6) }, + { 3, SC_(63.87500), SC_(7.8563716857343030149244371160376495e-6) }, + { 3, SC_(66.00000), SC_(7.1163203299934132027680033779014197e-6) }, + { 3, SC_(68.12500), SC_(6.4663719906627627544882175944382226e-6) }, + { 3, SC_(70.25000), SC_(5.8932210515208497328937862935232496e-6) }, + { 3, SC_(72.37500), SC_(5.3858517367657111634358444590928906e-6) }, + { 3, SC_(74.50000), SC_(4.9350912436686398240670814427342376e-6) }, + { 3, SC_(76.62500), SC_(4.5332598242018110991734569100539592e-6) }, + { 3, SC_(78.75000), SC_(4.1738947808706992483423293125251133e-6) }, + { 3, SC_(80.87500), SC_(3.8515312659502461861484363442184908e-6) }, + { 3, SC_(83.00000), SC_(3.5615270636518630626786644585266764e-6) }, + { 3, SC_(85.12500), SC_(3.2999216708248315372665461067377996e-6) }, + { 3, SC_(87.25000), SC_(3.0633223042636924720337703682152499e-6) }, + { 3, SC_(89.37500), SC_(2.8488111819903247190925375784544775e-6) }, + { 3, SC_(91.50000), SC_(2.6538697141941088454844912572034392e-6) }, + { 3, SC_(93.62500), SC_(2.4763162120667457234467192228222670e-6) }, + { 3, SC_(95.75000), SC_(2.3142544621402797124759791203351867e-6) }, + { 3, SC_(97.87500), SC_(2.1660310796121506708372890790676070e-6) }, + { 3, SC_(100.0000), SC_(2.0301999900013330334332872946449855e-6) }, + + {4, SC_(0.1250000), SC_(-786445.98543106378579320120709638297)}, { 4, SC_(2.250000), SC_(-0.51106863793373355822715252195899576) }, { 4, SC_(4.375000), SC_(-0.025241882074562753654505456518792508) }, { 4, SC_(6.500000), SC_(-0.0045259302803220607103496010172883494) }, { 4, SC_(8.625000), SC_(-0.0013596929106556359886012273921730071) }, { 4, SC_(10.75000), SC_(-0.00053930828860547053427689740051604949) }, { 4, SC_(12.87500), SC_(-0.00025445997266103206171225355293726865) }, { 4, SC_(15.00000), SC_(-0.00013519619187519276575068431301221388) }, { 4, SC_(17.12500), SC_(-0.000078306716822025065793290599586946118) }, { 4, SC_(19.25000), SC_(-0.000048430513924395561509999792045098081) }, { 4, SC_(21.37500), SC_(-0.000031536705873201397805285969259914559) }, { 4, SC_(23.50000), SC_(-0.000021407049050977062373311093992814121) }, { 4, SC_(25.62500), SC_(-0.000015036764178343754461565939319516893) }, { 4, SC_(27.75000), SC_(-0.000010869219781124567432001391245344089) }, { 4, SC_(29.87500), SC_(-8.0504604926168752698902834477348881e-6) }, { 4, SC_(32.00000), SC_(-6.0889806370027137702207132674152980e-6) }, { 4, SC_(34.12500), SC_(-4.6901011823268163094417546531023856e-6) }, { 4, SC_(36.25000), SC_(-3.6708283086618325558290000911536581e-6) }, { 4, SC_(38.37500), SC_(-2.9139932244650290336213711603586301e-6) }, { 4, SC_(40.50000), SC_(-2.3425302303691304543510535971847968e-6) }, { 4, SC_(42.62500), SC_(-1.9045296486050512642801504306671373e-6) }, { 4, SC_(44.75000), SC_(-1.5642760453399369047824852836708697e-6) }, { 4, SC_(46.87500), SC_(-1.2967233822729326645555539185332769e-6) }, { 4, SC_(49.00000), SC_(-1.0840030171141394983603065427611252e-6) }, { 4, SC_(51.12500), SC_(-9.1316643010960703020517255319750485e-7) }, { 4, SC_(53.25000), SC_(-7.7469609700462921021995856208285815e-7) }, { 4, SC_(55.37500), SC_(-6.6150474476547305805911346012045165e-7) }, { 4, SC_(57.50000), SC_(-5.6825133351570053043820949353677183e-7) }, { 4, SC_(59.62500), SC_(-4.9086620236193161135912086142572580e-7) }, { 4, SC_(61.75000), SC_(-4.2621666772058776224801114961267801e-7) }, { 4, SC_(63.87500), SC_(-3.7186839586672891333608898041067112e-7) }, { 4, SC_(66.00000), SC_(-3.2591301914111222705427951896642626e-7) }, { 4, SC_(68.12500), SC_(-2.8684217920848561693233665614958777e-7) }, { 4, SC_(70.25000), SC_(-2.5345451083204479337777798526354757e-7) }, { 4, SC_(72.37500), SC_(-2.2478626654835416271537021644553013e-7) }, { 4, SC_(74.50000), SC_(-2.0005909073946645851596541397664333e-7) }, { 4, SC_(76.62500), SC_(-1.7864035957298817513241281766878220e-7) }, { 4, SC_(78.75000), SC_(-1.6001281551287093216803849072235519e-7) }, { 4, SC_(80.87500), SC_(-1.4375113796429048125939526070340983e-7) }, { 4, SC_(83.00000), SC_(-1.2950373350296884735201964028079076e-7) }, { 4, SC_(85.12500), SC_(-1.1697848507486443027254417751822546e-7) }, { 4, SC_(87.25000), SC_(-1.0593152651055065213702117539700727e-7) }, { 4, SC_(89.37500), SC_(-9.6158345290200883062520858433963680e-8) }, { 4, SC_(91.50000), SC_(-8.7486689164653963817234101603388082e-8) }, { 4, SC_(93.62500), SC_(-7.9770879280803145900384972987304463e-8) }, { 4, SC_(95.75000), SC_(-7.2887226653828502529665531368895369e-8) }, { 4, SC_(97.87500), SC_(-6.6730319180606630829991063550458595e-8) }, { 4, SC_(100.0000), SC_(-6.1209999300119967012993094755881001e-8) }, + { 9, SC_(0.1250000), SC_(3.8963943320506514766700086867372762e14) }, { 9, SC_(2.250000), SC_(112.10537259293726188704511169205760) }, { 9, SC_(4.375000), SC_(0.16363919906361224458550935569570297) }, { 9, SC_(6.500000), SC_(0.0036236228486465262827554601212241334) }, { 9, SC_(8.625000), SC_(0.00024724827512609608284324030730925865) }, { 9, SC_(10.75000), SC_(0.000031173409615380334086095590039151370) }, { 9, SC_(12.87500), SC_(5.7824557132102074668570643058203530e-6) }, { 9, SC_(15.00000), SC_(1.3980855499116564037825647833211369e-6) }, { 9, SC_(17.12500), SC_(4.1002910484982160273499509487840966e-7) }, { 9, SC_(19.25000), SC_(1.3928434419796988121776758599785632e-7) }, { 9, SC_(21.37500), SC_(5.3108201638858702713365922453188085e-8) }, { 9, SC_(23.50000), SC_(2.2228120959414339842295401083512930e-8) }, { 9, SC_(25.62500), SC_(1.0046019155325212007574589173916857e-8) }, { 9, SC_(27.75000), SC_(4.8421087709589697640039499715706350e-9) }, { 9, SC_(29.87500), SC_(2.4651114661905897591489828702449678e-9) }, { 9, SC_(32.00000), SC_(1.3154897461853304542190391130140025e-9) }, { 9, SC_(34.12500), SC_(7.3134444425276046658844002904667737e-10) }, { 9, SC_(36.25000), SC_(4.2146721224691157996140805304942419e-10) }, { 9, SC_(38.37500), SC_(2.5073387292785072270991813660631786e-10) }, { 9, SC_(40.50000), SC_(1.5344896969374692327054949367251260e-10) }, { 9, SC_(42.62500), SC_(9.6326225603670754883495513330468241e-11) }, { 9, SC_(44.75000), SC_(6.1868579168628392331266656512721531e-11) }, { 9, SC_(46.87500), SC_(4.0570340164556015067828668493424902e-11) }, { 9, SC_(49.00000), SC_(2.7111471879948743580114339016340155e-11) }, { 9, SC_(51.12500), SC_(1.8433178567812423799249519881074934e-11) }, { 9, SC_(53.25000), SC_(1.2733080158190412770374826663936684e-11) }, { 9, SC_(55.37500), SC_(8.9250208887659481803261595053553675e-12) }, { 9, SC_(57.50000), SC_(6.3408264036510339424452353875188095e-12) }, { 9, SC_(59.62500), SC_(4.5615718874164287974321379689375635e-12) }, { 9, SC_(61.75000), SC_(3.3199519699896432328216923633601725e-12) }, { 9, SC_(63.87500), SC_(2.4426063512782352683767956278168985e-12) }, { 9, SC_(66.00000), SC_(1.8153877149006577317987652651306379e-12) }, { 9, SC_(68.12500), SC_(1.3620688165735114474674715908706633e-12) }, { 9, SC_(70.25000), SC_(1.0310696339614726306516051424066462e-12) }, { 9, SC_(72.37500), SC_(7.8705425492600705644491688042239872e-13) }, { 9, SC_(74.50000), SC_(6.0553290145315817804599098427153448e-13) }, { 9, SC_(76.62500), SC_(4.6934676954218461465393390444338856e-13) }, { 9, SC_(78.75000), SC_(3.6634942521175284527379986400237305e-13) }, { 9, SC_(80.87500), SC_(2.8785887689513567008615786864512179e-13) }, { 9, SC_(83.00000), SC_(2.2761232508374172373558791779207099e-13) }, { 9, SC_(85.12500), SC_(1.8105271275784390697733304142062576e-13) }, { 9, SC_(87.25000), SC_(1.4483676610519321733096991924616972e-13) }, { 9, SC_(89.37500), SC_(1.1649247346426341778218700567243322e-13) }, { 9, SC_(91.50000), SC_(9.4178413859615655080323473554582586e-14) }, { 9, SC_(93.62500), SC_(7.6513170761508530170189422972149840e-14) }, { 9, SC_(95.75000), SC_(6.2453415533716351149737976646666822e-14) }, { 9, SC_(97.87500), SC_(5.1206083919072129278059542340974138e-14) }, { 9, SC_(100.0000), SC_(4.2164633350081151607323910418414347e-14) }, + { SC_(12), SC_(0.1250000), SC_(-2.6333391446175784623707514121843937e20) }, { SC_(12), SC_(2.250000), SC_(-12755.934552347367694976392995238872) }, { SC_(12), SC_(4.375000), SC_(-2.3995726885358590731215736760290659) }, { SC_(12), SC_(6.500000), SC_(-0.015498964669830504389631890538267195) }, { SC_(12), SC_(8.625000), SC_(-0.00043875188128348404126256495384460962) }, { SC_(12), SC_(10.75000), SC_(-0.000027944407762544917990491373502083128) }, { SC_(12), SC_(12.87500), SC_(-2.9683309167523389772660608703858297e-6) }, { SC_(12), SC_(15.00000), SC_(-4.4822030612790888239848346241379762e-7) }, { SC_(12), SC_(17.12500), SC_(-8.7479493941258027953346726543995677e-8) }, { SC_(12), SC_(19.25000), SC_(-2.0757514198487629655709801633624060e-8) }, { SC_(12), SC_(21.37500), SC_(-5.7438353740388980670397346200747331e-9) }, { SC_(12), SC_(23.50000), SC_(-1.7993432749405246733914335090978470e-9) }, { SC_(12), SC_(25.62500), SC_(-6.2435444143873592979499739047338207e-10) }, { SC_(12), SC_(27.75000), SC_(-2.3603187097640550778749196581740161e-10) }, { SC_(12), SC_(29.87500), SC_(-9.5975541975412793814120279791068637e-11) }, { SC_(12), SC_(32.00000), SC_(-4.1552035282000578511439617844316334e-11) }, { SC_(12), SC_(34.12500), SC_(-1.8998432787826251814581286958206123e-11) }, { SC_(12), SC_(36.25000), SC_(-9.1125382347537588010833133716666482e-12) }, { SC_(12), SC_(38.37500), SC_(-4.5599501480319696078145812150042737e-12) }, { SC_(12), SC_(40.50000), SC_(-2.3695979124099134723655912747303232e-12) }, { SC_(12), SC_(42.62500), SC_(-1.2737626539048915719376237689570656e-12) }, { SC_(12), SC_(44.75000), SC_(-7.0592220046106837677774762353832582e-13) }, { SC_(12), SC_(46.87500), SC_(-4.0219605264396476495155503895759108e-13) }, { SC_(12), SC_(49.00000), SC_(-2.3499370395545407582624144041709511e-13) }, { SC_(12), SC_(51.12500), SC_(-1.4049959061173089543038862427082956e-13) }, { SC_(12), SC_(53.25000), SC_(-8.5797116983505159074486972598899288e-14) }, { SC_(12), SC_(55.37500), SC_(-5.3422568073471069670219359482696794e-14) }, { SC_(12), SC_(57.50000), SC_(-3.3867985175935679891876577636637264e-14) }, { SC_(12), SC_(59.62500), SC_(-2.1832074877153446073077836903455745e-14) }, { SC_(12), SC_(61.75000), SC_(-1.4293240909063248751348970309438269e-14) }, { SC_(12), SC_(63.87500), SC_(-9.4937480883301538244379833116307891e-15) }, { SC_(12), SC_(66.00000), SC_(-6.3914967852421984438071853365851405e-15) }, { SC_(12), SC_(68.12500), SC_(-4.3576413857619763879519099830883388e-15) }, { SC_(12), SC_(70.25000), SC_(-3.0063897012087057369199810835484853e-15) }, { SC_(12), SC_(72.37500), SC_(-2.0973711510201259912443465435969711e-15) }, { SC_(12), SC_(74.50000), SC_(-1.4786311290892013378232248983192765e-15) }, { SC_(12), SC_(76.62500), SC_(-1.0527885762581410791135439292370286e-15) }, { SC_(12), SC_(78.75000), SC_(-7.5662859409010038912157660753875556e-16) }, { SC_(12), SC_(80.87500), SC_(-5.4861427907366815368388985862444385e-16) }, { SC_(12), SC_(83.00000), SC_(-4.0113795601837316346341436637916290e-16) }, { SC_(12), SC_(85.12500), SC_(-2.9564974628089487210535317533851159e-16) }, { SC_(12), SC_(87.25000), SC_(-2.1955682892705039626630737602169576e-16) }, { SC_(12), SC_(89.37500), SC_(-1.6422644673043790572542870203840550e-16) }, { SC_(12), SC_(91.50000), SC_(-1.2368534305097629421391380808602245e-16) }, { SC_(12), SC_(93.62500), SC_(-9.3763732289494543868014071205929613e-17) }, { SC_(12), SC_(95.75000), SC_(-7.1526151114554258090139227356676697e-17) }, { SC_(12), SC_(97.87500), SC_(-5.4889394969371742548386275256109609e-17) }, { SC_(12), SC_(100.0000), SC_(-4.2363681689608104413899863907775333e-17) }, + { SC_(21), SC_(0.1250000), SC_(3.7698461389048740847200205590867822e39) }, { SC_(21), SC_(2.250000), SC_(9.1298158507949915159597719407312508e11) }, { SC_(21), SC_(4.375000), SC_(408886.47063811418290988174462904689) }, { SC_(21), SC_(6.500000), SC_(69.783498668647519157069128850360732) }, { SC_(21), SC_(8.625000), SC_(0.14574011463957290617412866498392900) }, { SC_(21), SC_(10.75000), SC_(0.0012181648740805635977027563578320036) }, { SC_(21), SC_(12.87500), SC_(0.000024558760763169978336155197432207549) }, { SC_(21), SC_(15.00000), SC_(9.0946144696294632279197453808024020e-7) }, { SC_(21), SC_(17.12500), SC_(5.2548180764045016519118256734019257e-8) }, { SC_(21), SC_(19.25000), SC_(4.2632373548174335144878212855377856e-9) }, { SC_(21), SC_(21.37500), SC_(4.5191821412507380972584044138294203e-10) }, { SC_(21), SC_(23.50000), SC_(5.9459999472668271337052481421711044e-11) }, { SC_(21), SC_(25.62500), SC_(9.3494613148584596286144185433362367e-12) }, { SC_(21), SC_(27.75000), SC_(1.7071269974977763414024284983419274e-12) }, { SC_(21), SC_(29.87500), SC_(3.5397471216602229335658443914126577e-13) }, { SC_(21), SC_(32.00000), SC_(8.1890165923201938880286772740175496e-14) }, { SC_(21), SC_(34.12500), SC_(2.0838387642645373192280813068168954e-14) }, { SC_(21), SC_(36.25000), SC_(5.7652633708208411748169589666923627e-15) }, { SC_(21), SC_(38.37500), SC_(1.7175814132832512497760866952875142e-15) }, { SC_(21), SC_(40.50000), SC_(5.4658871187824521586899247607212215e-16) }, { SC_(21), SC_(42.62500), SC_(1.8454073409395762586978128093893739e-16) }, { SC_(21), SC_(44.75000), SC_(6.5718894398363114531765518843039215e-17) }, { SC_(21), SC_(46.87500), SC_(2.4563292426503881973678226160508883e-17) }, { SC_(21), SC_(49.00000), SC_(9.5940884241955097871390055431773988e-18) }, { SC_(21), SC_(51.12500), SC_(3.9012613551839347983144664217896505e-18) }, { SC_(21), SC_(53.25000), SC_(1.6460967024588312755378806948280578e-18) }, { SC_(21), SC_(55.37500), SC_(7.1860306265059509271853406338496567e-19) }, { SC_(21), SC_(57.50000), SC_(3.2373123407072660945448849676538922e-19) }, { SC_(21), SC_(59.62500), SC_(1.5015620637437584782988688648328655e-19) }, { SC_(21), SC_(61.75000), SC_(7.1560282337372458319334209159595311e-20) }, { SC_(21), SC_(63.87500), SC_(3.4975910507684158405937390693690592e-20) }, { SC_(21), SC_(66.00000), SC_(1.7502964214288619731071110181806997e-20) }, { SC_(21), SC_(68.12500), SC_(8.9546013195046736291336879943433535e-21) }, { SC_(21), SC_(70.25000), SC_(4.6771364193808931649132626805767700e-21) }, { SC_(21), SC_(72.37500), SC_(2.4909977030434827195554109631354701e-21) }, { SC_(21), SC_(74.50000), SC_(1.3512434774057027230504407213596735e-21) }, { SC_(21), SC_(76.62500), SC_(7.4577901408689598214597184764730976e-22) }, { SC_(21), SC_(78.75000), SC_(4.1839783582393157943543388920119532e-22) }, { SC_(21), SC_(80.87500), SC_(2.3839167824682948660923670294251560e-22) }, { SC_(21), SC_(83.00000), SC_(1.3783660126553262954802012537509343e-22) }, { SC_(21), SC_(85.12500), SC_(8.0813880329362090238603817798156305e-23) }, { SC_(21), SC_(87.25000), SC_(4.8012632134261346749651412145722164e-23) }, { SC_(21), SC_(89.37500), SC_(2.8886517006206031302171279370237901e-23) }, { SC_(21), SC_(91.50000), SC_(1.7589221011224124901492492436031577e-23) }, { SC_(21), SC_(93.62500), SC_(1.0833513342557474766046276358625049e-23) }, { SC_(21), SC_(95.75000), SC_(6.7458879620191471687975317800222219e-24) }, { SC_(21), SC_(97.87500), SC_(4.2446964227424748308143188339893397e-24) }, { SC_(21), SC_(100.0000), SC_(2.6977147877389616650544376447910561e-24) }, + { SC_(30), SC_(0.1250000), SC_(-2.6269370855717061268373196091559060e60) }, { SC_(30), SC_(2.250000), SC_(-3.2063201132225624894497621128724710e21) }, { SC_(30), SC_(4.375000), SC_(-3.5816122065666942298125086110013811e12) }, { SC_(30), SC_(6.500000), SC_(-1.6926495147567915305098150929608351e7) }, { SC_(30), SC_(8.625000), SC_(-2691.9893080722988179729741180559768) }, { SC_(30), SC_(10.75000), SC_(-3.0129827880548721952335149662772758) }, { SC_(30), SC_(12.87500), SC_(-0.011679541591944513522798667560485778) }, { SC_(30), SC_(15.00000), SC_(-0.00010699799160744992062995477402482814) }, { SC_(30), SC_(17.12500), SC_(-1.8412916811312822615145612742242341e-6) }, { SC_(30), SC_(19.25000), SC_(-5.1296809753659048984675389168991678e-8) }, { SC_(30), SC_(21.37500), SC_(-2.0897092756900426602247473552496515e-9) }, { SC_(30), SC_(23.50000), SC_(-1.1575741931670926101304469613657363e-10) }, { SC_(30), SC_(25.62500), SC_(-8.2634766034599236789755939810493909e-12) }, { SC_(30), SC_(27.75000), SC_(-7.2982420192371959627923444899651880e-13) }, { SC_(30), SC_(29.87500), SC_(-7.7259330615365968247618603604357394e-14) }, { SC_(30), SC_(32.00000), SC_(-9.5598830564651701596127591449043084e-15) }, { SC_(30), SC_(34.12500), SC_(-1.3549801683291963236022185422404195e-15) }, { SC_(30), SC_(36.25000), SC_(-2.1637420158752325246771018243486794e-16) }, { SC_(30), SC_(38.37500), SC_(-3.8399012944498044530335003629202925e-17) }, { SC_(30), SC_(40.50000), SC_(-7.4867790463777103523228388855693400e-18) }, { SC_(30), SC_(42.62500), SC_(-1.5882468053156791511681017429675896e-18) }, { SC_(30), SC_(44.75000), SC_(-3.6357619494056634364065401737558109e-19) }, { SC_(30), SC_(46.87500), SC_(-8.9173782150303341835362824820507660e-20) }, { SC_(30), SC_(49.00000), SC_(-2.3289849068324860513642836089935388e-20) }, { SC_(30), SC_(51.12500), SC_(-6.4424396179339080523684393804219419e-21) }, { SC_(30), SC_(53.25000), SC_(-1.8786312072016996388558435362347671e-21) }, { SC_(30), SC_(55.37500), SC_(-5.7508919690939180263189604207862429e-22) }, { SC_(30), SC_(57.50000), SC_(-1.8413295011736722141223685570224223e-22) }, { SC_(30), SC_(59.62500), SC_(-6.1461867250080302453576793713083061e-23) }, { SC_(30), SC_(61.75000), SC_(-2.1324740914631425269500808021967305e-23) }, { SC_(30), SC_(63.87500), SC_(-7.6704605421877601246419439338550908e-24) }, { SC_(30), SC_(66.00000), SC_(-2.8535639781622817027659809125071790e-24) }, { SC_(30), SC_(68.12500), SC_(-1.0955940788660649214956488504913491e-24) }, { SC_(30), SC_(70.25000), SC_(-4.3327278415671627426087404900842932e-25) }, { SC_(30), SC_(72.37500), SC_(-1.7617839186667213519985857533371320e-25) }, { SC_(30), SC_(74.50000), SC_(-7.3539453800410337613851853725254145e-26) }, { SC_(30), SC_(76.62500), SC_(-3.1464535209737263958150922875079198e-26) }, { SC_(30), SC_(78.75000), SC_(-1.3780503803711969857070836997294630e-26) }, { SC_(30), SC_(80.87500), SC_(-6.1703357256500029511495096803651889e-27) }, { SC_(30), SC_(83.00000), SC_(-2.8213173028841107933813502855693772e-27) }, { SC_(30), SC_(85.12500), SC_(-1.3159280846978733546278731706334709e-27) }, { SC_(30), SC_(87.25000), SC_(-6.2549157954995389707945629132366569e-28) }, { SC_(30), SC_(89.37500), SC_(-3.0270730786291364371674711274018267e-28) }, { SC_(30), SC_(91.50000), SC_(-1.4902791126813033033236323354658204e-28) }, { SC_(30), SC_(93.62500), SC_(-7.4578261147126651898615763642561310e-29) }, { SC_(30), SC_(95.75000), SC_(-3.7908508349033587121694154134344755e-29) }, { SC_(30), SC_(97.87500), SC_(-1.9558790071355202604313002586790408e-29) }, { SC_(30), SC_(100.0000), SC_(-1.0236429687189538253202730650097974e-29) } + }}; + + do_test_polygamma(data, name, "Mathematica Data"); + + boost::array, 284> big_data = + { { + { 1, 2.0000000000000000000000000000000000, 0.64493406684822643647241516664602519 }, { 1, 4.0000000000000000000000000000000000, 0.28382295573711532536130405553491408 }, { 1, 8.0000000000000000000000000000000000, 0.13313701469403142513454668592040161 }, { 1, 16.000000000000000000000000000000000, 0.064493783403239361781710772311927225 }, { 1, 32.000000000000000000000000000000000, 0.031743366520302090126581680438741427 }, { 1, 64.000000000000000000000000000000000, 0.015747706064338930155744003071350465 }, { 1, 128.00000000000000000000000000000000, 0.0078430970500146151295391657680446584 }, { 1, 256.00000000000000000000000000000000, 0.0039138893286083964054615299292933721 }, { 1, 512.00000000000000000000000000000000, 0.0019550335903952979329050939908745913 }, { 1, 1024.0000000000000000000000000000000, 0.00097703949237860262165259669085763056 }, + { 1, 2048.0000000000000000000000000000000, 0.00048840047869210349388677277938304048 }, { 1, 4096.0000000000000000000000000000000, 0.00024417042974770687112825193241674713 }, { 1, 8192.0000000000000000000000000000000, 0.00012207776338376182351559927851701587 }, { 1, 16384.000000000000000000000000000000, 0.000061037018933044843502668828413112893 }, { 1, 32768.000000000000000000000000000000, 0.000030518043791024259310109487753004549 }, + { 2, 2.0000000000000000000000000000000000, -0.40411380631918857079947632302289998 }, { 2, 4.0000000000000000000000000000000000, -0.080039732245114496725402248948825907 }, { 2, 8.0000000000000000000000000000000000, -0.017699569195767773909291677736213879 }, { 2, 16.000000000000000000000000000000000, -0.0041580101239589621541865297842265262 }, { 2, 32.000000000000000000000000000000000, -0.0010075567602140907392185110593117265 }, { 2, 64.000000000000000000000000000000000, -0.00024798512216328534949893202341675581 }, { 2, 128.00000000000000000000000000000000, -0.000061513856015459056093727063597403146 }, { 2, 256.00000000000000000000000000000000, -0.000015318510122005107648117663349723503 }, { 2, 512.00000000000000000000000000000000, -3.8221551221702861883051574825692679e-6 }, { 2, 1024.0000000000000000000000000000000, -9.5460609372807180482794242236285690e-7 }, { 2, 2048.0000000000000000000000000000000, -2.3853502284509660646447307719091929e-7 }, { 2, 4096.0000000000000000000000000000000, -5.9619198466975795959019740002484769e-8 }, { 2, 8192.0000000000000000000000000000000, -1.4902980294273504017537750635770593e-8 }, { 2, 16384.000000000000000000000000000000, -3.7255176790762511898502424554181168e-9 }, { 2, 32768.000000000000000000000000000000, -9.3135099675858978849200435754135096e-10 }, { 2, 65536.000000000000000000000000000000, -2.3283419639465348371721333739142464e-10 }, { 2, 131072.00000000000000000000000000000, -5.8208105004371323183654400926421586e-11 }, { 2, 262144.00000000000000000000000000000, -1.4551970739623962182873920142648449e-11 }, { 2, 524288.00000000000000000000000000000, -3.6379857459922343037889500943887953e-12 }, { 2, 1.0485760000000000000000000000000000e6, -9.0949556913507981662486265691361231e-13 }, { 2, 2.0971520000000000000000000000000000e6, -2.2737378386347515742334544652596257e-13 }, { 2, 4.1943040000000000000000000000000000e6, -5.6843432413336786525629259100975662e-14 }, { 2, 8.3886080000000000000000000000000000e6, -1.4210856409267999200219031777240284e-14 }, { 2, 1.6777216000000000000000000000000000e7, -3.5527138905587440538179478730582199e-15 }, { 2, 3.3554432000000000000000000000000000e7, -8.8817844616990522846624354086352033e-16 }, { 2, 6.7108864000000000000000000000000000e7, -2.2204460823375378294874032126041593e-16 }, { 2, 1.3421772800000000000000000000000000e8, -5.5511151644848134838439376350034016e-17 }, { 2, 2.6843545600000000000000000000000000e8, -1.3877787859513245136156122749960089e-17 }, { 2, 5.3687091200000000000000000000000000e8, -3.4694469584159627304129087489268059e-18 }, { 2, 1.0737418240000000000000000000000000e9, -8.6736173879619711452843652170069542e-19 }, { 2, 2.1474836480000000000000000000000000e9, -2.1684043459807508269328995828313535e-19 }, { 2, 4.2949672960000000000000000000000000e9, -5.4210108636896996185378196868612602e-20 }, { 2, 8.5899345920000000000000000000000000e9, -1.3552527157646527235627019117855720e-20 }, { 2, 1.7179869184000000000000000000000000e10, -3.3881317892144165825842826725813744e-21 }, { 2, 3.4359738368000000000000000000000000e10, -8.4703294727895224235683785200562563e-22 }, { 2, 6.8719476736000000000000000000000000e10, -2.1175823681665657267812262331022925e-22 }, { 2, 1.3743895347200000000000000000000000e11, -5.2939559203778957180649004761553143e-23 }, { 2, 2.7487790694400000000000000000000000e11, -1.3234889800896591046552307550599825e-23 }, { 2, 5.4975581388800000000000000000000000e11, -3.3087224502181292305618503541427776e-24 }, { 2, 1.0995116277760000000000000000000000e12, -8.2718061255377999125593529818894574e-25 }, { 2, 2.1990232555520000000000000000000000e12, -2.0679515313835095826591797740024589e-25 }, { 2, 4.3980465111040000000000000000000000e12, -5.1698788284575984622971267465834721e-26 }, { 2, 8.7960930222080000000000000000000000e12, -1.2924697071142526787804288756502028e-26 }, { 2, 1.7592186044416000000000000000000000e13, -3.2311742677854480259587561910416561e-27 }, { 2, 3.5184372088832000000000000000000000e13, -8.0779356694633904761564954897872834e-28 }, { 2, 7.0368744177664000000000000000000000e13, -2.0194839173658189204465744995814610e-28 }, { 2, 1.4073748835532800000000000000000000e14, -5.0487097934145114278757495332542949e-29 }, { 2, 2.8147497671065600000000000000000000e14, -1.2621774483536233728138515438750504e-29 }, { 2, 5.6294995342131200000000000000000000e14, -3.1554436208840528268407715604044070e-30 }, { 2, 1.1258999068426240000000000000000000e15, -7.8886090522101250606096072769163284e-31 }, { 2, 2.2517998136852480000000000000000000e15, -1.9721522630525303893408616162178294e-31 }, { 2, 4.5035996273704960000000000000000000e15, -4.9303806576313248785877287867808721e-32 }, { 2, 9.0071992547409920000000000000000000e15, -1.2325951644078310828013790399747782e-32 }, { 2, 1.8014398509481984000000000000000000e16, -3.0814879110195775359465061540364098e-33 }, { 2, 3.6028797018963968000000000000000000e16, -7.7037197775489436260450885777153639e-34 }, { 2, 7.2057594037927936000000000000000000e16, -1.9259299443872358797836250435068840e-34 }, { 2, 1.4411518807585587200000000000000000e17, -4.8148248609680896660495037326147640e-35 }, { 2, 2.8823037615171174400000000000000000e17, -1.2037062152420224123361810736346353e-35 }, { 2, 5.7646075230342348800000000000000000e17, -3.0092655381050560256202091096877686e-36 }, { 2, 1.1529215046068469760000000000000000e18, -7.5231638452626400575252183062208969e-37 }, { 2, 2.3058430092136939520000000000000000e18, -1.8807909613156600135656415180554087e-37 }, { 2, 4.6116860184273879040000000000000000e18, -4.7019774032891500328945249720137522e-38 }, { 2, 9.2233720368547758080000000000000000e18, -1.1754943508222875080961838901128419e-38 }, { 2, 1.8446744073709551616000000000000000e19, -2.9387358770557187700811505341688594e-39 }, { 2, 3.6893488147419103232000000000000000e19, -7.3468396926392969250037398465305920e-40 }, { 2, 7.3786976294838206464000000000000000e19, -1.8367099231598242312260429005212034e-40 }, { 2, 1.4757395258967641292800000000000000e20, -4.5917748078995605780339921749137029e-41 }, { 2, 2.9514790517935282585600000000000000e20, -1.1479437019748901445046086591797625e-41 }, { 2, 5.9029581035870565171200000000000000e20, -2.8698592549372253612566599172635773e-42 }, { 2, 1.1805916207174113034240000000000000e21, -7.1746481373430634031355726298016569e-43 }, { 2, 2.3611832414348226068480000000000000e21, -1.7936620343357658507831335120307534e-43 }, { 2, 4.7223664828696452136960000000000000e21, -4.4841550858394146269568842233023076e-44 }, { 2, 9.4447329657392904273920000000000000e21, -1.1210387714598536567391023612287549e-44 }, { 2, 1.8889465931478580854784000000000000e22, -2.8025969286496341418476075348258598e-45 }, { 2, 3.7778931862957161709568000000000000e22, -7.0064923216240853546188333767571150e-46 }, { 2, 7.5557863725914323419136000000000000e22, -1.7516230804060213386546851616508370e-46 }, { 2, 1.5111572745182864683827200000000000e23, -4.3790577010150533466366839259540402e-47 }, { 2, 3.0223145490365729367654400000000000e23, -1.0947644252537633366591673592168785e-47 }, { 2, 6.0446290980731458735308800000000000e23, -2.7369110631344083416479138702026569e-48 }, { 2, 1.2089258196146291747061760000000000e24, -6.8422776578360208541197790157072179e-49 }, { 2, 2.4178516392292583494123520000000000e24, -1.7105694144590052135299440464518764e-49 }, { 2, 4.8357032784585166988247040000000000e24, -4.2764235361475130338248592317860310e-50 }, { 2, 9.6714065569170333976494080000000000e24, -1.0691058840368782584562146974035503e-50 }, { 2, 1.9342813113834066795298816000000000e25, -2.6727647100921956461405366053301788e-51 }, { 2, 3.8685626227668133590597632000000000e25, -6.6819117752304891153513413406020758e-52 }, { 2, 7.7371252455336267181195264000000000e25, -1.6704779438076222788378353135600976e-52 }, { 2, 1.5474250491067253436239052800000000e26, -4.1761948595190556970945882569122172e-53 }, { 2, 3.0948500982134506872478105600000000e26, -1.0440487148797639242736470608545510e-53 }, { 2, 6.1897001964269013744956211200000000e26, -2.6101217871994098106841176479194982e-54 }, { 2, 1.2379400392853802748991242240000000e27, -6.5253044679985245267102941145276465e-55 }, { 2, 2.4758800785707605497982484480000000e27, -1.6313261169996311316775735279730243e-55 }, { 2, 4.9517601571415210995964968960000000e27, -4.0783152924990778291939338191089514e-56 }, { 2, 9.9035203142830421991929937920000000e27, -1.0195788231247694572984834546742867e-56 }, { 2, 1.9807040628566084398385987584000000e28, -2.5489470578119236432462086365570278e-57 }, { 2, 3.9614081257132168796771975168000000e28, -6.3723676445298091081155215912317084e-58 }, { 2, 7.9228162514264337593543950336000000e28, -1.5930919111324522770288803977878195e-58 }, { 2, 1.5845632502852867518708790067200000e29, -3.9827297778311306925722009944444141e-59 }, { 2, 3.1691265005705735037417580134400000e29, -9.9568244445778267314305024860796170e-60 }, { 2, 6.3382530011411470074835160268800000e29, -2.4892061111444566828576256215159770e-60 }, { 2, 1.2676506002282294014967032053760000e30, -6.2230152778611417071440640537850333e-61 }, + { 4, 2.0000000000000000000000000000000000, -0.88626612344087823195277167496882003}, { 4, 4.0000000000000000000000000000000000, -0.037500691342112799854006242870054601 }, { 4, 8.0000000000000000000000000000000000, -0.0018687951506376135155684814141062787 }, { 4, 16.000000000000000000000000000000000, -0.00010359125360358782747907937474060894 }, { 4, 32.000000000000000000000000000000000, -6.0889806370027137702207132674152980e-6 }, { 4, 64.000000000000000000000000000000000, -3.6894923384141876864824136311646410e-7 }, { 4, 128.00000000000000000000000000000000, -2.2703261395872369173970078168917455e-8 }, { 4, 256.00000000000000000000000000000000, -1.4079333251018200826827045864949986e-9 }, { 4, 512.00000000000000000000000000000000, -8.7653106993395973543058191653743071e-11 }, { 4, 1024.0000000000000000000000000000000, -5.4676350252855605594922081412167012e-12 }, { 4, 2048.0000000000000000000000000000000, -3.4139371559748457865769094969096427e-13 }, { 4, 4096.0000000000000000000000000000000, -2.1326692531241146202038690286850691e-14 }, { 4, 8192.0000000000000000000000000000000, -1.3325929232891576568330300144201981e-15 }, { 4, 16384.000000000000000000000000000000, -8.3276891759241673633332539309962691e-17 }, { 4, 32768.000000000000000000000000000000, -5.2044880733635773100598702692535183e-18 }, { 4, 65536.000000000000000000000000000000, -3.2527057803921971134912503489998463e-19 }, { 4, 131072.00000000000000000000000000000, -2.0329100928805067785989990248970031e-20 }, { 4, 262144.00000000000000000000000000000, -1.2705591144350687435054305331329679e-21 }, { 4, 524288.00000000000000000000000000000, -7.9409641728159744142284095369593220e-23 }, { 4, 1.0485760000000000000000000000000000e6, -4.9630931416565518652153749436192000e-24 }, { 4, 2.0971520000000000000000000000000000e6, -3.1019302553034238539128749896589195e-25 }, { 4, 4.1943040000000000000000000000000000e6, -1.9387054851177155898453895640231670e-26 }, { 4, 8.3886080000000000000000000000000000e6, -1.2116906393089944897903424066391815e-27 }, { 4, 1.6777216000000000000000000000000000e7, -7.5730655929014196050202587407391615e-29 }, { 4, 3.3554432000000000000000000000000000e7, -4.7331657134447220363116949282744848e-30 }, { 4, 6.7108864000000000000000000000000000e7, -2.9582284827408716767299704712288552e-31 }, { 4, 1.3421772800000000000000000000000000e8, -1.8488927741623954373880437387993075e-32 }, { 4, 2.6843545600000000000000000000000000e8, -1.1555579752419193033729099502283072e-33 }, { 4, 5.3687091200000000000000000000000000e8, -7.2222373183570650057583536416196423e-35 }, { 4, 1.0737418240000000000000000000000000e9, -4.5138983155653748230741551964743254e-36 }, { 4, 2.1474836480000000000000000000000000e9, -2.8211864446009246407535785204401521e-37 }, { 4, 4.2949672960000000000000000000000000e9, -1.7632415270545045810527364994409865e-38 }, { 4, 8.5899345920000000000000000000000000e9, -1.1020259541524799509144333467867914e-39 }, { 4, 1.7179869184000000000000000000000000e10, -6.8876622126511702800708681871153888e-41 }, { 4, 3.4359738368000000000000000000000000e10, -4.3047888826564097334549177850495839e-42 }, { 4, 6.8719476736000000000000000000000000e10, -2.6904930515819524297904926510117385e-43 }, { 4, 1.3743895347200000000000000000000000e11, -1.6815581572142503768636183351690905e-44 }, { 4, 2.7487790694400000000000000000000000e11, -1.0509738482512596443662561409356175e-45 }, { 4, 5.4975581388800000000000000000000000e11, -6.5685865515464763986220054285432304e-47 }, { 4, 1.0995116277760000000000000000000000e12, -4.1053665947090801308053030433926733e-48 }, { 4, 2.1990232555520000000000000000000000e12, -2.5658541216908414510241138209492617e-49 }, { 4, 4.3980465111040000000000000000000000e12, -1.6036588260560466472871963710133920e-50 }, { 4, 8.7960930222080000000000000000000000e12, -1.0022867662848012609285994319421665e-51 }, { 4, 1.7592186044416000000000000000000000e13, -6.2642922892792957132228143635273796e-53 }, { 4, 3.5184372088832000000000000000000000e13, -3.9151826807993372683952177161081714e-54 }, { 4, 7.0368744177664000000000000000000000e13, -2.4469891754995162451316856809457970e-55 }, { 4, 1.4073748835532800000000000000000000e14, -1.5293682346871759195775143660953743e-56 }, { 4, 2.8147497671065600000000000000000000e14, -9.5585514667947815797663735871501036e-58 }, { 4, 5.6294995342131200000000000000000000e14, -5.9740946667467172631061424917674488e-59 }, { 4, 1.1258999068426240000000000000000000e15, -3.7338091667166916568638887448064559e-60 }, + { 5, 2.0000000000000000000000000000000000, 2.0811674381338967657421515749104633 }, { 5, 4.0000000000000000000000000000000000, 0.041558384635954378910875854745854295 }, { 5, 8.0000000000000000000000000000000000, 0.00098951000477133869852907040195234770 }, { 5, 16.000000000000000000000000000000000, 0.000026687171525751195904263272526023849 }, { 5, 32.000000000000000000000000000000000, 7.7287973331327549424848375559872037e-7 }, { 5, 64.000000000000000000000000000000000, 2.3238496018000614929174818530730601e-8 }, { 5, 128.00000000000000000000000000000000, 7.1224092682782859288630591196158856e-10 }, { 5, 256.00000000000000000000000000000000, 2.2041868318688703092956583673488732e-11 }, { 5, 512.00000000000000000000000000000000, 6.8545820059344569325690341822051481e-13 }, + { 5, 1024.0000000000000000000000000000000, 2.1368374599013908699681782557176684e-14 }, { 5, 2048.0000000000000000000000000000000, 6.6694736345106372565672272296621720e-16 }, { 5, 4096.0000000000000000000000000000000, 2.0829390307857624148581922800405889e-17 }, { 5, 8192.0000000000000000000000000000000, 6.5071985107212205839819397506176587e-19 }, { 5, 16384.000000000000000000000000000000, 2.0331892850726898586186509892109697e-20 }, + { 30, 2.0000000000000000000000000000000000, -1.2351841765847806469554512503841320e23 }, { 30, 4.0000000000000000000000000000000000, -5.7574709672867347088590035301645472e13 }, { 30, 8.0000000000000000000000000000000000, -27506.955293920803735428099734719508 }, { 30, 16.000000000000000000000000000000000, -0.000014776733178819597558222752004691771 }, { 30, 32.000000000000000000000000000000000, -9.5598830564651701596127591449043084e-15 }, { 30, 64.000000000000000000000000000000000, -7.2304485310918134795078579958346544e-24 }, { 30, 128.00000000000000000000000000000000, -6.0283544055510492723170660715813893e-33 }, { 30, 256.00000000000000000000000000000000, -5.3033945300844267682288152122688373e-42 }, { 30, 512.00000000000000000000000000000000, -4.7984984493788567623415259200478215e-51 }, { 30, 1024.0000000000000000000000000000000, -4.4044059984515492135344714328158802e-60 }, { 30, 2048.0000000000000000000000000000000, -4.0720911710023652995468796384464697e-69 }, { 30, 4096.0000000000000000000000000000000, -3.7785912001586472052142107275635729e-78 }, { 30, 8192.0000000000000000000000000000000, -3.5126550370582447330888831842922732e-87 }, { 30, 16384.000000000000000000000000000000, -3.2684225122971143182856602549511625e-96 }, { 30, 32768.000000000000000000000000000000, -3.0425628731892016567765116031607680e-105 }, { 30, 65536.000000000000000000000000000000, -2.8329590706806369266402498060974102e-114 }, { 30, 131072.00000000000000000000000000000, -2.6380968281136772828042603723998837e-123 }, { 30, 262144.00000000000000000000000000000, -2.4567785517794442581328674255623958e-132 }, { 30, 524288.00000000000000000000000000000, -2.2879878661829847442965875847125058e-141 }, { 30, 1.0485760000000000000000000000000000e6, -2.1308242685223148657953902073871316e-150 }, { 30, 2.0971520000000000000000000000000000e6, -1.9844705497704998113296263703338786e-159 }, { 30, 4.1943040000000000000000000000000000e6, -1.8481756120690176942737056133829355e-168 }, { 30, 8.3886080000000000000000000000000000e6, -1.7212445915482984340950265207437808e-177 }, { 30, 1.6777216000000000000000000000000000e7, -1.6030325113209352859611074788378703e-186 }, { 30, 3.3554432000000000000000000000000000e7, -1.4929396982396668313427669448409354e-195 }, { 30, 6.7108864000000000000000000000000000e7, -1.3904081327297841105213325845203069e-204 }, { 30, 1.3421772800000000000000000000000000e8, -1.2949183372218004102189189609880637e-213 }, { 30, 2.6843545600000000000000000000000000e8, -1.2059866123484480516357481544084177e-222 }, { 30, 5.3687091200000000000000000000000000e8, -1.1231625253833571996113692012033249e-231 }, { 30, 1.0737418240000000000000000000000000e9, -1.0460266002388281642669220414065145e-240 }, { 30, 2.1474836480000000000000000000000000e9, -9.7418817964607553111407834656180990e-250 }, { 30, 4.2949672960000000000000000000000000e9, -9.0728344045929855573515168095233657e-259 }, { 30, 8.5899345920000000000000000000000000e9, -8.4497354819902512502834172688634013e-268 }, { 30, 1.7179869184000000000000000000000000e10, -7.8694293970360059201227925630244920e-277 }, { 30, 3.4359738368000000000000000000000000e10, -7.3289772436027860614787732271106255e-286 }, { 30, 6.8719476736000000000000000000000000e10, -6.8256419543205073368020956733620994e-295 }, { 30, 1.3743895347200000000000000000000000e11, -6.3568744376074160576260336726346352e-304 }, { 30, 2.7487790694400000000000000000000000e11, -5.9203006674167918417546432760193032e-313 }, { 30, 5.4975581388800000000000000000000000e11, -5.5137096599259016840358774274418939e-322 }, { 30, 1.0995116277760000000000000000000000e12, -5.1350422760943708365732963065500637e-331 }, { 30, 2.1990232555520000000000000000000000e12, -4.7823807932989146872399082006693143e-340 }, { 30, 4.3980465111040000000000000000000000e12, -4.4539391931915691818714510320431840e-349 }, { 30, 8.7960930222080000000000000000000000e12, -4.1480541165768856815409742503596800e-358 }, { 30, 1.7592186044416000000000000000000000e13, -3.8631764394914254898921483964257641e-367 }, { 30, 3.5184372088832000000000000000000000e13, -3.5978634278194778773174853574513736e-376 }, { 30, 7.0368744177664000000000000000000000e13, -3.3507714307109927261253979955016489e-385 }, { 30, 1.4073748835532800000000000000000000e14, -3.1206490757974196189832923991915393e-394 }, { 30, 2.8147497671065600000000000000000000e14, -2.9063309317429115226430982195302982e-403 }, { 30, 5.6294995342131200000000000000000000e14, -2.7067316060353387914883678696809847e-412 }, { 30, 1.1258999068426240000000000000000000e15, -2.5208402481258872249902802122831258e-421 }, { 30, 2.2517998136852480000000000000000000e15, -2.3477154300789073415295882015261417e-430 }, { 30, 4.5035996273704960000000000000000000e15, -2.1864803788055661339931292249701424e-439 }, { 30, 9.0071992547409920000000000000000000e15, -2.0363185357354232042765617960742937e-448 }, { 30, 1.8014398509481984000000000000000000e16, -1.8964694214383340521722742474983073e-457 }, { 30, 3.6028797018963968000000000000000000e16, -1.7662247842534755008372178353398608e-466 }, { 30, 7.2057594037927936000000000000000000e16, -1.6449250134206145379392674041454779e-475 }, { 30, 1.4411518807585587200000000000000000e17, -1.5319557985482871222587909400586267e-484 }, { 30, 2.8823037615171174400000000000000000e17, -1.4267450185011020326364788255126534e-493 }, { 30, 5.7646075230342348800000000000000000e17, -1.3287598439502548384585954790099239e-502 }, { 30, 1.1529215046068469760000000000000000e18, -1.2375040389134127843853680088571555e-511 }, { 30, 2.3058430092136939520000000000000000e18, -1.1525154476178928989312989675999669e-520 }, { 30, 4.6116860184273879040000000000000000e18, -1.0733636539596066765325327508232535e-529 }, { 30, 9.2233720368547758080000000000000000e18, -9.9964780170433844885501818972479211e-539 }, { 30, 1.8446744073709551616000000000000000e19, -9.3099456439198781553856371993072353e-548 }, { 30, 3.6893488147419103232000000000000000e19, -8.6705625466256198953841239814504762e-557 }, { 30, 7.3786976294838206464000000000000000e19, -8.0750906342879122995040411743125170e-566 }, { 30, 1.4757395258967641292800000000000000e20, -7.5205141997783559362248117439409145e-575 }, { 30, 2.9514790517935282585600000000000000e20, -7.0040246469698435960734303533011581e-584 }, { 30, 5.9029581035870565171200000000000000e20, -6.5230062668862227312246814035998837e-593 }, { 30, 1.1805916207174113034240000000000000e21, -6.0750229907093781336599992450810038e-602 }, { 30, 2.3611832414348226068480000000000000e21, -5.6578060525556822620531601462211155e-611 }, { 30, 4.7223664828696452136960000000000000e21, -5.2692424995411953535258666060047970e-620 }, { 30, 9.4447329657392904273920000000000000e21, -4.9073644909460054277605359114212468e-629 }, { 30, 1.8889465931478580854784000000000000e22, -4.5703393322844108825145652571006034e-638 }, { 30, 3.7778931862957161709568000000000000e22, -4.2564601938095045113123493445833636e-647 }, { 30, 7.5557863725914323419136000000000000e22, -3.9641374664469664090420159863859993e-656 }, { 30, 1.5111572745182864683827200000000000e23, -3.6918907113810688341424078675611601e-665 }, { 30, 3.0223145490365729367654400000000000e23, -3.4383411625223875363750612697898904e-674 }, { 30, 6.0446290980731458735308800000000000e23, -3.2022047438867274079238771888571055e-683 }, { 30, 1.2089258196146291747061760000000000e24, -2.9822855665224859564787125744222496e-692 }, { 30, 2.4178516392292583494123520000000000e24, -2.7774698720523025435197111896762965e-701 }, { 30, 4.8357032784585166988247040000000000e24, -2.5867203921566741015014262629362602e-710 }, { 30, 9.6714065569170333976494080000000000e24, -2.4090710954337139627909495039162813e-719 }, { 30, 1.9342813113834066795298816000000000e25, -2.2436222950310576360588405614024340e-728 }, { 30, 3.8685626227668133590597632000000000e25, -2.0895360922730133273255449640176061e-737 }, { 30, 7.7371252455336267181195264000000000e25, -1.9460321332076688551581879695116458e-746 }, { 30, 1.5474250491067253436239052800000000e26, -1.8123836565834180034307649180969011e-755 }, { 30, 3.0948500982134506872478105600000000e26, -1.6879138132402841033700526042422183e-764 }, { 30, 6.1897001964269013744956211200000000e26, -1.5719922382759713599179429591983936e-773 }, { 30, 1.2379400392853802748991242240000000e27, -1.4640318586267264186571752095136003e-782 }, { 30, 2.4758800785707605497982484480000000e27, -1.3634859198953271085928894585406723e-791 }, { 30, 4.9517601571415210995964968960000000e27, -1.2698452173688701433994709089494920e-800 }, { 30, 9.9035203142830421991929937920000000e27, -1.1826355172031280988822420193126128e-809 }, { 30, 1.9807040628566084398385987584000000e28, -1.1014151547133252945563215933898419e-818 }, { 30, 3.9614081257132168796771975168000000e28, -1.0257727976081197099353387886404875e-827 }, { 30, 7.9228162514264337593543950336000000e28, -9.5532536283891621039746216353614015e-837 }, { 30, 1.5845632502852867518708790067200000e29, -8.8971607651460562869670071028704372e-846 }, { 30, 3.1691265005705735037417580134400000e29, -8.2861266705636459281360796675545348e-855 }, { 30, 6.3382530011411470074835160268800000e29, -7.7170568244193177000955489160105929e-864 }, { 30, 1.2676506002282294014967032053760000e30, -7.1870692301721476950641245729469486e-873 }, + { 31, 2.0000000000000000000000000000000000, 1.9145332544935048093264355986676073e24 }, { 31, 4.0000000000000000000000000000000000, 4.4611518561919816922776795853710092e14 }, { 31, 8.0000000000000000000000000000000000, 106267.95619808419253963903669279065 }, { 31, 16.000000000000000000000000000000000, 0.000028318136062027075392587779376335821 }, { 31, 32.000000000000000000000000000000000, 9.0814734303237413772295578988209818e-15 } + } }; + do_test_polygamma(big_data, name, "Mathematica Data - large arguments"); +} + From 4bc3b6076cc2aa07e8a13a02af252e6a0ef10fe6 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 21 Oct 2014 19:03:26 +0100 Subject: [PATCH 29/69] [Polygamma] Fix real_concept compilation and runtime. Add digits_base10 support function to policies. --- include/boost/math/policies/policy.hpp | 5 ++ .../special_functions/detail/polygamma.hpp | 44 ++++++------- .../math/special_functions/polygamma.hpp | 66 +++++++++++++------ test/Jamfile.v2 | 1 + test/test_polygamma.cpp | 29 ++++++-- test/test_polygamma.hpp | 26 ++++---- 6 files changed, 108 insertions(+), 63 deletions(-) diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index 49068a6ed..c1d40306c 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -850,6 +850,11 @@ inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) typedef mpl::bool_< std::numeric_limits::is_specialized > tag_type; return detail::digits_imp(tag_type()); } +template +inline int digits_base10(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) +{ + return boost::math::policies::digits() * 1000L / 301; +} template inline unsigned long get_max_series_iterations() diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index e86855c36..b8ea81af5 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -23,7 +23,9 @@ #include #include - namespace boost { namespace math { + namespace boost { namespace math { namespace detail{ + +#if 0 template T digamma_atinfinityplus(const int, const T &x, const Policy&) @@ -66,7 +68,7 @@ sum_base_10_exp = T(exponent_value) * 0.303F; long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); - long int tol = std::numeric_limits::digits10; + long int tol = std::numeric_limits::digits_base10; if((two_k > 24) && (order_check < -tol)) @@ -77,6 +79,7 @@ return (log_z - one_over_2z) - sum; } +#endif template T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol) // for large values of x such as for x> 400 @@ -154,9 +157,7 @@ // if(k > policies::get_max_series_iterations()) { - policies::raise_evaluation_error( - "polygamma<%1%>(int, %1%)", - "Series did not converge, closest value was %1%", sum, pol); + policies::raise_evaluation_error("polygamma<%1%>(int, %1%)", "Series did not converge, closest value was %1%", sum, pol); break; } } @@ -174,7 +175,7 @@ // Use N = (0.4 * digits) + (4 * n) for target value for x: BOOST_MATH_STD_USING - const int d4d = static_cast(0.4F * std::numeric_limits::digits10); + const int d4d = static_cast(0.4F * policies::digits_base10()); const int N4dn = static_cast(d4d + (4 * n)); const int N = static_cast((std::min)(N4dn, (std::numeric_limits::max)())); const int m = n; @@ -201,7 +202,7 @@ } template - T polygamma_nearzero(const int n, const T& x, const Policy&) + T polygamma_nearzero(const int n, const T& x, const Policy& pol) { BOOST_MATH_STD_USING // not defined for digamma @@ -224,9 +225,10 @@ bool b_neg_term = ((n % 2) == 0); T sum = ((!b_neg_term) ? pg_kn : -pg_kn); - for(int k = 1; k < max_iteration::value; k++) + for(unsigned k = 1;; k++) { - k_plus_n_fact *= k_plus_n_plus_one++; + k_plus_n_fact *= k_plus_n_plus_one; + k_plus_n_plus_one += 1; one_over_k_fact /= k; z_pow_k *= x; @@ -234,21 +236,7 @@ const T term = (pg * z_pow_k) * one_over_k_fact; - T term_base_10_exp = ((term < 0) ? -term : term); - T sum_base_10_exp = ((sum < 0) ? -sum : sum); - - int exponent_value; - - static_cast(frexp(term_base_10_exp, &exponent_value)); - term_base_10_exp = T(exponent_value) * 0.303F; - - static_cast(frexp(sum_base_10_exp, &exponent_value)); - sum_base_10_exp = T(exponent_value) * 0.303F; - - long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); - long int tol = std::numeric_limits::digits10; - - if((k > 12) && (order_check < -tol)) + if(fabs(term / sum) < tools::epsilon()) { break; } @@ -256,6 +244,12 @@ b_neg_term = !b_neg_term; ((!b_neg_term) ? sum += term : sum -= term); + + if(k > policies::get_max_series_iterations()) + { + policies::raise_evaluation_error("polygamma<%1%>(int, %1%)", "Series did not converge, closest value was %1%", sum, pol); + break; + } } return term0 + sum; @@ -269,7 +263,7 @@ { return polygamma_nearzero(n, x, pol); } - else if(x > 0.4F * std::numeric_limits::digits10 + 4 * n) + else if(x > 0.4F * policies::digits_base10() + 4 * n) { return polygamma_atinfinityplus(n, x, pol); } diff --git a/include/boost/math/special_functions/polygamma.hpp b/include/boost/math/special_functions/polygamma.hpp index b96716721..a122e0b94 100644 --- a/include/boost/math/special_functions/polygamma.hpp +++ b/include/boost/math/special_functions/polygamma.hpp @@ -18,33 +18,57 @@ namespace boost { namespace math { - template - struct promoteftod - { - typedef T type; - }; - - template<> - struct promoteftod - { - typedef double type; - }; - + template - inline T polygamma(const int n, T x, const Policy &pol) + inline typename tools::promote_args::type polygamma(const int n, T x, const Policy &pol) { - typedef typename promoteftod::type result_type; -// std::cout<<"~:"<::type result_type; + // + // The type used for the calculation. This may be a wider type than + // the result in order to ensure full precision: + // + typedef typename policies::evaluation::type value_type; + // + // The type of the policy to forward to the actual implementation. + // We disable promotion of float and double as that's [possibly] + // happened already in the line above. Also reset to the default + // any policies we don't use (reduces code bloat if we're called + // multiple times with differing policies we don't actually use). + // Also normalise the type, again to reduce code bloat in case we're + // called multiple times with functionally identical policies that happen + // to be different types. + // + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + // + // Whew. Now we can make the actual call to the implementation. + // Arguments are explicitly cast to the evaluation type, and the result + // passed through checked_narrowing_cast which handles things like overflow + // according to the policy passed: + // + return policies::checked_narrowing_cast( + detail::polygamma_imp(n, static_cast(x), forwarding_policy()), + "boost::math::polygamma<%1%>(int, %1%)"); } template - inline T polygamma(const int n, T x) + inline typename tools::promote_args::type polygamma(const int n, T x) { - return boost::math::polygamma(n,x,policies::policy<>()); + return boost::math::polygamma(n, x, policies::policy<>()); } template diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 131943151..6a80cdd8e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -603,6 +603,7 @@ run test_nc_t.cpp pch ../../test/build//boost_unit_test_framework run test_normal.cpp pch ../../test/build//boost_unit_test_framework ; run test_owens_t.cpp ../../test/build//boost_unit_test_framework ; run test_pareto.cpp ../../test/build//boost_unit_test_framework ; +run test_polygamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ; run test_poisson.cpp ../../test/build//boost_unit_test_framework : # command line : # input files diff --git a/test/test_polygamma.cpp b/test/test_polygamma.cpp index c42ca6df6..48810d8a1 100644 --- a/test/test_polygamma.cpp +++ b/test/test_polygamma.cpp @@ -5,7 +5,7 @@ #include #include "test_polygamma.hpp" - +//#include void expected_results() { @@ -17,16 +17,30 @@ void expected_results() #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS if(boost::math::policies::digits >() == boost::math::policies::digits >()) { - largest_type = "(long\\s+)?double"; + largest_type = "(long\\s+)?double|real_concept"; } else { - largest_type = "long double"; + largest_type = "long double|real_concept"; } #else - largest_type = "(long\\s+)?double"; + largest_type = "(long\\s+)?double|real_concept"; #endif + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + ".*large arguments", // test data group + ".*", 400, 200); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + ".*", // test data group + ".*", 20, 10); // test function // // Finish off by printing out the compiler/stdlib/platform names, // we do this to make it easier to mark up expected error rates. @@ -40,11 +54,14 @@ BOOST_AUTO_TEST_CASE( test_main ) expected_results(); BOOST_MATH_CONTROL_FP; - //test_polygamma(0.0F, "float"); + test_polygamma(0.0F, "float"); test_polygamma(0.0, "double"); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS test_polygamma(0.0L, "long double"); - //test_polygamma(boost::math::concepts::real_concept(0.1), "real_concept"); + test_polygamma(boost::math::concepts::real_concept(0.1), "real_concept"); +#endif +#ifdef BOOST_FLOAT128_C + //test_polygamma(BOOST_FLOAT128_C(0.0), "float128_t"); #endif } diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index fe5433f3e..419ffdea1 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -23,7 +23,11 @@ #include "table_type.hpp" #ifndef SC_ +#ifndef BOOST_FLOAT128_C #define SC_(x) static_cast::type>(BOOST_JOIN(x, L)) +#else +#define SC_(x) static_cast::type>(BOOST_FLOAT128_C(x)) +#endif #endif template @@ -114,23 +118,23 @@ void test_polygamma(T, const char* name) {4, SC_(0.1250000), SC_(-786445.98543106378579320120709638297)}, { 4, SC_(2.250000), SC_(-0.51106863793373355822715252195899576) }, { 4, SC_(4.375000), SC_(-0.025241882074562753654505456518792508) }, { 4, SC_(6.500000), SC_(-0.0045259302803220607103496010172883494) }, { 4, SC_(8.625000), SC_(-0.0013596929106556359886012273921730071) }, { 4, SC_(10.75000), SC_(-0.00053930828860547053427689740051604949) }, { 4, SC_(12.87500), SC_(-0.00025445997266103206171225355293726865) }, { 4, SC_(15.00000), SC_(-0.00013519619187519276575068431301221388) }, { 4, SC_(17.12500), SC_(-0.000078306716822025065793290599586946118) }, { 4, SC_(19.25000), SC_(-0.000048430513924395561509999792045098081) }, { 4, SC_(21.37500), SC_(-0.000031536705873201397805285969259914559) }, { 4, SC_(23.50000), SC_(-0.000021407049050977062373311093992814121) }, { 4, SC_(25.62500), SC_(-0.000015036764178343754461565939319516893) }, { 4, SC_(27.75000), SC_(-0.000010869219781124567432001391245344089) }, { 4, SC_(29.87500), SC_(-8.0504604926168752698902834477348881e-6) }, { 4, SC_(32.00000), SC_(-6.0889806370027137702207132674152980e-6) }, { 4, SC_(34.12500), SC_(-4.6901011823268163094417546531023856e-6) }, { 4, SC_(36.25000), SC_(-3.6708283086618325558290000911536581e-6) }, { 4, SC_(38.37500), SC_(-2.9139932244650290336213711603586301e-6) }, { 4, SC_(40.50000), SC_(-2.3425302303691304543510535971847968e-6) }, { 4, SC_(42.62500), SC_(-1.9045296486050512642801504306671373e-6) }, { 4, SC_(44.75000), SC_(-1.5642760453399369047824852836708697e-6) }, { 4, SC_(46.87500), SC_(-1.2967233822729326645555539185332769e-6) }, { 4, SC_(49.00000), SC_(-1.0840030171141394983603065427611252e-6) }, { 4, SC_(51.12500), SC_(-9.1316643010960703020517255319750485e-7) }, { 4, SC_(53.25000), SC_(-7.7469609700462921021995856208285815e-7) }, { 4, SC_(55.37500), SC_(-6.6150474476547305805911346012045165e-7) }, { 4, SC_(57.50000), SC_(-5.6825133351570053043820949353677183e-7) }, { 4, SC_(59.62500), SC_(-4.9086620236193161135912086142572580e-7) }, { 4, SC_(61.75000), SC_(-4.2621666772058776224801114961267801e-7) }, { 4, SC_(63.87500), SC_(-3.7186839586672891333608898041067112e-7) }, { 4, SC_(66.00000), SC_(-3.2591301914111222705427951896642626e-7) }, { 4, SC_(68.12500), SC_(-2.8684217920848561693233665614958777e-7) }, { 4, SC_(70.25000), SC_(-2.5345451083204479337777798526354757e-7) }, { 4, SC_(72.37500), SC_(-2.2478626654835416271537021644553013e-7) }, { 4, SC_(74.50000), SC_(-2.0005909073946645851596541397664333e-7) }, { 4, SC_(76.62500), SC_(-1.7864035957298817513241281766878220e-7) }, { 4, SC_(78.75000), SC_(-1.6001281551287093216803849072235519e-7) }, { 4, SC_(80.87500), SC_(-1.4375113796429048125939526070340983e-7) }, { 4, SC_(83.00000), SC_(-1.2950373350296884735201964028079076e-7) }, { 4, SC_(85.12500), SC_(-1.1697848507486443027254417751822546e-7) }, { 4, SC_(87.25000), SC_(-1.0593152651055065213702117539700727e-7) }, { 4, SC_(89.37500), SC_(-9.6158345290200883062520858433963680e-8) }, { 4, SC_(91.50000), SC_(-8.7486689164653963817234101603388082e-8) }, { 4, SC_(93.62500), SC_(-7.9770879280803145900384972987304463e-8) }, { 4, SC_(95.75000), SC_(-7.2887226653828502529665531368895369e-8) }, { 4, SC_(97.87500), SC_(-6.6730319180606630829991063550458595e-8) }, { 4, SC_(100.0000), SC_(-6.1209999300119967012993094755881001e-8) }, { 9, SC_(0.1250000), SC_(3.8963943320506514766700086867372762e14) }, { 9, SC_(2.250000), SC_(112.10537259293726188704511169205760) }, { 9, SC_(4.375000), SC_(0.16363919906361224458550935569570297) }, { 9, SC_(6.500000), SC_(0.0036236228486465262827554601212241334) }, { 9, SC_(8.625000), SC_(0.00024724827512609608284324030730925865) }, { 9, SC_(10.75000), SC_(0.000031173409615380334086095590039151370) }, { 9, SC_(12.87500), SC_(5.7824557132102074668570643058203530e-6) }, { 9, SC_(15.00000), SC_(1.3980855499116564037825647833211369e-6) }, { 9, SC_(17.12500), SC_(4.1002910484982160273499509487840966e-7) }, { 9, SC_(19.25000), SC_(1.3928434419796988121776758599785632e-7) }, { 9, SC_(21.37500), SC_(5.3108201638858702713365922453188085e-8) }, { 9, SC_(23.50000), SC_(2.2228120959414339842295401083512930e-8) }, { 9, SC_(25.62500), SC_(1.0046019155325212007574589173916857e-8) }, { 9, SC_(27.75000), SC_(4.8421087709589697640039499715706350e-9) }, { 9, SC_(29.87500), SC_(2.4651114661905897591489828702449678e-9) }, { 9, SC_(32.00000), SC_(1.3154897461853304542190391130140025e-9) }, { 9, SC_(34.12500), SC_(7.3134444425276046658844002904667737e-10) }, { 9, SC_(36.25000), SC_(4.2146721224691157996140805304942419e-10) }, { 9, SC_(38.37500), SC_(2.5073387292785072270991813660631786e-10) }, { 9, SC_(40.50000), SC_(1.5344896969374692327054949367251260e-10) }, { 9, SC_(42.62500), SC_(9.6326225603670754883495513330468241e-11) }, { 9, SC_(44.75000), SC_(6.1868579168628392331266656512721531e-11) }, { 9, SC_(46.87500), SC_(4.0570340164556015067828668493424902e-11) }, { 9, SC_(49.00000), SC_(2.7111471879948743580114339016340155e-11) }, { 9, SC_(51.12500), SC_(1.8433178567812423799249519881074934e-11) }, { 9, SC_(53.25000), SC_(1.2733080158190412770374826663936684e-11) }, { 9, SC_(55.37500), SC_(8.9250208887659481803261595053553675e-12) }, { 9, SC_(57.50000), SC_(6.3408264036510339424452353875188095e-12) }, { 9, SC_(59.62500), SC_(4.5615718874164287974321379689375635e-12) }, { 9, SC_(61.75000), SC_(3.3199519699896432328216923633601725e-12) }, { 9, SC_(63.87500), SC_(2.4426063512782352683767956278168985e-12) }, { 9, SC_(66.00000), SC_(1.8153877149006577317987652651306379e-12) }, { 9, SC_(68.12500), SC_(1.3620688165735114474674715908706633e-12) }, { 9, SC_(70.25000), SC_(1.0310696339614726306516051424066462e-12) }, { 9, SC_(72.37500), SC_(7.8705425492600705644491688042239872e-13) }, { 9, SC_(74.50000), SC_(6.0553290145315817804599098427153448e-13) }, { 9, SC_(76.62500), SC_(4.6934676954218461465393390444338856e-13) }, { 9, SC_(78.75000), SC_(3.6634942521175284527379986400237305e-13) }, { 9, SC_(80.87500), SC_(2.8785887689513567008615786864512179e-13) }, { 9, SC_(83.00000), SC_(2.2761232508374172373558791779207099e-13) }, { 9, SC_(85.12500), SC_(1.8105271275784390697733304142062576e-13) }, { 9, SC_(87.25000), SC_(1.4483676610519321733096991924616972e-13) }, { 9, SC_(89.37500), SC_(1.1649247346426341778218700567243322e-13) }, { 9, SC_(91.50000), SC_(9.4178413859615655080323473554582586e-14) }, { 9, SC_(93.62500), SC_(7.6513170761508530170189422972149840e-14) }, { 9, SC_(95.75000), SC_(6.2453415533716351149737976646666822e-14) }, { 9, SC_(97.87500), SC_(5.1206083919072129278059542340974138e-14) }, { 9, SC_(100.0000), SC_(4.2164633350081151607323910418414347e-14) }, - { SC_(12), SC_(0.1250000), SC_(-2.6333391446175784623707514121843937e20) }, { SC_(12), SC_(2.250000), SC_(-12755.934552347367694976392995238872) }, { SC_(12), SC_(4.375000), SC_(-2.3995726885358590731215736760290659) }, { SC_(12), SC_(6.500000), SC_(-0.015498964669830504389631890538267195) }, { SC_(12), SC_(8.625000), SC_(-0.00043875188128348404126256495384460962) }, { SC_(12), SC_(10.75000), SC_(-0.000027944407762544917990491373502083128) }, { SC_(12), SC_(12.87500), SC_(-2.9683309167523389772660608703858297e-6) }, { SC_(12), SC_(15.00000), SC_(-4.4822030612790888239848346241379762e-7) }, { SC_(12), SC_(17.12500), SC_(-8.7479493941258027953346726543995677e-8) }, { SC_(12), SC_(19.25000), SC_(-2.0757514198487629655709801633624060e-8) }, { SC_(12), SC_(21.37500), SC_(-5.7438353740388980670397346200747331e-9) }, { SC_(12), SC_(23.50000), SC_(-1.7993432749405246733914335090978470e-9) }, { SC_(12), SC_(25.62500), SC_(-6.2435444143873592979499739047338207e-10) }, { SC_(12), SC_(27.75000), SC_(-2.3603187097640550778749196581740161e-10) }, { SC_(12), SC_(29.87500), SC_(-9.5975541975412793814120279791068637e-11) }, { SC_(12), SC_(32.00000), SC_(-4.1552035282000578511439617844316334e-11) }, { SC_(12), SC_(34.12500), SC_(-1.8998432787826251814581286958206123e-11) }, { SC_(12), SC_(36.25000), SC_(-9.1125382347537588010833133716666482e-12) }, { SC_(12), SC_(38.37500), SC_(-4.5599501480319696078145812150042737e-12) }, { SC_(12), SC_(40.50000), SC_(-2.3695979124099134723655912747303232e-12) }, { SC_(12), SC_(42.62500), SC_(-1.2737626539048915719376237689570656e-12) }, { SC_(12), SC_(44.75000), SC_(-7.0592220046106837677774762353832582e-13) }, { SC_(12), SC_(46.87500), SC_(-4.0219605264396476495155503895759108e-13) }, { SC_(12), SC_(49.00000), SC_(-2.3499370395545407582624144041709511e-13) }, { SC_(12), SC_(51.12500), SC_(-1.4049959061173089543038862427082956e-13) }, { SC_(12), SC_(53.25000), SC_(-8.5797116983505159074486972598899288e-14) }, { SC_(12), SC_(55.37500), SC_(-5.3422568073471069670219359482696794e-14) }, { SC_(12), SC_(57.50000), SC_(-3.3867985175935679891876577636637264e-14) }, { SC_(12), SC_(59.62500), SC_(-2.1832074877153446073077836903455745e-14) }, { SC_(12), SC_(61.75000), SC_(-1.4293240909063248751348970309438269e-14) }, { SC_(12), SC_(63.87500), SC_(-9.4937480883301538244379833116307891e-15) }, { SC_(12), SC_(66.00000), SC_(-6.3914967852421984438071853365851405e-15) }, { SC_(12), SC_(68.12500), SC_(-4.3576413857619763879519099830883388e-15) }, { SC_(12), SC_(70.25000), SC_(-3.0063897012087057369199810835484853e-15) }, { SC_(12), SC_(72.37500), SC_(-2.0973711510201259912443465435969711e-15) }, { SC_(12), SC_(74.50000), SC_(-1.4786311290892013378232248983192765e-15) }, { SC_(12), SC_(76.62500), SC_(-1.0527885762581410791135439292370286e-15) }, { SC_(12), SC_(78.75000), SC_(-7.5662859409010038912157660753875556e-16) }, { SC_(12), SC_(80.87500), SC_(-5.4861427907366815368388985862444385e-16) }, { SC_(12), SC_(83.00000), SC_(-4.0113795601837316346341436637916290e-16) }, { SC_(12), SC_(85.12500), SC_(-2.9564974628089487210535317533851159e-16) }, { SC_(12), SC_(87.25000), SC_(-2.1955682892705039626630737602169576e-16) }, { SC_(12), SC_(89.37500), SC_(-1.6422644673043790572542870203840550e-16) }, { SC_(12), SC_(91.50000), SC_(-1.2368534305097629421391380808602245e-16) }, { SC_(12), SC_(93.62500), SC_(-9.3763732289494543868014071205929613e-17) }, { SC_(12), SC_(95.75000), SC_(-7.1526151114554258090139227356676697e-17) }, { SC_(12), SC_(97.87500), SC_(-5.4889394969371742548386275256109609e-17) }, { SC_(12), SC_(100.0000), SC_(-4.2363681689608104413899863907775333e-17) }, - { SC_(21), SC_(0.1250000), SC_(3.7698461389048740847200205590867822e39) }, { SC_(21), SC_(2.250000), SC_(9.1298158507949915159597719407312508e11) }, { SC_(21), SC_(4.375000), SC_(408886.47063811418290988174462904689) }, { SC_(21), SC_(6.500000), SC_(69.783498668647519157069128850360732) }, { SC_(21), SC_(8.625000), SC_(0.14574011463957290617412866498392900) }, { SC_(21), SC_(10.75000), SC_(0.0012181648740805635977027563578320036) }, { SC_(21), SC_(12.87500), SC_(0.000024558760763169978336155197432207549) }, { SC_(21), SC_(15.00000), SC_(9.0946144696294632279197453808024020e-7) }, { SC_(21), SC_(17.12500), SC_(5.2548180764045016519118256734019257e-8) }, { SC_(21), SC_(19.25000), SC_(4.2632373548174335144878212855377856e-9) }, { SC_(21), SC_(21.37500), SC_(4.5191821412507380972584044138294203e-10) }, { SC_(21), SC_(23.50000), SC_(5.9459999472668271337052481421711044e-11) }, { SC_(21), SC_(25.62500), SC_(9.3494613148584596286144185433362367e-12) }, { SC_(21), SC_(27.75000), SC_(1.7071269974977763414024284983419274e-12) }, { SC_(21), SC_(29.87500), SC_(3.5397471216602229335658443914126577e-13) }, { SC_(21), SC_(32.00000), SC_(8.1890165923201938880286772740175496e-14) }, { SC_(21), SC_(34.12500), SC_(2.0838387642645373192280813068168954e-14) }, { SC_(21), SC_(36.25000), SC_(5.7652633708208411748169589666923627e-15) }, { SC_(21), SC_(38.37500), SC_(1.7175814132832512497760866952875142e-15) }, { SC_(21), SC_(40.50000), SC_(5.4658871187824521586899247607212215e-16) }, { SC_(21), SC_(42.62500), SC_(1.8454073409395762586978128093893739e-16) }, { SC_(21), SC_(44.75000), SC_(6.5718894398363114531765518843039215e-17) }, { SC_(21), SC_(46.87500), SC_(2.4563292426503881973678226160508883e-17) }, { SC_(21), SC_(49.00000), SC_(9.5940884241955097871390055431773988e-18) }, { SC_(21), SC_(51.12500), SC_(3.9012613551839347983144664217896505e-18) }, { SC_(21), SC_(53.25000), SC_(1.6460967024588312755378806948280578e-18) }, { SC_(21), SC_(55.37500), SC_(7.1860306265059509271853406338496567e-19) }, { SC_(21), SC_(57.50000), SC_(3.2373123407072660945448849676538922e-19) }, { SC_(21), SC_(59.62500), SC_(1.5015620637437584782988688648328655e-19) }, { SC_(21), SC_(61.75000), SC_(7.1560282337372458319334209159595311e-20) }, { SC_(21), SC_(63.87500), SC_(3.4975910507684158405937390693690592e-20) }, { SC_(21), SC_(66.00000), SC_(1.7502964214288619731071110181806997e-20) }, { SC_(21), SC_(68.12500), SC_(8.9546013195046736291336879943433535e-21) }, { SC_(21), SC_(70.25000), SC_(4.6771364193808931649132626805767700e-21) }, { SC_(21), SC_(72.37500), SC_(2.4909977030434827195554109631354701e-21) }, { SC_(21), SC_(74.50000), SC_(1.3512434774057027230504407213596735e-21) }, { SC_(21), SC_(76.62500), SC_(7.4577901408689598214597184764730976e-22) }, { SC_(21), SC_(78.75000), SC_(4.1839783582393157943543388920119532e-22) }, { SC_(21), SC_(80.87500), SC_(2.3839167824682948660923670294251560e-22) }, { SC_(21), SC_(83.00000), SC_(1.3783660126553262954802012537509343e-22) }, { SC_(21), SC_(85.12500), SC_(8.0813880329362090238603817798156305e-23) }, { SC_(21), SC_(87.25000), SC_(4.8012632134261346749651412145722164e-23) }, { SC_(21), SC_(89.37500), SC_(2.8886517006206031302171279370237901e-23) }, { SC_(21), SC_(91.50000), SC_(1.7589221011224124901492492436031577e-23) }, { SC_(21), SC_(93.62500), SC_(1.0833513342557474766046276358625049e-23) }, { SC_(21), SC_(95.75000), SC_(6.7458879620191471687975317800222219e-24) }, { SC_(21), SC_(97.87500), SC_(4.2446964227424748308143188339893397e-24) }, { SC_(21), SC_(100.0000), SC_(2.6977147877389616650544376447910561e-24) }, - { SC_(30), SC_(0.1250000), SC_(-2.6269370855717061268373196091559060e60) }, { SC_(30), SC_(2.250000), SC_(-3.2063201132225624894497621128724710e21) }, { SC_(30), SC_(4.375000), SC_(-3.5816122065666942298125086110013811e12) }, { SC_(30), SC_(6.500000), SC_(-1.6926495147567915305098150929608351e7) }, { SC_(30), SC_(8.625000), SC_(-2691.9893080722988179729741180559768) }, { SC_(30), SC_(10.75000), SC_(-3.0129827880548721952335149662772758) }, { SC_(30), SC_(12.87500), SC_(-0.011679541591944513522798667560485778) }, { SC_(30), SC_(15.00000), SC_(-0.00010699799160744992062995477402482814) }, { SC_(30), SC_(17.12500), SC_(-1.8412916811312822615145612742242341e-6) }, { SC_(30), SC_(19.25000), SC_(-5.1296809753659048984675389168991678e-8) }, { SC_(30), SC_(21.37500), SC_(-2.0897092756900426602247473552496515e-9) }, { SC_(30), SC_(23.50000), SC_(-1.1575741931670926101304469613657363e-10) }, { SC_(30), SC_(25.62500), SC_(-8.2634766034599236789755939810493909e-12) }, { SC_(30), SC_(27.75000), SC_(-7.2982420192371959627923444899651880e-13) }, { SC_(30), SC_(29.87500), SC_(-7.7259330615365968247618603604357394e-14) }, { SC_(30), SC_(32.00000), SC_(-9.5598830564651701596127591449043084e-15) }, { SC_(30), SC_(34.12500), SC_(-1.3549801683291963236022185422404195e-15) }, { SC_(30), SC_(36.25000), SC_(-2.1637420158752325246771018243486794e-16) }, { SC_(30), SC_(38.37500), SC_(-3.8399012944498044530335003629202925e-17) }, { SC_(30), SC_(40.50000), SC_(-7.4867790463777103523228388855693400e-18) }, { SC_(30), SC_(42.62500), SC_(-1.5882468053156791511681017429675896e-18) }, { SC_(30), SC_(44.75000), SC_(-3.6357619494056634364065401737558109e-19) }, { SC_(30), SC_(46.87500), SC_(-8.9173782150303341835362824820507660e-20) }, { SC_(30), SC_(49.00000), SC_(-2.3289849068324860513642836089935388e-20) }, { SC_(30), SC_(51.12500), SC_(-6.4424396179339080523684393804219419e-21) }, { SC_(30), SC_(53.25000), SC_(-1.8786312072016996388558435362347671e-21) }, { SC_(30), SC_(55.37500), SC_(-5.7508919690939180263189604207862429e-22) }, { SC_(30), SC_(57.50000), SC_(-1.8413295011736722141223685570224223e-22) }, { SC_(30), SC_(59.62500), SC_(-6.1461867250080302453576793713083061e-23) }, { SC_(30), SC_(61.75000), SC_(-2.1324740914631425269500808021967305e-23) }, { SC_(30), SC_(63.87500), SC_(-7.6704605421877601246419439338550908e-24) }, { SC_(30), SC_(66.00000), SC_(-2.8535639781622817027659809125071790e-24) }, { SC_(30), SC_(68.12500), SC_(-1.0955940788660649214956488504913491e-24) }, { SC_(30), SC_(70.25000), SC_(-4.3327278415671627426087404900842932e-25) }, { SC_(30), SC_(72.37500), SC_(-1.7617839186667213519985857533371320e-25) }, { SC_(30), SC_(74.50000), SC_(-7.3539453800410337613851853725254145e-26) }, { SC_(30), SC_(76.62500), SC_(-3.1464535209737263958150922875079198e-26) }, { SC_(30), SC_(78.75000), SC_(-1.3780503803711969857070836997294630e-26) }, { SC_(30), SC_(80.87500), SC_(-6.1703357256500029511495096803651889e-27) }, { SC_(30), SC_(83.00000), SC_(-2.8213173028841107933813502855693772e-27) }, { SC_(30), SC_(85.12500), SC_(-1.3159280846978733546278731706334709e-27) }, { SC_(30), SC_(87.25000), SC_(-6.2549157954995389707945629132366569e-28) }, { SC_(30), SC_(89.37500), SC_(-3.0270730786291364371674711274018267e-28) }, { SC_(30), SC_(91.50000), SC_(-1.4902791126813033033236323354658204e-28) }, { SC_(30), SC_(93.62500), SC_(-7.4578261147126651898615763642561310e-29) }, { SC_(30), SC_(95.75000), SC_(-3.7908508349033587121694154134344755e-29) }, { SC_(30), SC_(97.87500), SC_(-1.9558790071355202604313002586790408e-29) }, { SC_(30), SC_(100.0000), SC_(-1.0236429687189538253202730650097974e-29) } + { SC_(12.0), SC_(0.1250000), SC_(-2.6333391446175784623707514121843937e20) }, { SC_(12.0), SC_(2.250000), SC_(-12755.934552347367694976392995238872) }, { SC_(12.0), SC_(4.375000), SC_(-2.3995726885358590731215736760290659) }, { SC_(12.0), SC_(6.500000), SC_(-0.015498964669830504389631890538267195) }, { SC_(12.0), SC_(8.625000), SC_(-0.00043875188128348404126256495384460962) }, { SC_(12.0), SC_(10.75000), SC_(-0.000027944407762544917990491373502083128) }, { SC_(12.0), SC_(12.87500), SC_(-2.9683309167523389772660608703858297e-6) }, { SC_(12.0), SC_(15.00000), SC_(-4.4822030612790888239848346241379762e-7) }, { SC_(12.0), SC_(17.12500), SC_(-8.7479493941258027953346726543995677e-8) }, { SC_(12.0), SC_(19.25000), SC_(-2.0757514198487629655709801633624060e-8) }, { SC_(12.0), SC_(21.37500), SC_(-5.7438353740388980670397346200747331e-9) }, { SC_(12.0), SC_(23.50000), SC_(-1.7993432749405246733914335090978470e-9) }, { SC_(12.0), SC_(25.62500), SC_(-6.2435444143873592979499739047338207e-10) }, { SC_(12.0), SC_(27.75000), SC_(-2.3603187097640550778749196581740161e-10) }, { SC_(12.0), SC_(29.87500), SC_(-9.5975541975412793814120279791068637e-11) }, { SC_(12.0), SC_(32.00000), SC_(-4.1552035282000578511439617844316334e-11) }, { SC_(12.0), SC_(34.12500), SC_(-1.8998432787826251814581286958206123e-11) }, { SC_(12.0), SC_(36.25000), SC_(-9.1125382347537588010833133716666482e-12) }, { SC_(12.0), SC_(38.37500), SC_(-4.5599501480319696078145812150042737e-12) }, { SC_(12.0), SC_(40.50000), SC_(-2.3695979124099134723655912747303232e-12) }, { SC_(12.0), SC_(42.62500), SC_(-1.2737626539048915719376237689570656e-12) }, { SC_(12.0), SC_(44.75000), SC_(-7.0592220046106837677774762353832582e-13) }, { SC_(12.0), SC_(46.87500), SC_(-4.0219605264396476495155503895759108e-13) }, { SC_(12.0), SC_(49.00000), SC_(-2.3499370395545407582624144041709511e-13) }, { SC_(12.0), SC_(51.12500), SC_(-1.4049959061173089543038862427082956e-13) }, { SC_(12.0), SC_(53.25000), SC_(-8.5797116983505159074486972598899288e-14) }, { SC_(12.0), SC_(55.37500), SC_(-5.3422568073471069670219359482696794e-14) }, { SC_(12.0), SC_(57.50000), SC_(-3.3867985175935679891876577636637264e-14) }, { SC_(12.0), SC_(59.62500), SC_(-2.1832074877153446073077836903455745e-14) }, { SC_(12.0), SC_(61.75000), SC_(-1.4293240909063248751348970309438269e-14) }, { SC_(12.0), SC_(63.87500), SC_(-9.4937480883301538244379833116307891e-15) }, { SC_(12.0), SC_(66.00000), SC_(-6.3914967852421984438071853365851405e-15) }, { SC_(12.0), SC_(68.12500), SC_(-4.3576413857619763879519099830883388e-15) }, { SC_(12.0), SC_(70.25000), SC_(-3.0063897012087057369199810835484853e-15) }, { SC_(12.0), SC_(72.37500), SC_(-2.0973711510201259912443465435969711e-15) }, { SC_(12.0), SC_(74.50000), SC_(-1.4786311290892013378232248983192765e-15) }, { SC_(12.0), SC_(76.62500), SC_(-1.0527885762581410791135439292370286e-15) }, { SC_(12.0), SC_(78.75000), SC_(-7.5662859409010038912157660753875556e-16) }, { SC_(12.0), SC_(80.87500), SC_(-5.4861427907366815368388985862444385e-16) }, { SC_(12.0), SC_(83.00000), SC_(-4.0113795601837316346341436637916290e-16) }, { SC_(12.0), SC_(85.12500), SC_(-2.9564974628089487210535317533851159e-16) }, { SC_(12.0), SC_(87.25000), SC_(-2.1955682892705039626630737602169576e-16) }, { SC_(12.0), SC_(89.37500), SC_(-1.6422644673043790572542870203840550e-16) }, { SC_(12.0), SC_(91.50000), SC_(-1.2368534305097629421391380808602245e-16) }, { SC_(12.0), SC_(93.62500), SC_(-9.3763732289494543868014071205929613e-17) }, { SC_(12.0), SC_(95.75000), SC_(-7.1526151114554258090139227356676697e-17) }, { SC_(12.0), SC_(97.87500), SC_(-5.4889394969371742548386275256109609e-17) }, { SC_(12.0), SC_(100.0000), SC_(-4.2363681689608104413899863907775333e-17) }, + { SC_(21.0), SC_(0.1250000), SC_(3.7698461389048740847200205590867822e39) }, { SC_(21.0), SC_(2.250000), SC_(9.1298158507949915159597719407312508e11) }, { SC_(21.0), SC_(4.375000), SC_(408886.47063811418290988174462904689) }, { SC_(21.0), SC_(6.500000), SC_(69.783498668647519157069128850360732) }, { SC_(21.0), SC_(8.625000), SC_(0.14574011463957290617412866498392900) }, { SC_(21.0), SC_(10.75000), SC_(0.0012181648740805635977027563578320036) }, { SC_(21.0), SC_(12.87500), SC_(0.000024558760763169978336155197432207549) }, { SC_(21.0), SC_(15.00000), SC_(9.0946144696294632279197453808024020e-7) }, { SC_(21.0), SC_(17.12500), SC_(5.2548180764045016519118256734019257e-8) }, { SC_(21.0), SC_(19.25000), SC_(4.2632373548174335144878212855377856e-9) }, { SC_(21.0), SC_(21.37500), SC_(4.5191821412507380972584044138294203e-10) }, { SC_(21.0), SC_(23.50000), SC_(5.9459999472668271337052481421711044e-11) }, { SC_(21.0), SC_(25.62500), SC_(9.3494613148584596286144185433362367e-12) }, { SC_(21.0), SC_(27.75000), SC_(1.7071269974977763414024284983419274e-12) }, { SC_(21.0), SC_(29.87500), SC_(3.5397471216602229335658443914126577e-13) }, { SC_(21.0), SC_(32.00000), SC_(8.1890165923201938880286772740175496e-14) }, { SC_(21.0), SC_(34.12500), SC_(2.0838387642645373192280813068168954e-14) }, { SC_(21.0), SC_(36.25000), SC_(5.7652633708208411748169589666923627e-15) }, { SC_(21.0), SC_(38.37500), SC_(1.7175814132832512497760866952875142e-15) }, { SC_(21.0), SC_(40.50000), SC_(5.4658871187824521586899247607212215e-16) }, { SC_(21.0), SC_(42.62500), SC_(1.8454073409395762586978128093893739e-16) }, { SC_(21.0), SC_(44.75000), SC_(6.5718894398363114531765518843039215e-17) }, { SC_(21.0), SC_(46.87500), SC_(2.4563292426503881973678226160508883e-17) }, { SC_(21.0), SC_(49.00000), SC_(9.5940884241955097871390055431773988e-18) }, { SC_(21.0), SC_(51.12500), SC_(3.9012613551839347983144664217896505e-18) }, { SC_(21.0), SC_(53.25000), SC_(1.6460967024588312755378806948280578e-18) }, { SC_(21.0), SC_(55.37500), SC_(7.1860306265059509271853406338496567e-19) }, { SC_(21.0), SC_(57.50000), SC_(3.2373123407072660945448849676538922e-19) }, { SC_(21.0), SC_(59.62500), SC_(1.5015620637437584782988688648328655e-19) }, { SC_(21.0), SC_(61.75000), SC_(7.1560282337372458319334209159595311e-20) }, { SC_(21.0), SC_(63.87500), SC_(3.4975910507684158405937390693690592e-20) }, { SC_(21.0), SC_(66.00000), SC_(1.7502964214288619731071110181806997e-20) }, { SC_(21.0), SC_(68.12500), SC_(8.9546013195046736291336879943433535e-21) }, { SC_(21.0), SC_(70.25000), SC_(4.6771364193808931649132626805767700e-21) }, { SC_(21.0), SC_(72.37500), SC_(2.4909977030434827195554109631354701e-21) }, { SC_(21.0), SC_(74.50000), SC_(1.3512434774057027230504407213596735e-21) }, { SC_(21.0), SC_(76.62500), SC_(7.4577901408689598214597184764730976e-22) }, { SC_(21.0), SC_(78.75000), SC_(4.1839783582393157943543388920119532e-22) }, { SC_(21.0), SC_(80.87500), SC_(2.3839167824682948660923670294251560e-22) }, { SC_(21.0), SC_(83.00000), SC_(1.3783660126553262954802012537509343e-22) }, { SC_(21.0), SC_(85.12500), SC_(8.0813880329362090238603817798156305e-23) }, { SC_(21.0), SC_(87.25000), SC_(4.8012632134261346749651412145722164e-23) }, { SC_(21.0), SC_(89.37500), SC_(2.8886517006206031302171279370237901e-23) }, { SC_(21.0), SC_(91.50000), SC_(1.7589221011224124901492492436031577e-23) }, { SC_(21.0), SC_(93.62500), SC_(1.0833513342557474766046276358625049e-23) }, { SC_(21.0), SC_(95.75000), SC_(6.7458879620191471687975317800222219e-24) }, { SC_(21.0), SC_(97.87500), SC_(4.2446964227424748308143188339893397e-24) }, { SC_(21.0), SC_(100.0000), SC_(2.6977147877389616650544376447910561e-24) }, + { SC_(30.0), SC_(0.1250000), SC_(-2.6269370855717061268373196091559060e60) }, { SC_(30.0), SC_(2.250000), SC_(-3.2063201132225624894497621128724710e21) }, { SC_(30.0), SC_(4.375000), SC_(-3.5816122065666942298125086110013811e12) }, { SC_(30.0), SC_(6.500000), SC_(-1.6926495147567915305098150929608351e7) }, { SC_(30.0), SC_(8.625000), SC_(-2691.9893080722988179729741180559768) }, { SC_(30.0), SC_(10.75000), SC_(-3.0129827880548721952335149662772758) }, { SC_(30.0), SC_(12.87500), SC_(-0.011679541591944513522798667560485778) }, { SC_(30.0), SC_(15.00000), SC_(-0.00010699799160744992062995477402482814) }, { SC_(30.0), SC_(17.12500), SC_(-1.8412916811312822615145612742242341e-6) }, { SC_(30.0), SC_(19.25000), SC_(-5.1296809753659048984675389168991678e-8) }, { SC_(30.0), SC_(21.37500), SC_(-2.0897092756900426602247473552496515e-9) }, { SC_(30.0), SC_(23.50000), SC_(-1.1575741931670926101304469613657363e-10) }, { SC_(30.0), SC_(25.62500), SC_(-8.2634766034599236789755939810493909e-12) }, { SC_(30.0), SC_(27.75000), SC_(-7.2982420192371959627923444899651880e-13) }, { SC_(30.0), SC_(29.87500), SC_(-7.7259330615365968247618603604357394e-14) }, { SC_(30.0), SC_(32.00000), SC_(-9.5598830564651701596127591449043084e-15) }, { SC_(30.0), SC_(34.12500), SC_(-1.3549801683291963236022185422404195e-15) }, { SC_(30.0), SC_(36.25000), SC_(-2.1637420158752325246771018243486794e-16) }, { SC_(30.0), SC_(38.37500), SC_(-3.8399012944498044530335003629202925e-17) }, { SC_(30.0), SC_(40.50000), SC_(-7.4867790463777103523228388855693400e-18) }, { SC_(30.0), SC_(42.62500), SC_(-1.5882468053156791511681017429675896e-18) }, { SC_(30.0), SC_(44.75000), SC_(-3.6357619494056634364065401737558109e-19) }, { SC_(30.0), SC_(46.87500), SC_(-8.9173782150303341835362824820507660e-20) }, { SC_(30.0), SC_(49.00000), SC_(-2.3289849068324860513642836089935388e-20) }, { SC_(30.0), SC_(51.12500), SC_(-6.4424396179339080523684393804219419e-21) }, { SC_(30.0), SC_(53.25000), SC_(-1.8786312072016996388558435362347671e-21) }, { SC_(30.0), SC_(55.37500), SC_(-5.7508919690939180263189604207862429e-22) }, { SC_(30.0), SC_(57.50000), SC_(-1.8413295011736722141223685570224223e-22) }, { SC_(30.0), SC_(59.62500), SC_(-6.1461867250080302453576793713083061e-23) }, { SC_(30.0), SC_(61.75000), SC_(-2.1324740914631425269500808021967305e-23) }, { SC_(30.0), SC_(63.87500), SC_(-7.6704605421877601246419439338550908e-24) }, { SC_(30.0), SC_(66.00000), SC_(-2.8535639781622817027659809125071790e-24) }, { SC_(30.0), SC_(68.12500), SC_(-1.0955940788660649214956488504913491e-24) }, { SC_(30.0), SC_(70.25000), SC_(-4.3327278415671627426087404900842932e-25) }, { SC_(30.0), SC_(72.37500), SC_(-1.7617839186667213519985857533371320e-25) }, { SC_(30.0), SC_(74.50000), SC_(-7.3539453800410337613851853725254145e-26) }, { SC_(30.0), SC_(76.62500), SC_(-3.1464535209737263958150922875079198e-26) }, { SC_(30.0), SC_(78.75000), SC_(-1.3780503803711969857070836997294630e-26) }, { SC_(30.0), SC_(80.87500), SC_(-6.1703357256500029511495096803651889e-27) }, { SC_(30.0), SC_(83.00000), SC_(-2.8213173028841107933813502855693772e-27) }, { SC_(30.0), SC_(85.12500), SC_(-1.3159280846978733546278731706334709e-27) }, { SC_(30.0), SC_(87.25000), SC_(-6.2549157954995389707945629132366569e-28) }, { SC_(30.0), SC_(89.37500), SC_(-3.0270730786291364371674711274018267e-28) }, { SC_(30.0), SC_(91.50000), SC_(-1.4902791126813033033236323354658204e-28) }, { SC_(30.0), SC_(93.62500), SC_(-7.4578261147126651898615763642561310e-29) }, { SC_(30.0), SC_(95.75000), SC_(-3.7908508349033587121694154134344755e-29) }, { SC_(30.0), SC_(97.87500), SC_(-1.9558790071355202604313002586790408e-29) }, { SC_(30.0), SC_(100.0000), SC_(-1.0236429687189538253202730650097974e-29) } }}; do_test_polygamma(data, name, "Mathematica Data"); boost::array, 284> big_data = { { - { 1, 2.0000000000000000000000000000000000, 0.64493406684822643647241516664602519 }, { 1, 4.0000000000000000000000000000000000, 0.28382295573711532536130405553491408 }, { 1, 8.0000000000000000000000000000000000, 0.13313701469403142513454668592040161 }, { 1, 16.000000000000000000000000000000000, 0.064493783403239361781710772311927225 }, { 1, 32.000000000000000000000000000000000, 0.031743366520302090126581680438741427 }, { 1, 64.000000000000000000000000000000000, 0.015747706064338930155744003071350465 }, { 1, 128.00000000000000000000000000000000, 0.0078430970500146151295391657680446584 }, { 1, 256.00000000000000000000000000000000, 0.0039138893286083964054615299292933721 }, { 1, 512.00000000000000000000000000000000, 0.0019550335903952979329050939908745913 }, { 1, 1024.0000000000000000000000000000000, 0.00097703949237860262165259669085763056 }, - { 1, 2048.0000000000000000000000000000000, 0.00048840047869210349388677277938304048 }, { 1, 4096.0000000000000000000000000000000, 0.00024417042974770687112825193241674713 }, { 1, 8192.0000000000000000000000000000000, 0.00012207776338376182351559927851701587 }, { 1, 16384.000000000000000000000000000000, 0.000061037018933044843502668828413112893 }, { 1, 32768.000000000000000000000000000000, 0.000030518043791024259310109487753004549 }, - { 2, 2.0000000000000000000000000000000000, -0.40411380631918857079947632302289998 }, { 2, 4.0000000000000000000000000000000000, -0.080039732245114496725402248948825907 }, { 2, 8.0000000000000000000000000000000000, -0.017699569195767773909291677736213879 }, { 2, 16.000000000000000000000000000000000, -0.0041580101239589621541865297842265262 }, { 2, 32.000000000000000000000000000000000, -0.0010075567602140907392185110593117265 }, { 2, 64.000000000000000000000000000000000, -0.00024798512216328534949893202341675581 }, { 2, 128.00000000000000000000000000000000, -0.000061513856015459056093727063597403146 }, { 2, 256.00000000000000000000000000000000, -0.000015318510122005107648117663349723503 }, { 2, 512.00000000000000000000000000000000, -3.8221551221702861883051574825692679e-6 }, { 2, 1024.0000000000000000000000000000000, -9.5460609372807180482794242236285690e-7 }, { 2, 2048.0000000000000000000000000000000, -2.3853502284509660646447307719091929e-7 }, { 2, 4096.0000000000000000000000000000000, -5.9619198466975795959019740002484769e-8 }, { 2, 8192.0000000000000000000000000000000, -1.4902980294273504017537750635770593e-8 }, { 2, 16384.000000000000000000000000000000, -3.7255176790762511898502424554181168e-9 }, { 2, 32768.000000000000000000000000000000, -9.3135099675858978849200435754135096e-10 }, { 2, 65536.000000000000000000000000000000, -2.3283419639465348371721333739142464e-10 }, { 2, 131072.00000000000000000000000000000, -5.8208105004371323183654400926421586e-11 }, { 2, 262144.00000000000000000000000000000, -1.4551970739623962182873920142648449e-11 }, { 2, 524288.00000000000000000000000000000, -3.6379857459922343037889500943887953e-12 }, { 2, 1.0485760000000000000000000000000000e6, -9.0949556913507981662486265691361231e-13 }, { 2, 2.0971520000000000000000000000000000e6, -2.2737378386347515742334544652596257e-13 }, { 2, 4.1943040000000000000000000000000000e6, -5.6843432413336786525629259100975662e-14 }, { 2, 8.3886080000000000000000000000000000e6, -1.4210856409267999200219031777240284e-14 }, { 2, 1.6777216000000000000000000000000000e7, -3.5527138905587440538179478730582199e-15 }, { 2, 3.3554432000000000000000000000000000e7, -8.8817844616990522846624354086352033e-16 }, { 2, 6.7108864000000000000000000000000000e7, -2.2204460823375378294874032126041593e-16 }, { 2, 1.3421772800000000000000000000000000e8, -5.5511151644848134838439376350034016e-17 }, { 2, 2.6843545600000000000000000000000000e8, -1.3877787859513245136156122749960089e-17 }, { 2, 5.3687091200000000000000000000000000e8, -3.4694469584159627304129087489268059e-18 }, { 2, 1.0737418240000000000000000000000000e9, -8.6736173879619711452843652170069542e-19 }, { 2, 2.1474836480000000000000000000000000e9, -2.1684043459807508269328995828313535e-19 }, { 2, 4.2949672960000000000000000000000000e9, -5.4210108636896996185378196868612602e-20 }, { 2, 8.5899345920000000000000000000000000e9, -1.3552527157646527235627019117855720e-20 }, { 2, 1.7179869184000000000000000000000000e10, -3.3881317892144165825842826725813744e-21 }, { 2, 3.4359738368000000000000000000000000e10, -8.4703294727895224235683785200562563e-22 }, { 2, 6.8719476736000000000000000000000000e10, -2.1175823681665657267812262331022925e-22 }, { 2, 1.3743895347200000000000000000000000e11, -5.2939559203778957180649004761553143e-23 }, { 2, 2.7487790694400000000000000000000000e11, -1.3234889800896591046552307550599825e-23 }, { 2, 5.4975581388800000000000000000000000e11, -3.3087224502181292305618503541427776e-24 }, { 2, 1.0995116277760000000000000000000000e12, -8.2718061255377999125593529818894574e-25 }, { 2, 2.1990232555520000000000000000000000e12, -2.0679515313835095826591797740024589e-25 }, { 2, 4.3980465111040000000000000000000000e12, -5.1698788284575984622971267465834721e-26 }, { 2, 8.7960930222080000000000000000000000e12, -1.2924697071142526787804288756502028e-26 }, { 2, 1.7592186044416000000000000000000000e13, -3.2311742677854480259587561910416561e-27 }, { 2, 3.5184372088832000000000000000000000e13, -8.0779356694633904761564954897872834e-28 }, { 2, 7.0368744177664000000000000000000000e13, -2.0194839173658189204465744995814610e-28 }, { 2, 1.4073748835532800000000000000000000e14, -5.0487097934145114278757495332542949e-29 }, { 2, 2.8147497671065600000000000000000000e14, -1.2621774483536233728138515438750504e-29 }, { 2, 5.6294995342131200000000000000000000e14, -3.1554436208840528268407715604044070e-30 }, { 2, 1.1258999068426240000000000000000000e15, -7.8886090522101250606096072769163284e-31 }, { 2, 2.2517998136852480000000000000000000e15, -1.9721522630525303893408616162178294e-31 }, { 2, 4.5035996273704960000000000000000000e15, -4.9303806576313248785877287867808721e-32 }, { 2, 9.0071992547409920000000000000000000e15, -1.2325951644078310828013790399747782e-32 }, { 2, 1.8014398509481984000000000000000000e16, -3.0814879110195775359465061540364098e-33 }, { 2, 3.6028797018963968000000000000000000e16, -7.7037197775489436260450885777153639e-34 }, { 2, 7.2057594037927936000000000000000000e16, -1.9259299443872358797836250435068840e-34 }, { 2, 1.4411518807585587200000000000000000e17, -4.8148248609680896660495037326147640e-35 }, { 2, 2.8823037615171174400000000000000000e17, -1.2037062152420224123361810736346353e-35 }, { 2, 5.7646075230342348800000000000000000e17, -3.0092655381050560256202091096877686e-36 }, { 2, 1.1529215046068469760000000000000000e18, -7.5231638452626400575252183062208969e-37 }, { 2, 2.3058430092136939520000000000000000e18, -1.8807909613156600135656415180554087e-37 }, { 2, 4.6116860184273879040000000000000000e18, -4.7019774032891500328945249720137522e-38 }, { 2, 9.2233720368547758080000000000000000e18, -1.1754943508222875080961838901128419e-38 }, { 2, 1.8446744073709551616000000000000000e19, -2.9387358770557187700811505341688594e-39 }, { 2, 3.6893488147419103232000000000000000e19, -7.3468396926392969250037398465305920e-40 }, { 2, 7.3786976294838206464000000000000000e19, -1.8367099231598242312260429005212034e-40 }, { 2, 1.4757395258967641292800000000000000e20, -4.5917748078995605780339921749137029e-41 }, { 2, 2.9514790517935282585600000000000000e20, -1.1479437019748901445046086591797625e-41 }, { 2, 5.9029581035870565171200000000000000e20, -2.8698592549372253612566599172635773e-42 }, { 2, 1.1805916207174113034240000000000000e21, -7.1746481373430634031355726298016569e-43 }, { 2, 2.3611832414348226068480000000000000e21, -1.7936620343357658507831335120307534e-43 }, { 2, 4.7223664828696452136960000000000000e21, -4.4841550858394146269568842233023076e-44 }, { 2, 9.4447329657392904273920000000000000e21, -1.1210387714598536567391023612287549e-44 }, { 2, 1.8889465931478580854784000000000000e22, -2.8025969286496341418476075348258598e-45 }, { 2, 3.7778931862957161709568000000000000e22, -7.0064923216240853546188333767571150e-46 }, { 2, 7.5557863725914323419136000000000000e22, -1.7516230804060213386546851616508370e-46 }, { 2, 1.5111572745182864683827200000000000e23, -4.3790577010150533466366839259540402e-47 }, { 2, 3.0223145490365729367654400000000000e23, -1.0947644252537633366591673592168785e-47 }, { 2, 6.0446290980731458735308800000000000e23, -2.7369110631344083416479138702026569e-48 }, { 2, 1.2089258196146291747061760000000000e24, -6.8422776578360208541197790157072179e-49 }, { 2, 2.4178516392292583494123520000000000e24, -1.7105694144590052135299440464518764e-49 }, { 2, 4.8357032784585166988247040000000000e24, -4.2764235361475130338248592317860310e-50 }, { 2, 9.6714065569170333976494080000000000e24, -1.0691058840368782584562146974035503e-50 }, { 2, 1.9342813113834066795298816000000000e25, -2.6727647100921956461405366053301788e-51 }, { 2, 3.8685626227668133590597632000000000e25, -6.6819117752304891153513413406020758e-52 }, { 2, 7.7371252455336267181195264000000000e25, -1.6704779438076222788378353135600976e-52 }, { 2, 1.5474250491067253436239052800000000e26, -4.1761948595190556970945882569122172e-53 }, { 2, 3.0948500982134506872478105600000000e26, -1.0440487148797639242736470608545510e-53 }, { 2, 6.1897001964269013744956211200000000e26, -2.6101217871994098106841176479194982e-54 }, { 2, 1.2379400392853802748991242240000000e27, -6.5253044679985245267102941145276465e-55 }, { 2, 2.4758800785707605497982484480000000e27, -1.6313261169996311316775735279730243e-55 }, { 2, 4.9517601571415210995964968960000000e27, -4.0783152924990778291939338191089514e-56 }, { 2, 9.9035203142830421991929937920000000e27, -1.0195788231247694572984834546742867e-56 }, { 2, 1.9807040628566084398385987584000000e28, -2.5489470578119236432462086365570278e-57 }, { 2, 3.9614081257132168796771975168000000e28, -6.3723676445298091081155215912317084e-58 }, { 2, 7.9228162514264337593543950336000000e28, -1.5930919111324522770288803977878195e-58 }, { 2, 1.5845632502852867518708790067200000e29, -3.9827297778311306925722009944444141e-59 }, { 2, 3.1691265005705735037417580134400000e29, -9.9568244445778267314305024860796170e-60 }, { 2, 6.3382530011411470074835160268800000e29, -2.4892061111444566828576256215159770e-60 }, { 2, 1.2676506002282294014967032053760000e30, -6.2230152778611417071440640537850333e-61 }, - { 4, 2.0000000000000000000000000000000000, -0.88626612344087823195277167496882003}, { 4, 4.0000000000000000000000000000000000, -0.037500691342112799854006242870054601 }, { 4, 8.0000000000000000000000000000000000, -0.0018687951506376135155684814141062787 }, { 4, 16.000000000000000000000000000000000, -0.00010359125360358782747907937474060894 }, { 4, 32.000000000000000000000000000000000, -6.0889806370027137702207132674152980e-6 }, { 4, 64.000000000000000000000000000000000, -3.6894923384141876864824136311646410e-7 }, { 4, 128.00000000000000000000000000000000, -2.2703261395872369173970078168917455e-8 }, { 4, 256.00000000000000000000000000000000, -1.4079333251018200826827045864949986e-9 }, { 4, 512.00000000000000000000000000000000, -8.7653106993395973543058191653743071e-11 }, { 4, 1024.0000000000000000000000000000000, -5.4676350252855605594922081412167012e-12 }, { 4, 2048.0000000000000000000000000000000, -3.4139371559748457865769094969096427e-13 }, { 4, 4096.0000000000000000000000000000000, -2.1326692531241146202038690286850691e-14 }, { 4, 8192.0000000000000000000000000000000, -1.3325929232891576568330300144201981e-15 }, { 4, 16384.000000000000000000000000000000, -8.3276891759241673633332539309962691e-17 }, { 4, 32768.000000000000000000000000000000, -5.2044880733635773100598702692535183e-18 }, { 4, 65536.000000000000000000000000000000, -3.2527057803921971134912503489998463e-19 }, { 4, 131072.00000000000000000000000000000, -2.0329100928805067785989990248970031e-20 }, { 4, 262144.00000000000000000000000000000, -1.2705591144350687435054305331329679e-21 }, { 4, 524288.00000000000000000000000000000, -7.9409641728159744142284095369593220e-23 }, { 4, 1.0485760000000000000000000000000000e6, -4.9630931416565518652153749436192000e-24 }, { 4, 2.0971520000000000000000000000000000e6, -3.1019302553034238539128749896589195e-25 }, { 4, 4.1943040000000000000000000000000000e6, -1.9387054851177155898453895640231670e-26 }, { 4, 8.3886080000000000000000000000000000e6, -1.2116906393089944897903424066391815e-27 }, { 4, 1.6777216000000000000000000000000000e7, -7.5730655929014196050202587407391615e-29 }, { 4, 3.3554432000000000000000000000000000e7, -4.7331657134447220363116949282744848e-30 }, { 4, 6.7108864000000000000000000000000000e7, -2.9582284827408716767299704712288552e-31 }, { 4, 1.3421772800000000000000000000000000e8, -1.8488927741623954373880437387993075e-32 }, { 4, 2.6843545600000000000000000000000000e8, -1.1555579752419193033729099502283072e-33 }, { 4, 5.3687091200000000000000000000000000e8, -7.2222373183570650057583536416196423e-35 }, { 4, 1.0737418240000000000000000000000000e9, -4.5138983155653748230741551964743254e-36 }, { 4, 2.1474836480000000000000000000000000e9, -2.8211864446009246407535785204401521e-37 }, { 4, 4.2949672960000000000000000000000000e9, -1.7632415270545045810527364994409865e-38 }, { 4, 8.5899345920000000000000000000000000e9, -1.1020259541524799509144333467867914e-39 }, { 4, 1.7179869184000000000000000000000000e10, -6.8876622126511702800708681871153888e-41 }, { 4, 3.4359738368000000000000000000000000e10, -4.3047888826564097334549177850495839e-42 }, { 4, 6.8719476736000000000000000000000000e10, -2.6904930515819524297904926510117385e-43 }, { 4, 1.3743895347200000000000000000000000e11, -1.6815581572142503768636183351690905e-44 }, { 4, 2.7487790694400000000000000000000000e11, -1.0509738482512596443662561409356175e-45 }, { 4, 5.4975581388800000000000000000000000e11, -6.5685865515464763986220054285432304e-47 }, { 4, 1.0995116277760000000000000000000000e12, -4.1053665947090801308053030433926733e-48 }, { 4, 2.1990232555520000000000000000000000e12, -2.5658541216908414510241138209492617e-49 }, { 4, 4.3980465111040000000000000000000000e12, -1.6036588260560466472871963710133920e-50 }, { 4, 8.7960930222080000000000000000000000e12, -1.0022867662848012609285994319421665e-51 }, { 4, 1.7592186044416000000000000000000000e13, -6.2642922892792957132228143635273796e-53 }, { 4, 3.5184372088832000000000000000000000e13, -3.9151826807993372683952177161081714e-54 }, { 4, 7.0368744177664000000000000000000000e13, -2.4469891754995162451316856809457970e-55 }, { 4, 1.4073748835532800000000000000000000e14, -1.5293682346871759195775143660953743e-56 }, { 4, 2.8147497671065600000000000000000000e14, -9.5585514667947815797663735871501036e-58 }, { 4, 5.6294995342131200000000000000000000e14, -5.9740946667467172631061424917674488e-59 }, { 4, 1.1258999068426240000000000000000000e15, -3.7338091667166916568638887448064559e-60 }, - { 5, 2.0000000000000000000000000000000000, 2.0811674381338967657421515749104633 }, { 5, 4.0000000000000000000000000000000000, 0.041558384635954378910875854745854295 }, { 5, 8.0000000000000000000000000000000000, 0.00098951000477133869852907040195234770 }, { 5, 16.000000000000000000000000000000000, 0.000026687171525751195904263272526023849 }, { 5, 32.000000000000000000000000000000000, 7.7287973331327549424848375559872037e-7 }, { 5, 64.000000000000000000000000000000000, 2.3238496018000614929174818530730601e-8 }, { 5, 128.00000000000000000000000000000000, 7.1224092682782859288630591196158856e-10 }, { 5, 256.00000000000000000000000000000000, 2.2041868318688703092956583673488732e-11 }, { 5, 512.00000000000000000000000000000000, 6.8545820059344569325690341822051481e-13 }, - { 5, 1024.0000000000000000000000000000000, 2.1368374599013908699681782557176684e-14 }, { 5, 2048.0000000000000000000000000000000, 6.6694736345106372565672272296621720e-16 }, { 5, 4096.0000000000000000000000000000000, 2.0829390307857624148581922800405889e-17 }, { 5, 8192.0000000000000000000000000000000, 6.5071985107212205839819397506176587e-19 }, { 5, 16384.000000000000000000000000000000, 2.0331892850726898586186509892109697e-20 }, - { 30, 2.0000000000000000000000000000000000, -1.2351841765847806469554512503841320e23 }, { 30, 4.0000000000000000000000000000000000, -5.7574709672867347088590035301645472e13 }, { 30, 8.0000000000000000000000000000000000, -27506.955293920803735428099734719508 }, { 30, 16.000000000000000000000000000000000, -0.000014776733178819597558222752004691771 }, { 30, 32.000000000000000000000000000000000, -9.5598830564651701596127591449043084e-15 }, { 30, 64.000000000000000000000000000000000, -7.2304485310918134795078579958346544e-24 }, { 30, 128.00000000000000000000000000000000, -6.0283544055510492723170660715813893e-33 }, { 30, 256.00000000000000000000000000000000, -5.3033945300844267682288152122688373e-42 }, { 30, 512.00000000000000000000000000000000, -4.7984984493788567623415259200478215e-51 }, { 30, 1024.0000000000000000000000000000000, -4.4044059984515492135344714328158802e-60 }, { 30, 2048.0000000000000000000000000000000, -4.0720911710023652995468796384464697e-69 }, { 30, 4096.0000000000000000000000000000000, -3.7785912001586472052142107275635729e-78 }, { 30, 8192.0000000000000000000000000000000, -3.5126550370582447330888831842922732e-87 }, { 30, 16384.000000000000000000000000000000, -3.2684225122971143182856602549511625e-96 }, { 30, 32768.000000000000000000000000000000, -3.0425628731892016567765116031607680e-105 }, { 30, 65536.000000000000000000000000000000, -2.8329590706806369266402498060974102e-114 }, { 30, 131072.00000000000000000000000000000, -2.6380968281136772828042603723998837e-123 }, { 30, 262144.00000000000000000000000000000, -2.4567785517794442581328674255623958e-132 }, { 30, 524288.00000000000000000000000000000, -2.2879878661829847442965875847125058e-141 }, { 30, 1.0485760000000000000000000000000000e6, -2.1308242685223148657953902073871316e-150 }, { 30, 2.0971520000000000000000000000000000e6, -1.9844705497704998113296263703338786e-159 }, { 30, 4.1943040000000000000000000000000000e6, -1.8481756120690176942737056133829355e-168 }, { 30, 8.3886080000000000000000000000000000e6, -1.7212445915482984340950265207437808e-177 }, { 30, 1.6777216000000000000000000000000000e7, -1.6030325113209352859611074788378703e-186 }, { 30, 3.3554432000000000000000000000000000e7, -1.4929396982396668313427669448409354e-195 }, { 30, 6.7108864000000000000000000000000000e7, -1.3904081327297841105213325845203069e-204 }, { 30, 1.3421772800000000000000000000000000e8, -1.2949183372218004102189189609880637e-213 }, { 30, 2.6843545600000000000000000000000000e8, -1.2059866123484480516357481544084177e-222 }, { 30, 5.3687091200000000000000000000000000e8, -1.1231625253833571996113692012033249e-231 }, { 30, 1.0737418240000000000000000000000000e9, -1.0460266002388281642669220414065145e-240 }, { 30, 2.1474836480000000000000000000000000e9, -9.7418817964607553111407834656180990e-250 }, { 30, 4.2949672960000000000000000000000000e9, -9.0728344045929855573515168095233657e-259 }, { 30, 8.5899345920000000000000000000000000e9, -8.4497354819902512502834172688634013e-268 }, { 30, 1.7179869184000000000000000000000000e10, -7.8694293970360059201227925630244920e-277 }, { 30, 3.4359738368000000000000000000000000e10, -7.3289772436027860614787732271106255e-286 }, { 30, 6.8719476736000000000000000000000000e10, -6.8256419543205073368020956733620994e-295 }, { 30, 1.3743895347200000000000000000000000e11, -6.3568744376074160576260336726346352e-304 }, { 30, 2.7487790694400000000000000000000000e11, -5.9203006674167918417546432760193032e-313 }, { 30, 5.4975581388800000000000000000000000e11, -5.5137096599259016840358774274418939e-322 }, { 30, 1.0995116277760000000000000000000000e12, -5.1350422760943708365732963065500637e-331 }, { 30, 2.1990232555520000000000000000000000e12, -4.7823807932989146872399082006693143e-340 }, { 30, 4.3980465111040000000000000000000000e12, -4.4539391931915691818714510320431840e-349 }, { 30, 8.7960930222080000000000000000000000e12, -4.1480541165768856815409742503596800e-358 }, { 30, 1.7592186044416000000000000000000000e13, -3.8631764394914254898921483964257641e-367 }, { 30, 3.5184372088832000000000000000000000e13, -3.5978634278194778773174853574513736e-376 }, { 30, 7.0368744177664000000000000000000000e13, -3.3507714307109927261253979955016489e-385 }, { 30, 1.4073748835532800000000000000000000e14, -3.1206490757974196189832923991915393e-394 }, { 30, 2.8147497671065600000000000000000000e14, -2.9063309317429115226430982195302982e-403 }, { 30, 5.6294995342131200000000000000000000e14, -2.7067316060353387914883678696809847e-412 }, { 30, 1.1258999068426240000000000000000000e15, -2.5208402481258872249902802122831258e-421 }, { 30, 2.2517998136852480000000000000000000e15, -2.3477154300789073415295882015261417e-430 }, { 30, 4.5035996273704960000000000000000000e15, -2.1864803788055661339931292249701424e-439 }, { 30, 9.0071992547409920000000000000000000e15, -2.0363185357354232042765617960742937e-448 }, { 30, 1.8014398509481984000000000000000000e16, -1.8964694214383340521722742474983073e-457 }, { 30, 3.6028797018963968000000000000000000e16, -1.7662247842534755008372178353398608e-466 }, { 30, 7.2057594037927936000000000000000000e16, -1.6449250134206145379392674041454779e-475 }, { 30, 1.4411518807585587200000000000000000e17, -1.5319557985482871222587909400586267e-484 }, { 30, 2.8823037615171174400000000000000000e17, -1.4267450185011020326364788255126534e-493 }, { 30, 5.7646075230342348800000000000000000e17, -1.3287598439502548384585954790099239e-502 }, { 30, 1.1529215046068469760000000000000000e18, -1.2375040389134127843853680088571555e-511 }, { 30, 2.3058430092136939520000000000000000e18, -1.1525154476178928989312989675999669e-520 }, { 30, 4.6116860184273879040000000000000000e18, -1.0733636539596066765325327508232535e-529 }, { 30, 9.2233720368547758080000000000000000e18, -9.9964780170433844885501818972479211e-539 }, { 30, 1.8446744073709551616000000000000000e19, -9.3099456439198781553856371993072353e-548 }, { 30, 3.6893488147419103232000000000000000e19, -8.6705625466256198953841239814504762e-557 }, { 30, 7.3786976294838206464000000000000000e19, -8.0750906342879122995040411743125170e-566 }, { 30, 1.4757395258967641292800000000000000e20, -7.5205141997783559362248117439409145e-575 }, { 30, 2.9514790517935282585600000000000000e20, -7.0040246469698435960734303533011581e-584 }, { 30, 5.9029581035870565171200000000000000e20, -6.5230062668862227312246814035998837e-593 }, { 30, 1.1805916207174113034240000000000000e21, -6.0750229907093781336599992450810038e-602 }, { 30, 2.3611832414348226068480000000000000e21, -5.6578060525556822620531601462211155e-611 }, { 30, 4.7223664828696452136960000000000000e21, -5.2692424995411953535258666060047970e-620 }, { 30, 9.4447329657392904273920000000000000e21, -4.9073644909460054277605359114212468e-629 }, { 30, 1.8889465931478580854784000000000000e22, -4.5703393322844108825145652571006034e-638 }, { 30, 3.7778931862957161709568000000000000e22, -4.2564601938095045113123493445833636e-647 }, { 30, 7.5557863725914323419136000000000000e22, -3.9641374664469664090420159863859993e-656 }, { 30, 1.5111572745182864683827200000000000e23, -3.6918907113810688341424078675611601e-665 }, { 30, 3.0223145490365729367654400000000000e23, -3.4383411625223875363750612697898904e-674 }, { 30, 6.0446290980731458735308800000000000e23, -3.2022047438867274079238771888571055e-683 }, { 30, 1.2089258196146291747061760000000000e24, -2.9822855665224859564787125744222496e-692 }, { 30, 2.4178516392292583494123520000000000e24, -2.7774698720523025435197111896762965e-701 }, { 30, 4.8357032784585166988247040000000000e24, -2.5867203921566741015014262629362602e-710 }, { 30, 9.6714065569170333976494080000000000e24, -2.4090710954337139627909495039162813e-719 }, { 30, 1.9342813113834066795298816000000000e25, -2.2436222950310576360588405614024340e-728 }, { 30, 3.8685626227668133590597632000000000e25, -2.0895360922730133273255449640176061e-737 }, { 30, 7.7371252455336267181195264000000000e25, -1.9460321332076688551581879695116458e-746 }, { 30, 1.5474250491067253436239052800000000e26, -1.8123836565834180034307649180969011e-755 }, { 30, 3.0948500982134506872478105600000000e26, -1.6879138132402841033700526042422183e-764 }, { 30, 6.1897001964269013744956211200000000e26, -1.5719922382759713599179429591983936e-773 }, { 30, 1.2379400392853802748991242240000000e27, -1.4640318586267264186571752095136003e-782 }, { 30, 2.4758800785707605497982484480000000e27, -1.3634859198953271085928894585406723e-791 }, { 30, 4.9517601571415210995964968960000000e27, -1.2698452173688701433994709089494920e-800 }, { 30, 9.9035203142830421991929937920000000e27, -1.1826355172031280988822420193126128e-809 }, { 30, 1.9807040628566084398385987584000000e28, -1.1014151547133252945563215933898419e-818 }, { 30, 3.9614081257132168796771975168000000e28, -1.0257727976081197099353387886404875e-827 }, { 30, 7.9228162514264337593543950336000000e28, -9.5532536283891621039746216353614015e-837 }, { 30, 1.5845632502852867518708790067200000e29, -8.8971607651460562869670071028704372e-846 }, { 30, 3.1691265005705735037417580134400000e29, -8.2861266705636459281360796675545348e-855 }, { 30, 6.3382530011411470074835160268800000e29, -7.7170568244193177000955489160105929e-864 }, { 30, 1.2676506002282294014967032053760000e30, -7.1870692301721476950641245729469486e-873 }, - { 31, 2.0000000000000000000000000000000000, 1.9145332544935048093264355986676073e24 }, { 31, 4.0000000000000000000000000000000000, 4.4611518561919816922776795853710092e14 }, { 31, 8.0000000000000000000000000000000000, 106267.95619808419253963903669279065 }, { 31, 16.000000000000000000000000000000000, 0.000028318136062027075392587779376335821 }, { 31, 32.000000000000000000000000000000000, 9.0814734303237413772295578988209818e-15 } + { 1, SC_(2.0000000000000000000000000000000000), SC_(0.64493406684822643647241516664602519) }, { 1, SC_(4.0000000000000000000000000000000000), SC_(0.28382295573711532536130405553491408) }, { 1, SC_(8.0000000000000000000000000000000000), SC_(0.13313701469403142513454668592040161) }, { 1, SC_(16.000000000000000000000000000000000), SC_(0.064493783403239361781710772311927225) }, { 1, SC_(32.000000000000000000000000000000000), SC_(0.031743366520302090126581680438741427) }, { 1, SC_(64.000000000000000000000000000000000), SC_(0.015747706064338930155744003071350465) }, { 1, SC_(128.00000000000000000000000000000000), SC_(0.0078430970500146151295391657680446584) }, { 1, SC_(256.00000000000000000000000000000000), SC_(0.0039138893286083964054615299292933721) }, { 1, SC_(512.00000000000000000000000000000000), SC_(0.0019550335903952979329050939908745913) }, { 1, SC_(1024.0000000000000000000000000000000), SC_(0.00097703949237860262165259669085763056) }, + { 1, SC_(2048.0000000000000000000000000000000), SC_(0.00048840047869210349388677277938304048) }, { 1, SC_(4096.0000000000000000000000000000000), SC_(0.00024417042974770687112825193241674713) }, { 1, SC_(8192.0000000000000000000000000000000), SC_(0.00012207776338376182351559927851701587) }, { 1, SC_(16384.000000000000000000000000000000), SC_(0.000061037018933044843502668828413112893) }, { 1, SC_(32768.000000000000000000000000000000), SC_(0.000030518043791024259310109487753004549) }, + { 2, SC_(2.0000000000000000000000000000000000), SC_(-0.40411380631918857079947632302289998) }, { 2, SC_(4.0000000000000000000000000000000000), SC_(-0.080039732245114496725402248948825907) }, { 2, SC_(8.0000000000000000000000000000000000), SC_(-0.017699569195767773909291677736213879) }, { 2, SC_(16.000000000000000000000000000000000), SC_(-0.0041580101239589621541865297842265262) }, { 2, SC_(32.000000000000000000000000000000000), SC_(-0.0010075567602140907392185110593117265) }, { 2, SC_(64.000000000000000000000000000000000), SC_(-0.00024798512216328534949893202341675581) }, { 2, SC_(128.00000000000000000000000000000000), SC_(-0.000061513856015459056093727063597403146) }, { 2, SC_(256.00000000000000000000000000000000), SC_(-0.000015318510122005107648117663349723503) }, { 2, SC_(512.00000000000000000000000000000000), SC_(-3.8221551221702861883051574825692679e-6) }, { 2, SC_(1024.0000000000000000000000000000000), SC_(-9.5460609372807180482794242236285690e-7) }, { 2, SC_(2048.0000000000000000000000000000000), SC_(-2.3853502284509660646447307719091929e-7) }, { 2, SC_(4096.0000000000000000000000000000000), SC_(-5.9619198466975795959019740002484769e-8) }, { 2, SC_(8192.0000000000000000000000000000000), SC_(-1.4902980294273504017537750635770593e-8) }, { 2, SC_(16384.000000000000000000000000000000), SC_(-3.7255176790762511898502424554181168e-9) }, { 2, SC_(32768.000000000000000000000000000000), SC_(-9.3135099675858978849200435754135096e-10) }, { 2, SC_(65536.000000000000000000000000000000), SC_(-2.3283419639465348371721333739142464e-10) }, { 2, SC_(131072.00000000000000000000000000000), SC_(-5.8208105004371323183654400926421586e-11) }, { 2, SC_(262144.00000000000000000000000000000), SC_(-1.4551970739623962182873920142648449e-11) }, { 2, SC_(524288.00000000000000000000000000000), SC_(-3.6379857459922343037889500943887953e-12) }, { 2, SC_(1.0485760000000000000000000000000000e6), SC_(-9.0949556913507981662486265691361231e-13) }, { 2, SC_(2.0971520000000000000000000000000000e6), SC_(-2.2737378386347515742334544652596257e-13) }, { 2, SC_(4.1943040000000000000000000000000000e6), SC_(-5.6843432413336786525629259100975662e-14) }, { 2, SC_(8.3886080000000000000000000000000000e6), SC_(-1.4210856409267999200219031777240284e-14) }, { 2, SC_(1.6777216000000000000000000000000000e7), SC_(-3.5527138905587440538179478730582199e-15) }, { 2, SC_(3.3554432000000000000000000000000000e7), SC_(-8.8817844616990522846624354086352033e-16) }, { 2, SC_(6.7108864000000000000000000000000000e7), SC_(-2.2204460823375378294874032126041593e-16) }, { 2, SC_(1.3421772800000000000000000000000000e8), SC_(-5.5511151644848134838439376350034016e-17) }, { 2, SC_(2.6843545600000000000000000000000000e8), SC_(-1.3877787859513245136156122749960089e-17) }, { 2, SC_(5.3687091200000000000000000000000000e8), SC_(-3.4694469584159627304129087489268059e-18) }, { 2, SC_(1.0737418240000000000000000000000000e9), SC_(-8.6736173879619711452843652170069542e-19) }, { 2, SC_(2.1474836480000000000000000000000000e9), SC_(-2.1684043459807508269328995828313535e-19) }, { 2, SC_(4.2949672960000000000000000000000000e9), SC_(-5.4210108636896996185378196868612602e-20) }, { 2, SC_(8.5899345920000000000000000000000000e9), SC_(-1.3552527157646527235627019117855720e-20) }, { 2, SC_(1.7179869184000000000000000000000000e10), SC_(-3.3881317892144165825842826725813744e-21) }, { 2, SC_(3.4359738368000000000000000000000000e10), SC_(-8.4703294727895224235683785200562563e-22) }, { 2, SC_(6.8719476736000000000000000000000000e10), SC_(-2.1175823681665657267812262331022925e-22) }, { 2, SC_(1.3743895347200000000000000000000000e11), SC_(-5.2939559203778957180649004761553143e-23) }, { 2, SC_(2.7487790694400000000000000000000000e11), SC_(-1.3234889800896591046552307550599825e-23) }, { 2, SC_(5.4975581388800000000000000000000000e11), SC_(-3.3087224502181292305618503541427776e-24) }, { 2, SC_(1.0995116277760000000000000000000000e12), SC_(-8.2718061255377999125593529818894574e-25) }, { 2, SC_(2.1990232555520000000000000000000000e12), SC_(-2.0679515313835095826591797740024589e-25) }, { 2, SC_(4.3980465111040000000000000000000000e12), SC_(-5.1698788284575984622971267465834721e-26) }, { 2, SC_(8.7960930222080000000000000000000000e12), SC_(-1.2924697071142526787804288756502028e-26) }, { 2, SC_(1.7592186044416000000000000000000000e13), SC_(-3.2311742677854480259587561910416561e-27) }, { 2, SC_(3.5184372088832000000000000000000000e13), SC_(-8.0779356694633904761564954897872834e-28) }, { 2, SC_(7.0368744177664000000000000000000000e13), SC_(-2.0194839173658189204465744995814610e-28) }, { 2, SC_(1.4073748835532800000000000000000000e14), SC_(-5.0487097934145114278757495332542949e-29) }, { 2, SC_(2.8147497671065600000000000000000000e14), SC_(-1.2621774483536233728138515438750504e-29) }, { 2, SC_(5.6294995342131200000000000000000000e14), SC_(-3.1554436208840528268407715604044070e-30) }, { 2, SC_(1.1258999068426240000000000000000000e15), SC_(-7.8886090522101250606096072769163284e-31) }, { 2, SC_(2.2517998136852480000000000000000000e15), SC_(-1.9721522630525303893408616162178294e-31) }, { 2, SC_(4.5035996273704960000000000000000000e15), SC_(-4.9303806576313248785877287867808721e-32) }, { 2, SC_(9.0071992547409920000000000000000000e15), SC_(-1.2325951644078310828013790399747782e-32) }, { 2, SC_(1.8014398509481984000000000000000000e16), SC_(-3.0814879110195775359465061540364098e-33) }, { 2, SC_(3.6028797018963968000000000000000000e16), SC_(-7.7037197775489436260450885777153639e-34) }, { 2, SC_(7.2057594037927936000000000000000000e16), SC_(-1.9259299443872358797836250435068840e-34) }, { 2, SC_(1.4411518807585587200000000000000000e17), SC_(-4.8148248609680896660495037326147640e-35) }, { 2, SC_(2.8823037615171174400000000000000000e17), SC_(-1.2037062152420224123361810736346353e-35) }, { 2, SC_(5.7646075230342348800000000000000000e17), SC_(-3.0092655381050560256202091096877686e-36) }, { 2, SC_(1.1529215046068469760000000000000000e18), SC_(-7.5231638452626400575252183062208969e-37) }, { 2, SC_(2.3058430092136939520000000000000000e18), SC_(-1.8807909613156600135656415180554087e-37) }, { 2, SC_(4.6116860184273879040000000000000000e18), SC_(-4.7019774032891500328945249720137522e-38) }, { 2, SC_(9.2233720368547758080000000000000000e18), SC_(-1.1754943508222875080961838901128419e-38) }, { 2, SC_(1.8446744073709551616000000000000000e19), SC_(-2.9387358770557187700811505341688594e-39) }, { 2, SC_(3.6893488147419103232000000000000000e19), SC_(-7.3468396926392969250037398465305920e-40) }, { 2, SC_(7.3786976294838206464000000000000000e19), SC_(-1.8367099231598242312260429005212034e-40) }, { 2, SC_(1.4757395258967641292800000000000000e20), SC_(-4.5917748078995605780339921749137029e-41) }, { 2, SC_(2.9514790517935282585600000000000000e20), SC_(-1.1479437019748901445046086591797625e-41) }, { 2, SC_(5.9029581035870565171200000000000000e20), SC_(-2.8698592549372253612566599172635773e-42) }, { 2, SC_(1.1805916207174113034240000000000000e21), SC_(-7.1746481373430634031355726298016569e-43) }, { 2, SC_(2.3611832414348226068480000000000000e21), SC_(-1.7936620343357658507831335120307534e-43) }, { 2, SC_(4.7223664828696452136960000000000000e21), SC_(-4.4841550858394146269568842233023076e-44) }, { 2, SC_(9.4447329657392904273920000000000000e21), SC_(-1.1210387714598536567391023612287549e-44) }, { 2, SC_(1.8889465931478580854784000000000000e22), SC_(-2.8025969286496341418476075348258598e-45) }, { 2, SC_(3.7778931862957161709568000000000000e22), SC_(-7.0064923216240853546188333767571150e-46) }, { 2, SC_(7.5557863725914323419136000000000000e22), SC_(-1.7516230804060213386546851616508370e-46) }, { 2, SC_(1.5111572745182864683827200000000000e23), SC_(-4.3790577010150533466366839259540402e-47) }, { 2, SC_(3.0223145490365729367654400000000000e23), SC_(-1.0947644252537633366591673592168785e-47) }, { 2, SC_(6.0446290980731458735308800000000000e23), SC_(-2.7369110631344083416479138702026569e-48) }, { 2, SC_(1.2089258196146291747061760000000000e24), SC_(-6.8422776578360208541197790157072179e-49) }, { 2, SC_(2.4178516392292583494123520000000000e24), SC_(-1.7105694144590052135299440464518764e-49) }, { 2, SC_(4.8357032784585166988247040000000000e24), SC_(-4.2764235361475130338248592317860310e-50) }, { 2, SC_(9.6714065569170333976494080000000000e24), SC_(-1.0691058840368782584562146974035503e-50) }, { 2, SC_(1.9342813113834066795298816000000000e25), SC_(-2.6727647100921956461405366053301788e-51) }, { 2, SC_(3.8685626227668133590597632000000000e25), SC_(-6.6819117752304891153513413406020758e-52) }, { 2, SC_(7.7371252455336267181195264000000000e25), SC_(-1.6704779438076222788378353135600976e-52) }, { 2, SC_(1.5474250491067253436239052800000000e26), SC_(-4.1761948595190556970945882569122172e-53) }, { 2, SC_(3.0948500982134506872478105600000000e26), SC_(-1.0440487148797639242736470608545510e-53) }, { 2, SC_(6.1897001964269013744956211200000000e26), SC_(-2.6101217871994098106841176479194982e-54) }, { 2, SC_(1.2379400392853802748991242240000000e27), SC_(-6.5253044679985245267102941145276465e-55) }, { 2, SC_(2.4758800785707605497982484480000000e27), SC_(-1.6313261169996311316775735279730243e-55) }, { 2, SC_(4.9517601571415210995964968960000000e27), SC_(-4.0783152924990778291939338191089514e-56) }, { 2, SC_(9.9035203142830421991929937920000000e27), SC_(-1.0195788231247694572984834546742867e-56) }, { 2, SC_(1.9807040628566084398385987584000000e28), SC_(-2.5489470578119236432462086365570278e-57) }, { 2, SC_(3.9614081257132168796771975168000000e28), SC_(-6.3723676445298091081155215912317084e-58) }, { 2, SC_(7.9228162514264337593543950336000000e28), SC_(-1.5930919111324522770288803977878195e-58) }, { 2, SC_(1.5845632502852867518708790067200000e29), SC_(-3.9827297778311306925722009944444141e-59) }, { 2, SC_(3.1691265005705735037417580134400000e29), SC_(-9.9568244445778267314305024860796170e-60) }, { 2, SC_(6.3382530011411470074835160268800000e29), SC_(-2.4892061111444566828576256215159770e-60) }, { 2, SC_(1.2676506002282294014967032053760000e30), SC_(-6.2230152778611417071440640537850333e-61) }, + { 4, SC_(2.0000000000000000000000000000000000), SC_(-0.88626612344087823195277167496882003)}, { 4, SC_(4.0000000000000000000000000000000000), SC_(-0.037500691342112799854006242870054601) }, { 4, SC_(8.0000000000000000000000000000000000), SC_(-0.0018687951506376135155684814141062787) }, { 4, SC_(16.000000000000000000000000000000000), SC_(-0.00010359125360358782747907937474060894) }, { 4, SC_(32.000000000000000000000000000000000), SC_(-6.0889806370027137702207132674152980e-6) }, { 4, SC_(64.000000000000000000000000000000000), SC_(-3.6894923384141876864824136311646410e-7) }, { 4, SC_(128.00000000000000000000000000000000), SC_(-2.2703261395872369173970078168917455e-8) }, { 4, SC_(256.00000000000000000000000000000000), SC_(-1.4079333251018200826827045864949986e-9) }, { 4, SC_(512.00000000000000000000000000000000), SC_(-8.7653106993395973543058191653743071e-11) }, { 4, SC_(1024.0000000000000000000000000000000), SC_(-5.4676350252855605594922081412167012e-12) }, { 4, SC_(2048.0000000000000000000000000000000), SC_(-3.4139371559748457865769094969096427e-13) }, { 4, SC_(4096.0000000000000000000000000000000), SC_(-2.1326692531241146202038690286850691e-14) }, { 4, SC_(8192.0000000000000000000000000000000), SC_(-1.3325929232891576568330300144201981e-15) }, { 4, SC_(16384.000000000000000000000000000000), SC_(-8.3276891759241673633332539309962691e-17) }, { 4, SC_(32768.000000000000000000000000000000), SC_(-5.2044880733635773100598702692535183e-18) }, { 4, SC_(65536.000000000000000000000000000000), SC_(-3.2527057803921971134912503489998463e-19) }, { 4, SC_(131072.00000000000000000000000000000), SC_(-2.0329100928805067785989990248970031e-20) }, { 4, SC_(262144.00000000000000000000000000000), SC_(-1.2705591144350687435054305331329679e-21) }, { 4, SC_(524288.00000000000000000000000000000), SC_(-7.9409641728159744142284095369593220e-23) }, { 4, SC_(1.0485760000000000000000000000000000e6), SC_(-4.9630931416565518652153749436192000e-24) }, { 4, SC_(2.0971520000000000000000000000000000e6), SC_(-3.1019302553034238539128749896589195e-25) }, { 4, SC_(4.1943040000000000000000000000000000e6), SC_(-1.9387054851177155898453895640231670e-26) }, { 4, SC_(8.3886080000000000000000000000000000e6), SC_(-1.2116906393089944897903424066391815e-27) }, { 4, SC_(1.6777216000000000000000000000000000e7), SC_(-7.5730655929014196050202587407391615e-29) }, { 4, SC_(3.3554432000000000000000000000000000e7), SC_(-4.7331657134447220363116949282744848e-30) }, { 4, SC_(6.7108864000000000000000000000000000e7), SC_(-2.9582284827408716767299704712288552e-31) }, { 4, SC_(1.3421772800000000000000000000000000e8), SC_(-1.8488927741623954373880437387993075e-32) }, { 4, SC_(2.6843545600000000000000000000000000e8), SC_(-1.1555579752419193033729099502283072e-33) }, { 4, SC_(5.3687091200000000000000000000000000e8), SC_(-7.2222373183570650057583536416196423e-35) }, { 4, SC_(1.0737418240000000000000000000000000e9), SC_(-4.5138983155653748230741551964743254e-36) }, { 4, SC_(2.1474836480000000000000000000000000e9), SC_(-2.8211864446009246407535785204401521e-37) }, { 4, SC_(4.2949672960000000000000000000000000e9), SC_(-1.7632415270545045810527364994409865e-38) }, { 4, SC_(8.5899345920000000000000000000000000e9), SC_(-1.1020259541524799509144333467867914e-39) }, { 4, SC_(1.7179869184000000000000000000000000e10), SC_(-6.8876622126511702800708681871153888e-41) }, { 4, SC_(3.4359738368000000000000000000000000e10), SC_(-4.3047888826564097334549177850495839e-42) }, { 4, SC_(6.8719476736000000000000000000000000e10), SC_(-2.6904930515819524297904926510117385e-43) }, { 4, SC_(1.3743895347200000000000000000000000e11), SC_(-1.6815581572142503768636183351690905e-44) }, { 4, SC_(2.7487790694400000000000000000000000e11), SC_(-1.0509738482512596443662561409356175e-45) }, { 4, SC_(5.4975581388800000000000000000000000e11), SC_(-6.5685865515464763986220054285432304e-47) }, { 4, SC_(1.0995116277760000000000000000000000e12), SC_(-4.1053665947090801308053030433926733e-48) }, { 4, SC_(2.1990232555520000000000000000000000e12), SC_(-2.5658541216908414510241138209492617e-49) }, { 4, SC_(4.3980465111040000000000000000000000e12), SC_(-1.6036588260560466472871963710133920e-50) }, { 4, SC_(8.7960930222080000000000000000000000e12), SC_(-1.0022867662848012609285994319421665e-51) }, { 4, SC_(1.7592186044416000000000000000000000e13), SC_(-6.2642922892792957132228143635273796e-53) }, { 4, SC_(3.5184372088832000000000000000000000e13), SC_(-3.9151826807993372683952177161081714e-54) }, { 4, SC_(7.0368744177664000000000000000000000e13), SC_(-2.4469891754995162451316856809457970e-55) }, { 4, SC_(1.4073748835532800000000000000000000e14), SC_(-1.5293682346871759195775143660953743e-56) }, { 4, SC_(2.8147497671065600000000000000000000e14), SC_(-9.5585514667947815797663735871501036e-58) }, { 4, SC_(5.6294995342131200000000000000000000e14), SC_(-5.9740946667467172631061424917674488e-59) }, { 4, SC_(1.1258999068426240000000000000000000e15), SC_(-3.7338091667166916568638887448064559e-60) }, + { 5, SC_(2.0000000000000000000000000000000000), SC_(2.0811674381338967657421515749104633) }, { 5, SC_(4.0000000000000000000000000000000000), SC_(0.041558384635954378910875854745854295) }, { 5, SC_(8.0000000000000000000000000000000000), SC_(0.00098951000477133869852907040195234770) }, { 5, SC_(16.000000000000000000000000000000000), SC_(0.000026687171525751195904263272526023849) }, { 5, SC_(32.000000000000000000000000000000000), SC_(7.7287973331327549424848375559872037e-7) }, { 5, SC_(64.000000000000000000000000000000000), SC_(2.3238496018000614929174818530730601e-8) }, { 5, SC_(128.00000000000000000000000000000000), SC_(7.1224092682782859288630591196158856e-10) }, { 5, SC_(256.00000000000000000000000000000000), SC_(2.2041868318688703092956583673488732e-11) }, { 5, SC_(512.00000000000000000000000000000000), SC_(6.8545820059344569325690341822051481e-13) }, + { 5, SC_(1024.0000000000000000000000000000000), SC_(2.1368374599013908699681782557176684e-14) }, { 5, SC_(2048.0000000000000000000000000000000), SC_(6.6694736345106372565672272296621720e-16) }, { 5, SC_(4096.0000000000000000000000000000000), SC_(2.0829390307857624148581922800405889e-17) }, { 5, SC_(8192.0000000000000000000000000000000), SC_(6.5071985107212205839819397506176587e-19) }, { 5, SC_(16384.000000000000000000000000000000), SC_(2.0331892850726898586186509892109697e-20) }, + { SC_(30.0), SC_(2.0000000000000000000000000000000000), SC_(-1.2351841765847806469554512503841320e23) }, { SC_(30.0), SC_(4.0000000000000000000000000000000000), SC_(-5.7574709672867347088590035301645472e13) }, { SC_(30.0), SC_(8.0000000000000000000000000000000000), SC_(-27506.955293920803735428099734719508) }, { SC_(30.0), SC_(16.000000000000000000000000000000000), SC_(-0.000014776733178819597558222752004691771) }, { SC_(30.0), SC_(32.000000000000000000000000000000000), SC_(-9.5598830564651701596127591449043084e-15) }, { SC_(30.0), SC_(64.000000000000000000000000000000000), SC_(-7.2304485310918134795078579958346544e-24) }, { SC_(30.0), SC_(128.00000000000000000000000000000000), SC_(-6.0283544055510492723170660715813893e-33) }, { SC_(30.0), SC_(256.00000000000000000000000000000000), SC_(-5.3033945300844267682288152122688373e-42) }, { SC_(30.0), SC_(512.00000000000000000000000000000000), SC_(-4.7984984493788567623415259200478215e-51) }, { SC_(30.0), SC_(1024.0000000000000000000000000000000), SC_(-4.4044059984515492135344714328158802e-60) }, { SC_(30.0), SC_(2048.0000000000000000000000000000000), SC_(-4.0720911710023652995468796384464697e-69) }, { SC_(30.0), SC_(4096.0000000000000000000000000000000), SC_(-3.7785912001586472052142107275635729e-78) }, { SC_(30.0), SC_(8192.0000000000000000000000000000000), SC_(-3.5126550370582447330888831842922732e-87) }, { SC_(30.0), SC_(16384.000000000000000000000000000000), SC_(-3.2684225122971143182856602549511625e-96) }, { SC_(30.0), SC_(32768.000000000000000000000000000000), SC_(-3.0425628731892016567765116031607680e-105) }, { SC_(30.0), SC_(65536.000000000000000000000000000000), SC_(-2.8329590706806369266402498060974102e-114) }, { SC_(30.0), SC_(131072.00000000000000000000000000000), SC_(-2.6380968281136772828042603723998837e-123) }, { SC_(30.0), SC_(262144.00000000000000000000000000000), SC_(-2.4567785517794442581328674255623958e-132) }, { SC_(30.0), SC_(524288.00000000000000000000000000000), SC_(-2.2879878661829847442965875847125058e-141) }, { SC_(30.0), SC_(1.0485760000000000000000000000000000e6), SC_(-2.1308242685223148657953902073871316e-150) }, { SC_(30.0), SC_(2.0971520000000000000000000000000000e6), SC_(-1.9844705497704998113296263703338786e-159) }, { SC_(30.0), SC_(4.1943040000000000000000000000000000e6), SC_(-1.8481756120690176942737056133829355e-168) }, { SC_(30.0), SC_(8.3886080000000000000000000000000000e6), SC_(-1.7212445915482984340950265207437808e-177) }, { SC_(30.0), SC_(1.6777216000000000000000000000000000e7), SC_(-1.6030325113209352859611074788378703e-186) }, { SC_(30.0), SC_(3.3554432000000000000000000000000000e7), SC_(-1.4929396982396668313427669448409354e-195) }, { SC_(30.0), SC_(6.7108864000000000000000000000000000e7), SC_(-1.3904081327297841105213325845203069e-204) }, { SC_(30.0), SC_(1.3421772800000000000000000000000000e8), SC_(-1.2949183372218004102189189609880637e-213) }, { SC_(30.0), SC_(2.6843545600000000000000000000000000e8), SC_(-1.2059866123484480516357481544084177e-222) }, { SC_(30.0), SC_(5.3687091200000000000000000000000000e8), SC_(-1.1231625253833571996113692012033249e-231) }, { SC_(30.0), SC_(1.0737418240000000000000000000000000e9), SC_(-1.0460266002388281642669220414065145e-240) }, { SC_(30.0), SC_(2.1474836480000000000000000000000000e9), SC_(-9.7418817964607553111407834656180990e-250) }, { SC_(30.0), SC_(4.2949672960000000000000000000000000e9), SC_(-9.0728344045929855573515168095233657e-259) }, { SC_(30.0), SC_(8.5899345920000000000000000000000000e9), SC_(-8.4497354819902512502834172688634013e-268) }, { SC_(30.0), SC_(1.7179869184000000000000000000000000e10), SC_(-7.8694293970360059201227925630244920e-277) }, { SC_(30.0), SC_(3.4359738368000000000000000000000000e10), SC_(-7.3289772436027860614787732271106255e-286) }, { SC_(30.0), SC_(6.8719476736000000000000000000000000e10), SC_(-6.8256419543205073368020956733620994e-295) }, { SC_(30.0), SC_(1.3743895347200000000000000000000000e11), SC_(-6.3568744376074160576260336726346352e-304) }, { SC_(30.0), SC_(2.7487790694400000000000000000000000e11), SC_(-5.9203006674167918417546432760193032e-313) }, { SC_(30.0), SC_(5.4975581388800000000000000000000000e11), SC_(-5.5137096599259016840358774274418939e-322) }, { SC_(30.0), SC_(1.0995116277760000000000000000000000e12), SC_(-5.1350422760943708365732963065500637e-331) }, { SC_(30.0), SC_(2.1990232555520000000000000000000000e12), SC_(-4.7823807932989146872399082006693143e-340) }, { SC_(30.0), SC_(4.3980465111040000000000000000000000e12), SC_(-4.4539391931915691818714510320431840e-349) }, { SC_(30.0), SC_(8.7960930222080000000000000000000000e12), SC_(-4.1480541165768856815409742503596800e-358) }, { SC_(30.0), SC_(1.7592186044416000000000000000000000e13), SC_(-3.8631764394914254898921483964257641e-367) }, { SC_(30.0), SC_(3.5184372088832000000000000000000000e13), SC_(-3.5978634278194778773174853574513736e-376) }, { SC_(30.0), SC_(7.0368744177664000000000000000000000e13), SC_(-3.3507714307109927261253979955016489e-385) }, { SC_(30.0), SC_(1.4073748835532800000000000000000000e14), SC_(-3.1206490757974196189832923991915393e-394) }, { SC_(30.0), SC_(2.8147497671065600000000000000000000e14), SC_(-2.9063309317429115226430982195302982e-403) }, { SC_(30.0), SC_(5.6294995342131200000000000000000000e14), SC_(-2.7067316060353387914883678696809847e-412) }, { SC_(30.0), SC_(1.1258999068426240000000000000000000e15), SC_(-2.5208402481258872249902802122831258e-421) }, { SC_(30.0), SC_(2.2517998136852480000000000000000000e15), SC_(-2.3477154300789073415295882015261417e-430) }, { SC_(30.0), SC_(4.5035996273704960000000000000000000e15), SC_(-2.1864803788055661339931292249701424e-439) }, { SC_(30.0), SC_(9.0071992547409920000000000000000000e15), SC_(-2.0363185357354232042765617960742937e-448) }, { SC_(30.0), SC_(1.8014398509481984000000000000000000e16), SC_(-1.8964694214383340521722742474983073e-457) }, { SC_(30.0), SC_(3.6028797018963968000000000000000000e16), SC_(-1.7662247842534755008372178353398608e-466) }, { SC_(30.0), SC_(7.2057594037927936000000000000000000e16), SC_(-1.6449250134206145379392674041454779e-475) }, { SC_(30.0), SC_(1.4411518807585587200000000000000000e17), SC_(-1.5319557985482871222587909400586267e-484) }, { SC_(30.0), SC_(2.8823037615171174400000000000000000e17), SC_(-1.4267450185011020326364788255126534e-493) }, { SC_(30.0), SC_(5.7646075230342348800000000000000000e17), SC_(-1.3287598439502548384585954790099239e-502) }, { SC_(30.0), SC_(1.1529215046068469760000000000000000e18), SC_(-1.2375040389134127843853680088571555e-511) }, { SC_(30.0), SC_(2.3058430092136939520000000000000000e18), SC_(-1.1525154476178928989312989675999669e-520) }, { SC_(30.0), SC_(4.6116860184273879040000000000000000e18), SC_(-1.0733636539596066765325327508232535e-529) }, { SC_(30.0), SC_(9.2233720368547758080000000000000000e18), SC_(-9.9964780170433844885501818972479211e-539) }, { SC_(30.0), SC_(1.8446744073709551616000000000000000e19), SC_(-9.3099456439198781553856371993072353e-548) }, { SC_(30.0), SC_(3.6893488147419103232000000000000000e19), SC_(-8.6705625466256198953841239814504762e-557) }, { SC_(30.0), SC_(7.3786976294838206464000000000000000e19), SC_(-8.0750906342879122995040411743125170e-566) }, { SC_(30.0), SC_(1.4757395258967641292800000000000000e20), SC_(-7.5205141997783559362248117439409145e-575) }, { SC_(30.0), SC_(2.9514790517935282585600000000000000e20), SC_(-7.0040246469698435960734303533011581e-584) }, { SC_(30.0), SC_(5.9029581035870565171200000000000000e20), SC_(-6.5230062668862227312246814035998837e-593) }, { SC_(30.0), SC_(1.1805916207174113034240000000000000e21), SC_(-6.0750229907093781336599992450810038e-602) }, { SC_(30.0), SC_(2.3611832414348226068480000000000000e21), SC_(-5.6578060525556822620531601462211155e-611) }, { SC_(30.0), SC_(4.7223664828696452136960000000000000e21), SC_(-5.2692424995411953535258666060047970e-620) }, { SC_(30.0), SC_(9.4447329657392904273920000000000000e21), SC_(-4.9073644909460054277605359114212468e-629) }, { SC_(30.0), SC_(1.8889465931478580854784000000000000e22), SC_(-4.5703393322844108825145652571006034e-638) }, { SC_(30.0), SC_(3.7778931862957161709568000000000000e22), SC_(-4.2564601938095045113123493445833636e-647) }, { SC_(30.0), SC_(7.5557863725914323419136000000000000e22), SC_(-3.9641374664469664090420159863859993e-656) }, { SC_(30.0), SC_(1.5111572745182864683827200000000000e23), SC_(-3.6918907113810688341424078675611601e-665) }, { SC_(30.0), SC_(3.0223145490365729367654400000000000e23), SC_(-3.4383411625223875363750612697898904e-674) }, { SC_(30.0), SC_(6.0446290980731458735308800000000000e23), SC_(-3.2022047438867274079238771888571055e-683) }, { SC_(30.0), SC_(1.2089258196146291747061760000000000e24), SC_(-2.9822855665224859564787125744222496e-692) }, { SC_(30.0), SC_(2.4178516392292583494123520000000000e24), SC_(-2.7774698720523025435197111896762965e-701) }, { SC_(30.0), SC_(4.8357032784585166988247040000000000e24), SC_(-2.5867203921566741015014262629362602e-710) }, { SC_(30.0), SC_(9.6714065569170333976494080000000000e24), SC_(-2.4090710954337139627909495039162813e-719) }, { SC_(30.0), SC_(1.9342813113834066795298816000000000e25), SC_(-2.2436222950310576360588405614024340e-728) }, { SC_(30.0), SC_(3.8685626227668133590597632000000000e25), SC_(-2.0895360922730133273255449640176061e-737) }, { SC_(30.0), SC_(7.7371252455336267181195264000000000e25), SC_(-1.9460321332076688551581879695116458e-746) }, { SC_(30.0), SC_(1.5474250491067253436239052800000000e26), SC_(-1.8123836565834180034307649180969011e-755) }, { SC_(30.0), SC_(3.0948500982134506872478105600000000e26), SC_(-1.6879138132402841033700526042422183e-764) }, { SC_(30.0), SC_(6.1897001964269013744956211200000000e26), SC_(-1.5719922382759713599179429591983936e-773) }, { SC_(30.0), SC_(1.2379400392853802748991242240000000e27), SC_(-1.4640318586267264186571752095136003e-782) }, { SC_(30.0), SC_(2.4758800785707605497982484480000000e27), SC_(-1.3634859198953271085928894585406723e-791) }, { SC_(30.0), SC_(4.9517601571415210995964968960000000e27), SC_(-1.2698452173688701433994709089494920e-800) }, { SC_(30.0), SC_(9.9035203142830421991929937920000000e27), SC_(-1.1826355172031280988822420193126128e-809) }, { SC_(30.0), SC_(1.9807040628566084398385987584000000e28), SC_(-1.1014151547133252945563215933898419e-818) }, { SC_(30.0), SC_(3.9614081257132168796771975168000000e28), SC_(-1.0257727976081197099353387886404875e-827) }, { SC_(30.0), SC_(7.9228162514264337593543950336000000e28), SC_(-9.5532536283891621039746216353614015e-837) }, { SC_(30.0), SC_(1.5845632502852867518708790067200000e29), SC_(-8.8971607651460562869670071028704372e-846) }, { SC_(30.0), SC_(3.1691265005705735037417580134400000e29), SC_(-8.2861266705636459281360796675545348e-855) }, { SC_(30.0), SC_(6.3382530011411470074835160268800000e29), SC_(-7.7170568244193177000955489160105929e-864) }, { SC_(30.0), SC_(1.2676506002282294014967032053760000e30), SC_(-7.1870692301721476950641245729469486e-873) }, + { SC_(31.0), SC_(2.0000000000000000000000000000000000), SC_(1.9145332544935048093264355986676073e24) }, { SC_(31.0), SC_(4.0000000000000000000000000000000000), SC_(4.4611518561919816922776795853710092e14) }, { SC_(31.0), SC_(8.0000000000000000000000000000000000), SC_(106267.95619808419253963903669279065) }, { SC_(31.0), SC_(16.000000000000000000000000000000000), SC_(0.000028318136062027075392587779376335821) }, { SC_(31.0), SC_(32.000000000000000000000000000000000), SC_(9.0814734303237413772295578988209818e-15) } } }; do_test_polygamma(big_data, name, "Mathematica Data - large arguments"); } From d9ea302cff1132e499f1b7f5434ef3aed390e55f Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 23 Oct 2014 09:59:08 +0100 Subject: [PATCH 30/69] Hook up basic multiprecision digamma. --- .../boost/math/special_functions/digamma.hpp | 116 +++++++++++++++++- .../math/special_functions/polygamma.hpp | 14 +-- 2 files changed, 112 insertions(+), 18 deletions(-) diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index 785cd75c5..34c05b1a7 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -27,7 +27,8 @@ namespace detail{ // inline unsigned digamma_large_lim(const mpl::int_<0>*) { return 20; } - +inline unsigned digamma_large_lim(const mpl::int_<113>*) +{ return 20; } inline unsigned digamma_large_lim(const void*) { return 10; } // @@ -41,7 +42,7 @@ inline unsigned digamma_large_lim(const void*) // This first one gives 34-digit precision for x >= 20: // template -inline T digamma_imp_large(T x, const mpl::int_<0>*) +inline T digamma_imp_large(T x, const mpl::int_<113>*) { BOOST_MATH_STD_USING // ADL of std functions. static const T P[] = { @@ -141,12 +142,46 @@ inline T digamma_imp_large(T x, const mpl::int_<24>*) return result; } // +// Fully generic asymptotic expansion in terms of Bernoulli numbers: +// +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; + //T result_check = boost::math::bernoulli_b2n(k) / (2 * k * pow(xx, T(k))); + return result; + } + typedef T result_type; +}; + +template +inline T digamma_imp_large(T x, const Policy& pol, const mpl::int_<0>*) +{ + digamma_series_func s(x); + T result = log(x) - 1 / (2 * x); + boost::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; +} +// // Now follow rational approximations over the range [1,2]. // // 35-digit precision: // template -T digamma_imp_1_2(T x, const mpl::int_<0>*) +T digamma_imp_1_2(T x, const mpl::int_<113>*) { // // Now the approximation, we use the form: @@ -410,6 +445,67 @@ T digamma_imp(T x, const Tag* t, const Policy& pol) return result; } +template +T digamma_imp(T x, const mpl::int_<0>* t, const Policy& pol) +{ + // + // This handles reflection of negative arguments, and all our + // error handling, then forwards to the T-specific approximation. + // + BOOST_MATH_STD_USING // ADL of std functions. + + T result = 0; + // + // Check for negative arguments and use reflection: + // + if(x <= -1) + { + // Reflect: + x = 1 - x; + // Argument reduction for tan: + T remainder = x - floor(x); + // Shift to negative if > 0.5: + if(remainder > 0.5) + { + remainder -= 1; + } + // + // check for evaluation at a negative pole: + // + 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 we're above the lower-limit for the + // asymptotic expansion then use it, the + // limit is a linear interpolation with + // limit = 10 at 50 bit precision and + // limit = 250 at 1000 bit precision. + // + T lim = 10 + (tools::digits() - 50) * 240 / 950; + if(x >= lim) + { + result += digamma_imp_large(x, pol, t); + } + else + { + // + // Rescale so we can use the asymptotic expansion: + // + while(x < lim) + { + result -= 1 / x; + x += 1; + } + result += digamma_imp_large(x, pol, t); + } + return result; +} // // Initializer: ensure all our constants are initialized prior to the first call of main: // @@ -419,10 +515,16 @@ struct digamma_initializer struct init { init() + { + typedef typename policies::precision::type precision_type; + do_init(mpl::bool_()); + } + void do_init(const mpl::true_&) { boost::math::digamma(T(1.5), Policy()); boost::math::digamma(T(500), Policy()); } + void do_init(const mpl::false_&){} void force_instantiate()const{} }; static const init initializer; @@ -447,7 +549,7 @@ inline typename tools::promote_args::type typedef typename mpl::if_< mpl::or_< mpl::less_equal >, - mpl::greater > + mpl::greater > >, mpl::int_<0>, typename mpl::if_< @@ -456,7 +558,11 @@ inline typename tools::promote_args::type typename mpl::if_< mpl::less >, mpl::int_<53>, - mpl::int_<64> + typename mpl::if_< + mpl::less >, + mpl::int_<64>, + mpl::int_<113> + >::type >::type >::type >::type tag_type; diff --git a/include/boost/math/special_functions/polygamma.hpp b/include/boost/math/special_functions/polygamma.hpp index a122e0b94..071f13ca3 100644 --- a/include/boost/math/special_functions/polygamma.hpp +++ b/include/boost/math/special_functions/polygamma.hpp @@ -20,7 +20,7 @@ template - inline typename tools::promote_args::type polygamma(const int n, T x, const Policy &pol) + inline typename tools::promote_args::type polygamma(const int n, T x, const Policy &) { // // We've found some standard library functions to misbehave if any FPU exception flags @@ -71,18 +71,6 @@ return boost::math::polygamma(n, x, policies::policy<>()); } - template - inline T digamma(T x, const Policy &pol) - { - return boost::math::polygamma(0,x,pol); - } - - template - inline T digamma(T x) - { - return boost::math::digamma(x,policies::policy<>()); - } - template inline T trigamma(T x, const Policy &pol) { From 29e86c8fcbd5547d4db157009f72d200097ed528 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 23 Oct 2014 11:42:57 +0100 Subject: [PATCH 31/69] [Polygamma] Extend existing digamma implementation to true multiprecision. Add integer and half-integer test cases for digamma. Change polygamma to call digamma when order is zero. --- .../special_functions/detail/polygamma.hpp | 4 +++ .../boost/math/special_functions/digamma.hpp | 35 +++++++++++++++++-- test/test_digamma.cpp | 18 ++++++++-- test/test_digamma.hpp | 10 ++++++ 4 files changed, 63 insertions(+), 4 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index b8ea81af5..15d1a6957 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -259,6 +259,10 @@ template inline T polygamma_imp(const int n, T x, const Policy &pol) { + if(n == 0) + return boost::math::digamma(x); + if(n < 0) + return policies::raise_domain_error("boost::math::polygamma<%1%>(int, %1%)", "Order must be >= 0, but got %1%", n, pol); if(x < 0.5F) { return polygamma_nearzero(n, x, pol); diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index 34c05b1a7..3bf590ec9 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -142,7 +142,8 @@ inline T digamma_imp_large(T x, const mpl::int_<24>*) return result; } // -// Fully generic asymptotic expansion in terms of Bernoulli numbers: +// Fully generic asymptotic expansion in terms of Bernoulli numbers, see: +// http://functions.wolfram.com/06.14.06.0012.01 // template struct digamma_series_func @@ -158,7 +159,6 @@ public: T result = term * boost::math::bernoulli_b2n(k) / (2 * k); term /= xx; ++k; - //T result_check = boost::math::bernoulli_b2n(k) / (2 * k * pow(xx, T(k))); return result; } typedef T result_type; @@ -488,10 +488,41 @@ T digamma_imp(T x, const mpl::int_<0>* t, const Policy& pol) // limit = 250 at 1000 bit precision. // T lim = 10 + (tools::digits() - 50) * 240 / 950; + T two_x = ldexp(x, 1); if(x >= lim) { result += digamma_imp_large(x, pol, t); } + else if(floor(x) == x) + { + // + // Special case for integer arguments, see + // http://functions.wolfram.com/06.14.03.0001.01 + // + result = -constants::euler(); + T val = 1; + while(val < x) + { + result += 1 / val; + ++val; + } + } + else if(floor(two_x) == two_x) + { + // + // Special case for half integer arguments, see: + // http://functions.wolfram.com/06.14.03.0008.01 + // + 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 { // diff --git a/test/test_digamma.cpp b/test/test_digamma.cpp index 7926e7031..23ffc236a 100644 --- a/test/test_digamma.cpp +++ b/test/test_digamma.cpp @@ -42,6 +42,20 @@ void expected_results() ".*", // test type(s) ".*Negative.*", // test data group ".*", 300, 40); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + "real_concept", // test type(s) + ".*Near the Positive Root.*", // test data group + ".*", 25000, 3000); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + "real_concept", // test type(s) + ".*Half.*", // test data group + ".*", 15, 10); // test function add_expected_result( ".*", // compiler ".*", // stdlib @@ -72,8 +86,8 @@ void test_spots(T, const char* t) BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(0.125)), static_cast(-8.3884926632958548678027429230863430000514460424495L), tolerance); BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(0.5)), static_cast(-1.9635100260214234794409763329987555671931596046604L), tolerance); BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(1)), static_cast(-0.57721566490153286060651209008240243104215933593992L), tolerance); - BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(1.5)), static_cast(0.036489973978576520559023667001244432806840395339566L), tolerance); - BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(1.5) - static_cast(1)/32), static_cast(0.00686541147073577672813890866512415766586241385896200579891429L), tolerance); + BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(1.5)), static_cast(0.036489973978576520559023667001244432806840395339566L), tolerance * 40); + BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(1.5) - static_cast(1)/32), static_cast(0.00686541147073577672813890866512415766586241385896200579891429L), tolerance * 100); BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(2)), static_cast(0.42278433509846713939348790991759756895784066406008L), tolerance); BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(8)), static_cast(2.0156414779556099965363450527747404261006978069172L), tolerance); BOOST_CHECK_CLOSE(::boost::math::digamma(static_cast(12)), static_cast(2.4426616799758120167383652547949424463027180089374L), tolerance); diff --git a/test/test_digamma.hpp b/test/test_digamma.hpp index 3653d1699..250ce1046 100644 --- a/test/test_digamma.hpp +++ b/test/test_digamma.hpp @@ -82,6 +82,16 @@ void test_digamma(T, const char* name) }}; do_test_digamma(digamma_bugs, name, "Digamma Function: Values near 0"); + static const boost::array, 40> digamma_integers = { { + { 1, SC_(-0.57721566490153286060651209008240243) }, { 2, SC_(0.42278433509846713939348790991759757) }, { 3, SC_(0.92278433509846713939348790991759757) }, { 4, SC_(1.2561176684318004727268212432509309) }, { 5, SC_(1.5061176684318004727268212432509309) }, { 6, SC_(1.7061176684318004727268212432509309) }, { 7, SC_(1.8727843350984671393934879099175976) }, { 8, SC_(2.0156414779556099965363450527747404) }, { 9, SC_(2.1406414779556099965363450527747404) }, { SC_(10), SC_(2.2517525890667211076474561638858515) }, { SC_(11), SC_(2.3517525890667211076474561638858515) }, { SC_(12), SC_(2.4426616799758120167383652547949424) }, { SC_(13), SC_(2.5259950133091453500716985881282758) }, { SC_(14), SC_(2.6029180902322222731486216650513527) }, { SC_(15), SC_(2.6743466616607937017200502364799241) }, { SC_(16), SC_(2.7410133283274603683867169031465908) }, { SC_(17), SC_(2.8035133283274603683867169031465908) }, { SC_(18), SC_(2.8623368577392250742690698443230614) }, { SC_(19), SC_(2.9178924132947806298246253998786169) }, { SC_(20), SC_(2.9705239922421490508772569788259854) }, { SC_(21), SC_(3.0205239922421490508772569788259854) }, { SC_(22), SC_(3.0681430398611966699248760264450330) }, { SC_(23), SC_(3.1135975853157421244703305718995784) }, { SC_(24), SC_(3.1570758461853073418616349197256654) }, { SC_(25), SC_(3.1987425128519740085283015863923321) }, { SC_(26), SC_(3.2387425128519740085283015863923321) }, { SC_(27), SC_(3.2772040513135124700667631248538705) }, { SC_(28), SC_(3.3142410883505495071038001618909076) }, { SC_(29), SC_(3.3499553740648352213895144476051933) }, { SC_(30), SC_(3.3844381326855248765619282407086415) }, { SC_(31), SC_(3.4177714660188582098952615740419749) }, { SC_(32), SC_(3.4500295305349872421533260901710071) }, { SC_(33), SC_(3.4812795305349872421533260901710071) }, { SC_(34), SC_(3.5115825608380175451836291204740374) }, { SC_(35), SC_(3.5409943255438998981248055910622727) }, { SC_(36), SC_(3.5695657541153284695533770196337013) }, { SC_(37), SC_(3.5973435318931062473311547974114791) }, { SC_(38), SC_(3.6243705589201332743581818244385061) }, { SC_(39), SC_(3.6506863483938174848844976139121903) }, { SC_(40), SC_(3.6763273740348431259101386395532160) } + } }; + do_test_digamma(digamma_integers, name, "Digamma Function: Integer arguments"); + + static const boost::array, 41> digamma_half_integers = { { + { SC_(0.5), SC_(-1.9635100260214234794409763329987556) }, { SC_(1.5), SC_(0.036489973978576520559023667001244433) }, { SC_(2.5), SC_(0.70315664064524318722569033366791110) }, { SC_(3.5), SC_(1.1031566406452431872256903336679111) }, { SC_(4.5), SC_(1.3888709263595289015114046193821968) }, { SC_(5.5), SC_(1.6110931485817511237336268416044190) }, { SC_(6.5), SC_(1.7929113303999329419154450234226009) }, { SC_(7.5), SC_(1.9467574842460867880692911772687547) }, { SC_(8.5), SC_(2.0800908175794201214026245106020880) }, { SC_(9.5), SC_(2.1977378764029495331673303929550292) }, { SC_(10.5), SC_(2.3030010342976863752725935508497661) }, { SC_(11.5), SC_(2.3982391295357816133678316460878613) }, { SC_(12.5), SC_(2.4851956512749120481504403417400352) }, { SC_(13.5), SC_(2.5651956512749120481504403417400352) }, { SC_(14.5), SC_(2.6392697253489861222245144158141093) }, { SC_(15.5), SC_(2.7082352425903654325693420020210058) }, { SC_(16.5), SC_(2.7727513716226234970854710342790703) }, { SC_(17.5), SC_(2.8333574322286841031460770948851310) }, { SC_(18.5), SC_(2.8905002893715412460032199520279881) }, { SC_(19.5), SC_(2.9445543434255953000572740060820421) }, { SC_(20.5), SC_(2.9958363947076465821085560573640934) }, { SC_(21.5), SC_(3.0446168825125246308890438622421422) }, { SC_(22.5), SC_(3.0911285104195013750750903738700492) }, { SC_(23.5), SC_(3.1355729548639458195195348183144936) }, { SC_(24.5), SC_(3.1781261463533075216471943927825787) }, { SC_(25.5), SC_(3.2189424728839197665451535764560481) }, { SC_(26.5), SC_(3.2581581591584295704667222039070285) }, { SC_(27.5), SC_(3.2958940082150333440516278642843870) }, { SC_(28.5), SC_(3.3322576445786697076879915006480234) }, { SC_(29.5), SC_(3.3673453638769153217230792199462690) }, { SC_(30.5), SC_(3.4012436689616610844349436267259300) }, { SC_(31.5), SC_(3.4340305542075627237792059218078972) }, { SC_(32.5), SC_(3.4657765859535944698109519535539290) }, { SC_(33.5), SC_(3.4965458167228252390417211843231597) }, { SC_(34.5), SC_(3.5263965629914819554596316320843538) }, { SC_(35.5), SC_(3.5553820702378587670538345306350784) }, { SC_(36.5), SC_(3.5835510843223658093073556573956418) }, { SC_(37.5), SC_(3.6109483445963384120470816847929021) }, { SC_(38.5), SC_(3.6376150112630050787137483514595687) }, { SC_(39.5), SC_(3.6635890372370310527397223774335947) }, { SC_(40.5), SC_(3.6889054929332335843852919976867593) } + } }; + do_test_digamma(digamma_half_integers, name, "Digamma Function: Half integer arguments"); + BOOST_CHECK_THROW(boost::math::digamma(T(0)), std::domain_error); BOOST_CHECK_THROW(boost::math::digamma(T(-1)), std::domain_error); BOOST_CHECK_THROW(boost::math::digamma(T(-2)), std::domain_error); From f2ae6940ca30c41c741daf565dcdc72d97437e6d Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 23 Oct 2014 17:08:19 +0100 Subject: [PATCH 32/69] [Polygamma] Optimize zeta function for integer arguments. --- include/boost/math/special_functions/zeta.hpp | 28 +++++++++++++++++++ test/test_zeta.cpp | 9 +++++- test/test_zeta.hpp | 6 ++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index b176f2017..71ecf5124 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -874,6 +874,34 @@ T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag) "Evaluation of zeta function at pole %1%", s, pol); T result; + // + // Start by seeing if we have a simple closed form: + // + 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 <= boost::math::max_bernoulli_b2n::value) + return T((-v & 1) ? -1 : 1) * boost::math::unchecked_bernoulli_b2n(n) / (1 - v); + } + else if(((v / 2) <= boost::math::max_bernoulli_b2n::value) && ((v & 1) == 0) && (v <= 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); + } + } + } + catch(const boost::math::rounding_error&){} // Just fall through, s is too large to round + } + if(fabs(s) < tools::root_epsilon()) { result = -0.5f - constants::log_root_two_pi() * s; diff --git a/test/test_zeta.cpp b/test/test_zeta.cpp index bd8713d4f..8683b7c78 100644 --- a/test/test_zeta.cpp +++ b/test/test_zeta.cpp @@ -62,13 +62,20 @@ void expected_results() "real_concept", // test type(s) ".*Random values less than 1", // test data group ".*", 1200, 500); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + ".*Integer.*", // test data group + ".*", 30, 15); // test function add_expected_result( ".*", // compiler ".*", // stdlib ".*", // platform largest_type, // test type(s) ".*", // test data group - ".*", 3, 1); // test function + ".*", 3, 3); // test function add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/test_zeta.hpp b/test/test_zeta.hpp index d70abd442..3948d9e05 100644 --- a/test/test_zeta.hpp +++ b/test/test_zeta.hpp @@ -79,6 +79,12 @@ void test_zeta(T, const char* name) do_test_zeta(zeta_1_up_data, name, "Zeta: Values close to and greater than 1"); #include "zeta_1_below_data.ipp" do_test_zeta(zeta_1_below_data, name, "Zeta: Values close to and less than 1"); + + boost::array, 90> integer_data = { { + { 2, SC_(1.6449340668482264364724151666460252) }, { 3, SC_(1.2020569031595942853997381615114500) }, { 4, SC_(1.0823232337111381915160036965411679) }, { 5, SC_(1.0369277551433699263313654864570342) }, { 6, SC_(1.0173430619844491397145179297909205) }, { 7, SC_(1.0083492773819228268397975498497968) }, { 8, SC_(1.0040773561979443393786852385086525) }, { 9, SC_(1.0020083928260822144178527692324121) }, { SC_(10), SC_(1.0009945751278180853371459589003190) }, { SC_(11), SC_(1.0004941886041194645587022825264699) }, { SC_(12), SC_(1.0002460865533080482986379980477397) }, { SC_(13), SC_(1.0001227133475784891467518365263574) }, { SC_(14), SC_(1.0000612481350587048292585451051353) }, { SC_(15), SC_(1.0000305882363070204935517285106451) }, { SC_(16), SC_(1.0000152822594086518717325714876367) }, { SC_(17), SC_(1.0000076371976378997622736002935630) }, { SC_(18), SC_(1.0000038172932649998398564616446219) }, { SC_(19), SC_(1.0000019082127165539389256569577951) }, { SC_(20), SC_(1.0000009539620338727961131520386834) }, { SC_(21), SC_(1.0000004769329867878064631167196044) }, { SC_(22), SC_(1.0000002384505027277329900036481868) }, { SC_(23), SC_(1.0000001192199259653110730677887189) }, { SC_(24), SC_(1.0000000596081890512594796124402079) }, { SC_(25), SC_(1.0000000298035035146522801860637051) }, { SC_(26), SC_(1.0000000149015548283650412346585066) }, { SC_(27), SC_(1.0000000074507117898354294919810042) }, { SC_(28), SC_(1.0000000037253340247884570548192040) }, { SC_(29), SC_(1.0000000018626597235130490064039099) }, { SC_(30), SC_(1.0000000009313274324196681828717647) }, { SC_(31), SC_(1.0000000004656629065033784072989233) }, { SC_(32), SC_(1.0000000002328311833676505492001456) }, { SC_(33), SC_(1.0000000001164155017270051977592974) }, { SC_(34), SC_(1.0000000000582077208790270088924369) }, { SC_(35), SC_(1.0000000000291038504449709968692943) }, { SC_(36), SC_(1.0000000000145519218910419842359296) }, { SC_(37), SC_(1.0000000000072759598350574810145209) }, { SC_(38), SC_(1.0000000000036379795473786511902372) }, { SC_(39), SC_(1.0000000000018189896503070659475848) }, { SC_(40), SC_(1.0000000000009094947840263889282533) }, { SC_(41), SC_(1.0000000000004547473783042154026799) }, { SC_(42), SC_(1.0000000000002273736845824652515227) }, { SC_(43), SC_(1.0000000000001136868407680227849349) }, { SC_(44), SC_(1.0000000000000568434198762758560928) }, { SC_(45), SC_(1.0000000000000284217097688930185546) }, { SC_(46), SC_(1.0000000000000142108548280316067698) }, { SC_(47), SC_(1.0000000000000071054273952108527129) }, { SC_(48), SC_(1.0000000000000035527136913371136733) }, { SC_(49), SC_(1.0000000000000017763568435791203275) }, { SC_(50), SC_(1.0000000000000008881784210930815903) }, { SC_(51), SC_(1.0000000000000004440892103143813364) }, { SC_(52), SC_(1.0000000000000002220446050798041984) }, { SC_(53), SC_(1.0000000000000001110223025141066134) }, { SC_(54), SC_(1.0000000000000000555111512484548124) }, { SC_(55), SC_(1.0000000000000000277555756213612417) }, { SC_(56), SC_(1.0000000000000000138777878097252328) }, { SC_(57), SC_(1.0000000000000000069388939045441537) }, { SC_(58), SC_(1.0000000000000000034694469521659226) }, { SC_(59), SC_(1.0000000000000000017347234760475766) }, { SC_(60), SC_(1.0000000000000000008673617380119934) }, + { SC_(-61), SC_(-3.3066089876577576725680214670439210e34) }, { SC_(-59), SC_(3.5666582095375556109684574608651829e32) }, { SC_(-57), SC_(-4.1147288792557978697665486067619336e30) }, { SC_(-55), SC_(5.0890659468662289689766332915911925e28) }, { SC_(-53), SC_(-6.7645882379292820990945242301798478e26) }, { SC_(-51), SC_(9.6899578874635940656497942894654088e24) }, { SC_(-49), SC_(-1.5001733492153928733711440151515152e23) }, { SC_(-47), SC_(2.5180471921451095697089023320225526e21) }, { SC_(-45), SC_(-4.5979888343656503490437943262411348e19) }, { SC_(-43), SC_(9.1677436031953307756992753623188406e17) }, { SC_(-41), SC_(-2.0040310656516252738108421663238939e16) }, { SC_(-39), SC_(4.8241448354850170371581670362158167e14) }, { SC_(-37), SC_(-1.2850850499305083333333333333333333e13) }, { SC_(-35), SC_(3.8087931125245368811553022079337869e11) }, { SC_(-33), SC_(-1.2635724795916666666666666666666667e10) }, { SC_(-31), SC_(4.7238486772162990196078431372549020e8) }, { SC_(-29), SC_(-2.0052695796688078946143462272494531e7) }, { SC_(-27), SC_(974936.82385057471264367816091954023) }, { SC_(-25), SC_(-54827.583333333333333333333333333333) }, { SC_(-23), SC_(3607.5105463980463980463980463980464) }, { SC_(-21), SC_(-281.46014492753623188405797101449275) }, { SC_(-19), SC_(26.456212121212121212121212121212121) }, { SC_(-17), SC_(-3.0539543302701197438039543302701197) }, { SC_(-15), SC_(0.44325980392156862745098039215686275) }, { SC_(-13), SC_(-0.083333333333333333333333333333333333) }, { SC_(-11), SC_(0.021092796092796092796092796092796093) }, { -9, SC_(-0.0075757575757575757575757575757575758) }, { -7, SC_(0.0041666666666666666666666666666666667) }, { -5, SC_(-0.0039682539682539682539682539682539683) }, { -3, SC_(0.0083333333333333333333333333333333333) }, { -1, SC_(-0.083333333333333333333333333333333333) } + } }; + do_test_zeta(integer_data, name, "Zeta: Integer arguments"); } extern "C" double zetac(double); From bda3331ed3a2bf30784606e9c2f987c8f60848a0 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 24 Oct 2014 18:50:37 +0100 Subject: [PATCH 33/69] [Polygamma] Fix digits_base10 to actually return the correct value! Add support for negative x. Add missing using declaration to digamma. Update tests with negative x tests. --- include/boost/math/policies/policy.hpp | 2 +- .../special_functions/detail/polygamma.hpp | 170 ++++++++++++------ .../boost/math/special_functions/digamma.hpp | 1 + test/Jamfile.v2 | 1 + test/test_polygamma.hpp | 15 ++ 5 files changed, 130 insertions(+), 59 deletions(-) diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index c1d40306c..71309fa11 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -853,7 +853,7 @@ inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) template inline int digits_base10(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) { - return boost::math::policies::digits() * 1000L / 301; + return boost::math::policies::digits() * 301 / 1000L; } template diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 15d1a6957..380f02f9f 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -18,6 +18,10 @@ #include #include #include + #include + #include + #include + #include #include #include #include @@ -25,62 +29,6 @@ namespace boost { namespace math { namespace detail{ -#if 0 - - template - T digamma_atinfinityplus(const int, const T &x, const Policy&) - { - BOOST_MATH_STD_USING - - T z(x); - T log_z(log(z)); - T one_over_2z= T(1) / (2 * z); - T sum(0); - - for(int two_k = 2; two_k < max_iteration::value; two_k += 2) - { - - - T term(1); - T one_over_two_k = T(1) / two_k; - T z_pow_two_k = pow(z, static_cast(two_k)); - T one_over_z_pow_two_k = T(1) / z_pow_two_k; - T bernoulli_term = boost::math::bernoulli_b2n(two_k / 2); - - term = (bernoulli_term * one_over_two_k) * one_over_z_pow_two_k; - - if(term == 0) - { - continue; - } - - sum += term; - - T term_base_10_exp = ((term < 0) ? -term : term); - T sum_base_10_exp = ((sum < 0) ? -sum : sum); - - int exponent_value; - - static_cast(frexp(term_base_10_exp, &exponent_value)); - term_base_10_exp = T(exponent_value) * 0.303F; - - static_cast(frexp(sum_base_10_exp, &exponent_value)); - sum_base_10_exp = T(exponent_value) * 0.303F; - - long int order_check = boost::math::ltrunc(term_base_10_exp) - boost::math::ltrunc(sum_base_10_exp); - long int tol = std::numeric_limits::digits_base10; - - - if((two_k > 24) && (order_check < -tol)) - { - break; - } - } - - return (log_z - one_over_2z) - sum; - } -#endif - template T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol) // for large values of x such as for x> 400 { @@ -256,14 +204,120 @@ } + template + T poly_cot_pi(int n, T x, const Policy& pol) + { + // Return n'th derivative of cot(pi*x) at x: + T s = boost::math::sin_pi(x); + switch(n) + { + case 1: + return -constants::pi() / (s * s); + case 2: + { + T c = boost::math::cos_pi(x); + return 2 * constants::pi() * constants::pi() * c / boost::math::pow<3>(s); + } + case 3: + { + T c = boost::math::cos_pi(2 * x); + return -2 * boost::math::pow<3>(constants::pi()) * (c + 2) / boost::math::pow<4>(s); + } + case 4: + { + T c = boost::math::cos_pi(x); + T c2 = boost::math::cos_pi(2 * x); + return 4 * boost::math::pow<4>(constants::pi()) * (c2 + 5) * c / boost::math::pow<5>(s); + } + case 5: + { + T c2 = boost::math::cos_pi(2 * x); + T c4 = boost::math::cos_pi(4 * x); + return -2 * boost::math::pow<5>(constants::pi()) *(26 * c2 + c4 + 33) / boost::math::pow<6>(s); + } + case 6: + { + T c = boost::math::cos_pi(x); + T c2 = boost::math::cos_pi(2 * x); + T c4 = boost::math::cos_pi(4 * x); + return 4 * boost::math::pow<6>(constants::pi()) * (56 * c2 + c4 + 123) * c / boost::math::pow<7>(s); + } + case 7: + { + T c2 = boost::math::cos_pi(2 * x); + T c4 = boost::math::cos_pi(4 * x); + T c6 = boost::math::cos_pi(6 * x); + return -2 * boost::math::pow<7>(constants::pi()) * (1191 * c2 + 120 * c4 + c6 + 1208) / boost::math::pow<8>(s); + } + case 8: + { + T c = boost::math::cos_pi(x); + T c3 = boost::math::cos_pi(3 * x); + T c5 = boost::math::cos_pi(5 * x); + T c7 = boost::math::cos_pi(7 * x); + return 2 * boost::math::pow<8>(constants::pi()) * (15619 * c + 4293 * c3 + 247 * c5 + c7) / boost::math::pow<9>(s); + } + case 9: + { + T c2 = boost::math::cos_pi(2 * x); + T c4 = boost::math::cos_pi(4 * x); + T c6 = boost::math::cos_pi(6 * x); + T c8 = boost::math::cos_pi(8 * x); + return -2 * boost::math::pow<9>(constants::pi()) * (88234 * c2 + 14608 * c4 + 502 * c6 + c8 + 78095) / boost::math::pow<10>(s); + } + } + return policies::raise_domain_error("boost::math::polygamma<%1%>(int, %1%)", "Derivative of cotangent not implemented at n = %1%", n, pol); + } + template inline T polygamma_imp(const int n, T x, const Policy &pol) { + BOOST_MATH_STD_USING + static const char* function = "boost::math::polygamma<%1%>(int, %1%)"; if(n == 0) return boost::math::digamma(x); if(n < 0) - return policies::raise_domain_error("boost::math::polygamma<%1%>(int, %1%)", "Order must be >= 0, but got %1%", n, pol); - if(x < 0.5F) + return policies::raise_domain_error(function, "Order must be >= 0, but got %1%", n, pol); + if(x < 0) + { + if(floor(x) == x) + { + // + // Result is infinity if x is odd, and a pole error if x is even. + // + 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); + } + if(n < 10) + { + // + // We have tabulated the derivatives of cot(x) up to the 9th derivative, which + // allows us to use: http://functions.wolfram.com/06.15.16.0001.01 + T z = 1 - x; + T result = polygamma_imp(n, z, pol) + constants::pi() * poly_cot_pi(n, z, pol); + return n & 1 ? -result : result; + } + // + // Try http://functions.wolfram.com/06.15.16.0007.01 + // + if(x <= -static_cast(policies::get_max_series_iterations())) + return policies::raise_evaluation_error(function, "Argument is outside the bounds for which we can reasonably calculate polygamma (got x = %1%)", x, pol); + int m = boost::math::itrunc(ceil(-x)); + T z = x + m; + T sum = 0; + for(int k = 1; k <= m; ++k) + { + sum += pow(z - k, -n - 1); + } + sum *= boost::math::factorial(n); + if(n & 1) + sum = -sum; + return polygamma_imp(n, z, pol) - sum; + } + + if(x < 0.125F) { return polygamma_nearzero(n, x, pol); } diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index 3bf590ec9..d69b2cd68 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -167,6 +167,7 @@ public: template inline T digamma_imp_large(T x, const Policy& pol, const mpl::int_<0>*) { + BOOST_MATH_STD_USING digamma_series_func s(x); T result = log(x) - 1 / (2 * x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 6a80cdd8e..4f908aa9e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -604,6 +604,7 @@ run test_normal.cpp pch ../../test/build//boost_unit_test_framework ; run test_owens_t.cpp ../../test/build//boost_unit_test_framework ; run test_pareto.cpp ../../test/build//boost_unit_test_framework ; run test_polygamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ; +run test_trigamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ; run test_poisson.cpp ../../test/build//boost_unit_test_framework : # command line : # input files diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 419ffdea1..4cb522394 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -137,5 +137,20 @@ void test_polygamma(T, const char* name) { SC_(31.0), SC_(2.0000000000000000000000000000000000), SC_(1.9145332544935048093264355986676073e24) }, { SC_(31.0), SC_(4.0000000000000000000000000000000000), SC_(4.4611518561919816922776795853710092e14) }, { SC_(31.0), SC_(8.0000000000000000000000000000000000), SC_(106267.95619808419253963903669279065) }, { SC_(31.0), SC_(16.000000000000000000000000000000000), SC_(0.000028318136062027075392587779376335821) }, { SC_(31.0), SC_(32.000000000000000000000000000000000), SC_(9.0814734303237413772295578988209818e-15) } } }; do_test_polygamma(big_data, name, "Mathematica Data - large arguments"); + + boost::array, 214> neg_data = + { { + { 1, SC_(-12.750), SC_(19.663772856722737612034697464751605) }, { 1, SC_(-12.250), SC_(19.660817549236368273654684043826967) }, { 1, SC_(-11.750), SC_(19.657621376522814505537196503582823) }, { 1, SC_(-11.250), SC_(19.654153659190554029589711115880278) }, { 1, SC_(-10.750), SC_(19.650378280099093364749509767503149) }, { 1, SC_(-10.250), SC_(19.646252424622652795021809881312377) }, { 1, SC_(-9.7500), SC_(19.641724953976865133273035997897957) }, { 1, SC_(-9.2500), SC_(19.636734280660725370869519577921538) }, { 1, SC_(-8.7500), SC_(19.631205558842085383108670448917024) }, { 1, SC_(-8.2500), SC_(19.625046917622010980803778160828770) }, { 1, SC_(-7.7500), SC_(19.618144334352289464741323510141514) }, { 1, SC_(-7.2500), SC_(19.610354539293269015698176691590937) }, { 1, SC_(-6.7500), SC_(19.601495010731061577124257953429755) }, { 1, SC_(-6.2500), SC_(19.591329569019785068016844943671793) }, { 1, SC_(-5.7500), SC_(19.579547136931335925546754524074474) }, { 1, SC_(-5.2500), SC_(19.565729569019785068016844943671793) }, { 1, SC_(-4.7500), SC_(19.549301390239464469970194977760674) }, { 1, SC_(-4.2500), SC_(19.529448389881463072551992335962043) }, { 1, SC_(-3.7500), SC_(19.504980060599575273294294700752364) }, { 1, SC_(-3.2500), SC_(19.474085068082155114074483685443011) }, { 1, SC_(-2.7500), SC_(19.433868949488464162183183589641253) }, { 1, SC_(-2.2500), SC_(19.379410511869137362595193744614609) }, { 1, SC_(-1.7500), SC_(19.301637544529786476232770366500757) }, { 1, SC_(-1.2500), SC_(19.181879647671606498397662880417078) }, { 1, SC_(-0.75000), SC_(18.975106932284888517049096897113002) }, { 1, SC_(-0.25000), SC_(18.541879647671606498397662880417078) }, + { 2, SC_(-12.750), SC_(-124.03079461415823384604153251543681) }, { 2, SC_(-12.250), SC_(124.01896466745858356132308878716344) }, { 2, SC_(-11.750), SC_(-124.03175955222881001960976796032603) }, { 2, SC_(-11.250), SC_(124.01787668541028735821044014586602) }, { 2, SC_(-10.750), SC_(-124.03299241970518808612682102178640) }, { 2, SC_(-10.250), SC_(124.01647202148710491650947992638728) }, { 2, SC_(-9.7500), SC_(-124.03460234084420729198290916496876) }, { 2, SC_(-9.2500), SC_(124.01461482266526541911391108670126) }, { 2, SC_(-8.7500), SC_(-124.03676016548723903560636876475972) }, { 2, SC_(-8.2500), SC_(124.01208782525148933477537240192445) }, { 2, SC_(-7.7500), SC_(-124.03974558822776381694747663647984) }, { 2, SC_(-7.2500), SC_(124.00852603656573370687098416695770) }, { 2, SC_(-6.7500), SC_(-124.04404218787195165891317097369578) }, { 2, SC_(-6.2500), SC_(124.00327776890408296268303058132483) }, { 2, SC_(-5.7500), SC_(-124.05054526159038888901020902683808) }, { 2, SC_(-5.2500), SC_(123.99508576890408296268303058132483) }, { 2, SC_(-4.7500), SC_(-124.06106552130930069964553408642549) }, { 2, SC_(-4.2500), SC_(123.98126436732757934536308673076874) }, { 2, SC_(-3.7500), SC_(-124.07972713378925404561433420306057) }, { 2, SC_(-3.2500), SC_(123.95521103942202265902072971875978) }, { 2, SC_(-2.7500), SC_(-124.11765305971517997154026012898649) }, { 2, SC_(-2.2500), SC_(123.89694977406016558118732052440384) }, { 2, SC_(-1.7500), SC_(-124.21382135423058192495874247308867) }, { 2, SC_(-1.2500), SC_(123.72136678366236036856729308956159) }, { 2, SC_(-0.75000), SC_(-124.58699919679617959259722643810325) }, { 2, SC_(-0.25000), SC_(122.69736678366236036856729308956159) }, + { 3, SC_(-12.750), SC_(1558.5445992104061926890981987122713) }, { 3, SC_(-12.250), SC_(1558.5444945580353369268010524200916) }, { 3, SC_(-11.750), SC_(1558.5443721661542924129644962546503) }, { 3, SC_(-11.250), SC_(1558.5442281134520807137938731609983) }, { 3, SC_(-10.750), SC_(1558.5440573914794724810878018559796) }, { 3, SC_(-10.250), SC_(1558.5438535364058987293402837691373) }, { 3, SC_(-9.7500), SC_(1558.5436081111616066561977307462543) }, { 3, SC_(-9.2500), SC_(1558.5433099660190188764440197184975) }, { 3, SC_(-8.7500), SC_(1558.5429441651175968889289739463186) }, { 3, SC_(-8.2500), SC_(1558.5424903992902266328747639288402) }, { 3, SC_(-7.7500), SC_(1558.5419205916065598210405941045860) }, { 3, SC_(-7.2500), SC_(1558.5411952034044973136368045706704) }, { 3, SC_(-6.7500), SC_(1558.5402573917442935596345188772766) }, { 3, SC_(-6.2500), SC_(1558.5390235064410556263866168800637) }, { 3, SC_(-5.7500), SC_(1558.5373671367583214573691686314356) }, { 3, SC_(-5.2500), SC_(1558.5350913464410556263866168800637) }, { 3, SC_(-4.7500), SC_(1558.5318783056006283387768251220856) }, { 3, SC_(-4.2500), SC_(1558.5271934026830535593466489654603) }, { 3, SC_(-3.7500), SC_(1558.5200920240343420150070566273687) }, { 3, SC_(-3.2500), SC_(1558.5088028182791311925167498981598) }, { 3, SC_(-2.7500), SC_(1558.4897512832936012742663158866280) }, { 3, SC_(-2.2500), SC_(1558.4550231887143400437474491033697) }, { 3, SC_(-1.7500), SC_(1558.3848404165495264159916078748802) }, { 3, SC_(-1.2500), SC_(1558.2209125348505997602540791902467) }, { 3, SC_(-0.75000), SC_(1557.7451069721513589857542067919980) }, { 3, SC_(-0.25000), SC_(1555.7633125348505997602540791902467) }, + { 4, SC_(-12.750), SC_(-24481.574976569827769932951761311307) }, { 4, SC_(-12.250), SC_(24481.574556933476371183897773040987) }, { 4, SC_(-11.750), SC_(-24481.575047799396993548993707180364) }, { 4, SC_(-11.250), SC_(24481.574469931163471195977061446181) }, { 4, SC_(-10.750), SC_(-24481.575154956733102461973007401188) }, { 4, SC_(-10.250), SC_(24481.574336748213717601504674106852) }, { 4, SC_(-9.7500), SC_(-24481.575322130804866489839080372249) }, { 4, SC_(-9.2500), SC_(24481.574124623184691317447595452944) }, { 4, SC_(-8.7500), SC_(-24481.575594518925485881539083161966) }, { 4, SC_(-8.2500), SC_(24481.573770215950618995904133489849) }, { 4, SC_(-7.7500), SC_(-24481.576062438244817112573771089615) }, { 4, SC_(-7.2500), SC_(24481.573142242187841144152395619221) }, { 4, SC_(-6.7500), SC_(-24481.576920863980180344267229271453) }, { 4, SC_(-6.2500), SC_(24481.571944064552838833945395514059) }, { 4, SC_(-5.7500), SC_(-24481.578633607675571219683733120840) }, { 4, SC_(-5.2500), SC_(24481.569427482152838833945395514059) }, { 4, SC_(-4.7500), SC_(-24481.582451925002662084791450344735) }, { 4, SC_(-4.2500), SC_(24481.563410001194361068581610436266) }, { 4, SC_(-3.7500), SC_(-24481.592377214742692673229150129760) }, { 4, SC_(-3.2500), SC_(24481.546101215873022370388764255277) }, { 4, SC_(-2.7500), SC_(-24481.624740671532816130019273586550) }, { 4, SC_(-2.2500), SC_(24481.479910902562510187288086353997) }, { 4, SC_(-1.7500), SC_(-24481.777338295887834105691576149093) }, { 4, SC_(-1.2500), SC_(24481.063714184582527461077650952890) }, { 4, SC_(-0.75000), SC_(-24483.239586168797931089091350052823) }, { 4, SC_(-0.25000), SC_(24473.199394184582527461077650952890) }, + { 5, SC_(-12.750), SC_(492231.26705220367447285602722829798) }, { 5, SC_(-12.250), SC_(492231.26703986858726773334478356804) }, { 5, SC_(-11.750), SC_(492231.26702427051007143797156325129) }, { 5, SC_(-11.250), SC_(492231.26700435743914528929551352935) }, { 5, SC_(-10.750), SC_(492231.26697867164364211329952060413) }, { 5, SC_(-10.250), SC_(492231.26694516501703258064111915631) }, { 5, SC_(-9.7500), SC_(492231.26690091626142628638506805946) }, { 5, SC_(-9.2500), SC_(492231.26684168939311732012547103246) }, { 5, SC_(-8.7500), SC_(492231.26676123004572403423122047499) }, { 5, SC_(-8.2500), SC_(492231.26665011791524038956143753889) }, { 5, SC_(-7.7500), SC_(492231.26649384757753475935425594490) }, { 5, SC_(-7.2500), SC_(492231.26626952775598108546947519306) }, { 5, SC_(-6.7500), SC_(492231.26594002452246170664879905339) }, { 5, SC_(-6.2500), SC_(492231.26544319835253121636119925846) }, { 5, SC_(-5.7500), SC_(492231.26467132548883883596990731311) }, { 5, SC_(-5.2500), SC_(492231.26342993243253121636119925846) }, { 5, SC_(-4.7500), SC_(492231.26135104955223808370232711841) }, { 5, SC_(-4.2500), SC_(492231.25769899818636191601473727961) }, { 5, SC_(-3.7500), SC_(492231.25090337614167956955737997628) }, { 5, SC_(-3.2500), SC_(492231.23733572133772815343491824315) }, { 5, SC_(-2.7500), SC_(492231.20775210042151496050388203390) }, { 5, SC_(-2.2500), SC_(492231.13550447009078633328002916426) }, { 5, SC_(-1.7500), SC_(492230.93030187432148227746333192018) }, { 5, SC_(-1.2500), SC_(492230.21062287457971360836795049513) }, { 5, SC_(-0.75000), SC_(492226.75245080886406232489254933809) }, { 5, SC_(-0.25000), SC_(492198.75334287457971360836795049513) }, + { 6, SC_(-12.750), SC_(-1.1791224761262553923199740571475659e7) }, { 6, SC_(-12.250), SC_(1.1791224761212959953338096554813394e7) }, { 6, SC_(-11.750), SC_(-1.1791224761275698941741584362376857e7) }, { 6, SC_(-11.250), SC_(1.1791224761195566737931185183742355e7) }, { 6, SC_(-10.750), SC_(-1.1791224761298983469279962918313528e7) }, { 6, SC_(-10.250), SC_(1.1791224761163997446137740568065356e7) }, { 6, SC_(-9.7500), SC_(-1.1791224761342381822144610498473088e7) }, { 6, SC_(-9.2500), SC_(1.1791224761103426349211734412564015e7) }, { 6, SC_(-8.7500), SC_(-1.1791224761428342570269073362379294e7) }, { 6, SC_(-8.2500), SC_(1.1791224760979163768967238911569317e7) }, { 6, SC_(-7.7500), SC_(-1.1791224761611690548456004706583543e7) }, { 6, SC_(-7.2500), SC_(1.1791224760702370925869563208323974e7) }, { 6, SC_(-6.7500), SC_(-1.1791224762040456784641593897905007e7) }, { 6, SC_(-6.2500), SC_(1.1791224760018512109221395670440442e7) }, { 6, SC_(-5.7500), SC_(-1.1791224763168189258973034501364332e7) }, { 6, SC_(-5.2500), SC_(1.1791224758085776826021395670440442e7) }, { 6, SC_(-4.7500), SC_(-1.1791224766632825018904254258839318e7) }, { 6, SC_(-4.2500), SC_(1.1791224751536137687542195274483895e7) }, { 6, SC_(-3.7500), SC_(-1.1791224779829886169083430020877813e7) }, { 6, SC_(-3.2500), SC_(1.1791224722787982136529824573562902e7) }, { 6, SC_(-2.7500), SC_(-1.1791224848871927321346804506474521e7) }, { 6, SC_(-2.2500), SC_(1.1791224534791825988329541210690757e7) }, { 6, SC_(-1.7500), SC_(-1.1791225454217875175963567504038405e7) }, { 6, SC_(-1.2500), SC_(1.1791222068440904625468941445147639e7) }, { 6, SC_(-0.75000), SC_(-1.1791239778278671029974833461007258e7) }, { 6, SC_(-0.25000), SC_(1.1791071073496904625468941445147639e7) }, + { 7, SC_(-12.750), SC_(3.3035269585550319411369451657990653e8) }, { 7, SC_(-12.250), SC_(3.3035269585550014530679554645726841e8) }, { 7, SC_(-11.750), SC_(3.3035269585549597724076958273392155e8) }, { 7, SC_(-11.250), SC_(3.3035269585549020632656302567379925e8) }, { 7, SC_(-10.750), SC_(3.3035269585548210560734246359421460e8) }, { 7, SC_(-10.250), SC_(3.3035269585547056321166932680182245e8) }, { 7, SC_(-9.7500), SC_(3.3035269585545384621477943726294791e8) }, { 7, SC_(-9.2500), SC_(3.3035269585542919758450034698830934e8) }, { 7, SC_(-8.7500), SC_(3.3035269585539213080586956648886140e8) }, { 7, SC_(-8.2500), SC_(3.3035269585533516103728829633890794e8) }, { 7, SC_(-7.7500), SC_(3.3035269585524545242332002141349801e8) }, { 7, SC_(-7.2500), SC_(3.3035269585510030650375087453009371e8) }, { 7, SC_(-6.7500), SC_(3.3035269585485817969386206988585281e8) }, { 7, SC_(-6.2500), SC_(3.3035269585444002902560781621765444e8) }, { 7, SC_(-5.7500), SC_(3.3035269585368867935011094629708018e8) }, { 7, SC_(-5.2500), SC_(3.3035269585227536550842381621765444e8) }, { 7, SC_(-4.7500), SC_(3.3035269584947086190323815702711063e8) }, { 7, SC_(-4.2500), SC_(3.3035269584354251332378488235637904e8) }, { 7, SC_(-3.7500), SC_(3.3035269583002256126086884537779074e8) }, { 7, SC_(-3.2500), SC_(3.3035269579619261006329391884897976e8) }, { 7, SC_(-2.7500), SC_(3.3035269570114408444331054633801022e8) }, { 7, SC_(-2.2500), SC_(3.3035269539127781220563177006740899e8) }, { 7, SC_(-1.7500), SC_(3.3035269416026348990428605870784761e8) }, { 7, SC_(-1.2500), SC_(3.3035268771818605685450990413016373e8) }, { 7, SC_(-0.75000), SC_(3.3035263686402030648824099487997220e8) }, { 7, SC_(-0.25000), SC_(3.3035184214649965685450990413016373e8) }, + { 8, SC_(-7.7500), SC_(-1.0569114259666913771892699180522388e10) }, { 8, SC_(-7.2500), SC_(1.0569114259666319911021283350705169e10) }, { 8, SC_(-6.7500), SC_(-1.0569114259667313537290849324034796e10) }, { 8, SC_(-6.2500), SC_(1.0569114259665591328976435838084546e10) }, { 8, SC_(-5.7500), SC_(-1.0569114259668699611772332137177045e10) }, { 8, SC_(-5.2500), SC_(1.0569114259662820559674440318084546e10) }, { 8, SC_(-4.7500), SC_(-1.0569114259674567879524502974422220e10) }, { 8, SC_(-4.2500), SC_(1.0569114259649513356345466704581650e10) }, { 8, SC_(-3.7500), SC_(-1.0569114259707322912185335499305285e10) }, { 8, SC_(-3.2500), SC_(1.0569114259560384126678660185038311e10) }, { 8, SC_(-2.7500), SC_(-1.0569114259982263662729459870590150e10) }, { 8, SC_(-2.2500), SC_(1.0569114258563670778105953357268290e10) }, { 8, SC_(-1.7500), SC_(-1.0569114264464825392297531107332441e10) }, { 8, SC_(-1.2500), SC_(1.0569114231281566759079742278380307e10) }, { 8, SC_(-0.75000), SC_(-1.0569114526390508516485165684831300e10) }, { 8, SC_(-0.25000), SC_(1.0569108819622773799079742278380307e10) }, + { 9, SC_(-7.7500), SC_(3.8051374324233954962308727459400485e11) }, { 9, SC_(-7.2500), SC_(3.8051374324233938918730928010849146e11) }, { 9, SC_(-6.7500), SC_(3.8051374324233908537939910023379690e11) }, { 9, SC_(-6.2500), SC_(3.8051374324233848474063291767903138e11) }, { 9, SC_(-5.7500), SC_(3.8051374324233723728009045648294056e11) }, { 9, SC_(-5.2500), SC_(3.8051374324233449483283804413023138e11) }, { 9, SC_(-4.7500), SC_(3.8051374324232805216534792821594812e11) }, { 9, SC_(-4.2500), SC_(3.8051374324231168248427408936422641e11) }, { 9, SC_(-3.7500), SC_(3.8051374324226598999820108764248547e11) }, { 9, SC_(-3.2500), SC_(3.8051374324212293823321496967578170e11) }, { 9, SC_(-2.7500), SC_(3.8051374324160613219689518915140179e11) }, { 9, SC_(-2.2500), SC_(3.8051374323936280896024439692195702e11) }, { 9, SC_(-1.7500), SC_(3.8051374322693593017285422874024520e11) }, { 9, SC_(-1.2500), SC_(3.8051374313023439288413955260640509e11) }, { 9, SC_(-0.75000), SC_(3.8051374187988955981988925091310821e11) }, { 9, SC_(-0.25000), SC_(3.8051370416629108357213955260640509e11) } + } }; + do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); + } From dffdb444eee9d9c2b7856c4a39d129193fc27fd5 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 25 Oct 2014 17:28:09 +0100 Subject: [PATCH 34/69] Expand test cases for negative x. Add comment on the calculation of derivatives of cot(x). --- .../special_functions/detail/polygamma.hpp | 18 +++++++++++++++++- test/test_polygamma.hpp | 10 ++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 380f02f9f..75baf3454 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -207,7 +207,23 @@ template T poly_cot_pi(int n, T x, const Policy& pol) { - // Return n'th derivative of cot(pi*x) at x: + // Return n'th derivative of cot(pi*x) at x, these are simply + // tabulated for up to n = 9, beyond that it is possible to + // calculate coefficients as follows: + // + // The general form of each derivative is: + // + // pi^n * SUM{k=0, n} C[k,n] * cos(k * pi * x) * csc^(n+1)(pi * x) + // + // With constant C[0,1] = -1 and all other C[k,n] = 0; + // Then for each k < n+1: + // C[|1 - k|, n+1] += -(k + n + 2) * C[k, n] / 2; + // C[k + 1, n+1] += -(n + 2 - k) * C[k, n] / 2; + // + // It's worth noting however, that as well as requiring quite a bit + // of storage space, this method has no better accuracy than recursion + // on x to x > 0 when computing polygamma :-( + // T s = boost::math::sin_pi(x); switch(n) { diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 4cb522394..19c91c1d4 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -138,7 +138,7 @@ void test_polygamma(T, const char* name) } }; do_test_polygamma(big_data, name, "Mathematica Data - large arguments"); - boost::array, 214> neg_data = + boost::array, 310> neg_data = { { { 1, SC_(-12.750), SC_(19.663772856722737612034697464751605) }, { 1, SC_(-12.250), SC_(19.660817549236368273654684043826967) }, { 1, SC_(-11.750), SC_(19.657621376522814505537196503582823) }, { 1, SC_(-11.250), SC_(19.654153659190554029589711115880278) }, { 1, SC_(-10.750), SC_(19.650378280099093364749509767503149) }, { 1, SC_(-10.250), SC_(19.646252424622652795021809881312377) }, { 1, SC_(-9.7500), SC_(19.641724953976865133273035997897957) }, { 1, SC_(-9.2500), SC_(19.636734280660725370869519577921538) }, { 1, SC_(-8.7500), SC_(19.631205558842085383108670448917024) }, { 1, SC_(-8.2500), SC_(19.625046917622010980803778160828770) }, { 1, SC_(-7.7500), SC_(19.618144334352289464741323510141514) }, { 1, SC_(-7.2500), SC_(19.610354539293269015698176691590937) }, { 1, SC_(-6.7500), SC_(19.601495010731061577124257953429755) }, { 1, SC_(-6.2500), SC_(19.591329569019785068016844943671793) }, { 1, SC_(-5.7500), SC_(19.579547136931335925546754524074474) }, { 1, SC_(-5.2500), SC_(19.565729569019785068016844943671793) }, { 1, SC_(-4.7500), SC_(19.549301390239464469970194977760674) }, { 1, SC_(-4.2500), SC_(19.529448389881463072551992335962043) }, { 1, SC_(-3.7500), SC_(19.504980060599575273294294700752364) }, { 1, SC_(-3.2500), SC_(19.474085068082155114074483685443011) }, { 1, SC_(-2.7500), SC_(19.433868949488464162183183589641253) }, { 1, SC_(-2.2500), SC_(19.379410511869137362595193744614609) }, { 1, SC_(-1.7500), SC_(19.301637544529786476232770366500757) }, { 1, SC_(-1.2500), SC_(19.181879647671606498397662880417078) }, { 1, SC_(-0.75000), SC_(18.975106932284888517049096897113002) }, { 1, SC_(-0.25000), SC_(18.541879647671606498397662880417078) }, { 2, SC_(-12.750), SC_(-124.03079461415823384604153251543681) }, { 2, SC_(-12.250), SC_(124.01896466745858356132308878716344) }, { 2, SC_(-11.750), SC_(-124.03175955222881001960976796032603) }, { 2, SC_(-11.250), SC_(124.01787668541028735821044014586602) }, { 2, SC_(-10.750), SC_(-124.03299241970518808612682102178640) }, { 2, SC_(-10.250), SC_(124.01647202148710491650947992638728) }, { 2, SC_(-9.7500), SC_(-124.03460234084420729198290916496876) }, { 2, SC_(-9.2500), SC_(124.01461482266526541911391108670126) }, { 2, SC_(-8.7500), SC_(-124.03676016548723903560636876475972) }, { 2, SC_(-8.2500), SC_(124.01208782525148933477537240192445) }, { 2, SC_(-7.7500), SC_(-124.03974558822776381694747663647984) }, { 2, SC_(-7.2500), SC_(124.00852603656573370687098416695770) }, { 2, SC_(-6.7500), SC_(-124.04404218787195165891317097369578) }, { 2, SC_(-6.2500), SC_(124.00327776890408296268303058132483) }, { 2, SC_(-5.7500), SC_(-124.05054526159038888901020902683808) }, { 2, SC_(-5.2500), SC_(123.99508576890408296268303058132483) }, { 2, SC_(-4.7500), SC_(-124.06106552130930069964553408642549) }, { 2, SC_(-4.2500), SC_(123.98126436732757934536308673076874) }, { 2, SC_(-3.7500), SC_(-124.07972713378925404561433420306057) }, { 2, SC_(-3.2500), SC_(123.95521103942202265902072971875978) }, { 2, SC_(-2.7500), SC_(-124.11765305971517997154026012898649) }, { 2, SC_(-2.2500), SC_(123.89694977406016558118732052440384) }, { 2, SC_(-1.7500), SC_(-124.21382135423058192495874247308867) }, { 2, SC_(-1.2500), SC_(123.72136678366236036856729308956159) }, { 2, SC_(-0.75000), SC_(-124.58699919679617959259722643810325) }, { 2, SC_(-0.25000), SC_(122.69736678366236036856729308956159) }, @@ -148,7 +148,13 @@ void test_polygamma(T, const char* name) { 6, SC_(-12.750), SC_(-1.1791224761262553923199740571475659e7) }, { 6, SC_(-12.250), SC_(1.1791224761212959953338096554813394e7) }, { 6, SC_(-11.750), SC_(-1.1791224761275698941741584362376857e7) }, { 6, SC_(-11.250), SC_(1.1791224761195566737931185183742355e7) }, { 6, SC_(-10.750), SC_(-1.1791224761298983469279962918313528e7) }, { 6, SC_(-10.250), SC_(1.1791224761163997446137740568065356e7) }, { 6, SC_(-9.7500), SC_(-1.1791224761342381822144610498473088e7) }, { 6, SC_(-9.2500), SC_(1.1791224761103426349211734412564015e7) }, { 6, SC_(-8.7500), SC_(-1.1791224761428342570269073362379294e7) }, { 6, SC_(-8.2500), SC_(1.1791224760979163768967238911569317e7) }, { 6, SC_(-7.7500), SC_(-1.1791224761611690548456004706583543e7) }, { 6, SC_(-7.2500), SC_(1.1791224760702370925869563208323974e7) }, { 6, SC_(-6.7500), SC_(-1.1791224762040456784641593897905007e7) }, { 6, SC_(-6.2500), SC_(1.1791224760018512109221395670440442e7) }, { 6, SC_(-5.7500), SC_(-1.1791224763168189258973034501364332e7) }, { 6, SC_(-5.2500), SC_(1.1791224758085776826021395670440442e7) }, { 6, SC_(-4.7500), SC_(-1.1791224766632825018904254258839318e7) }, { 6, SC_(-4.2500), SC_(1.1791224751536137687542195274483895e7) }, { 6, SC_(-3.7500), SC_(-1.1791224779829886169083430020877813e7) }, { 6, SC_(-3.2500), SC_(1.1791224722787982136529824573562902e7) }, { 6, SC_(-2.7500), SC_(-1.1791224848871927321346804506474521e7) }, { 6, SC_(-2.2500), SC_(1.1791224534791825988329541210690757e7) }, { 6, SC_(-1.7500), SC_(-1.1791225454217875175963567504038405e7) }, { 6, SC_(-1.2500), SC_(1.1791222068440904625468941445147639e7) }, { 6, SC_(-0.75000), SC_(-1.1791239778278671029974833461007258e7) }, { 6, SC_(-0.25000), SC_(1.1791071073496904625468941445147639e7) }, { 7, SC_(-12.750), SC_(3.3035269585550319411369451657990653e8) }, { 7, SC_(-12.250), SC_(3.3035269585550014530679554645726841e8) }, { 7, SC_(-11.750), SC_(3.3035269585549597724076958273392155e8) }, { 7, SC_(-11.250), SC_(3.3035269585549020632656302567379925e8) }, { 7, SC_(-10.750), SC_(3.3035269585548210560734246359421460e8) }, { 7, SC_(-10.250), SC_(3.3035269585547056321166932680182245e8) }, { 7, SC_(-9.7500), SC_(3.3035269585545384621477943726294791e8) }, { 7, SC_(-9.2500), SC_(3.3035269585542919758450034698830934e8) }, { 7, SC_(-8.7500), SC_(3.3035269585539213080586956648886140e8) }, { 7, SC_(-8.2500), SC_(3.3035269585533516103728829633890794e8) }, { 7, SC_(-7.7500), SC_(3.3035269585524545242332002141349801e8) }, { 7, SC_(-7.2500), SC_(3.3035269585510030650375087453009371e8) }, { 7, SC_(-6.7500), SC_(3.3035269585485817969386206988585281e8) }, { 7, SC_(-6.2500), SC_(3.3035269585444002902560781621765444e8) }, { 7, SC_(-5.7500), SC_(3.3035269585368867935011094629708018e8) }, { 7, SC_(-5.2500), SC_(3.3035269585227536550842381621765444e8) }, { 7, SC_(-4.7500), SC_(3.3035269584947086190323815702711063e8) }, { 7, SC_(-4.2500), SC_(3.3035269584354251332378488235637904e8) }, { 7, SC_(-3.7500), SC_(3.3035269583002256126086884537779074e8) }, { 7, SC_(-3.2500), SC_(3.3035269579619261006329391884897976e8) }, { 7, SC_(-2.7500), SC_(3.3035269570114408444331054633801022e8) }, { 7, SC_(-2.2500), SC_(3.3035269539127781220563177006740899e8) }, { 7, SC_(-1.7500), SC_(3.3035269416026348990428605870784761e8) }, { 7, SC_(-1.2500), SC_(3.3035268771818605685450990413016373e8) }, { 7, SC_(-0.75000), SC_(3.3035263686402030648824099487997220e8) }, { 7, SC_(-0.25000), SC_(3.3035184214649965685450990413016373e8) }, { 8, SC_(-7.7500), SC_(-1.0569114259666913771892699180522388e10) }, { 8, SC_(-7.2500), SC_(1.0569114259666319911021283350705169e10) }, { 8, SC_(-6.7500), SC_(-1.0569114259667313537290849324034796e10) }, { 8, SC_(-6.2500), SC_(1.0569114259665591328976435838084546e10) }, { 8, SC_(-5.7500), SC_(-1.0569114259668699611772332137177045e10) }, { 8, SC_(-5.2500), SC_(1.0569114259662820559674440318084546e10) }, { 8, SC_(-4.7500), SC_(-1.0569114259674567879524502974422220e10) }, { 8, SC_(-4.2500), SC_(1.0569114259649513356345466704581650e10) }, { 8, SC_(-3.7500), SC_(-1.0569114259707322912185335499305285e10) }, { 8, SC_(-3.2500), SC_(1.0569114259560384126678660185038311e10) }, { 8, SC_(-2.7500), SC_(-1.0569114259982263662729459870590150e10) }, { 8, SC_(-2.2500), SC_(1.0569114258563670778105953357268290e10) }, { 8, SC_(-1.7500), SC_(-1.0569114264464825392297531107332441e10) }, { 8, SC_(-1.2500), SC_(1.0569114231281566759079742278380307e10) }, { 8, SC_(-0.75000), SC_(-1.0569114526390508516485165684831300e10) }, { 8, SC_(-0.25000), SC_(1.0569108819622773799079742278380307e10) }, - { 9, SC_(-7.7500), SC_(3.8051374324233954962308727459400485e11) }, { 9, SC_(-7.2500), SC_(3.8051374324233938918730928010849146e11) }, { 9, SC_(-6.7500), SC_(3.8051374324233908537939910023379690e11) }, { 9, SC_(-6.2500), SC_(3.8051374324233848474063291767903138e11) }, { 9, SC_(-5.7500), SC_(3.8051374324233723728009045648294056e11) }, { 9, SC_(-5.2500), SC_(3.8051374324233449483283804413023138e11) }, { 9, SC_(-4.7500), SC_(3.8051374324232805216534792821594812e11) }, { 9, SC_(-4.2500), SC_(3.8051374324231168248427408936422641e11) }, { 9, SC_(-3.7500), SC_(3.8051374324226598999820108764248547e11) }, { 9, SC_(-3.2500), SC_(3.8051374324212293823321496967578170e11) }, { 9, SC_(-2.7500), SC_(3.8051374324160613219689518915140179e11) }, { 9, SC_(-2.2500), SC_(3.8051374323936280896024439692195702e11) }, { 9, SC_(-1.7500), SC_(3.8051374322693593017285422874024520e11) }, { 9, SC_(-1.2500), SC_(3.8051374313023439288413955260640509e11) }, { 9, SC_(-0.75000), SC_(3.8051374187988955981988925091310821e11) }, { 9, SC_(-0.25000), SC_(3.8051370416629108357213955260640509e11) } + { 9, SC_(-7.7500), SC_(3.8051374324233954962308727459400485e11) }, { 9, SC_(-7.2500), SC_(3.8051374324233938918730928010849146e11) }, { 9, SC_(-6.7500), SC_(3.8051374324233908537939910023379690e11) }, { 9, SC_(-6.2500), SC_(3.8051374324233848474063291767903138e11) }, { 9, SC_(-5.7500), SC_(3.8051374324233723728009045648294056e11) }, { 9, SC_(-5.2500), SC_(3.8051374324233449483283804413023138e11) }, { 9, SC_(-4.7500), SC_(3.8051374324232805216534792821594812e11) }, { 9, SC_(-4.2500), SC_(3.8051374324231168248427408936422641e11) }, { 9, SC_(-3.7500), SC_(3.8051374324226598999820108764248547e11) }, { 9, SC_(-3.2500), SC_(3.8051374324212293823321496967578170e11) }, { 9, SC_(-2.7500), SC_(3.8051374324160613219689518915140179e11) }, { 9, SC_(-2.2500), SC_(3.8051374323936280896024439692195702e11) }, { 9, SC_(-1.7500), SC_(3.8051374322693593017285422874024520e11) }, { 9, SC_(-1.2500), SC_(3.8051374313023439288413955260640509e11) }, { 9, SC_(-0.75000), SC_(3.8051374187988955981988925091310821e11) }, { 9, SC_(-0.25000), SC_(3.8051370416629108357213955260640509e11) }, + {SC_(10), SC_(-7.7500), SC_(-1.5220204740668341333676731352020598e13)}, { SC_(10), SC_(-7.2500), SC_(1.5220204740668340669650877835677384e13) }, { SC_(10), SC_(-6.7500), SC_(-1.5220204740668341932700845125388608e13) }, { SC_(10), SC_(-6.2500), SC_(1.5220204740668339422138220784050543e13) }, { SC_(10), SC_(-5.7500), SC_(-1.5220204740668344670625746819834321e13) }, { SC_(10), SC_(-5.2500), SC_(1.5220204740668333038285748986372463e13) }, { SC_(10), SC_(-4.7500), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(10), SC_(-4.2500), SC_(1.5220204740668289586193246215389596e13) }, { SC_(10), SC_(-3.7500), SC_(-1.5220204740668491301932335869743932e13) }, { SC_(10), SC_(-3.2500), SC_(1.5220204740667845482073107110240315e13) }, { SC_(10), SC_(-2.7500), SC_(-1.5220204740670250922735818265720155e13) }, { SC_(10), SC_(-2.2500), SC_(1.5220204740659352776617813040228546e13) }, { SC_(10), SC_(-1.7500), SC_(-1.5220204740723597111914149030851634e13) }, { SC_(10), SC_(-1.2500), SC_(1.5220204740174337594057347065492760e13) }, { SC_(10), SC_(-0.75000), SC_(-1.5220204748421004942502520332720988e13) }, { SC_(10), SC_(-0.25000), SC_(1.5220204428462791119561347065492760e13) }, + {SC_(11), SC_(-7.7500), SC_(6.6969403856797204470999075620782555e14)}, { SC_(11), SC_(-7.2500), SC_(6.6969403856797204443997065278152669e14) }, { SC_(11), SC_(-6.7500), SC_(6.6969403856797204385976298181981934e14) }, { SC_(11), SC_(-6.2500), SC_(6.6969403856797204254719282828940321e14) }, { SC_(11), SC_(-5.7500), SC_(6.6969403856797203939795943831775966e14) }, { SC_(11), SC_(-5.2500), SC_(6.6969403856797203131161247792548979e14) }, { SC_(11), SC_(-4.7500), SC_(6.6969403856797200883878751610651220e14) }, { SC_(11), SC_(-4.2500), SC_(6.6969403856797194026913294831009712e14) }, { SC_(11), SC_(-3.7500), SC_(6.6969403856797170626423300519402108e14) }, { SC_(11), SC_(-3.2500), SC_(6.6969403856797079082317494121441662e14) }, { SC_(11), SC_(-2.7500), SC_(6.6969403856796654470987612349915749e14) }, { SC_(11), SC_(-2.2500), SC_(6.6969403856794204628163394590053064e14) }, { SC_(11), SC_(-1.7500), SC_(6.6969403856775315995316280043863158e14) }, { SC_(11), SC_(-1.2500), SC_(6.6969403856557086094467166780182235e14) }, { SC_(11), SC_(-0.75000), SC_(6.6969403851936945358946446654116707e14) }, { SC_(11), SC_(-0.25000), SC_(6.6969403582250925196910686780182235e14) }, + {SC_(12), SC_(-7.7500), SC_(-3.2145233093874118337222380549030432e16)}, { SC_(12), SC_(-7.2500), SC_(3.2145233093874118336089459241510371e16) }, { SC_(12), SC_(-6.7500), SC_(-3.2145233093874118338538862264211861e16) }, { SC_(12), SC_(-6.2500), SC_(3.2145233093874118332956585600971684e16) }, { SC_(12), SC_(-5.7500), SC_(-3.2145233093874118346470957452659967e16) }, { SC_(12), SC_(-5.2500), SC_(3.2145233093874118311384271328272970e16) }, { SC_(12), SC_(-4.7500), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(12), SC_(-4.2500), SC_(3.2145233093874118103287175260580644e16) }, { SC_(12), SC_(-3.7500), SC_(-3.2145233093874119174645495148550237e16) }, { SC_(12), SC_(-3.2500), SC_(3.2145233093874114857792705593486958e16) }, { SC_(12), SC_(-2.7500), SC_(-3.2145233093874135691619437169973801e16) }, { SC_(12), SC_(-2.2500), SC_(3.2145233093874008724100861918481841e16) }, { SC_(12), SC_(-1.7500), SC_(-3.2145233093875066825103277125147005e16) }, { SC_(12), SC_(-1.2500), SC_(3.2145233093861362402303729768622063e16) }, { SC_(12), SC_(-0.75000), SC_(-3.2145233094206840811597208557586761e16) }, { SC_(12), SC_(-0.25000), SC_(3.2145233067527970956138307688622063e16) }, + {SC_(13), SC_(-7.7500), SC_(1.6715535177261375555623235851859237e18)}, { SC_(13), SC_(-7.2500), SC_(1.6715535177261375555616811505615971e18) }, { SC_(13), SC_(-6.7500), SC_(1.6715535177261375555601152932765871e18) }, { SC_(13), SC_(-6.2500), SC_(1.6715535177261375555560635840337346e18) }, { SC_(13), SC_(-5.7500), SC_(1.6715535177261375555448386655062426e18) }, { SC_(13), SC_(-5.2500), SC_(1.6715535177261375555111931703465213e18) }, { SC_(13), SC_(-4.7500), SC_(1.6715535177261375554006502097069245e18) }, { SC_(13), SC_(-4.2500), SC_(1.6715535177261375549959051229408070e18) }, { SC_(13), SC_(-3.7500), SC_(1.6715535177261375533086111846120836e18) }, { SC_(13), SC_(-3.2500), SC_(1.6715535177261375450685102745473439e18) }, { SC_(13), SC_(-2.7500), SC_(1.6715535177261374960497681856044819e18) }, { SC_(13), SC_(-2.2500), SC_(1.6715535177261371205337428998473234e18) }, { SC_(13), SC_(-1.7500), SC_(1.6715535177261330943278445785436631e18) }, { SC_(13), SC_(-1.2500), SC_(1.6715535177260640528966928029814669e18) }, { SC_(13), SC_(-0.75000), SC_(1.6715535177236684875710325164741107e18) }, { SC_(13), SC_(-0.25000), SC_(1.6715535174521967818565724133494669e18) }, + {SC_(20), SC_(-7.7500), SC_(-1.0700016187896297695358366297227405e31)}, { SC_(20), SC_(-7.2500), SC_(1.0700016187896297695358366297227207e31) }, { SC_(20), SC_(-6.7500), SC_(-1.0700016187896297695358366297227919e31) }, { SC_(20), SC_(-6.2500), SC_(1.0700016187896297695358366297225123e31) }, { SC_(20), SC_(-5.7500), SC_(-1.0700016187896297695358366297237267e31) }, { SC_(20), SC_(-5.2500), SC_(1.0700016187896297695358366297178064e31) }, { SC_(20), SC_(-4.7500), SC_(-1.0700016187896297695358366297508349e31) }, { SC_(20), SC_(-4.2500), SC_(1.0700016187896297695358366295346680e31) }, { SC_(20), SC_(-3.7500), SC_(-1.0700016187896297695358366312489970e31) }, { SC_(20), SC_(-3.2500), SC_(1.0700016187896297695358366140480322e31) }, { SC_(20), SC_(-2.7500), SC_(-1.0700016187896297695358368457690989e31) }, { SC_(20), SC_(-2.2500), SC_(1.0700016187896297695358322831891149e31) }, { SC_(20), SC_(-1.7500), SC_(-1.0700016187896297695359814356987569e31) }, { SC_(20), SC_(-1.2500), SC_(1.0700016187896297695260533442006924e31) }, { SC_(20), SC_(-0.75000), SC_(-1.0700016187896297714516730336449055e31) }, { SC_(20), SC_(-0.25000), SC_(1.0700016187896275255700182817756420e31) }, + {SC_(23), SC_(-7.7500), SC_(7.2766958095269026379022334905108869e36)}, { SC_(23), SC_(-7.2500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23), SC_(-6.7500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23), SC_(-6.2500), SC_(7.2766958095269026379022334905108868e36) }, { SC_(23), SC_(-5.7500), SC_(7.2766958095269026379022334905108866e36) }, { SC_(23), SC_(-5.2500), SC_(7.2766958095269026379022334905108848e36) }, { SC_(23), SC_(-4.7500), SC_(7.2766958095269026379022334905108714e36) }, { SC_(23), SC_(-4.2500), SC_(7.2766958095269026379022334905107503e36) }, { SC_(23), SC_(-3.7500), SC_(7.2766958095269026379022334905093860e36) }, { SC_(23), SC_(-3.2500), SC_(7.2766958095269026379022334904893135e36) }, { SC_(23), SC_(-2.7500), SC_(7.2766958095269026379022334900771270e36) }, { SC_(23), SC_(-2.2500), SC_(7.2766958095269026379022334770834817e36) }, { SC_(23), SC_(-1.7500), SC_(7.2766958095269026379022327513062336e36) }, { SC_(23), SC_(-1.2500), SC_(7.2766958095269026379021422520579094e36) }, { SC_(23), SC_(-0.75000), SC_(7.2766958095269026378642504512809960e36) }, { SC_(23), SC_(-0.25000), SC_(7.2766958095269025158194448897624671e36) } } }; do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); From 22bc7212e75db5aafa25fbfb7a51463f9867ee53 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 26 Oct 2014 09:42:11 +0000 Subject: [PATCH 35/69] [Polygamma] Hook up concept checks. Move test instantiations into instances lib. Fix a few test failures. Add Nikhar's trigamma tests. --- include/boost/math/special_functions.hpp | 1 + .../special_functions/detail/polygamma.hpp | 6 +- .../boost/math/special_functions/digamma.hpp | 3 +- .../math/special_functions/factorials.hpp | 2 +- .../boost/math/special_functions/math_fwd.hpp | 20 +++ .../math/special_functions/polygamma.hpp | 4 +- test/Jamfile.v2 | 3 +- test/compile_test/instantiate.hpp | 14 ++ test/compile_test/sf_polygamma_incl_test.cpp | 28 +++ test/test_digamma.hpp | 2 +- .../double_test_instances_5.cpp | 1 + .../test_instances/float_test_instances_5.cpp | 1 + .../ldouble_test_instances_5.cpp | 1 + .../real_concept_test_instances_5.cpp | 1 + test/test_instances/test_instances.hpp | 7 +- test/test_polygamma.hpp | 13 +- test/test_trigamma.cpp | 165 ++++++++++++++++++ test/test_zeta.hpp | 2 +- 18 files changed, 256 insertions(+), 18 deletions(-) create mode 100644 test/compile_test/sf_polygamma_incl_test.cpp create mode 100644 test/test_trigamma.cpp diff --git a/include/boost/math/special_functions.hpp b/include/boost/math/special_functions.hpp index aa7019a1e..d86a31b6b 100644 --- a/include/boost/math/special_functions.hpp +++ b/include/boost/math/special_functions.hpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 75baf3454..367de7a40 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -62,7 +62,7 @@ // know that we have to use logs for the initial terms: // part_term = ((n > boost::math::max_factorial::value) && (n * n > tools::log_max_value())) - ? 0 : boost::math::factorial(n - 1, pol) * pow(x, -n - 1); + ? T(0) : boost::math::factorial(n - 1, pol) * pow(x, -n - 1); if(part_term == 0) { // Either n is very large, or the power term underflows, @@ -140,7 +140,7 @@ { z_plus_k_pow_minus_m_minus_one = pow(z, minus_m_minus_one); sum0 += z_plus_k_pow_minus_m_minus_one; - ++z; + z += 1; } sum0 *= boost::math::factorial(n); if((n - 1) & 1) @@ -161,7 +161,7 @@ const bool b_negate = (( n % 2 ) == 0 ) ; const T n_fact = boost::math::factorial(n); - const T z_pow_n_plus_one = pow(x, static_cast(n + 1)); + const T z_pow_n_plus_one = pow(x, n + 1); const T n_fact_over_pow_term = n_fact / z_pow_n_plus_one; const T term0 = !b_negate ? n_fact_over_pow_term : -n_fact_over_pow_term; diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index d69b2cd68..3ac522000 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -505,7 +506,7 @@ T digamma_imp(T x, const mpl::int_<0>* t, const Policy& pol) while(val < x) { result += 1 / val; - ++val; + val += 1; } } else if(floor(two_x) == two_x) diff --git a/include/boost/math/special_functions/factorials.hpp b/include/boost/math/special_functions/factorials.hpp index de24642ac..e36a098bb 100644 --- a/include/boost/math/special_functions/factorials.hpp +++ b/include/boost/math/special_functions/factorials.hpp @@ -151,7 +151,7 @@ T rising_factorial_imp(T x, int n, const Policy& pol) if((x < 1) && (x + n < 0)) { T val = boost::math::tgamma_delta_ratio(1 - x, static_cast(-n), pol); - return (n & 1) ? -val : val; + return (n & 1) ? T(-val) : val; } // // We don't optimise this for small n, because diff --git a/include/boost/math/special_functions/math_fwd.hpp b/include/boost/math/special_functions/math_fwd.hpp index e952dcdb5..f91d21eda 100644 --- a/include/boost/math/special_functions/math_fwd.hpp +++ b/include/boost/math/special_functions/math_fwd.hpp @@ -463,6 +463,20 @@ namespace boost 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&); + // Hypotenuse function sqrt(x ^ 2 + y ^ 2). template typename tools::promote_args::type @@ -1205,6 +1219,12 @@ namespace boost template \ inline typename boost::math::tools::promote_args::type digamma(T x){ return boost::math::digamma(x, Policy()); }\ \ + template \ + inline typename boost::math::tools::promote_args::type trigamma(T x){ return boost::math::trigamma(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type polygamma(int n, T x){ return boost::math::polygamma(n, x, Policy()); }\ + \ template \ inline typename boost::math::tools::promote_args::type \ hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\ diff --git a/include/boost/math/special_functions/polygamma.hpp b/include/boost/math/special_functions/polygamma.hpp index 071f13ca3..2c6b94d97 100644 --- a/include/boost/math/special_functions/polygamma.hpp +++ b/include/boost/math/special_functions/polygamma.hpp @@ -72,13 +72,13 @@ } template - inline T trigamma(T x, const Policy &pol) + inline typename tools::promote_args::type trigamma(T x, const Policy &pol) { return boost::math::polygamma(1,x,pol); } template - inline T trigamma(T x) + inline typename tools::promote_args::type trigamma(T x) { return boost::math::trigamma(x,policies::policy<>()); } diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 4f908aa9e..ca1acaec4 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -604,7 +604,7 @@ run test_normal.cpp pch ../../test/build//boost_unit_test_framework ; run test_owens_t.cpp ../../test/build//boost_unit_test_framework ; run test_pareto.cpp ../../test/build//boost_unit_test_framework ; run test_polygamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ; -run test_trigamma.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ; +run test_trigamma.cpp test_instances//test_instances ../../test/build//boost_unit_test_framework ; run test_poisson.cpp ../../test/build//boost_unit_test_framework : # command line : # input files @@ -774,6 +774,7 @@ run compile_test/sf_binomial_incl_test.cpp compile_test_main ; run compile_test/sf_cbrt_incl_test.cpp compile_test_main ; run compile_test/sf_cos_pi_incl_test.cpp compile_test_main ; run compile_test/sf_digamma_incl_test.cpp compile_test_main ; +run compile_test/sf_polygamma_incl_test.cpp compile_test_main ; run compile_test/sf_ellint_1_incl_test.cpp compile_test_main ; run compile_test/sf_ellint_2_incl_test.cpp compile_test_main ; run compile_test/sf_ellint_3_incl_test.cpp compile_test_main ; diff --git a/test/compile_test/instantiate.hpp b/test/compile_test/instantiate.hpp index c6a9d5a7e..776829a3a 100644 --- a/test/compile_test/instantiate.hpp +++ b/test/compile_test/instantiate.hpp @@ -166,6 +166,8 @@ void instantiate(RealType) boost::math::lgamma(v1); boost::math::lgamma(v1, &i); boost::math::digamma(v1); + boost::math::trigamma(v1); + boost::math::polygamma(i, v1); boost::math::tgamma_ratio(v1, v2); boost::math::tgamma_delta_ratio(v1, v2); boost::math::factorial(i); @@ -351,6 +353,8 @@ void instantiate(RealType) boost::math::lgamma(v1 * 1); boost::math::lgamma(v1 * 1, &i); boost::math::digamma(v1 * 1); + boost::math::trigamma(v1 * 1); + boost::math::polygamma(i, v1 * 1); boost::math::tgamma_ratio(v1 * 1, v2 + 0); boost::math::tgamma_delta_ratio(v1 * 1, v2 + 0); boost::math::factorial(i); @@ -525,6 +529,8 @@ void instantiate(RealType) boost::math::lgamma(v1, pol); boost::math::lgamma(v1, &i, pol); boost::math::digamma(v1, pol); + boost::math::trigamma(v1, pol); + boost::math::polygamma(i, v1, pol); boost::math::tgamma_ratio(v1, v2, pol); boost::math::tgamma_delta_ratio(v1, v2, pol); boost::math::factorial(i, pol); @@ -702,6 +708,8 @@ void instantiate(RealType) test::lgamma(v1); test::lgamma(v1, &i); test::digamma(v1); + test::trigamma(v1); + test::polygamma(i, v1); test::tgamma_ratio(v1, v2); test::tgamma_delta_ratio(v1, v2); test::factorial(i); @@ -893,6 +901,8 @@ void instantiate_mixed(RealType) boost::math::lgamma(i); boost::math::lgamma(i, &i); boost::math::digamma(i); + boost::math::trigamma(i); + boost::math::polygamma(i, i); boost::math::tgamma_ratio(i, l); boost::math::tgamma_ratio(fr, lr); boost::math::tgamma_delta_ratio(i, s); @@ -1035,6 +1045,8 @@ void instantiate_mixed(RealType) boost::math::lgamma(i, pol); boost::math::lgamma(i, &i, pol); boost::math::digamma(i, pol); + boost::math::trigamma(i, pol); + boost::math::polygamma(i, i, pol); boost::math::tgamma_ratio(i, l, pol); boost::math::tgamma_ratio(fr, lr, pol); boost::math::tgamma_delta_ratio(i, s, pol); @@ -1170,6 +1182,8 @@ void instantiate_mixed(RealType) test::lgamma(i); test::lgamma(i, &i); test::digamma(i); + test::trigamma(i); + test::polygamma(i, i); test::tgamma_ratio(i, l); test::tgamma_ratio(fr, lr); test::tgamma_delta_ratio(i, s); diff --git a/test/compile_test/sf_polygamma_incl_test.cpp b/test/compile_test/sf_polygamma_incl_test.cpp new file mode 100644 index 000000000..883644993 --- /dev/null +++ b/test/compile_test/sf_polygamma_incl_test.cpp @@ -0,0 +1,28 @@ +// Copyright John Maddock 2006. +// 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) +// +// Basic sanity check that header +// #includes all the files that it needs to. +// +#include +// +// Note this header includes no other headers, this is +// important if this test is to be meaningful: +// +#include "test_compile_result.hpp" + +void compile_and_link_test() +{ + check_result(boost::math::trigamma(f)); + check_result(boost::math::trigamma(d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::trigamma(l)); +#endif + check_result(boost::math::polygamma(1, f)); + check_result(boost::math::polygamma(1, d)); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + check_result(boost::math::polygamma(1, l)); +#endif +} diff --git a/test/test_digamma.hpp b/test/test_digamma.hpp index 250ce1046..5d1de7cd7 100644 --- a/test/test_digamma.hpp +++ b/test/test_digamma.hpp @@ -83,7 +83,7 @@ void test_digamma(T, const char* name) do_test_digamma(digamma_bugs, name, "Digamma Function: Values near 0"); static const boost::array, 40> digamma_integers = { { - { 1, SC_(-0.57721566490153286060651209008240243) }, { 2, SC_(0.42278433509846713939348790991759757) }, { 3, SC_(0.92278433509846713939348790991759757) }, { 4, SC_(1.2561176684318004727268212432509309) }, { 5, SC_(1.5061176684318004727268212432509309) }, { 6, SC_(1.7061176684318004727268212432509309) }, { 7, SC_(1.8727843350984671393934879099175976) }, { 8, SC_(2.0156414779556099965363450527747404) }, { 9, SC_(2.1406414779556099965363450527747404) }, { SC_(10), SC_(2.2517525890667211076474561638858515) }, { SC_(11), SC_(2.3517525890667211076474561638858515) }, { SC_(12), SC_(2.4426616799758120167383652547949424) }, { SC_(13), SC_(2.5259950133091453500716985881282758) }, { SC_(14), SC_(2.6029180902322222731486216650513527) }, { SC_(15), SC_(2.6743466616607937017200502364799241) }, { SC_(16), SC_(2.7410133283274603683867169031465908) }, { SC_(17), SC_(2.8035133283274603683867169031465908) }, { SC_(18), SC_(2.8623368577392250742690698443230614) }, { SC_(19), SC_(2.9178924132947806298246253998786169) }, { SC_(20), SC_(2.9705239922421490508772569788259854) }, { SC_(21), SC_(3.0205239922421490508772569788259854) }, { SC_(22), SC_(3.0681430398611966699248760264450330) }, { SC_(23), SC_(3.1135975853157421244703305718995784) }, { SC_(24), SC_(3.1570758461853073418616349197256654) }, { SC_(25), SC_(3.1987425128519740085283015863923321) }, { SC_(26), SC_(3.2387425128519740085283015863923321) }, { SC_(27), SC_(3.2772040513135124700667631248538705) }, { SC_(28), SC_(3.3142410883505495071038001618909076) }, { SC_(29), SC_(3.3499553740648352213895144476051933) }, { SC_(30), SC_(3.3844381326855248765619282407086415) }, { SC_(31), SC_(3.4177714660188582098952615740419749) }, { SC_(32), SC_(3.4500295305349872421533260901710071) }, { SC_(33), SC_(3.4812795305349872421533260901710071) }, { SC_(34), SC_(3.5115825608380175451836291204740374) }, { SC_(35), SC_(3.5409943255438998981248055910622727) }, { SC_(36), SC_(3.5695657541153284695533770196337013) }, { SC_(37), SC_(3.5973435318931062473311547974114791) }, { SC_(38), SC_(3.6243705589201332743581818244385061) }, { SC_(39), SC_(3.6506863483938174848844976139121903) }, { SC_(40), SC_(3.6763273740348431259101386395532160) } + { 1, SC_(-0.57721566490153286060651209008240243) }, { 2, SC_(0.42278433509846713939348790991759757) }, { 3, SC_(0.92278433509846713939348790991759757) }, { 4, SC_(1.2561176684318004727268212432509309) }, { 5, SC_(1.5061176684318004727268212432509309) }, { 6, SC_(1.7061176684318004727268212432509309) }, { 7, SC_(1.8727843350984671393934879099175976) }, { 8, SC_(2.0156414779556099965363450527747404) }, { 9, SC_(2.1406414779556099965363450527747404) }, { SC_(10.0), SC_(2.2517525890667211076474561638858515) }, { SC_(11.0), SC_(2.3517525890667211076474561638858515) }, { SC_(12.0), SC_(2.4426616799758120167383652547949424) }, { SC_(13.0), SC_(2.5259950133091453500716985881282758) }, { SC_(14.0), SC_(2.6029180902322222731486216650513527) }, { SC_(15.0), SC_(2.6743466616607937017200502364799241) }, { SC_(16.0), SC_(2.7410133283274603683867169031465908) }, { SC_(17.0), SC_(2.8035133283274603683867169031465908) }, { SC_(18.0), SC_(2.8623368577392250742690698443230614) }, { SC_(19.0), SC_(2.9178924132947806298246253998786169) }, { SC_(20.0), SC_(2.9705239922421490508772569788259854) }, { SC_(21.0), SC_(3.0205239922421490508772569788259854) }, { SC_(22.0), SC_(3.0681430398611966699248760264450330) }, { SC_(23.0), SC_(3.1135975853157421244703305718995784) }, { SC_(24.0), SC_(3.1570758461853073418616349197256654) }, { SC_(25.0), SC_(3.1987425128519740085283015863923321) }, { SC_(26.0), SC_(3.2387425128519740085283015863923321) }, { SC_(27.0), SC_(3.2772040513135124700667631248538705) }, { SC_(28.0), SC_(3.3142410883505495071038001618909076) }, { SC_(29.0), SC_(3.3499553740648352213895144476051933) }, { SC_(30.0), SC_(3.3844381326855248765619282407086415) }, { SC_(31.0), SC_(3.4177714660188582098952615740419749) }, { SC_(32.0), SC_(3.4500295305349872421533260901710071) }, { SC_(33.0), SC_(3.4812795305349872421533260901710071) }, { SC_(34.0), SC_(3.5115825608380175451836291204740374) }, { SC_(35.0), SC_(3.5409943255438998981248055910622727) }, { SC_(36.0), SC_(3.5695657541153284695533770196337013) }, { SC_(37.0), SC_(3.5973435318931062473311547974114791) }, { SC_(38.0), SC_(3.6243705589201332743581818244385061) }, { SC_(39.0), SC_(3.6506863483938174848844976139121903) }, { SC_(40.0), SC_(3.6763273740348431259101386395532160) } } }; do_test_digamma(digamma_integers, name, "Digamma Function: Integer arguments"); diff --git a/test/test_instances/double_test_instances_5.cpp b/test/test_instances/double_test_instances_5.cpp index 3c4d0a336..62dbbe2f1 100644 --- a/test/test_instances/double_test_instances_5.cpp +++ b/test/test_instances/double_test_instances_5.cpp @@ -9,6 +9,7 @@ #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include #include +#include #endif #define BOOST_MATH_TEST_TYPE double diff --git a/test/test_instances/float_test_instances_5.cpp b/test/test_instances/float_test_instances_5.cpp index 13e9e34f3..4e2315c06 100644 --- a/test/test_instances/float_test_instances_5.cpp +++ b/test/test_instances/float_test_instances_5.cpp @@ -9,6 +9,7 @@ #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include #include +#include #endif #define BOOST_MATH_TEST_TYPE float diff --git a/test/test_instances/ldouble_test_instances_5.cpp b/test/test_instances/ldouble_test_instances_5.cpp index 5e0e04c23..6e4599b64 100644 --- a/test/test_instances/ldouble_test_instances_5.cpp +++ b/test/test_instances/ldouble_test_instances_5.cpp @@ -9,6 +9,7 @@ #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include #include +#include #endif #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS diff --git a/test/test_instances/real_concept_test_instances_5.cpp b/test/test_instances/real_concept_test_instances_5.cpp index 14fc0909b..6dd7d0433 100644 --- a/test/test_instances/real_concept_test_instances_5.cpp +++ b/test/test_instances/real_concept_test_instances_5.cpp @@ -9,6 +9,7 @@ #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error #include #include +#include #endif #include diff --git a/test/test_instances/test_instances.hpp b/test/test_instances/test_instances.hpp index 889e9b2f1..e13dad959 100644 --- a/test/test_instances/test_instances.hpp +++ b/test/test_instances/test_instances.hpp @@ -287,8 +287,13 @@ namespace boost{ namespace math{ // digamma: template tools::promote_args::type digamma(BOOST_MATH_TEST_TYPE x); - template tools::promote_args::type digamma(BOOST_MATH_TEST_TYPE x, const policies::policy<>&); + // trigamma: + template tools::promote_args::type trigamma(BOOST_MATH_TEST_TYPE x); + template tools::promote_args::type trigamma(BOOST_MATH_TEST_TYPE x, const policies::policy<>&); + // polygamma: + template tools::promote_args::type polygamma(int, BOOST_MATH_TEST_TYPE x); + template tools::promote_args::type polygamma(int, BOOST_MATH_TEST_TYPE x, const policies::policy<>&); #endif #ifdef TEST_GROUP_6 // Hypotenuse function sqrt(x ^ 2 + y ^ 2). diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 19c91c1d4..bdd0db1e9 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -8,7 +8,6 @@ #include #include -#include #define BOOST_TEST_MAIN #include #include @@ -149,12 +148,12 @@ void test_polygamma(T, const char* name) { 7, SC_(-12.750), SC_(3.3035269585550319411369451657990653e8) }, { 7, SC_(-12.250), SC_(3.3035269585550014530679554645726841e8) }, { 7, SC_(-11.750), SC_(3.3035269585549597724076958273392155e8) }, { 7, SC_(-11.250), SC_(3.3035269585549020632656302567379925e8) }, { 7, SC_(-10.750), SC_(3.3035269585548210560734246359421460e8) }, { 7, SC_(-10.250), SC_(3.3035269585547056321166932680182245e8) }, { 7, SC_(-9.7500), SC_(3.3035269585545384621477943726294791e8) }, { 7, SC_(-9.2500), SC_(3.3035269585542919758450034698830934e8) }, { 7, SC_(-8.7500), SC_(3.3035269585539213080586956648886140e8) }, { 7, SC_(-8.2500), SC_(3.3035269585533516103728829633890794e8) }, { 7, SC_(-7.7500), SC_(3.3035269585524545242332002141349801e8) }, { 7, SC_(-7.2500), SC_(3.3035269585510030650375087453009371e8) }, { 7, SC_(-6.7500), SC_(3.3035269585485817969386206988585281e8) }, { 7, SC_(-6.2500), SC_(3.3035269585444002902560781621765444e8) }, { 7, SC_(-5.7500), SC_(3.3035269585368867935011094629708018e8) }, { 7, SC_(-5.2500), SC_(3.3035269585227536550842381621765444e8) }, { 7, SC_(-4.7500), SC_(3.3035269584947086190323815702711063e8) }, { 7, SC_(-4.2500), SC_(3.3035269584354251332378488235637904e8) }, { 7, SC_(-3.7500), SC_(3.3035269583002256126086884537779074e8) }, { 7, SC_(-3.2500), SC_(3.3035269579619261006329391884897976e8) }, { 7, SC_(-2.7500), SC_(3.3035269570114408444331054633801022e8) }, { 7, SC_(-2.2500), SC_(3.3035269539127781220563177006740899e8) }, { 7, SC_(-1.7500), SC_(3.3035269416026348990428605870784761e8) }, { 7, SC_(-1.2500), SC_(3.3035268771818605685450990413016373e8) }, { 7, SC_(-0.75000), SC_(3.3035263686402030648824099487997220e8) }, { 7, SC_(-0.25000), SC_(3.3035184214649965685450990413016373e8) }, { 8, SC_(-7.7500), SC_(-1.0569114259666913771892699180522388e10) }, { 8, SC_(-7.2500), SC_(1.0569114259666319911021283350705169e10) }, { 8, SC_(-6.7500), SC_(-1.0569114259667313537290849324034796e10) }, { 8, SC_(-6.2500), SC_(1.0569114259665591328976435838084546e10) }, { 8, SC_(-5.7500), SC_(-1.0569114259668699611772332137177045e10) }, { 8, SC_(-5.2500), SC_(1.0569114259662820559674440318084546e10) }, { 8, SC_(-4.7500), SC_(-1.0569114259674567879524502974422220e10) }, { 8, SC_(-4.2500), SC_(1.0569114259649513356345466704581650e10) }, { 8, SC_(-3.7500), SC_(-1.0569114259707322912185335499305285e10) }, { 8, SC_(-3.2500), SC_(1.0569114259560384126678660185038311e10) }, { 8, SC_(-2.7500), SC_(-1.0569114259982263662729459870590150e10) }, { 8, SC_(-2.2500), SC_(1.0569114258563670778105953357268290e10) }, { 8, SC_(-1.7500), SC_(-1.0569114264464825392297531107332441e10) }, { 8, SC_(-1.2500), SC_(1.0569114231281566759079742278380307e10) }, { 8, SC_(-0.75000), SC_(-1.0569114526390508516485165684831300e10) }, { 8, SC_(-0.25000), SC_(1.0569108819622773799079742278380307e10) }, { 9, SC_(-7.7500), SC_(3.8051374324233954962308727459400485e11) }, { 9, SC_(-7.2500), SC_(3.8051374324233938918730928010849146e11) }, { 9, SC_(-6.7500), SC_(3.8051374324233908537939910023379690e11) }, { 9, SC_(-6.2500), SC_(3.8051374324233848474063291767903138e11) }, { 9, SC_(-5.7500), SC_(3.8051374324233723728009045648294056e11) }, { 9, SC_(-5.2500), SC_(3.8051374324233449483283804413023138e11) }, { 9, SC_(-4.7500), SC_(3.8051374324232805216534792821594812e11) }, { 9, SC_(-4.2500), SC_(3.8051374324231168248427408936422641e11) }, { 9, SC_(-3.7500), SC_(3.8051374324226598999820108764248547e11) }, { 9, SC_(-3.2500), SC_(3.8051374324212293823321496967578170e11) }, { 9, SC_(-2.7500), SC_(3.8051374324160613219689518915140179e11) }, { 9, SC_(-2.2500), SC_(3.8051374323936280896024439692195702e11) }, { 9, SC_(-1.7500), SC_(3.8051374322693593017285422874024520e11) }, { 9, SC_(-1.2500), SC_(3.8051374313023439288413955260640509e11) }, { 9, SC_(-0.75000), SC_(3.8051374187988955981988925091310821e11) }, { 9, SC_(-0.25000), SC_(3.8051370416629108357213955260640509e11) }, - {SC_(10), SC_(-7.7500), SC_(-1.5220204740668341333676731352020598e13)}, { SC_(10), SC_(-7.2500), SC_(1.5220204740668340669650877835677384e13) }, { SC_(10), SC_(-6.7500), SC_(-1.5220204740668341932700845125388608e13) }, { SC_(10), SC_(-6.2500), SC_(1.5220204740668339422138220784050543e13) }, { SC_(10), SC_(-5.7500), SC_(-1.5220204740668344670625746819834321e13) }, { SC_(10), SC_(-5.2500), SC_(1.5220204740668333038285748986372463e13) }, { SC_(10), SC_(-4.7500), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(10), SC_(-4.2500), SC_(1.5220204740668289586193246215389596e13) }, { SC_(10), SC_(-3.7500), SC_(-1.5220204740668491301932335869743932e13) }, { SC_(10), SC_(-3.2500), SC_(1.5220204740667845482073107110240315e13) }, { SC_(10), SC_(-2.7500), SC_(-1.5220204740670250922735818265720155e13) }, { SC_(10), SC_(-2.2500), SC_(1.5220204740659352776617813040228546e13) }, { SC_(10), SC_(-1.7500), SC_(-1.5220204740723597111914149030851634e13) }, { SC_(10), SC_(-1.2500), SC_(1.5220204740174337594057347065492760e13) }, { SC_(10), SC_(-0.75000), SC_(-1.5220204748421004942502520332720988e13) }, { SC_(10), SC_(-0.25000), SC_(1.5220204428462791119561347065492760e13) }, - {SC_(11), SC_(-7.7500), SC_(6.6969403856797204470999075620782555e14)}, { SC_(11), SC_(-7.2500), SC_(6.6969403856797204443997065278152669e14) }, { SC_(11), SC_(-6.7500), SC_(6.6969403856797204385976298181981934e14) }, { SC_(11), SC_(-6.2500), SC_(6.6969403856797204254719282828940321e14) }, { SC_(11), SC_(-5.7500), SC_(6.6969403856797203939795943831775966e14) }, { SC_(11), SC_(-5.2500), SC_(6.6969403856797203131161247792548979e14) }, { SC_(11), SC_(-4.7500), SC_(6.6969403856797200883878751610651220e14) }, { SC_(11), SC_(-4.2500), SC_(6.6969403856797194026913294831009712e14) }, { SC_(11), SC_(-3.7500), SC_(6.6969403856797170626423300519402108e14) }, { SC_(11), SC_(-3.2500), SC_(6.6969403856797079082317494121441662e14) }, { SC_(11), SC_(-2.7500), SC_(6.6969403856796654470987612349915749e14) }, { SC_(11), SC_(-2.2500), SC_(6.6969403856794204628163394590053064e14) }, { SC_(11), SC_(-1.7500), SC_(6.6969403856775315995316280043863158e14) }, { SC_(11), SC_(-1.2500), SC_(6.6969403856557086094467166780182235e14) }, { SC_(11), SC_(-0.75000), SC_(6.6969403851936945358946446654116707e14) }, { SC_(11), SC_(-0.25000), SC_(6.6969403582250925196910686780182235e14) }, - {SC_(12), SC_(-7.7500), SC_(-3.2145233093874118337222380549030432e16)}, { SC_(12), SC_(-7.2500), SC_(3.2145233093874118336089459241510371e16) }, { SC_(12), SC_(-6.7500), SC_(-3.2145233093874118338538862264211861e16) }, { SC_(12), SC_(-6.2500), SC_(3.2145233093874118332956585600971684e16) }, { SC_(12), SC_(-5.7500), SC_(-3.2145233093874118346470957452659967e16) }, { SC_(12), SC_(-5.2500), SC_(3.2145233093874118311384271328272970e16) }, { SC_(12), SC_(-4.7500), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(12), SC_(-4.2500), SC_(3.2145233093874118103287175260580644e16) }, { SC_(12), SC_(-3.7500), SC_(-3.2145233093874119174645495148550237e16) }, { SC_(12), SC_(-3.2500), SC_(3.2145233093874114857792705593486958e16) }, { SC_(12), SC_(-2.7500), SC_(-3.2145233093874135691619437169973801e16) }, { SC_(12), SC_(-2.2500), SC_(3.2145233093874008724100861918481841e16) }, { SC_(12), SC_(-1.7500), SC_(-3.2145233093875066825103277125147005e16) }, { SC_(12), SC_(-1.2500), SC_(3.2145233093861362402303729768622063e16) }, { SC_(12), SC_(-0.75000), SC_(-3.2145233094206840811597208557586761e16) }, { SC_(12), SC_(-0.25000), SC_(3.2145233067527970956138307688622063e16) }, - {SC_(13), SC_(-7.7500), SC_(1.6715535177261375555623235851859237e18)}, { SC_(13), SC_(-7.2500), SC_(1.6715535177261375555616811505615971e18) }, { SC_(13), SC_(-6.7500), SC_(1.6715535177261375555601152932765871e18) }, { SC_(13), SC_(-6.2500), SC_(1.6715535177261375555560635840337346e18) }, { SC_(13), SC_(-5.7500), SC_(1.6715535177261375555448386655062426e18) }, { SC_(13), SC_(-5.2500), SC_(1.6715535177261375555111931703465213e18) }, { SC_(13), SC_(-4.7500), SC_(1.6715535177261375554006502097069245e18) }, { SC_(13), SC_(-4.2500), SC_(1.6715535177261375549959051229408070e18) }, { SC_(13), SC_(-3.7500), SC_(1.6715535177261375533086111846120836e18) }, { SC_(13), SC_(-3.2500), SC_(1.6715535177261375450685102745473439e18) }, { SC_(13), SC_(-2.7500), SC_(1.6715535177261374960497681856044819e18) }, { SC_(13), SC_(-2.2500), SC_(1.6715535177261371205337428998473234e18) }, { SC_(13), SC_(-1.7500), SC_(1.6715535177261330943278445785436631e18) }, { SC_(13), SC_(-1.2500), SC_(1.6715535177260640528966928029814669e18) }, { SC_(13), SC_(-0.75000), SC_(1.6715535177236684875710325164741107e18) }, { SC_(13), SC_(-0.25000), SC_(1.6715535174521967818565724133494669e18) }, - {SC_(20), SC_(-7.7500), SC_(-1.0700016187896297695358366297227405e31)}, { SC_(20), SC_(-7.2500), SC_(1.0700016187896297695358366297227207e31) }, { SC_(20), SC_(-6.7500), SC_(-1.0700016187896297695358366297227919e31) }, { SC_(20), SC_(-6.2500), SC_(1.0700016187896297695358366297225123e31) }, { SC_(20), SC_(-5.7500), SC_(-1.0700016187896297695358366297237267e31) }, { SC_(20), SC_(-5.2500), SC_(1.0700016187896297695358366297178064e31) }, { SC_(20), SC_(-4.7500), SC_(-1.0700016187896297695358366297508349e31) }, { SC_(20), SC_(-4.2500), SC_(1.0700016187896297695358366295346680e31) }, { SC_(20), SC_(-3.7500), SC_(-1.0700016187896297695358366312489970e31) }, { SC_(20), SC_(-3.2500), SC_(1.0700016187896297695358366140480322e31) }, { SC_(20), SC_(-2.7500), SC_(-1.0700016187896297695358368457690989e31) }, { SC_(20), SC_(-2.2500), SC_(1.0700016187896297695358322831891149e31) }, { SC_(20), SC_(-1.7500), SC_(-1.0700016187896297695359814356987569e31) }, { SC_(20), SC_(-1.2500), SC_(1.0700016187896297695260533442006924e31) }, { SC_(20), SC_(-0.75000), SC_(-1.0700016187896297714516730336449055e31) }, { SC_(20), SC_(-0.25000), SC_(1.0700016187896275255700182817756420e31) }, - {SC_(23), SC_(-7.7500), SC_(7.2766958095269026379022334905108869e36)}, { SC_(23), SC_(-7.2500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23), SC_(-6.7500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23), SC_(-6.2500), SC_(7.2766958095269026379022334905108868e36) }, { SC_(23), SC_(-5.7500), SC_(7.2766958095269026379022334905108866e36) }, { SC_(23), SC_(-5.2500), SC_(7.2766958095269026379022334905108848e36) }, { SC_(23), SC_(-4.7500), SC_(7.2766958095269026379022334905108714e36) }, { SC_(23), SC_(-4.2500), SC_(7.2766958095269026379022334905107503e36) }, { SC_(23), SC_(-3.7500), SC_(7.2766958095269026379022334905093860e36) }, { SC_(23), SC_(-3.2500), SC_(7.2766958095269026379022334904893135e36) }, { SC_(23), SC_(-2.7500), SC_(7.2766958095269026379022334900771270e36) }, { SC_(23), SC_(-2.2500), SC_(7.2766958095269026379022334770834817e36) }, { SC_(23), SC_(-1.7500), SC_(7.2766958095269026379022327513062336e36) }, { SC_(23), SC_(-1.2500), SC_(7.2766958095269026379021422520579094e36) }, { SC_(23), SC_(-0.75000), SC_(7.2766958095269026378642504512809960e36) }, { SC_(23), SC_(-0.25000), SC_(7.2766958095269025158194448897624671e36) } + {SC_(10.0), SC_(-7.7500), SC_(-1.5220204740668341333676731352020598e13)}, { SC_(10.0), SC_(-7.2500), SC_(1.5220204740668340669650877835677384e13) }, { SC_(10.0), SC_(-6.7500), SC_(-1.5220204740668341932700845125388608e13) }, { SC_(10.0), SC_(-6.2500), SC_(1.5220204740668339422138220784050543e13) }, { SC_(10.0), SC_(-5.7500), SC_(-1.5220204740668344670625746819834321e13) }, { SC_(10.0), SC_(-5.2500), SC_(1.5220204740668333038285748986372463e13) }, { SC_(10.0), SC_(-4.7500), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(10.0), SC_(-4.2500), SC_(1.5220204740668289586193246215389596e13) }, { SC_(10.0), SC_(-3.7500), SC_(-1.5220204740668491301932335869743932e13) }, { SC_(10.0), SC_(-3.2500), SC_(1.5220204740667845482073107110240315e13) }, { SC_(10.0), SC_(-2.7500), SC_(-1.5220204740670250922735818265720155e13) }, { SC_(10.0), SC_(-2.2500), SC_(1.5220204740659352776617813040228546e13) }, { SC_(10.0), SC_(-1.7500), SC_(-1.5220204740723597111914149030851634e13) }, { SC_(10.0), SC_(-1.2500), SC_(1.5220204740174337594057347065492760e13) }, { SC_(10.0), SC_(-0.75000), SC_(-1.5220204748421004942502520332720988e13) }, { SC_(10.0), SC_(-0.25000), SC_(1.5220204428462791119561347065492760e13) }, + {SC_(11.0), SC_(-7.7500), SC_(6.6969403856797204470999075620782555e14)}, { SC_(11.0), SC_(-7.2500), SC_(6.6969403856797204443997065278152669e14) }, { SC_(11.0), SC_(-6.7500), SC_(6.6969403856797204385976298181981934e14) }, { SC_(11.0), SC_(-6.2500), SC_(6.6969403856797204254719282828940321e14) }, { SC_(11.0), SC_(-5.7500), SC_(6.6969403856797203939795943831775966e14) }, { SC_(11.0), SC_(-5.2500), SC_(6.6969403856797203131161247792548979e14) }, { SC_(11.0), SC_(-4.7500), SC_(6.6969403856797200883878751610651220e14) }, { SC_(11.0), SC_(-4.2500), SC_(6.6969403856797194026913294831009712e14) }, { SC_(11.0), SC_(-3.7500), SC_(6.6969403856797170626423300519402108e14) }, { SC_(11.0), SC_(-3.2500), SC_(6.6969403856797079082317494121441662e14) }, { SC_(11.0), SC_(-2.7500), SC_(6.6969403856796654470987612349915749e14) }, { SC_(11.0), SC_(-2.2500), SC_(6.6969403856794204628163394590053064e14) }, { SC_(11.0), SC_(-1.7500), SC_(6.6969403856775315995316280043863158e14) }, { SC_(11.0), SC_(-1.2500), SC_(6.6969403856557086094467166780182235e14) }, { SC_(11.0), SC_(-0.75000), SC_(6.6969403851936945358946446654116707e14) }, { SC_(11.0), SC_(-0.25000), SC_(6.6969403582250925196910686780182235e14) }, + {SC_(12.0), SC_(-7.7500), SC_(-3.2145233093874118337222380549030432e16)}, { SC_(12.0), SC_(-7.2500), SC_(3.2145233093874118336089459241510371e16) }, { SC_(12.0), SC_(-6.7500), SC_(-3.2145233093874118338538862264211861e16) }, { SC_(12.0), SC_(-6.2500), SC_(3.2145233093874118332956585600971684e16) }, { SC_(12.0), SC_(-5.7500), SC_(-3.2145233093874118346470957452659967e16) }, { SC_(12.0), SC_(-5.2500), SC_(3.2145233093874118311384271328272970e16) }, { SC_(12.0), SC_(-4.7500), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(12.0), SC_(-4.2500), SC_(3.2145233093874118103287175260580644e16) }, { SC_(12.0), SC_(-3.7500), SC_(-3.2145233093874119174645495148550237e16) }, { SC_(12.0), SC_(-3.2500), SC_(3.2145233093874114857792705593486958e16) }, { SC_(12.0), SC_(-2.7500), SC_(-3.2145233093874135691619437169973801e16) }, { SC_(12.0), SC_(-2.2500), SC_(3.2145233093874008724100861918481841e16) }, { SC_(12.0), SC_(-1.7500), SC_(-3.2145233093875066825103277125147005e16) }, { SC_(12.0), SC_(-1.2500), SC_(3.2145233093861362402303729768622063e16) }, { SC_(12.0), SC_(-0.75000), SC_(-3.2145233094206840811597208557586761e16) }, { SC_(12.0), SC_(-0.25000), SC_(3.2145233067527970956138307688622063e16) }, + {SC_(13.0), SC_(-7.7500), SC_(1.6715535177261375555623235851859237e18)}, { SC_(13.0), SC_(-7.2500), SC_(1.6715535177261375555616811505615971e18) }, { SC_(13.0), SC_(-6.7500), SC_(1.6715535177261375555601152932765871e18) }, { SC_(13.0), SC_(-6.2500), SC_(1.6715535177261375555560635840337346e18) }, { SC_(13.0), SC_(-5.7500), SC_(1.6715535177261375555448386655062426e18) }, { SC_(13.0), SC_(-5.2500), SC_(1.6715535177261375555111931703465213e18) }, { SC_(13.0), SC_(-4.7500), SC_(1.6715535177261375554006502097069245e18) }, { SC_(13.0), SC_(-4.2500), SC_(1.6715535177261375549959051229408070e18) }, { SC_(13.0), SC_(-3.7500), SC_(1.6715535177261375533086111846120836e18) }, { SC_(13.0), SC_(-3.2500), SC_(1.6715535177261375450685102745473439e18) }, { SC_(13.0), SC_(-2.7500), SC_(1.6715535177261374960497681856044819e18) }, { SC_(13.0), SC_(-2.2500), SC_(1.6715535177261371205337428998473234e18) }, { SC_(13.0), SC_(-1.7500), SC_(1.6715535177261330943278445785436631e18) }, { SC_(13.0), SC_(-1.2500), SC_(1.6715535177260640528966928029814669e18) }, { SC_(13.0), SC_(-0.75000), SC_(1.6715535177236684875710325164741107e18) }, { SC_(13.0), SC_(-0.25000), SC_(1.6715535174521967818565724133494669e18) }, + {SC_(20.0), SC_(-7.7500), SC_(-1.0700016187896297695358366297227405e31)}, { SC_(20.0), SC_(-7.2500), SC_(1.0700016187896297695358366297227207e31) }, { SC_(20.0), SC_(-6.7500), SC_(-1.0700016187896297695358366297227919e31) }, { SC_(20.0), SC_(-6.2500), SC_(1.0700016187896297695358366297225123e31) }, { SC_(20.0), SC_(-5.7500), SC_(-1.0700016187896297695358366297237267e31) }, { SC_(20.0), SC_(-5.2500), SC_(1.0700016187896297695358366297178064e31) }, { SC_(20.0), SC_(-4.7500), SC_(-1.0700016187896297695358366297508349e31) }, { SC_(20.0), SC_(-4.2500), SC_(1.0700016187896297695358366295346680e31) }, { SC_(20.0), SC_(-3.7500), SC_(-1.0700016187896297695358366312489970e31) }, { SC_(20.0), SC_(-3.2500), SC_(1.0700016187896297695358366140480322e31) }, { SC_(20.0), SC_(-2.7500), SC_(-1.0700016187896297695358368457690989e31) }, { SC_(20.0), SC_(-2.2500), SC_(1.0700016187896297695358322831891149e31) }, { SC_(20.0), SC_(-1.7500), SC_(-1.0700016187896297695359814356987569e31) }, { SC_(20.0), SC_(-1.2500), SC_(1.0700016187896297695260533442006924e31) }, { SC_(20.0), SC_(-0.75000), SC_(-1.0700016187896297714516730336449055e31) }, { SC_(20.0), SC_(-0.25000), SC_(1.0700016187896275255700182817756420e31) }, + {SC_(23.0), SC_(-7.7500), SC_(7.2766958095269026379022334905108869e36)}, { SC_(23.0), SC_(-7.2500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23.0), SC_(-6.7500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23.0), SC_(-6.2500), SC_(7.2766958095269026379022334905108868e36) }, { SC_(23.0), SC_(-5.7500), SC_(7.2766958095269026379022334905108866e36) }, { SC_(23.0), SC_(-5.2500), SC_(7.2766958095269026379022334905108848e36) }, { SC_(23.0), SC_(-4.7500), SC_(7.2766958095269026379022334905108714e36) }, { SC_(23.0), SC_(-4.2500), SC_(7.2766958095269026379022334905107503e36) }, { SC_(23.0), SC_(-3.7500), SC_(7.2766958095269026379022334905093860e36) }, { SC_(23.0), SC_(-3.2500), SC_(7.2766958095269026379022334904893135e36) }, { SC_(23.0), SC_(-2.7500), SC_(7.2766958095269026379022334900771270e36) }, { SC_(23.0), SC_(-2.2500), SC_(7.2766958095269026379022334770834817e36) }, { SC_(23.0), SC_(-1.7500), SC_(7.2766958095269026379022327513062336e36) }, { SC_(23.0), SC_(-1.2500), SC_(7.2766958095269026379021422520579094e36) }, { SC_(23.0), SC_(-0.75000), SC_(7.2766958095269026378642504512809960e36) }, { SC_(23.0), SC_(-0.25000), SC_(7.2766958095269025158194448897624671e36) } } }; do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); diff --git a/test/test_trigamma.cpp b/test/test_trigamma.cpp new file mode 100644 index 000000000..1a5a1f240 --- /dev/null +++ b/test/test_trigamma.cpp @@ -0,0 +1,165 @@ + +/////////////////////////////////////////////////////////////////////////////// +// Copyright 2013 Nikhar Agrawal +// 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) + +#define BOOST_TEST_MAIN + +#include +#include +#include +#include +#include + +#define SC_(x) static_cast::type>(BOOST_JOIN(x, L)) + +template +void test(const char* name) +{ + std::cout << "Testing type " << name << ":\n"; + + static const typename table_type::type data[] = + { + /* First 50 from 1 to 50 inclusive: */ + /* [Table[N[polygamma(1,x),40],{x, 1,50,1}] */ + + SC_(1.644934066848226436472415166646025189219), + SC_(0.6449340668482264364724151666460251892189), + SC_(0.3949340668482264364724151666460251892189), + SC_(0.2838229557371153253613040555349140781078), + SC_(0.2213229557371153253613040555349140781078), + SC_(0.1813229557371153253613040555349140781078), + SC_(0.1535451779593375475835262777571363003301), + SC_(0.1331370146940314251345466859204016064525), + SC_(0.1175120146940314251345466859204016064525), + SC_(0.1051663356816857461222010069080559274402), + SC_(0.09516633568168574612220100690805592744016), + SC_(0.08690187287176839075030018046177493570463), + SC_(0.07995742842732394630585573601733049126018), + SC_(0.07404026866401033683840011471555534333119), + SC_(0.06893822784768380622615521675637166986180), + SC_(0.06449378340323936178171077231192722541736), + SC_(0.06058753340323936178171077231192722541736), + SC_(0.05712732579078261437686648165448777905057), + SC_(0.05404090603769619462378006190140135929749), + SC_(0.05127082293520311983153629458838196871577), + SC_(0.04877082293520311983153629458838196871577), + SC_(0.04650324923905799511498300660652255828493), + SC_(0.04443713353657865627200779999495231035105), + SC_(0.04254677436833669029847282835033983398054), + SC_(0.04081066325722557918736171723922872286943), + SC_(0.03921066325722557918736171723922872286943), + SC_(0.03773137331639717682049781191378493588718), + SC_(0.03635963120391432359690384757907986044136), + SC_(0.03508412099983269094384262308928394207401), + SC_(0.03389506035773994421375938884433744980291), + SC_(0.03278394924662883310264827773322633869180), + SC_(0.03174336652030209012658168043874142714133), + SC_(0.03076680402030209012658168043874142714133), + SC_(0.02984853037475571730748158861137687250405), + SC_(0.02898347847164153045627051594701701091235), + SC_(0.02816715194102928555831133227354762315725), + SC_(0.02739554700275768062003972733527601821898), + SC_(0.02666508681283803124093088876697799046149), + SC_(0.02597256603721476254286994693872314281606), + SC_(0.02531510384129102815759710012741479304617), + SC_(0.02469010384129102815759710012741479304617), + SC_(0.02409521984367056414807895616548736889388), + SC_(0.02352832641963428296894063417002251628617), + SC_(0.02298749353699501850166102356969801655659), + SC_(0.02247096461137518379091722191680545457312), + SC_(0.02197713745088135663042339475631162741262), + SC_(0.02150454765882086513703965184515850832000), + SC_(0.02105185413233829383780923084017887952869), + SC_(0.02061782635456051606003145306240110175091), + SC_(0.02020133322669712580597064506573304677382), + + /* From 500 to 1000 inclusive: */ + /* N[Table[polygamma(1,x),{x,500,1000,10}],40] */ + + SC_(0.002002001333332266669714268647774197060731), + SC_(0.001962707907716779452707536987802627805478), + SC_(0.001924927220830560087836886751110357728817), + SC_(0.001888573565201797462176247714903982850228), + SC_(0.001853567587934717491642342315537909130701), + SC_(0.001819835712496207207148883544824689071325), + SC_(0.001787309622509112919049294530378524341727), + SC_(0.001755925799930688909525507873736210387807), + SC_(0.001725625111046822227695996850789819829573), + SC_(0.001696352434604175251311909533625714712743), + SC_(0.001668056327160065158600874171864846275643), + SC_(0.001640688721375697019508021597082845963148), + SC_(0.001614204653530344531908147526628406223744), + SC_(0.001588562017007133389350166010439711886334), + SC_(0.001563721338907567163849825550712474891492), + SC_(0.001539645577302094752249567207416345365696), + SC_(0.001516299936926392520203240617160426547639), + SC_(0.001493651701394760695953585236460286481018), + SC_(0.001471670080229094300578280356096446686477), + SC_(0.001450326069199311597153133670448160203387), + SC_(0.001429592322643144721734539533648659286144), + SC_(0.001409443036583397946176993267702984100733), + SC_(0.001389853841592191696522797555468410819444), + SC_(0.001370801704466910484446604323882526177420), + SC_(0.001352264837883752677688324896962748941904), + SC_(0.001334222617283810151070001951163903617504), + SC_(0.001316655504325086010791929491458814498671), + SC_(0.001299544976303159784503980965599319524818), + SC_(0.001282873461004509259711608908038169904080), + SC_(0.001266624276510810009925604298617591070236), + SC_(0.001250781575520731608186449075029891794096), + SC_(0.001235330293798588858327739384385581649440), + SC_(0.001220256102397340964751055441376021959125), + SC_(0.001205545363337428588618639743321944385431), + SC_(0.001191185088453291061973294466848346283972), + SC_(0.001177162901146542691814823893259588004310), + SC_(0.001163467000809082214935959719602656350021), + SC_(0.001150086129701189861587852965952522886083), + SC_(0.001137009542089218078848777802653932997102), + SC_(0.001124226975465055320838136039288794501131), + SC_(0.001111728623685357358627683939948964547062), + SC_(0.001099505111882790624790340268963560561212), + SC_(0.001087547473014387385213628807079818129189), + SC_(0.001075847125923723081414745258211721267207), + SC_(0.001064395854804124498228502056895669702911), + SC_(0.001053185789959620623711365384007169340153), + SC_(0.001042209389768959890535954112125269154314), + SC_(0.001031459423765829864168427986966001957702), + SC_(0.001020928956755509990450221440026807721340), + SC_(0.001010611333894637278361033654755961804543), + SC_(0.001000500166666633333357142823809599566846) + }; + + static const unsigned index[] = + { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1000 + }; + + + static const unsigned table_size = sizeof(index) / sizeof(index[0]); + + T tol = boost::math::tools::epsilon() * 10; + for(unsigned i = 1; i < table_size; ++i) + { + T x(index[i]); + T tg = boost::math::trigamma(x); + BOOST_CHECK_CLOSE_FRACTION(tg, static_cast(data[i]), tol); + } + +} + + +BOOST_AUTO_TEST_CASE(test_main) +{ + test("float"); + test("double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + test("long double"); + test("real_concept"); +#endif +} + + diff --git a/test/test_zeta.hpp b/test/test_zeta.hpp index 3948d9e05..ae8792932 100644 --- a/test/test_zeta.hpp +++ b/test/test_zeta.hpp @@ -81,7 +81,7 @@ void test_zeta(T, const char* name) do_test_zeta(zeta_1_below_data, name, "Zeta: Values close to and less than 1"); boost::array, 90> integer_data = { { - { 2, SC_(1.6449340668482264364724151666460252) }, { 3, SC_(1.2020569031595942853997381615114500) }, { 4, SC_(1.0823232337111381915160036965411679) }, { 5, SC_(1.0369277551433699263313654864570342) }, { 6, SC_(1.0173430619844491397145179297909205) }, { 7, SC_(1.0083492773819228268397975498497968) }, { 8, SC_(1.0040773561979443393786852385086525) }, { 9, SC_(1.0020083928260822144178527692324121) }, { SC_(10), SC_(1.0009945751278180853371459589003190) }, { SC_(11), SC_(1.0004941886041194645587022825264699) }, { SC_(12), SC_(1.0002460865533080482986379980477397) }, { SC_(13), SC_(1.0001227133475784891467518365263574) }, { SC_(14), SC_(1.0000612481350587048292585451051353) }, { SC_(15), SC_(1.0000305882363070204935517285106451) }, { SC_(16), SC_(1.0000152822594086518717325714876367) }, { SC_(17), SC_(1.0000076371976378997622736002935630) }, { SC_(18), SC_(1.0000038172932649998398564616446219) }, { SC_(19), SC_(1.0000019082127165539389256569577951) }, { SC_(20), SC_(1.0000009539620338727961131520386834) }, { SC_(21), SC_(1.0000004769329867878064631167196044) }, { SC_(22), SC_(1.0000002384505027277329900036481868) }, { SC_(23), SC_(1.0000001192199259653110730677887189) }, { SC_(24), SC_(1.0000000596081890512594796124402079) }, { SC_(25), SC_(1.0000000298035035146522801860637051) }, { SC_(26), SC_(1.0000000149015548283650412346585066) }, { SC_(27), SC_(1.0000000074507117898354294919810042) }, { SC_(28), SC_(1.0000000037253340247884570548192040) }, { SC_(29), SC_(1.0000000018626597235130490064039099) }, { SC_(30), SC_(1.0000000009313274324196681828717647) }, { SC_(31), SC_(1.0000000004656629065033784072989233) }, { SC_(32), SC_(1.0000000002328311833676505492001456) }, { SC_(33), SC_(1.0000000001164155017270051977592974) }, { SC_(34), SC_(1.0000000000582077208790270088924369) }, { SC_(35), SC_(1.0000000000291038504449709968692943) }, { SC_(36), SC_(1.0000000000145519218910419842359296) }, { SC_(37), SC_(1.0000000000072759598350574810145209) }, { SC_(38), SC_(1.0000000000036379795473786511902372) }, { SC_(39), SC_(1.0000000000018189896503070659475848) }, { SC_(40), SC_(1.0000000000009094947840263889282533) }, { SC_(41), SC_(1.0000000000004547473783042154026799) }, { SC_(42), SC_(1.0000000000002273736845824652515227) }, { SC_(43), SC_(1.0000000000001136868407680227849349) }, { SC_(44), SC_(1.0000000000000568434198762758560928) }, { SC_(45), SC_(1.0000000000000284217097688930185546) }, { SC_(46), SC_(1.0000000000000142108548280316067698) }, { SC_(47), SC_(1.0000000000000071054273952108527129) }, { SC_(48), SC_(1.0000000000000035527136913371136733) }, { SC_(49), SC_(1.0000000000000017763568435791203275) }, { SC_(50), SC_(1.0000000000000008881784210930815903) }, { SC_(51), SC_(1.0000000000000004440892103143813364) }, { SC_(52), SC_(1.0000000000000002220446050798041984) }, { SC_(53), SC_(1.0000000000000001110223025141066134) }, { SC_(54), SC_(1.0000000000000000555111512484548124) }, { SC_(55), SC_(1.0000000000000000277555756213612417) }, { SC_(56), SC_(1.0000000000000000138777878097252328) }, { SC_(57), SC_(1.0000000000000000069388939045441537) }, { SC_(58), SC_(1.0000000000000000034694469521659226) }, { SC_(59), SC_(1.0000000000000000017347234760475766) }, { SC_(60), SC_(1.0000000000000000008673617380119934) }, + { 2, SC_(1.6449340668482264364724151666460252) }, { 3, SC_(1.2020569031595942853997381615114500) }, { 4, SC_(1.0823232337111381915160036965411679) }, { 5, SC_(1.0369277551433699263313654864570342) }, { 6, SC_(1.0173430619844491397145179297909205) }, { 7, SC_(1.0083492773819228268397975498497968) }, { 8, SC_(1.0040773561979443393786852385086525) }, { 9, SC_(1.0020083928260822144178527692324121) }, { SC_(10.0), SC_(1.0009945751278180853371459589003190) }, { SC_(11.0), SC_(1.0004941886041194645587022825264699) }, { SC_(12.0), SC_(1.0002460865533080482986379980477397) }, { SC_(13.0), SC_(1.0001227133475784891467518365263574) }, { SC_(14.0), SC_(1.0000612481350587048292585451051353) }, { SC_(15.0), SC_(1.0000305882363070204935517285106451) }, { SC_(16.0), SC_(1.0000152822594086518717325714876367) }, { SC_(17.0), SC_(1.0000076371976378997622736002935630) }, { SC_(18.0), SC_(1.0000038172932649998398564616446219) }, { SC_(19.0), SC_(1.0000019082127165539389256569577951) }, { SC_(20.0), SC_(1.0000009539620338727961131520386834) }, { SC_(21.0), SC_(1.0000004769329867878064631167196044) }, { SC_(22.0), SC_(1.0000002384505027277329900036481868) }, { SC_(23.0), SC_(1.0000001192199259653110730677887189) }, { SC_(24.0), SC_(1.0000000596081890512594796124402079) }, { SC_(25.0), SC_(1.0000000298035035146522801860637051) }, { SC_(26.0), SC_(1.0000000149015548283650412346585066) }, { SC_(27.0), SC_(1.0000000074507117898354294919810042) }, { SC_(28.0), SC_(1.0000000037253340247884570548192040) }, { SC_(29.0), SC_(1.0000000018626597235130490064039099) }, { SC_(30.0), SC_(1.0000000009313274324196681828717647) }, { SC_(31.0), SC_(1.0000000004656629065033784072989233) }, { SC_(32.0), SC_(1.0000000002328311833676505492001456) }, { SC_(33.0), SC_(1.0000000001164155017270051977592974) }, { SC_(34.0), SC_(1.0000000000582077208790270088924369) }, { SC_(35.0), SC_(1.0000000000291038504449709968692943) }, { SC_(36.0), SC_(1.0000000000145519218910419842359296) }, { SC_(37.0), SC_(1.0000000000072759598350574810145209) }, { SC_(38.0), SC_(1.0000000000036379795473786511902372) }, { SC_(39.0), SC_(1.0000000000018189896503070659475848) }, { SC_(40.0), SC_(1.0000000000009094947840263889282533) }, { SC_(41.0), SC_(1.0000000000004547473783042154026799) }, { SC_(42.0), SC_(1.0000000000002273736845824652515227) }, { SC_(43.0), SC_(1.0000000000001136868407680227849349) }, { SC_(44.0), SC_(1.0000000000000568434198762758560928) }, { SC_(45.0), SC_(1.0000000000000284217097688930185546) }, { SC_(46.0), SC_(1.0000000000000142108548280316067698) }, { SC_(47.0), SC_(1.0000000000000071054273952108527129) }, { SC_(48.0), SC_(1.0000000000000035527136913371136733) }, { SC_(49.0), SC_(1.0000000000000017763568435791203275) }, { SC_(50.0), SC_(1.0000000000000008881784210930815903) }, { SC_(51.0), SC_(1.0000000000000004440892103143813364) }, { SC_(52.0), SC_(1.0000000000000002220446050798041984) }, { SC_(53.0), SC_(1.0000000000000001110223025141066134) }, { SC_(54.0), SC_(1.0000000000000000555111512484548124) }, { SC_(55.0), SC_(1.0000000000000000277555756213612417) }, { SC_(56.0), SC_(1.0000000000000000138777878097252328) }, { SC_(57.0), SC_(1.0000000000000000069388939045441537) }, { SC_(58.0), SC_(1.0000000000000000034694469521659226) }, { SC_(59.0), SC_(1.0000000000000000017347234760475766) }, { SC_(60.0), SC_(1.0000000000000000008673617380119934) }, { SC_(-61), SC_(-3.3066089876577576725680214670439210e34) }, { SC_(-59), SC_(3.5666582095375556109684574608651829e32) }, { SC_(-57), SC_(-4.1147288792557978697665486067619336e30) }, { SC_(-55), SC_(5.0890659468662289689766332915911925e28) }, { SC_(-53), SC_(-6.7645882379292820990945242301798478e26) }, { SC_(-51), SC_(9.6899578874635940656497942894654088e24) }, { SC_(-49), SC_(-1.5001733492153928733711440151515152e23) }, { SC_(-47), SC_(2.5180471921451095697089023320225526e21) }, { SC_(-45), SC_(-4.5979888343656503490437943262411348e19) }, { SC_(-43), SC_(9.1677436031953307756992753623188406e17) }, { SC_(-41), SC_(-2.0040310656516252738108421663238939e16) }, { SC_(-39), SC_(4.8241448354850170371581670362158167e14) }, { SC_(-37), SC_(-1.2850850499305083333333333333333333e13) }, { SC_(-35), SC_(3.8087931125245368811553022079337869e11) }, { SC_(-33), SC_(-1.2635724795916666666666666666666667e10) }, { SC_(-31), SC_(4.7238486772162990196078431372549020e8) }, { SC_(-29), SC_(-2.0052695796688078946143462272494531e7) }, { SC_(-27), SC_(974936.82385057471264367816091954023) }, { SC_(-25), SC_(-54827.583333333333333333333333333333) }, { SC_(-23), SC_(3607.5105463980463980463980463980464) }, { SC_(-21), SC_(-281.46014492753623188405797101449275) }, { SC_(-19), SC_(26.456212121212121212121212121212121) }, { SC_(-17), SC_(-3.0539543302701197438039543302701197) }, { SC_(-15), SC_(0.44325980392156862745098039215686275) }, { SC_(-13), SC_(-0.083333333333333333333333333333333333) }, { SC_(-11), SC_(0.021092796092796092796092796092796093) }, { -9, SC_(-0.0075757575757575757575757575757575758) }, { -7, SC_(0.0041666666666666666666666666666666667) }, { -5, SC_(-0.0039682539682539682539682539682539683) }, { -3, SC_(0.0083333333333333333333333333333333333) }, { -1, SC_(-0.083333333333333333333333333333333333) } } }; do_test_zeta(integer_data, name, "Zeta: Integer arguments"); From a3bed600894505ffe4e2416d244f45e67e982009 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 26 Oct 2014 16:25:19 +0000 Subject: [PATCH 36/69] More test failure fixes. --- .../special_functions/detail/polygamma.hpp | 8 ++-- test/float128/test_polygamma.cpp | 44 +++++++++++++++++++ test/test_zeta.hpp | 2 +- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 test/float128/test_polygamma.cpp diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 367de7a40..74ffb0e2c 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -62,7 +62,7 @@ // know that we have to use logs for the initial terms: // part_term = ((n > boost::math::max_factorial::value) && (n * n > tools::log_max_value())) - ? T(0) : boost::math::factorial(n - 1, pol) * pow(x, -n - 1); + ? T(0) : static_cast(boost::math::factorial(n - 1, pol) * pow(x, -n - 1)); if(part_term == 0) { // Either n is very large, or the power term underflows, @@ -163,7 +163,7 @@ const T n_fact = boost::math::factorial(n); const T z_pow_n_plus_one = pow(x, n + 1); const T n_fact_over_pow_term = n_fact / z_pow_n_plus_one; - const T term0 = !b_negate ? n_fact_over_pow_term : -n_fact_over_pow_term; + const T term0 = !b_negate ? n_fact_over_pow_term : T(-n_fact_over_pow_term); T one_over_k_fact = T(1); T z_pow_k = T(1); @@ -171,7 +171,7 @@ T k_plus_n_plus_one = T(n + 1); const T pg_kn = k_plus_n_fact * boost::math::zeta(k_plus_n_plus_one); bool b_neg_term = ((n % 2) == 0); - T sum = ((!b_neg_term) ? pg_kn : -pg_kn); + T sum = ((!b_neg_term) ? pg_kn : T(-pg_kn)); for(unsigned k = 1;; k++) { @@ -313,7 +313,7 @@ // allows us to use: http://functions.wolfram.com/06.15.16.0001.01 T z = 1 - x; T result = polygamma_imp(n, z, pol) + constants::pi() * poly_cot_pi(n, z, pol); - return n & 1 ? -result : result; + return n & 1 ? T(-result) : result; } // // Try http://functions.wolfram.com/06.15.16.0007.01 diff --git a/test/float128/test_polygamma.cpp b/test/float128/test_polygamma.cpp new file mode 100644 index 000000000..37d2f778b --- /dev/null +++ b/test/float128/test_polygamma.cpp @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////// +// Copyright 2011 John Maddock. 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_ + +#include "setup.hpp" +#include "table_type.hpp" + +#include +#include "libs/math/test/test_polygamma.hpp" + +void expected_results() +{ + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*", // test data group + ".*", 350, 100); // test function + // + // Finish off by printing out the compiler/stdlib/platform names, + // we do this to make it easier to mark up expected error rates. + // + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; +} + +template +void test(T t, const char* p) +{ + test_polygamma(t, p); +} + +BOOST_AUTO_TEST_CASE( test_main ) +{ + expected_results(); + ALL_TESTS +} + diff --git a/test/test_zeta.hpp b/test/test_zeta.hpp index ae8792932..a93bfd09d 100644 --- a/test/test_zeta.hpp +++ b/test/test_zeta.hpp @@ -82,7 +82,7 @@ void test_zeta(T, const char* name) boost::array, 90> integer_data = { { { 2, SC_(1.6449340668482264364724151666460252) }, { 3, SC_(1.2020569031595942853997381615114500) }, { 4, SC_(1.0823232337111381915160036965411679) }, { 5, SC_(1.0369277551433699263313654864570342) }, { 6, SC_(1.0173430619844491397145179297909205) }, { 7, SC_(1.0083492773819228268397975498497968) }, { 8, SC_(1.0040773561979443393786852385086525) }, { 9, SC_(1.0020083928260822144178527692324121) }, { SC_(10.0), SC_(1.0009945751278180853371459589003190) }, { SC_(11.0), SC_(1.0004941886041194645587022825264699) }, { SC_(12.0), SC_(1.0002460865533080482986379980477397) }, { SC_(13.0), SC_(1.0001227133475784891467518365263574) }, { SC_(14.0), SC_(1.0000612481350587048292585451051353) }, { SC_(15.0), SC_(1.0000305882363070204935517285106451) }, { SC_(16.0), SC_(1.0000152822594086518717325714876367) }, { SC_(17.0), SC_(1.0000076371976378997622736002935630) }, { SC_(18.0), SC_(1.0000038172932649998398564616446219) }, { SC_(19.0), SC_(1.0000019082127165539389256569577951) }, { SC_(20.0), SC_(1.0000009539620338727961131520386834) }, { SC_(21.0), SC_(1.0000004769329867878064631167196044) }, { SC_(22.0), SC_(1.0000002384505027277329900036481868) }, { SC_(23.0), SC_(1.0000001192199259653110730677887189) }, { SC_(24.0), SC_(1.0000000596081890512594796124402079) }, { SC_(25.0), SC_(1.0000000298035035146522801860637051) }, { SC_(26.0), SC_(1.0000000149015548283650412346585066) }, { SC_(27.0), SC_(1.0000000074507117898354294919810042) }, { SC_(28.0), SC_(1.0000000037253340247884570548192040) }, { SC_(29.0), SC_(1.0000000018626597235130490064039099) }, { SC_(30.0), SC_(1.0000000009313274324196681828717647) }, { SC_(31.0), SC_(1.0000000004656629065033784072989233) }, { SC_(32.0), SC_(1.0000000002328311833676505492001456) }, { SC_(33.0), SC_(1.0000000001164155017270051977592974) }, { SC_(34.0), SC_(1.0000000000582077208790270088924369) }, { SC_(35.0), SC_(1.0000000000291038504449709968692943) }, { SC_(36.0), SC_(1.0000000000145519218910419842359296) }, { SC_(37.0), SC_(1.0000000000072759598350574810145209) }, { SC_(38.0), SC_(1.0000000000036379795473786511902372) }, { SC_(39.0), SC_(1.0000000000018189896503070659475848) }, { SC_(40.0), SC_(1.0000000000009094947840263889282533) }, { SC_(41.0), SC_(1.0000000000004547473783042154026799) }, { SC_(42.0), SC_(1.0000000000002273736845824652515227) }, { SC_(43.0), SC_(1.0000000000001136868407680227849349) }, { SC_(44.0), SC_(1.0000000000000568434198762758560928) }, { SC_(45.0), SC_(1.0000000000000284217097688930185546) }, { SC_(46.0), SC_(1.0000000000000142108548280316067698) }, { SC_(47.0), SC_(1.0000000000000071054273952108527129) }, { SC_(48.0), SC_(1.0000000000000035527136913371136733) }, { SC_(49.0), SC_(1.0000000000000017763568435791203275) }, { SC_(50.0), SC_(1.0000000000000008881784210930815903) }, { SC_(51.0), SC_(1.0000000000000004440892103143813364) }, { SC_(52.0), SC_(1.0000000000000002220446050798041984) }, { SC_(53.0), SC_(1.0000000000000001110223025141066134) }, { SC_(54.0), SC_(1.0000000000000000555111512484548124) }, { SC_(55.0), SC_(1.0000000000000000277555756213612417) }, { SC_(56.0), SC_(1.0000000000000000138777878097252328) }, { SC_(57.0), SC_(1.0000000000000000069388939045441537) }, { SC_(58.0), SC_(1.0000000000000000034694469521659226) }, { SC_(59.0), SC_(1.0000000000000000017347234760475766) }, { SC_(60.0), SC_(1.0000000000000000008673617380119934) }, - { SC_(-61), SC_(-3.3066089876577576725680214670439210e34) }, { SC_(-59), SC_(3.5666582095375556109684574608651829e32) }, { SC_(-57), SC_(-4.1147288792557978697665486067619336e30) }, { SC_(-55), SC_(5.0890659468662289689766332915911925e28) }, { SC_(-53), SC_(-6.7645882379292820990945242301798478e26) }, { SC_(-51), SC_(9.6899578874635940656497942894654088e24) }, { SC_(-49), SC_(-1.5001733492153928733711440151515152e23) }, { SC_(-47), SC_(2.5180471921451095697089023320225526e21) }, { SC_(-45), SC_(-4.5979888343656503490437943262411348e19) }, { SC_(-43), SC_(9.1677436031953307756992753623188406e17) }, { SC_(-41), SC_(-2.0040310656516252738108421663238939e16) }, { SC_(-39), SC_(4.8241448354850170371581670362158167e14) }, { SC_(-37), SC_(-1.2850850499305083333333333333333333e13) }, { SC_(-35), SC_(3.8087931125245368811553022079337869e11) }, { SC_(-33), SC_(-1.2635724795916666666666666666666667e10) }, { SC_(-31), SC_(4.7238486772162990196078431372549020e8) }, { SC_(-29), SC_(-2.0052695796688078946143462272494531e7) }, { SC_(-27), SC_(974936.82385057471264367816091954023) }, { SC_(-25), SC_(-54827.583333333333333333333333333333) }, { SC_(-23), SC_(3607.5105463980463980463980463980464) }, { SC_(-21), SC_(-281.46014492753623188405797101449275) }, { SC_(-19), SC_(26.456212121212121212121212121212121) }, { SC_(-17), SC_(-3.0539543302701197438039543302701197) }, { SC_(-15), SC_(0.44325980392156862745098039215686275) }, { SC_(-13), SC_(-0.083333333333333333333333333333333333) }, { SC_(-11), SC_(0.021092796092796092796092796092796093) }, { -9, SC_(-0.0075757575757575757575757575757575758) }, { -7, SC_(0.0041666666666666666666666666666666667) }, { -5, SC_(-0.0039682539682539682539682539682539683) }, { -3, SC_(0.0083333333333333333333333333333333333) }, { -1, SC_(-0.083333333333333333333333333333333333) } + { SC_(-61.0), SC_(-3.3066089876577576725680214670439210e34) }, { SC_(-59.0), SC_(3.5666582095375556109684574608651829e32) }, { SC_(-57.0), SC_(-4.1147288792557978697665486067619336e30) }, { SC_(-55.0), SC_(5.0890659468662289689766332915911925e28) }, { SC_(-53.0), SC_(-6.7645882379292820990945242301798478e26) }, { SC_(-51.0), SC_(9.6899578874635940656497942894654088e24) }, { SC_(-49.0), SC_(-1.5001733492153928733711440151515152e23) }, { SC_(-47.0), SC_(2.5180471921451095697089023320225526e21) }, { SC_(-45.0), SC_(-4.5979888343656503490437943262411348e19) }, { SC_(-43.0), SC_(9.1677436031953307756992753623188406e17) }, { SC_(-41.0), SC_(-2.0040310656516252738108421663238939e16) }, { SC_(-39.0), SC_(4.8241448354850170371581670362158167e14) }, { SC_(-37.0), SC_(-1.2850850499305083333333333333333333e13) }, { SC_(-35.0), SC_(3.8087931125245368811553022079337869e11) }, { SC_(-33.0), SC_(-1.2635724795916666666666666666666667e10) }, { SC_(-31.0), SC_(4.7238486772162990196078431372549020e8) }, { SC_(-29.0), SC_(-2.0052695796688078946143462272494531e7) }, { SC_(-27.0), SC_(974936.82385057471264367816091954023) }, { SC_(-25.0), SC_(-54827.583333333333333333333333333333) }, { SC_(-23.0), SC_(3607.5105463980463980463980463980464) }, { SC_(-21.0), SC_(-281.46014492753623188405797101449275) }, { SC_(-19.0), SC_(26.456212121212121212121212121212121) }, { SC_(-17.0), SC_(-3.0539543302701197438039543302701197) }, { SC_(-15.0), SC_(0.44325980392156862745098039215686275) }, { SC_(-13.0), SC_(-0.083333333333333333333333333333333333) }, { SC_(-11.0), SC_(0.021092796092796092796092796092796093) }, { -9, SC_(-0.0075757575757575757575757575757575758) }, { -7, SC_(0.0041666666666666666666666666666666667) }, { -5, SC_(-0.0039682539682539682539682539682539683) }, { -3, SC_(0.0083333333333333333333333333333333333) }, { -1, SC_(-0.083333333333333333333333333333333333) } } }; do_test_zeta(integer_data, name, "Zeta: Integer arguments"); } From 83e6f586148e8fe23112b2ef6eb298fc508ef696 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 27 Oct 2014 17:40:12 +0000 Subject: [PATCH 37/69] Add tests for small x. --- test/test_polygamma.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index bdd0db1e9..367502465 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -157,5 +157,19 @@ void test_polygamma(T, const char* name) } }; do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); + boost::array, 90> small_data = + { { + { SC_(0), SC_(0.1250000000), SC_(-8.3884926632958548678027429230863430) }, { SC_(0), SC_(0.06250000000), SC_(-16.478853490060104366505723782801995) }, { SC_(0), SC_(0.03125000000), SC_(-32.526953288606118111369026129964135) }, { SC_(0), SC_(0.01562500000), SC_(-64.551802973167856670965920212624596) }, { SC_(0), SC_(0.007812500000), SC_(-128.56443747297672763722041223143322) }, { SC_(0), SC_(0.003906250000), SC_(-256.57080841886464838984737508407824) }, { SC_(0), SC_(0.001953125000), SC_(-512.57400748048652546824732749592750) }, { SC_(0), SC_(0.0009765625000), SC_(-1024.5756104293406219086220979096446) }, { SC_(0), SC_(0.0004882812500), SC_(-2048.5764127609059633822989920937770) }, { SC_(0), SC_(0.0002441406250), SC_(-4096.5768141413027972625364884707221) }, { SC_(0), SC_(0.0001220703125), SC_(-8192.5770148851960259755970875167303) }, { SC_(0), SC_(0.00006103515625), SC_(-16384.577115270571506673278270921248) }, { SC_(0), SC_(0.00003051757812), SC_(-32768.577165466617109315191527852551) }, { SC_(0), SC_(0.00001525878906), SC_(-65536.577190565479456940587995127301) }, { SC_(0), SC_(7.629394531e-6), SC_(-131072.57720311512052742189906385878) }, { SC_(0), SC_(3.814697266e-6), SC_(-262144.57720938999353809133982546559) }, { SC_(0), SC_(1.907348633e-6), SC_(-524288.57721252744316244096483807868) }, { SC_(0), SC_(9.536743164e-7), SC_(-1.0485765772140961712543892173131386e6) }, + { SC_(1), SC_(0.1250000000), SC_(65.388133444988034473142999334395961) }, { SC_(1), SC_(0.06250000000), SC_(257.50642004291541426394984152786018) }, { SC_(1), SC_(0.03125000000), SC_(1025.5728544782377088851896549789956) }, { SC_(1), SC_(0.01562500000), SC_(4097.6081469812325471140472931934309) }, { SC_(1), SC_(0.007812500000), SC_(16385.626348148031663597978251925972) }, { SC_(1), SC_(0.003906250000), SC_(65537.635592296074077546680509110271) }, { SC_(1), SC_(0.001953125000), SC_(262145.64025088744769438583827382756) }, { SC_(1), SC_(0.0009765625000), SC_(1.0485776425893921526170408061678298e6) }, + { SC_(2), SC_(0.1250000000), SC_(-1025.7533381181356825956689300565174) }, { SC_(2), SC_(0.06250000000), SC_(-8194.0423055503627202407284588855458) }, { SC_(2), SC_(0.03125000000), SC_(-65538.212736402744663973874571262931) }, { SC_(2), SC_(0.01562500000), SC_(-524290.30560802491992997062359624105) }, { SC_(2), SC_(0.007812500000), SC_(-4.1943063541297826472489756741474152e6) }, { SC_(2), SC_(0.003906250000), SC_(-3.3554434378935516909394862712904232e7) }, { SC_(2), SC_(0.001953125000), SC_(-2.6843545839147764655287988662280398e8) }, { SC_(2), SC_(0.0009765625000), SC_(-2.1474836503977839163960630063909364e9) }, + { SC_(3), SC_(0.1250000000), SC_(24580.143419063566218511004446647010) }, { SC_(3), SC_(0.06250000000), SC_(393221.15036999967974263906424748910) }, { SC_(3), SC_(0.03125000000), SC_(6.2914617723523498519444110540563165e6) }, { SC_(3), SC_(0.01562500000), SC_(1.0066330211954465631968224525194028e8) }, { SC_(3), SC_(0.007812500000), SC_(1.6106127423031841473495039368910042e9) }, { SC_(3), SC_(0.003906250000), SC_(2.5769803782397651667126674423858834e10) }, { SC_(3), SC_(0.001953125000), SC_(4.1231686042244556536661660289768233e11) }, { SC_(3), SC_(0.0009765625000), SC_(6.5970697666624696945083422683684831e12) }, + { SC_(4), SC_(0.1250000000), SC_(-786445.98543106378579320120709638297) }, { SC_(4), SC_(0.06250000000), SC_(-2.5165842491343080297812493001330106e7) }, { SC_(4), SC_(0.03125000000), SC_(-8.0530638940150780088628643019449463e8) }, { SC_(4), SC_(0.01562500000), SC_(-2.5769803799064252508878172105001377e10) }, { SC_(4), SC_(0.007812500000), SC_(-8.2463372085595426712260437166652246e11) }, { SC_(4), SC_(0.003906250000), SC_(-2.6388279066648414875708308182697262e13) }, { SC_(4), SC_(0.001953125000), SC_(-8.4442493013199264920484069629201316e14) }, { SC_(4), SC_(0.0009765625000), SC_(-2.7021597764223000767391638642998277e16) }, + { SC_(5), SC_(0.1250000000), SC_(3.1457340659602645662942019557433307e7) }, { SC_(5), SC_(0.06250000000), SC_(2.0132660051504893647288429933363318e9) }, { SC_(5), SC_(0.03125000000), SC_(1.2884901898167237155557768979087387e11) }, { SC_(5), SC_(0.01562500000), SC_(8.2463372084313301694493047619778287e12) }, { SC_(5), SC_(0.007812500000), SC_(5.2776558133259656048321206289799569e14) }, { SC_(5), SC_(0.003906250000), SC_(3.3776997205278839283396175959111085e16) }, { SC_(5), SC_(0.001953125000), SC_(2.1617278211378382006727785506307164e18) }, { SC_(5), SC_(0.0009765625000), SC_(1.3835058055282163724137457865337740e20) }, + { SC_(8), SC_(0.1250000000), SC_(-5.4116588069756277838328695722389595e12) }, { SC_(8), SC_(0.06250000000), SC_(-2.7707693020189462516270216110672946e15) }, { SC_(8), SC_(0.03125000000), SC_(-1.4186338826217368769684713903764732e18) }, { SC_(8), SC_(0.01562500000), SC_(-7.2634054790231363002428528775599797e20) }, { SC_(8), SC_(0.007812500000), SC_(-3.7188636052598456061623085548707189e23) }, { SC_(8), SC_(0.003906250000), SC_(-1.9040581658930409501626172937578262e26) }, { SC_(8), SC_(0.001953125000), SC_(-9.7487778093723696648306072338399010e28) }, { SC_(8), SC_(0.0009765625000), SC_(-4.9913742383986532683932688751727976e31) }, + { SC_(15), SC_(0.1250000000), SC_(3.6807761227792200230957850246407904e26) }, { SC_(15), SC_(0.06250000000), SC_(2.4122334398245883325511911077327284e31) }, { SC_(15), SC_(0.03125000000), SC_(1.5808813071234422095882610857505513e36) }, { SC_(15), SC_(0.01562500000), SC_(1.0360463734364190864757622613687259e41) }, { SC_(15), SC_(0.007812500000), SC_(6.7898335129529161251275555560392101e45) }, { SC_(15), SC_(0.003906250000), SC_(4.4497852910488231117635948092058560e50) }, { SC_(15), SC_(0.001953125000), SC_(2.9162112883417567145253894941611498e55) }, { SC_(15), SC_(0.0009765625000), SC_(1.9111682299276536804313592588934511e60) }, + { SC_(22), SC_(0.1250000000), SC_(-6.6349292044725783891012472579673570e41) }, { SC_(22), SC_(0.06250000000), SC_(-5.5657820204072306855435555719642654e48) }, { SC_(22), SC_(0.03125000000), SC_(-4.6689163582644258586596154617085763e55) }, { SC_(22), SC_(0.01562500000), SC_(-3.9165709114267828873358919539012256e62) }, { SC_(22), SC_(0.007812500000), SC_(-3.2854578080162002342968961931631453e69) }, { SC_(22), SC_(0.003906250000), SC_(-2.7560417651987161415024817781137906e76) }, { SC_(22), SC_(0.001953125000), SC_(-2.3119353999880071814336850663739568e83) }, { SC_(22), SC_(0.0009765625000), SC_(-1.9393919791822596946232062017265105e90) }, + { SC_(35), SC_(0.1250000000), SC_(3.3532982327901451846973629635910627e72) }, { SC_(35), SC_(0.06250000000), SC_(2.3043689989709229438987285737704404e83) }, { SC_(35), SC_(0.03125000000), SC_(1.5835503181594194718369731136519624e94) }, { SC_(35), SC_(0.01562500000), SC_(1.0882074924904162473416628106826351e105) }, { SC_(35), SC_(0.007812500000), SC_(7.4781049464136054012151819362261716e115) }, { SC_(35), SC_(0.003906250000), SC_(5.1389145889443628300269064119650184e126) }, { SC_(35), SC_(0.001953125000), SC_(3.5314352154325314429637711743107931e137) }, { SC_(35), SC_(0.0009765625000), SC_(2.4267838013160699267233738410387795e148) } + } }; + do_test_polygamma(small_data, name, "Mathematica Data - small arguments"); } From 7427376bd9f2acf525c3c0ba30818be452beee02 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 28 Oct 2014 19:37:50 +0000 Subject: [PATCH 38/69] [Polygamma] Fix test data for small x - input x value were off slightly. --- test/test_polygamma.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 367502465..f284536a8 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -159,7 +159,7 @@ void test_polygamma(T, const char* name) boost::array, 90> small_data = { { - { SC_(0), SC_(0.1250000000), SC_(-8.3884926632958548678027429230863430) }, { SC_(0), SC_(0.06250000000), SC_(-16.478853490060104366505723782801995) }, { SC_(0), SC_(0.03125000000), SC_(-32.526953288606118111369026129964135) }, { SC_(0), SC_(0.01562500000), SC_(-64.551802973167856670965920212624596) }, { SC_(0), SC_(0.007812500000), SC_(-128.56443747297672763722041223143322) }, { SC_(0), SC_(0.003906250000), SC_(-256.57080841886464838984737508407824) }, { SC_(0), SC_(0.001953125000), SC_(-512.57400748048652546824732749592750) }, { SC_(0), SC_(0.0009765625000), SC_(-1024.5756104293406219086220979096446) }, { SC_(0), SC_(0.0004882812500), SC_(-2048.5764127609059633822989920937770) }, { SC_(0), SC_(0.0002441406250), SC_(-4096.5768141413027972625364884707221) }, { SC_(0), SC_(0.0001220703125), SC_(-8192.5770148851960259755970875167303) }, { SC_(0), SC_(0.00006103515625), SC_(-16384.577115270571506673278270921248) }, { SC_(0), SC_(0.00003051757812), SC_(-32768.577165466617109315191527852551) }, { SC_(0), SC_(0.00001525878906), SC_(-65536.577190565479456940587995127301) }, { SC_(0), SC_(7.629394531e-6), SC_(-131072.57720311512052742189906385878) }, { SC_(0), SC_(3.814697266e-6), SC_(-262144.57720938999353809133982546559) }, { SC_(0), SC_(1.907348633e-6), SC_(-524288.57721252744316244096483807868) }, { SC_(0), SC_(9.536743164e-7), SC_(-1.0485765772140961712543892173131386e6) }, + { SC_(0), SC_(0.12500000000000000000), SC_(-8.3884926632958548678027429230863430) }, { SC_(0), SC_(0.062500000000000000000), SC_(-16.478853490060104366505723782801995) }, { SC_(0), SC_(0.031250000000000000000), SC_(-32.526953288606118111369026129964135) }, { SC_(0), SC_(0.015625000000000000000), SC_(-64.551802973167856670965920212624596) }, { SC_(0), SC_(0.0078125000000000000000), SC_(-128.56443747297672763722041223143322) }, { SC_(0), SC_(0.0039062500000000000000), SC_(-256.57080841886464838984737508407824) }, { SC_(0), SC_(0.0019531250000000000000), SC_(-512.57400748048652546824732749592750) }, { SC_(0), SC_(0.00097656250000000000000), SC_(-1024.5756104293406219086220979096446) }, { SC_(0), SC_(0.00048828125000000000000), SC_(-2048.5764127609059633822989920937770) }, { SC_(0), SC_(0.00024414062500000000000), SC_(-4096.5768141413027972625364884707221) }, { SC_(0), SC_(0.00012207031250000000000), SC_(-8192.5770148851960259755970875167303) }, { SC_(0), SC_(0.000061035156250000000000), SC_(-16384.577115270571506673278270921248) }, { SC_(0), SC_(0.000030517578125000000000), SC_(-32768.577165466617109315191527852551) }, { SC_(0), SC_(0.000015258789062500000000), SC_(-65536.577190565479456940587995127301) }, { SC_(0), SC_(7.6293945312500000000e-6), SC_(-131072.57720311512052742189906385878) }, { SC_(0), SC_(3.8146972656250000000e-6), SC_(-262144.57720938999353809133982546559) }, { SC_(0), SC_(1.9073486328125000000e-6), SC_(-524288.57721252744316244096483807868) }, { SC_(0), SC_(9.5367431640625000000e-7), SC_(-1.0485765772140961712543892173131386e6) }, { SC_(1), SC_(0.1250000000), SC_(65.388133444988034473142999334395961) }, { SC_(1), SC_(0.06250000000), SC_(257.50642004291541426394984152786018) }, { SC_(1), SC_(0.03125000000), SC_(1025.5728544782377088851896549789956) }, { SC_(1), SC_(0.01562500000), SC_(4097.6081469812325471140472931934309) }, { SC_(1), SC_(0.007812500000), SC_(16385.626348148031663597978251925972) }, { SC_(1), SC_(0.003906250000), SC_(65537.635592296074077546680509110271) }, { SC_(1), SC_(0.001953125000), SC_(262145.64025088744769438583827382756) }, { SC_(1), SC_(0.0009765625000), SC_(1.0485776425893921526170408061678298e6) }, { SC_(2), SC_(0.1250000000), SC_(-1025.7533381181356825956689300565174) }, { SC_(2), SC_(0.06250000000), SC_(-8194.0423055503627202407284588855458) }, { SC_(2), SC_(0.03125000000), SC_(-65538.212736402744663973874571262931) }, { SC_(2), SC_(0.01562500000), SC_(-524290.30560802491992997062359624105) }, { SC_(2), SC_(0.007812500000), SC_(-4.1943063541297826472489756741474152e6) }, { SC_(2), SC_(0.003906250000), SC_(-3.3554434378935516909394862712904232e7) }, { SC_(2), SC_(0.001953125000), SC_(-2.6843545839147764655287988662280398e8) }, { SC_(2), SC_(0.0009765625000), SC_(-2.1474836503977839163960630063909364e9) }, { SC_(3), SC_(0.1250000000), SC_(24580.143419063566218511004446647010) }, { SC_(3), SC_(0.06250000000), SC_(393221.15036999967974263906424748910) }, { SC_(3), SC_(0.03125000000), SC_(6.2914617723523498519444110540563165e6) }, { SC_(3), SC_(0.01562500000), SC_(1.0066330211954465631968224525194028e8) }, { SC_(3), SC_(0.007812500000), SC_(1.6106127423031841473495039368910042e9) }, { SC_(3), SC_(0.003906250000), SC_(2.5769803782397651667126674423858834e10) }, { SC_(3), SC_(0.001953125000), SC_(4.1231686042244556536661660289768233e11) }, { SC_(3), SC_(0.0009765625000), SC_(6.5970697666624696945083422683684831e12) }, From 8362ab2a08cfc3b247616c14c91491a959392680 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 28 Oct 2014 19:39:35 +0000 Subject: [PATCH 39/69] [polygamma] Replace small-x expansion with one that's accelerated and avoids spurious overflow. Also tweak selection logic, and reuse variables better. --- .../special_functions/detail/polygamma.hpp | 166 +++++++++++------- 1 file changed, 98 insertions(+), 68 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 74ffb0e2c..f6f2e3179 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -30,7 +30,7 @@ namespace boost { namespace math { namespace detail{ template - T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol) // for large values of x such as for x> 400 + T polygamma_atinfinityplus(const int n, const T& x, const Policy& pol, const char* function) // for large values of x such as for x> 400 { // See http://functions.wolfram.com/GammaBetaErf/PolyGamma2/06/02/0001/ BOOST_MATH_STD_USING @@ -105,7 +105,7 @@ // if(k > policies::get_max_series_iterations()) { - policies::raise_evaluation_error("polygamma<%1%>(int, %1%)", "Series did not converge, closest value was %1%", sum, pol); + policies::raise_evaluation_error(function, "Series did not converge, closest value was %1%", sum, pol); break; } } @@ -117,7 +117,7 @@ } template - T polygamma_attransitionplus(const int n, const T& x, const Policy& pol) + T polygamma_attransitionplus(const int n, const T& x, const Policy& pol, const char* function) { // See: http://functions.wolfram.com/GammaBetaErf/PolyGamma2/16/01/01/0017/ @@ -146,66 +146,88 @@ if((n - 1) & 1) sum0 = -sum0; - return sum0 + polygamma_atinfinityplus(n, z, pol); - } - - template - T polygamma_nearzero(const int n, const T& x, const Policy& pol) - { - BOOST_MATH_STD_USING - // not defined for digamma - - // Use a series expansion for x near zero which uses poly_gamma(m, 1) which, - // in turn, uses the Riemann zeta function for integer arguments. - // http://functions.wolfram.com/GammaBetaErf/PolyGamma2/06/01/03/01/02/ - const bool b_negate = (( n % 2 ) == 0 ) ; - - const T n_fact = boost::math::factorial(n); - const T z_pow_n_plus_one = pow(x, n + 1); - const T n_fact_over_pow_term = n_fact / z_pow_n_plus_one; - const T term0 = !b_negate ? n_fact_over_pow_term : T(-n_fact_over_pow_term); - - T one_over_k_fact = T(1); - T z_pow_k = T(1); - T k_plus_n_fact = boost::math::factorial(n); - T k_plus_n_plus_one = T(n + 1); - const T pg_kn = k_plus_n_fact * boost::math::zeta(k_plus_n_plus_one); - bool b_neg_term = ((n % 2) == 0); - T sum = ((!b_neg_term) ? pg_kn : T(-pg_kn)); - - for(unsigned k = 1;; k++) - { - k_plus_n_fact *= k_plus_n_plus_one; - k_plus_n_plus_one += 1; - one_over_k_fact /= k; - z_pow_k *= x; - - const T pg = k_plus_n_fact * boost::math::zeta(k_plus_n_plus_one); - - const T term = (pg * z_pow_k) * one_over_k_fact; - - if(fabs(term / sum) < tools::epsilon()) - { - break; - } - - b_neg_term = !b_neg_term; - - ((!b_neg_term) ? sum += term : sum -= term); - - if(k > policies::get_max_series_iterations()) - { - policies::raise_evaluation_error("polygamma<%1%>(int, %1%)", "Series did not converge, closest value was %1%", sum, pol); - break; - } - } - - return term0 + sum; - + return sum0 + polygamma_atinfinityplus(n, z, pol, function); } template - T poly_cot_pi(int n, T x, const Policy& pol) + T polygamma_nearzero(int n, T x, const Policy& pol, const char* function) + { + BOOST_MATH_STD_USING + // + // If we take this expansion for polygamma: http://functions.wolfram.com/06.15.06.0003.02 + // and substitute in this expression for polygamma(n, 1): http://functions.wolfram.com/06.15.03.0009.01 + // we get an alternating series for polygamma when x is small in terms of zeta functions of + // integer arguments (which are easy to evaluate, at least when the integer is even). + // + // In order to avoid spurious overflow, save the n! term for later, and rescale at the end: + // + T scale = boost::math::factorial(n, pol); + // + // "factorial_part" contains everything except the zeta function + // evaluations in each term: + // + T factorial_part = 1; + // + // "prefix" is what we'll be adding the accumulated sum to, it will + // be n! / z^(n+1), but since we're scaling by n! it's just + // 1 / z^(n+1) for now: + // + T prefix = pow(x, n + 1); + if(prefix == 0) + return boost::math::policies::raise_overflow_error(function, 0, pol); + prefix = 1 / prefix; + // + // Since this is an alternating sum we can accelerate convergence using + // Algorithm 1 from "Convergence Acceleration of Alternating Series", + // Henri Cohen, Fernando Rodriguez Villegas, and Don Zagier, + // Experimental Mathematics, 1999. + // While in principle we can determine up front how many terms we will need, + // note that often the prefix term is so large that we need no terms at all, + // or else the series is divergent and we need rather more terms than expected. + // The latter case we try to weed out before this function gets called, but + // just in case set the number of terms to an arbitrary high value, and then + // use the usual heurists to determine when to stop, these next variables + // correspond directly to those in Algorithm 1 of the above paper: + // + int nd = (int)std::min((boost::intmax_t)(boost::math::policies::digits_base10() * 10), (boost::intmax_t)boost::math::policies::get_max_series_iterations()); + T d = pow(3 + sqrt(T(8)), nd); + d = (d + 1 / d) / 2; + T b = -1; + T c = -d; + T sum = 0; + for(int k = 0; k < nd;) + { + // Get the k'th term: + T term = factorial_part * boost::math::zeta(k + n + 1, pol); + // Series acceleration: + c = b - c; + sum = sum + c * term; + b = (k + nd) * (k - nd) * b / ((k + 0.5) * (k + 1)); + // Termination condition: + if(fabs(c * term) < (sum + prefix * d) * boost::math::policies::get_epsilon()) + break; + // + // Move on k and factorial_part: + // + ++k; + factorial_part *= x * (n + k) / k; + } + // + // We need to add the sum to the prefix term and then + // multiply by the scale, at each stage checking for oveflow: + // + sum /= d; + if(boost::math::tools::max_value() - sum < prefix) + return boost::math::policies::raise_overflow_error(function, 0, pol); + sum += prefix; + if(boost::math::tools::max_value() / scale < sum) + return boost::math::policies::raise_overflow_error(function, 0, pol); + sum *= scale; + return n & 1 ? sum : -sum; + } + + template + T poly_cot_pi(int n, T x, const Policy& pol, const char* function) { // Return n'th derivative of cot(pi*x) at x, these are simply // tabulated for up to n = 9, beyond that it is possible to @@ -282,7 +304,7 @@ return -2 * boost::math::pow<9>(constants::pi()) * (88234 * c2 + 14608 * c4 + 502 * c6 + c8 + 78095) / boost::math::pow<10>(s); } } - return policies::raise_domain_error("boost::math::polygamma<%1%>(int, %1%)", "Derivative of cotangent not implemented at n = %1%", n, pol); + return policies::raise_domain_error(function, "Derivative of cotangent not implemented at n = %1%", n, pol); } template @@ -312,7 +334,7 @@ // We have tabulated the derivatives of cot(x) up to the 9th derivative, which // allows us to use: http://functions.wolfram.com/06.15.16.0001.01 T z = 1 - x; - T result = polygamma_imp(n, z, pol) + constants::pi() * poly_cot_pi(n, z, pol); + T result = polygamma_imp(n, z, pol) + constants::pi() * poly_cot_pi(n, z, pol, function); return n & 1 ? T(-result) : result; } // @@ -327,23 +349,31 @@ { sum += pow(z - k, -n - 1); } - sum *= boost::math::factorial(n); + sum *= boost::math::factorial(n, pol); if(n & 1) sum = -sum; return polygamma_imp(n, z, pol) - sum; } - - if(x < 0.125F) + // + // Limit for use of small-x-series is chosen + // so that the series doesn't go too divergent + // in the first few terms. Ordinarily this + // would mean setting the limit to ~ 1 / n, + // but since the series is accelerated, we can + // tolerate a small amount of divergence: + // + T small_x_limit = std::min(T(5) / n, T(0.25f)); + if(x < small_x_limit) { - return polygamma_nearzero(n, x, pol); + return polygamma_nearzero(n, x, pol, function); } else if(x > 0.4F * policies::digits_base10() + 4 * n) { - return polygamma_atinfinityplus(n, x, pol); + return polygamma_atinfinityplus(n, x, pol, function); } else { - return polygamma_attransitionplus(n, x, pol); + return polygamma_attransitionplus(n, x, pol, function); } } From 232e7af69b3b2ab4f11146c85adbea7c94a502b1 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 29 Oct 2014 17:38:38 +0000 Subject: [PATCH 40/69] [polygamma] short circuit series evaluation when it can make no difference to the result. --- include/boost/math/special_functions/detail/polygamma.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index f6f2e3179..73e73124e 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -177,6 +177,13 @@ return boost::math::policies::raise_overflow_error(function, 0, pol); prefix = 1 / prefix; // + // First term in the series is necessarily < zeta(2) < 2, so + // ignore the sum if it will have no effect on the result anyway: + // + 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); + // // Since this is an alternating sum we can accelerate convergence using // Algorithm 1 from "Convergence Acceleration of Alternating Series", // Henri Cohen, Fernando Rodriguez Villegas, and Don Zagier, From 8a36ba07d1b3d5712c80d6a4663c5b899b3a3555 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 30 Oct 2014 11:06:28 +0000 Subject: [PATCH 41/69] {Polygamma]Fix polygamma_nearzero to call correct zeta function overload. --- include/boost/math/special_functions/detail/polygamma.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 73e73124e..bf9d0df08 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -205,7 +205,7 @@ for(int k = 0; k < nd;) { // Get the k'th term: - T term = factorial_part * boost::math::zeta(k + n + 1, pol); + T term = factorial_part * boost::math::zeta(T(k + n + 1), pol); // Series acceleration: c = b - c; sum = sum + c * term; From 081abc704a3d1911abf69c4e3fb6d683a4de569d Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 30 Oct 2014 11:08:36 +0000 Subject: [PATCH 42/69] [zeta/polygamma]Add cache of odd-integer zeta values. Fix even integer case to call fast closed-form code more often. Fix initialization code to initializes new cache of even-integer values. --- include/boost/math/special_functions/zeta.hpp | 57 +++++++++++++++++-- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index 71ecf5124..6c65f6450 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -167,6 +167,8 @@ T zeta_imp_prec(T s, T sc, const Policy& pol, const mpl::int_<0>&) { BOOST_MATH_STD_USING T result; + if(s >= policies::digits()) + return 1; result = zeta_polynomial_series(s, sc, pol); #if 0 // Old code archived for future reference: @@ -863,6 +865,34 @@ T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<113>&) return result; } +template +T zeta_imp_odd_integer(int s, const T&, const Policy&, const mpl::true_&) +{ + static const T results[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, 1.2020569031595942853997381615114500), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0369277551433699263313654864570342), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0083492773819228268397975498497968), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0020083928260822144178527692324121), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0004941886041194645587022825264699), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0001227133475784891467518365263574), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000305882363070204935517285106451), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000076371976378997622736002935630), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000019082127165539389256569577951), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000004769329867878064631167196044), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000001192199259653110730677887189), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000298035035146522801860637051), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000074507117898354294919810042), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000018626597235130490064039099), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000004656629065033784072989233), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000001164155017270051977592974), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000291038504449709968692943), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000072759598350574810145209), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000018189896503070659475848), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000004547473783042154026799), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000001136868407680227849349), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000284217097688930185546), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000071054273952108527129), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000017763568435791203275), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000004440892103143813364), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000001110223025141066134), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000277555756213612417), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000069388939045441537), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000017347234760475766), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000004336808690020650), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000001084202172494241), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000271050543122347), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000067762635780452), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000016940658945098), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000004235164736273), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000001058791184068), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000264697796017), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000066174449004), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000016543612251), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000004135903063), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000001033975766), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000258493941), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000064623485), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000016155871), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000004038968), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000001009742), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000252435), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000063109), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000015777), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000003944), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000986), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000247), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000062), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000015), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000004), BOOST_MATH_BIG_CONSTANT(T, 113, 1.0000000000000000000000000000000001), + }; + return s > 113 ? 1 : results[(s - 3) / 2]; +} + +template +T zeta_imp_odd_integer(int s, const T& sc, const Policy& pol, const mpl::false_&) +{ + static bool is_init = false; + static T results[50] = {}; + if(!is_init) + { + is_init = true; + for(int 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); + } + } + int 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) { @@ -875,6 +905,11 @@ T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag) s, pol); T result; // + // Trivial case: + // + if(s > policies::digits()) + return 1; + // // Start by seeing if we have a simple closed form: // if(floor(s) == s) @@ -892,14 +927,20 @@ T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag) if(n <= boost::math::max_bernoulli_b2n::value) return T((-v & 1) ? -1 : 1) * boost::math::unchecked_bernoulli_b2n(n) / (1 - v); } - else if(((v / 2) <= boost::math::max_bernoulli_b2n::value) && ((v & 1) == 0) && (v <= boost::math::max_factorial::value)) + else if((v & 1) == 0) { + if(((v / 2) <= boost::math::max_bernoulli_b2n::value) && (v <= 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::unchecked_bernoulli_b2n(v / 2) / boost::math::unchecked_factorial(v); + boost::math::bernoulli_b2n(v / 2) / boost::math::factorial(v); } + else + return zeta_imp_odd_integer(v, sc, pol, mpl::bool_<(Tag::value <= 113) && Tag::value>()); } } catch(const boost::math::rounding_error&){} // Just fall through, s is too large to round + catch(const std::overflow_error&){} } if(fabs(s) < tools::root_epsilon()) @@ -950,8 +991,8 @@ struct zeta_initializer { do_init(tag()); } - static void do_init(const mpl::int_<0>&){} - static void do_init(const mpl::int_<53>&){} + static void do_init(const mpl::int_<0>&){ boost::math::zeta(static_cast(5), Policy()); } + static void do_init(const mpl::int_<53>&){ boost::math::zeta(static_cast(5), Policy()); } static void do_init(const mpl::int_<64>&) { boost::math::zeta(static_cast(0.5), Policy()); @@ -960,6 +1001,8 @@ struct zeta_initializer 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 mpl::int_<113>&) { @@ -969,8 +1012,10 @@ struct zeta_initializer 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), Policy()); - boost::math::zeta(static_cast(70), 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{} }; From 513606dec532dcddb9c968f923550a02dc94b494 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 30 Oct 2014 11:09:20 +0000 Subject: [PATCH 43/69] [Polygamma] Don't use integer values in SC_ macro as it doesn't work with __float128. --- test/test_polygamma.hpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index f284536a8..47f2b0887 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -159,16 +159,16 @@ void test_polygamma(T, const char* name) boost::array, 90> small_data = { { - { SC_(0), SC_(0.12500000000000000000), SC_(-8.3884926632958548678027429230863430) }, { SC_(0), SC_(0.062500000000000000000), SC_(-16.478853490060104366505723782801995) }, { SC_(0), SC_(0.031250000000000000000), SC_(-32.526953288606118111369026129964135) }, { SC_(0), SC_(0.015625000000000000000), SC_(-64.551802973167856670965920212624596) }, { SC_(0), SC_(0.0078125000000000000000), SC_(-128.56443747297672763722041223143322) }, { SC_(0), SC_(0.0039062500000000000000), SC_(-256.57080841886464838984737508407824) }, { SC_(0), SC_(0.0019531250000000000000), SC_(-512.57400748048652546824732749592750) }, { SC_(0), SC_(0.00097656250000000000000), SC_(-1024.5756104293406219086220979096446) }, { SC_(0), SC_(0.00048828125000000000000), SC_(-2048.5764127609059633822989920937770) }, { SC_(0), SC_(0.00024414062500000000000), SC_(-4096.5768141413027972625364884707221) }, { SC_(0), SC_(0.00012207031250000000000), SC_(-8192.5770148851960259755970875167303) }, { SC_(0), SC_(0.000061035156250000000000), SC_(-16384.577115270571506673278270921248) }, { SC_(0), SC_(0.000030517578125000000000), SC_(-32768.577165466617109315191527852551) }, { SC_(0), SC_(0.000015258789062500000000), SC_(-65536.577190565479456940587995127301) }, { SC_(0), SC_(7.6293945312500000000e-6), SC_(-131072.57720311512052742189906385878) }, { SC_(0), SC_(3.8146972656250000000e-6), SC_(-262144.57720938999353809133982546559) }, { SC_(0), SC_(1.9073486328125000000e-6), SC_(-524288.57721252744316244096483807868) }, { SC_(0), SC_(9.5367431640625000000e-7), SC_(-1.0485765772140961712543892173131386e6) }, - { SC_(1), SC_(0.1250000000), SC_(65.388133444988034473142999334395961) }, { SC_(1), SC_(0.06250000000), SC_(257.50642004291541426394984152786018) }, { SC_(1), SC_(0.03125000000), SC_(1025.5728544782377088851896549789956) }, { SC_(1), SC_(0.01562500000), SC_(4097.6081469812325471140472931934309) }, { SC_(1), SC_(0.007812500000), SC_(16385.626348148031663597978251925972) }, { SC_(1), SC_(0.003906250000), SC_(65537.635592296074077546680509110271) }, { SC_(1), SC_(0.001953125000), SC_(262145.64025088744769438583827382756) }, { SC_(1), SC_(0.0009765625000), SC_(1.0485776425893921526170408061678298e6) }, - { SC_(2), SC_(0.1250000000), SC_(-1025.7533381181356825956689300565174) }, { SC_(2), SC_(0.06250000000), SC_(-8194.0423055503627202407284588855458) }, { SC_(2), SC_(0.03125000000), SC_(-65538.212736402744663973874571262931) }, { SC_(2), SC_(0.01562500000), SC_(-524290.30560802491992997062359624105) }, { SC_(2), SC_(0.007812500000), SC_(-4.1943063541297826472489756741474152e6) }, { SC_(2), SC_(0.003906250000), SC_(-3.3554434378935516909394862712904232e7) }, { SC_(2), SC_(0.001953125000), SC_(-2.6843545839147764655287988662280398e8) }, { SC_(2), SC_(0.0009765625000), SC_(-2.1474836503977839163960630063909364e9) }, - { SC_(3), SC_(0.1250000000), SC_(24580.143419063566218511004446647010) }, { SC_(3), SC_(0.06250000000), SC_(393221.15036999967974263906424748910) }, { SC_(3), SC_(0.03125000000), SC_(6.2914617723523498519444110540563165e6) }, { SC_(3), SC_(0.01562500000), SC_(1.0066330211954465631968224525194028e8) }, { SC_(3), SC_(0.007812500000), SC_(1.6106127423031841473495039368910042e9) }, { SC_(3), SC_(0.003906250000), SC_(2.5769803782397651667126674423858834e10) }, { SC_(3), SC_(0.001953125000), SC_(4.1231686042244556536661660289768233e11) }, { SC_(3), SC_(0.0009765625000), SC_(6.5970697666624696945083422683684831e12) }, - { SC_(4), SC_(0.1250000000), SC_(-786445.98543106378579320120709638297) }, { SC_(4), SC_(0.06250000000), SC_(-2.5165842491343080297812493001330106e7) }, { SC_(4), SC_(0.03125000000), SC_(-8.0530638940150780088628643019449463e8) }, { SC_(4), SC_(0.01562500000), SC_(-2.5769803799064252508878172105001377e10) }, { SC_(4), SC_(0.007812500000), SC_(-8.2463372085595426712260437166652246e11) }, { SC_(4), SC_(0.003906250000), SC_(-2.6388279066648414875708308182697262e13) }, { SC_(4), SC_(0.001953125000), SC_(-8.4442493013199264920484069629201316e14) }, { SC_(4), SC_(0.0009765625000), SC_(-2.7021597764223000767391638642998277e16) }, - { SC_(5), SC_(0.1250000000), SC_(3.1457340659602645662942019557433307e7) }, { SC_(5), SC_(0.06250000000), SC_(2.0132660051504893647288429933363318e9) }, { SC_(5), SC_(0.03125000000), SC_(1.2884901898167237155557768979087387e11) }, { SC_(5), SC_(0.01562500000), SC_(8.2463372084313301694493047619778287e12) }, { SC_(5), SC_(0.007812500000), SC_(5.2776558133259656048321206289799569e14) }, { SC_(5), SC_(0.003906250000), SC_(3.3776997205278839283396175959111085e16) }, { SC_(5), SC_(0.001953125000), SC_(2.1617278211378382006727785506307164e18) }, { SC_(5), SC_(0.0009765625000), SC_(1.3835058055282163724137457865337740e20) }, - { SC_(8), SC_(0.1250000000), SC_(-5.4116588069756277838328695722389595e12) }, { SC_(8), SC_(0.06250000000), SC_(-2.7707693020189462516270216110672946e15) }, { SC_(8), SC_(0.03125000000), SC_(-1.4186338826217368769684713903764732e18) }, { SC_(8), SC_(0.01562500000), SC_(-7.2634054790231363002428528775599797e20) }, { SC_(8), SC_(0.007812500000), SC_(-3.7188636052598456061623085548707189e23) }, { SC_(8), SC_(0.003906250000), SC_(-1.9040581658930409501626172937578262e26) }, { SC_(8), SC_(0.001953125000), SC_(-9.7487778093723696648306072338399010e28) }, { SC_(8), SC_(0.0009765625000), SC_(-4.9913742383986532683932688751727976e31) }, - { SC_(15), SC_(0.1250000000), SC_(3.6807761227792200230957850246407904e26) }, { SC_(15), SC_(0.06250000000), SC_(2.4122334398245883325511911077327284e31) }, { SC_(15), SC_(0.03125000000), SC_(1.5808813071234422095882610857505513e36) }, { SC_(15), SC_(0.01562500000), SC_(1.0360463734364190864757622613687259e41) }, { SC_(15), SC_(0.007812500000), SC_(6.7898335129529161251275555560392101e45) }, { SC_(15), SC_(0.003906250000), SC_(4.4497852910488231117635948092058560e50) }, { SC_(15), SC_(0.001953125000), SC_(2.9162112883417567145253894941611498e55) }, { SC_(15), SC_(0.0009765625000), SC_(1.9111682299276536804313592588934511e60) }, - { SC_(22), SC_(0.1250000000), SC_(-6.6349292044725783891012472579673570e41) }, { SC_(22), SC_(0.06250000000), SC_(-5.5657820204072306855435555719642654e48) }, { SC_(22), SC_(0.03125000000), SC_(-4.6689163582644258586596154617085763e55) }, { SC_(22), SC_(0.01562500000), SC_(-3.9165709114267828873358919539012256e62) }, { SC_(22), SC_(0.007812500000), SC_(-3.2854578080162002342968961931631453e69) }, { SC_(22), SC_(0.003906250000), SC_(-2.7560417651987161415024817781137906e76) }, { SC_(22), SC_(0.001953125000), SC_(-2.3119353999880071814336850663739568e83) }, { SC_(22), SC_(0.0009765625000), SC_(-1.9393919791822596946232062017265105e90) }, - { SC_(35), SC_(0.1250000000), SC_(3.3532982327901451846973629635910627e72) }, { SC_(35), SC_(0.06250000000), SC_(2.3043689989709229438987285737704404e83) }, { SC_(35), SC_(0.03125000000), SC_(1.5835503181594194718369731136519624e94) }, { SC_(35), SC_(0.01562500000), SC_(1.0882074924904162473416628106826351e105) }, { SC_(35), SC_(0.007812500000), SC_(7.4781049464136054012151819362261716e115) }, { SC_(35), SC_(0.003906250000), SC_(5.1389145889443628300269064119650184e126) }, { SC_(35), SC_(0.001953125000), SC_(3.5314352154325314429637711743107931e137) }, { SC_(35), SC_(0.0009765625000), SC_(2.4267838013160699267233738410387795e148) } + { SC_(0.0), SC_(0.12500000000000000000), SC_(-8.3884926632958548678027429230863430) }, { SC_(0.0), SC_(0.062500000000000000000), SC_(-16.478853490060104366505723782801995) }, { SC_(0.0), SC_(0.031250000000000000000), SC_(-32.526953288606118111369026129964135) }, { SC_(0.0), SC_(0.015625000000000000000), SC_(-64.551802973167856670965920212624596) }, { SC_(0.0), SC_(0.0078125000000000000000), SC_(-128.56443747297672763722041223143322) }, { SC_(0.0), SC_(0.0039062500000000000000), SC_(-256.57080841886464838984737508407824) }, { SC_(0.0), SC_(0.0019531250000000000000), SC_(-512.57400748048652546824732749592750) }, { SC_(0.0), SC_(0.00097656250000000000000), SC_(-1024.5756104293406219086220979096446) }, { SC_(0.0), SC_(0.00048828125000000000000), SC_(-2048.5764127609059633822989920937770) }, { SC_(0.0), SC_(0.00024414062500000000000), SC_(-4096.5768141413027972625364884707221) }, { SC_(0.0), SC_(0.00012207031250000000000), SC_(-8192.5770148851960259755970875167303) }, { SC_(0.0), SC_(0.000061035156250000000000), SC_(-16384.577115270571506673278270921248) }, { SC_(0.0), SC_(0.000030517578125000000000), SC_(-32768.577165466617109315191527852551) }, { SC_(0.0), SC_(0.000015258789062500000000), SC_(-65536.577190565479456940587995127301) }, { SC_(0.0), SC_(7.6293945312500000000e-6), SC_(-131072.57720311512052742189906385878) }, { SC_(0.0), SC_(3.8146972656250000000e-6), SC_(-262144.57720938999353809133982546559) }, { SC_(0.0), SC_(1.9073486328125000000e-6), SC_(-524288.57721252744316244096483807868) }, { SC_(0.0), SC_(9.5367431640625000000e-7), SC_(-1.0485765772140961712543892173131386e6) }, + { SC_(1.0), SC_(0.1250000000), SC_(65.388133444988034473142999334395961) }, { SC_(1.0), SC_(0.06250000000), SC_(257.50642004291541426394984152786018) }, { SC_(1.0), SC_(0.03125000000), SC_(1025.5728544782377088851896549789956) }, { SC_(1.0), SC_(0.01562500000), SC_(4097.6081469812325471140472931934309) }, { SC_(1.0), SC_(0.007812500000), SC_(16385.626348148031663597978251925972) }, { SC_(1.0), SC_(0.003906250000), SC_(65537.635592296074077546680509110271) }, { SC_(1.0), SC_(0.001953125000), SC_(262145.64025088744769438583827382756) }, { SC_(1.0), SC_(0.0009765625000), SC_(1.0485776425893921526170408061678298e6) }, + { SC_(2.0), SC_(0.1250000000), SC_(-1025.7533381181356825956689300565174) }, { SC_(2.0), SC_(0.06250000000), SC_(-8194.0423055503627202407284588855458) }, { SC_(2.0), SC_(0.03125000000), SC_(-65538.212736402744663973874571262931) }, { SC_(2.0), SC_(0.01562500000), SC_(-524290.30560802491992997062359624105) }, { SC_(2.0), SC_(0.007812500000), SC_(-4.1943063541297826472489756741474152e6) }, { SC_(2.0), SC_(0.003906250000), SC_(-3.3554434378935516909394862712904232e7) }, { SC_(2.0), SC_(0.001953125000), SC_(-2.6843545839147764655287988662280398e8) }, { SC_(2.0), SC_(0.0009765625000), SC_(-2.1474836503977839163960630063909364e9) }, + { SC_(3.0), SC_(0.1250000000), SC_(24580.143419063566218511004446647010) }, { SC_(3.0), SC_(0.06250000000), SC_(393221.15036999967974263906424748910) }, { SC_(3.0), SC_(0.03125000000), SC_(6.2914617723523498519444110540563165e6) }, { SC_(3.0), SC_(0.01562500000), SC_(1.0066330211954465631968224525194028e8) }, { SC_(3.0), SC_(0.007812500000), SC_(1.6106127423031841473495039368910042e9) }, { SC_(3.0), SC_(0.003906250000), SC_(2.5769803782397651667126674423858834e10) }, { SC_(3.0), SC_(0.001953125000), SC_(4.1231686042244556536661660289768233e11) }, { SC_(3.0), SC_(0.0009765625000), SC_(6.5970697666624696945083422683684831e12) }, + { SC_(4.0), SC_(0.1250000000), SC_(-786445.98543106378579320120709638297) }, { SC_(4.0), SC_(0.06250000000), SC_(-2.5165842491343080297812493001330106e7) }, { SC_(4.0), SC_(0.03125000000), SC_(-8.0530638940150780088628643019449463e8) }, { SC_(4.0), SC_(0.01562500000), SC_(-2.5769803799064252508878172105001377e10) }, { SC_(4.0), SC_(0.007812500000), SC_(-8.2463372085595426712260437166652246e11) }, { SC_(4.0), SC_(0.003906250000), SC_(-2.6388279066648414875708308182697262e13) }, { SC_(4.0), SC_(0.001953125000), SC_(-8.4442493013199264920484069629201316e14) }, { SC_(4.0), SC_(0.0009765625000), SC_(-2.7021597764223000767391638642998277e16) }, + { SC_(5.0), SC_(0.1250000000), SC_(3.1457340659602645662942019557433307e7) }, { SC_(5.0), SC_(0.06250000000), SC_(2.0132660051504893647288429933363318e9) }, { SC_(5.0), SC_(0.03125000000), SC_(1.2884901898167237155557768979087387e11) }, { SC_(5.0), SC_(0.01562500000), SC_(8.2463372084313301694493047619778287e12) }, { SC_(5.0), SC_(0.007812500000), SC_(5.2776558133259656048321206289799569e14) }, { SC_(5.0), SC_(0.003906250000), SC_(3.3776997205278839283396175959111085e16) }, { SC_(5.0), SC_(0.001953125000), SC_(2.1617278211378382006727785506307164e18) }, { SC_(5.0), SC_(0.0009765625000), SC_(1.3835058055282163724137457865337740e20) }, + { SC_(8.0), SC_(0.1250000000), SC_(-5.4116588069756277838328695722389595e12) }, { SC_(8.0), SC_(0.06250000000), SC_(-2.7707693020189462516270216110672946e15) }, { SC_(8.0), SC_(0.03125000000), SC_(-1.4186338826217368769684713903764732e18) }, { SC_(8.0), SC_(0.01562500000), SC_(-7.2634054790231363002428528775599797e20) }, { SC_(8.0), SC_(0.007812500000), SC_(-3.7188636052598456061623085548707189e23) }, { SC_(8.0), SC_(0.003906250000), SC_(-1.9040581658930409501626172937578262e26) }, { SC_(8.0), SC_(0.001953125000), SC_(-9.7487778093723696648306072338399010e28) }, { SC_(8.0), SC_(0.0009765625000), SC_(-4.9913742383986532683932688751727976e31) }, + { SC_(15.0), SC_(0.1250000000), SC_(3.6807761227792200230957850246407904e26) }, { SC_(15.0), SC_(0.06250000000), SC_(2.4122334398245883325511911077327284e31) }, { SC_(15.0), SC_(0.03125000000), SC_(1.5808813071234422095882610857505513e36) }, { SC_(15.0), SC_(0.01562500000), SC_(1.0360463734364190864757622613687259e41) }, { SC_(15.0), SC_(0.007812500000), SC_(6.7898335129529161251275555560392101e45) }, { SC_(15.0), SC_(0.003906250000), SC_(4.4497852910488231117635948092058560e50) }, { SC_(15.0), SC_(0.001953125000), SC_(2.9162112883417567145253894941611498e55) }, { SC_(15.0), SC_(0.0009765625000), SC_(1.9111682299276536804313592588934511e60) }, + { SC_(22.0), SC_(0.1250000000), SC_(-6.6349292044725783891012472579673570e41) }, { SC_(22.0), SC_(0.06250000000), SC_(-5.5657820204072306855435555719642654e48) }, { SC_(22.0), SC_(0.03125000000), SC_(-4.6689163582644258586596154617085763e55) }, { SC_(22.0), SC_(0.01562500000), SC_(-3.9165709114267828873358919539012256e62) }, { SC_(22.0), SC_(0.007812500000), SC_(-3.2854578080162002342968961931631453e69) }, { SC_(22.0), SC_(0.003906250000), SC_(-2.7560417651987161415024817781137906e76) }, { SC_(22.0), SC_(0.001953125000), SC_(-2.3119353999880071814336850663739568e83) }, { SC_(22.0), SC_(0.0009765625000), SC_(-1.9393919791822596946232062017265105e90) }, + { SC_(35.0), SC_(0.1250000000), SC_(3.3532982327901451846973629635910627e72) }, { SC_(35.0), SC_(0.06250000000), SC_(2.3043689989709229438987285737704404e83) }, { SC_(35.0), SC_(0.03125000000), SC_(1.5835503181594194718369731136519624e94) }, { SC_(35.0), SC_(0.01562500000), SC_(1.0882074924904162473416628106826351e105) }, { SC_(35.0), SC_(0.007812500000), SC_(7.4781049464136054012151819362261716e115) }, { SC_(35.0), SC_(0.003906250000), SC_(5.1389145889443628300269064119650184e126) }, { SC_(35.0), SC_(0.001953125000), SC_(3.5314352154325314429637711743107931e137) }, { SC_(35.0), SC_(0.0009765625000), SC_(2.4267838013160699267233738410387795e148) } } }; do_test_polygamma(small_data, name, "Mathematica Data - small arguments"); } From 3f58ab900911011668d824a7264e07cf5bc0a8fb Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 30 Oct 2014 11:11:50 +0000 Subject: [PATCH 44/69] Fix copyright info. --- include/boost/math/special_functions/detail/polygamma.hpp | 2 +- include/boost/math/special_functions/polygamma.hpp | 2 +- include/boost/math/special_functions/zeta.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index bf9d0df08..f3ce04e34 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -2,7 +2,7 @@ /////////////////////////////////////////////////////////////////////////////// // Copyright 2013 Nikhar Agrawal // Copyright 2013 Christopher Kormanyos -// Copyright 2013 John Maddock +// Copyright 2014 John Maddock // Copyright 2013 Paul Bristow // Distributed under the Boost // Software License, Version 1.0. (See accompanying file diff --git a/include/boost/math/special_functions/polygamma.hpp b/include/boost/math/special_functions/polygamma.hpp index 2c6b94d97..a41d7a9c8 100644 --- a/include/boost/math/special_functions/polygamma.hpp +++ b/include/boost/math/special_functions/polygamma.hpp @@ -2,7 +2,7 @@ /////////////////////////////////////////////////////////////////////////////// // Copyright 2013 Nikhar Agrawal // Copyright 2013 Christopher Kormanyos -// Copyright 2013 John Maddock +// Copyright 2014 John Maddock // Copyright 2013 Paul Bristow // Distributed under the Boost // Software License, Version 1.0. (See accompanying file diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index 6c65f6450..14173f805 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -1,4 +1,4 @@ -// Copyright John Maddock 2007. +// Copyright John Maddock 2007, 2014. // 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) From 812122d56f8218823aac3b2b0207be0478d39e1e Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 30 Oct 2014 11:13:31 +0000 Subject: [PATCH 45/69] Fix include order to be alphabetical, update copyright. --- include/boost/math/special_functions.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/math/special_functions.hpp b/include/boost/math/special_functions.hpp index d86a31b6b..151aca2bf 100644 --- a/include/boost/math/special_functions.hpp +++ b/include/boost/math/special_functions.hpp @@ -1,4 +1,4 @@ -// Copyright John Maddock 2006, 2007, 2012. +// Copyright John Maddock 2006, 2007, 2012, 2014. // Copyright Paul A. Bristow 2006, 2007, 2012 // Use, modification and distribution are subject to the @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -48,6 +47,7 @@ #include #include #include +#include #include #include #include From 31c345108ca34cb8c2ea8dd9db90247390f37eee Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 30 Oct 2014 17:13:39 +0000 Subject: [PATCH 46/69] [polygamma] Fix gcc-11 test failures. --- include/boost/math/special_functions/detail/polygamma.hpp | 2 +- include/boost/math/special_functions/zeta.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index f3ce04e34..622ac23ce 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -369,7 +369,7 @@ // but since the series is accelerated, we can // tolerate a small amount of divergence: // - T small_x_limit = std::min(T(5) / n, T(0.25f)); + 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); diff --git a/include/boost/math/special_functions/zeta.hpp b/include/boost/math/special_functions/zeta.hpp index 14173f805..1ba282f4d 100644 --- a/include/boost/math/special_functions/zeta.hpp +++ b/include/boost/math/special_functions/zeta.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include namespace boost{ namespace math{ namespace detail{ From 8438b8a84b70ba9d5bd3cf01254bb2d9afabfaac Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 31 Oct 2014 18:07:01 +0000 Subject: [PATCH 47/69] [Polygamma] Extend derivatives-of-cot method to larger orders. Extend test cases for negative x. Fix missing return statement on error condition. --- .../special_functions/detail/polygamma.hpp | 145 +++++++++++++++++- test/test_polygamma.cpp | 7 + test/test_polygamma.hpp | 19 ++- 3 files changed, 162 insertions(+), 9 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 622ac23ce..5b94237fd 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -105,7 +105,7 @@ // if(k > policies::get_max_series_iterations()) { - policies::raise_evaluation_error(function, "Series did not converge, closest value was %1%", sum, pol); + return policies::raise_evaluation_error(function, "Series did not converge, closest value was %1%", sum, pol); break; } } @@ -310,6 +310,147 @@ T c8 = boost::math::cos_pi(8 * x); return -2 * boost::math::pow<9>(constants::pi()) * (88234 * c2 + 14608 * c4 + 502 * c6 + c8 + 78095) / boost::math::pow<10>(s); } + case 10: + { + T c = boost::math::cos_pi(x); + T c3 = boost::math::cos_pi(3 * x); + T c5 = boost::math::cos_pi(5 * x); + T c7 = boost::math::cos_pi(7 * x); + T c9 = boost::math::cos_pi(9 * x); + return 2 * boost::math::pow<10>(constants::pi()) * (1310354 * c + 455192 * c3 + 47840 * c5 + 1013 * c7 + c9) / boost::math::pow<11>(s); + } + case 11: + { + T c2 = boost::math::cos_pi(2 * x); + T c4 = boost::math::cos_pi(4 * x); + T c6 = boost::math::cos_pi(6 * x); + T c8 = boost::math::cos_pi(8 * x); + T c10 = boost::math::cos_pi(10 * x); + return -2 * boost::math::pow<11>(constants::pi()) * (7862124 + 9738114 * c2 + 2203488 * c4 + 152637 * c6 + 2036 * c8 + c10) / boost::math::pow<12>(s); + } + case 12: + { + T c = boost::math::cos_pi(x); + T c3 = boost::math::cos_pi(3 * x); + T c5 = boost::math::cos_pi(5 * x); + T c7 = boost::math::cos_pi(7 * x); + T c9 = boost::math::cos_pi(9 * x); + T c11 = boost::math::cos_pi(11 * x); + return 2 * boost::math::pow<12>(constants::pi()) * (162512286 * c + 66318474 * c3 + 10187685 * c5 + 478271 * c7 + 4083 * c9 + c11) / boost::math::pow<13>(s); + } + case 13: + { + T c2 = boost::math::cos_pi(2 * x); + T c4 = boost::math::cos_pi(4 * x); + T c6 = boost::math::cos_pi(6 * x); + T c8 = boost::math::cos_pi(8 * x); + T c10 = boost::math::cos_pi(10 * x); + T c12 = boost::math::cos_pi(12 * x); + return -2 * boost::math::pow<13>(constants::pi()) * (1137586002 + 1505621508 * c2 + 423281535 * c4 + 45533450 * c6 + 1479726 * c8 + 8178 * c10 + c12) / boost::math::pow<14>(s); + } + case 14: + { + T c = boost::math::cos_pi(x); + T c3 = boost::math::cos_pi(3 * x); + T c5 = boost::math::cos_pi(5 * x); + T c7 = boost::math::cos_pi(7 * x); + T c9 = boost::math::cos_pi(9 * x); + T c11 = boost::math::cos_pi(11 * x); + T c13 = boost::math::cos_pi(13 * x); + return 2 * boost::math::pow<14>(constants::pi()) * (27971176092 * c + 12843262863 * c3 + 2571742175 * c5 + 198410786 * c7 + 4537314 * c9 + 16369 * c11 + c13) / boost::math::pow<15>(s); + } + case 15: + { + return -2 * boost::math::pow<15>(constants::pi()) * + (223769408736 + 311387598411 * boost::math::cos_pi(2 * x) + + 102776998928 * boost::math::cos_pi(4 * x) + + 15041229521 * boost::math::cos_pi(6 * x) + + 848090912 * boost::math::cos_pi(8 * x) + + 13824739 * boost::math::cos_pi(10 * x) + + 32752 * boost::math::cos_pi(12 * x) + + boost::math::cos_pi(14 * x)) / boost::math::pow<16>(s); + } + case 16: + { + return 2 * boost::math::pow<16>(constants::pi()) * + (6382798925475 * boost::math::cos_pi(x) + + 3207483178157 * boost::math::cos_pi(3 * x) + + 782115518299 * boost::math::cos_pi(5 * x) + + 85383238549 * boost::math::cos_pi(7 * x) + + 3572085255 * boost::math::cos_pi(9 * x) + + 41932745 * boost::math::cos_pi(11 * x) + + 65519 * boost::math::cos_pi(13 * x) + + boost::math::cos_pi(15 * x)) / boost::math::pow<17>(s); + } + case 17: + { + return -2 * boost::math::pow<17>(constants::pi()) * + (57445190329275 + 83137223185370 * boost::math::cos_pi(2 * x) + + 31055652948388 * boost::math::cos_pi(4 * x) + + 5717291972382 * boost::math::cos_pi(6 * x) + + 473353301060 * boost::math::cos_pi(8 * x) + + 14875399450 * boost::math::cos_pi(10 * x) + + 126781020 * boost::math::cos_pi(12 * x) + + 131054 * boost::math::cos_pi(14 * x) + + boost::math::cos_pi(16 * x)) / boost::math::pow<18>(s); + } + case 18: + { + return 2 * boost::math::pow<18>(constants::pi()) * + (1865385657780650 * boost::math::cos_pi(x) + + 1006709967915228 * boost::math::cos_pi(3 * x) + + 285997074307300 * boost::math::cos_pi(5 * x) + + 40457344748072 * boost::math::cos_pi(7 * x) + + 2575022097600 * boost::math::cos_pi(9 * x) + + 61403313100 * boost::math::cos_pi(11 * x) + + 382439924 * boost::math::cos_pi(13 * x) + + 262125 * boost::math::cos_pi(15 * x) + + boost::math::cos_pi(17 * x)) / boost::math::pow<19>(s); + } + case 19: + { + return -2 * boost::math::pow<19>(constants::pi()) * + (18653856577806500 + 27862280567093358 * boost::math::cos_pi(2 * x) + + 11485644635009424 * boost::math::cos_pi(4 * x) + + 2527925001876036 * boost::math::cos_pi(6 * x) + + 278794377854832 * boost::math::cos_pi(8 * x) + + 13796160184500 * boost::math::cos_pi(10 * x) + + 251732291184 * boost::math::cos_pi(12 * x) + + 1151775897 * boost::math::cos_pi(14 * x) + + 524268 * boost::math::cos_pi(16 * x) + + boost::math::cos_pi(18 * x)) / boost::math::pow<20>(s); + } + case 20: + { + return 2 * boost::math::pow<20>(constants::pi()) * + (679562217794156938 * boost::math::cos_pi(x) + + 388588260723953310 * boost::math::cos_pi(3 * x) + + 124748182104463860 * boost::math::cos_pi(5 * x) + + 21598596303099900 * boost::math::cos_pi(7 * x) + + 1879708669896492 * boost::math::cos_pi(9 * x) + + 73008517581444 * boost::math::cos_pi(11 * x) + + 1026509354985 * boost::math::cos_pi(13 * x) + + 3464764515 * boost::math::cos_pi(15 * x) + + 1048555 * boost::math::cos_pi(17 * x) + + boost::math::cos_pi(19 * x)) / boost::math::pow<21>(s); + } + case 21: + { + return -2 * boost::math::pow<21>(constants::pi()) * + (7475184395735726318 + 11458681306629009100 * boost::math::cos_pi(2 * x) + + 5119020713873609970 * boost::math::cos_pi(4 * x) + + 1300365805079109480 * boost::math::cos_pi(6 * x) + + 179385804170146680 * boost::math::cos_pi(8 * x) + + 12446388300682056 * boost::math::cos_pi(10 * x) + + 382493246941965 * boost::math::cos_pi(12 * x) + + 4168403181210 * boost::math::cos_pi(14 * x) + + 10414216090 * boost::math::cos_pi(16 * x) + + 2097130 * boost::math::cos_pi(18 * x) + + boost::math::cos_pi(20 * x)) / boost::math::pow<22>(s); + } + + /* + */ } return policies::raise_domain_error(function, "Derivative of cotangent not implemented at n = %1%", n, pol); } @@ -335,7 +476,7 @@ else return policies::raise_pole_error(function, "Evaluation at negative integer %1%", x, pol); } - if(n < 10) + if(n < 22) { // // We have tabulated the derivatives of cot(x) up to the 9th derivative, which diff --git a/test/test_polygamma.cpp b/test/test_polygamma.cpp index 48810d8a1..15be006cf 100644 --- a/test/test_polygamma.cpp +++ b/test/test_polygamma.cpp @@ -34,6 +34,13 @@ void expected_results() largest_type, // test type(s) ".*large arguments", // test data group ".*", 400, 200); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + ".*negative.*", // test data group + ".*", 1400, 500); // test function add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 47f2b0887..335f715d0 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -137,7 +137,7 @@ void test_polygamma(T, const char* name) } }; do_test_polygamma(big_data, name, "Mathematica Data - large arguments"); - boost::array, 310> neg_data = + boost::array, 373> neg_data = { { { 1, SC_(-12.750), SC_(19.663772856722737612034697464751605) }, { 1, SC_(-12.250), SC_(19.660817549236368273654684043826967) }, { 1, SC_(-11.750), SC_(19.657621376522814505537196503582823) }, { 1, SC_(-11.250), SC_(19.654153659190554029589711115880278) }, { 1, SC_(-10.750), SC_(19.650378280099093364749509767503149) }, { 1, SC_(-10.250), SC_(19.646252424622652795021809881312377) }, { 1, SC_(-9.7500), SC_(19.641724953976865133273035997897957) }, { 1, SC_(-9.2500), SC_(19.636734280660725370869519577921538) }, { 1, SC_(-8.7500), SC_(19.631205558842085383108670448917024) }, { 1, SC_(-8.2500), SC_(19.625046917622010980803778160828770) }, { 1, SC_(-7.7500), SC_(19.618144334352289464741323510141514) }, { 1, SC_(-7.2500), SC_(19.610354539293269015698176691590937) }, { 1, SC_(-6.7500), SC_(19.601495010731061577124257953429755) }, { 1, SC_(-6.2500), SC_(19.591329569019785068016844943671793) }, { 1, SC_(-5.7500), SC_(19.579547136931335925546754524074474) }, { 1, SC_(-5.2500), SC_(19.565729569019785068016844943671793) }, { 1, SC_(-4.7500), SC_(19.549301390239464469970194977760674) }, { 1, SC_(-4.2500), SC_(19.529448389881463072551992335962043) }, { 1, SC_(-3.7500), SC_(19.504980060599575273294294700752364) }, { 1, SC_(-3.2500), SC_(19.474085068082155114074483685443011) }, { 1, SC_(-2.7500), SC_(19.433868949488464162183183589641253) }, { 1, SC_(-2.2500), SC_(19.379410511869137362595193744614609) }, { 1, SC_(-1.7500), SC_(19.301637544529786476232770366500757) }, { 1, SC_(-1.2500), SC_(19.181879647671606498397662880417078) }, { 1, SC_(-0.75000), SC_(18.975106932284888517049096897113002) }, { 1, SC_(-0.25000), SC_(18.541879647671606498397662880417078) }, { 2, SC_(-12.750), SC_(-124.03079461415823384604153251543681) }, { 2, SC_(-12.250), SC_(124.01896466745858356132308878716344) }, { 2, SC_(-11.750), SC_(-124.03175955222881001960976796032603) }, { 2, SC_(-11.250), SC_(124.01787668541028735821044014586602) }, { 2, SC_(-10.750), SC_(-124.03299241970518808612682102178640) }, { 2, SC_(-10.250), SC_(124.01647202148710491650947992638728) }, { 2, SC_(-9.7500), SC_(-124.03460234084420729198290916496876) }, { 2, SC_(-9.2500), SC_(124.01461482266526541911391108670126) }, { 2, SC_(-8.7500), SC_(-124.03676016548723903560636876475972) }, { 2, SC_(-8.2500), SC_(124.01208782525148933477537240192445) }, { 2, SC_(-7.7500), SC_(-124.03974558822776381694747663647984) }, { 2, SC_(-7.2500), SC_(124.00852603656573370687098416695770) }, { 2, SC_(-6.7500), SC_(-124.04404218787195165891317097369578) }, { 2, SC_(-6.2500), SC_(124.00327776890408296268303058132483) }, { 2, SC_(-5.7500), SC_(-124.05054526159038888901020902683808) }, { 2, SC_(-5.2500), SC_(123.99508576890408296268303058132483) }, { 2, SC_(-4.7500), SC_(-124.06106552130930069964553408642549) }, { 2, SC_(-4.2500), SC_(123.98126436732757934536308673076874) }, { 2, SC_(-3.7500), SC_(-124.07972713378925404561433420306057) }, { 2, SC_(-3.2500), SC_(123.95521103942202265902072971875978) }, { 2, SC_(-2.7500), SC_(-124.11765305971517997154026012898649) }, { 2, SC_(-2.2500), SC_(123.89694977406016558118732052440384) }, { 2, SC_(-1.7500), SC_(-124.21382135423058192495874247308867) }, { 2, SC_(-1.2500), SC_(123.72136678366236036856729308956159) }, { 2, SC_(-0.75000), SC_(-124.58699919679617959259722643810325) }, { 2, SC_(-0.25000), SC_(122.69736678366236036856729308956159) }, @@ -148,12 +148,17 @@ void test_polygamma(T, const char* name) { 7, SC_(-12.750), SC_(3.3035269585550319411369451657990653e8) }, { 7, SC_(-12.250), SC_(3.3035269585550014530679554645726841e8) }, { 7, SC_(-11.750), SC_(3.3035269585549597724076958273392155e8) }, { 7, SC_(-11.250), SC_(3.3035269585549020632656302567379925e8) }, { 7, SC_(-10.750), SC_(3.3035269585548210560734246359421460e8) }, { 7, SC_(-10.250), SC_(3.3035269585547056321166932680182245e8) }, { 7, SC_(-9.7500), SC_(3.3035269585545384621477943726294791e8) }, { 7, SC_(-9.2500), SC_(3.3035269585542919758450034698830934e8) }, { 7, SC_(-8.7500), SC_(3.3035269585539213080586956648886140e8) }, { 7, SC_(-8.2500), SC_(3.3035269585533516103728829633890794e8) }, { 7, SC_(-7.7500), SC_(3.3035269585524545242332002141349801e8) }, { 7, SC_(-7.2500), SC_(3.3035269585510030650375087453009371e8) }, { 7, SC_(-6.7500), SC_(3.3035269585485817969386206988585281e8) }, { 7, SC_(-6.2500), SC_(3.3035269585444002902560781621765444e8) }, { 7, SC_(-5.7500), SC_(3.3035269585368867935011094629708018e8) }, { 7, SC_(-5.2500), SC_(3.3035269585227536550842381621765444e8) }, { 7, SC_(-4.7500), SC_(3.3035269584947086190323815702711063e8) }, { 7, SC_(-4.2500), SC_(3.3035269584354251332378488235637904e8) }, { 7, SC_(-3.7500), SC_(3.3035269583002256126086884537779074e8) }, { 7, SC_(-3.2500), SC_(3.3035269579619261006329391884897976e8) }, { 7, SC_(-2.7500), SC_(3.3035269570114408444331054633801022e8) }, { 7, SC_(-2.2500), SC_(3.3035269539127781220563177006740899e8) }, { 7, SC_(-1.7500), SC_(3.3035269416026348990428605870784761e8) }, { 7, SC_(-1.2500), SC_(3.3035268771818605685450990413016373e8) }, { 7, SC_(-0.75000), SC_(3.3035263686402030648824099487997220e8) }, { 7, SC_(-0.25000), SC_(3.3035184214649965685450990413016373e8) }, { 8, SC_(-7.7500), SC_(-1.0569114259666913771892699180522388e10) }, { 8, SC_(-7.2500), SC_(1.0569114259666319911021283350705169e10) }, { 8, SC_(-6.7500), SC_(-1.0569114259667313537290849324034796e10) }, { 8, SC_(-6.2500), SC_(1.0569114259665591328976435838084546e10) }, { 8, SC_(-5.7500), SC_(-1.0569114259668699611772332137177045e10) }, { 8, SC_(-5.2500), SC_(1.0569114259662820559674440318084546e10) }, { 8, SC_(-4.7500), SC_(-1.0569114259674567879524502974422220e10) }, { 8, SC_(-4.2500), SC_(1.0569114259649513356345466704581650e10) }, { 8, SC_(-3.7500), SC_(-1.0569114259707322912185335499305285e10) }, { 8, SC_(-3.2500), SC_(1.0569114259560384126678660185038311e10) }, { 8, SC_(-2.7500), SC_(-1.0569114259982263662729459870590150e10) }, { 8, SC_(-2.2500), SC_(1.0569114258563670778105953357268290e10) }, { 8, SC_(-1.7500), SC_(-1.0569114264464825392297531107332441e10) }, { 8, SC_(-1.2500), SC_(1.0569114231281566759079742278380307e10) }, { 8, SC_(-0.75000), SC_(-1.0569114526390508516485165684831300e10) }, { 8, SC_(-0.25000), SC_(1.0569108819622773799079742278380307e10) }, { 9, SC_(-7.7500), SC_(3.8051374324233954962308727459400485e11) }, { 9, SC_(-7.2500), SC_(3.8051374324233938918730928010849146e11) }, { 9, SC_(-6.7500), SC_(3.8051374324233908537939910023379690e11) }, { 9, SC_(-6.2500), SC_(3.8051374324233848474063291767903138e11) }, { 9, SC_(-5.7500), SC_(3.8051374324233723728009045648294056e11) }, { 9, SC_(-5.2500), SC_(3.8051374324233449483283804413023138e11) }, { 9, SC_(-4.7500), SC_(3.8051374324232805216534792821594812e11) }, { 9, SC_(-4.2500), SC_(3.8051374324231168248427408936422641e11) }, { 9, SC_(-3.7500), SC_(3.8051374324226598999820108764248547e11) }, { 9, SC_(-3.2500), SC_(3.8051374324212293823321496967578170e11) }, { 9, SC_(-2.7500), SC_(3.8051374324160613219689518915140179e11) }, { 9, SC_(-2.2500), SC_(3.8051374323936280896024439692195702e11) }, { 9, SC_(-1.7500), SC_(3.8051374322693593017285422874024520e11) }, { 9, SC_(-1.2500), SC_(3.8051374313023439288413955260640509e11) }, { 9, SC_(-0.75000), SC_(3.8051374187988955981988925091310821e11) }, { 9, SC_(-0.25000), SC_(3.8051370416629108357213955260640509e11) }, - {SC_(10.0), SC_(-7.7500), SC_(-1.5220204740668341333676731352020598e13)}, { SC_(10.0), SC_(-7.2500), SC_(1.5220204740668340669650877835677384e13) }, { SC_(10.0), SC_(-6.7500), SC_(-1.5220204740668341932700845125388608e13) }, { SC_(10.0), SC_(-6.2500), SC_(1.5220204740668339422138220784050543e13) }, { SC_(10.0), SC_(-5.7500), SC_(-1.5220204740668344670625746819834321e13) }, { SC_(10.0), SC_(-5.2500), SC_(1.5220204740668333038285748986372463e13) }, { SC_(10.0), SC_(-4.7500), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(10.0), SC_(-4.2500), SC_(1.5220204740668289586193246215389596e13) }, { SC_(10.0), SC_(-3.7500), SC_(-1.5220204740668491301932335869743932e13) }, { SC_(10.0), SC_(-3.2500), SC_(1.5220204740667845482073107110240315e13) }, { SC_(10.0), SC_(-2.7500), SC_(-1.5220204740670250922735818265720155e13) }, { SC_(10.0), SC_(-2.2500), SC_(1.5220204740659352776617813040228546e13) }, { SC_(10.0), SC_(-1.7500), SC_(-1.5220204740723597111914149030851634e13) }, { SC_(10.0), SC_(-1.2500), SC_(1.5220204740174337594057347065492760e13) }, { SC_(10.0), SC_(-0.75000), SC_(-1.5220204748421004942502520332720988e13) }, { SC_(10.0), SC_(-0.25000), SC_(1.5220204428462791119561347065492760e13) }, - {SC_(11.0), SC_(-7.7500), SC_(6.6969403856797204470999075620782555e14)}, { SC_(11.0), SC_(-7.2500), SC_(6.6969403856797204443997065278152669e14) }, { SC_(11.0), SC_(-6.7500), SC_(6.6969403856797204385976298181981934e14) }, { SC_(11.0), SC_(-6.2500), SC_(6.6969403856797204254719282828940321e14) }, { SC_(11.0), SC_(-5.7500), SC_(6.6969403856797203939795943831775966e14) }, { SC_(11.0), SC_(-5.2500), SC_(6.6969403856797203131161247792548979e14) }, { SC_(11.0), SC_(-4.7500), SC_(6.6969403856797200883878751610651220e14) }, { SC_(11.0), SC_(-4.2500), SC_(6.6969403856797194026913294831009712e14) }, { SC_(11.0), SC_(-3.7500), SC_(6.6969403856797170626423300519402108e14) }, { SC_(11.0), SC_(-3.2500), SC_(6.6969403856797079082317494121441662e14) }, { SC_(11.0), SC_(-2.7500), SC_(6.6969403856796654470987612349915749e14) }, { SC_(11.0), SC_(-2.2500), SC_(6.6969403856794204628163394590053064e14) }, { SC_(11.0), SC_(-1.7500), SC_(6.6969403856775315995316280043863158e14) }, { SC_(11.0), SC_(-1.2500), SC_(6.6969403856557086094467166780182235e14) }, { SC_(11.0), SC_(-0.75000), SC_(6.6969403851936945358946446654116707e14) }, { SC_(11.0), SC_(-0.25000), SC_(6.6969403582250925196910686780182235e14) }, - {SC_(12.0), SC_(-7.7500), SC_(-3.2145233093874118337222380549030432e16)}, { SC_(12.0), SC_(-7.2500), SC_(3.2145233093874118336089459241510371e16) }, { SC_(12.0), SC_(-6.7500), SC_(-3.2145233093874118338538862264211861e16) }, { SC_(12.0), SC_(-6.2500), SC_(3.2145233093874118332956585600971684e16) }, { SC_(12.0), SC_(-5.7500), SC_(-3.2145233093874118346470957452659967e16) }, { SC_(12.0), SC_(-5.2500), SC_(3.2145233093874118311384271328272970e16) }, { SC_(12.0), SC_(-4.7500), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(12.0), SC_(-4.2500), SC_(3.2145233093874118103287175260580644e16) }, { SC_(12.0), SC_(-3.7500), SC_(-3.2145233093874119174645495148550237e16) }, { SC_(12.0), SC_(-3.2500), SC_(3.2145233093874114857792705593486958e16) }, { SC_(12.0), SC_(-2.7500), SC_(-3.2145233093874135691619437169973801e16) }, { SC_(12.0), SC_(-2.2500), SC_(3.2145233093874008724100861918481841e16) }, { SC_(12.0), SC_(-1.7500), SC_(-3.2145233093875066825103277125147005e16) }, { SC_(12.0), SC_(-1.2500), SC_(3.2145233093861362402303729768622063e16) }, { SC_(12.0), SC_(-0.75000), SC_(-3.2145233094206840811597208557586761e16) }, { SC_(12.0), SC_(-0.25000), SC_(3.2145233067527970956138307688622063e16) }, - {SC_(13.0), SC_(-7.7500), SC_(1.6715535177261375555623235851859237e18)}, { SC_(13.0), SC_(-7.2500), SC_(1.6715535177261375555616811505615971e18) }, { SC_(13.0), SC_(-6.7500), SC_(1.6715535177261375555601152932765871e18) }, { SC_(13.0), SC_(-6.2500), SC_(1.6715535177261375555560635840337346e18) }, { SC_(13.0), SC_(-5.7500), SC_(1.6715535177261375555448386655062426e18) }, { SC_(13.0), SC_(-5.2500), SC_(1.6715535177261375555111931703465213e18) }, { SC_(13.0), SC_(-4.7500), SC_(1.6715535177261375554006502097069245e18) }, { SC_(13.0), SC_(-4.2500), SC_(1.6715535177261375549959051229408070e18) }, { SC_(13.0), SC_(-3.7500), SC_(1.6715535177261375533086111846120836e18) }, { SC_(13.0), SC_(-3.2500), SC_(1.6715535177261375450685102745473439e18) }, { SC_(13.0), SC_(-2.7500), SC_(1.6715535177261374960497681856044819e18) }, { SC_(13.0), SC_(-2.2500), SC_(1.6715535177261371205337428998473234e18) }, { SC_(13.0), SC_(-1.7500), SC_(1.6715535177261330943278445785436631e18) }, { SC_(13.0), SC_(-1.2500), SC_(1.6715535177260640528966928029814669e18) }, { SC_(13.0), SC_(-0.75000), SC_(1.6715535177236684875710325164741107e18) }, { SC_(13.0), SC_(-0.25000), SC_(1.6715535174521967818565724133494669e18) }, - {SC_(20.0), SC_(-7.7500), SC_(-1.0700016187896297695358366297227405e31)}, { SC_(20.0), SC_(-7.2500), SC_(1.0700016187896297695358366297227207e31) }, { SC_(20.0), SC_(-6.7500), SC_(-1.0700016187896297695358366297227919e31) }, { SC_(20.0), SC_(-6.2500), SC_(1.0700016187896297695358366297225123e31) }, { SC_(20.0), SC_(-5.7500), SC_(-1.0700016187896297695358366297237267e31) }, { SC_(20.0), SC_(-5.2500), SC_(1.0700016187896297695358366297178064e31) }, { SC_(20.0), SC_(-4.7500), SC_(-1.0700016187896297695358366297508349e31) }, { SC_(20.0), SC_(-4.2500), SC_(1.0700016187896297695358366295346680e31) }, { SC_(20.0), SC_(-3.7500), SC_(-1.0700016187896297695358366312489970e31) }, { SC_(20.0), SC_(-3.2500), SC_(1.0700016187896297695358366140480322e31) }, { SC_(20.0), SC_(-2.7500), SC_(-1.0700016187896297695358368457690989e31) }, { SC_(20.0), SC_(-2.2500), SC_(1.0700016187896297695358322831891149e31) }, { SC_(20.0), SC_(-1.7500), SC_(-1.0700016187896297695359814356987569e31) }, { SC_(20.0), SC_(-1.2500), SC_(1.0700016187896297695260533442006924e31) }, { SC_(20.0), SC_(-0.75000), SC_(-1.0700016187896297714516730336449055e31) }, { SC_(20.0), SC_(-0.25000), SC_(1.0700016187896275255700182817756420e31) }, - {SC_(23.0), SC_(-7.7500), SC_(7.2766958095269026379022334905108869e36)}, { SC_(23.0), SC_(-7.2500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23.0), SC_(-6.7500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23.0), SC_(-6.2500), SC_(7.2766958095269026379022334905108868e36) }, { SC_(23.0), SC_(-5.7500), SC_(7.2766958095269026379022334905108866e36) }, { SC_(23.0), SC_(-5.2500), SC_(7.2766958095269026379022334905108848e36) }, { SC_(23.0), SC_(-4.7500), SC_(7.2766958095269026379022334905108714e36) }, { SC_(23.0), SC_(-4.2500), SC_(7.2766958095269026379022334905107503e36) }, { SC_(23.0), SC_(-3.7500), SC_(7.2766958095269026379022334905093860e36) }, { SC_(23.0), SC_(-3.2500), SC_(7.2766958095269026379022334904893135e36) }, { SC_(23.0), SC_(-2.7500), SC_(7.2766958095269026379022334900771270e36) }, { SC_(23.0), SC_(-2.2500), SC_(7.2766958095269026379022334770834817e36) }, { SC_(23.0), SC_(-1.7500), SC_(7.2766958095269026379022327513062336e36) }, { SC_(23.0), SC_(-1.2500), SC_(7.2766958095269026379021422520579094e36) }, { SC_(23.0), SC_(-0.75000), SC_(7.2766958095269026378642504512809960e36) }, { SC_(23.0), SC_(-0.25000), SC_(7.2766958095269025158194448897624671e36) } + { SC_(10.0), SC_(-7.7500), SC_(-1.5220204740668341333676731352020598e13)}, { SC_(10.0), SC_(-7.2500), SC_(1.5220204740668340669650877835677384e13) }, { SC_(10.0), SC_(-6.7500), SC_(-1.5220204740668341932700845125388608e13) }, { SC_(10.0), SC_(-6.2500), SC_(1.5220204740668339422138220784050543e13) }, { SC_(10.0), SC_(-5.7500), SC_(-1.5220204740668344670625746819834321e13) }, { SC_(10.0), SC_(-5.2500), SC_(1.5220204740668333038285748986372463e13) }, { SC_(10.0), SC_(-4.7500), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(10.0), SC_(-4.2500), SC_(1.5220204740668289586193246215389596e13) }, { SC_(10.0), SC_(-3.7500), SC_(-1.5220204740668491301932335869743932e13) }, { SC_(10.0), SC_(-3.2500), SC_(1.5220204740667845482073107110240315e13) }, { SC_(10.0), SC_(-2.7500), SC_(-1.5220204740670250922735818265720155e13) }, { SC_(10.0), SC_(-2.2500), SC_(1.5220204740659352776617813040228546e13) }, { SC_(10.0), SC_(-1.7500), SC_(-1.5220204740723597111914149030851634e13) }, { SC_(10.0), SC_(-1.2500), SC_(1.5220204740174337594057347065492760e13) }, { SC_(10.0), SC_(-0.75000), SC_(-1.5220204748421004942502520332720988e13) }, { SC_(10.0), SC_(-0.25000), SC_(1.5220204428462791119561347065492760e13) }, + { SC_(11.0), SC_(-7.7500), SC_(6.6969403856797204470999075620782555e14)}, { SC_(11.0), SC_(-7.2500), SC_(6.6969403856797204443997065278152669e14) }, { SC_(11.0), SC_(-6.7500), SC_(6.6969403856797204385976298181981934e14) }, { SC_(11.0), SC_(-6.2500), SC_(6.6969403856797204254719282828940321e14) }, { SC_(11.0), SC_(-5.7500), SC_(6.6969403856797203939795943831775966e14) }, { SC_(11.0), SC_(-5.2500), SC_(6.6969403856797203131161247792548979e14) }, { SC_(11.0), SC_(-4.7500), SC_(6.6969403856797200883878751610651220e14) }, { SC_(11.0), SC_(-4.2500), SC_(6.6969403856797194026913294831009712e14) }, { SC_(11.0), SC_(-3.7500), SC_(6.6969403856797170626423300519402108e14) }, { SC_(11.0), SC_(-3.2500), SC_(6.6969403856797079082317494121441662e14) }, { SC_(11.0), SC_(-2.7500), SC_(6.6969403856796654470987612349915749e14) }, { SC_(11.0), SC_(-2.2500), SC_(6.6969403856794204628163394590053064e14) }, { SC_(11.0), SC_(-1.7500), SC_(6.6969403856775315995316280043863158e14) }, { SC_(11.0), SC_(-1.2500), SC_(6.6969403856557086094467166780182235e14) }, { SC_(11.0), SC_(-0.75000), SC_(6.6969403851936945358946446654116707e14) }, { SC_(11.0), SC_(-0.25000), SC_(6.6969403582250925196910686780182235e14) }, + { SC_(12.0), SC_(-7.7500), SC_(-3.2145233093874118337222380549030432e16)}, { SC_(12.0), SC_(-7.2500), SC_(3.2145233093874118336089459241510371e16) }, { SC_(12.0), SC_(-6.7500), SC_(-3.2145233093874118338538862264211861e16) }, { SC_(12.0), SC_(-6.2500), SC_(3.2145233093874118332956585600971684e16) }, { SC_(12.0), SC_(-5.7500), SC_(-3.2145233093874118346470957452659967e16) }, { SC_(12.0), SC_(-5.2500), SC_(3.2145233093874118311384271328272970e16) }, { SC_(12.0), SC_(-4.7500), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(12.0), SC_(-4.2500), SC_(3.2145233093874118103287175260580644e16) }, { SC_(12.0), SC_(-3.7500), SC_(-3.2145233093874119174645495148550237e16) }, { SC_(12.0), SC_(-3.2500), SC_(3.2145233093874114857792705593486958e16) }, { SC_(12.0), SC_(-2.7500), SC_(-3.2145233093874135691619437169973801e16) }, { SC_(12.0), SC_(-2.2500), SC_(3.2145233093874008724100861918481841e16) }, { SC_(12.0), SC_(-1.7500), SC_(-3.2145233093875066825103277125147005e16) }, { SC_(12.0), SC_(-1.2500), SC_(3.2145233093861362402303729768622063e16) }, { SC_(12.0), SC_(-0.75000), SC_(-3.2145233094206840811597208557586761e16) }, { SC_(12.0), SC_(-0.25000), SC_(3.2145233067527970956138307688622063e16) }, + { SC_(13.0), SC_(-7.7500), SC_(1.6715535177261375555623235851859237e18)}, { SC_(13.0), SC_(-7.2500), SC_(1.6715535177261375555616811505615971e18) }, { SC_(13.0), SC_(-6.7500), SC_(1.6715535177261375555601152932765871e18) }, { SC_(13.0), SC_(-6.2500), SC_(1.6715535177261375555560635840337346e18) }, { SC_(13.0), SC_(-5.7500), SC_(1.6715535177261375555448386655062426e18) }, { SC_(13.0), SC_(-5.2500), SC_(1.6715535177261375555111931703465213e18) }, { SC_(13.0), SC_(-4.7500), SC_(1.6715535177261375554006502097069245e18) }, { SC_(13.0), SC_(-4.2500), SC_(1.6715535177261375549959051229408070e18) }, { SC_(13.0), SC_(-3.7500), SC_(1.6715535177261375533086111846120836e18) }, { SC_(13.0), SC_(-3.2500), SC_(1.6715535177261375450685102745473439e18) }, { SC_(13.0), SC_(-2.7500), SC_(1.6715535177261374960497681856044819e18) }, { SC_(13.0), SC_(-2.2500), SC_(1.6715535177261371205337428998473234e18) }, { SC_(13.0), SC_(-1.7500), SC_(1.6715535177261330943278445785436631e18) }, { SC_(13.0), SC_(-1.2500), SC_(1.6715535177260640528966928029814669e18) }, { SC_(13.0), SC_(-0.75000), SC_(1.6715535177236684875710325164741107e18) }, { SC_(13.0), SC_(-0.25000), SC_(1.6715535174521967818565724133494669e18) }, + { SC_(20.0), SC_(-7.7500), SC_(-1.0700016187896297695358366297227405e31)}, { SC_(20.0), SC_(-7.2500), SC_(1.0700016187896297695358366297227207e31) }, { SC_(20.0), SC_(-6.7500), SC_(-1.0700016187896297695358366297227919e31) }, { SC_(20.0), SC_(-6.2500), SC_(1.0700016187896297695358366297225123e31) }, { SC_(20.0), SC_(-5.7500), SC_(-1.0700016187896297695358366297237267e31) }, { SC_(20.0), SC_(-5.2500), SC_(1.0700016187896297695358366297178064e31) }, { SC_(20.0), SC_(-4.7500), SC_(-1.0700016187896297695358366297508349e31) }, { SC_(20.0), SC_(-4.2500), SC_(1.0700016187896297695358366295346680e31) }, { SC_(20.0), SC_(-3.7500), SC_(-1.0700016187896297695358366312489970e31) }, { SC_(20.0), SC_(-3.2500), SC_(1.0700016187896297695358366140480322e31) }, { SC_(20.0), SC_(-2.7500), SC_(-1.0700016187896297695358368457690989e31) }, { SC_(20.0), SC_(-2.2500), SC_(1.0700016187896297695358322831891149e31) }, { SC_(20.0), SC_(-1.7500), SC_(-1.0700016187896297695359814356987569e31) }, { SC_(20.0), SC_(-1.2500), SC_(1.0700016187896297695260533442006924e31) }, { SC_(20.0), SC_(-0.75000), SC_(-1.0700016187896297714516730336449055e31) }, { SC_(20.0), SC_(-0.25000), SC_(1.0700016187896275255700182817756420e31) }, + { SC_(23.0), SC_(-7.7500), SC_(7.2766958095269026379022334905108869e36)}, { SC_(23.0), SC_(-7.2500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23.0), SC_(-6.7500), SC_(7.2766958095269026379022334905108869e36) }, { SC_(23.0), SC_(-6.2500), SC_(7.2766958095269026379022334905108868e36) }, { SC_(23.0), SC_(-5.7500), SC_(7.2766958095269026379022334905108866e36) }, { SC_(23.0), SC_(-5.2500), SC_(7.2766958095269026379022334905108848e36) }, { SC_(23.0), SC_(-4.7500), SC_(7.2766958095269026379022334905108714e36) }, { SC_(23.0), SC_(-4.2500), SC_(7.2766958095269026379022334905107503e36) }, { SC_(23.0), SC_(-3.7500), SC_(7.2766958095269026379022334905093860e36) }, { SC_(23.0), SC_(-3.2500), SC_(7.2766958095269026379022334904893135e36) }, { SC_(23.0), SC_(-2.7500), SC_(7.2766958095269026379022334900771270e36) }, { SC_(23.0), SC_(-2.2500), SC_(7.2766958095269026379022334770834817e36) }, { SC_(23.0), SC_(-1.7500), SC_(7.2766958095269026379022327513062336e36) }, { SC_(23.0), SC_(-1.2500), SC_(7.2766958095269026379021422520579094e36) }, { SC_(23.0), SC_(-0.75000), SC_(7.2766958095269026378642504512809960e36) }, { SC_(23.0), SC_(-0.25000), SC_(7.2766958095269025158194448897624671e36) }, + { SC_(3.0), -SC_(4.25), SC_(1558.5271934026830535593466489654603)}, { SC_(4.0), -SC_(4.25), SC_(24481.563410001194361068581610436266) }, { SC_(5.0), -SC_(4.25), SC_(492231.25769899818636191601473727961) }, { SC_(6.0), -SC_(4.25), SC_(1.1791224751536137687542195274483895e7) }, { SC_(7.0), -SC_(4.25), SC_(3.3035269584354251332378488235637904e8) }, { SC_(8.0), -SC_(4.25), SC_(1.0569114259649513356345466704581650e10) }, { SC_(9.0), -SC_(4.25), SC_(3.8051374324231168248427408936422641e11) }, { SC_(10.0), -SC_(4.25), SC_(1.5220204740668289586193246215389596e13) }, { SC_(11.0), -SC_(4.25), SC_(6.6969403856797194026913294831009712e14) }, { SC_(12.0), -SC_(4.25), SC_(3.2145233093874118103287175260580644e16) }, { SC_(13.0), -SC_(4.25), SC_(1.6715535177261375549959051229408070e18) }, { SC_(14.0), -SC_(4.25), SC_(9.3606970885707978198242133390297266e19) }, { SC_(15.0), -SC_(4.25), SC_(5.6164187748870728746250217782924909e21) }, { SC_(16.0), -SC_(4.25), SC_(3.5945079045721164734031460047595950e23) }, { SC_(17.0), -SC_(4.25), SC_(2.4442654003427929640663726375953543e25) }, { SC_(18.0), -SC_(4.25), SC_(1.7598710821897274459494049818707809e27) }, { SC_(19.0), -SC_(4.25), SC_(1.3375020239985042298043467701659026e29) }, { SC_(20.0), -SC_(4.25), SC_(1.0700016187896297695358366295346680e31) }, { SC_(21.0), -SC_(4.25), SC_(8.9880135989785359476536358803633961e32) }, { SC_(22.0), -SC_(4.25), SC_(7.9094519667650484338896180683524747e34) }, { SC_(23.0), -SC_(4.25), SC_(7.2766958095269026379022334905107503e36) }, + { SC_(3.0), SC_(-4.75), SC_(1558.5318783056006283387768251220856) }, { SC_(4.0), SC_(-4.75), SC_(-24481.582451925002662084791450344735) }, { SC_(5.0), SC_(-4.75), SC_(492231.26135104955223808370232711841) }, { SC_(6.0), SC_(-4.75), SC_(-1.1791224766632825018904254258839318e7) }, { SC_(7.0), SC_(-4.75), SC_(3.3035269584947086190323815702711063e8) }, { SC_(8.0), SC_(-4.75), SC_(-1.0569114259674567879524502974422220e10) }, { SC_(9.0), SC_(-4.75), SC_(3.8051374324232805216534792821594812e11) }, { SC_(10.0), SC_(-4.75), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(11.0), SC_(-4.75), SC_(6.6969403856797200883878751610651220e14) }, { SC_(12.0), SC_(-4.75), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(13.0), SC_(-4.75), SC_(1.6715535177261375554006502097069245e18) }, { SC_(14.0), SC_(-4.75), SC_(-9.3606970885707978200117071697879591e19) }, { SC_(15.0), SC_(-4.75), SC_(5.6164187748870728746282195405281448e21) }, { SC_(16.0), SC_(-4.75), SC_(-3.5945079045721164734032997263075953e23) }, { SC_(17.0), SC_(-4.75), SC_(2.4442654003427929640663758934254941e25) }, { SC_(18.0), SC_(-4.75), SC_(-1.7598710821897274459494051446575390e27) }, { SC_(19.0), SC_(-4.75), SC_(1.3375020239985042298043467743154361e29) }, { SC_(20.0), SC_(-4.75), SC_(-1.0700016187896297695358366297508349e31) }, { SC_(21.0), SC_(-4.75), SC_(8.9880135989785359476536358804280906e32) }, { SC_(22.0), SC_(-4.75), SC_(-7.9094519667650484338896180683559907e34) }, { SC_(23.0), SC_(-4.75), SC_(7.2766958095269026379022334905108714e36) }, + { SC_(1.0), SC_(-9.5), SC_(9.7696874450302318856305468284306792)}, { SC_(3.0), SC_(-9.5), SC_(194.81619198176773011863271713047162) }, { SC_(5.0), SC_(-9.5), SC_(15382.226860156995915624995579131219) }, { SC_(7.0), SC_(-9.5), SC_(2.5808804363008334969805587475917565e6) }, { SC_(9.0), SC_(-9.5), SC_(7.4319090477015599086877150154313919e8) }, { SC_(11.0), SC_(-9.5), SC_(3.2699904226951756570017589463296126e11) }, { SC_(13.0), SC_(-9.5), SC_(2.0404706026930390078103975418992502e14) }, { SC_(15.0), SC_(-9.5), SC_(1.7139949874533303450398622617829339e17) }, { SC_(17.0), SC_(-9.5), SC_(1.8648265078298896515398973583300966e20) }, { SC_(19.0), SC_(-9.5), SC_(2.5510826568574986072623191304028880e23) }, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, + { SC_(2.0), SC_(-9.5), SC_(-0.0099751442477151692853059194570941025) }, { SC_(4.0), SC_(-9.5), SC_(-0.00059506011900940675655749713967447346) }, { SC_(6.0), SC_(-9.5), SC_(-0.00011794286977626608581527674104044053) }, { SC_(8.0), SC_(-9.5), SC_(-0.000048934615584055214532361558113243801) }, { SC_(10.0), SC_(-9.5), SC_(-0.000034696555222805555969152083201249795) }, { SC_(12.0), SC_(-9.5), SC_(-0.000037470635416758472254487967117333555) }, { SC_(14.0), SC_(-9.5), SC_(-0.000057218576281198884425118075685027774) }, { SC_(16.0), SC_(-9.5), SC_(-0.00011728023376485851827598955099805232) }, { SC_(18.0), SC_(-9.5), SC_(-0.00031049110045758006635527458576736345) }, { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932) }, + // { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932)}, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(22.0), SC_(-9.5), SC_(-0.0041914420015886426448664611125724338) }, { SC_(23.0), SC_(-9.5), SC_(8.6744973773084910367753904944787155e29) }, { SC_(24.0), SC_(-9.5), SC_(-0.020482527998674199369359987617445420) }, { SC_(25.0), SC_(-9.5), SC_(2.0818793705474855280713094147422278e33) }, { SC_(26.0), SC_(-9.5), SC_(-0.11840299831136879082790399023048278) }, { SC_(27.0), SC_(-9.5), SC_(5.8459172724952950454469355072783445e36) }, { SC_(28.0), SC_(-9.5), SC_(-0.79896867888629450211348696225656872) }, { SC_(29.0), SC_(-9.5), SC_(1.8987539301063980537054871851063348e40) }, { SC_(30.0), SC_(-9.5), SC_(-6.2224465669723272001827279817965087) } } }; do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); From e70f53e670a68ac704ea2382261e855bbe7ca29d Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 31 Oct 2014 18:51:14 +0000 Subject: [PATCH 48/69] [Polygamma] Fix issues with small negative arguments for x. Tidy up a couple of cosmetic coding issues. --- .../math/special_functions/detail/polygamma.hpp | 13 ++++++------- test/test_polygamma.hpp | 7 +++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 5b94237fd..50c581686 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -69,7 +69,7 @@ // set the initial values of part_term, term and sum via logs: part_term = 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(n * (n + 1)) - boost::math::constants::ln_two() - log(x); + part_term += log(T(n) * (n + 1)) - boost::math::constants::ln_two() - log(x); part_term = exp(part_term); } else @@ -123,9 +123,8 @@ // Use N = (0.4 * digits) + (4 * n) for target value for x: BOOST_MATH_STD_USING - const int d4d = static_cast(0.4F * policies::digits_base10()); - const int N4dn = static_cast(d4d + (4 * n)); - const int N = static_cast((std::min)(N4dn, (std::numeric_limits::max)())); + 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); @@ -234,7 +233,7 @@ } template - T poly_cot_pi(int n, T x, const Policy& pol, const char* function) + T poly_cot_pi(int n, T x, T xc, const Policy& pol, const char* function) { // Return n'th derivative of cot(pi*x) at x, these are simply // tabulated for up to n = 9, beyond that it is possible to @@ -253,7 +252,7 @@ // of storage space, this method has no better accuracy than recursion // on x to x > 0 when computing polygamma :-( // - T s = boost::math::sin_pi(x); + T s = x < xc ? boost::math::sin_pi(x) : boost::math::sin_pi(xc); switch(n) { case 1: @@ -482,7 +481,7 @@ // We have tabulated the derivatives of cot(x) up to the 9th derivative, which // allows us to use: http://functions.wolfram.com/06.15.16.0001.01 T z = 1 - x; - T result = polygamma_imp(n, z, pol) + constants::pi() * poly_cot_pi(n, z, pol, function); + T result = polygamma_imp(n, z, pol) + constants::pi() * poly_cot_pi(n, z, x, pol, function); return n & 1 ? T(-result) : result; } // diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 335f715d0..da0cfa153 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -137,7 +137,7 @@ void test_polygamma(T, const char* name) } }; do_test_polygamma(big_data, name, "Mathematica Data - large arguments"); - boost::array, 373> neg_data = + boost::array, 399> neg_data = { { { 1, SC_(-12.750), SC_(19.663772856722737612034697464751605) }, { 1, SC_(-12.250), SC_(19.660817549236368273654684043826967) }, { 1, SC_(-11.750), SC_(19.657621376522814505537196503582823) }, { 1, SC_(-11.250), SC_(19.654153659190554029589711115880278) }, { 1, SC_(-10.750), SC_(19.650378280099093364749509767503149) }, { 1, SC_(-10.250), SC_(19.646252424622652795021809881312377) }, { 1, SC_(-9.7500), SC_(19.641724953976865133273035997897957) }, { 1, SC_(-9.2500), SC_(19.636734280660725370869519577921538) }, { 1, SC_(-8.7500), SC_(19.631205558842085383108670448917024) }, { 1, SC_(-8.2500), SC_(19.625046917622010980803778160828770) }, { 1, SC_(-7.7500), SC_(19.618144334352289464741323510141514) }, { 1, SC_(-7.2500), SC_(19.610354539293269015698176691590937) }, { 1, SC_(-6.7500), SC_(19.601495010731061577124257953429755) }, { 1, SC_(-6.2500), SC_(19.591329569019785068016844943671793) }, { 1, SC_(-5.7500), SC_(19.579547136931335925546754524074474) }, { 1, SC_(-5.2500), SC_(19.565729569019785068016844943671793) }, { 1, SC_(-4.7500), SC_(19.549301390239464469970194977760674) }, { 1, SC_(-4.2500), SC_(19.529448389881463072551992335962043) }, { 1, SC_(-3.7500), SC_(19.504980060599575273294294700752364) }, { 1, SC_(-3.2500), SC_(19.474085068082155114074483685443011) }, { 1, SC_(-2.7500), SC_(19.433868949488464162183183589641253) }, { 1, SC_(-2.2500), SC_(19.379410511869137362595193744614609) }, { 1, SC_(-1.7500), SC_(19.301637544529786476232770366500757) }, { 1, SC_(-1.2500), SC_(19.181879647671606498397662880417078) }, { 1, SC_(-0.75000), SC_(18.975106932284888517049096897113002) }, { 1, SC_(-0.25000), SC_(18.541879647671606498397662880417078) }, { 2, SC_(-12.750), SC_(-124.03079461415823384604153251543681) }, { 2, SC_(-12.250), SC_(124.01896466745858356132308878716344) }, { 2, SC_(-11.750), SC_(-124.03175955222881001960976796032603) }, { 2, SC_(-11.250), SC_(124.01787668541028735821044014586602) }, { 2, SC_(-10.750), SC_(-124.03299241970518808612682102178640) }, { 2, SC_(-10.250), SC_(124.01647202148710491650947992638728) }, { 2, SC_(-9.7500), SC_(-124.03460234084420729198290916496876) }, { 2, SC_(-9.2500), SC_(124.01461482266526541911391108670126) }, { 2, SC_(-8.7500), SC_(-124.03676016548723903560636876475972) }, { 2, SC_(-8.2500), SC_(124.01208782525148933477537240192445) }, { 2, SC_(-7.7500), SC_(-124.03974558822776381694747663647984) }, { 2, SC_(-7.2500), SC_(124.00852603656573370687098416695770) }, { 2, SC_(-6.7500), SC_(-124.04404218787195165891317097369578) }, { 2, SC_(-6.2500), SC_(124.00327776890408296268303058132483) }, { 2, SC_(-5.7500), SC_(-124.05054526159038888901020902683808) }, { 2, SC_(-5.2500), SC_(123.99508576890408296268303058132483) }, { 2, SC_(-4.7500), SC_(-124.06106552130930069964553408642549) }, { 2, SC_(-4.2500), SC_(123.98126436732757934536308673076874) }, { 2, SC_(-3.7500), SC_(-124.07972713378925404561433420306057) }, { 2, SC_(-3.2500), SC_(123.95521103942202265902072971875978) }, { 2, SC_(-2.7500), SC_(-124.11765305971517997154026012898649) }, { 2, SC_(-2.2500), SC_(123.89694977406016558118732052440384) }, { 2, SC_(-1.7500), SC_(-124.21382135423058192495874247308867) }, { 2, SC_(-1.2500), SC_(123.72136678366236036856729308956159) }, { 2, SC_(-0.75000), SC_(-124.58699919679617959259722643810325) }, { 2, SC_(-0.25000), SC_(122.69736678366236036856729308956159) }, @@ -158,7 +158,10 @@ void test_polygamma(T, const char* name) { SC_(3.0), SC_(-4.75), SC_(1558.5318783056006283387768251220856) }, { SC_(4.0), SC_(-4.75), SC_(-24481.582451925002662084791450344735) }, { SC_(5.0), SC_(-4.75), SC_(492231.26135104955223808370232711841) }, { SC_(6.0), SC_(-4.75), SC_(-1.1791224766632825018904254258839318e7) }, { SC_(7.0), SC_(-4.75), SC_(3.3035269584947086190323815702711063e8) }, { SC_(8.0), SC_(-4.75), SC_(-1.0569114259674567879524502974422220e10) }, { SC_(9.0), SC_(-4.75), SC_(3.8051374324232805216534792821594812e11) }, { SC_(10.0), SC_(-4.75), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(11.0), SC_(-4.75), SC_(6.6969403856797200883878751610651220e14) }, { SC_(12.0), SC_(-4.75), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(13.0), SC_(-4.75), SC_(1.6715535177261375554006502097069245e18) }, { SC_(14.0), SC_(-4.75), SC_(-9.3606970885707978200117071697879591e19) }, { SC_(15.0), SC_(-4.75), SC_(5.6164187748870728746282195405281448e21) }, { SC_(16.0), SC_(-4.75), SC_(-3.5945079045721164734032997263075953e23) }, { SC_(17.0), SC_(-4.75), SC_(2.4442654003427929640663758934254941e25) }, { SC_(18.0), SC_(-4.75), SC_(-1.7598710821897274459494051446575390e27) }, { SC_(19.0), SC_(-4.75), SC_(1.3375020239985042298043467743154361e29) }, { SC_(20.0), SC_(-4.75), SC_(-1.0700016187896297695358366297508349e31) }, { SC_(21.0), SC_(-4.75), SC_(8.9880135989785359476536358804280906e32) }, { SC_(22.0), SC_(-4.75), SC_(-7.9094519667650484338896180683559907e34) }, { SC_(23.0), SC_(-4.75), SC_(7.2766958095269026379022334905108714e36) }, { SC_(1.0), SC_(-9.5), SC_(9.7696874450302318856305468284306792)}, { SC_(3.0), SC_(-9.5), SC_(194.81619198176773011863271713047162) }, { SC_(5.0), SC_(-9.5), SC_(15382.226860156995915624995579131219) }, { SC_(7.0), SC_(-9.5), SC_(2.5808804363008334969805587475917565e6) }, { SC_(9.0), SC_(-9.5), SC_(7.4319090477015599086877150154313919e8) }, { SC_(11.0), SC_(-9.5), SC_(3.2699904226951756570017589463296126e11) }, { SC_(13.0), SC_(-9.5), SC_(2.0404706026930390078103975418992502e14) }, { SC_(15.0), SC_(-9.5), SC_(1.7139949874533303450398622617829339e17) }, { SC_(17.0), SC_(-9.5), SC_(1.8648265078298896515398973583300966e20) }, { SC_(19.0), SC_(-9.5), SC_(2.5510826568574986072623191304028880e23) }, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(2.0), SC_(-9.5), SC_(-0.0099751442477151692853059194570941025) }, { SC_(4.0), SC_(-9.5), SC_(-0.00059506011900940675655749713967447346) }, { SC_(6.0), SC_(-9.5), SC_(-0.00011794286977626608581527674104044053) }, { SC_(8.0), SC_(-9.5), SC_(-0.000048934615584055214532361558113243801) }, { SC_(10.0), SC_(-9.5), SC_(-0.000034696555222805555969152083201249795) }, { SC_(12.0), SC_(-9.5), SC_(-0.000037470635416758472254487967117333555) }, { SC_(14.0), SC_(-9.5), SC_(-0.000057218576281198884425118075685027774) }, { SC_(16.0), SC_(-9.5), SC_(-0.00011728023376485851827598955099805232) }, { SC_(18.0), SC_(-9.5), SC_(-0.00031049110045758006635527458576736345) }, { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932) }, - // { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932)}, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(22.0), SC_(-9.5), SC_(-0.0041914420015886426448664611125724338) }, { SC_(23.0), SC_(-9.5), SC_(8.6744973773084910367753904944787155e29) }, { SC_(24.0), SC_(-9.5), SC_(-0.020482527998674199369359987617445420) }, { SC_(25.0), SC_(-9.5), SC_(2.0818793705474855280713094147422278e33) }, { SC_(26.0), SC_(-9.5), SC_(-0.11840299831136879082790399023048278) }, { SC_(27.0), SC_(-9.5), SC_(5.8459172724952950454469355072783445e36) }, { SC_(28.0), SC_(-9.5), SC_(-0.79896867888629450211348696225656872) }, { SC_(29.0), SC_(-9.5), SC_(1.8987539301063980537054871851063348e40) }, { SC_(30.0), SC_(-9.5), SC_(-6.2224465669723272001827279817965087) } + { SC_(2.0), SC_(-9.5367431640625e-7), SC_(2.3058430092136939495958800005662742e18) }, { SC_(2.0), SC_(-5.960464477539063e-8), SC_(9.4447329657392904273895958858066118e21) }, { SC_(2.0), SC_(-3.725290298461914e-9), SC_(3.8685626227668133590597629595886169e25) }, { SC_(2.0), SC_(-2.3283064365386963e-10), SC_(1.5845632502852867518708790066959589e29) }, { SC_(2.0), SC_(-1.4551915228366852e-11), SC_(6.4903710731685345356631204115250960e32) }, { SC_(2.0), SC_(-9.094947017729282e-13), SC_(2.6584559915698317458076141205606891e36) }, { SC_(2.0), SC_(-5.684341886080802e-14), SC_(1.0889035741470030830827987437816583e40) }, { SC_(2.0), SC_(-3.552713678800501e-15), SC_(4.4601490397061246283071436545296723e43) }, { SC_(2.0), SC_(-2.220446049250313e-16), SC_(1.8268770466636286477546060408953538e47) }, { SC_(2.0), SC_(-1.3877787807814457e-17), SC_(7.4828883831342229412028663435073691e50) }, { SC_(2.0), SC_(-8.673617379884035e-19), SC_(3.0649910817317777167166940543006184e54) }, { SC_(2.0), SC_(-5.421010862427522e-20), SC_(1.2554203470773361527671578846415333e58) }, { SC_(2.0), SC_(-3.3881317890172014e-21), SC_(5.1422017416287688817342786954917203e61) }, + { SC_(3.0), SC_(-9.5367431640625e-7), SC_(7.2535549176877750482370624939631357e24) }, { SC_(3.0), SC_(-5.960464477539063e-8), SC_(4.7536897508558602556126370202249394e29) }, { SC_(3.0), SC_(-3.725290298461914e-9), SC_(3.1153781151208965771182977975320582e34) }, { SC_(3.0), SC_(-2.3283064365386963e-10), SC_(2.0416942015256307807802476445906093e39) }, { SC_(3.0), SC_(-1.4551915228366852e-11), SC_(1.3380447119118373884921430963589017e44) }, { SC_(3.0), SC_(-9.094947017729282e-13), SC_(8.7690098239854175092221089962976981e48) }, { SC_(3.0), SC_(-5.684341886080802e-14), SC_(5.7468582782470832188438013518136594e53) }, { SC_(3.0), SC_(-3.552713678800501e-15), SC_(3.7662610412320084583014736539245998e58) }, { SC_(3.0), SC_(-2.220446049250313e-16), SC_(2.4682568359818090632324537738360258e63) }, { SC_(3.0), SC_(-1.3877787807814457e-17), SC_(1.6175968000290383876800209052211778e68) }, { SC_(3.0), SC_(-8.673617379884035e-19), SC_(1.0601082388670305977499785004457511e73) }, { SC_(3.0), SC_(-5.421010862427522e-20), SC_(6.9475253542389717254142591005212745e77) }, { SC_(3.0), SC_(-3.3881317890172014e-21), SC_(4.5531302161540525099674888441176224e82) }, + + //{ SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932)}, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(22.0), SC_(-9.5), SC_(-0.0041914420015886426448664611125724338) }, { SC_(23.0), SC_(-9.5), SC_(8.6744973773084910367753904944787155e29) }, { SC_(24.0), SC_(-9.5), SC_(-0.020482527998674199369359987617445420) }, { SC_(25.0), SC_(-9.5), SC_(2.0818793705474855280713094147422278e33) }, { SC_(26.0), SC_(-9.5), SC_(-0.11840299831136879082790399023048278) }, { SC_(27.0), SC_(-9.5), SC_(5.8459172724952950454469355072783445e36) }, { SC_(28.0), SC_(-9.5), SC_(-0.79896867888629450211348696225656872) }, { SC_(29.0), SC_(-9.5), SC_(1.8987539301063980537054871851063348e40) }, { SC_(30.0), SC_(-9.5), SC_(-6.2224465669723272001827279817965087) } } }; do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); From eccec791c7b58713abe2931749a4faa762e9a4a8 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 3 Nov 2014 11:50:10 +0000 Subject: [PATCH 49/69] [polygamma] Fix spurious overflow in transition zone, update cot derivative to work to arbitrary level. --- .../special_functions/detail/polygamma.hpp | 109 +++++++++++++++--- test/test_polygamma.cpp | 7 ++ test/test_polygamma.hpp | 12 +- 3 files changed, 112 insertions(+), 16 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 50c581686..42cf00b96 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -134,14 +134,25 @@ T sum0(0); T z_plus_k_pow_minus_m_minus_one(0); - // Forward recursion to larger x: - for(int k = 1; k <= iter; ++k) + // Forward recursion to larger x, need to check for overflow first though: + if(log(z + iter) * minus_m_minus_one > -tools::log_max_value()) { - 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; + 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); + } + { + for(int k = 1; k <= iter; ++k) + { + T log_term = log(z) * minus_m_minus_one + boost::math::lgamma(n + 1, pol); + sum0 += exp(log_term); + z += 1; + } } - sum0 *= boost::math::factorial(n); if((n - 1) & 1) sum0 = -sum0; @@ -232,6 +243,18 @@ return n & 1 ? sum : -sum; } + // + // Helper function which figures out which slot our coefficient is in + // given an angle multiplier for the cosine term of power: + // + 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) { @@ -252,7 +275,7 @@ // of storage space, this method has no better accuracy than recursion // on x to x > 0 when computing polygamma :-( // - T s = x < xc ? boost::math::sin_pi(x) : boost::math::sin_pi(xc); + T s = fabs(x) < fabs(xc) ? boost::math::sin_pi(x) : boost::math::sin_pi(xc); switch(n) { case 1: @@ -447,11 +470,67 @@ + 2097130 * boost::math::cos_pi(18 * x) + boost::math::cos_pi(20 * x)) / boost::math::pow<22>(s); } - - /* - */ } - return policies::raise_domain_error(function, "Derivative of cotangent not implemented at n = %1%", n, pol); + + // + // We'll have to compute the corefficients up to n: + // + static std::vector > table(1, std::vector(1, T(-1))); + + int index = n - 1; + + if(index >= (int)table.size()) + { + // + // We need to compute new coefficients for the cosine terms to the derivative. + // The following code follows immediately from differentiating + // + // C * cos(power * x) * csc^n(power * x) + // + for(int i = table.size(); i <= index; ++i) + { + table.push_back(std::vector((i + 2) / 2, T(0))); + for(int power = (i & 1 ? 0 : 1); power < i; power += 2) + { + dereference_table(table, i, std::abs(1 - power)) += -(power + i + 1) * dereference_table(table, i - 1, power) / 2; + dereference_table(table, i, power + 1) += -(i + 1 - power) * dereference_table(table, i - 1, power) / 2; + } + // + // The coefficients as calculated above grow so large so fast that we scale them all + // by n! And since current order = i+1 just divide each row by that as we create it: + // + for(unsigned j = 0; j < table[i].size(); ++j) + table[i][j] /= (i + 1); + } + } + + T sum = 0; + int power = n & 1 ? 0 : 1; + // + // Compute the sum of the cosine terms: + // + for(unsigned j = 0; j < table[index].size(); ++j) + { + sum += table[index][j] * boost::math::cos_pi(x * power); + power += 2; + } + if(sum == 0) + return sum; + // + // The remaining terms are computed using logs since the powers and factorials + // get real large real quick: + // + 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 + 1)); + 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 @@ -475,15 +554,16 @@ else return policies::raise_pole_error(function, "Evaluation at negative integer %1%", x, pol); } - if(n < 22) - { + //if(n < 22) + //{ // // We have tabulated the derivatives of cot(x) up to the 9th derivative, which // allows us to use: http://functions.wolfram.com/06.15.16.0001.01 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; - } + //} +#if 0 // // Try http://functions.wolfram.com/06.15.16.0007.01 // @@ -500,6 +580,7 @@ if(n & 1) sum = -sum; return polygamma_imp(n, z, pol) - sum; +#endif } // // Limit for use of small-x-series is chosen diff --git a/test/test_polygamma.cpp b/test/test_polygamma.cpp index 15be006cf..e6037367e 100644 --- a/test/test_polygamma.cpp +++ b/test/test_polygamma.cpp @@ -41,6 +41,13 @@ void expected_results() largest_type, // test type(s) ".*negative.*", // test data group ".*", 1400, 500); // test function + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + ".*bug cases.*", // test data group + ".*", 100000, 50000); // test function add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index da0cfa153..491271fdc 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -160,8 +160,6 @@ void test_polygamma(T, const char* name) { SC_(2.0), SC_(-9.5), SC_(-0.0099751442477151692853059194570941025) }, { SC_(4.0), SC_(-9.5), SC_(-0.00059506011900940675655749713967447346) }, { SC_(6.0), SC_(-9.5), SC_(-0.00011794286977626608581527674104044053) }, { SC_(8.0), SC_(-9.5), SC_(-0.000048934615584055214532361558113243801) }, { SC_(10.0), SC_(-9.5), SC_(-0.000034696555222805555969152083201249795) }, { SC_(12.0), SC_(-9.5), SC_(-0.000037470635416758472254487967117333555) }, { SC_(14.0), SC_(-9.5), SC_(-0.000057218576281198884425118075685027774) }, { SC_(16.0), SC_(-9.5), SC_(-0.00011728023376485851827598955099805232) }, { SC_(18.0), SC_(-9.5), SC_(-0.00031049110045758006635527458576736345) }, { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932) }, { SC_(2.0), SC_(-9.5367431640625e-7), SC_(2.3058430092136939495958800005662742e18) }, { SC_(2.0), SC_(-5.960464477539063e-8), SC_(9.4447329657392904273895958858066118e21) }, { SC_(2.0), SC_(-3.725290298461914e-9), SC_(3.8685626227668133590597629595886169e25) }, { SC_(2.0), SC_(-2.3283064365386963e-10), SC_(1.5845632502852867518708790066959589e29) }, { SC_(2.0), SC_(-1.4551915228366852e-11), SC_(6.4903710731685345356631204115250960e32) }, { SC_(2.0), SC_(-9.094947017729282e-13), SC_(2.6584559915698317458076141205606891e36) }, { SC_(2.0), SC_(-5.684341886080802e-14), SC_(1.0889035741470030830827987437816583e40) }, { SC_(2.0), SC_(-3.552713678800501e-15), SC_(4.4601490397061246283071436545296723e43) }, { SC_(2.0), SC_(-2.220446049250313e-16), SC_(1.8268770466636286477546060408953538e47) }, { SC_(2.0), SC_(-1.3877787807814457e-17), SC_(7.4828883831342229412028663435073691e50) }, { SC_(2.0), SC_(-8.673617379884035e-19), SC_(3.0649910817317777167166940543006184e54) }, { SC_(2.0), SC_(-5.421010862427522e-20), SC_(1.2554203470773361527671578846415333e58) }, { SC_(2.0), SC_(-3.3881317890172014e-21), SC_(5.1422017416287688817342786954917203e61) }, { SC_(3.0), SC_(-9.5367431640625e-7), SC_(7.2535549176877750482370624939631357e24) }, { SC_(3.0), SC_(-5.960464477539063e-8), SC_(4.7536897508558602556126370202249394e29) }, { SC_(3.0), SC_(-3.725290298461914e-9), SC_(3.1153781151208965771182977975320582e34) }, { SC_(3.0), SC_(-2.3283064365386963e-10), SC_(2.0416942015256307807802476445906093e39) }, { SC_(3.0), SC_(-1.4551915228366852e-11), SC_(1.3380447119118373884921430963589017e44) }, { SC_(3.0), SC_(-9.094947017729282e-13), SC_(8.7690098239854175092221089962976981e48) }, { SC_(3.0), SC_(-5.684341886080802e-14), SC_(5.7468582782470832188438013518136594e53) }, { SC_(3.0), SC_(-3.552713678800501e-15), SC_(3.7662610412320084583014736539245998e58) }, { SC_(3.0), SC_(-2.220446049250313e-16), SC_(2.4682568359818090632324537738360258e63) }, { SC_(3.0), SC_(-1.3877787807814457e-17), SC_(1.6175968000290383876800209052211778e68) }, { SC_(3.0), SC_(-8.673617379884035e-19), SC_(1.0601082388670305977499785004457511e73) }, { SC_(3.0), SC_(-5.421010862427522e-20), SC_(6.9475253542389717254142591005212745e77) }, { SC_(3.0), SC_(-3.3881317890172014e-21), SC_(4.5531302161540525099674888441176224e82) }, - - //{ SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932)}, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(22.0), SC_(-9.5), SC_(-0.0041914420015886426448664611125724338) }, { SC_(23.0), SC_(-9.5), SC_(8.6744973773084910367753904944787155e29) }, { SC_(24.0), SC_(-9.5), SC_(-0.020482527998674199369359987617445420) }, { SC_(25.0), SC_(-9.5), SC_(2.0818793705474855280713094147422278e33) }, { SC_(26.0), SC_(-9.5), SC_(-0.11840299831136879082790399023048278) }, { SC_(27.0), SC_(-9.5), SC_(5.8459172724952950454469355072783445e36) }, { SC_(28.0), SC_(-9.5), SC_(-0.79896867888629450211348696225656872) }, { SC_(29.0), SC_(-9.5), SC_(1.8987539301063980537054871851063348e40) }, { SC_(30.0), SC_(-9.5), SC_(-6.2224465669723272001827279817965087) } } }; do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); @@ -179,5 +177,15 @@ void test_polygamma(T, const char* name) { SC_(35.0), SC_(0.1250000000), SC_(3.3532982327901451846973629635910627e72) }, { SC_(35.0), SC_(0.06250000000), SC_(2.3043689989709229438987285737704404e83) }, { SC_(35.0), SC_(0.03125000000), SC_(1.5835503181594194718369731136519624e94) }, { SC_(35.0), SC_(0.01562500000), SC_(1.0882074924904162473416628106826351e105) }, { SC_(35.0), SC_(0.007812500000), SC_(7.4781049464136054012151819362261716e115) }, { SC_(35.0), SC_(0.003906250000), SC_(5.1389145889443628300269064119650184e126) }, { SC_(35.0), SC_(0.001953125000), SC_(3.5314352154325314429637711743107931e137) }, { SC_(35.0), SC_(0.0009765625000), SC_(2.4267838013160699267233738410387795e148) } } }; do_test_polygamma(small_data, name, "Mathematica Data - small arguments"); + + boost::array, 18> bug_cases = + { { + { SC_(171.0), SC_(2.0), SC_(2.073093314165313149880140394410e257) }, { SC_(171.0), SC_(5.0), SC_(7.42911976071332889749264626321716781e188) }, + { SC_(166.0), SC_(2.0), SC_(-4.8129498903508823293044351695484095e247) }, { SC_(166.0), SC_(3.0), SC_(-1.8843912448604502196243093626013895e218) }, + { SC_(171.0), SC_(23.0), SC_(7.53143916217078889612817829861181739e74) }, { SC_(168.0), SC_(150.0), SC_(-6.5266062780306068333215312257902920e-66) }, + { SC_(169.0), SC_(202.0), SC_(9.2734049986021958613510169328055599e-88) }, + { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932)}, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(22.0), SC_(-9.5), SC_(-0.0041914420015886426448664611125724338) }, { SC_(23.0), SC_(-9.5), SC_(8.6744973773084910367753904944787155e29) }, { SC_(24.0), SC_(-9.5), SC_(-0.020482527998674199369359987617445420) }, { SC_(25.0), SC_(-9.5), SC_(2.0818793705474855280713094147422278e33) }, { SC_(26.0), SC_(-9.5), SC_(-0.11840299831136879082790399023048278) }, { SC_(27.0), SC_(-9.5), SC_(5.8459172724952950454469355072783445e36) }, { SC_(28.0), SC_(-9.5), SC_(-0.79896867888629450211348696225656872) }, { SC_(29.0), SC_(-9.5), SC_(1.8987539301063980537054871851063348e40) }, { SC_(30.0), SC_(-9.5), SC_(-6.2224465669723272001827279817965087) } + } }; + do_test_polygamma(bug_cases, name, "Mathematica Data - Large orders and other bug cases"); } From d50cf889f6a5eb43b7ded01effb8ccc2675247bd Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 3 Nov 2014 12:01:11 +0000 Subject: [PATCH 50/69] Add basic thread safety and initialization code. --- .../special_functions/detail/polygamma.hpp | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 42cf00b96..9c8ef2598 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -475,6 +475,10 @@ // // We'll have to compute the corefficients up to n: // +#ifdef BOOST_HAS_THREADS + static boost::detail::lightweight_mutex m; + boost::detail::lightweight_mutex::scoped_lock l(m); +#endif static std::vector > table(1, std::vector(1, T(-1))); int index = n - 1; @@ -533,11 +537,34 @@ return exp(power_terms) * ((s < 0) && ((n + 1) & 1) ? -1 : 1) * boost::math::sign(sum); } + template + struct polygamma_initializer + { + struct init + { + init() + { + // Forces initialization of our table of coefficients and mutex: + boost::math::polygamma(30, T(-2.5), 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) { BOOST_MATH_STD_USING static const char* function = "boost::math::polygamma<%1%>(int, %1%)"; + polygamma_initializer::initializer.force_instantiate(); if(n == 0) return boost::math::digamma(x); if(n < 0) From 3478ee9c465aeb85e573cd659f771dfb153a8108 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 3 Nov 2014 17:55:21 +0000 Subject: [PATCH 51/69] [polygamma] Fix GCC failures, a few bugs and forward policy arguments. Fix test data to be 128-bit safe. --- .../special_functions/detail/polygamma.hpp | 270 +++++++++--------- test/float128/test_polygamma.cpp | 9 +- test/test_polygamma.cpp | 13 +- test/test_polygamma.hpp | 6 +- 4 files changed, 160 insertions(+), 138 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 9c8ef2598..843e9aecb 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -145,10 +145,11 @@ } sum0 *= boost::math::factorial(n); } + else { for(int k = 1; k <= iter; ++k) { - T log_term = log(z) * minus_m_minus_one + boost::math::lgamma(n + 1, pol); + T log_term = log(z) * minus_m_minus_one + boost::math::lgamma(T(n + 1), pol); sum0 += exp(log_term); z += 1; } @@ -258,6 +259,7 @@ template T poly_cot_pi(int n, T x, T xc, const Policy& pol, const char* function) { + BOOST_MATH_STD_USING // Return n'th derivative of cot(pi*x) at x, these are simply // tabulated for up to n = 9, beyond that it is possible to // calculate coefficients as follows: @@ -275,201 +277,203 @@ // of storage space, this method has no better accuracy than recursion // on x to x > 0 when computing polygamma :-( // - T s = fabs(x) < fabs(xc) ? boost::math::sin_pi(x) : boost::math::sin_pi(xc); + T s = fabs(x) < fabs(xc) ? boost::math::sin_pi(x, pol) : boost::math::sin_pi(xc, pol); switch(n) { case 1: return -constants::pi() / (s * s); case 2: { - T c = boost::math::cos_pi(x); - return 2 * constants::pi() * constants::pi() * c / boost::math::pow<3>(s); + T c = boost::math::cos_pi(x, pol); + return 2 * constants::pi() * constants::pi() * c / boost::math::pow<3>(s, pol); } case 3: { - T c = boost::math::cos_pi(2 * x); - return -2 * boost::math::pow<3>(constants::pi()) * (c + 2) / boost::math::pow<4>(s); + T c = boost::math::cos_pi(2 * x, pol); + return -2 * boost::math::pow<3>(constants::pi(), pol) * (c + 2) / boost::math::pow<4>(s, pol); } case 4: { - T c = boost::math::cos_pi(x); - T c2 = boost::math::cos_pi(2 * x); - return 4 * boost::math::pow<4>(constants::pi()) * (c2 + 5) * c / boost::math::pow<5>(s); + T c = boost::math::cos_pi(x, pol); + T c2 = boost::math::cos_pi(2 * x, pol); + return 4 * boost::math::pow<4>(constants::pi(), pol) * (c2 + 5) * c / boost::math::pow<5>(s, pol); } case 5: { - T c2 = boost::math::cos_pi(2 * x); - T c4 = boost::math::cos_pi(4 * x); - return -2 * boost::math::pow<5>(constants::pi()) *(26 * c2 + c4 + 33) / boost::math::pow<6>(s); + T c2 = boost::math::cos_pi(2 * x, pol); + T c4 = boost::math::cos_pi(4 * x, pol); + return -2 * boost::math::pow<5>(constants::pi(), pol) *(26 * c2 + c4 + 33) / boost::math::pow<6>(s, pol); } case 6: { - T c = boost::math::cos_pi(x); - T c2 = boost::math::cos_pi(2 * x); - T c4 = boost::math::cos_pi(4 * x); - return 4 * boost::math::pow<6>(constants::pi()) * (56 * c2 + c4 + 123) * c / boost::math::pow<7>(s); + T c = boost::math::cos_pi(x, pol); + T c2 = boost::math::cos_pi(2 * x, pol); + T c4 = boost::math::cos_pi(4 * x, pol); + return 4 * boost::math::pow<6>(constants::pi(), pol) * (56 * c2 + c4 + 123) * c / boost::math::pow<7>(s, pol); } case 7: { - T c2 = boost::math::cos_pi(2 * x); - T c4 = boost::math::cos_pi(4 * x); - T c6 = boost::math::cos_pi(6 * x); - return -2 * boost::math::pow<7>(constants::pi()) * (1191 * c2 + 120 * c4 + c6 + 1208) / boost::math::pow<8>(s); + T c2 = boost::math::cos_pi(2 * x, pol); + T c4 = boost::math::cos_pi(4 * x, pol); + T c6 = boost::math::cos_pi(6 * x, pol); + return -2 * boost::math::pow<7>(constants::pi(), pol) * (1191 * c2 + 120 * c4 + c6 + 1208) / boost::math::pow<8>(s, pol); } case 8: { - T c = boost::math::cos_pi(x); - T c3 = boost::math::cos_pi(3 * x); - T c5 = boost::math::cos_pi(5 * x); - T c7 = boost::math::cos_pi(7 * x); - return 2 * boost::math::pow<8>(constants::pi()) * (15619 * c + 4293 * c3 + 247 * c5 + c7) / boost::math::pow<9>(s); + T c = boost::math::cos_pi(x, pol); + T c3 = boost::math::cos_pi(3 * x, pol); + T c5 = boost::math::cos_pi(5 * x, pol); + T c7 = boost::math::cos_pi(7 * x, pol); + return 2 * boost::math::pow<8>(constants::pi(), pol) * (15619 * c + 4293 * c3 + 247 * c5 + c7) / boost::math::pow<9>(s, pol); } case 9: { - T c2 = boost::math::cos_pi(2 * x); - T c4 = boost::math::cos_pi(4 * x); - T c6 = boost::math::cos_pi(6 * x); - T c8 = boost::math::cos_pi(8 * x); - return -2 * boost::math::pow<9>(constants::pi()) * (88234 * c2 + 14608 * c4 + 502 * c6 + c8 + 78095) / boost::math::pow<10>(s); + T c2 = boost::math::cos_pi(2 * x, pol); + T c4 = boost::math::cos_pi(4 * x, pol); + T c6 = boost::math::cos_pi(6 * x, pol); + T c8 = boost::math::cos_pi(8 * x, pol); + return -2 * boost::math::pow<9>(constants::pi(), pol) * (88234 * c2 + 14608 * c4 + 502 * c6 + c8 + 78095) / boost::math::pow<10>(s, pol); } case 10: { - T c = boost::math::cos_pi(x); - T c3 = boost::math::cos_pi(3 * x); - T c5 = boost::math::cos_pi(5 * x); - T c7 = boost::math::cos_pi(7 * x); - T c9 = boost::math::cos_pi(9 * x); - return 2 * boost::math::pow<10>(constants::pi()) * (1310354 * c + 455192 * c3 + 47840 * c5 + 1013 * c7 + c9) / boost::math::pow<11>(s); + T c = boost::math::cos_pi(x, pol); + T c3 = boost::math::cos_pi(3 * x, pol); + T c5 = boost::math::cos_pi(5 * x, pol); + T c7 = boost::math::cos_pi(7 * x, pol); + T c9 = boost::math::cos_pi(9 * x, pol); + return 2 * boost::math::pow<10>(constants::pi(), pol) * (1310354 * c + 455192 * c3 + 47840 * c5 + 1013 * c7 + c9) / boost::math::pow<11>(s, pol); } case 11: { - T c2 = boost::math::cos_pi(2 * x); - T c4 = boost::math::cos_pi(4 * x); - T c6 = boost::math::cos_pi(6 * x); - T c8 = boost::math::cos_pi(8 * x); - T c10 = boost::math::cos_pi(10 * x); - return -2 * boost::math::pow<11>(constants::pi()) * (7862124 + 9738114 * c2 + 2203488 * c4 + 152637 * c6 + 2036 * c8 + c10) / boost::math::pow<12>(s); + T c2 = boost::math::cos_pi(2 * x, pol); + T c4 = boost::math::cos_pi(4 * x, pol); + T c6 = boost::math::cos_pi(6 * x, pol); + T c8 = boost::math::cos_pi(8 * x, pol); + T c10 = boost::math::cos_pi(10 * x, pol); + return -2 * boost::math::pow<11>(constants::pi(), pol) * (7862124 + 9738114 * c2 + 2203488 * c4 + 152637 * c6 + 2036 * c8 + c10) / boost::math::pow<12>(s, pol); } case 12: { - T c = boost::math::cos_pi(x); - T c3 = boost::math::cos_pi(3 * x); - T c5 = boost::math::cos_pi(5 * x); - T c7 = boost::math::cos_pi(7 * x); - T c9 = boost::math::cos_pi(9 * x); - T c11 = boost::math::cos_pi(11 * x); - return 2 * boost::math::pow<12>(constants::pi()) * (162512286 * c + 66318474 * c3 + 10187685 * c5 + 478271 * c7 + 4083 * c9 + c11) / boost::math::pow<13>(s); + T c = boost::math::cos_pi(x, pol); + T c3 = boost::math::cos_pi(3 * x, pol); + T c5 = boost::math::cos_pi(5 * x, pol); + T c7 = boost::math::cos_pi(7 * x, pol); + T c9 = boost::math::cos_pi(9 * x, pol); + T c11 = boost::math::cos_pi(11 * x, pol); + return 2 * boost::math::pow<12>(constants::pi(), pol) * (162512286 * c + 66318474 * c3 + 10187685 * c5 + 478271 * c7 + 4083 * c9 + c11) / boost::math::pow<13>(s, pol); } case 13: { - T c2 = boost::math::cos_pi(2 * x); - T c4 = boost::math::cos_pi(4 * x); - T c6 = boost::math::cos_pi(6 * x); - T c8 = boost::math::cos_pi(8 * x); - T c10 = boost::math::cos_pi(10 * x); - T c12 = boost::math::cos_pi(12 * x); - return -2 * boost::math::pow<13>(constants::pi()) * (1137586002 + 1505621508 * c2 + 423281535 * c4 + 45533450 * c6 + 1479726 * c8 + 8178 * c10 + c12) / boost::math::pow<14>(s); + T c2 = boost::math::cos_pi(2 * x, pol); + T c4 = boost::math::cos_pi(4 * x, pol); + T c6 = boost::math::cos_pi(6 * x, pol); + T c8 = boost::math::cos_pi(8 * x, pol); + T c10 = boost::math::cos_pi(10 * x, pol); + T c12 = boost::math::cos_pi(12 * x, pol); + return -2 * boost::math::pow<13>(constants::pi(), pol) * (1137586002 + 1505621508 * c2 + 423281535 * c4 + 45533450 * c6 + 1479726 * c8 + 8178 * c10 + c12) / boost::math::pow<14>(s, pol); } +#ifndef BOOST_NO_LONG_LONG case 14: { - T c = boost::math::cos_pi(x); - T c3 = boost::math::cos_pi(3 * x); - T c5 = boost::math::cos_pi(5 * x); - T c7 = boost::math::cos_pi(7 * x); - T c9 = boost::math::cos_pi(9 * x); - T c11 = boost::math::cos_pi(11 * x); - T c13 = boost::math::cos_pi(13 * x); - return 2 * boost::math::pow<14>(constants::pi()) * (27971176092 * c + 12843262863 * c3 + 2571742175 * c5 + 198410786 * c7 + 4537314 * c9 + 16369 * c11 + c13) / boost::math::pow<15>(s); + T c = boost::math::cos_pi(x, pol); + T c3 = boost::math::cos_pi(3 * x, pol); + T c5 = boost::math::cos_pi(5 * x, pol); + T c7 = boost::math::cos_pi(7 * x, pol); + T c9 = boost::math::cos_pi(9 * x, pol); + T c11 = boost::math::cos_pi(11 * x, pol); + T c13 = boost::math::cos_pi(13 * x, pol); + return 2 * boost::math::pow<14>(constants::pi(), pol) * (27971176092uLL * c + 12843262863uLL * c3 + 2571742175uLL * c5 + 198410786 * c7 + 4537314 * c9 + 16369 * c11 + c13) / boost::math::pow<15>(s, pol); } case 15: { - return -2 * boost::math::pow<15>(constants::pi()) * - (223769408736 + 311387598411 * boost::math::cos_pi(2 * x) - + 102776998928 * boost::math::cos_pi(4 * x) - + 15041229521 * boost::math::cos_pi(6 * x) - + 848090912 * boost::math::cos_pi(8 * x) - + 13824739 * boost::math::cos_pi(10 * x) - + 32752 * boost::math::cos_pi(12 * x) - + boost::math::cos_pi(14 * x)) / boost::math::pow<16>(s); + return -2 * boost::math::pow<15>(constants::pi(), pol) * + (223769408736uLL + 311387598411uLL * boost::math::cos_pi(2 * x, pol) + + 102776998928uLL * boost::math::cos_pi(4 * x, pol) + + 15041229521uLL * boost::math::cos_pi(6 * x, pol) + + 848090912 * boost::math::cos_pi(8 * x, pol) + + 13824739 * boost::math::cos_pi(10 * x, pol) + + 32752 * boost::math::cos_pi(12 * x, pol) + + boost::math::cos_pi(14 * x, pol)) / boost::math::pow<16>(s, pol); } case 16: { - return 2 * boost::math::pow<16>(constants::pi()) * - (6382798925475 * boost::math::cos_pi(x) - + 3207483178157 * boost::math::cos_pi(3 * x) - + 782115518299 * boost::math::cos_pi(5 * x) - + 85383238549 * boost::math::cos_pi(7 * x) - + 3572085255 * boost::math::cos_pi(9 * x) - + 41932745 * boost::math::cos_pi(11 * x) - + 65519 * boost::math::cos_pi(13 * x) - + boost::math::cos_pi(15 * x)) / boost::math::pow<17>(s); + return 2 * boost::math::pow<16>(constants::pi(), pol) * + (6382798925475uLL * boost::math::cos_pi(x, pol) + + 3207483178157uLL * boost::math::cos_pi(3 * x, pol) + + 782115518299uLL * boost::math::cos_pi(5 * x, pol) + + 85383238549uLL * boost::math::cos_pi(7 * x, pol) + + 3572085255uLL * boost::math::cos_pi(9 * x, pol) + + 41932745 * boost::math::cos_pi(11 * x, pol) + + 65519 * boost::math::cos_pi(13 * x, pol) + + boost::math::cos_pi(15 * x, pol)) / boost::math::pow<17>(s, pol); } case 17: { - return -2 * boost::math::pow<17>(constants::pi()) * - (57445190329275 + 83137223185370 * boost::math::cos_pi(2 * x) - + 31055652948388 * boost::math::cos_pi(4 * x) - + 5717291972382 * boost::math::cos_pi(6 * x) - + 473353301060 * boost::math::cos_pi(8 * x) - + 14875399450 * boost::math::cos_pi(10 * x) - + 126781020 * boost::math::cos_pi(12 * x) - + 131054 * boost::math::cos_pi(14 * x) - + boost::math::cos_pi(16 * x)) / boost::math::pow<18>(s); + return -2 * boost::math::pow<17>(constants::pi(), pol) * + (57445190329275uLL + 83137223185370uLL * boost::math::cos_pi(2 * x, pol) + + 31055652948388uLL * boost::math::cos_pi(4 * x, pol) + + 5717291972382uLL * boost::math::cos_pi(6 * x, pol) + + 473353301060uLL * boost::math::cos_pi(8 * x, pol) + + 14875399450uLL * boost::math::cos_pi(10 * x, pol) + + 126781020 * boost::math::cos_pi(12 * x, pol) + + 131054 * boost::math::cos_pi(14 * x, pol) + + boost::math::cos_pi(16 * x, pol)) / boost::math::pow<18>(s, pol); } case 18: { - return 2 * boost::math::pow<18>(constants::pi()) * - (1865385657780650 * boost::math::cos_pi(x) - + 1006709967915228 * boost::math::cos_pi(3 * x) - + 285997074307300 * boost::math::cos_pi(5 * x) - + 40457344748072 * boost::math::cos_pi(7 * x) - + 2575022097600 * boost::math::cos_pi(9 * x) - + 61403313100 * boost::math::cos_pi(11 * x) - + 382439924 * boost::math::cos_pi(13 * x) - + 262125 * boost::math::cos_pi(15 * x) - + boost::math::cos_pi(17 * x)) / boost::math::pow<19>(s); + return 2 * boost::math::pow<18>(constants::pi(), pol) * + (1865385657780650uLL * boost::math::cos_pi(x, pol) + + 1006709967915228uLL * boost::math::cos_pi(3 * x, pol) + + 285997074307300uLL * boost::math::cos_pi(5 * x, pol) + + 40457344748072uLL * boost::math::cos_pi(7 * x, pol) + + 2575022097600uLL * boost::math::cos_pi(9 * x, pol) + + 61403313100uLL * boost::math::cos_pi(11 * x, pol) + + 382439924 * boost::math::cos_pi(13 * x, pol) + + 262125 * boost::math::cos_pi(15 * x, pol) + + boost::math::cos_pi(17 * x, pol)) / boost::math::pow<19>(s, pol); } case 19: { - return -2 * boost::math::pow<19>(constants::pi()) * - (18653856577806500 + 27862280567093358 * boost::math::cos_pi(2 * x) - + 11485644635009424 * boost::math::cos_pi(4 * x) - + 2527925001876036 * boost::math::cos_pi(6 * x) - + 278794377854832 * boost::math::cos_pi(8 * x) - + 13796160184500 * boost::math::cos_pi(10 * x) - + 251732291184 * boost::math::cos_pi(12 * x) - + 1151775897 * boost::math::cos_pi(14 * x) - + 524268 * boost::math::cos_pi(16 * x) - + boost::math::cos_pi(18 * x)) / boost::math::pow<20>(s); + return -2 * boost::math::pow<19>(constants::pi(), pol) * + (18653856577806500uLL + 27862280567093358uLL * boost::math::cos_pi(2 * x, pol) + + 11485644635009424uLL * boost::math::cos_pi(4 * x, pol) + + 2527925001876036uLL * boost::math::cos_pi(6 * x, pol) + + 278794377854832uLL * boost::math::cos_pi(8 * x, pol) + + 13796160184500uLL * boost::math::cos_pi(10 * x, pol) + + 251732291184uLL * boost::math::cos_pi(12 * x, pol) + + 1151775897uLL * boost::math::cos_pi(14 * x, pol) + + 524268 * boost::math::cos_pi(16 * x, pol) + + boost::math::cos_pi(18 * x, pol)) / boost::math::pow<20>(s, pol); } case 20: { - return 2 * boost::math::pow<20>(constants::pi()) * - (679562217794156938 * boost::math::cos_pi(x) - + 388588260723953310 * boost::math::cos_pi(3 * x) - + 124748182104463860 * boost::math::cos_pi(5 * x) - + 21598596303099900 * boost::math::cos_pi(7 * x) - + 1879708669896492 * boost::math::cos_pi(9 * x) - + 73008517581444 * boost::math::cos_pi(11 * x) - + 1026509354985 * boost::math::cos_pi(13 * x) - + 3464764515 * boost::math::cos_pi(15 * x) - + 1048555 * boost::math::cos_pi(17 * x) - + boost::math::cos_pi(19 * x)) / boost::math::pow<21>(s); + return 2 * boost::math::pow<20>(constants::pi(), pol) * + (679562217794156938uLL * boost::math::cos_pi(x, pol) + + 388588260723953310uLL * boost::math::cos_pi(3 * x, pol) + + 124748182104463860uLL * boost::math::cos_pi(5 * x, pol) + + 21598596303099900uLL * boost::math::cos_pi(7 * x, pol) + + 1879708669896492uLL * boost::math::cos_pi(9 * x, pol) + + 73008517581444uLL * boost::math::cos_pi(11 * x, pol) + + 1026509354985uLL * boost::math::cos_pi(13 * x, pol) + + 3464764515uLL * boost::math::cos_pi(15 * x, pol) + + 1048555 * boost::math::cos_pi(17 * x, pol) + + boost::math::cos_pi(19 * x, pol)) / boost::math::pow<21>(s, pol); } case 21: { - return -2 * boost::math::pow<21>(constants::pi()) * - (7475184395735726318 + 11458681306629009100 * boost::math::cos_pi(2 * x) - + 5119020713873609970 * boost::math::cos_pi(4 * x) - + 1300365805079109480 * boost::math::cos_pi(6 * x) - + 179385804170146680 * boost::math::cos_pi(8 * x) - + 12446388300682056 * boost::math::cos_pi(10 * x) - + 382493246941965 * boost::math::cos_pi(12 * x) - + 4168403181210 * boost::math::cos_pi(14 * x) - + 10414216090 * boost::math::cos_pi(16 * x) - + 2097130 * boost::math::cos_pi(18 * x) - + boost::math::cos_pi(20 * x)) / boost::math::pow<22>(s); + return -2 * boost::math::pow<21>(constants::pi(), pol) * + (7475184395735726318uLL + 11458681306629009100uLL * boost::math::cos_pi(2 * x, pol) + + 5119020713873609970uLL * boost::math::cos_pi(4 * x, pol) + + 1300365805079109480uLL * boost::math::cos_pi(6 * x, pol) + + 179385804170146680uLL * boost::math::cos_pi(8 * x, pol) + + 12446388300682056uLL * boost::math::cos_pi(10 * x, pol) + + 382493246941965uLL * boost::math::cos_pi(12 * x, pol) + + 4168403181210uLL * boost::math::cos_pi(14 * x, pol) + + 10414216090uLL * boost::math::cos_pi(16 * x, pol) + + 2097130 * boost::math::cos_pi(18 * x, pol) + + boost::math::cos_pi(20 * x, pol)) / boost::math::pow<22>(s, pol); } +#endif } // @@ -515,7 +519,7 @@ // for(unsigned j = 0; j < table[index].size(); ++j) { - sum += table[index][j] * boost::math::cos_pi(x * power); + sum += table[index][j] * boost::math::cos_pi(x * power, pol); power += 2; } if(sum == 0) diff --git a/test/float128/test_polygamma.cpp b/test/float128/test_polygamma.cpp index 37d2f778b..4debc41a9 100644 --- a/test/float128/test_polygamma.cpp +++ b/test/float128/test_polygamma.cpp @@ -15,13 +15,20 @@ void expected_results() // Define the max and mean errors expected for // various compilers and platforms. // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*bug cases.*", // test data group + ".*", 100000, 40000); // test function add_expected_result( ".*", // compiler ".*", // stdlib ".*", // platform ".*", // test type(s) ".*", // test data group - ".*", 350, 100); // test function + ".*", 350, 100); // test function // // Finish off by printing out the compiler/stdlib/platform names, // we do this to make it easier to mark up expected error rates. diff --git a/test/test_polygamma.cpp b/test/test_polygamma.cpp index e6037367e..7c0ec3b78 100644 --- a/test/test_polygamma.cpp +++ b/test/test_polygamma.cpp @@ -40,7 +40,18 @@ void expected_results() ".*", // platform largest_type, // test type(s) ".*negative.*", // test data group - ".*", 1400, 500); // test function + ".*", 4000, 1000); // test function + if((std::numeric_limits::digits > std::numeric_limits::digits) + && (std::numeric_limits::digits - std::numeric_limits::digits < 20)) + { + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + "double", // test type(s) + ".*bug cases.*", // test data group + ".*", 100, 30); // test function + } add_expected_result( ".*", // compiler ".*", // stdlib diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 491271fdc..bb053ea20 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -137,7 +137,7 @@ void test_polygamma(T, const char* name) } }; do_test_polygamma(big_data, name, "Mathematica Data - large arguments"); - boost::array, 399> neg_data = + boost::array, 471> neg_data = { { { 1, SC_(-12.750), SC_(19.663772856722737612034697464751605) }, { 1, SC_(-12.250), SC_(19.660817549236368273654684043826967) }, { 1, SC_(-11.750), SC_(19.657621376522814505537196503582823) }, { 1, SC_(-11.250), SC_(19.654153659190554029589711115880278) }, { 1, SC_(-10.750), SC_(19.650378280099093364749509767503149) }, { 1, SC_(-10.250), SC_(19.646252424622652795021809881312377) }, { 1, SC_(-9.7500), SC_(19.641724953976865133273035997897957) }, { 1, SC_(-9.2500), SC_(19.636734280660725370869519577921538) }, { 1, SC_(-8.7500), SC_(19.631205558842085383108670448917024) }, { 1, SC_(-8.2500), SC_(19.625046917622010980803778160828770) }, { 1, SC_(-7.7500), SC_(19.618144334352289464741323510141514) }, { 1, SC_(-7.2500), SC_(19.610354539293269015698176691590937) }, { 1, SC_(-6.7500), SC_(19.601495010731061577124257953429755) }, { 1, SC_(-6.2500), SC_(19.591329569019785068016844943671793) }, { 1, SC_(-5.7500), SC_(19.579547136931335925546754524074474) }, { 1, SC_(-5.2500), SC_(19.565729569019785068016844943671793) }, { 1, SC_(-4.7500), SC_(19.549301390239464469970194977760674) }, { 1, SC_(-4.2500), SC_(19.529448389881463072551992335962043) }, { 1, SC_(-3.7500), SC_(19.504980060599575273294294700752364) }, { 1, SC_(-3.2500), SC_(19.474085068082155114074483685443011) }, { 1, SC_(-2.7500), SC_(19.433868949488464162183183589641253) }, { 1, SC_(-2.2500), SC_(19.379410511869137362595193744614609) }, { 1, SC_(-1.7500), SC_(19.301637544529786476232770366500757) }, { 1, SC_(-1.2500), SC_(19.181879647671606498397662880417078) }, { 1, SC_(-0.75000), SC_(18.975106932284888517049096897113002) }, { 1, SC_(-0.25000), SC_(18.541879647671606498397662880417078) }, { 2, SC_(-12.750), SC_(-124.03079461415823384604153251543681) }, { 2, SC_(-12.250), SC_(124.01896466745858356132308878716344) }, { 2, SC_(-11.750), SC_(-124.03175955222881001960976796032603) }, { 2, SC_(-11.250), SC_(124.01787668541028735821044014586602) }, { 2, SC_(-10.750), SC_(-124.03299241970518808612682102178640) }, { 2, SC_(-10.250), SC_(124.01647202148710491650947992638728) }, { 2, SC_(-9.7500), SC_(-124.03460234084420729198290916496876) }, { 2, SC_(-9.2500), SC_(124.01461482266526541911391108670126) }, { 2, SC_(-8.7500), SC_(-124.03676016548723903560636876475972) }, { 2, SC_(-8.2500), SC_(124.01208782525148933477537240192445) }, { 2, SC_(-7.7500), SC_(-124.03974558822776381694747663647984) }, { 2, SC_(-7.2500), SC_(124.00852603656573370687098416695770) }, { 2, SC_(-6.7500), SC_(-124.04404218787195165891317097369578) }, { 2, SC_(-6.2500), SC_(124.00327776890408296268303058132483) }, { 2, SC_(-5.7500), SC_(-124.05054526159038888901020902683808) }, { 2, SC_(-5.2500), SC_(123.99508576890408296268303058132483) }, { 2, SC_(-4.7500), SC_(-124.06106552130930069964553408642549) }, { 2, SC_(-4.2500), SC_(123.98126436732757934536308673076874) }, { 2, SC_(-3.7500), SC_(-124.07972713378925404561433420306057) }, { 2, SC_(-3.2500), SC_(123.95521103942202265902072971875978) }, { 2, SC_(-2.7500), SC_(-124.11765305971517997154026012898649) }, { 2, SC_(-2.2500), SC_(123.89694977406016558118732052440384) }, { 2, SC_(-1.7500), SC_(-124.21382135423058192495874247308867) }, { 2, SC_(-1.2500), SC_(123.72136678366236036856729308956159) }, { 2, SC_(-0.75000), SC_(-124.58699919679617959259722643810325) }, { 2, SC_(-0.25000), SC_(122.69736678366236036856729308956159) }, @@ -158,8 +158,8 @@ void test_polygamma(T, const char* name) { SC_(3.0), SC_(-4.75), SC_(1558.5318783056006283387768251220856) }, { SC_(4.0), SC_(-4.75), SC_(-24481.582451925002662084791450344735) }, { SC_(5.0), SC_(-4.75), SC_(492231.26135104955223808370232711841) }, { SC_(6.0), SC_(-4.75), SC_(-1.1791224766632825018904254258839318e7) }, { SC_(7.0), SC_(-4.75), SC_(3.3035269584947086190323815702711063e8) }, { SC_(8.0), SC_(-4.75), SC_(-1.0569114259674567879524502974422220e10) }, { SC_(9.0), SC_(-4.75), SC_(3.8051374324232805216534792821594812e11) }, { SC_(10.0), SC_(-4.75), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(11.0), SC_(-4.75), SC_(6.6969403856797200883878751610651220e14) }, { SC_(12.0), SC_(-4.75), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(13.0), SC_(-4.75), SC_(1.6715535177261375554006502097069245e18) }, { SC_(14.0), SC_(-4.75), SC_(-9.3606970885707978200117071697879591e19) }, { SC_(15.0), SC_(-4.75), SC_(5.6164187748870728746282195405281448e21) }, { SC_(16.0), SC_(-4.75), SC_(-3.5945079045721164734032997263075953e23) }, { SC_(17.0), SC_(-4.75), SC_(2.4442654003427929640663758934254941e25) }, { SC_(18.0), SC_(-4.75), SC_(-1.7598710821897274459494051446575390e27) }, { SC_(19.0), SC_(-4.75), SC_(1.3375020239985042298043467743154361e29) }, { SC_(20.0), SC_(-4.75), SC_(-1.0700016187896297695358366297508349e31) }, { SC_(21.0), SC_(-4.75), SC_(8.9880135989785359476536358804280906e32) }, { SC_(22.0), SC_(-4.75), SC_(-7.9094519667650484338896180683559907e34) }, { SC_(23.0), SC_(-4.75), SC_(7.2766958095269026379022334905108714e36) }, { SC_(1.0), SC_(-9.5), SC_(9.7696874450302318856305468284306792)}, { SC_(3.0), SC_(-9.5), SC_(194.81619198176773011863271713047162) }, { SC_(5.0), SC_(-9.5), SC_(15382.226860156995915624995579131219) }, { SC_(7.0), SC_(-9.5), SC_(2.5808804363008334969805587475917565e6) }, { SC_(9.0), SC_(-9.5), SC_(7.4319090477015599086877150154313919e8) }, { SC_(11.0), SC_(-9.5), SC_(3.2699904226951756570017589463296126e11) }, { SC_(13.0), SC_(-9.5), SC_(2.0404706026930390078103975418992502e14) }, { SC_(15.0), SC_(-9.5), SC_(1.7139949874533303450398622617829339e17) }, { SC_(17.0), SC_(-9.5), SC_(1.8648265078298896515398973583300966e20) }, { SC_(19.0), SC_(-9.5), SC_(2.5510826568574986072623191304028880e23) }, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(2.0), SC_(-9.5), SC_(-0.0099751442477151692853059194570941025) }, { SC_(4.0), SC_(-9.5), SC_(-0.00059506011900940675655749713967447346) }, { SC_(6.0), SC_(-9.5), SC_(-0.00011794286977626608581527674104044053) }, { SC_(8.0), SC_(-9.5), SC_(-0.000048934615584055214532361558113243801) }, { SC_(10.0), SC_(-9.5), SC_(-0.000034696555222805555969152083201249795) }, { SC_(12.0), SC_(-9.5), SC_(-0.000037470635416758472254487967117333555) }, { SC_(14.0), SC_(-9.5), SC_(-0.000057218576281198884425118075685027774) }, { SC_(16.0), SC_(-9.5), SC_(-0.00011728023376485851827598955099805232) }, { SC_(18.0), SC_(-9.5), SC_(-0.00031049110045758006635527458576736345) }, { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932) }, - { SC_(2.0), SC_(-9.5367431640625e-7), SC_(2.3058430092136939495958800005662742e18) }, { SC_(2.0), SC_(-5.960464477539063e-8), SC_(9.4447329657392904273895958858066118e21) }, { SC_(2.0), SC_(-3.725290298461914e-9), SC_(3.8685626227668133590597629595886169e25) }, { SC_(2.0), SC_(-2.3283064365386963e-10), SC_(1.5845632502852867518708790066959589e29) }, { SC_(2.0), SC_(-1.4551915228366852e-11), SC_(6.4903710731685345356631204115250960e32) }, { SC_(2.0), SC_(-9.094947017729282e-13), SC_(2.6584559915698317458076141205606891e36) }, { SC_(2.0), SC_(-5.684341886080802e-14), SC_(1.0889035741470030830827987437816583e40) }, { SC_(2.0), SC_(-3.552713678800501e-15), SC_(4.4601490397061246283071436545296723e43) }, { SC_(2.0), SC_(-2.220446049250313e-16), SC_(1.8268770466636286477546060408953538e47) }, { SC_(2.0), SC_(-1.3877787807814457e-17), SC_(7.4828883831342229412028663435073691e50) }, { SC_(2.0), SC_(-8.673617379884035e-19), SC_(3.0649910817317777167166940543006184e54) }, { SC_(2.0), SC_(-5.421010862427522e-20), SC_(1.2554203470773361527671578846415333e58) }, { SC_(2.0), SC_(-3.3881317890172014e-21), SC_(5.1422017416287688817342786954917203e61) }, - { SC_(3.0), SC_(-9.5367431640625e-7), SC_(7.2535549176877750482370624939631357e24) }, { SC_(3.0), SC_(-5.960464477539063e-8), SC_(4.7536897508558602556126370202249394e29) }, { SC_(3.0), SC_(-3.725290298461914e-9), SC_(3.1153781151208965771182977975320582e34) }, { SC_(3.0), SC_(-2.3283064365386963e-10), SC_(2.0416942015256307807802476445906093e39) }, { SC_(3.0), SC_(-1.4551915228366852e-11), SC_(1.3380447119118373884921430963589017e44) }, { SC_(3.0), SC_(-9.094947017729282e-13), SC_(8.7690098239854175092221089962976981e48) }, { SC_(3.0), SC_(-5.684341886080802e-14), SC_(5.7468582782470832188438013518136594e53) }, { SC_(3.0), SC_(-3.552713678800501e-15), SC_(3.7662610412320084583014736539245998e58) }, { SC_(3.0), SC_(-2.220446049250313e-16), SC_(2.4682568359818090632324537738360258e63) }, { SC_(3.0), SC_(-1.3877787807814457e-17), SC_(1.6175968000290383876800209052211778e68) }, { SC_(3.0), SC_(-8.673617379884035e-19), SC_(1.0601082388670305977499785004457511e73) }, { SC_(3.0), SC_(-5.421010862427522e-20), SC_(6.9475253542389717254142591005212745e77) }, { SC_(3.0), SC_(-3.3881317890172014e-21), SC_(4.5531302161540525099674888441176224e82) }, + { SC_(2.0), SC_(-9.5367431640625000000000000000000000e-7), SC_(2.3058430092136939495958800005662742e18) }, { SC_(2.0), SC_(-4.7683715820312500000000000000000000e-7), SC_(1.8446744073709551613595883097126372e19) }, { SC_(2.0), SC_(-2.3841857910156250000000000000000000e-7), SC_(1.4757395258967641292559588464540430e20) }, { SC_(2.0), SC_(-1.1920928955078125000000000000000000e-7), SC_(1.1805916207174113034215958854195427e21) }, { SC_(2.0), SC_(-5.9604644775390625000000000000000000e-8), SC_(9.4447329657392904273895958858066118e21) }, { SC_(2.0), SC_(-2.9802322387695312500000000000000000e-8), SC_(7.5557863725914323419133595886000146e22) }, { SC_(2.0), SC_(-1.4901161193847656250000000000000000e-8), SC_(6.0446290980731458735308559588609691e23) }, { SC_(2.0), SC_(-7.4505805969238281250000000000000000e-9), SC_(4.8357032784585166988247015958861453e24) }, { SC_(2.0), SC_(-3.7252902984619140625000000000000000e-9), SC_(3.8685626227668133590597629595886169e25) }, { SC_(2.0), SC_(-1.8626451492309570312500000000000000e-9), SC_(3.0948500982134506872478105359588618e26) }, { SC_(2.0), SC_(-9.3132257461547851562500000000000000e-10), SC_(2.4758800785707605497982484455958862e27) }, { SC_(2.0), SC_(-4.6566128730773925781250000000000000e-10), SC_(1.9807040628566084398385987581595886e28) }, { SC_(2.0), SC_(-2.3283064365386962890625000000000000e-10), SC_(1.5845632502852867518708790066959589e29) }, { SC_(2.0), SC_(-1.1641532182693481445312500000000000e-10), SC_(1.2676506002282294014967032053735959e30) }, { SC_(2.0), SC_(-5.8207660913467407226562500000000000e-11), SC_(1.0141204801825835211973625643005596e31) }, { SC_(2.0), SC_(-2.9103830456733703613281250000000000e-11), SC_(8.1129638414606681695789005144061596e31) }, { SC_(2.0), SC_(-1.4551915228366851806640625000000000e-11), SC_(6.4903710731685345356631204115250960e32) }, { SC_(2.0), SC_(-7.2759576141834259033203125000000000e-12), SC_(5.1922968585348276285304963292200936e33) }, { SC_(2.0), SC_(-3.6379788070917129516601562500000000e-12), SC_(4.1538374868278621028243970633760766e34) }, { SC_(2.0), SC_(-1.8189894035458564758300781250000000e-12), SC_(3.3230699894622896822595176507008614e35) }, { SC_(2.0), SC_(-9.0949470177292823791503906250000000e-13), SC_(2.6584559915698317458076141205606891e36) }, { SC_(2.0), SC_(-4.5474735088646411895751953125000000e-13), SC_(2.1267647932558653966460912964485513e37) }, { SC_(2.0), SC_(-2.2737367544323205947875976562500000e-13), SC_(1.7014118346046923173168730371588411e38) }, { SC_(2.0), SC_(-1.1368683772161602973937988281250000e-13), SC_(1.3611294676837538538534984297270728e39) }, { SC_(2.0), SC_(-5.6843418860808014869689941406250000e-14), SC_(1.0889035741470030830827987437816583e40) }, { SC_(2.0), SC_(-2.8421709430404007434844970703125000e-14), SC_(8.7112285931760246646623899502532662e40) }, { SC_(2.0), SC_(-1.4210854715202003717422485351562500e-14), SC_(6.9689828745408197317299119602026130e41) }, { SC_(2.0), SC_(-7.1054273576010018587112426757812500e-15), SC_(5.5751862996326557853839295681620904e42) }, { SC_(2.0), SC_(-3.5527136788005009293556213378906250e-15), SC_(4.4601490397061246283071436545296723e43) }, { SC_(2.0), SC_(-1.7763568394002504646778106689453125e-15), SC_(3.5681192317648997026457149236237378e44) }, { SC_(2.0), SC_(-8.8817841970012523233890533447265625e-16), SC_(2.8544953854119197621165719388989903e45) }, { SC_(2.0), SC_(-4.4408920985006261616945266723632812e-16), SC_(2.2835963083295358096932575511191922e46) }, { SC_(2.0), SC_(-2.2204460492503130808472633361816406e-16), SC_(1.8268770466636286477546060408953538e47) }, { SC_(2.0), SC_(-1.1102230246251565404236316680908203e-16), SC_(1.4615016373309029182036848327162830e48) }, { SC_(2.0), SC_(-5.5511151231257827021181583404541016e-17), SC_(1.1692013098647223345629478661730264e49) }, { SC_(2.0), SC_(-2.7755575615628913510590791702270508e-17), SC_(9.3536104789177786765035829293842113e49) }, { SC_(2.0), SC_(-1.3877787807814456755295395851135254e-17), SC_(7.4828883831342229412028663435073691e50) }, { SC_(2.0), SC_(-6.9388939039072283776476979255676270e-18), SC_(5.9863107065073783529622930748058952e51) }, { SC_(2.0), SC_(-3.4694469519536141888238489627838135e-18), SC_(4.7890485652059026823698344598447162e52) }, { SC_(2.0), SC_(-1.7347234759768070944119244813919067e-18), SC_(3.8312388521647221458958675678757730e53) }, { SC_(2.0), SC_(-8.6736173798840354720596224069595337e-19), SC_(3.0649910817317777167166940543006184e54) }, { SC_(2.0), SC_(-4.3368086899420177360298112034797668e-19), SC_(2.4519928653854221733733552434404947e55) }, { SC_(2.0), SC_(-2.1684043449710088680149056017398834e-19), SC_(1.9615942923083377386986841947523958e56) }, { SC_(2.0), SC_(-1.0842021724855044340074528008699417e-19), SC_(1.5692754338466701909589473558019166e57) }, { SC_(2.0), SC_(-5.4210108624275221700372640043497086e-20), SC_(1.2554203470773361527671578846415333e58) }, { SC_(2.0), SC_(-2.7105054312137610850186320021748543e-20), SC_(1.0043362776618689222137263077132266e59) }, { SC_(2.0), SC_(-1.3552527156068805425093160010874271e-20), SC_(8.0346902212949513777098104617058130e59) }, { SC_(2.0), SC_(-6.7762635780344027125465800054371357e-21), SC_(6.4277521770359611021678483693646504e60) }, { SC_(2.0), SC_(-3.3881317890172013562732900027185678e-21), SC_(5.1422017416287688817342786954917203e61) }, + { SC_(3.0), SC_(-9.5367431640625000000000000000000000e-7), SC_(7.2535549176877750482370624939631357e24) }, { SC_(3.0), SC_(-4.7683715820312500000000000000000000e-7), SC_(1.1605687868300440077179290249395127e26) }, { SC_(3.0), SC_(-2.3841857910156250000000000000000000e-7), SC_(1.8569100589280704123486863424939453e27) }, { SC_(3.0), SC_(-1.1920928955078125000000000000000000e-7), SC_(2.9710560942849126597578981382493942e28) }, { SC_(3.0), SC_(-5.9604644775390625000000000000000000e-8), SC_(4.7536897508558602556126370202249394e29) }, { SC_(3.0), SC_(-2.9802322387695312500000000000000000e-8), SC_(7.6059036013693764089802192322624939e30) }, { SC_(3.0), SC_(-1.4901161193847656250000000000000000e-8), SC_(1.2169445762191002254368350771610249e32) }, { SC_(3.0), SC_(-7.4505805969238281250000000000000000e-9), SC_(1.9471113219505603606989361234575425e33) }, { SC_(3.0), SC_(-3.7252902984619140625000000000000000e-9), SC_(3.1153781151208965771182977975320582e34) }, { SC_(3.0), SC_(-1.8626451492309570312500000000000000e-9), SC_(4.9846049841934345233892764760512922e35) }, { SC_(3.0), SC_(-9.3132257461547851562500000000000000e-10), SC_(7.9753679747094952374228423616820675e36) }, { SC_(3.0), SC_(-4.6566128730773925781250000000000000e-10), SC_(1.2760588759535192379876547778691308e38) }, { SC_(3.0), SC_(-2.3283064365386962890625000000000000e-10), SC_(2.0416942015256307807802476445906093e39) }, { SC_(3.0), SC_(-1.1641532182693481445312500000000000e-10), SC_(3.2667107224410092492483962313449748e40) }, { SC_(3.0), SC_(-5.8207660913467407226562500000000000e-11), SC_(5.2267371559056147987974339701519597e41) }, { SC_(3.0), SC_(-2.9103830456733703613281250000000000e-11), SC_(8.3627794494489836780758943522431356e42) }, { SC_(3.0), SC_(-1.4551915228366851806640625000000000e-11), SC_(1.3380447119118373884921430963589017e44) }, { SC_(3.0), SC_(-7.2759576141834259033203125000000000e-12), SC_(2.1408715390589398215874289541742427e45) }, { SC_(3.0), SC_(-3.6379788070917129516601562500000000e-12), SC_(3.4253944624943037145398863266787883e46) }, { SC_(3.0), SC_(-1.8189894035458564758300781250000000e-12), SC_(5.4806311399908859432638181226860613e47) }, { SC_(3.0), SC_(-9.0949470177292823791503906250000000e-13), SC_(8.7690098239854175092221089962976981e48) }, { SC_(3.0), SC_(-4.5474735088646411895751953125000000e-13), SC_(1.4030415718376668014755374394076317e50) }, { SC_(3.0), SC_(-2.2737367544323205947875976562500000e-13), SC_(2.2448665149402668823608599030522107e51) }, { SC_(3.0), SC_(-1.1368683772161602973937988281250000e-13), SC_(3.5917864239044270117773758448835371e52) }, { SC_(3.0), SC_(-5.6843418860808014869689941406250000e-14), SC_(5.7468582782470832188438013518136594e53) }, { SC_(3.0), SC_(-2.8421709430404007434844970703125000e-14), SC_(9.1949732451953331501500821629018551e54) }, { SC_(3.0), SC_(-1.4210854715202003717422485351562500e-14), SC_(1.4711957192312533040240131460642968e56) }, { SC_(3.0), SC_(-7.1054273576010018587112426757812500e-15), SC_(2.3539131507700052864384210337028749e57) }, { SC_(3.0), SC_(-3.5527136788005009293556213378906250e-15), SC_(3.7662610412320084583014736539245998e58) }, { SC_(3.0), SC_(-1.7763568394002504646778106689453125e-15), SC_(6.0260176659712135332823578462793598e59) }, { SC_(3.0), SC_(-8.8817841970012523233890533447265625e-16), SC_(9.6416282655539416532517725540469756e60) }, { SC_(3.0), SC_(-4.4408920985006261616945266723632812e-16), SC_(1.5426605224886306645202836086475161e62) }, { SC_(3.0), SC_(-2.2204460492503130808472633361816406e-16), SC_(2.4682568359818090632324537738360258e63) }, { SC_(3.0), SC_(-1.1102230246251565404236316680908203e-16), SC_(3.9492109375708945011719260381376412e64) }, { SC_(3.0), SC_(-5.5511151231257827021181583404541016e-17), SC_(6.3187375001134312018750816610202259e65) }, { SC_(3.0), SC_(-2.7755575615628913510590791702270508e-17), SC_(1.0109980000181489923000130657632362e67) }, { SC_(3.0), SC_(-1.3877787807814456755295395851135254e-17), SC_(1.6175968000290383876800209052211778e68) }, { SC_(3.0), SC_(-6.9388939039072283776476979255676270e-18), SC_(2.5881548800464614202880334483538845e69) }, { SC_(3.0), SC_(-3.4694469519536141888238489627838135e-18), SC_(4.1410478080743382724608535173662153e70) }, { SC_(3.0), SC_(-1.7347234759768070944119244813919067e-18), SC_(6.6256764929189412359373656277859444e71) }, { SC_(3.0), SC_(-8.6736173798840354720596224069595337e-19), SC_(1.0601082388670305977499785004457511e73) }, { SC_(3.0), SC_(-4.3368086899420177360298112034797668e-19), SC_(1.6961731821872489563999656007132018e74) }, { SC_(3.0), SC_(-2.1684043449710088680149056017398834e-19), SC_(2.7138770914995983302399449611411228e75) }, { SC_(3.0), SC_(-1.0842021724855044340074528008699417e-19), SC_(4.3422033463993573283839119378257965e76) }, { SC_(3.0), SC_(-5.4210108624275221700372640043497086e-20), SC_(6.9475253542389717254142591005212745e77) }, { SC_(3.0), SC_(-2.7105054312137610850186320021748543e-20), SC_(1.1116040566782354760662814560834039e79) }, { SC_(3.0), SC_(-1.3552527156068805425093160010874271e-20), SC_(1.7785664906851767617060503297334463e80) }, { SC_(3.0), SC_(-6.7762635780344027125465800054371357e-21), SC_(2.8457063850962828187296805275735140e81) }, { SC_(3.0), SC_(-3.3881317890172013562732900027185678e-21), SC_(4.5531302161540525099674888441176224e82) }, } }; do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); From 8477de53b45a9caa801f15f7557e611acd588f03 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 4 Nov 2014 18:27:48 +0000 Subject: [PATCH 52/69] [polygamma]Fix spurious overflow for very large x. --- .../boost/math/special_functions/detail/polygamma.hpp | 10 ++++++++++ test/test_polygamma.hpp | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 843e9aecb..65806005b 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -39,6 +39,16 @@ // term == value of current term to be added to sum. // part_term == value of current term excluding the Bernoulli number part // + if(n + x == x) + { + // x is crazy large, just concentrate on the first part of the expression and use logs: + if(n == 1) return 1 / x; + T nlx = n * log(x); + if((nlx < tools::log_max_value()) && (n < max_factorial::value)) + return ((n & 1) ? 1 : -1) * boost::math::factorial(n - 1) * 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; // diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index bb053ea20..79d637c5d 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -178,13 +178,14 @@ void test_polygamma(T, const char* name) } }; do_test_polygamma(small_data, name, "Mathematica Data - small arguments"); - boost::array, 18> bug_cases = + boost::array, 23> bug_cases = { { { SC_(171.0), SC_(2.0), SC_(2.073093314165313149880140394410e257) }, { SC_(171.0), SC_(5.0), SC_(7.42911976071332889749264626321716781e188) }, { SC_(166.0), SC_(2.0), SC_(-4.8129498903508823293044351695484095e247) }, { SC_(166.0), SC_(3.0), SC_(-1.8843912448604502196243093626013895e218) }, { SC_(171.0), SC_(23.0), SC_(7.53143916217078889612817829861181739e74) }, { SC_(168.0), SC_(150.0), SC_(-6.5266062780306068333215312257902920e-66) }, { SC_(169.0), SC_(202.0), SC_(9.2734049986021958613510169328055599e-88) }, - { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932)}, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(22.0), SC_(-9.5), SC_(-0.0041914420015886426448664611125724338) }, { SC_(23.0), SC_(-9.5), SC_(8.6744973773084910367753904944787155e29) }, { SC_(24.0), SC_(-9.5), SC_(-0.020482527998674199369359987617445420) }, { SC_(25.0), SC_(-9.5), SC_(2.0818793705474855280713094147422278e33) }, { SC_(26.0), SC_(-9.5), SC_(-0.11840299831136879082790399023048278) }, { SC_(27.0), SC_(-9.5), SC_(5.8459172724952950454469355072783445e36) }, { SC_(28.0), SC_(-9.5), SC_(-0.79896867888629450211348696225656872) }, { SC_(29.0), SC_(-9.5), SC_(1.8987539301063980537054871851063348e40) }, { SC_(30.0), SC_(-9.5), SC_(-6.2224465669723272001827279817965087) } + { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932)}, { SC_(21.0), SC_(-9.5), SC_(4.2858188624279670465725116159418790e26) }, { SC_(22.0), SC_(-9.5), SC_(-0.0041914420015886426448664611125724338) }, { SC_(23.0), SC_(-9.5), SC_(8.6744973773084910367753904944787155e29) }, { SC_(24.0), SC_(-9.5), SC_(-0.020482527998674199369359987617445420) }, { SC_(25.0), SC_(-9.5), SC_(2.0818793705474855280713094147422278e33) }, { SC_(26.0), SC_(-9.5), SC_(-0.11840299831136879082790399023048278) }, { SC_(27.0), SC_(-9.5), SC_(5.8459172724952950454469355072783445e36) }, { SC_(28.0), SC_(-9.5), SC_(-0.79896867888629450211348696225656872) }, { SC_(29.0), SC_(-9.5), SC_(1.8987539301063980537054871851063348e40) }, { SC_(30.0), SC_(-9.5), SC_(-6.2224465669723272001827279817965087) }, + { SC_(1.0), ldexp(value_type(1), 120), SC_(7.5231638452626400509999138382223723e-37) }, { SC_(2.0), ldexp(value_type(1), 120), SC_(-5.6597994242666952296931995568048699e-73) }, { SC_(3.0), ldexp(value_type(1), 120), SC_(8.5159196800163014398201074324946177e-109) }, { SC_(10.0), ldexp(value_type(1), 120), SC_(-2.1075031678562075551498983356333178e-356) }, { SC_(15.0), ldexp(value_type(1), 120), SC_(1.2201582392961399809842378412624410e-531) }, } }; do_test_polygamma(bug_cases, name, "Mathematica Data - Large orders and other bug cases"); } From ccf0f822446c221d1a0d583dfade080886987084 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 7 Nov 2014 16:31:48 +0000 Subject: [PATCH 53/69] [polygamma] Add trigamma to minimax finding code. --- minimax/f.cpp | 14 +++++++++ minimax/main.cpp | 82 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 89 insertions(+), 7 deletions(-) diff --git a/minimax/f.cpp b/minimax/f.cpp index 3435f0175..74ff97638 100644 --- a/minimax/f.cpp +++ b/minimax/f.cpp @@ -323,6 +323,20 @@ boost::math::ntl::RR f(const boost::math::ntl::RR& x, int variant) // cbrt over [0.5, 1] return boost::math::cbrt(x); } + case 30: + { + // trigamma over [x,y] + boost::math::ntl::RR y = x; + y = sqrt(y); + return boost::math::trigamma(x) * (x * x); + } + case 31: + { + // trigamma over [x, INF] + if(x == 0) return 1; + boost::math::ntl::RR y = (x == 0) ? (std::numeric_limits::max)() / 2 : 1/x; + return boost::math::trigamma(y) * y; + } } return 0; } diff --git a/minimax/main.cpp b/minimax/main.cpp index a12657ed8..bc430ec4f 100644 --- a/minimax/main.cpp +++ b/minimax/main.cpp @@ -3,6 +3,7 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#define BOOST_TEST_MODULE foobar #define BOOST_UBLAS_TYPE_CHECK_EPSILON (type_traits::type_sqrt (boost::math::tools::epsilon ())) #define BOOST_UBLAS_TYPE_CHECK_MIN (type_traits::type_sqrt ( boost::math::tools::min_value())) #define BOOST_UBLAS_NDEBUG @@ -21,6 +22,7 @@ using boost::math::ntl::pow; #include #include #include // for test_main +#include extern boost::math::ntl::RR f(const boost::math::ntl::RR& x, int variant); extern void show_extra( @@ -210,6 +212,41 @@ void graph(const char*, const char*) do_graph(3); } +template +boost::math::ntl::RR convert_to_rr(const T& val) +{ + return val; +} +template +boost::math::ntl::RR convert_to_rr(const boost::multiprecision::number& val) +{ + return boost::lexical_cast(val.str()); +} + +namespace boost{ namespace math{ namespace tools{ + +template <> +boost::multiprecision::cpp_bin_float_double_extended real_cast(boost::math::ntl::RR val) +{ + unsigned p = NTL::RR::OutputPrecision(); + NTL::RR::SetOutputPrecision(20); + boost::multiprecision::cpp_bin_float_double_extended r = boost::lexical_cast(val); + NTL::RR::SetOutputPrecision(p); + return r; +} +template <> +boost::multiprecision::cpp_bin_float_quad real_cast(boost::math::ntl::RR val) +{ + unsigned p = NTL::RR::OutputPrecision(); + NTL::RR::SetOutputPrecision(35); + boost::multiprecision::cpp_bin_float_quad r = boost::lexical_cast(val); + NTL::RR::SetOutputPrecision(p); + return r; +} + +}}} + + template void do_test(T, const char* name) { @@ -260,8 +297,8 @@ void do_test(T, const char* name) { boost::math::ntl::RR true_result = the_function(zeros[i]); T absissa = boost::math::tools::real_cast(zeros[i]); - boost::math::ntl::RR test_result = n.evaluate(absissa) / d.evaluate(absissa); - boost::math::ntl::RR cheb_result = boost::math::tools::evaluate_chebyshev(cn, absissa) / boost::math::tools::evaluate_chebyshev(cd, absissa); + boost::math::ntl::RR test_result = convert_to_rr(n.evaluate(absissa) / d.evaluate(absissa)); + boost::math::ntl::RR cheb_result = convert_to_rr(boost::math::tools::evaluate_chebyshev(cn, absissa) / boost::math::tools::evaluate_chebyshev(cd, absissa)); boost::math::ntl::RR err, cheb_err; if(rel_error) { @@ -287,8 +324,8 @@ void do_test(T, const char* name) { boost::math::ntl::RR true_result = the_function(cheb[i]); T absissa = boost::math::tools::real_cast(cheb[i]); - boost::math::ntl::RR test_result = n.evaluate(absissa) / d.evaluate(absissa); - boost::math::ntl::RR cheb_result = boost::math::tools::evaluate_chebyshev(cn, absissa) / boost::math::tools::evaluate_chebyshev(cd, absissa); + boost::math::ntl::RR test_result = convert_to_rr(n.evaluate(absissa) / d.evaluate(absissa)); + boost::math::ntl::RR cheb_result = convert_to_rr(boost::math::tools::evaluate_chebyshev(cn, absissa) / boost::math::tools::evaluate_chebyshev(cd, absissa)); boost::math::ntl::RR err, cheb_err; if(rel_error) { @@ -334,6 +371,16 @@ void test_long(const char*, const char*) do_test((long double)(0), "long double"); } +void test_float80(const char*, const char*) +{ + do_test((boost::multiprecision::cpp_bin_float_double_extended)(0), "float80"); +} + +void test_float128(const char*, const char*) +{ + do_test((boost::multiprecision::cpp_bin_float_quad)(0), "float128"); +} + void test_all(const char*, const char*) { do_test(float(0), "float"); @@ -383,9 +430,12 @@ void do_test_n(T, const char* name, unsigned count) for(boost::math::ntl::RR x = a; x <= b; x += step) { boost::math::ntl::RR true_result = the_function(x); + //std::cout << true_result << std::endl; T absissa = boost::math::tools::real_cast(x); - boost::math::ntl::RR test_result = n.evaluate(absissa) / d.evaluate(absissa); - boost::math::ntl::RR cheb_result = boost::math::tools::evaluate_chebyshev(cn, absissa) / boost::math::tools::evaluate_chebyshev(cd, absissa); + boost::math::ntl::RR test_result = convert_to_rr(n.evaluate(absissa) / d.evaluate(absissa)); + //std::cout << test_result << std::endl; + boost::math::ntl::RR cheb_result = convert_to_rr(boost::math::tools::evaluate_chebyshev(cn, absissa) / boost::math::tools::evaluate_chebyshev(cd, absissa)); + //std::cout << cheb_result << std::endl; boost::math::ntl::RR err, cheb_err; if(rel_error) { @@ -441,6 +491,16 @@ void test_long_n(unsigned n) do_test_n((long double)(0), "long double", n); } +void test_float80_n(unsigned n) +{ + do_test_n((boost::multiprecision::cpp_bin_float_double_extended)(0), "float80", n); +} + +void test_float128_n(unsigned n) +{ + do_test_n((boost::multiprecision::cpp_bin_float_quad)(0), "float128", n); +} + void rotate(const char*, const char*) { if(p_remez) @@ -504,7 +564,7 @@ BOOST_AUTO_TEST_CASE( test_main ) while(std::getline(std::cin, line)) { if(parse(line.c_str(), str_p("quit"), space_p).full) - return 0; + return; if(false == parse(line.c_str(), ( @@ -569,6 +629,14 @@ BOOST_AUTO_TEST_CASE( test_main ) str_p("test") && str_p("long") && uint_p[&test_long_n] || str_p("test") && str_p("long")[&test_long] + || + str_p("test") && str_p("float80") && uint_p[&test_float80_n] + || + str_p("test") && str_p("float80")[&test_float80] + || + str_p("test") && str_p("float128") && uint_p[&test_float128_n] + || + str_p("test") && str_p("float128")[&test_float128] || str_p("test") && str_p("all")[&test_all] || From 0e98fd90c2ee1e969547cfa3e3c7892a294d8c88 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 7 Nov 2014 16:32:41 +0000 Subject: [PATCH 54/69] [Polygamma] Add optimized trigamma version that uses rational approximations. --- .../math/special_functions/polygamma.hpp | 31 +- .../boost/math/special_functions/trigamma.hpp | 462 ++++++++++++++++++ test/float128/test_digamma.cpp | 9 +- test/float128/test_trigamma.cpp | 44 ++ test/test_trigamma.cpp | 193 ++------ test/test_trigamma.hpp | 74 +++ 6 files changed, 642 insertions(+), 171 deletions(-) create mode 100644 include/boost/math/special_functions/trigamma.hpp create mode 100644 test/float128/test_trigamma.cpp create mode 100644 test/test_trigamma.hpp diff --git a/include/boost/math/special_functions/polygamma.hpp b/include/boost/math/special_functions/polygamma.hpp index a41d7a9c8..6b7815d5e 100644 --- a/include/boost/math/special_functions/polygamma.hpp +++ b/include/boost/math/special_functions/polygamma.hpp @@ -11,18 +11,24 @@ #ifndef _BOOST_POLYGAMMA_2013_07_30_HPP_ #define _BOOST_POLYGAMMA_2013_07_30_HPP_ - #include - #include - #include - #include "detail/polygamma.hpp" +#include +#include +#include - namespace boost { namespace math { +namespace boost { namespace math { template - inline typename tools::promote_args::type polygamma(const int n, T x, const Policy &) + inline typename tools::promote_args::type polygamma(const int n, T x, const Policy& pol) { // + // Filter off special cases right at the start: + // + if(n == 0) + return boost::math::digamma(x, pol); + if(n == 1) + return boost::math::trigamma(x, pol); + // // We've found some standard library functions to misbehave if any FPU exception flags // are set prior to their call, this code will clear those flags, then reset them // on exit: @@ -71,19 +77,6 @@ return boost::math::polygamma(n, x, policies::policy<>()); } - template - inline typename tools::promote_args::type trigamma(T x, const Policy &pol) - { - return boost::math::polygamma(1,x,pol); - } - - template - inline typename tools::promote_args::type trigamma(T x) - { - return boost::math::trigamma(x,policies::policy<>()); - } - - } } // namespace boost::math #endif // _BOOST_BERNOULLI_2013_05_30_HPP_ diff --git a/include/boost/math/special_functions/trigamma.hpp b/include/boost/math/special_functions/trigamma.hpp new file mode 100644 index 000000000..ad2dd6ef5 --- /dev/null +++ b/include/boost/math/special_functions/trigamma.hpp @@ -0,0 +1,462 @@ +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_SF_TRIGAMMA_HPP +#define BOOST_MATH_SF_TRIGAMMA_HPP + +#ifdef _MSC_VER +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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 mpl::int_<53>*, const Policy&) +{ + // Max error in interpolated form: 3.736e-017 + static const T offset = BOOST_MATH_BIG_CONSTANT(T, 53, 2.1093254089355469); + static const T P_1_2[] = { + BOOST_MATH_BIG_CONSTANT(T, 53, -1.1093280605946045), + BOOST_MATH_BIG_CONSTANT(T, 53, -3.8310674472619321), + BOOST_MATH_BIG_CONSTANT(T, 53, -3.3703848401898283), + BOOST_MATH_BIG_CONSTANT(T, 53, 0.28080574467981213), + BOOST_MATH_BIG_CONSTANT(T, 53, 1.6638069578676164), + BOOST_MATH_BIG_CONSTANT(T, 53, 0.64468386819102836), + }; + static const T Q_1_2[] = { + BOOST_MATH_BIG_CONSTANT(T, 53, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 53, 3.4535389668541151), + BOOST_MATH_BIG_CONSTANT(T, 53, 4.5208926987851437), + BOOST_MATH_BIG_CONSTANT(T, 53, 2.7012734178351534), + BOOST_MATH_BIG_CONSTANT(T, 53, 0.64468798399785611), + BOOST_MATH_BIG_CONSTANT(T, 53, -0.20314516859987728e-6), + }; + // Max error in interpolated form: 1.159e-017 + static const T P_2_4[] = { + BOOST_MATH_BIG_CONSTANT(T, 53, -0.13803835004508849e-7), + BOOST_MATH_BIG_CONSTANT(T, 53, 0.50000049158540261), + BOOST_MATH_BIG_CONSTANT(T, 53, 1.6077979838469348), + BOOST_MATH_BIG_CONSTANT(T, 53, 2.5645435828098254), + BOOST_MATH_BIG_CONSTANT(T, 53, 2.0534873203680393), + BOOST_MATH_BIG_CONSTANT(T, 53, 0.74566981111565923), + }; + static const T Q_2_4[] = { + BOOST_MATH_BIG_CONSTANT(T, 53, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 53, 2.8822787662376169), + BOOST_MATH_BIG_CONSTANT(T, 53, 4.1681660554090917), + BOOST_MATH_BIG_CONSTANT(T, 53, 2.7853527819234466), + BOOST_MATH_BIG_CONSTANT(T, 53, 0.74967671848044792), + BOOST_MATH_BIG_CONSTANT(T, 53, -0.00057069112416246805), + }; + // Maximum Deviation Found: 6.896e-018 + // Expected Error Term : -6.895e-018 + // Maximum Relative Change in Control Points : 8.497e-004 + static const T P_4_inf[] = { + 0.68947581948701249e-17L, + 0.49999999999998975L, + 1.0177274392923795L, + 2.498208511343429L, + 2.1921221359427595L, + 1.5897035272532764L, + 0.40154388356961734L, + }; + static const T Q_4_inf[] = { + 1.0L, + 1.7021215452463932L, + 4.4290431747556469L, + 2.9745631894384922L, + 2.3013614809773616L, + 0.28360399799075752L, + 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 mpl::int_<64>*, const Policy&) +{ + // Max error in interpolated form: 1.178e-020 + static const T offset_1_2 = BOOST_MATH_BIG_CONSTANT(T, 64, 2.109325408935546875); + static const T P_1_2[] = { + BOOST_MATH_BIG_CONSTANT(T, 64, -1.10932535608960258341), + BOOST_MATH_BIG_CONSTANT(T, 64, -4.18793841543017129052), + BOOST_MATH_BIG_CONSTANT(T, 64, -4.63865531898487734531), + BOOST_MATH_BIG_CONSTANT(T, 64, -0.919832884430500908047), + BOOST_MATH_BIG_CONSTANT(T, 64, 1.68074038333180423012), + BOOST_MATH_BIG_CONSTANT(T, 64, 1.21172611429185622377), + BOOST_MATH_BIG_CONSTANT(T, 64, 0.259635673503366427284), + }; + static const T Q_1_2[] = { + BOOST_MATH_BIG_CONSTANT(T, 64, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 64, 3.77521119359546982995), + BOOST_MATH_BIG_CONSTANT(T, 64, 5.664338024578956321), + BOOST_MATH_BIG_CONSTANT(T, 64, 4.25995134879278028361), + BOOST_MATH_BIG_CONSTANT(T, 64, 1.62956638448940402182), + BOOST_MATH_BIG_CONSTANT(T, 64, 0.259635512844691089868), + BOOST_MATH_BIG_CONSTANT(T, 64, 0.629642219810618032207e-8), + }; + // Max error in interpolated form: 3.912e-020 + static const T P_2_8[] = { + BOOST_MATH_BIG_CONSTANT(T, 64, -0.387540035162952880976e-11), + BOOST_MATH_BIG_CONSTANT(T, 64, 0.500000000276430504), + BOOST_MATH_BIG_CONSTANT(T, 64, 3.21926880986360957306), + BOOST_MATH_BIG_CONSTANT(T, 64, 10.2550347708483445775), + BOOST_MATH_BIG_CONSTANT(T, 64, 18.9002075150709144043), + BOOST_MATH_BIG_CONSTANT(T, 64, 21.0357215832399705625), + BOOST_MATH_BIG_CONSTANT(T, 64, 13.4346512182925923978), + BOOST_MATH_BIG_CONSTANT(T, 64, 3.98656291026448279118), + }; + static const T Q_2_8[] = { + BOOST_MATH_BIG_CONSTANT(T, 64, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 64, 6.10520430478613667724), + BOOST_MATH_BIG_CONSTANT(T, 64, 18.475001060603645512), + BOOST_MATH_BIG_CONSTANT(T, 64, 31.7087534567758405638), + BOOST_MATH_BIG_CONSTANT(T, 64, 31.908814523890465398), + BOOST_MATH_BIG_CONSTANT(T, 64, 17.4175479039227084798), + BOOST_MATH_BIG_CONSTANT(T, 64, 3.98749106958394941276), + BOOST_MATH_BIG_CONSTANT(T, 64, -0.000115917322224411128566), + }; + // Maximum Deviation Found: 2.635e-020 + // Expected Error Term : 2.635e-020 + // Maximum Relative Change in Control Points : 1.791e-003 + static const T P_8_inf[] = { + BOOST_MATH_BIG_CONSTANT(T, 64, -0.263527875092466899848e-19), + BOOST_MATH_BIG_CONSTANT(T, 64, 0.500000000000000058145), + BOOST_MATH_BIG_CONSTANT(T, 64, 0.0730121433777364138677), + BOOST_MATH_BIG_CONSTANT(T, 64, 1.94505878379957149534), + BOOST_MATH_BIG_CONSTANT(T, 64, 0.0517092358874932620529), + BOOST_MATH_BIG_CONSTANT(T, 64, 1.07995383547483921121), + }; + static const T Q_8_inf[] = { + BOOST_MATH_BIG_CONSTANT(T, 64, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 64, -0.187309046577818095504), + BOOST_MATH_BIG_CONSTANT(T, 64, 3.95255391645238842975), + BOOST_MATH_BIG_CONSTANT(T, 64, -1.14743283327078949087), + BOOST_MATH_BIG_CONSTANT(T, 64, 2.52989799376344914499), + BOOST_MATH_BIG_CONSTANT(T, 64, -0.627414303172402506396), + BOOST_MATH_BIG_CONSTANT(T, 64, 0.141554248216425512536), + }; + + 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 mpl::int_<113>*, const Policy&) +{ + // Max error in interpolated form: 1.916e-035 + + static const T P_1_2[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, -0.999999999999999082554457936871832533), + BOOST_MATH_BIG_CONSTANT(T, 113, -4.71237311120865266379041700054847734), + BOOST_MATH_BIG_CONSTANT(T, 113, -7.94125711970499027763789342500817316), + BOOST_MATH_BIG_CONSTANT(T, 113, -5.74657746697664735258222071695644535), + BOOST_MATH_BIG_CONSTANT(T, 113, -0.404213349456398905981223965160595687), + BOOST_MATH_BIG_CONSTANT(T, 113, 2.47877781178642876561595890095758896), + BOOST_MATH_BIG_CONSTANT(T, 113, 2.07714151702455125992166949812126433), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.858877899162360138844032265418028567), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.20499222604410032375789018837922397), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.0272103140348194747360175268778415049), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.0015764849020876949848954081173520686), + }; + static const T Q_1_2[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 113, 4.71237311120863419878375031457715223), + BOOST_MATH_BIG_CONSTANT(T, 113, 9.58619118655339853449127952145877467), + BOOST_MATH_BIG_CONSTANT(T, 113, 11.0940067269829372437561421279054968), + BOOST_MATH_BIG_CONSTANT(T, 113, 8.09075424749327792073276309969037885), + BOOST_MATH_BIG_CONSTANT(T, 113, 3.87705890159891405185343806884451286), + BOOST_MATH_BIG_CONSTANT(T, 113, 1.22758678701914477836330837816976782), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.249092040606385004109672077814668716), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.0295750413900655597027079600025569048), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.00157648490200498142247694709728858139), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.161264050344059471721062360645432809e-14), + }; + + // Max error in interpolated form: 8.958e-035 + static const T P_2_4[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, -2.55843734739907925764326773972215085), + BOOST_MATH_BIG_CONSTANT(T, 113, -12.2830208240542011967952466273455887), + BOOST_MATH_BIG_CONSTANT(T, 113, -23.9195022162767993526575786066414403), + BOOST_MATH_BIG_CONSTANT(T, 113, -24.9256431504823483094158828285470862), + BOOST_MATH_BIG_CONSTANT(T, 113, -14.7979122765478779075108064826412285), + BOOST_MATH_BIG_CONSTANT(T, 113, -4.46654453928610666393276765059122272), + BOOST_MATH_BIG_CONSTANT(T, 113, -0.0191439033405649675717082465687845002), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.515412052554351265708917209749037352), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.195378348786064304378247325360320038), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.0334761282624174313035014426794245393), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.002373665205942206348500250056602687), + }; + static const T Q_2_4[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 113, 4.80098558454419907830670928248659245), + BOOST_MATH_BIG_CONSTANT(T, 113, 9.99220727843170133895059300223445265), + BOOST_MATH_BIG_CONSTANT(T, 113, 11.8896146167631330735386697123464976), + BOOST_MATH_BIG_CONSTANT(T, 113, 8.96613256683809091593793565879092581), + BOOST_MATH_BIG_CONSTANT(T, 113, 4.47254136149624110878909334574485751), + BOOST_MATH_BIG_CONSTANT(T, 113, 1.48600982028196527372434773913633152), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.319570735766764237068541501137990078), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.0407358345787680953107374215319322066), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.00237366520593271641375755486420859837), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.239554887903526152679337256236302116e-15), + BOOST_MATH_BIG_CONSTANT(T, 113, -0.294749244740618656265237072002026314e-17), + }; + + static const T y_offset_2_4 = BOOST_MATH_BIG_CONSTANT(T, 113, 3.558437347412109375); + + // Max error in interpolated form: 4.319e-035 + static const T P_4_8[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, 0.166626112697021464248967707021688845e-16), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.499999999999997739552090249208808197), + BOOST_MATH_BIG_CONSTANT(T, 113, 6.40270945019053817915772473771553187), + BOOST_MATH_BIG_CONSTANT(T, 113, 41.3833374155000608013677627389343329), + BOOST_MATH_BIG_CONSTANT(T, 113, 166.803341854562809335667241074035245), + BOOST_MATH_BIG_CONSTANT(T, 113, 453.39964786925369319960722793414521), + BOOST_MATH_BIG_CONSTANT(T, 113, 851.153712317697055375935433362983944), + BOOST_MATH_BIG_CONSTANT(T, 113, 1097.70657567285059133109286478004458), + BOOST_MATH_BIG_CONSTANT(T, 113, 938.431232478455316020076349367632922), + BOOST_MATH_BIG_CONSTANT(T, 113, 487.268001604651932322080970189930074), + BOOST_MATH_BIG_CONSTANT(T, 113, 119.953445242335730062471193124820659), + }; + static const T Q_4_8[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 113, 12.4720855670474488978638945855932398), + BOOST_MATH_BIG_CONSTANT(T, 113, 78.6093129753298570701376952709727391), + BOOST_MATH_BIG_CONSTANT(T, 113, 307.470246050318322489781182863190127), + BOOST_MATH_BIG_CONSTANT(T, 113, 805.140686101151538537565264188630079), + BOOST_MATH_BIG_CONSTANT(T, 113, 1439.12019760292146454787601409644413), + BOOST_MATH_BIG_CONSTANT(T, 113, 1735.6105285756048831268586001383127), + BOOST_MATH_BIG_CONSTANT(T, 113, 1348.32500712856328019355198611280536), + BOOST_MATH_BIG_CONSTANT(T, 113, 607.225985860570846699704222144650563), + BOOST_MATH_BIG_CONSTANT(T, 113, 119.952317857277045332558673164517227), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.000140165918355036060868680809129436084), + }; + + // Maximum Deviation Found: 2.867e-035 + // Expected Error Term : 2.866e-035 + // Maximum Relative Change in Control Points : 2.662e-004 + static const T P_8_16[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, -0.184828315274146610610872315609837439e-19), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.500000000000000004122475157735807738), + BOOST_MATH_BIG_CONSTANT(T, 113, 3.02533865247313349284875558880415875), + BOOST_MATH_BIG_CONSTANT(T, 113, 13.5995927517457371243039532492642734), + BOOST_MATH_BIG_CONSTANT(T, 113, 35.3132224283087906757037999452941588), + BOOST_MATH_BIG_CONSTANT(T, 113, 67.1639424550714159157603179911505619), + BOOST_MATH_BIG_CONSTANT(T, 113, 83.5767733658513967581959839367419891), + BOOST_MATH_BIG_CONSTANT(T, 113, 71.073491212235705900866411319363501), + BOOST_MATH_BIG_CONSTANT(T, 113, 35.8621515614725564575893663483998663), + BOOST_MATH_BIG_CONSTANT(T, 113, 8.72152231639983491987779743154333318), + }; + static const T Q_8_16[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 113, 5.71734397161293452310624822415866372), + BOOST_MATH_BIG_CONSTANT(T, 113, 25.293404179620438179337103263274815), + BOOST_MATH_BIG_CONSTANT(T, 113, 62.2619767967468199111077640625328469), + BOOST_MATH_BIG_CONSTANT(T, 113, 113.955048909238993473389714972250235), + BOOST_MATH_BIG_CONSTANT(T, 113, 130.807138328938966981862203944329408), + BOOST_MATH_BIG_CONSTANT(T, 113, 102.423146902337654110717764213057753), + BOOST_MATH_BIG_CONSTANT(T, 113, 44.0424772805245202514468199602123565), + BOOST_MATH_BIG_CONSTANT(T, 113, 8.89898032477904072082994913461386099), + BOOST_MATH_BIG_CONSTANT(T, 113, -0.0296627336872039988632793863671456398), + }; + // Maximum Deviation Found: 1.079e-035 + // Expected Error Term : -1.079e-035 + // Maximum Relative Change in Control Points : 7.884e-003 + static const T P_16_inf[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, 0.0), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.500000000000000000000000000000087317), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.345625669885456215194494735902663968), + BOOST_MATH_BIG_CONSTANT(T, 113, 9.62895499360842232127552650044647769), + BOOST_MATH_BIG_CONSTANT(T, 113, 3.5936085382439026269301003761320812), + BOOST_MATH_BIG_CONSTANT(T, 113, 49.459599118438883265036646019410669), + BOOST_MATH_BIG_CONSTANT(T, 113, 7.77519237321893917784735690560496607), + BOOST_MATH_BIG_CONSTANT(T, 113, 74.4536074488178075948642351179304121), + BOOST_MATH_BIG_CONSTANT(T, 113, 2.75209340397069050436806159297952699), + BOOST_MATH_BIG_CONSTANT(T, 113, 23.9292359711471667884504840186561598), + }; + static const T Q_16_inf[] = { + BOOST_MATH_BIG_CONSTANT(T, 113, 1.0), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.357918006437579097055656138920742037), + BOOST_MATH_BIG_CONSTANT(T, 113, 19.1386039850709849435325005484512944), + BOOST_MATH_BIG_CONSTANT(T, 113, 0.874349081464143606016221431763364517), + BOOST_MATH_BIG_CONSTANT(T, 113, 98.6516097434855572678195488061432509), + BOOST_MATH_BIG_CONSTANT(T, 113, -16.1051972833382893468655223662534306), + BOOST_MATH_BIG_CONSTANT(T, 113, 154.316860216253720989145047141653727), + BOOST_MATH_BIG_CONSTANT(T, 113, -40.2026880424378986053105969312264534), + BOOST_MATH_BIG_CONSTANT(T, 113, 60.1679136674264778074736441126810223), + BOOST_MATH_BIG_CONSTANT(T, 113, -13.3414844622256422644504472438320114), + BOOST_MATH_BIG_CONSTANT(T, 113, 2.53795636200649908779512969030363442), + }; + + 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) +{ + // + // This handles reflection of negative arguments, and all our + // error handling, then forwards to the T-specific approximation. + // + BOOST_MATH_STD_USING // ADL of std functions. + + T result = 0; + // + // Check for negative arguments and use reflection: + // + if(x <= 0) + { + // Reflect: + T z = 1 - x; + // Argument reduction for tan: + 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 mpl::int_<0>*, const Policy& pol) +{ + return polygamma_imp(1, x, pol); +} +// +// Initializer: ensure all our constants are initialized prior to the first call of main: +// +template +struct trigamma_initializer +{ + struct init + { + init() + { + typedef typename policies::precision::type precision_type; + do_init(mpl::bool_()); + } + void do_init(const mpl::true_&) + { + boost::math::trigamma(T(2.5), Policy()); + } + void do_init(const mpl::false_&){} + void force_instantiate()const{} + }; + static const init initializer; + static void force_instantiate() + { + initializer.force_instantiate(); + } +}; + +template +const typename trigamma_initializer::init trigamma_initializer::initializer; + +} // namespace detail + +template +inline typename tools::promote_args::type + trigamma(T x, const Policy& pol) +{ + typedef typename tools::promote_args::type result_type; + typedef typename policies::evaluation::type value_type; + typedef typename policies::precision::type precision_type; + typedef typename mpl::if_< + mpl::or_< + mpl::less_equal >, + mpl::greater > + >, + mpl::int_<0>, + typename mpl::if_< + mpl::less >, + mpl::int_<53>, + typename mpl::if_< + mpl::less >, + mpl::int_<64>, + mpl::int_<113> + >::type + >::type + >::type tag_type; + + // Force initialization of constants: + detail::trigamma_initializer::force_instantiate(); + + return policies::checked_narrowing_cast(detail::trigamma_imp( + static_cast(x), + static_cast(0), pol), "boost::math::trigamma<%1%>(%1%)"); +} + +template +inline typename tools::promote_args::type + trigamma(T x) +{ + return trigamma(x, policies::policy<>()); +} + +} // namespace math +} // namespace boost +#endif + diff --git a/test/float128/test_digamma.cpp b/test/float128/test_digamma.cpp index 7981c6367..9856223be 100644 --- a/test/float128/test_digamma.cpp +++ b/test/float128/test_digamma.cpp @@ -15,13 +15,20 @@ void expected_results() // Define the max and mean errors expected for // various compilers and platforms. // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*negative.*", // test data group + ".*", 400, 200); // test function add_expected_result( ".*", // compiler ".*", // stdlib ".*", // platform ".*", // test type(s) ".*", // test data group - ".*", 350, 100); // test function + ".*", 2, 2); // test function // // Finish off by printing out the compiler/stdlib/platform names, // we do this to make it easier to mark up expected error rates. diff --git a/test/float128/test_trigamma.cpp b/test/float128/test_trigamma.cpp new file mode 100644 index 000000000..8862b53d0 --- /dev/null +++ b/test/float128/test_trigamma.cpp @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////// +// Copyright 2011 John Maddock. 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_ + +#include "setup.hpp" +#include "table_type.hpp" + +#include +#include "libs/math/test/test_trigamma.hpp" + +void expected_results() +{ + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + ".*", // test type(s) + ".*", // test data group + ".*", 2, 2); // test function + // + // Finish off by printing out the compiler/stdlib/platform names, + // we do this to make it easier to mark up expected error rates. + // + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; +} + +template +void test(T t, const char* p) +{ + test_trigamma(t, p); +} + +BOOST_AUTO_TEST_CASE( test_main ) +{ + expected_results(); + ALL_TESTS +} + diff --git a/test/test_trigamma.cpp b/test/test_trigamma.cpp index 1a5a1f240..9e471dc1c 100644 --- a/test/test_trigamma.cpp +++ b/test/test_trigamma.cpp @@ -1,165 +1,56 @@ - -/////////////////////////////////////////////////////////////////////////////// -// Copyright 2013 Nikhar Agrawal -// Distributed under the Boost -// Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2014. +// 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) -#define BOOST_TEST_MAIN +#include +#include "test_trigamma.hpp" -#include -#include -#include -#include -#include - -#define SC_(x) static_cast::type>(BOOST_JOIN(x, L)) - -template -void test(const char* name) +void expected_results() { - std::cout << "Testing type " << name << ":\n"; - - static const typename table_type::type data[] = + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + const char* largest_type; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + if(boost::math::policies::digits >() == boost::math::policies::digits >()) { - /* First 50 from 1 to 50 inclusive: */ - /* [Table[N[polygamma(1,x),40],{x, 1,50,1}] */ - - SC_(1.644934066848226436472415166646025189219), - SC_(0.6449340668482264364724151666460251892189), - SC_(0.3949340668482264364724151666460251892189), - SC_(0.2838229557371153253613040555349140781078), - SC_(0.2213229557371153253613040555349140781078), - SC_(0.1813229557371153253613040555349140781078), - SC_(0.1535451779593375475835262777571363003301), - SC_(0.1331370146940314251345466859204016064525), - SC_(0.1175120146940314251345466859204016064525), - SC_(0.1051663356816857461222010069080559274402), - SC_(0.09516633568168574612220100690805592744016), - SC_(0.08690187287176839075030018046177493570463), - SC_(0.07995742842732394630585573601733049126018), - SC_(0.07404026866401033683840011471555534333119), - SC_(0.06893822784768380622615521675637166986180), - SC_(0.06449378340323936178171077231192722541736), - SC_(0.06058753340323936178171077231192722541736), - SC_(0.05712732579078261437686648165448777905057), - SC_(0.05404090603769619462378006190140135929749), - SC_(0.05127082293520311983153629458838196871577), - SC_(0.04877082293520311983153629458838196871577), - SC_(0.04650324923905799511498300660652255828493), - SC_(0.04443713353657865627200779999495231035105), - SC_(0.04254677436833669029847282835033983398054), - SC_(0.04081066325722557918736171723922872286943), - SC_(0.03921066325722557918736171723922872286943), - SC_(0.03773137331639717682049781191378493588718), - SC_(0.03635963120391432359690384757907986044136), - SC_(0.03508412099983269094384262308928394207401), - SC_(0.03389506035773994421375938884433744980291), - SC_(0.03278394924662883310264827773322633869180), - SC_(0.03174336652030209012658168043874142714133), - SC_(0.03076680402030209012658168043874142714133), - SC_(0.02984853037475571730748158861137687250405), - SC_(0.02898347847164153045627051594701701091235), - SC_(0.02816715194102928555831133227354762315725), - SC_(0.02739554700275768062003972733527601821898), - SC_(0.02666508681283803124093088876697799046149), - SC_(0.02597256603721476254286994693872314281606), - SC_(0.02531510384129102815759710012741479304617), - SC_(0.02469010384129102815759710012741479304617), - SC_(0.02409521984367056414807895616548736889388), - SC_(0.02352832641963428296894063417002251628617), - SC_(0.02298749353699501850166102356969801655659), - SC_(0.02247096461137518379091722191680545457312), - SC_(0.02197713745088135663042339475631162741262), - SC_(0.02150454765882086513703965184515850832000), - SC_(0.02105185413233829383780923084017887952869), - SC_(0.02061782635456051606003145306240110175091), - SC_(0.02020133322669712580597064506573304677382), - - /* From 500 to 1000 inclusive: */ - /* N[Table[polygamma(1,x),{x,500,1000,10}],40] */ - - SC_(0.002002001333332266669714268647774197060731), - SC_(0.001962707907716779452707536987802627805478), - SC_(0.001924927220830560087836886751110357728817), - SC_(0.001888573565201797462176247714903982850228), - SC_(0.001853567587934717491642342315537909130701), - SC_(0.001819835712496207207148883544824689071325), - SC_(0.001787309622509112919049294530378524341727), - SC_(0.001755925799930688909525507873736210387807), - SC_(0.001725625111046822227695996850789819829573), - SC_(0.001696352434604175251311909533625714712743), - SC_(0.001668056327160065158600874171864846275643), - SC_(0.001640688721375697019508021597082845963148), - SC_(0.001614204653530344531908147526628406223744), - SC_(0.001588562017007133389350166010439711886334), - SC_(0.001563721338907567163849825550712474891492), - SC_(0.001539645577302094752249567207416345365696), - SC_(0.001516299936926392520203240617160426547639), - SC_(0.001493651701394760695953585236460286481018), - SC_(0.001471670080229094300578280356096446686477), - SC_(0.001450326069199311597153133670448160203387), - SC_(0.001429592322643144721734539533648659286144), - SC_(0.001409443036583397946176993267702984100733), - SC_(0.001389853841592191696522797555468410819444), - SC_(0.001370801704466910484446604323882526177420), - SC_(0.001352264837883752677688324896962748941904), - SC_(0.001334222617283810151070001951163903617504), - SC_(0.001316655504325086010791929491458814498671), - SC_(0.001299544976303159784503980965599319524818), - SC_(0.001282873461004509259711608908038169904080), - SC_(0.001266624276510810009925604298617591070236), - SC_(0.001250781575520731608186449075029891794096), - SC_(0.001235330293798588858327739384385581649440), - SC_(0.001220256102397340964751055441376021959125), - SC_(0.001205545363337428588618639743321944385431), - SC_(0.001191185088453291061973294466848346283972), - SC_(0.001177162901146542691814823893259588004310), - SC_(0.001163467000809082214935959719602656350021), - SC_(0.001150086129701189861587852965952522886083), - SC_(0.001137009542089218078848777802653932997102), - SC_(0.001124226975465055320838136039288794501131), - SC_(0.001111728623685357358627683939948964547062), - SC_(0.001099505111882790624790340268963560561212), - SC_(0.001087547473014387385213628807079818129189), - SC_(0.001075847125923723081414745258211721267207), - SC_(0.001064395854804124498228502056895669702911), - SC_(0.001053185789959620623711365384007169340153), - SC_(0.001042209389768959890535954112125269154314), - SC_(0.001031459423765829864168427986966001957702), - SC_(0.001020928956755509990450221440026807721340), - SC_(0.001010611333894637278361033654755961804543), - SC_(0.001000500166666633333357142823809599566846) - }; - - static const unsigned index[] = - { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1000 - }; - - - static const unsigned table_size = sizeof(index) / sizeof(index[0]); - - T tol = boost::math::tools::epsilon() * 10; - for(unsigned i = 1; i < table_size; ++i) - { - T x(index[i]); - T tg = boost::math::trigamma(x); - BOOST_CHECK_CLOSE_FRACTION(tg, static_cast(data[i]), tol); + largest_type = "(long\\s+)?double|real_concept"; } + else + { + largest_type = "long double|real_concept"; + } +#else + largest_type = "(long\\s+)?double|real_concept"; +#endif + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + ".*", // test data group + ".*", 20, 10); // test function + // + // Finish off by printing out the compiler/stdlib/platform names, + // we do this to make it easier to mark up expected error rates. + // + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; } - -BOOST_AUTO_TEST_CASE(test_main) +BOOST_AUTO_TEST_CASE( test_main ) { - test("float"); - test("double"); + expected_results(); + BOOST_MATH_CONTROL_FP; + + test_trigamma(0.0F, "float"); + test_trigamma(0.0, "double"); #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - test("long double"); - test("real_concept"); + test_trigamma(0.0L, "long double"); + test_trigamma(boost::math::concepts::real_concept(0.1), "real_concept"); #endif } - diff --git a/test/test_trigamma.hpp b/test/test_trigamma.hpp new file mode 100644 index 000000000..9535bbba8 --- /dev/null +++ b/test/test_trigamma.hpp @@ -0,0 +1,74 @@ +// Copyright John Maddock 2014 +// 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) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error + +#include +#include +#define BOOST_TEST_MAIN +#include +#include +#include +#include +#include +#include +#include +#include "functor.hpp" + +#include "handle_test_result.hpp" +#include "table_type.hpp" + +#ifndef SC_ +#ifndef BOOST_FLOAT128_C +#define SC_(x) static_cast::type>(BOOST_JOIN(x, L)) +#else +#define SC_(x) static_cast::type>(BOOST_FLOAT128_C(x)) +#endif +#endif + +template +void do_test_trigamma(const T& data, const char* type_name, const char* test_name) +{ + typedef Real value_type; + + typedef value_type(*pg)(value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::trigamma; +#else + pg funcp = boost::math::trigamma; +#endif + + boost::math::tools::test_result result; + + std::cout << "Testing " << test_name << " with type " << type_name + << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; + + // + // test trigamma against data: + // + result = boost::math::tools::test_hetero( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::trigamma", test_name); + std::cout << std::endl; +} + +template +void test_trigamma(T, const char* name) +{ + typedef typename table_type::type value_type; + + boost::array, 659> data = + { { + { SC_(1.0), SC_(1.6449340668482264364724151666460252) }, { SC_(2.0), SC_(0.64493406684822643647241516664602519) }, { SC_(3.0), SC_(0.39493406684822643647241516664602519) }, { SC_(4.0), SC_(0.28382295573711532536130405553491408) }, { SC_(5.0), SC_(0.22132295573711532536130405553491408) }, { SC_(6.0), SC_(0.18132295573711532536130405553491408) }, { SC_(7.0), SC_(0.15354517795933754758352627775713630) }, { SC_(8.0), SC_(0.13313701469403142513454668592040161) }, { SC_(9.0), SC_(0.11751201469403142513454668592040161) }, { SC_(10.0), SC_(0.10516633568168574612220100690805593) }, { SC_(11.0), SC_(0.095166335681685746122201006908055927) }, { SC_(12.0), SC_(0.086901872871768390750300180461774936) }, { SC_(13.0), SC_(0.079957428427323946305855736017330491) }, { SC_(14.0), SC_(0.074040268664010336838400114715555343) }, { SC_(15.0), SC_(0.068938227847683806226155216756371670) }, { SC_(16.0), SC_(0.064493783403239361781710772311927225) }, { SC_(17.0), SC_(0.060587533403239361781710772311927225) }, { SC_(18.0), SC_(0.057127325790782614376866481654487779) }, { SC_(19.0), SC_(0.054040906037696194623780061901401359) }, { SC_(20.0), SC_(0.051270822935203119831536294588381969) }, { SC_(21.0), SC_(0.048770822935203119831536294588381969) }, { SC_(22.0), SC_(0.046503249239057995114983006606522558) }, { SC_(23.0), SC_(0.044437133536578656272007799994952310) }, { SC_(24.0), SC_(0.042546774368336690298472828350339834) }, { SC_(25.0), SC_(0.040810663257225579187361717239228723) }, { SC_(26.0), SC_(0.039210663257225579187361717239228723) }, { SC_(27.0), SC_(0.037731373316397176820497811913784936) }, { SC_(28.0), SC_(0.036359631203914323596903847579079860) }, { SC_(29.0), SC_(0.035084120999832690943842623089283942) }, { SC_(30.0), SC_(0.033895060357739944213759388844337450) }, { SC_(31.0), SC_(0.032783949246628833102648277733226339) }, { SC_(32.0), SC_(0.031743366520302090126581680438741427) }, { SC_(33.0), SC_(0.030766804020302090126581680438741427) }, { SC_(34.0), SC_(0.029848530374755717307481588611376873) }, { SC_(35.0), SC_(0.028983478471641530456270515947017011) }, { SC_(36.0), SC_(0.028167151941029285558311332273547623) }, { SC_(37.0), SC_(0.027395547002757680620039727335276018) }, { SC_(38.0), SC_(0.026665086812838031240930888766977990) }, { SC_(39.0), SC_(0.025972566037214762542869946938723143) }, { SC_(40.0), SC_(0.025315103841291028157597100127414793) }, { SC_(41.0), SC_(0.024690103841291028157597100127414793) }, { SC_(42.0), SC_(0.024095219843670564148078956165487369) }, { SC_(43.0), SC_(0.023528326419634282968940634170022516) }, { SC_(44.0), SC_(0.022987493536995018501661023569698017) }, { SC_(45.0), SC_(0.022470964611375183790917221916805455) }, { SC_(46.0), SC_(0.021977137450881356630423394756311627) }, { SC_(47.0), SC_(0.021504547658820865137039651845158508) }, { SC_(48.0), SC_(0.021051854132338293837809230840178880) }, { SC_(49.0), SC_(0.020617826354560516060031453062401102) }, { SC_(50.0), SC_(0.020201333226697125805970645065733047) }, { SC_(51.0), SC_(0.019801333226697125805970645065733047) }, { SC_(52.0), SC_(0.019416865714201931649876834992684219) }, { SC_(53.0), SC_(0.019047043228994831058160858661323273) }, { SC_(54.0), SC_(0.018691044652989135080944767525687815) }, { SC_(55.0), SC_(0.018348109124868421775046276442011546) }, { SC_(56.0), SC_(0.018017530612471727560170243384160307) }, { SC_(57.0), SC_(0.017698653061451319396904937261711327) }, { SC_(58.0), SC_(0.017390866050063199975544518671375839) }, { SC_(59.0), SC_(0.017093600889540013293023710110139216) }, { SC_(60.0), SC_(0.016806327117635388185296045645904801) }, { SC_(61.0), SC_(0.016528549339857610407518267868127023) }, { SC_(62.0), SC_(0.016259804378825629757155462170733849) }, { SC_(63.0), SC_(0.015999658697243944013138812847112621) }, { SC_(64.0), SC_(0.015747706064338930155744003071350465) }, { SC_(65.0), SC_(0.015503565439338930155744003071350465) }, { SC_(66.0), SC_(0.015266879048806385777045778219279459) }, { SC_(67.0), SC_(0.015037310637419792572270755262438320) }, { SC_(68.0), SC_(0.014814543874220861852734110129892096) }, { SC_(69.0), SC_(0.014598280898442315139931341963802130) }, { SC_(70.0), SC_(0.014388240990859874476205234003289633) }, { SC_(71.0), SC_(0.014184159358206813251715438084922286) }, { SC_(72.0), SC_(0.013985786019583524221761063952805643) }, { SC_(73.0), SC_(0.013792884785015622987193162718237741) }, { SC_(74.0), SC_(0.013605232317385673653359422804557876) }, { SC_(75.0), SC_(0.013422617269905761308582213162483370) }, { SC_(76.0), SC_(0.013244839492127983530804435384705592) }, { SC_(77.0), SC_(0.013071709298222166356289199927641880) }, { SC_(78.0), SC_(0.012903046791897322369107550408330023) }, { SC_(79.0), SC_(0.012738681242916388772789338705502935) }, { SC_(80.0), SC_(0.012578450510661942369969277817824679) }, { SC_(81.0), SC_(0.012422200510661942369969277817824679) }, { SC_(82.0), SC_(0.012269784720386069789569948447301893) }, { SC_(83.0), SC_(0.012121063720980953787190412456820037) }, { SC_(84.0), SC_(0.011975904771931744903462730645236352) }, { SC_(85.0), SC_(0.011834181415922674608678150146370139) }, { SC_(86.0), SC_(0.011695773111424404712484378520072561) }, { SC_(87.0), SC_(0.011560564890764588595664475869991436) }, { SC_(88.0), SC_(0.011428447041643172292321894287219604) }, { SC_(89.0), SC_(0.011299314810238213614635943873996463) }, { SC_(90.0), SC_(0.011173068124213721757547192453721246) }, { SC_(91.0), SC_(0.011049611334090264967423735663597789) }, { SC_(92.0), SC_(0.010928852971573660692577702575806459) }, { SC_(93.0), SC_(0.010810705523558537819231766848018180) }, { SC_(94.0), SC_(0.010695085220633344155224367148630967) }, { SC_(95.0), SC_(0.010581911839012701330416761897386060) }, { SC_(96.0), SC_(0.010471108514912978338727011204865284) }, { SC_(97.0), SC_(0.010362601570468533894282566760420840) }, { SC_(98.0), SC_(0.010256320350360127049771991779020053) }, { SC_(99.0), SC_(0.010152197068394279486256789779853040) }, { SC_(100.0), SC_(0.010050166663333571395245668465701423) }, { SC_(101.0), SC_(0.0099501666633335713952456684657014225) }, { SC_(102.0), SC_(0.0098521370583928793062347871795530057) }, { SC_(103.0), SC_(0.0097560201802690807672113346612907989) }, { SC_(104.0), SC_(0.0096617605893557053312607266869294076) }, { SC_(105.0), SC_(0.0095693049680539301833317326040891709) }, { SC_(106.0), SC_(0.0094786020202081251946696010848147945) }, { SC_(107.0), SC_(0.0093896023762067012003655783009059301) }, { SC_(108.0), SC_(0.0093022585033793800369451922409880334) }, { SC_(109.0), SC_(0.0092165246213492017104705694700689662) }, { SC_(110.0), SC_(0.0091323566220225457050838175131629818) }, { SC_(111.0), SC_(0.0090497119939233721513648092487001719) }, { SC_(112.0), SC_(0.0089685497505989666647971605188892799) }, { SC_(113.0), SC_(0.0088888303628438646239808339882770350) }, { SC_(114.0), SC_(0.0088105156945064850327834027093985011) }, { SC_(115.0), SC_(0.0087335689416594551774432980618146291) }, { SC_(116.0), SC_(0.0086579545749297765385018991960301301) }, { SC_(117.0), SC_(0.0085836382847989798678716970557209743) }, { SC_(118.0), SC_(0.0085105869296963427139524918544644910) }, { SC_(119.0), SC_(0.0084387684867201864370205757384058871) }, { SC_(120.0), SC_(0.0083681520048333140410033453168254903) }, { SC_(121.0), SC_(0.0082987075603888695965589008723810458) }, { SC_(122.0), SC_(0.0082304062148523625273696378438993847) }, { SC_(123.0), SC_(0.0081632199745943673647789364195510913) }, { SC_(124.0), SC_(0.0080971217526365380303880315348924886) }, { SC_(125.0), SC_(0.0080320853322411165943838692039871816) }, { SC_(126.0), SC_(0.0079680853322411165943838692039871816) }, { SC_(127.0), SC_(0.0079050971740148631300351667600466424) }, { SC_(128.0), SC_(0.0078430970500146151295391657680446584) }, { SC_(129.0), SC_(0.0077820618937646151295391657680446584) }, { SC_(130.0), SC_(0.0077219693512491412998414312568974918) }, { SC_(131.0), SC_(0.0076627977536160052051668750438797403) }, { SC_(132.0), SC_(0.0076045260911254743503215863077920997) }, { SC_(133.0), SC_(0.0075471339882788260491278305685818151) }, { SC_(134.0), SC_(0.0074906016800646816656126516438263173) }, { SC_(135.0), SC_(0.0074349099892649489857284903606897613) }, { SC_(136.0), SC_(0.0073800403047656348567847317873015583) }, { SC_(137.0), SC_(0.0073259745608209981785840397457790669) }, { SC_(138.0), SC_(0.0072726952172225113119422367727916941) }, { SC_(139.0), SC_(0.0072201852403269011460107097826635698) }, { SC_(140.0), SC_(0.0071684280849001633995172570628250521) }, { SC_(141.0), SC_(0.0071174076767368980933948080832332154) }, { SC_(142.0), SC_(0.0070671083960166123934803168604577010) }, { SC_(143.0), SC_(0.0070175150613607901359917233274285402) }, { SC_(144.0), SC_(0.0069686129145565454296491148869180018) }, { SC_(145.0), SC_(0.0069203876059145701210071395782760264) }, { SC_(146.0), SC_(0.0068728251802308602518038102084781668) }, { SC_(147.0), SC_(0.0068259120633233729183453752300582005) }, { SC_(148.0), SC_(0.0067796350491163295567830632304284166) }, { SC_(149.0), SC_(0.0067339812872463514705887608199097899) }, { SC_(150.0), SC_(0.0066889382711659947299014043945235460) }, { SC_(151.0), SC_(0.0066444938267215502854569599500791016) }, { SC_(152.0), SC_(0.0066006361011831967044736697435092143) }, { SC_(153.0), SC_(0.0065573535527067424108448608792432863) }, { SC_(154.0), SC_(0.0065146349402072763935011042044600833) }, { SC_(155.0), SC_(0.0064724693136260653967056918246321191) }, { SC_(156.0), SC_(0.0064308460045729956776630279328527226) }, { SC_(157.0), SC_(0.0063897546173277622785834750071459507) }, { SC_(158.0), SC_(0.0063491850201838619175140604264327372) }, { SC_(159.0), SC_(0.0063091273371202503168090452045131730) }, { SC_(160.0), SC_(0.0062695719397862840971183684116647889) }, { SC_(161.0), SC_(0.0062305094397862840971183684116647889) }, { SC_(162.0), SC_(0.0061919306812507337711278587862645343) }, { SC_(163.0), SC_(0.0061538267336817656260280264436338377) }, { SC_(164.0), SC_(0.0061161888850611927779720213248864253) }, { SC_(165.0), SC_(0.0060790086352099137773771373272659613) }, { SC_(166.0), SC_(0.0060422776893880588646131336541713791) }, { SC_(167.0), SC_(0.0060059879521257566436812132012754581) }, { SC_(168.0), SC_(0.0059701315212748835395899944411908369) }, { SC_(169.0), SC_(0.0059347006822726159658938493164742836) }, { SC_(170.0), SC_(0.0058996879026080383950805024448661467) }, { SC_(171.0), SC_(0.0058650858264834709210320595382917522) }, { SC_(172.0), SC_(0.0058308872696625687631031241393655869) }, { SC_(173.0), SC_(0.0057970852144976147338981484768453056) }, { SC_(174.0), SC_(0.0057636728051287751468755282757026012) }, { SC_(175.0), SC_(0.0057306433428484210710398828800096431) }, { SC_(176.0), SC_(0.0056979902816239312751215155330708676) }, { SC_(177.0), SC_(0.0056657072237726916057000279297650825) }, { SC_(178.0), SC_(0.0056337879157832888159525096559612586) }, { SC_(179.0), SC_(0.0056022262442771658516803218008924541) }, { SC_(180.0), SC_(0.0055710162321052611046374704541804289) }, { SC_(181.0), SC_(0.0055401520345743969071066062566495647) }, { SC_(182.0), SC_(0.0055096279357984132680235501838801132) }, { SC_(183.0), SC_(0.0054794383451692621993120419119322808) }, { SC_(184.0), SC_(0.0054495777939434865714939523899997060) }, { SC_(185.0), SC_(0.0054200409319397058531574684580526360) }, { SC_(186.0), SC_(0.0053908225243429198779931149153207149) }, { SC_(187.0), SC_(0.0053619174486116214619912649904739118) }, { SC_(188.0), SC_(0.0053333206914838797479016427536355693) }, { SC_(189.0), SC_(0.0053050273460787190416997414408243425) }, { SC_(190.0), SC_(0.0052770326090892730575447625768507695) }, { SC_(191.0), SC_(0.0052493317780643423096223249037205756) }, { SC_(192.0), SC_(0.0052219202487751232640917747543277410) }, { SC_(193.0), SC_(0.0051947935126640121529806636432166299) }, { SC_(194.0), SC_(0.0051679471543725143946515809832794503) }, { SC_(195.0), SC_(0.0051413768493454126835239372379292537) }, { SC_(196.0), SC_(0.0051150783615084633081130233654769197) }, { SC_(197.0), SC_(0.0050890475410170014172342228656851663) }, { SC_(198.0), SC_(0.0050632803220729420495617757529020490) }, { SC_(199.0), SC_(0.0050377727208077650268089954243641447) }, { SC_(200.0), SC_(0.0050125208332291685267206138178390569) }, { SC_(201.0), SC_(0.0049875208332291685267206138178390569) }, { SC_(202.0), SC_(0.0049627689706515095578832088031116987) }, { SC_(203.0), SC_(0.0049382615694163365356304884815745945) }, { SC_(204.0), SC_(0.0049139950257001580309349122724940538) }, { SC_(205.0), SC_(0.0048899658061692083961790491429285021) }, { SC_(206.0), SC_(0.0048661704462643898357983233844514052) }, { SC_(207.0), SC_(0.0048426055485360459768106713908610573) }, { SC_(208.0), SC_(0.0048192677810268859030633260619152243) }, { SC_(209.0), SC_(0.0047961538757014421160810775412051651) }, { SC_(210.0), SC_(0.0047732606269205076136658397948165751) }, { SC_(211.0), SC_(0.0047505848899590563665003069149979810) }, { SC_(212.0), SC_(0.0047281235795662080477293898196946410) }, { SC_(213.0), SC_(0.0047058736685658520491533841237174249) }, { SC_(214.0), SC_(0.0046838321864965977124917869979266868) }, { SC_(215.0), SC_(0.0046619962182897674216366904829472126) }, { SC_(216.0), SC_(0.0046403629029841968429455060589342326) }, { SC_(217.0), SC_(0.0046189294324766522613268503662044658) }, { SC_(218.0), SC_(0.0045976930503067187312030422581537533) }, { SC_(219.0), SC_(0.0045766510504750547298563542689272572) }, { SC_(220.0), SC_(0.0045558007762939492483192720562961611) }, { SC_(221.0), SC_(0.0045351396192691558598895199901804586) }, { SC_(222.0), SC_(0.0045146650180120153427010922348109944) }, { SC_(223.0), SC_(0.0044943744571809139710591800523582715) }, { SC_(224.0), SC_(0.0044742654664511586974763611740377744) }, { SC_(225.0), SC_(0.0044543356195123831872722795413847131) }, { SC_(226.0), SC_(0.0044345825330926301008525264549649601) }, { SC_(227.0), SC_(0.0044150038660082852030531686352453266) }, { SC_(228.0), SC_(0.0043955973182390678691247011703226617) }, { SC_(229.0), SC_(0.0043763606300273104052896750084266937) }, { SC_(230.0), SC_(0.0043572915810007853580937786677772019) }, { SC_(231.0), SC_(0.0043383879893183656983584289513310771) }, { SC_(232.0), SC_(0.0043196477108378274775604678936297597) }, { SC_(233.0), SC_(0.0043010686383051283099029173585524707) }, { SC_(234.0), SC_(0.0042826487005645178731661935286790157) }, { SC_(235.0), SC_(0.0042643858617888585846863922283648949) }, { SC_(236.0), SC_(0.0042462781207295557327171753881657097) }, { SC_(237.0), SC_(0.0042283235099855166634841963591510587) }, { SC_(238.0), SC_(0.0042105200952905781742819673716312524) }, { SC_(239.0), SC_(0.0041928659748188600752776597662361532) }, { SC_(240.0), SC_(0.0041753592785075209880768054394561599) }, { SC_(241.0), SC_(0.0041579981673964098769656943283450488) }, { SC_(242.0), SC_(0.0041407808329841235871290868319176457) }, { SC_(243.0), SC_(0.0041237054965999968198317710747972304) }, { SC_(244.0), SC_(0.0041067704087915665331207344780724764) }, { SC_(245.0), SC_(0.0040899738487270677424730591219854030) }, { SC_(246.0), SC_(0.0040733141236125321323106268021186808) }, { SC_(247.0), SC_(0.0040567895681230747987129005809540301) }, { SC_(248.0), SC_(0.0040403985438479678472795055080959272) }, { SC_(249.0), SC_(0.0040241394387491124882784649253696005) }, { SC_(250.0), SC_(0.0040080106666325337234198336129714134) }, { SC_(251.0), SC_(0.0039920106666325337234198336129714134) }, { SC_(252.0), SC_(0.0039761379027081515707555901882638690) }, { SC_(253.0), SC_(0.0039603908631515882046684145772787342) }, { SC_(254.0), SC_(0.0039447680601082661718292825802158212) }, { SC_(255.0), SC_(0.0039292680291082041717052823322153252) }, { SC_(256.0), SC_(0.0039138893286083964054615299292933721) }, { SC_(257.0), SC_(0.0038986305395458964054615299292933721) }, { SC_(258.0), SC_(0.0038834902649013143527430936168586645) }, { SC_(259.0), SC_(0.0038684671292724458953186599890718729) }, { SC_(260.0), SC_(0.0038535597784577591732960306305351784) }, { SC_(261.0), SC_(0.0038387668790494751496273915772807406) }, { SC_(262.0), SC_(0.0038240871180359844492559936236394259) }, { SC_(263.0), SC_(0.0038095192024133517355446714396175157) }, { SC_(264.0), SC_(0.0037950618588056662116828258151325586) }, { SC_(265.0), SC_(0.0037807138330940041363843868803299874) }, { SC_(266.0), SC_(0.0037664738900537762972957432349045691) }, { SC_(267.0), SC_(0.0037523408130002402014169485037156947) }, { SC_(268.0), SC_(0.0037383134034419633284070872347962260) }, { SC_(269.0), SC_(0.0037243904807420301584360469140120870) }, { SC_(270.0), SC_(0.0037105708817867918394520638292012082) }, { SC_(271.0), SC_(0.0036968534606619633072161241858541575) }, { SC_(272.0), SC_(0.0036832370883358784227510433726844022) }, { SC_(273.0), SC_(0.0036697206523497192532008703623037793) }, { SC_(274.0), SC_(0.0036563030565145410004402000192158538) }, { SC_(275.0), SC_(0.0036429832206149192837797492759690106) }, { SC_(276.0), SC_(0.0036297600801190515151847079536549610) }, { SC_(277.0), SC_(0.0036166325858951489737018262061229300) }, { SC_(278.0), SC_(0.0036035997039339608961822443009762449) }, { SC_(279.0), SC_(0.0035906604150772764595588811210166154) }, { SC_(280.0), SC_(0.0035778137147522549413358367099735918) }, { SC_(281.0), SC_(0.0035650586127114386148052244650756327) }, { SC_(282.0), SC_(0.0035523941327783070688521590277078182) }, { SC_(283.0), SC_(0.0035398193125982356438735362220139396) }, { SC_(284.0), SC_(0.0035273332033947245499655089024070023) }, { SC_(285.0), SC_(0.0035149348697307689855933605191497121) }, { SC_(286.0), SC_(0.0035026233892752442087389437755362926) }, { SC_(287.0), SC_(0.0034903978525741830321532916654086580) }, { SC_(288.0), SC_(0.0034782573628268266237957785233285065) }, { SC_(289.0), SC_(0.0034662010356663327966352846961680126) }, { SC_(290.0), SC_(0.0034542279989450291723970691575609557) }, { SC_(291.0), SC_(0.0034423373925241017050962368151114908) }, { SC_(292.0), SC_(0.0034305283680676120557061729282891812) }, { SC_(293.0), SC_(0.0034188000888407402223415641836841896) }, { SC_(294.0), SC_(0.0034071517295121516540414092605051194) }, { SC_(295.0), SC_(0.0033955824759603908136508312605976734) }, { SC_(296.0), SC_(0.0033840915250842058093417246820282968) }, { SC_(297.0), SC_(0.0033726780846167112877931490793986401) }, { SC_(298.0), SC_(0.0033613413729432992776808022667151271) }, { SC_(299.0), SC_(0.0033500806189232100925089631603685662) }, { SC_(300.0), SC_(0.0033388950617146777494702946890986698) }, { SC_(301.0), SC_(0.0033277839506035666383591835779875587) }, { SC_(302.0), SC_(0.0033167465448354183839249058106339975) }, { SC_(303.0), SC_(0.0033057821134508299886790832589915257) }, { SC_(304.0), SC_(0.0032948899351240864232334297827528127) }, { SC_(305.0), SC_(0.0032840692980049728498262275666863307) }, { SC_(306.0), SC_(0.0032733194995636936238117153387906038) }, { SC_(307.0), SC_(0.0032626398464388271194757761700948030) }, { SC_(308.0), SC_(0.0032520296542882472724747469814561968) }, { SC_(309.0), SC_(0.0032414882476429445232758938864992057) }, { SC_(310.0), SC_(0.0032310149597636805859480485560146067) }, { SC_(311.0), SC_(0.0032206091325004131561873825830697576) }, { SC_(312.0), SC_(0.0032102701161544283131853457968495985) }, { SC_(313.0), SC_(0.0031999972693431199634154575654229056) }, { SC_(314.0), SC_(0.0031897899588673572221401561945811087) }, { SC_(315.0), SC_(0.0031796475595813821318728025494028053) }, { SC_(316.0), SC_(0.0031695694542651815775770101583723190) }, { SC_(317.0), SC_(0.0031595550334992786774007563528924280) }, { SC_(318.0), SC_(0.0031496036955418903065342933569426225) }, { SC_(319.0), SC_(0.0031397148462083987516116241587305265) }, { SC_(320.0), SC_(0.0031298878987530867951646552806731175) }, { SC_(321.0), SC_(0.0031201222737530867951646552806731175) }, { SC_(322.0), SC_(0.0031104173989944955547846123851266845) }, { SC_(323.0), SC_(0.0031007727093606079732869849787766208) }, { SC_(324.0), SC_(0.0030911876467222236314453110434374534) }, { SC_(325.0), SC_(0.0030816616598299815951703529577797793) }, { SC_(326.0), SC_(0.0030721942042086798200224239636969390) }, { SC_(327.0), SC_(0.0030627847420535366080084226840100859) }, { SC_(328.0), SC_(0.0030534327421283526074098946887983099) }, { SC_(329.0), SC_(0.0030441376796655328572611736893931939) }, { SC_(330.0), SC_(0.0030348990362679293613585120362303443) }, { SC_(331.0), SC_(0.0030257162998124656331675111179566988) }, { SC_(332.0), SC_(0.0030165889643555055835148062320940287) }, { SC_(333.0), SC_(0.0030075165300399300282818261188700484) }, { SC_(334.0), SC_(0.0029984985030038849742187540377799493) }, { SC_(335.0), SC_(0.0029895343952911666981959493477587940) }, { SC_(336.0), SC_(0.0029806237247632094694144835424569450) }, { SC_(337.0), SC_(0.0029717660150126425759904472612778067) }, { SC_(338.0), SC_(0.0029629607952783841075703678381958037) }, { SC_(339.0), SC_(0.0029542076003622397148670311202937695) }, { SC_(340.0), SC_(0.0029455059705469753158450943115294879) }, { SC_(341.0), SC_(0.0029368554515158334473329835848858893) }, { SC_(342.0), SC_(0.0029282555942734636706712761692289892) }, { SC_(343.0), SC_(0.0029197059550682381311890423194974479) }, { SC_(344.0), SC_(0.0029112060953159240443714748093613651) }, { SC_(345.0), SC_(0.0029027555815246855370702308937312948) }, { SC_(346.0), SC_(0.0028943539852213879105211865753107949) }, { SC_(347.0), SC_(0.0028860008828791780137655315250251188) }, { SC_(348.0), SC_(0.0028776958558463150217964926658036320) }, { SC_(349.0), SC_(0.0028694384902762265028375813168803925) }, { SC_(350.0), SC_(0.0028612283770587652340466846904159136) }, { SC_(351.0), SC_(0.0028530651117526427850670928536812197) }, { SC_(352.0), SC_(0.0028449482945190164346316256090971660) }, { SC_(353.0), SC_(0.0028368775300562065172762537082707197) }, { SC_(354.0), SC_(0.0028288524275355218155291888895176601) }, { SC_(355.0), SC_(0.0028208726005381711180923093210667042) }, { SC_(356.0), SC_(0.0028129376669932395568941343557820384) }, { SC_(357.0), SC_(0.0028050472491167088158260873920148373) }, { SC_(358.0), SC_(0.0027972009733515007718241729007281265) }, { SC_(359.0), SC_(0.0027893984703085245850634600640501202) }, { SC_(360.0), SC_(0.0027816393747087076997196157425442350) }, { SC_(361.0), SC_(0.0027739233253259916503368996931615189) }, { SC_(362.0), SC_(0.0027662499649312739916326233294135428) }, { SC_(363.0), SC_(0.0027586189402372780818618593112211799) }, { SC_(364.0), SC_(0.0027510299018443328519519411969454398) }, { SC_(365.0), SC_(0.0027434825041870450847740641289584817) }, { SC_(366.0), SC_(0.0027359764054818471114207145324112871) }, { SC_(367.0), SC_(0.0027285112676754032044661921519281434) }, { SC_(368.0), SC_(0.0027210867563938583121587282907368063) }, { SC_(369.0), SC_(0.0027137025408929131325746073077500388) }, { SC_(370.0), SC_(0.0027063582940087098731978400983435274) }, { SC_(371.0), SC_(0.0026990536921095133794067517126605471) }, { SC_(372.0), SC_(0.0026917884150481726451778518935659459) }, { SC_(373.0), SC_(0.0026845621461153480411773894123542452) }, { SC_(374.0), SC_(0.0026773745719934899095154066481569894) }, { SC_(375.0), SC_(0.0026702253827115544809930010889474037) }, { SC_(376.0), SC_(0.0026631142716004433698818899778362926) }, { SC_(377.0), SC_(0.0026560409352491531933314146496334859) }, { SC_(378.0), SC_(0.0026490050734616221475912771688941576) }, { SC_(379.0), SC_(0.0026420063892142606515525324529007643) }, { SC_(380.0), SC_(0.0026350445886141534398232908018401340) }, { SC_(381.0), SC_(0.0026281193808579207528426813835575855) }, { SC_(382.0), SC_(0.0026212304781912265305653479400018095) }, { SC_(383.0), SC_(0.0026143775958689217691827104026536009) }, { SC_(384.0), SC_(0.0026075604521158114473453538183153069) }, { SC_(385.0), SC_(0.0026007787680880336695675760405375292) }, { SC_(386.0), SC_(0.0025940322678350399100803100597650549) }, { SC_(387.0), SC_(0.0025873206782621654704980393947807600) }, { SC_(388.0), SC_(0.0025806437290937794894205133379866304) }, { SC_(389.0), SC_(0.0025740011528370040616386024016490812) }, { SC_(390.0), SC_(0.0025673926847459922390891875814985403) }, { SC_(391.0), SC_(0.0025608180627867548952364591133854568) }, { SC_(392.0), SC_(0.0025542770276025266392726702841653444) }, { SC_(393.0), SC_(0.0025477693224796611665529701592174061) }, { SC_(394.0), SC_(0.0025412946933140466271257158552076682) }, { SC_(395.0), SC_(0.0025348528885780317852076040770118889) }, { SC_(396.0), SC_(0.0025284436592878539290948016415047586) }, { SC_(397.0), SC_(0.0025220667589715596734066065593702826) }, { SC_(398.0), SC_(0.0025157219436374099738336126313585574) }, { SC_(399.0), SC_(0.0025094089717427608488115172297272854) }, { SC_(400.0), SC_(0.0025031276041634114728653862380877857) }, { SC_(401.0), SC_(0.0024968776041634114728653862380877857) }, { SC_(402.0), SC_(0.0024906587373653194211990408795390204) }, { SC_(403.0), SC_(0.0024844707717209046789896896258571809) }, { SC_(404.0), SC_(0.0024783134774822848980662186359489861) }, { SC_(405.0), SC_(0.0024721866271734916425030385555647101) }, { SC_(406.0), SC_(0.0024660899955624567392870653807437986) }, { SC_(407.0), SC_(0.0024600233596334121131131713284736635) }, { SC_(408.0), SC_(0.0024539864985596960025420239022893822) }, { SC_(409.0), SC_(0.0024479791936769585938530581198979943) }, { SC_(410.0), SC_(0.0024420012284567602449670519386819566) }, { SC_(411.0), SC_(0.0024360523884805556048718704990626824) }, { SC_(412.0), SC_(0.0024301324614140570641338923909529743) }, { SC_(413.0), SC_(0.0024242412369819710993869793925553873) }, { SC_(414.0), SC_(0.0024183785069431011992292719545097870) }, { SC_(415.0), SC_(0.0024125440650658111807924356222733288) }, { SC_(416.0), SC_(0.0024067377071038428254433283498099814) }, { SC_(417.0), SC_(0.0024009592307724818786977662196324666) }, { SC_(418.0), SC_(0.0023952084357250665735318270285392980) }, { SC_(419.0), SC_(0.0023894851235298329479280175919421505) }, { SC_(420.0), SC_(0.0023837890976470913367501363996500127) }, { SC_(421.0), SC_(0.0023781201634067285249587531796953642) }, { SC_(422.0), SC_(0.0023724781279860301538143791353151136) }, { SC_(423.0), SC_(0.0023668628003878180741216498614892786) }, { SC_(424.0), SC_(0.0023612739914188974407978175034031103) }, { SC_(425.0), SC_(0.0023557115136688084411538160794088063) }, { SC_(426.0), SC_(0.0023501751814888776453060652143569032) }, { SC_(427.0), SC_(0.0023446648109715640611406659329092186) }, { SC_(428.0), SC_(0.0023391802199300950682761188778603783) }, { SC_(429.0), SC_(0.0023337212278783874955623447491155098) }, { SC_(430.0), SC_(0.0023282876560112491948576104779476722) }, { SC_(431.0), SC_(0.0023228793271848565501848143719444272) }, { SC_(432.0), SC_(0.0023174960658975034459271930197768570) }, { SC_(433.0), SC_(0.0023121376982706173005225290965944153) }, { SC_(434.0), SC_(0.0023068040520300378531949525454367474) }, { SC_(435.0), SC_(0.0023014949564875544706640005184240693) }, { SC_(436.0), SC_(0.0022962102425226978185302972551131960) }, { SC_(437.0), SC_(0.0022909497425647818181936252578065720) }, { SC_(438.0), SC_(0.0022857132905751918847489300454946261) }, { SC_(439.0), SC_(0.0022805007220299155143646594923368520) }, { SC_(440.0), SC_(0.0022753118739023113612106181579726675) }, { SC_(441.0), SC_(0.0022701465846461130141031801414437419) }, { SC_(442.0), SC_(0.0022650046941786637517073676970404326) }, { SC_(443.0), SC_(0.0022598860438643786224102607581980666) }, { SC_(444.0), SC_(0.0022547904764984302608899472788937134) }, { SC_(445.0), SC_(0.0022497178362906549179794692332805327) }, { SC_(446.0), SC_(0.0022446679688496752436959191764695239) }, { SC_(447.0), SC_(0.0022396407211672364253002144568893997) }, { SC_(448.0), SC_(0.0022346359416027523430016192985131504) }, { SC_(449.0), SC_(0.0022296534798680584654505988903498851) }, { SC_(450.0), SC_(0.0022246931870123682655011938774779251) }, { SC_(451.0), SC_(0.0022197549154074299938962556058729868) }, { SC_(452.0), SC_(0.0022148385187328807045613949119727602) }, { SC_(453.0), SC_(0.0022099438519617944801115554570428518) }, { SC_(454.0), SC_(0.0022050707713464218600023009896461977) }, { SC_(455.0), SC_(0.0022002191344041175265201841234155314) }, { SC_(456.0), SC_(0.0021953887999034533555263427999038782) }, { SC_(457.0), SC_(0.0021905796278505139895675862594298863) }, { SC_(458.0), SC_(0.0021857914794753721406719726821563537) }, { SC_(459.0), SC_(0.0021810242172187408788729985969939807) }, { SC_(460.0), SC_(0.0021762777047188002102792478553514026) }, { SC_(461.0), SC_(0.0021715518067981952953454104262398714) }, { SC_(462.0), SC_(0.0021668463894512037039262095002137376) }, { SC_(463.0), SC_(0.0021621613198310691487267192357884082) }, { SC_(464.0), SC_(0.0021574964662374991829200960766562576) }, { SC_(465.0), SC_(0.0021528516981043243910057084428869353) }, { SC_(466.0), SC_(0.0021482268859873166444454124549114468) }, { SC_(467.0), SC_(0.0021436219015521640352612314974430831) }, { SC_(468.0), SC_(0.0021390366175626001416214789193671599) }, { SC_(469.0), SC_(0.0021344709078686853195015285942886297) }, { SC_(470.0), SC_(0.0021299246473952377537966991017876864) }, { SC_(471.0), SC_(0.0021253977121304120408043948917378901) }, { SC_(472.0), SC_(0.0021208899791144231117966821605475330) }, { SC_(473.0), SC_(0.0021164013264284133444884374032938703) }, { SC_(474.0), SC_(0.0021119316331834607455853001256052381) }, { SC_(475.0), SC_(0.0021074807795097261232847428787252865) }, { SC_(476.0), SC_(0.0021030486465457372036171528510244555) }, { SC_(477.0), SC_(0.0020986351164278076788660759496756807) }, { SC_(478.0), SC_(0.0020942400722795892100115563060258602) }, { SC_(479.0), SC_(0.0020898633982017544382113427243308619) }, { SC_(480.0), SC_(0.0020855049792618090927848496389625101) }, { SC_(481.0), SC_(0.0020811647014840313150070718611847323) }, { SC_(482.0), SC_(0.0020768424518395363482667828755735014) }, { SC_(483.0), SC_(0.0020725381182364647758076310014666506) }, { SC_(484.0), SC_(0.0020682515895102925173642410430888445) }, { SC_(485.0), SC_(0.0020639827554142608255399121038087407) }, { SC_(486.0), SC_(0.0020597315066099245517594891045527092) }, { SC_(487.0), SC_(0.0020554977346578169800817299553715207) }, { SC_(488.0), SC_(0.0020512813320082295550809920849078429) }, { SC_(489.0), SC_(0.0020470821919921048574190732458860746) }, { SC_(490.0), SC_(0.0020429002088120412076350726771363621) }, { SC_(491.0), SC_(0.0020387352775334073050944645971696816) }, { SC_(492.0), SC_(0.0020345872940755653349682414605475504) }, { SC_(493.0), SC_(0.0020304561552032010015688099052563877) }, { SC_(494.0), SC_(0.0020263417585177589713609094407410020) }, { SC_(495.0), SC_(0.0020222440024489822335025606725264762) }, { SC_(496.0), SC_(0.0020181627862465539098621158199604115) }, { SC_(497.0), SC_(0.0020140980099718400701118556742788299) }, { SC_(498.0), SC_(0.0020100495744897321307250317123988984) }, { SC_(499.0), SC_(0.0020060173814605874395103738842993516) }, { SC_(500.0), SC_(0.0020020013333322666697142686477741971) }, + { SC_(0.25000000000000000000000000000000000), SC_(17.197329154507110739271319119335224)}, { SC_(0.12500000000000000000000000000000000), SC_(65.388133444988034473142999334395961) }, { SC_(0.062500000000000000000000000000000000), SC_(257.50642004291541426394984152786018) }, { SC_(0.031250000000000000000000000000000000), SC_(1025.5728544782377088851896549789956) }, { SC_(0.015625000000000000000000000000000000), SC_(4097.6081469812325471140472931934309) }, { SC_(0.0078125000000000000000000000000000000), SC_(16385.626348148031663597978251925972) }, { SC_(0.0039062500000000000000000000000000000), SC_(65537.635592296074077546680509110271) }, { SC_(0.0019531250000000000000000000000000000), SC_(262145.64025088744769438583827382756) }, { SC_(0.00097656250000000000000000000000000000), SC_(1.0485776425893921526170408061678298e6) }, { SC_(0.00048828125000000000000000000000000000), SC_(4.1943056437609568090690403869475364e6) }, { SC_(0.00024414062500000000000000000000000000), SC_(1.6777217644347318475117100572465400e7) }, { SC_(0.00012207031250000000000000000000000000), SC_(6.7108865644640644300678883695523690e7) }, { SC_(0.000061035156250000000000000000000000000), SC_(2.6843545764478734348137667988052034e8) }, { SC_(0.000030517578125000000000000000000000000), SC_(1.0737418256448607021411790006489757e9) }, { SC_(0.000015258789062500000000000000000000000), SC_(4.2949672976448973837387528780800407e9) }, { SC_(7.6293945312500000000000000000000000e-6), SC_(1.7179869185644915725104496671656842e10) }, { SC_(3.8146972656250000000000000000000000e-6), SC_(6.8719476737644924895929112616949761e10) }, { SC_(1.9073486328125000000000000000000000e-6), SC_(2.7487790694564492948137685720609220e11) }, { SC_(9.5367431640625000000000000000000000e-7), SC_(1.0995116277776449317741095887303350e12) }, { SC_(4.7683715820312500000000000000000000e-7), SC_(4.3980465111056449329204781693093178e12) }, { SC_(2.3841857910156250000000000000000000e-7), SC_(1.7592186044417644933493663013304205e13) }, { SC_(1.1920928955078125000000000000000000e-7), SC_(7.0368744177665644933780255573728145e13) }, { SC_(5.9604644775390625000000000000000000e-8), SC_(2.8147497671065764493392355188854676e14) }, { SC_(2.9802322387695312500000000000000000e-8), SC_(1.1258999068426256449339952000546077e15) }, { SC_(1.4901161193847656250000000000000000e-8), SC_(4.5035996273704976449340310241398011e15) }, { SC_(7.4505805969238281250000000000000000e-9), SC_(1.8014398509481985644934048936182939e16) }, { SC_(3.7252902984619140625000000000000000e-9), SC_(7.2057594037927937644934057892204642e16) }, { SC_(1.8626451492309570312500000000000000e-9), SC_(2.8823037615171174564493406237021553e17) }, { SC_(9.3132257461547851562500000000000000e-10), SC_(1.1529215046068469776449340646092210e18) }, { SC_(4.6566128730773925781250000000000000e-10), SC_(4.6116860184273879056449340657287237e18) }, { SC_(2.3283064365386962890625000000000000e-10), SC_(1.8446744073709551617644934066288475e19) }, { SC_(1.1641532182693481445312500000000000e-10), SC_(7.3786976294838206465644934066568351e19) }, { SC_(5.8207660913467407226562500000000000e-11), SC_(2.9514790517935282585764493406670829e20) }, { SC_(2.9103830456733703613281250000000000e-11), SC_(1.1805916207174113034256449340667783e21) }, { SC_(1.4551915228366851806640625000000000e-11), SC_(4.7223664828696452136976449340668132e21) }, { SC_(7.2759576141834259033203125000000000e-12), SC_(1.8889465931478580854785644934066831e22) }, { SC_(3.6379788070917129516601562500000000e-12), SC_(7.5557863725914323419137644934066839e22) }, { SC_(1.8189894035458564758300781250000000e-12), SC_(3.0223145490365729367654564493406684e23) }, { SC_(9.0949470177292823791503906250000000e-13), SC_(1.2089258196146291747061776449340668e24) }, { SC_(4.5474735088646411895751953125000000e-13), SC_(4.8357032784585166988247056449340668e24) }, { SC_(2.2737367544323205947875976562500000e-13), SC_(1.9342813113834066795298817644934067e25) }, { SC_(1.1368683772161602973937988281250000e-13), SC_(7.7371252455336267181195265644934067e25) }, { SC_(5.6843418860808014869689941406250000e-14), SC_(3.0948500982134506872478105764493407e26) }, { SC_(2.8421709430404007434844970703125000e-14), SC_(1.2379400392853802748991242256449341e27) }, { SC_(1.4210854715202003717422485351562500e-14), SC_(4.9517601571415210995964968976449341e27) }, { SC_(7.1054273576010018587112426757812500e-15), SC_(1.9807040628566084398385987585644934e28) }, { SC_(3.5527136788005009293556213378906250e-15), SC_(7.9228162514264337593543950337644934e28) }, { SC_(1.7763568394002504646778106689453125e-15), SC_(3.1691265005705735037417580134564493e29) }, { SC_(8.8817841970012523233890533447265625e-16), SC_(1.2676506002282294014967032053776449e30) }, { SC_(4.4408920985006261616945266723632812e-16), SC_(5.0706024009129176059868128215056449e30) }, { SC_(2.2204460492503130808472633361816406e-16), SC_(2.0282409603651670423947251286017645e31) }, { SC_(1.1102230246251565404236316680908203e-16), SC_(8.1129638414606681695789005144065645e31) }, { SC_(5.5511151231257827021181583404541016e-17), SC_(3.2451855365842672678315602057625764e32) }, { SC_(2.7755575615628913510590791702270508e-17), SC_(1.2980742146337069071326240823050256e33) }, { SC_(1.3877787807814456755295395851135254e-17), SC_(5.1922968585348276285304963292200976e33) }, { SC_(6.9388939039072283776476979255676270e-18), SC_(2.0769187434139310514121985316880386e34) }, { SC_(3.4694469519536141888238489627838135e-18), SC_(8.3076749736557242056487941267521538e34) }, { SC_(1.7347234759768070944119244813919067e-18), SC_(3.3230699894622896822595176507008615e35) }, { SC_(8.6736173798840354720596224069595337e-19), SC_(1.3292279957849158729038070602803446e36) }, { SC_(4.3368086899420177360298112034797668e-19), SC_(5.3169119831396634916152282411213783e36) }, { SC_(2.1684043449710088680149056017398834e-19), SC_(2.1267647932558653966460912964485513e37) }, { SC_(1.0842021724855044340074528008699417e-19), SC_(8.5070591730234615865843651857942053e37) }, { SC_(5.4210108624275221700372640043497086e-20), SC_(3.4028236692093846346337460743176821e38) }, { SC_(2.7105054312137610850186320021748543e-20), SC_(1.3611294676837538538534984297270728e39) }, { SC_(1.3552527156068805425093160010874271e-20), SC_(5.4445178707350154154139937189082914e39) }, { SC_(6.7762635780344027125465800054371357e-21), SC_(2.1778071482940061661655974875633166e40) }, { SC_(3.3881317890172013562732900027185678e-21), SC_(8.7112285931760246646623899502532662e40) }, { SC_(1.6940658945086006781366450013592839e-21), SC_(3.4844914372704098658649559801013065e41) }, { SC_(8.4703294725430033906832250067964196e-22), SC_(1.3937965749081639463459823920405226e42) }, { SC_(4.2351647362715016953416125033982098e-22), SC_(5.5751862996326557853839295681620904e42) }, { SC_(2.1175823681357508476708062516991049e-22), SC_(2.2300745198530623141535718272648362e43) }, { SC_(1.0587911840678754238354031258495525e-22), SC_(8.9202980794122492566142873090593446e43) }, { SC_(5.2939559203393771191770156292477623e-23), SC_(3.5681192317648997026457149236237378e44) }, { SC_(2.6469779601696885595885078146238811e-23), SC_(1.4272476927059598810582859694494951e45) }, { SC_(1.3234889800848442797942539073119406e-23), SC_(5.7089907708238395242331438777979805e45) }, { SC_(6.6174449004242213989712695365597028e-24), SC_(2.2835963083295358096932575511191922e46) }, { SC_(3.3087224502121106994856347682798514e-24), SC_(9.1343852333181432387730302044767689e46) }, { SC_(1.6543612251060553497428173841399257e-24), SC_(3.6537540933272572955092120817907075e47) }, { SC_(8.2718061255302767487140869206996285e-25), SC_(1.4615016373309029182036848327162830e48) }, { SC_(4.1359030627651383743570434603498143e-25), SC_(5.8460065493236116728147393308651321e48) }, { SC_(2.0679515313825691871785217301749071e-25), SC_(2.3384026197294446691258957323460528e49) }, { SC_(1.0339757656912845935892608650874536e-25), SC_(9.3536104789177786765035829293842113e49) }, { SC_(5.1698788284564229679463043254372678e-26), SC_(3.7414441915671114706014331717536845e50) }, { SC_(2.5849394142282114839731521627186339e-26), SC_(1.4965776766268445882405732687014738e51) }, { SC_(1.2924697071141057419865760813593170e-26), SC_(5.9863107065073783529622930748058952e51) }, { SC_(6.4623485355705287099328804067965848e-27), SC_(2.3945242826029513411849172299223581e52) }, { SC_(3.2311742677852643549664402033982924e-27), SC_(9.5780971304118053647396689196894324e52) }, { SC_(1.6155871338926321774832201016991462e-27), SC_(3.8312388521647221458958675678757730e53) }, { SC_(8.0779356694631608874161005084957310e-28), SC_(1.5324955408658888583583470271503092e54) }, { SC_(4.0389678347315804437080502542478655e-28), SC_(6.1299821634635554334333881086012367e54) }, { SC_(2.0194839173657902218540251271239327e-28), SC_(2.4519928653854221733733552434404947e55) }, { SC_(1.0097419586828951109270125635619664e-28), SC_(9.8079714615416886934934209737619788e55) }, { SC_(5.0487097934144755546350628178098319e-29), SC_(3.9231885846166754773973683895047915e56) }, { SC_(2.5243548967072377773175314089049159e-29), SC_(1.5692754338466701909589473558019166e57) }, { SC_(1.2621774483536188886587657044524580e-29), SC_(6.2771017353866807638357894232076664e57) }, { SC_(6.3108872417680944432938285222622898e-30), SC_(2.5108406941546723055343157692830666e58) }, { SC_(3.1554436208840472216469142611311449e-30), SC_(1.0043362776618689222137263077132266e59) }, { SC_(1.5777218104420236108234571305655725e-30), SC_(4.0173451106474756888549052308529065e59) }, { SC_(7.8886090522101180541172856528278623e-31), SC_(1.6069380442589902755419620923411626e60) }, + { SC_(-0.5000000000), SC_(8.9348022005446793094172454999380756) }, { SC_(-1.500000000), SC_(9.3792466449891237538616899443825200) }, { SC_(-2.500000000), SC_(9.5392466449891237538616899443825200) }, { SC_(-3.500000000), SC_(9.6208792980503482436576083117294588) }, { SC_(-4.500000000), SC_(9.6702620140997309597069910277788415) }, { SC_(-5.500000000), SC_(9.7033198653394003811945943335639655) }, { SC_(-6.500000000), SC_(9.7269885043926548190644168187710661) }, { SC_(-7.500000000), SC_(9.7447662821704325968421945965488438) }, { SC_(-8.500000000), SC_(9.7586071126202595864615717591786016) }, { SC_(-9.500000000), SC_(9.7696874450302318856305468284306792) }, { SC_(-10.50000000), SC_(9.7787577398148123844967599803581168) }, { SC_(-11.50000000), SC_(9.7863191764877802483908998669365667) }, { SC_(-12.50000000), SC_(9.7927191764877802483908998669365667) }, { SC_(-13.50000000), SC_(9.7982061449377116612852757242753870) }, { SC_(-14.50000000), SC_(9.8029623875060826482056086612551730) }, { SC_(-15.50000000), SC_(9.8071247184113896201098750504331127) }, { SC_(-16.50000000), SC_(9.8107978129935751113862754177425709) }, { SC_(-17.50000000), SC_(9.8140631191160240909781121524364484) }, { SC_(-18.50000000), SC_(9.8169849598757026884945475067096405) }, { SC_(-19.50000000), SC_(9.8196148086593976260356388939548739) }, + { SC_(-0.99902343750000000000000000000000000), SC_(1.0485786445453819054093666757806164e6) }, { SC_(-1.9990234375000000000000000000000000), SC_(1.0485788947897014608301106052600290e6) }, { SC_(-2.9990234375000000000000000000000000), SC_(1.0485790059731858715118158380121717e6) }, { SC_(-3.9990234375000000000000000000000000), SC_(1.0485790685037146291468005792240191e6) }, { SC_(-4.9990234375000000000000000000000000), SC_(1.0485791085193442079759033312640482e6) }, { SC_(-5.9990234375000000000000000000000000), SC_(1.0485791363061664391826604906353499e6) }, { SC_(-6.9990234375000000000000000000000000), SC_(1.0485791567200251382893770121774963e6) }, { SC_(-7.9990234375000000000000000000000000), SC_(1.0485791723488405341606371612842196e6) }, { SC_(-8.9990234375000000000000000000000000), SC_(1.0485791846971991664479297252200281e6) }, { SC_(-9.9990234375000000000000000000000000), SC_(1.0485791946991525775874820980861239e6) }, { SC_(-10.999023437500000000000000000000000), SC_(1.0485792029650829946601990955306663e6) }, { SC_(-11.999023437500000000000000000000000), SC_(1.0485792099106578577646272234105154e6) }, { SC_(-12.999023437500000000000000000000000), SC_(1.0485792158287067176193079741367670e6) }, { SC_(-13.999023437500000000000000000000000), SC_(1.0485792209314593886753540118883170e6) }, { SC_(-14.999023437500000000000000000000000), SC_(1.0485792253764825933424418561922499e6) }, { SC_(-15.999023437500000000000000000000000), SC_(1.0485792292832094741599436510420027e6) }, { SC_(-16.999023437500000000000000000000000), SC_(1.0485792327438146631093348182751076e6) }, { SC_(-17.999023437500000000000000000000000), SC_(1.0485792358305693414284737055180265e6) }, { SC_(-18.999023437500000000000000000000000), SC_(1.0485792386009372194851110066962854e6) }, { SC_(-19.999023437500000000000000000000000), SC_(1.0485792411011813779926686635901794e6) }, + { SC_(-1.0009765625000000000000000000000000), SC_(1.0485786453346669585098368000725210e6)}, { SC_(-2.0009765625000000000000000000000000), SC_(1.0485788950907050310998538089289880e6) }, { SC_(-3.0009765625000000000000000000000000), SC_(1.0485790061295134851948027406034007e6) }, { SC_(-4.0009765625000000000000000000000000), SC_(1.0485790685990070793038292171104670e6) }, { SC_(-5.0009765625000000000000000000000000), SC_(1.0485791085833866557487460417106589e6) }, { SC_(-6.0009765625000000000000000000000000), SC_(1.0485791363521243952566116253382220e6) }, { SC_(-7.0009765625000000000000000000000000), SC_(1.0485791567545946099550113256489222e6) }, { SC_(-8.0009765625000000000000000000000000), SC_(1.0485791723757806110676477942302156e6) }, { SC_(-9.0009765625000000000000000000000000), SC_(1.0485791847187808756018779739003157e6) }, { SC_(-10.000976562500000000000000000000000), SC_(1.0485791947168280366669245397313590e6) }, { SC_(-11.000976562500000000000000000000000), SC_(1.0485792029798236302523575048817360e6) }, { SC_(-12.000976562500000000000000000000000), SC_(1.0485792099231379319842508274674963e6) }, { SC_(-13.000976562500000000000000000000000), SC_(1.0485792158394087991015231685011609e6) }, { SC_(-14.000976562500000000000000000000000), SC_(1.0485792209407379096480891892744762e6) }, { SC_(-15.000976562500000000000000000000000), SC_(1.0485792253846037068979581619480639e6) }, { SC_(-16.000976562500000000000000000000000), SC_(1.0485792292903769133919482794005111e6) }, { SC_(-17.000976562500000000000000000000000), SC_(1.0485792327501870178663179616292787e6) }, { SC_(-18.000976562500000000000000000000000), SC_(1.0485792358362719002281530732844340e6) }, { SC_(-19.000976562500000000000000000000000), SC_(1.0485792386060702710649859237414384e6) }, { SC_(-20.000976562500000000000000000000000), SC_(1.0485792411058261483202152741904670e6) }, + } }; + do_test_trigamma(data, name, "Mathematica Data"); +} + From 50778a40c47617e63d7aed4a37e27959202b5f0c Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 7 Nov 2014 16:56:15 +0000 Subject: [PATCH 55/69] [digamma]Oops fix missing return statement on half integer special case. --- include/boost/math/special_functions/digamma.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index 3ac522000..db1f4b998 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -524,6 +524,7 @@ T digamma_imp(T x, const mpl::int_<0>* t, const Policy& pol) for(int k = n; k <= 2 * n - 1; ++k) result += 2 / T(k); } + return result; } else { From dd921230981a2ed456a04b5c5848dd4e29ca2cd3 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 7 Nov 2014 16:57:18 +0000 Subject: [PATCH 56/69] [digamma] fix reference. --- include/boost/math/special_functions/digamma.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index db1f4b998..ef9521333 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -513,7 +513,7 @@ T digamma_imp(T x, const mpl::int_<0>* t, const Policy& pol) { // // Special case for half integer arguments, see: - // http://functions.wolfram.com/06.14.03.0008.01 + // http://functions.wolfram.com/06.14.03.0007.01 // result = -2 * constants::ln_two() - constants::euler(); int n = itrunc(x); From 2bcdfed1a400bfb0a50c627f526673cea91d4b71 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 8 Nov 2014 11:03:45 +0000 Subject: [PATCH 57/69] [Polygamma] Remove dead code. --- .../special_functions/detail/polygamma.hpp | 30 ++----------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 65806005b..13fea20d8 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -595,33 +595,9 @@ else return policies::raise_pole_error(function, "Evaluation at negative integer %1%", x, pol); } - //if(n < 22) - //{ - // - // We have tabulated the derivatives of cot(x) up to the 9th derivative, which - // allows us to use: http://functions.wolfram.com/06.15.16.0001.01 - 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; - //} -#if 0 - // - // Try http://functions.wolfram.com/06.15.16.0007.01 - // - if(x <= -static_cast(policies::get_max_series_iterations())) - return policies::raise_evaluation_error(function, "Argument is outside the bounds for which we can reasonably calculate polygamma (got x = %1%)", x, pol); - int m = boost::math::itrunc(ceil(-x)); - T z = x + m; - T sum = 0; - for(int k = 1; k <= m; ++k) - { - sum += pow(z - k, -n - 1); - } - sum *= boost::math::factorial(n, pol); - if(n & 1) - sum = -sum; - return polygamma_imp(n, z, pol) - sum; -#endif + 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; } // // Limit for use of small-x-series is chosen From 1beedd6487d2a17eb94a30f3071b473ac220047c Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 8 Nov 2014 11:50:48 +0000 Subject: [PATCH 58/69] [polygamma] Initial docs. --- doc/equations/digamma1.png | Bin 4013 -> 4015 bytes doc/equations/digamma1.svg | 2 +- doc/equations/digamma2.svg | 2 +- doc/equations/digamma3.png | Bin 7174 -> 7178 bytes doc/equations/digamma3.svg | 2 +- doc/equations/digamma4.mml | 47 +++ doc/equations/digamma4.png | Bin 0 -> 3284 bytes doc/equations/digamma4.svg | 2 + doc/equations/digamma5.mml | 78 +++++ doc/equations/digamma5.png | Bin 0 -> 6282 bytes doc/equations/digamma5.svg | 2 + doc/equations/polygamma1.mml | 94 ++++++ doc/equations/polygamma1.png | Bin 0 -> 6436 bytes doc/equations/polygamma1.svg | 2 + doc/equations/polygamma2.mml | 90 ++++++ doc/equations/polygamma2.png | Bin 0 -> 5262 bytes doc/equations/polygamma2.svg | 2 + doc/equations/polygamma3.mml | 211 ++++++++++++++ doc/equations/polygamma3.png | Bin 0 -> 13457 bytes doc/equations/polygamma3.svg | 2 + doc/equations/polygamma4.mml | 113 ++++++++ doc/equations/polygamma4.png | Bin 0 -> 7298 bytes doc/equations/polygamma4.svg | 2 + doc/equations/polygamma5.mml | 134 +++++++++ doc/equations/polygamma5.png | Bin 0 -> 9057 bytes doc/equations/polygamma5.svg | 2 + doc/equations/polygamma6.mml | 88 ++++++ doc/equations/polygamma6.png | Bin 0 -> 5562 bytes doc/equations/polygamma6.svg | 2 + doc/equations/trigamma1.mml | 69 +++++ doc/equations/trigamma1.png | Bin 0 -> 4975 bytes doc/equations/trigamma1.svg | 2 + doc/equations/trigamma2.mml | 65 +++++ doc/equations/trigamma2.png | Bin 0 -> 3831 bytes doc/equations/trigamma2.svg | 2 + doc/equations/trigamma3.mml | 54 ++++ doc/equations/trigamma3.png | Bin 0 -> 2779 bytes doc/equations/trigamma3.svg | 2 + doc/equations/trigamma4.mml | 49 ++++ doc/equations/trigamma4.png | Bin 0 -> 2782 bytes doc/equations/trigamma4.svg | 2 + doc/equations/trigamma5.mml | 49 ++++ doc/equations/trigamma5.png | Bin 0 -> 2749 bytes doc/equations/trigamma5.svg | 2 + doc/html/index.html | 2 +- doc/html/indexes/s01.html | 4 +- doc/html/indexes/s02.html | 2 +- doc/html/indexes/s03.html | 2 +- doc/html/indexes/s04.html | 2 +- doc/html/indexes/s05.html | 6 +- doc/html/math_toolkit/conventions.html | 2 +- doc/html/math_toolkit/navigation.html | 2 +- doc/html/math_toolkit/sf_gamma.html | 2 + doc/html/math_toolkit/sf_gamma/digamma.html | 22 +- .../math_toolkit/sf_gamma/gamma_ratios.html | 6 +- doc/html/math_toolkit/sf_gamma/polygamma.html | 269 ++++++++++++++++++ doc/html/math_toolkit/sf_gamma/trigamma.html | 217 ++++++++++++++ doc/html/special.html | 2 + doc/math.qbk | 4 + doc/sf/digamma.qbk | 12 +- doc/sf/polygamma.qbk | 104 +++++++ doc/sf/trigamma.qbk | 84 ++++++ 62 files changed, 1891 insertions(+), 26 deletions(-) create mode 100644 doc/equations/digamma4.mml create mode 100644 doc/equations/digamma4.png create mode 100644 doc/equations/digamma4.svg create mode 100644 doc/equations/digamma5.mml create mode 100644 doc/equations/digamma5.png create mode 100644 doc/equations/digamma5.svg create mode 100644 doc/equations/polygamma1.mml create mode 100644 doc/equations/polygamma1.png create mode 100644 doc/equations/polygamma1.svg create mode 100644 doc/equations/polygamma2.mml create mode 100644 doc/equations/polygamma2.png create mode 100644 doc/equations/polygamma2.svg create mode 100644 doc/equations/polygamma3.mml create mode 100644 doc/equations/polygamma3.png create mode 100644 doc/equations/polygamma3.svg create mode 100644 doc/equations/polygamma4.mml create mode 100644 doc/equations/polygamma4.png create mode 100644 doc/equations/polygamma4.svg create mode 100644 doc/equations/polygamma5.mml create mode 100644 doc/equations/polygamma5.png create mode 100644 doc/equations/polygamma5.svg create mode 100644 doc/equations/polygamma6.mml create mode 100644 doc/equations/polygamma6.png create mode 100644 doc/equations/polygamma6.svg create mode 100644 doc/equations/trigamma1.mml create mode 100644 doc/equations/trigamma1.png create mode 100644 doc/equations/trigamma1.svg create mode 100644 doc/equations/trigamma2.mml create mode 100644 doc/equations/trigamma2.png create mode 100644 doc/equations/trigamma2.svg create mode 100644 doc/equations/trigamma3.mml create mode 100644 doc/equations/trigamma3.png create mode 100644 doc/equations/trigamma3.svg create mode 100644 doc/equations/trigamma4.mml create mode 100644 doc/equations/trigamma4.png create mode 100644 doc/equations/trigamma4.svg create mode 100644 doc/equations/trigamma5.mml create mode 100644 doc/equations/trigamma5.png create mode 100644 doc/equations/trigamma5.svg create mode 100644 doc/html/math_toolkit/sf_gamma/polygamma.html create mode 100644 doc/html/math_toolkit/sf_gamma/trigamma.html create mode 100644 doc/sf/polygamma.qbk create mode 100644 doc/sf/trigamma.qbk diff --git a/doc/equations/digamma1.png b/doc/equations/digamma1.png index 295415c27193a07e68b4ba339f10d2c244ac20c8..408c17be23ee6506a953a76d8f2151f92a50a76d 100644 GIT binary patch delta 3942 zcmZ20zg~VqUcHW|i(^Q|oVRmp_e>3)dVIfq96PI{L#3dyYE5^^1(qutI@4-AYZlK) z@aZV5(RAgFx7)|q8>V!v=Wz{>osS`tr`XdeD>I!lvdk9Ue6gI#kz?zTi4LwGZLj~? z`0a4*yTirjD$nhFUi5D7oBPi<+n=}1UcYxN5U zX=QQQ_m&4|bM<$0ya@QgbYbh({7Xx><_ic4UQ9ILvDm&fUr2XpM@Pq^ibH4WZr?Hw z{G#dV;v&+xq%LjSPM_L*FNR7D9Y!~mP z$Z9FhY|bb;HR!wv|Zeq=jdsD+R)ApNfzMuYb(l4gq#{Xxs z)mQFbGI7$br5SrwWhW-?<+ljB@v%%oXS*|Vn+3NUh^fFz#{?;4bnfQ;NQ}NxtQl2>sHW_Kr(sw6zd~4od zYR@;{dVT24KaU^&I-b)y)0V?V<7Mgt8_)YJdJJw%)iZCt58CtI`z9=WE^}{Rb}Zz9ch6#7fvG{e z9cQ?FZdiDr!uWUhlI0D{8|!m3o-5r_=3{4j+#j*^0c(ANOY4KBLEvqpc5>Brtur8FKD|-9xFro`P2&$shju+;m&LK@9t|P%kUN2-Z7{Z`gV! zZRuaq|7-(4+clNKpg_&7%pOtn*pj-TOXG0_F~A7USz(7Nr*elGLn-||+bH4J7; z?6`lhB~*MX6O_FB!C~9liYy23U&cHUY&@q|O3SOQVcg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SS5Mfev_xZL z$cj>j`)>WI(Rw!&bMhJN>rbEj@6sV&ePut(<{kN77x}+iTB#o1FR}Sjw4_et!p)8P z(|_{+wJqy$i<~TSJ8&m|b!fq1_GN2D;}xzkCjTieKht$r;KAFTr9o>xac+~S&iScy zVJlzlZjl{(+CEh!30`OqxlqPd5ZbVBy7umVlPaCtRR^6cMRr)QzfU~3TOpucecg;n zM~i#TKYpKF_c~MZ-_3L8+eB>-f60Dug6rQ(=f=~Uq}Fr%S3K}_$s~v5%&&iW4#`bk zwj^V&Vf}@*theSoW!@v;e`{^Ad_U{C^$Yj--I#f9=lQ2aPbD@@U}K0^e&E%i`omW5 z!_MHMdkKyUy(T{Ps?mu*a&A|YN2Bp3gX6pE)5NFd{JSvSB)-Z)d&R3P!N~WsjQIbp zShe}oUVrvOHfK0@sJKdVzVUoGXOn1M>~dYlb*0U#?9`O}uLj)veW0el`eb*0rp3L~ z_EmAgi`Q+`Pml-QFi+s#+&tM}cEusY$)I%{9k-sJ3v#$U6XL(8W;TQ&cT(`Suy>o-l< zb9KqJz#sj|J3EdZGq&X08TuxvrqJQ`;g>Ux?)=32=M1gYPv6|W z!F^MX$iD*p4&od}*IkdPY_L$X!{E)3vmx@dca*1_ux%olZ zu|MFdrs%f+T+>c%^M2t5?pRLY4gJgZVN*xVt~=Y5jQFfezwAn=-7-Z_UqVrr1Bd_=tglfx*+&&t;ucLK6T1!EP@A diff --git a/doc/equations/digamma1.svg b/doc/equations/digamma1.svg index 034d066d3..5feb7f95b 100644 --- a/doc/equations/digamma1.svg +++ b/doc/equations/digamma1.svg @@ -1,2 +1,2 @@ -ψ(x)=ddxln(Γ(x))=Γ(x)Γ(x) \ No newline at end of file +ψ(x)=ddxln(Γ(x))=Γ(x)Γ(x) \ No newline at end of file diff --git a/doc/equations/digamma2.svg b/doc/equations/digamma2.svg index b4db806c0..9b7ea8fd5 100644 --- a/doc/equations/digamma2.svg +++ b/doc/equations/digamma2.svg @@ -1,2 +1,2 @@ -ψ(x)=ln(x)+12xn=1B2n2nx2n \ No newline at end of file +ψ(x)=ln(x)+12xn=1B2n2nx2n \ No newline at end of file diff --git a/doc/equations/digamma3.png b/doc/equations/digamma3.png index cbf8f6e916ef7267dd920d22a87e6ff9ce39dc52..789e1021b0902bcb25b2f66bd68d0e55c647715a 100644 GIT binary patch delta 7130 zcmZp(=(3oQSKsdG;uumf=k46`9kQW2|J&a;QD9+VV(VaQ5^QW~QSwb4roYde*?n#IJ*C?sB41P|nK69ZvNwPE@1XjCfPf1cf35B|HnDPh zCO7CaN0;x?XJuXMa4EvGyL6ZQT&GJxlfqt?*hhIPN^t)Yxn0k)?nQ|`7gto{646HX zhKqCGd9zyzTWq>KH$$~GK_`PXzkC-nE30l&?gPWy{3W}TWm9S&?C~pKG*zT&hsF&{&p6fKJK|H7a{EL$KsFMwTJ|Ud#>gWvmC!Q9-QDO+;#f8EsL zIv5cUu;GI8OYceVrhQqo zBtFJ{{54m zQl_~lv-R!8O-;KZ)pOUgZ}_|Ktu<$(A=iz4hYH1+zME=^1WVU5pJQ0((X`{Ohn2vN zNgSsN-Co+=Ue9RHZpZv4@Zk^NhQ$rSv)&wfcp$NN#lmP`!{iu;iCeTcq|J=IoO}OD z{kwl6A|=+7=CS_Et?rHa`LQLdQ2)00vv0YqG3-5?{)S9`tH<<5_{Q;XOMOfCd8+s_ zEMpG8d2gfB+h$*q4^-CH z=3nbxQh1>GfabR4)24i9uH)}voVNXM|D8f}rtX{bCTPn~=#%6=v#r)wOWw()ZC2iI ze$}t*nZr(UKMkAo>yyO>o(;R+?hjjGE>^)&apGIl&RXHdc*fUL;{0!ISK1)9!Kz@| zTl3(b(+-@t^xV1rQrdyD2gL3g6zJbE74tD;Dm%*(7{zSK_oHm5c>j`o2J0(@_ri1X zLzmUCKHxU(t7VGNU{Nkm;@-hrve)Al(+{N$+#hypg}!H~Q_P%XZ5(y}-D}Hr5}6If zf*Z6Jrk&wF+RreX*a_igT+5+3J z8`uqGEcQ+c@JR_<=0E-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S7bT>NZ8T`nzIXvjv$SbT=|~^+^7-(iY-ek^VdC);w36)ytnWdtSNuP9RBOkFP$b zt43Ont+&*{Tz{9&8Lkml^SE-deurN@r@Pb5+4xw=Im4FbuRG^{Q}t$Z;lEv{)w@id zaox7s0QKL20Rj4+^$Io26&K2UyRS|9yiL`q!0+uQuCE3O@lJ2&a_+s}c_rAG!@Q4Q zxbAuTw9P`(x5z0f^sjojKCzD?fZ)Qq9{kl>!6;? znz#F}29~oJ?1|#o=BJps;cfV2`RA)LrCnXNRSNE4-?7_m%c3*9Bu8gjBp^s8I+HcN3vRBpBOA*+0ehvi#D1aCe%et>hX*|Z5? zf*&+h$!}|FYHIqoK%j?}!NaOvy5iWki!V2Kl%Ad2@#eGpjdSe(bJOd?SiWtZ+kYfJ zARypE7?=GqCY7~5XFSr6pYnZm{deQ5Mu5AB%Wqxbt6%+RIRcAp)_8ijM%J5+Q z0r|#c)mjzqtE!n1MgL?STDE0bXD+LfSZManEn`DdQxoePr>Rj4XZYB+TMLHy=V>a5 zJv!a8`O{a~SIrHJIX8b)@3=8_KFhoHf?t;}Sg>HheGQgm$MX{odA^;hU3cW$jJz+) g7c59P_~bt$ -ψ(x)=z12x+g12+ln(x+g12)+P(x)P(x)Q(x)Q(x)1 \ No newline at end of file +ψ(x)=z12x+g12+ln(x+g12)+P(x)P(x)Q(x)Q(x)1 \ No newline at end of file diff --git a/doc/equations/digamma4.mml b/doc/equations/digamma4.mml new file mode 100644 index 000000000..16e227469 --- /dev/null +++ b/doc/equations/digamma4.mml @@ -0,0 +1,47 @@ + +]> + +digamma4 + + + + + + ψ + + + n + + + = + + + + k + = + 1 + + + n + + 1 + + + + 1 + k + + + γ + + ; + + n + + + + + + \ No newline at end of file diff --git a/doc/equations/digamma4.png b/doc/equations/digamma4.png new file mode 100644 index 0000000000000000000000000000000000000000..5de4146f74a31bfe7bacf9f31b0995ac0d76145c GIT binary patch literal 3284 zcmeAS@N?(olHy`uVBq!ia0y~yV0g~Jz+lP2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&vF&-{h6~DCItOby0BMr^2ezk7QU3?TqoJazcuP? zW`Ik3>_^K>S42|2GQZOas?)K1{-SIBVczVc=dVlmx95eQes8&N*7s9yntPl$9=$2J z;jMdyF(s{@DQ>FCo&|r(Y!e(XJ(a*bKeHzWP^A6>Quih^334RVa(~~4`pxtbg1&$yo!<& zl0U2-TUKbKyxQ%kl-qxXH~Vakd(Cwx(@U*u=HBO?eRFDsR+rzTeI}dT8>&2a&yF;= z;rBJ&b9kbe!?L!m2WMAkUo|{a-p$i5-N61t^522&IbY2-*Hu&`n4IzOG)kRw;Ae$K zw5i6N{IX-rFVvrl`X4hEHhFMvp~n)HnbOzXl(e}bUt20q6m2^rwS4ARv(24pWiiI< z?_W8?=N-M?L&ZIG097h-Z$sxOEJl4WY+yC5B;>$P091*l0v5H$DF5*Jv@2( z8S@N#{V!A0)=95_s-j%Ge{!fNq;brK9Gg7ZaJ9QLS-@Cu}vu=hRn00`sa@~^11Mfei8--~t7Pm{kd+iL{6l;5- dOuql@+(OJUvyR{GWME)m@O1TaS?83{1OT`lERz5L literal 0 HcmV?d00001 diff --git a/doc/equations/digamma4.svg b/doc/equations/digamma4.svg new file mode 100644 index 000000000..05fac0afa --- /dev/null +++ b/doc/equations/digamma4.svg @@ -0,0 +1,2 @@ + +ψ(n)=k=1n11kγ;n \ No newline at end of file diff --git a/doc/equations/digamma5.mml b/doc/equations/digamma5.mml new file mode 100644 index 000000000..ad6c9b313 --- /dev/null +++ b/doc/equations/digamma5.mml @@ -0,0 +1,78 @@ + +]> + +digamma5 + + + + + + ψ + + + + 1 + 2 + + + n + + + = + + + + k + = + 1 + + + n + + 1 + + + + 1 + k + + + + + + + k + = + n + + + 2 + n + + 1 + + + + 2 + k + + + log + + + 4 + + + + γ + + ; + + n + + + + + + \ No newline at end of file diff --git a/doc/equations/digamma5.png b/doc/equations/digamma5.png new file mode 100644 index 0000000000000000000000000000000000000000..79c42400f59f5c3d1ff6243330e2e3119692e515 GIT binary patch literal 6282 zcme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#U6>H|$+-K;DDtPG98HQhv+QhG>)%$D~sXHgl zaG$@_*L?HCR%@>)A^&xyT{C?rd=Y;zH|cz~iqJ}*!+I~%zO^iASACnhQlZ)LXNlau z=34(tX(cZ1cg42<+Ogo`H)+>PT053!I4e!Ex^nJaIx z6`o${&!;GpW?m>(ttWdieRGJ@bRl!zO*2zpW1x5Fa9P9oC6~`Ec40Xy_8~UL^NvZ=ju%FocK^$qw=v|&6@!ZYCB<8A z&u(N^&26tfHr+>QzN%u?vwKs&t)3hdX83l8ak>!K|Fk=mMe#MQMOA)(J6*&)j4Cr{ z-dwJDAtq@42MbN{X%KdB&x$M&BeQlyN(L?3aPsQyn?Y#&!oD5XzunxiIBMqwoyjjxB;R`* zH!ZRBDtmnFUk-i^3&{w<7vYaKh^zP>zP#ieKhFdc&hMKgyPq5MxhPo*v-gS#CB@~k z^&I}Zh2Q_@dYdbo`kwk*@7r}trrd4KE$R46+6Q!ZRAe*Ny^TA+c=AM#l)6U?E=FxT ze7Q1?A!a6zgyMqxb*X*UC(pd+ ze*U=fe-k}af}{&CWaz%Fkn3P?5M<%6GOiZ-;mG}as&r!MR?7kl1D5#AyW9zBsgpmo zumm4&n0w|;^MvH8sC~A5E=rk;zJ_#jeB9~w@K?|5hFsOJJTLvT7pl*DxOTUJ%nZRK z$GaRoldjk=VOn=2;6bJFY&pArhGp#wx+i)p;XLBFxRi&{&TzAO(~6gsHt#(WTW(Ei zxpOU=!C57DuDAZ?<+AcR9QFHq)#q0&?@D&RXxVnnA;v{?@f9~E-$(x$cfWbKdFP!e Rbqov)44$rjF6*2UngI7WCtLsk literal 0 HcmV?d00001 diff --git a/doc/equations/digamma5.svg b/doc/equations/digamma5.svg new file mode 100644 index 000000000..8509f8828 --- /dev/null +++ b/doc/equations/digamma5.svg @@ -0,0 +1,2 @@ + +ψ(12n)=k=1n11k+k=n2n12klog(4)γ;n \ No newline at end of file diff --git a/doc/equations/polygamma1.mml b/doc/equations/polygamma1.mml new file mode 100644 index 000000000..1b6e92ed8 --- /dev/null +++ b/doc/equations/polygamma1.mml @@ -0,0 +1,94 @@ + +]> + +polygamma1 + + + + + + + ψ + + + n + + + + + + x + + + = + + + + + 1 + + + + n + + + 1 + + + n + ! + + + + k + = + 0 + + + + + 1 + + + + + k + + + x + + + + n + + + 1 + + + + + = + + + + + n + + ψ + + + x + + + + + + + n + + x + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma1.png b/doc/equations/polygamma1.png new file mode 100644 index 0000000000000000000000000000000000000000..8eaaca1ac602e533c9fdb009f523a87166bb2d6a GIT binary patch literal 6436 zcmeAS@N?(olHy`uVBq!ia0y~yV2oy9U~uJNV_;x-lH$6Ffq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgcXrox%{;ewbv?AV_$V#nP@3G))X~w=VYWa(!N*8rfxw{;U*&(_*)zLp`>U&~ zKdM^p-_O4({%@rX zGtU?Vm~ERmv1188!{i2g#@h__4Byzz*m-35YHt4Io-@;5;_`dO6r<9JYu{EfOnS%s zj=5};t@YMejvTf-SN1EW8J#s=b)We}%Bv4SFW>Vvgg4HgdTSo*v9BdAGkv5}l4nb< zw9(Ft^~`39XZgnXO*{9$LP2i4+q9Eg9KPL5bJLk*##F{qm-$=EQ<`}`TO6C-hQFKJ z*iWRm3EaGqW;D}>|3qGkkJ{vyjFwW0mqS(7^8ML#|1ra|oBQ_OZ$44N=jqL`n=!c2 zwy~GP{PM(Y|F4|i7&@^xciC+l4jZO5*Pj=zx$^vTx>e6xah1FLYxwp|{qR(u-$(7y zW_OXBH_~=>y|tWF#+JuEZQYAckq>t9&CN4R;C*!bTj4X)4W~e&U8&sf7JBX z`$4tq9@B|WKDj6GeTaTkU+>L+ey`bwB4guJPi@BhO|g~#_Bc#?$vG*F;r{v?UsyJ5 zd#i3$vu|lbazk^_Wx;L!Z=P5h-F3ed-FRQXQ@6NbYom7K+}!9(x(D9p)_Yy5ZV1j< ze|urEJnxx}wSNr0-JH7Pfqee&r=PZgP2Hx?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>={SDT+@>g#wZgszu zyq7WJd})_Pnj72A^w}@1G($f)uV>or~uFUAAsxsYXvOyUesLjBX~HA}?JIZQWpy-h0+O#oTGx>LoKDEpYg3w{dg( z1zlh5zq@xhWfiJSJT&XwY2#Zz+jDY^XZkE-Pce5=n|$(1gUqj~FRfP!9a22-c^kjv zvwg`O3qDWnWNIxhP3)NIbNk86+-2`?{4*B3e#?vP%Ep#+Z>~4wd)(SEIr(&omFu^g zX}|n}a;k(PZht#`_(p!RQ+ip_DVE<79|~_rmu9Y*>2o^8+$l|E183mUhckng-nbc} zT_|ef*U@+XS>q(#dR38G(_Sy*s8qYmb@N7=8`I?uqlb$dFLzp{TxYm#cH=pllhMbO zLATF*vFU7$$TKiDI(f{@SZIdVsTL-?;4ax*4GpDC(FgoXmp%HuCu2GLjFVfu&9=?l zr}UEdz$+Kg)}y)g##{SY_gzZ3{$5y=>(tde?v)4adEd=D`DJ=ej`80#sRH(eD@?Zs z%zs-ixcTm`C9k-DPn#8{=GDD@sr9UrCC#9~F%RZ6UAMcza*~?5>gu!~d>ghb`S|jy zh+EqOUp3>7oE+m?=S!~})^>c*?YLyT+#o=FjpDZXN?zAu=DBR2zQFb23!i1T|Jd)2 X_xXI=N-U9qfq}u()z4*}Q$iB}i1CcJ literal 0 HcmV?d00001 diff --git a/doc/equations/polygamma1.svg b/doc/equations/polygamma1.svg new file mode 100644 index 000000000..737a855aa --- /dev/null +++ b/doc/equations/polygamma1.svg @@ -0,0 +1,2 @@ + +ψ(n)(x)=(1)n+1n!k=01(k+x)n+1=nψ(x)nx \ No newline at end of file diff --git a/doc/equations/polygamma2.mml b/doc/equations/polygamma2.mml new file mode 100644 index 000000000..60c9744fd --- /dev/null +++ b/doc/equations/polygamma2.mml @@ -0,0 +1,90 @@ + +]> + +polygamma2 + + + + + + + ψ + + + + n + + + + + + + 1 + + x + + + = + + + + + 1 + + + n + + + ψ + + + + n + + + + + + + x + + + + + + + + + 1 + + + n + + π + + + + + n + + cot + + + π + x + + + + + + + x + n + + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma2.png b/doc/equations/polygamma2.png new file mode 100644 index 0000000000000000000000000000000000000000..c91e5f2745bdc9021cb7f2654f7bf5d95cde6a84 GIT binary patch literal 5262 zcmeAS@N?(olHy`uVBq!ia0y~yU`$|OV9?}XV_;z5cKjT}z`(##?Bp53!NI{%!;#X# zz`(#+;1OBOz#vot!i@LQV$iaG+m6yV@f)D&voy%2!S;ZPRVEUpP6YKum60(XS?$@_sw^o zKXWg8{oZd;*{9E(n4sv~R^=2Fp1@=vBEdL^L53$MCry4^%I#O3ZPW4`+IS@Esth*s zH~c&>`9R-+r3cPOZ3)zE=wV1dF=1iage!5E=1uCGxW!GWO8Y@|g471J4{6?o`zJ}M za@p;NNHaD1_U9)^<>5s3XqL@%0{OOn#dD^%eIxCO7J;z7^y@1GV3{`sSH^zMa2} zH*gh579@N8*4?08&^2Nr5YQg3cRngsnoUyneyrKQGjvXcf z@hWTi_Hf7~rcGx~NE3~1Xb|OIa#DJJ>`l>F2jvYljV6)xSx?0;@K$i_kcp6f!6?Hn z(|S6Z`>8y~9=06Ocjjz7Gi1Cki_YNX;rc$eA@YE?L%+Z^F$>!#Z`pN(Gp=1zeA6;z z7d!L%_8&3VSry;jvQW3R7f2|$`F-<`WpVQ(b~5cdY%XWG`IL*mq+QJFZBCyPCoGZG zTB&`wUw#tXBjzm^j7qpYm0w+0!jr0yVR44#+3cGS)68z4xo5ojbK|`OO-fxmxpo{r zBgbH{S@J;gffEt4b~nsS`xfHyS+jsgFU&%}rB-_N`)K3e$L2__6F+p%d&^$i4cr^p z4P>SZuIKn8{vq+lex-sSjrwgfV>x{o%eem*r5ZZ$Sf}An6qjY%(l2 zCO2xPnc2rj8CMIuP<{FQ>9y$(kN0lKt`jO)IJ0)X{@R&;CEp*(zPhwf((7pCfln6d zGmiXcdcUMaziCOH#mCvA{N|e%T9ivIy(toZ>G)+EmOYGbR5M@NT>Zkm|GoMlafaoy zZt5ghC#;%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>2{ldidD;v+f1Qr_z9{?MJvGZ8&ORi_JE!}7@|7$0Es>vt zCz>bk2pR__e>b&bzc+GAJLJH3Z8p4UC1rXF1$@A5KiQpv6**HwJ` z%`QFld$fOw$;C5fW}Dj?&%BW}jy`r~nc3s`h zA3UPV;Tiqt&@Zvz!<@$d{v9w`y)Lh8PhV+c>6$IUJdb`#7tXyMdR8ZQ@#zvNBKSb z4z35nY2Q}QGT+9L0#@hEqvCtGcd^w>>+@a5dyn{Mdd7Ns{9@jxe{t#769=>{rx=3_ zd&TzC^XB0~zA{IzNr@)*J52j5P0EF?E;<1o>6s?7rq%k){Fyx*c5cs}U)nM8%G{%E zT0ie_UlEmLJU2n{@T4XW(+{sJ5(3n%InC9w+63xN3Ru=npLd>T@46Eypb@SJC4rC= zX%E^@=4GUb9TD2klxMIxT=?bpV>8dx9oU;@7JR99$KJyicldX^XF8_HfX26`am@Ig zbd&Y_VjJ&Eng=Q#Y*YEjdqcoNZn~s +ψ(n)(1x)=(1)nψ(n)(x)+(1)nπncot(πx)xn \ No newline at end of file diff --git a/doc/equations/polygamma3.mml b/doc/equations/polygamma3.mml new file mode 100644 index 000000000..215ecf2bc --- /dev/null +++ b/doc/equations/polygamma3.mml @@ -0,0 +1,211 @@ + +]> + +polygamma3 + + + + + + + + + + + + + n + + cot + + + π + x + + + + + + + x + n + + + + + + = + + + + + + π + n + + + + + sin + + n + + + 1 + + + + + π + x + + + + + + + + k + = + 0 + + + + + n + + 2 + + 2 + + + + + C + + n + , + k + + + cos + + + + + 1 + + + 2 + k + + + π + x + + + + + ; + + + n + 2 + + + + + + + + + + + = + + + + + + π + n + + + + + sin + + n + + + 1 + + + + + π + x + + + + + + + + C + + n + , + 0 + + + + + + + + k + = + 1 + + + + n + 2 + + + + + C + + n + , + k + + + cos + + + 2 + k + π + x + + + + + + + ; + + + n + 2 + + + + + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma3.png b/doc/equations/polygamma3.png new file mode 100644 index 0000000000000000000000000000000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K)DvdiQ z>$367M$vD3T}%7#c6V@kZs$yLk9}5lwfgP}uaFgu(dzk@MWXfHAA0PaCaz6)4hogI z?Qfbfhxc$AO|iS` z|Apl5@Vdn1NxZ#>; zm&?;G*WO2lw{FRtXV3HMOW_uND6j1&8PIZLkKc`+>p>yjnnv;y=dI)27O$wLm@D)@ zec1<|kJ1h)?Ny9B_A)zFxE&6Z{_6=k;;zdqLJ? z_k&f`=JVh1x-{A4-Tg|HT+byRqQxUTE){8-ZMk^Ib0Np>C836$$Kv>cdA`w z_lMfdH{u?<=6(1g8*CBhB6T3i>QGT1!#|Ce&;B@MdK*f5pW^sBxolRr)j#D^UfWWC z*=1?EY%E>7ZRWGddzV!!p0tg3G5S?5V;Wq|I!RA~>4mzQqg8Nbjpj{v`{hkHCZ&}w z^jopy;K_@NzEmABVAZqQ)1;w7)|6^DX% zUpDvO7A2JJef!B+ceB0{CA!6 fQJXw7>u0^mP4!SSo#@953=9mOu6{1-oD!M +ncot(πx)xn=πnsinn+1(πx)k=0n22Cn,kcos((1+2k)πx);n2=πnsinn+1(πx)(Cn,0+k=1n2Cn,kcos(2kπx));n2 \ No newline at end of file diff --git a/doc/equations/polygamma4.mml b/doc/equations/polygamma4.mml new file mode 100644 index 000000000..2f7570b69 --- /dev/null +++ b/doc/equations/polygamma4.mml @@ -0,0 +1,113 @@ + +]> + +polygamma4 + + + + + + + ψ + + + + n + + + + + + + x + + + = + + + + + + + 1 + + + + n + + 1 + + + n + ! + + + x + + n + + + 1 + + + + + + + + + k + = + 0 + + + + + + + + + + 1 + + + + k + + + n + + + 1 + + + + + k + + + n + + + ! + ζ + + + k + + + n + + + 1 + + + + x + k + + + + k + ! + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma4.png b/doc/equations/polygamma4.png new file mode 100644 index 0000000000000000000000000000000000000000..9f013bf8a25cf3fc2200d0b7bcd5a858ccd601cc GIT binary patch literal 7298 zcmeAS@N?(olHy`uVBq!ia0y~yU_8sfz~Icm#=yYvuOp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%2^ZvYE_0$DUqlQ`5YzvX@CF zJ#BwpPOtJrkKIDfeoC^vOF|1z?%x0Crsg%4bF9-C+@8EK6Rr^d!K2|*WG5T3GI46J zi&CzCj*0SIKk))%1Gb8jXZ-Zi)jiu8-rwA_OoFlbRs2y8l}phby=hA>zdU5>u%0c< zL(I#HA;L6${>uY834xy7Gj9G){8{i|(y>req0TMV8!z^h=uBc`e%z?s`1R2JT86Z5 z`&GZmI&NR`aIs?dDT4*b#5`gSZ#LcWDc{9j0$Hy%eJXoCM{81T4u8O7n0R(GE^b&q>*n&W h>(f+(Uh4j_4}AJX_rpG|_Y4dS44$rjF6*2UngGN};N}1T literal 0 HcmV?d00001 diff --git a/doc/equations/polygamma4.svg b/doc/equations/polygamma4.svg new file mode 100644 index 000000000..5a2860a2e --- /dev/null +++ b/doc/equations/polygamma4.svg @@ -0,0 +1,2 @@ + +ψ(n)(x)=(1)n1n!xn+1+k=0(1)k+n+1(k+n)!ζ(k+n+1)xkk! \ No newline at end of file diff --git a/doc/equations/polygamma5.mml b/doc/equations/polygamma5.mml new file mode 100644 index 000000000..1104b9560 --- /dev/null +++ b/doc/equations/polygamma5.mml @@ -0,0 +1,134 @@ + +]> + +polygamma5 + + + + + + + ψ + + + + n + + + + + + + x + + + + + + + + + + 1 + + + + n + + 1 + + + + + n + + 1 + + + ! + + + n + + + 2 + x + + + + + 2 + + x + + n + + + 1 + + + + + + + + + + 1 + + + n + + + + + k + = + 1 + + + + + + + + 2 + k + + + n + + 1 + + + ! + + + + + 2 + k + + + ! + + x + + 2 + k + + + n + + + + + + B + + 2 + k + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma5.png b/doc/equations/polygamma5.png new file mode 100644 index 0000000000000000000000000000000000000000..aaf99373d22cb5dc4e7c247534ad9cbe12e725d3 GIT binary patch literal 9057 zcmeAS@N?(olHy`uVBq!ia0y~yVEo0vz~Iio#=yYv-mEo@fq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgcEaktG3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{20II(Jtf@np8_ zp5VD1zhl^cNPK6#D3E3rdnv`{p69kRUkjPiyq_^JFkJ$z1@O=2ezJ}<&5h@6%=~4q)IDz9I+Mr2JiECex*?y@{+KG$gYS=+ zt(Is_6xq1Af6FA%kH;2itnhgh@Z|l0paX@PljkTGu+H~h>(*{D(c`AaFTHo{Of>>k zE0#EG&$*=WxA9?x`<&-y-*&2He4o!3qmo&%$Xs~OZ`mgHwpZTi>L&9azkh7}sbD?- zrJa}Ugw1QCFQ55mzI=~w!P(#TVppEa+GO}VI+CSv@1TB{^-9ABUkwazaQxUdvo`F$ z>UlXA>t7x!LYWMnryn+73Uj-q{fNu>_P$?H@e5OEJmGh+?k^?Sb7#HUhfE?=xCT(cCO^|o`-Zx0ormCT;Sfik=sW7njn)#rz$ zO?t+<&3v=*?5XJ|$}?@2ylP#$!KcGwBiL$>CE~)a-zR#g2z7o*f~<{DRmkM@boaDc z`s?D(=lmRviAodm1i>EDWHhd3-2Qi6wQc;RO%*BIHqVM#dm_gJ;x-$zV|!0sZJlZB zoofGnqQ_a6^A!_4RDzf$xiNJ!@Go1mqqc8%U+BS1`58CaA6A=Pt5&%r0C7W+M8A97 z8~!=WHr>`YZ?-(z_Px&Lm+X%Be>|4lcKN)^Lq$lF(ewIa+279(aHoZ7ZmYWYb8&2kJB-0$ZlqZ9wr$7zAAxDxDzomd*UYQVH{QJK`WNMiUPt=uggRYjoo_pk zz2n3`MbE!y-vl!lTW?rv+I^ +ψ(n)(x)(1)n1(n1)!(n+2x)2xn+1(1)nk=1(2k+n1)!(2k)!x2k+nB2k \ No newline at end of file diff --git a/doc/equations/polygamma6.mml b/doc/equations/polygamma6.mml new file mode 100644 index 000000000..47938c868 --- /dev/null +++ b/doc/equations/polygamma6.mml @@ -0,0 +1,88 @@ + +]> + +polygamma6 + + + + + + + ψ + + + + n + + + + + + + x + + m + + + = + + ψ + + + + n + + + + + + + x + + + + + + + + 1 + + + n + + n + ! + + + + k + = + 1 + + m + + + 1 + + + + + x + + k + + + + n + + + 1 + + + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma6.png b/doc/equations/polygamma6.png new file mode 100644 index 0000000000000000000000000000000000000000..d634ae162e3e7b15b1606bd2b11eeca2a65345fd GIT binary patch literal 5562 zcmeAS@N?(olHy`uVBq!ia0y~yU`%3QV6fw0V_;wqOc!)wU|?V=cJd72;Nak>;YjIV zU|`@Z@Q5sCU=S(+Va9uD@)ZmW43Z_T5hcO-X(i=}MX3zs<>h*rdD+Fui3O>8`9Fax;TbZ%y~Pva*s^t)Z_d2t4!F?+QQ();mKir!fuVHf`H1&>cp!qhL40? zTtosT9bGw2bR=@}9qwx>jd4f_aFP%g2nm~*>JoU9DbY}X=|qx)#pmNYr-rYO`}%3u z?p>3wfB*gS%ktg%cXxdc3IDn>`uV)#b!U1!R4&zd+!C^2tYF%~Xd%8s)PmK5_lES1 zdy6J%$Q-?IA(R=f@|P)mUp?D4wrlKi%LBOi_*kv3Yn$};R%g1 z|MG88-=I|>yTSUyY_YEEVJ@yRom=#)nb$L!dqs&#u%9vCtloI?fbLq6b#ptqKn5>k z2%mLR`T$Fe=6{u(+u}Q7FU``Ow012-(yAf*&~winL3QqzBocgMEcahjx_PV1B2v6_ zi{hkT%*kip^nIv}PFOfocbbX746Z*{&fLpfI_IrZ$dQR2DwmSjwnQ~}s9ds8$z|-x zN}8UQ_W$;ge_3vqG7?OUtCt*I^hH7Ik;jt!kBSd&pM4W>X;#{|DC6I6cqf^$?&GVG z`C)Y7yU4~Ri3b#ntGD^g)jj*h|LZr=OrA-<7^A01OSVkBy4Y}4R_kM)2MGzkeSSJU z*#A1Gnl~Xifj!}E$WN;SMJqd+b!&njcusrVm>%2YDaD=Sxdanym|UawcCWrI9e-Hs=)r;&j|)hJFHpquCy+>+8B8toPqH*Q~&kb zd4e-;?mplx z{}|6KJ=wo=;xEI^#~b~h=j_tC;rTlEf2pyx*bW1cwZZwbeG_(;9bSFB|Hp2J{CDfF zGpl<=?M^!D5$MBy&uH_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line at end of file diff --git a/doc/equations/trigamma1.mml b/doc/equations/trigamma1.mml new file mode 100644 index 000000000..89d09624e --- /dev/null +++ b/doc/equations/trigamma1.mml @@ -0,0 +1,69 @@ + +]> + +trigamma1 + + + + + + + ψ + + + 1 + + + + + + x + + + = + + + + k + = + 0 + + + + + 1 + + + + + k + + + x + + + 2 + + + + = + + + + ψ + + + x + + + + + + x + + + + + + \ No newline at end of file diff --git a/doc/equations/trigamma1.png b/doc/equations/trigamma1.png new file mode 100644 index 0000000000000000000000000000000000000000..9e966e0997a9a003fc04ff86a71ec109c696daf6 GIT binary patch literal 4975 zcmeAS@N?(olHy`uVBq!ia0y~yVEDnnz~Icm#=yX^@y?083=9k`#ZI0f92^`RH5@4& z3=9mM1s;*b3=BdgAk26#O}>JGfkCpwHKHUqKdq!Zu_%?Hyu4g5GcUV1Ik6yBFTW^# z_B$IX1_q%wo-U3d6?5Ls&D;?aI<@V-zJQu!N(WEV1O)+}juj1tjEWB4O&65TE>K`{ zySU}l6@fVpDyJ^!nkXbKnCj@Dn4uil_Ml^diGoI(=86utWd`mp1`l7$XNTuKy%SuT zZ4p}f{%qy^}i7 z8$ntXo+k~K&1s%Kg(vw`=ohsKTX+jn`CWHh`sQhyQ$N$~QrdyW0~Qa|9t7R~|Hi>O zpHb}QyxR^puQMj+-k&o)UaO+`k6;8}MRNZw`Rj|zrdO)$6`sL-hj$Ox99|z5KJ6WI z^%?5d=d9&xd8@9v*Y}d=ftB0hSDw=s-NTuqKV^&k2knHTKHq{5R5yxqXJq*%a37L* zCh%w}lfkNn>ggt(OH3P_8^7lK*Il}n{mi5->)*Z?yK=6cVZGU^JEA%9`kAH=qK_oy z-M2mMy6xFS6J85__18(aUH4zS&lAI!!+Ixu_nV`;dzJ(q;NBL0Zb?3m&(^;`nQqNs ziDAx3`TbMu{m0~_@MmwlqIRCR#FH7_a)6q=O&d*P+{ygerh(o#O>AH)tBv6GE=U8mGF$8v?XoU z{ryt|F68Wv_L`;jQpR(3$Wr+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`OzfbVhO8B|GmQU(P8lD!%e-|GwE4cfYP&wPpX3_l8rr;x4f*Z4y5%@*qn|?OXV& zZ{`03)=ygUIO3Pa?Ngeww8ixjPa3(de84*K&pdU(Q+uZV<~!$nN%G3Jy5EL{hmIdv zwdL!j@3lw0qc-UTYE=}z@sTkuRxA8-W>Q7Ww*K|uhBFVysd;7w=Gs1L>5ekI=H(@| z$fQKGPxC`_0MP72^&)+AOB|zP`hxnO7-DV1_lNOPgg&ebxsLQ01Z~0r~m)} literal 0 HcmV?d00001 diff --git a/doc/equations/trigamma1.svg b/doc/equations/trigamma1.svg new file mode 100644 index 000000000..9ff41b44c --- /dev/null +++ b/doc/equations/trigamma1.svg @@ -0,0 +1,2 @@ + +ψ(1)(x)=k=01(k+x)2=ψ(x)x \ No newline at end of file diff --git a/doc/equations/trigamma2.mml b/doc/equations/trigamma2.mml new file mode 100644 index 000000000..37ac715c7 --- /dev/null +++ b/doc/equations/trigamma2.mml @@ -0,0 +1,65 @@ + +]> + +trigamma2 + + + + + + + ψ + + + 1 + + + + + + 1 + + x + + + = + + + + π + 2 + + + + + sin + 2 + + + + π + x + + + + + + + ψ + + + 1 + + + + + + x + + + + + + \ No newline at end of file diff --git a/doc/equations/trigamma2.png b/doc/equations/trigamma2.png new file mode 100644 index 0000000000000000000000000000000000000000..45676ec18c778963d96d5745d64209055b170c3b GIT binary patch literal 3831 zcmeAS@N?(olHy`uVBq!ia0y~yVED?wz@X2;#=yW}Ez+aIz`(##?Bp53!NI{%!;#X# zz`(#+;1OBOz#vot!i@LQ@2%Ur=lhEH&o9q^wXbybyO-~*O3&~8J|}pSucM>;ge&|rxX&<#F-^bm@BcNg z&ve!esbl&~{yqDzI*H^g40zQvYvPx@ z2YI*8gH-C4M6Fcyoou4?z0%zCe?-vp3QuOM+hLB^9WOm>$h|+qZoi&-tm@avC7YJS z?cC%!sqbvVB(U-xtZ%1WGlS%c+h-+ z&GWd|EapGa-AA*mCjDX(XE>dc@0F^~84a7sjOCUabK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`mrANE>JKRs67(%&erUNv@>AcbPA)VwWZo_IgV!*!oN42|U-wtO`s?}Zyw@(htCq2soLl0*R^Kqw zO#Sv?Z)DELlX@A=PAhkdALf{T@8~2ki$&F9f_nQTpKjWkw)d^-w#^3nZ(lC!FWa`) z{DXD=$KG=i?0Zgsd#`%e)8&h;+Y#CM;Z~i@3DvzzZa0<-zw9`_;zHWD*khqL;se?a z{dwnR!K5>dF`Z$xDCg_2sb>yNFMh7ed#+vAHZOAjW1Ew_h34D7%&D9?O}$l)lV|hZ zwhk|8$FEN>T64&MJ|D7jvSw-YM@CjluBGql&M=%)()-fgnImhxz0k)t&AB@8=g%mC zWq*BN{>^#781BDf;#~!|@RgH&mt3`ex4=DEqtskUb+bgu@B5u=B)1DhhM&ty*`0Z} zMAksXRd?#CuWE-9RZolCP1R+zzCB@5fsaDkyVb4-QyGnIRk_w_ig?}KE8!lL;J$12 zVvhOuYwBM5y!`Y(cm1T=pWol|=Ei!SImmNPTupU63qqFZ7Cfz%)(xmQXyV7mLS7CGR zTaF8_-0kK)^6QI`r?+Ztt4G|&N(Rr(odx@LHzcddYGqnY^m(tBuxrWUAfblVl{v?` zHa=QfGkZtlp0!JAOdeYO3cWFB&qt*PB8Qqz{8{mx)s8DC|F`wZH&qV;A54geoTuD4 zds1l71wXF-O-*IWnTiE1Z&&(eWUCl%vAFcjU+Qk0|DqQwxvdVdGE7=#x^V5~&f`|1 zTz4J0mg;4gYl?hkc~Eimuz+;alF6M8lk`ni_0IE2tP{WD613;{E#bf`2S3X>+Pr$U g%uHK+%2WMUms2{w9In~Sz`(%Z>FVdQ&MBb@0EZPu$N&HU literal 0 HcmV?d00001 diff --git a/doc/equations/trigamma2.svg b/doc/equations/trigamma2.svg new file mode 100644 index 000000000..68f4d9510 --- /dev/null +++ b/doc/equations/trigamma2.svg @@ -0,0 +1,2 @@ + +ψ(1)(1x)=π2sin2(πx)ψ(1)(x) \ No newline at end of file diff --git a/doc/equations/trigamma3.mml b/doc/equations/trigamma3.mml new file mode 100644 index 000000000..934572d82 --- /dev/null +++ b/doc/equations/trigamma3.mml @@ -0,0 +1,54 @@ + +]> + +trigamma3 + + + + + + + ψ + + + 1 + + + + + + x + + + = + + ψ + + + 1 + + + + + + 1 + + + x + + + + + + 1 + + + x + 2 + + + + + + + \ No newline at end of file diff --git a/doc/equations/trigamma3.png b/doc/equations/trigamma3.png new file mode 100644 index 0000000000000000000000000000000000000000..38aceee229c31fe0e4dc0f01755648249e9af581 GIT binary patch literal 2779 zcmeAS@N?(olHy`uVBq!ia0y~yU^vRaz@Wy##=yW(@*@5Y0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&fw z{mw>;fq^T+)5S5QV$R#Sl^4Q7Wslp(H>P|I6%Y*(DfbohaSW8?o*pPR-BIMM;ZfF2 zZibm^S2mr|mAKJ~wn=O3n-}ss%xVHP&$H1kW#k^de zv5mo;bEl_9F0?89u!dD;*79?GUNL5GGk&jUU1YC0>8<{O%t>ZzW+!CJiDpmvbWTLM zvGIU+=(B3R8`kM_Wv6x?=)Rh=;jiHaj)=wI6VEEWUvPsdBIkE~=(B3>8>%1`2M@fq z{Ir*|X5q0-TUIpeX`p=baYMK)BK2YLHm+Yt|Mz@ z?OSh1L`>kFQX){G`C++M$`0`zK9|B$gUzP1IvDPD-np&HMq1;g&x3^9{Yws2d00)| zP;R-s_R+N|?Tx2Zd2_ZYT%C{|aHFpM14F+@yZ5b08!T($E~$9l{8Y}m?$i@Ww}AJ4 z+x|L=8tE{dW2@88eEjPDqQo<-W>c;h%W7n*Y|y(9eCgiI9lj0zjkk>-1~;1BzR6y% z@_|V-BD-7g{;S2GpXs-}o!-#hV6Cz?dZ|tBq`C;_!bzd7f&EQSZ=Cz8n6s@u#`TwN zNYy_dL+t@M&7$d;S8Ef)LS{=b8G>x4dPnVaSP4y03lUuVv~SHlH<@ z|IX*V6O=ly?m({TltckX-Rj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-QhQJrAsTdOujOt9R#&1)dU&HS5kD^6BHfsVZv5WYLmv)%Q@<5yxAb9VBlH zT>GdjeWPPQmi1#x~XaqRfmFwlEsp|MtwJ;l;07`^2yvcIlGhjIVE=+cn|J)C@)W z{wRlvwNYEnZnL6|IvL(h`7kO8R2Yg~bG0XAGow-gw0((VM zmQB3R$ZnSS>sG^te#rpWc?(;NCH~G*$QN(AxY1wu)jiQ4W*638EPXzq^!<+mU-P!< zu%^7`n=^kJ?~APUyK1b&EzWEAl<~S=G6;X*Eqa-6yY2paMxraLm7BDGsQRwjuby~5 zAp2^*Z)TeORHaoZ>B4EhR2|Hl++Ky<{v0kPq8qh_)5B`6DBJax?K%Do8N6L$bGt0M z=Q&=OQ0rEp6swlW|6qBGGS7XTNVn{OEiZaJq?qrxZ3xk4+2>cVxBl3-Ig=`*n-{sJ zyIxX0Ak7keqjTMbg`1TBxcGF7RnGK|@X8H*+0Y>Mx4uhEH!N68z{a#{n)i%lrW#Qt zUW*!wRT4MHUVSgVoz1oT+^O(}`GRTPfdc>hJyh>8taZG&=(0lQh9wIpwK2W6o}>HU zctgC+y{Z-37j(9Q)E_z7viOKP!^!pB_nZp8&v$)xU9 +ψ(1)(x)=ψ(1)(1+x)+1x2 \ No newline at end of file diff --git a/doc/equations/trigamma4.mml b/doc/equations/trigamma4.mml new file mode 100644 index 000000000..557d16d0e --- /dev/null +++ b/doc/equations/trigamma4.mml @@ -0,0 +1,49 @@ + +]> + +trigamma4 + + + + + + + ψ + + + 1 + + + + + + x + + + = + + + + + C + + + R + + + x + + + + + + + x + 2 + + + + + + \ No newline at end of file diff --git a/doc/equations/trigamma4.png b/doc/equations/trigamma4.png new file mode 100644 index 0000000000000000000000000000000000000000..2a527a42001aa6f3a95deb6c907f9b2604e7f13a GIT binary patch literal 2782 zcmeAS@N?(olHy`uVBq!ia0y~yU|7h&z@Wv!#=yXETg`ec0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVK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K?Md*6PK{Jf7P=?kti*)y%n6rwDYY!aQv$5**A~4%r*5xdN;H>Tq?5htgtuE)^eXT*L(>{J-zYM9uQ;K~&S$dARgT%3D!fy#IA6MX zAjUYl?|*jJ#Yt?NR0DUOT%6T%R^0gGlm4w~-$EALZGXzopr0DnO>=l}o! literal 0 HcmV?d00001 diff --git a/doc/equations/trigamma4.svg b/doc/equations/trigamma4.svg new file mode 100644 index 000000000..1ccac5dd3 --- /dev/null +++ b/doc/equations/trigamma4.svg @@ -0,0 +1,2 @@ + +ψ(1)(x)=(C+R(x))x2 \ No newline at end of file diff --git a/doc/equations/trigamma5.mml b/doc/equations/trigamma5.mml new file mode 100644 index 000000000..4a8736435 --- /dev/null +++ b/doc/equations/trigamma5.mml @@ -0,0 +1,49 @@ + +]> + +trigamma5 + + + + + + + ψ + + + 1 + + + + + + x + + + = + + + + + 1 + + + R + + + + 1 + x + + + + + + + x + + + + + \ No newline at end of file diff --git a/doc/equations/trigamma5.png b/doc/equations/trigamma5.png new file mode 100644 index 0000000000000000000000000000000000000000..671a4b3247dae34292c00712ef643ac78fde8877 GIT binary patch literal 2749 zcmeAS@N?(olHy`uVBq!ia0y~yV3^0iz@W~-#=yYv&*9@S1_lO}VkgfK4h{~E8jh3> z1_lPs0*}aI1_q%L5N5oWCSSq8z#v)T8c`CQpH@mmtT}V z`<;yx0|S?pr;B4q#hkZusyBp(iXOL*cU;H+NO46+U-BIf!QjuLv!v{V99<1q**{(6 z$nu=F(6;94lAmQt-e=wBYI28MS)}s$?+QcVj}w!)veMWVt@v^5%D%rFzki%p{m$}x zdHw#+&G%jF@6R;;eQ)cvd)0IAN2c3fi~4=S%y&xrl8@W!Z)ez^a=2u0VB36;i!3rM zJ{xQem!C^XSZ3U&k{O&}eEa*8uUp+>P5(xI%b#&0a! z^jGW>+2Ivr9lhzVjDh2&mOWm+hqe1ZH~!AGzm?&d)w(3?LCAwSI_JL~K9K8LntPw^ z53hxG`(NLLt|jMFC4CQTGkP9we7NnoN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`{K0pUcF1!60t|Z8#H|v zGkeY!oThhJh4)R&u8k+8?nN{yuJQ6=bz8P6X*Z9jJ5&G7d6DI7!;Fsv*9UVP_ho$} z^|E!}SvRHZ3U-G2h^br_bGqdD-z=KrKTXW>(!&GR+x#OlPpxH}ux0a-e=Tc1NayIQ zsNC)g`?0Pt{L$srax;6H_If_OV5(rf$X|3*t@P6L@?9L+pO&_)-=x0fGsn44nZ4K6 czxZXZ#T0*?A=0Ovfq{X+)78&qol`;+0P@%!xBvhE literal 0 HcmV?d00001 diff --git a/doc/equations/trigamma5.svg b/doc/equations/trigamma5.svg new file mode 100644 index 000000000..3813ab577 --- /dev/null +++ b/doc/equations/trigamma5.svg @@ -0,0 +1,2 @@ + +ψ(1)(x)=(1+R(1x))x \ No newline at end of file diff --git a/doc/html/index.html b/doc/html/index.html index dcdaa714c..65323f0af 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -111,7 +111,7 @@ This manual is also available in -

Last revised: October 05, 2014 at 07:41:09 GMT

+

Last revised: November 08, 2014 at 11:40:24 GMT


diff --git a/doc/html/indexes/s01.html b/doc/html/indexes/s01.html index ee4cf538c..ac6bdf5c0 100644 --- a/doc/html/indexes/s01.html +++ b/doc/html/indexes/s01.html @@ -24,7 +24,7 @@

-Function Index

+Function Index

A B C D E F G H I J K L M N O P Q R S T U V Z

@@ -1863,6 +1863,7 @@
  • Non-Member Properties

  • +
  • polygamma

  • powm1

  • prime

    @@ -2360,6 +2361,7 @@
  • Ratios of Gamma Functions

  • +
  • trigamma

  • trunc

      diff --git a/doc/html/indexes/s02.html b/doc/html/indexes/s02.html index e52374fdb..c114cfa7c 100644 --- a/doc/html/indexes/s02.html +++ b/doc/html/indexes/s02.html @@ -24,7 +24,7 @@

    -Class Index

    +Class Index

    B C D E F G H I L M N O P Q R S T U W

    diff --git a/doc/html/indexes/s03.html b/doc/html/indexes/s03.html index 653c0b95f..0a428f995 100644 --- a/doc/html/indexes/s03.html +++ b/doc/html/indexes/s03.html @@ -24,7 +24,7 @@

    -Typedef Index

    +Typedef Index

    A B C D E F G H I L N O P R S T U V W

    diff --git a/doc/html/indexes/s04.html b/doc/html/indexes/s04.html index bf61ac720..2a9511664 100644 --- a/doc/html/indexes/s04.html +++ b/doc/html/indexes/s04.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B F

    diff --git a/doc/html/indexes/s05.html b/doc/html/indexes/s05.html index aa562383a..b7d3c63b1 100644 --- a/doc/html/indexes/s05.html +++ b/doc/html/indexes/s05.html @@ -23,7 +23,7 @@

    -Index

    +Index

    A B C D E F G H I J K L M N O P Q R S T U V W Z

    @@ -4256,6 +4256,8 @@
  • Weibull Distribution

  • +
  • Polygamma

  • +
  • polygamma

  • Polynomial and Rational Function Evaluation

  • +
  • Trigamma

  • +
  • trigamma

  • trunc

      diff --git a/doc/html/math_toolkit/conventions.html b/doc/html/math_toolkit/conventions.html index 98831bbaf..96a12ebd6 100644 --- a/doc/html/math_toolkit/conventions.html +++ b/doc/html/math_toolkit/conventions.html @@ -27,7 +27,7 @@ Document Conventions

    - +

    This documentation aims to use of the following naming and formatting conventions. diff --git a/doc/html/math_toolkit/navigation.html b/doc/html/math_toolkit/navigation.html index e05e1a7d3..cd43fa309 100644 --- a/doc/html/math_toolkit/navigation.html +++ b/doc/html/math_toolkit/navigation.html @@ -27,7 +27,7 @@ Navigation

    - +

    Boost.Math documentation is provided in both HTML and PDF formats. diff --git a/doc/html/math_toolkit/sf_gamma.html b/doc/html/math_toolkit/sf_gamma.html index 4392aa74d..050b2c6bf 100644 --- a/doc/html/math_toolkit/sf_gamma.html +++ b/doc/html/math_toolkit/sf_gamma.html @@ -30,6 +30,8 @@

    Gamma
    Log Gamma
    Digamma
    +
    Trigamma
    +
    Polygamma
    Ratios of Gamma Functions
    Incomplete Gamma Functions
    Incomplete Gamma Function diff --git a/doc/html/math_toolkit/sf_gamma/digamma.html b/doc/html/math_toolkit/sf_gamma/digamma.html index f4babd503..5e6a74a82 100644 --- a/doc/html/math_toolkit/sf_gamma/digamma.html +++ b/doc/html/math_toolkit/sf_gamma/digamma.html @@ -7,7 +7,7 @@ - + @@ -20,7 +20,7 @@

    -PrevUpHomeNext +PrevUpHomeNext

    @@ -62,11 +62,6 @@ what level of precision to use etc. Refer to the policy documentation for more details.

    -

    - There is no fully generic version of this function: all the implementations - are tuned to specific accuracy levels, the most precise of which delivers - 34-digits of precision. -

    The return type of this function is computed using the result type calculation rules: the result is of type double when T is an integer type, and type @@ -319,6 +314,17 @@ and BIG=20 for 128-bit reals allows the series to truncated after a suitably small number of terms and evaluated as a polynomial in 1/(x*x).

    +

    + The arbitrary precision version of this function uses recurrence relations + until x > BIG, and then evaluation via the asymtotic expansion above. + As special cases integer and half integer arguments are handled via: +

    +

    + +

    +

    + +

    The rational approximation devised by JM in the range [1,2] is derived as follows. @@ -379,7 +385,7 @@


    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/math_toolkit/sf_gamma/gamma_ratios.html b/doc/html/math_toolkit/sf_gamma/gamma_ratios.html index df1b8f5f8..4acc20a6a 100644 --- a/doc/html/math_toolkit/sf_gamma/gamma_ratios.html +++ b/doc/html/math_toolkit/sf_gamma/gamma_ratios.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -349,7 +349,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/math_toolkit/sf_gamma/polygamma.html b/doc/html/math_toolkit/sf_gamma/polygamma.html new file mode 100644 index 000000000..0123bddc8 --- /dev/null +++ b/doc/html/math_toolkit/sf_gamma/polygamma.html @@ -0,0 +1,269 @@ + + + +Polygamma + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Synopsis +
    +
    #include <boost/math/special_functions/polygamma.hpp>
    +
    +
    namespace boost{ namespace math{
    +
    +template <class T>
    +calculated-result-type polygamma(int n, T z);
    +
    +template <class T, class Policy>
    +calculated-result-type polygamma(int n, T z, const Policy&);
    +
    +}} // namespaces
    +
    +
    + + Description +
    +

    + Returns the polygamma function of x. Polygamma is defined + as the n'th derivative of the digamma function: +

    +

    + +

    +

    + +

    +

    + The final Policy argument is optional and can + be used to control the behaviour of the function: how it handles errors, + what level of precision to use etc. Refer to the policy + documentation for more details. +

    +

    + The return type of this function is computed using the result + type calculation rules: the result is of type double when T is an integer type, and type + T otherwise. +

    +
    + + Accuracy +
    +

    + The following table shows the peak errors (in units of epsilon) found on + various platforms with various floating point types. Unless otherwise specified + any floating point type that is narrower than the one shown will have effectively zero error. +

    +
    ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Significand Size +

    +
    +

    + Platform and Compiler +

    +
    +

    + Small-medium positive arguments +

    +
    +

    + Small-medium negative x +

    +
    +

    + 53 +

    +
    +

    + Win32 Visual C++ 12 +

    +
    +

    + Peak=5.0 Mean=1 +

    +
    +

    + Peak=1200 Mean=65 +

    +
    +

    + 64 +

    +
    +

    + Win64 Mingw GCC +

    +
    +

    + Peak=16 Mean=3 +

    +
    +

    + Peak=33 Mean=3 +

    +
    +

    + 113 +

    +
    +

    + Win64 Mingw GCC __float128 +

    +
    +

    + Peak=6.5 Mean=1 +

    +
    +

    + Peak=30 Mean=4 +

    +
    +

    + As shown above, error rates are generally very acceptible for moderately + sized arguments. Error rates generally increase with increasing n + - this is particularly true for negative x and even + n - in this situation there is a root between each negative + integer and cancellation errors incured in computing the result increase + with increasing n. By the time n=170 + the errors are so bad we can no longer even tell the sign of the result at + double precision. It should + also be noted that for large n the function becomes + increasingly badly behaved when x is negative and is + very sensitive to slight changes in input. +

    +

    + For these reasons results should be treated with extreme + caution when n is large and x negative. +

    +
    + + Testing +
    +

    + Testing is against Mathematica generated spot values to 35 digit precision. +

    +
    + + Implementation +
    +

    + For x < 0 the following reflection formula is used: +

    +

    + +

    +

    + The n'th derivative of cot(x) is tabulated for small + n, and for larger n has the general form: +

    +

    + +

    +

    + The coefficients of the cosine terms can be calculated iteratively starting + from C1,0 = -1: see polygamma.hpp for the full details. +

    +

    + Once x is positive then we have two methods available to us, for small x + we use the series expansion: +

    +

    + +

    +

    + Note that as this is an alternating series we can accelerate the series using + Algorithm 1 from "Convergence Acceleration of Alternating + Series", Henri Cohen, Fernando Rodriguez Villegas, and Don Zagier, Experimental + Mathematics, 1999. Also note that the evaluation of zeta functions + at integer values is essentially a table lookup as zeta + is optimized for those cases. +

    +

    + For large x we use the asymptotic expansion: +

    +

    + +

    +

    + For x in-between the two extremes we use the relation: +

    +

    + +

    +

    + to make x large enough for the asymptotic expansion to be used. +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/math_toolkit/sf_gamma/trigamma.html b/doc/html/math_toolkit/sf_gamma/trigamma.html new file mode 100644 index 000000000..deb7b9446 --- /dev/null +++ b/doc/html/math_toolkit/sf_gamma/trigamma.html @@ -0,0 +1,217 @@ + + + +Trigamma + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    + + Synopsis +
    +
    #include <boost/math/special_functions/trigamma.hpp>
    +
    +
    namespace boost{ namespace math{
    +
    +template <class T>
    +calculated-result-type trigamma(T z);
    +
    +template <class T, class Policy>
    +calculated-result-type trigamma(T z, const Policy&);
    +
    +}} // namespaces
    +
    +
    + + Description +
    +

    + Returns the trigamma function of x. Trigamma is defined + as the derivative of the digamma function: +

    +

    + +

    +

    + +

    +

    + The final Policy argument is optional and can + be used to control the behaviour of the function: how it handles errors, + what level of precision to use etc. Refer to the policy + documentation for more details. +

    +

    + The return type of this function is computed using the result + type calculation rules: the result is of type double when T is an integer type, and type + T otherwise. +

    +
    + + Accuracy +
    +

    + The following table shows the peak errors (in units of epsilon) found on + various platforms with various floating point types. Unless otherwise specified + any floating point type that is narrower than the one shown will have effectively zero error. +

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + +
    +

    + Significand Size +

    +
    +

    + Platform and Compiler +

    +
    +

    + Random Values +

    +
    +

    + 53 +

    +
    +

    + Win32 Visual C++ 12 +

    +
    +

    + Peak=1.0 Mean=0.4 +

    +
    +

    + 64 +

    +
    +

    + Win64 Mingw GCC +

    +
    +

    + Peak=1.4 Mean=0.4 +

    +
    +

    + 113 +

    +
    +

    + Win64 Mingw GCC __float128 +

    +
    +

    + Peak=1.0 Mean=0.5 +

    +
    +

    + As shown above, error rates are generally very low for built in types. For + multiprecision types, error rates are typically in the order of a few epsilon. +

    +
    + + Testing +
    +

    + Testing is against Mathematica generated spot values to 35 digit precision. +

    +
    + + Implementation +
    +

    + The arbitary precision version of this function simply calls polygamma. +

    +

    + For built in fixed precision types, negative arguments are first made positive + via: +

    +

    + +

    +

    + Then arguments in the range [0, 1) are shifted to >= 1 via: +

    +

    + +

    +

    + Then evaluation is via one of a number of rational approximations, for small + x these are of the form: +

    +

    + +

    +

    + and for large x of the form: +

    +

    + +

    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/special.html b/doc/html/special.html index abd86044b..97b72391d 100644 --- a/doc/html/special.html +++ b/doc/html/special.html @@ -40,6 +40,8 @@
    Gamma
    Log Gamma
    Digamma
    +
    Trigamma
    +
    Polygamma
    Ratios of Gamma Functions
    Incomplete Gamma Functions
    Incomplete Gamma Function diff --git a/doc/math.qbk b/doc/math.qbk index 1f684e520..32ad0807d 100644 --- a/doc/math.qbk +++ b/doc/math.qbk @@ -99,6 +99,8 @@ and use the function's name as the link text.] [/gammas] [def __lgamma [link math_toolkit.sf_gamma.lgamma lgamma]] [def __digamma [link math_toolkit.sf_gamma.digamma digamma]] +[def __trigamma [link math_toolkit.sf_gamma.trigamma trigamma]] +[def __polygamma [link math_toolkit.sf_gamma.polygamma polygamma]] [def __tgamma_ratio [link math_toolkit.sf_gamma.gamma_ratios tgamma_ratio]] [def __tgamma_delta_ratio [link math_toolkit.sf_gamma.gamma_ratios tgamma_delta_ratio]] [def __tgamma [link math_toolkit.sf_gamma.tgamma tgamma]] @@ -464,6 +466,8 @@ and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22. [include sf/tgamma.qbk] [include sf/lgamma.qbk] [include sf/digamma.qbk] +[include sf/trigamma.qbk] +[include sf/polygamma.qbk] [include sf/gamma_ratios.qbk] [include sf/igamma.qbk] [include sf/igamma_inv.qbk] diff --git a/doc/sf/digamma.qbk b/doc/sf/digamma.qbk index cf3b9c232..b0c142bfd 100644 --- a/doc/sf/digamma.qbk +++ b/doc/sf/digamma.qbk @@ -27,10 +27,6 @@ derivative of the gamma function: [optional_policy] -There is no fully generic version of this function: all the implementations -are tuned to specific accuracy levels, the most precise of which delivers -34-digits of precision. - The return type of this function is computed using the __arg_pomotion_rules: the result is of type `double` when T is an integer type, and type T otherwise. @@ -97,6 +93,14 @@ Choosing BIG=10 for up to 80-bit reals, and BIG=20 for 128-bit reals allows the series to truncated after a suitably small number of terms and evaluated as a polynomial in `1/(x*x)`. +The arbitrary precision version of this function uses recurrence relations until +x > BIG, and then evaluation via the asymtotic expansion above. As special cases +integer and half integer arguments are handled via: + +[equation digamma4] + +[equation digamma5] + The rational approximation [jm_rationals] in the range [1,2] is derived as follows. First a high precision approximation to digamma was constructed using a 60-term diff --git a/doc/sf/polygamma.qbk b/doc/sf/polygamma.qbk new file mode 100644 index 000000000..c61f8582c --- /dev/null +++ b/doc/sf/polygamma.qbk @@ -0,0 +1,104 @@ +[section:polygamma Polygamma] + +[h4 Synopsis] + +`` +#include +`` + + namespace boost{ namespace math{ + + template + ``__sf_result`` polygamma(int n, T z); + + template + ``__sf_result`` polygamma(int n, T z, const ``__Policy``&); + + }} // namespaces + +[h4 Description] + +Returns the polygamma function of /x/. Polygamma is defined as the n'th +derivative of the digamma function: + +[equation polygamma1] + +[graph polygamma] + +[optional_policy] + +The return type of this function is computed using the __arg_pomotion_rules: +the result is of type `double` when T is an integer type, and type T otherwise. + +[h4 Accuracy] + +The following table shows the peak errors (in units of epsilon) +found on various platforms with various floating point types. +Unless otherwise specified any floating point type that is narrower +than the one shown will have __zero_error. + +[table +[[Significand Size] [Platform and Compiler] [Small-medium positive arguments] [Small-medium negative x] ] +[[53] [Win32 Visual C++ 12] [Peak=5.0 Mean=1] [Peak=1200 Mean=65]] +[[64] [Win64 Mingw GCC] [Peak=16 Mean=3] [Peak=33 Mean=3] ] +[[113] [Win64 Mingw GCC __float128] [Peak=6.5 Mean=1][Peak=30 Mean=4] ] +] + +As shown above, error rates are generally very acceptible for moderately sized +arguments. Error rates generally increase with increasing /n/ - this is particularly true +for negative /x/ and even /n/ - in this situation there is a root between each negative integer +and cancellation errors incured in computing the result increase with increasing /n/. By the time +/n=170/ the errors are so bad we can no longer even tell the sign of the result at `double` precision. +It should also be noted that for large /n/ the function becomes increasingly badly behaved +when /x/ is negative and is very sensitive to slight changes in input. + +[*For these reasons results should be treated with extreme caution when /n/ is large and x negative]. + +[h4 Testing] + +Testing is against Mathematica generated spot values to 35 digit precision. + +[h4 Implementation] + +For x < 0 the following reflection formula is used: + +[equation polygamma2] + +The n'th derivative of ['cot(x)] is tabulated for small /n/, and for larger n +has the general form: + +[equation polygamma3] + +The coefficients of the cosine terms can be calculated iteratively starting +from ['C[sub 1,0] = -1]: see polygamma.hpp for the full details. + +Once x is positive then we have two methods available to us, for small x +we use the series expansion: + +[equation polygamma4] + +Note that as this is an alternating series we can accelerate the series using +Algorithm 1 from ['"Convergence Acceleration of Alternating Series", +Henri Cohen, Fernando Rodriguez Villegas, and Don Zagier, Experimental Mathematics, 1999.] +Also note that the evaluation of zeta functions at integer values is essentially a table lookup +as __zeta is optimized for those cases. + +For large x we use the asymptotic expansion: + +[equation polygamma5] + +For x in-between the two extremes we use the relation: + +[equation polygamma6] + +to make x large enough for the asymptotic expansion to be used. + +[endsect][/section:polygamma The Polygamma Function] + +[/ + Copyright 2006 John Maddock and Paul A. Bristow. + 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). +] + diff --git a/doc/sf/trigamma.qbk b/doc/sf/trigamma.qbk new file mode 100644 index 000000000..e2514963c --- /dev/null +++ b/doc/sf/trigamma.qbk @@ -0,0 +1,84 @@ +[section:trigamma Trigamma] + +[h4 Synopsis] + +`` +#include +`` + + namespace boost{ namespace math{ + + template + ``__sf_result`` trigamma(T z); + + template + ``__sf_result`` trigamma(T z, const ``__Policy``&); + + }} // namespaces + +[h4 Description] + +Returns the trigamma function of /x/. Trigamma is defined as the +derivative of the digamma function: + +[equation trigamma1] + +[graph digamma] + +[optional_policy] + +The return type of this function is computed using the __arg_pomotion_rules: +the result is of type `double` when T is an integer type, and type T otherwise. + +[h4 Accuracy] + +The following table shows the peak errors (in units of epsilon) +found on various platforms with various floating point types. +Unless otherwise specified any floating point type that is narrower +than the one shown will have __zero_error. + +[table +[[Significand Size] [Platform and Compiler] [Random Values] ] +[[53] [Win32 Visual C++ 12] [Peak=1.0 Mean=0.4] ] +[[64] [Win64 Mingw GCC] [Peak=1.4 Mean=0.4] ] +[[113] [Win64 Mingw GCC __float128] [Peak=1.0 Mean=0.5] ] +] + +As shown above, error rates are generally very low for built in types. +For multiprecision types, error rates are typically in the order of a +few epsilon. + +[h4 Testing] + +Testing is against Mathematica generated spot values to 35 digit precision. + +[h4 Implementation] + +The arbitary precision version of this function simply calls __polygamma. + +For built in fixed precision types, negative arguments are first made positive via: + +[equation trigamma2] + +Then arguments in the range \[0, 1) are shifted to >= 1 via: + +[equation trigamma3] + +Then evaluation is via one of a number of rational approximations, for small x these are +of the form: + +[equation trigamma4] + +and for large x of the form: + +[equation trigamma5] + +[endsect][/section:digamma The Trigamma Function] + +[/ + Copyright 2006 John Maddock and Paul A. Bristow. + 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). +] + From 8147bb92d85f3004242f78a467732f04fb44cfa1 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 8 Nov 2014 19:08:00 +0000 Subject: [PATCH 59/69] [Polygamma] Add equations and graphs. --- doc/equations/polygamma7.mml | 110 ++++++++++++++++++ doc/equations/polygamma7.png | Bin 0 -> 8498 bytes doc/equations/polygamma7.svg | 2 + doc/equations/zeta1.svg | 2 +- doc/equations/zeta2.svg | 2 +- doc/equations/zeta3.svg | 2 +- doc/equations/zeta4.svg | 2 +- doc/equations/zeta5.svg | 2 +- doc/equations/zeta6.svg | 2 +- doc/equations/zeta7.mml | 53 +++++++++ doc/equations/zeta7.png | Bin 0 -> 3109 bytes doc/equations/zeta7.svg | 2 + doc/equations/zeta8.mml | 31 +++++ doc/equations/zeta8.png | Bin 0 -> 2048 bytes doc/equations/zeta8.svg | 2 + doc/equations/zeta9.mml | 78 +++++++++++++ doc/equations/zeta9.png | Bin 0 -> 4670 bytes doc/equations/zeta9.svg | 2 + doc/graphs/generate.sh | 6 +- doc/graphs/polygamma2.png | Bin 0 -> 28765 bytes doc/graphs/polygamma2.svg | 70 +++++++++++ doc/graphs/polygamma3.png | Bin 0 -> 32173 bytes doc/graphs/polygamma3.svg | 67 +++++++++++ doc/graphs/sf_graphs.cpp | 98 +++++++++++----- doc/graphs/trigamma.png | Bin 0 -> 30578 bytes doc/graphs/trigamma.svg | 70 +++++++++++ doc/html/index.html | 2 +- doc/html/indexes/s01.html | 2 +- doc/html/indexes/s02.html | 2 +- doc/html/indexes/s03.html | 2 +- doc/html/indexes/s04.html | 2 +- doc/html/indexes/s05.html | 2 +- doc/html/math_toolkit/conventions.html | 2 +- doc/html/math_toolkit/navigation.html | 2 +- doc/html/math_toolkit/sf_gamma/polygamma.html | 15 ++- doc/html/math_toolkit/sf_gamma/trigamma.html | 2 +- doc/html/math_toolkit/zetas/zeta.html | 17 +++ doc/sf/polygamma.qbk | 11 +- doc/sf/trigamma.qbk | 2 +- doc/sf/zeta.qbk | 12 ++ 40 files changed, 623 insertions(+), 55 deletions(-) create mode 100644 doc/equations/polygamma7.mml create mode 100644 doc/equations/polygamma7.png create mode 100644 doc/equations/polygamma7.svg create mode 100644 doc/equations/zeta7.mml create mode 100644 doc/equations/zeta7.png create mode 100644 doc/equations/zeta7.svg create mode 100644 doc/equations/zeta8.mml create mode 100644 doc/equations/zeta8.png create mode 100644 doc/equations/zeta8.svg create mode 100644 doc/equations/zeta9.mml create mode 100644 doc/equations/zeta9.png create mode 100644 doc/equations/zeta9.svg create mode 100644 doc/graphs/polygamma2.png create mode 100644 doc/graphs/polygamma2.svg create mode 100644 doc/graphs/polygamma3.png create mode 100644 doc/graphs/polygamma3.svg create mode 100644 doc/graphs/trigamma.png create mode 100644 doc/graphs/trigamma.svg diff --git a/doc/equations/polygamma7.mml b/doc/equations/polygamma7.mml new file mode 100644 index 000000000..f96ff49a9 --- /dev/null +++ b/doc/equations/polygamma7.mml @@ -0,0 +1,110 @@ + +]> + +polygamma7 + + + + + + + + + + x + + + + + cos + + + k + x + + + + + + sin + n + + + + x + + + + + = + + + 1 + 2 + + + + + + k + + + n + + + cos + + + + + k + + 1 + + + x + + + + + + + n + + k + + + cos + + + + + k + + + 1 + + + x + + + + + + sin + + n + + + 1 + + + + + x + + + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma7.png b/doc/equations/polygamma7.png new file mode 100644 index 0000000000000000000000000000000000000000..f8fdae91d5b000ae0ad7a51533909a2767778be7 GIT binary patch literal 8498 zcmeAS@N?(olHy`uVBq!ia0y~yV7$-3z@W#$#=yXkxl=fRfq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgcEaktG3V{v${AuuKOVQ=I)_O~Y5Rl5MI8<9J?t(5j=c>@AMEO+0{2Xo zc&{L3&?#hc?@=rJA~(Usk3?M;ubAj^v4UGd^s(y^X4S400sHM&wauM7xAK1F{k!G& z@22iM|Jm-n^$!YKLj_Z7R+CDFWzOQHA6gW zYT61e!JEPr&Y|}|zrNeBc7xge$k69gChuoZ`c!{le(2ZsqR&EY9WqQd3s%LuUb@cu zE#Rv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e>S`7J81FP@y7 zqW93|#_5bMYjDJ#WX#YIFak6c|alHe3PV5UR zaQpbD=Bt^=4%gz>ds-xoo*aL7qq;=H;1cVf%OPK_&-Vw5s#kiiIl^)`NZDe#)%~5< z&NIJ$-YG1QanmT#)Y;VKu(#c^RnJ$x`XVE&zskxzRG!~|)2dxQq3LaLYfNT52r`^; zWTy;wouI|e@5kbH+?#hz#F&q{J4aZd!0<%&+c!J-Ux-N*RNQoSN!b?hWYzP#mp&Hy z*w%7hP&>9@aeKYLvU3|xpib!3!wq{Izc<8BSmU}%pCfF~PLpKYjjo5T1$w{bXliv? ze6c5Wg>8s+&<4JbN@}9=I!c!tVjFdx9d-N;^lVaNT72h3I?uCDCV~=LO3}af6}$WY zj&gBZvf{TXhOCCO{EaMk){)lYaNukm!8Xgg4` zAwg=!$1D3+{?Dt_|55(t$?NW>{o#DSjHAH;40!$iyW6%XWgd_s@#%wn;s4Va5fKipVz{=L&C#o#SLk z`uM2+X^DIHiFrxv_x~Te+$S)x*)@e(aAptduA8TH-v`g#8_N^&)%47TA`g|3e@b?eV@HID& zV)F(!|9y-uDG~q6Ea9)^Y1t_k^*n(^a=+I>*_)}w))*(r3spJ%;M jLArC`#&iw&fAXu@*Cy3&y8niOfq}u()z4*}Q$iB}GjJfz literal 0 HcmV?d00001 diff --git a/doc/equations/polygamma7.svg b/doc/equations/polygamma7.svg new file mode 100644 index 000000000..e068a4d0a --- /dev/null +++ b/doc/equations/polygamma7.svg @@ -0,0 +1,2 @@ + +xcos(kx)sinn(x)=12(k+n)cos((k1)x)+(nk)cos((k+1)x)sinn+1(x) \ No newline at end of file diff --git a/doc/equations/zeta1.svg b/doc/equations/zeta1.svg index 2e8015703..c9b001711 100644 --- a/doc/equations/zeta1.svg +++ b/doc/equations/zeta1.svg @@ -1,2 +1,2 @@ -ζ(s)=k=11ks \ No newline at end of file +ζ(s)=k=11ks \ No newline at end of file diff --git a/doc/equations/zeta2.svg b/doc/equations/zeta2.svg index bf5fc046c..cb9f3d59b 100644 --- a/doc/equations/zeta2.svg +++ b/doc/equations/zeta2.svg @@ -1,2 +1,2 @@ -ζ(s)=1121sn=012n+1k=0n(1)k(nk)(k+1)s \ No newline at end of file +ζ(s)=1121sn=012n+1k=0n(1)k(nk)(k+1)s \ No newline at end of file diff --git a/doc/equations/zeta3.svg b/doc/equations/zeta3.svg index e7e71543b..694ece17d 100644 --- a/doc/equations/zeta3.svg +++ b/doc/equations/zeta3.svg @@ -1,2 +1,2 @@ -ζ(1s)=2sin(π1s2)(2πs)Γ(s)ζ(s) \ No newline at end of file +ζ(1s)=2sin(π1s2)(2πs)Γ(s)ζ(s) \ No newline at end of file diff --git a/doc/equations/zeta4.svg b/doc/equations/zeta4.svg index 2b6ce6eca..10aa94d12 100644 --- a/doc/equations/zeta4.svg +++ b/doc/equations/zeta4.svg @@ -1,2 +1,2 @@ -ς(s)=C+R(1s)s1s \ No newline at end of file +ς(s)=C+R(1s)s1s \ No newline at end of file diff --git a/doc/equations/zeta5.svg b/doc/equations/zeta5.svg index 8dd13f008..704710fcd 100644 --- a/doc/equations/zeta5.svg +++ b/doc/equations/zeta5.svg @@ -1,2 +1,2 @@ -ς(s)=C+R(sn)+1s1 \ No newline at end of file +ς(s)=C+R(sn)+1s1 \ No newline at end of file diff --git a/doc/equations/zeta6.svg b/doc/equations/zeta6.svg index 03dc8c806..911760732 100644 --- a/doc/equations/zeta6.svg +++ b/doc/equations/zeta6.svg @@ -1,2 +1,2 @@ -ζ(s)=1sn(121s)j=02n1ej(j+1)s+γ(s);ej=(1)j(k=0jnn!k!(nk)!2n)|γn(s)|<=18n|121s| \ No newline at end of file +ζ(s)=1sn(121s)j=02n1ej(j+1)s+γ(s);ej=(1)j(k=0jnn!k!(nk)!2n)|γn(s)|<=18n|121s| \ No newline at end of file diff --git a/doc/equations/zeta7.mml b/doc/equations/zeta7.mml new file mode 100644 index 000000000..406f4209b --- /dev/null +++ b/doc/equations/zeta7.mml @@ -0,0 +1,53 @@ + +]> + +zeta7 + + + + + + ζ + + + + n + + + = + + + + + + 1 + + + n + + + n + + + 1 + + + + B + + n + + + 1 + + + + ; + + n + + + + + + \ No newline at end of file diff --git a/doc/equations/zeta7.png b/doc/equations/zeta7.png new file mode 100644 index 0000000000000000000000000000000000000000..536b9ace6b8ea1a38ecfe9ab6c9410ff2a4ad20b GIT binary patch literal 3109 zcmeAS@N?(olHy`uVBq!ia0y~yVEE6#z@W~-#=yXEAaz~`0|Ns~v6E*A2L}g74Mz%y z&spFRS4UJ`n9LF&?sTS{A2m~3#lY_xpK3CpDig*3G0bjwWg+4uM3?djz^?>yY|``v-Z zbI(Vm&n^FU^ZEAr=X*AvzxR84{qOSB*>mPKE@5u)XX!jom0POZP(K;9>2Ck zH_mx;V;{2w?;0jI26Lv}TY{I*ndcq%b9cj%wJNf=6(Xa(tDI+k;q&~f74tbNL3YF3 zx2gvm59Ibg7qNL-2}f|A(VUzrSuk%&?ddtQnf^%ch`SVa z;NgKw?_Ny4Tzyizo=qi}Uxy*>X5EU}kJK3IncJpXXa44VkbFRN(lv>f=Gd|X5R{NGey}6HV2h)m-%&mWA5^qH7tgOG3T%90Nka}vH z{Rfo|{^g~oUe0|ob-!6VV?L{1<`jqHBBzT@H^nmZu>1KRf8FSuV?V!7oVhsXdGfzG zy8`U4hRb?hXLQcpzwcntbtdy$cDuah9X-H!py2jv>Bu@izk8p;9WVL0oZi36SIdTl zhxOi#WuJ<-CH&eJ-FS9RI5X3~z&RS3_77%Drk>ffcg?v^@}9rV8TYRXcJuR#{B$aQ zZuqjl_q&C2?>k4_o_%(4ru`n))TdvJKIPSyZu9?L*1LVa*YAJ1TK4JOYU}@8t+aVt zo)i4j`BGiz>{I7&Hl5V2FXiI1J-gzMSF~xF*Kbi@4g2NOCx`!grK246f788+uajij zx3RKaJF(07L;Qn2w`ubyGmC2NU&0v4>TzpV;j1lib*7i@{BlZ&`Ly)C*(5b4al!L- zdzNfgc^jtq`*ox1Hu<#$cIxTEDzZ8+uTSz@F>C#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ovKBREV?3d+HjOssgt1+%yO(@-N&h9;18*l~o%J!D#rHrh zUuIveOyYm5nV;BRZL&~ueCytG@V&a-yV(^#N*%WgcYOFX^;GoaQ@dttVAW-NkzL)o z#PbOEX6cJ-W%z4kD%>R_<5lVc(;BP~dt5(k^kBDYrn!)xuzk@@+ z{*EnO^+NiU^$&6n@J9t^M5&b8&X!uZUQz1s`y1 z)iStoXX&dCoQq2D?&bXcJ@e3yUD6+f9wi&D@!9uz^@#|VZk{@q*QSfFzCSo^TW-Wv z^-OioZk5{R7gBM754k@vUEFoX)4O4|->kklJTkAp9a&$mHub;agG5i`j=U=i59~2} zaXG`PVRi0$rK)iLO5Wl80> z`8m^?G|T=y?|8XaJ?m*c+qVBxj$JAj+^qaM=lrA+w9y`k8ao%dTW-O)aU+fe;=kzyBvKZ;AgJA>z1^c z9->KRAHlSp1)$7r*G!dqM}*8aX&X3itacoT^-=dxQ_XkSJu(uHKNa~)t7renYy1Xv-FNf zm(6aKw?1nM{;+A+Dfm3hu5nb>sUtHRX$zs%l`0CWKOSs#Yzopr00S`k A4*&oF literal 0 HcmV?d00001 diff --git a/doc/equations/zeta7.svg b/doc/equations/zeta7.svg new file mode 100644 index 000000000..601a95ddf --- /dev/null +++ b/doc/equations/zeta7.svg @@ -0,0 +1,2 @@ + +ζ(n)=(1)nn+1Bn+1;n \ No newline at end of file diff --git a/doc/equations/zeta8.mml b/doc/equations/zeta8.mml new file mode 100644 index 000000000..70cd0ce62 --- /dev/null +++ b/doc/equations/zeta8.mml @@ -0,0 +1,31 @@ + +]> + +zeta8 + + + + + + ζ + + + + 2 + n + + + = + 0 + + ; + + n + + + + + + \ No newline at end of file diff --git a/doc/equations/zeta8.png b/doc/equations/zeta8.png new file mode 100644 index 0000000000000000000000000000000000000000..b1ef089b734e3c306be1cf04f28fac3c6486bf2e GIT binary patch literal 2048 zcmeAS@N?(olHy`uVBq!ia0y~yU^vLYz#z)O#=yYv|83V&1_lO}VkgfK4h{~E8jh3> z1_lPs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j^JgChrlv!C142!|-qe^GjYGe!iP=v5RI-ZcN?wU+Qg)Qs#=c^Dvb#mI;S&?EGD>;A*dD8drFujjBRPOu~AgfunomInOA!thHy$+qldM&)bEHI%ls+xNVUz_pLL-w)>Myct6Zp;+|vA z>cjkxrG_aY&iliOAo&Mf^Mt&m_+lJSJlK4J<%^Pv>CWv}BNEoWEjRj6yyeUW?gQU= zQ)kUS(syItj78u3-<}q|P-wEKGvIvvnQsR@q`7S}cdP#2q8!10X3CX>-)FgQn@R4l z_uQ~o_uVgV)w$WfMLmrhTn|i9^-DyRzc~dBvwo0yl1X+T~VoS*cGt2ZcEfI z)vr@RHlAI<(xbFz>g3mjnu`BVZkLP9P-|Ix-djq2Wqq}9*8z(J->{N|-}MK!H@rXM z-=M~Ly7=+o#_tXF4BCxHS@JCn7ypam-os}T&=~b@X3LB!?u9C|cF$wH$8yYlU+RHv zSMId7>`7572y1)uoOAuNb1SBPXD?%%e)QjR&YfNdKTqR&ao5R$f9EFSf9X!|&o|uN zVkbYt_r%R(%+B6Z%-JFwE3)NT{>|R?ZHhuR>xCRo)A!4Ve_q;`TMepC=SsDw%ekQ-YqPbaniUQ zD!c8wmlXRQvB|%;HwJE-zjD(n=9X#$(TW|Xc1?Q0tW!|4NGXb=Z{z)M-Ag$(|Fw9( zzVzmVE6o9wF_-zWjUWEJkzZ}TsPnQoc5R}@m=A~yu+M{$DAXDbKa|7NtkVYaNi^a&z6Y%L+p1M zmGTr+X54+j(6@*4QRdtAoKKJb+;&;f<8`NE;oIcuxT|Y*m?l*T?Q{Cu`*vzbdy=1EWbbmGkW9{ivG Yqx|_Q%kAqK7#J8lUHx3vIVCg!0CVrd?f?J) literal 0 HcmV?d00001 diff --git a/doc/equations/zeta8.svg b/doc/equations/zeta8.svg new file mode 100644 index 000000000..c6965a607 --- /dev/null +++ b/doc/equations/zeta8.svg @@ -0,0 +1,2 @@ + +ζ(2n)=0;n \ No newline at end of file diff --git a/doc/equations/zeta9.mml b/doc/equations/zeta9.mml new file mode 100644 index 000000000..a1e3e2e4d --- /dev/null +++ b/doc/equations/zeta9.mml @@ -0,0 +1,78 @@ + +]> + +zeta9 + + + + + + ζ + + + 2 + n + + + = + + + + + + + 1 + + + + n + + 1 + + + + 2 + + 2 + n + + 1 + + + + π + + 2 + n + + + + + + + 2 + n + + + ! + + + + B + + 2 + n + + + + ; + + n + + + + + + \ No newline at end of file diff --git a/doc/equations/zeta9.png b/doc/equations/zeta9.png new file mode 100644 index 0000000000000000000000000000000000000000..191c312476ee60ba6bf404ee697f9d520287aa17 GIT binary patch literal 4670 zcmeAS@N?(olHy`uVBq!ia0y~yV02+%V9?`WV_;wi_>|zsz`(##?Bp53!NI{%!;#X# zz`(#+;1OBOz#vot!i@LQEaktG3V{v@+mS$x3=$}uc9)cL+N>fLyEvfCY24U0W5;8JZe80au@N~ zoM!Xc(0kBDI!ER4VdYtWPAD)l=Qyt_B=&Wv2U zZGZ8vFJ+~rSLfb)_i9!2_j{9axt`^!d}ZcinYX#t+j`x5<{suU#&?W*TmRK=DF3bX&0WIm z8O>zRwC#<9VLL-MQ#lhmbNF?KElqhI>(7ZTSg`NLJk}V^mmS|?^jE5X=z6>P(#ORI znkQY`V!N2_lka2`QHjfbKdTt^Z~gPNs^h6}xb$jU{EHPetarN?wOdSAUb%e9SJmF> zTRN81P5L%zONMm!uT8dJZ~wdX?d!}X`x)aI-mCnaHr*uXlG@9P6-#<=N1PRZJ5l$f z`RQ-GGncq`-2as~DV^1GvC${q$tD~2eic1)Tg3K=*2FCxZ~0$`d}BJGb36X&oOhf# z40Bj>c-}C-nYnJae8e`Vjhl1+@8x@x#}kwJySc!8ZYrwfL zR(H?)a>zc~Z}cga<;~P5(d-d2H#YK>ikB32$t7ufM1@?^Jn+g?BRkpi`ZCWJo&St| zldh~`-1t{@gFu1!hIwx%H?TG?Z}@jWOLW`RRZ}u8J)e8e(t8=`x!gNyMXUEdcA06G z|2STF+ju``%2&TxwO!%1*2`H{8{`*GK6C1N`;QHC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UTcC*}7}au44AQqgLf z{)#Ov2PbE0KbV*ok}oW?p}D-vXy;7h857yEyaS8IK1?O$x)# z8D;)Yic4I{9wq0zVZj3LK$DKx$?liyR_>WR>6@aDd|mjoeN&gP28m1vY_Ys-{BlkQ zTVdCddzm}tE)`KQ-R{V;!FKIi`=tvK-Yv`!*sZqIbjoynd&QT(T_l#pos52=;d$Ki z7xRZ=ca3e0F3i(=L$|9fl;6XCqyO1?x0Q~2^!yb(-92_0v%b>Mcri)jwNbh6JLN|^ zc$JMAl``{_Cb=9~U%bxR;;p-IoZig?dsV0JEQ!lS)N!uR z5)mn}oV9jW_ytpsy8F+C7}-~G-n}+)*DqmVwdB~uwQo$a_vR$3g +ζ(2n)=(1)n122n1π2n(2n)!B2n;n \ No newline at end of file diff --git a/doc/graphs/generate.sh b/doc/graphs/generate.sh index bff99777e..d9659141f 100755 --- a/doc/graphs/generate.sh +++ b/doc/graphs/generate.sh @@ -8,15 +8,15 @@ # Paths to tools come first, change these to match your system: # math2svg='m:\download\open\SVGMath-0.3.1\math2svg.py' -python=/cygdrive/c/Python26/python.exe -inkscape=/cygdrive/c/progra~1/Inkscape/inkscape +python='/cygdrive/c/program files/Python27/python.exe' +inkscape='/cygdrive/c/Program Files (x86)/Inkscape/inkscape.exe' # Image DPI: dpi=96 for svgfile in $*; do pngfile=$(basename $svgfile .svg).png echo Generating $pngfile - $inkscape -d $dpi -e $(cygpath -a -w $pngfile) $(cygpath -a -w $svgfile) + "$inkscape" -d $dpi -e $(cygpath -a -w $pngfile) $(cygpath -a -w $svgfile) done diff --git a/doc/graphs/polygamma2.png b/doc/graphs/polygamma2.png new file mode 100644 index 0000000000000000000000000000000000000000..b292a7ee977253d2baaac91b0a810dc4a0b51c68 GIT binary patch literal 28765 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU|h|?#=yW3;HT!zz`(##?Bp53!NI{%!;#X# zz`(#+;1OBOz`%C|gc+x5^GP!>Fi4iTMwA5SrEaktG3U+Q${OLX*X%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caU~c?7!*D6SbJDeX>Jnh zgbocqrbY(PffSs=Y6>D;iOY3tun9*MW0D>CmF+2}jxcd%Xn~J+EG6 z>BQ_1czu2Sbt@C4OOkwy!h%N+O6Tus1T7zXeQm9CVxnSKSJ#HLvr?dKt_MFoJ-wB$ zzoVp0)In*H1!&-}?Cq`ASFc{3*a*s<*5&VdwzMiLb%}#YuR?>mKR<%y + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +5 +0 +-5 + +0 +10 +20 +30 +40 +50 +0 +-10 +-20 +-30 +-40 +-50 + +polygamma(2, x) + +x + + + + + + + + + + +Polygamma + + + diff --git a/doc/graphs/polygamma3.png b/doc/graphs/polygamma3.png new file mode 100644 index 0000000000000000000000000000000000000000..03f7659208b7073b0e6c1cda92e77f4ed889b78b GIT binary patch literal 32173 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU|h|?#=yW3;HT!zz`(##?Bp53!NI{%!;#X# zz`(#+;1OBOz`%C|gc+x5^GP!>Fi4iTMwA5SrEaktG3U+P>I#vkH~-sLdu*~)Zz5uufJ@yfOZG9se>x=I}) zN4dQ2N7W_$R=O4L>ZK{Vb;S*?sM^46Zl#V7LK&_B8@h^uSWan9VqvyS_y7Dmc^9{| z(2ct@-xv$OJ6~EDo04Ak?B>ao`R{AqAAUUJ-w`KXM*$W`0hWhz4)Pk*e)9jYL}j&H zw*p6#0!Pz@o-0?YXa0Q?U&8pp(^D;!WdT_HkY!`=R|b$KM}d|jN=yL|17w`x@@*Ur zU{hO)c?26kCMj?{mr!D01q+@tbYb8E3(iUIU=RVDV{u%7Q3GseL7(EFGf;8inuv`} z>hmg^=31AplIv37IAqx!4GMw{Z2$i}xBq!mzfSPq&4&dOCQo*5=aZE%NMP80w@mux z&6{oKKmU5Y{_`bo{lI_#hx7AndFA~DSR6ZKLE*v>5Epmu+1c5%@7UG;Dv7KATiV7e zJ?%gsXOjZQ*~XRzR>zJ9pHAz$Up6uEUA$;fQ~lr9@ja5pZLeNs;qzx^M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zn0??`E5oY0}+5ELBzar*v0tdrGz55@ocB);eSz3LOE zPEFdSqclm8k5O2V^}>aP&I_-7 zo97<`O^ScNSIzIXSkTbW@Wz%*;cdCM+pew-_l}hlJjr9-;Nrq~VS9dj&F{C{C2T4- z{NBhZtoGo;!^7`#6FWMXT0wqcC@LztRa^7o!a~M%Egc<@Qf(7~QVla6NQyLa6$`U4 z^!lC+y6y-nYU{4e`q{*w@crxANn*|*fyU4O85yemOe*GdIWsUYFnGH9xvX + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +5 +0 +-5 + +0 +100 +200 +300 +400 +500 +600 +700 +800 + +polygamma(3, x) + +x + + + + + + + + + + +Polygamma + + + diff --git a/doc/graphs/sf_graphs.cpp b/doc/graphs/sf_graphs.cpp index 9bae8db8e..37a94f394 100644 --- a/doc/graphs/sf_graphs.cpp +++ b/doc/graphs/sf_graphs.cpp @@ -220,10 +220,10 @@ double find_end_point(F f, double x0, double target, bool rising, double x_off = { boost::math::tools::eps_tolerance tol(50); boost::uintmax_t max_iter = 1000; - return boost::math::tools::bracket_and_solve_root( + return x_off + boost::math::tools::bracket_and_solve_root( location_finder(f, target, x_off), x0, - double(1.5), + 1.5, rising, tol, max_iter).first; @@ -248,10 +248,11 @@ int main() double (*f2i)(int, double); double (*f3)(double, double, double); double (*f4)(double, double, double, double); - + double max_val; +#if 0 f = boost::math::zeta; - plot.add(f, 1 + find_end_point(f, 0.1, 40.0, false, 1.0), 10, ""); - plot.add(f, -20, 1 + find_end_point(f, -0.1, -40.0, false, 1.0), ""); + plot.add(f, find_end_point(f, 0.1, 40.0, false, 1.0), 10, ""); + plot.add(f, -20, find_end_point(f, -0.1, -40.0, false, 1.0), ""); plot.plot("Zeta Function Over [-20,10]", "zeta1.svg", "z", "zeta(z)"); plot.clear(); @@ -259,34 +260,34 @@ int main() plot.plot("Zeta Function Over [-14,0]", "zeta2.svg", "z", "zeta(z)"); f = boost::math::tgamma; - double max_val = f(6); + max_val = f(6); plot.clear(); plot.add(f, find_end_point(f, 0.1, max_val, false), 6, ""); - plot.add(f, -1 + find_end_point(f, 0.1, -max_val, true, -1), find_end_point(f, -0.1, -max_val, false), ""); - plot.add(f, -2 + find_end_point(f, 0.1, max_val, false, -2), -1 + find_end_point(f, -0.1, max_val, true, -1), ""); - plot.add(f, -3 + find_end_point(f, 0.1, -max_val, true, -3), -2 + find_end_point(f, -0.1, -max_val, false, -2), ""); - plot.add(f, -4 + find_end_point(f, 0.1, max_val, false, -4), -3 + find_end_point(f, -0.1, max_val, true, -3), ""); + plot.add(f, find_end_point(f, 0.1, -max_val, true, -1), find_end_point(f, -0.1, -max_val, false), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -2), find_end_point(f, -0.1, max_val, true, -1), ""); + plot.add(f, find_end_point(f, 0.1, -max_val, true, -3), find_end_point(f, -0.1, -max_val, false, -2), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -4), find_end_point(f, -0.1, max_val, true, -3), ""); plot.plot("tgamma", "tgamma.svg", "z", "tgamma(z)"); f = boost::math::lgamma; max_val = f(10); plot.clear(); plot.add(f, find_end_point(f, 0.1, max_val, false), 10, ""); - plot.add(f, -1 + find_end_point(f, 0.1, max_val, false, -1), find_end_point(f, -0.1, max_val, true), ""); - plot.add(f, -2 + find_end_point(f, 0.1, max_val, false, -2), -1 + find_end_point(f, -0.1, max_val, true, -1), ""); - plot.add(f, -3 + find_end_point(f, 0.1, max_val, false, -3), -2 + find_end_point(f, -0.1, max_val, true, -2), ""); - plot.add(f, -4 + find_end_point(f, 0.1, max_val, false, -4), -3 + find_end_point(f, -0.1, max_val, true, -3), ""); - plot.add(f, -5 + find_end_point(f, 0.1, max_val, false, -5), -4 + find_end_point(f, -0.1, max_val, true, -4), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -1), find_end_point(f, -0.1, max_val, true), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -2), find_end_point(f, -0.1, max_val, true, -1), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -3), find_end_point(f, -0.1, max_val, true, -2), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -4), find_end_point(f, -0.1, max_val, true, -3), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -5), find_end_point(f, -0.1, max_val, true, -4), ""); plot.plot("lgamma", "lgamma.svg", "z", "lgamma(z)"); f = boost::math::digamma; max_val = 10; plot.clear(); plot.add(f, find_end_point(f, 0.1, -max_val, true), 10, ""); - plot.add(f, -1 + find_end_point(f, 0.1, -max_val, true, -1), find_end_point(f, -0.1, max_val, true), ""); - plot.add(f, -2 + find_end_point(f, 0.1, -max_val, true, -2), -1 + find_end_point(f, -0.1, max_val, true, -1), ""); - plot.add(f, -3 + find_end_point(f, 0.1, -max_val, true, -3), -2 + find_end_point(f, -0.1, max_val, true, -2), ""); - plot.add(f, -4 + find_end_point(f, 0.1, -max_val, true, -4), -3 + find_end_point(f, -0.1, max_val, true, -3), ""); + plot.add(f, find_end_point(f, 0.1, -max_val, true, -1), find_end_point(f, -0.1, max_val, true), ""); + plot.add(f, find_end_point(f, 0.1, -max_val, true, -2), find_end_point(f, -0.1, max_val, true, -1), ""); + plot.add(f, find_end_point(f, 0.1, -max_val, true, -3), find_end_point(f, -0.1, max_val, true, -2), ""); + plot.add(f, find_end_point(f, 0.1, -max_val, true, -4), find_end_point(f, -0.1, max_val, true, -3), ""); plot.plot("digamma", "digamma.svg", "z", "digamma(z)"); f = boost::math::erf; @@ -300,16 +301,16 @@ int main() f = boost::math::erf_inv; plot.clear(); - plot.add(f, -1 + find_end_point(f, 0.1, -3, true, -1), 1 + find_end_point(f, -0.1, 3, true, 1), ""); + plot.add(f, find_end_point(f, 0.1, -3, true, -1), find_end_point(f, -0.1, 3, true, 1), ""); plot.plot("erf_inv", "erf_inv.svg", "z", "erf_inv(z)"); f = boost::math::erfc_inv; plot.clear(); - plot.add(f, find_end_point(f, 0.1, 3, false), 2 + find_end_point(f, -0.1, -3, false, 2), ""); + plot.add(f, find_end_point(f, 0.1, 3, false), find_end_point(f, -0.1, -3, false, 2), ""); plot.plot("erfc_inv", "erfc_inv.svg", "z", "erfc_inv(z)"); f = boost::math::log1p; plot.clear(); - plot.add(f, -1 + find_end_point(f, 0.1, -10, true, -1), 10, ""); + plot.add(f, find_end_point(f, 0.1, -10, true, -1), 10, ""); plot.plot("log1p", "log1p.svg", "z", "log1p(z)"); f = boost::math::expm1; @@ -324,7 +325,7 @@ int main() f = sqrt1pm1; plot.clear(); - plot.add(f, -1 + find_end_point(f, 0.1, -10, true, -1), 5, ""); + plot.add(f, find_end_point(f, 0.1, -10, true, -1), 5, ""); plot.plot("sqrt1pm1", "sqrt1pm1.svg", "z", "sqrt1pm1(z)"); f2 = boost::math::powm1; @@ -359,7 +360,7 @@ int main() f = boost::math::atanh; plot.clear(); - plot.add(f, -1 + find_end_point(f, 0.1, -5, true, -1), 1 + find_end_point(f, -0.1, 5, true, 1), ""); + plot.add(f, find_end_point(f, 0.1, -5, true, -1), find_end_point(f, -0.1, 5, true, 1), ""); plot.plot("atanh", "atanh.svg", "z", "atanh(z)"); f2 = boost::math::tgamma_delta_ratio; @@ -401,7 +402,7 @@ int main() max_val = f(4); plot.clear(); plot.add(f, find_end_point(f, 0.1, -max_val, true), 4, ""); - plot.add(f, -3, find_end_point(f, -0.1, -max_val, false), ""); + plot.add(f, find_end_point(f, -0.1, -max_val, false), ""); plot.plot("Exponential Integral Ei", "expint_i.svg", "z", "expint(z)"); f2u = boost::math::expint; @@ -450,15 +451,15 @@ int main() "n = 2"); plot.add(boost::bind(f2u, 3, _1), find_end_point(boost::bind(f2u, 3, _1), -2, 20, false), - 8 + find_end_point(boost::bind(f2u, 3, _1), 1, 20, false, 8), + find_end_point(boost::bind(f2u, 3, _1), 1, 20, false, 8), "n = 3"); plot.add(boost::bind(f2u, 4, _1), find_end_point(boost::bind(f2u, 4, _1), -2, 20, false), - 8 + find_end_point(boost::bind(f2u, 4, _1), 1, 20, true, 8), + find_end_point(boost::bind(f2u, 4, _1), 1, 20, true, 8), "n = 4"); plot.add(boost::bind(f2u, 5, _1), find_end_point(boost::bind(f2u, 5, _1), -2, 20, false), - 8 + find_end_point(boost::bind(f2u, 5, _1), 1, 20, true, 8), + find_end_point(boost::bind(f2u, 5, _1), 1, 20, true, 8), "n = 5"); plot.plot("Laguerre Polynomials", "laguerre.svg", "x", "laguerre(n, x)"); @@ -555,17 +556,17 @@ int main() plot.add(boost::bind(f3, _1, 0.25, boost::math::constants::pi() / 2), find_end_point( boost::bind(f3, _1, 0.25, boost::math::constants::pi() / 2), - 0.5, 4, false, -1) - 1, + 0.5, 4, false, -1), find_end_point( boost::bind(f3, _1, 0.25, boost::math::constants::pi() / 2), - -0.5, 4, true, 1) + 1, "n=0.25 φ=π/2"); + -0.5, 4, true, 1), "n=0.25 φ=π/2"); plot.add(boost::bind(f3, _1, 0.75, boost::math::constants::pi() / 2), find_end_point( boost::bind(f3, _1, 0.75, boost::math::constants::pi() / 2), - 0.5, 4, false, -1) - 1, + 0.5, 4, false, -1), find_end_point( boost::bind(f3, _1, 0.75, boost::math::constants::pi() / 2), - -0.5, 4, true, 1) + 1, "n=0.75 φ=π/2"); + -0.5, 4, true, 1), "n=0.75 φ=π/2"); plot.plot("Elliptic Of the Third Kind", "ellint_3.svg", "k", "ellint_3(k, n, phi)"); f2 = boost::math::jacobi_sn; @@ -695,7 +696,40 @@ int main() plot.clear(); plot.add(f, -20, 3, ""); plot.plot("Bi'", "airy_bip.svg", "z", "airy_bi_prime(z)"); +#endif + f = boost::math::trigamma; + max_val = 30; + plot.clear(); + plot.add(f, find_end_point(f, 0.1, max_val, false), 5, ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -1), find_end_point(f, -0.1, max_val, true), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -2), find_end_point(f, -0.1, max_val, true, -1), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -3), find_end_point(f, -0.1, max_val, true, -2), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -4), find_end_point(f, -0.1, max_val, true, -3), ""); + plot.add(f, find_end_point(f, 0.1, max_val, false, -5), find_end_point(f, -0.1, max_val, true, -4), ""); + plot.plot("Trigamma", "trigamma.svg", "x", "trigamma(x)"); + f2i = boost::math::polygamma; + max_val = -50; + plot.clear(); + plot.add(boost::bind(f2i, 2, _1), find_end_point(boost::bind(f2i, 2, _1), 0.1, max_val, true), 5, ""); + plot.add(boost::bind(f2i, 2, _1), find_end_point(boost::bind(f2i, 2, _1), 0.1, max_val, true, -1), find_end_point(boost::bind(f2i, 2, _1), -0.1, -max_val, true), ""); + plot.add(boost::bind(f2i, 2, _1), find_end_point(boost::bind(f2i, 2, _1), 0.1, max_val, true, -2), find_end_point(boost::bind(f2i, 2, _1), -0.1, -max_val, true, -1), ""); + plot.add(boost::bind(f2i, 2, _1), find_end_point(boost::bind(f2i, 2, _1), 0.1, max_val, true, -3), find_end_point(boost::bind(f2i, 2, _1), -0.1, -max_val, true, -2), ""); + plot.add(boost::bind(f2i, 2, _1), find_end_point(boost::bind(f2i, 2, _1), 0.1, max_val, true, -4), find_end_point(boost::bind(f2i, 2, _1), -0.1, -max_val, true, -3), ""); + plot.add(boost::bind(f2i, 2, _1), find_end_point(boost::bind(f2i, 2, _1), 0.1, max_val, true, -5), find_end_point(boost::bind(f2i, 2, _1), -0.1, -max_val, true, -4), ""); + plot.add(boost::bind(f2i, 2, _1), find_end_point(boost::bind(f2i, 2, _1), 0.1, max_val, true, -6), find_end_point(boost::bind(f2i, 2, _1), -0.1, -max_val, true, -5), ""); + plot.plot("Polygamma", "polygamma2.svg", "x", "polygamma(2, x)"); + + max_val = 800; + plot.clear(); + plot.add(boost::bind(f2i, 3, _1), find_end_point(boost::bind(f2i, 3, _1), 0.1, max_val, false), 5, ""); + plot.add(boost::bind(f2i, 3, _1), find_end_point(boost::bind(f2i, 3, _1), 0.1, max_val, false, -1), find_end_point(boost::bind(f2i, 3, _1), -0.1, max_val, true), ""); + plot.add(boost::bind(f2i, 3, _1), find_end_point(boost::bind(f2i, 3, _1), 0.1, max_val, false, -2), find_end_point(boost::bind(f2i, 3, _1), -0.1, max_val, true, -1), ""); + plot.add(boost::bind(f2i, 3, _1), find_end_point(boost::bind(f2i, 3, _1), 0.1, max_val, false, -3), find_end_point(boost::bind(f2i, 3, _1), -0.1, max_val, true, -2), ""); + plot.add(boost::bind(f2i, 3, _1), find_end_point(boost::bind(f2i, 3, _1), 0.1, max_val, false, -4), find_end_point(boost::bind(f2i, 3, _1), -0.1, max_val, true, -3), ""); + plot.add(boost::bind(f2i, 3, _1), find_end_point(boost::bind(f2i, 3, _1), 0.1, max_val, false, -5), find_end_point(boost::bind(f2i, 3, _1), -0.1, max_val, true, -4), ""); + plot.add(boost::bind(f2i, 3, _1), find_end_point(boost::bind(f2i, 3, _1), 0.1, max_val, false, -6), find_end_point(boost::bind(f2i, 3, _1), -0.1, max_val, true, -5), ""); + plot.plot("Polygamma", "polygamma3.svg", "x", "polygamma(3, x)"); return 0; } diff --git a/doc/graphs/trigamma.png b/doc/graphs/trigamma.png new file mode 100644 index 0000000000000000000000000000000000000000..3c00ff602f8d8a7eb55d9b3dce0c9f1ee6a5a5b1 GIT binary patch literal 30578 zcmeAS@N?(olHy`uVBq!ia0y~yU}|7sU|h|?#=yW3;HT!zz`(##?Bp53!NI{%!;#X# zz`(#+;1OBOz`%C|gc+x5^GP!>Fi4iTMwA5SrEaktG3U+P%9@a;d;i;S_E$TZa$g~bGx~;kpyPtPQpZ(Gb(5xUi^_ey z`r57N?NzI{XNgB|4c~I@R`%M`odMgc1g9@r#KEQIJ;7B;V3XswlV&I181J_~m#;KY zVAGuEm3)Vv|E+rZ)u{N~oJzU$6F<*9-#s&L_xq0$9EvRhPA4>*MH%vT|GQma^=8#| zC$JdHBYu{TzmNY57jE!tm-Q5BXc2JYP+ZQEc9mNJ%q&{SpaNo89$hdj7#mi_F(@9n zvFHE4-#flui)Q~a=i*}b8rK~Tnu0ka{6`T z@y7>?`|YGI6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+20 +25 +30 + +trigamma(x) + +x + + + + + + + + + +Trigamma + + + diff --git a/doc/html/index.html b/doc/html/index.html index 65323f0af..777a4d471 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -111,7 +111,7 @@ This manual is also available in -

    Last revised: November 08, 2014 at 11:40:24 GMT

    +

    Last revised: November 08, 2014 at 18:57:03 GMT


    diff --git a/doc/html/indexes/s01.html b/doc/html/indexes/s01.html index ac6bdf5c0..d02c44a2d 100644 --- a/doc/html/indexes/s01.html +++ b/doc/html/indexes/s01.html @@ -24,7 +24,7 @@

    -Function Index

    +Function Index

    A B C D E F G H I J K L M N O P Q R S T U V Z

    diff --git a/doc/html/indexes/s02.html b/doc/html/indexes/s02.html index c114cfa7c..545564900 100644 --- a/doc/html/indexes/s02.html +++ b/doc/html/indexes/s02.html @@ -24,7 +24,7 @@

    -Class Index

    +Class Index

    B C D E F G H I L M N O P Q R S T U W

    diff --git a/doc/html/indexes/s03.html b/doc/html/indexes/s03.html index 0a428f995..ae7fc8495 100644 --- a/doc/html/indexes/s03.html +++ b/doc/html/indexes/s03.html @@ -24,7 +24,7 @@

    -Typedef Index

    +Typedef Index

    A B C D E F G H I L N O P R S T U V W

    diff --git a/doc/html/indexes/s04.html b/doc/html/indexes/s04.html index 2a9511664..a85a8acb9 100644 --- a/doc/html/indexes/s04.html +++ b/doc/html/indexes/s04.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B F

    diff --git a/doc/html/indexes/s05.html b/doc/html/indexes/s05.html index b7d3c63b1..bbcfaf2cf 100644 --- a/doc/html/indexes/s05.html +++ b/doc/html/indexes/s05.html @@ -23,7 +23,7 @@

    -Index

    +Index

    A B C D E F G H I J K L M N O P Q R S T U V W Z

    diff --git a/doc/html/math_toolkit/conventions.html b/doc/html/math_toolkit/conventions.html index 96a12ebd6..f81a789d4 100644 --- a/doc/html/math_toolkit/conventions.html +++ b/doc/html/math_toolkit/conventions.html @@ -27,7 +27,7 @@ Document Conventions

    - +

    This documentation aims to use of the following naming and formatting conventions. diff --git a/doc/html/math_toolkit/navigation.html b/doc/html/math_toolkit/navigation.html index cd43fa309..fb5c1af8e 100644 --- a/doc/html/math_toolkit/navigation.html +++ b/doc/html/math_toolkit/navigation.html @@ -27,7 +27,7 @@ Navigation

    - +

    Boost.Math documentation is provided in both HTML and PDF formats. diff --git a/doc/html/math_toolkit/sf_gamma/polygamma.html b/doc/html/math_toolkit/sf_gamma/polygamma.html index 0123bddc8..4862b1e50 100644 --- a/doc/html/math_toolkit/sf_gamma/polygamma.html +++ b/doc/html/math_toolkit/sf_gamma/polygamma.html @@ -54,7 +54,12 @@

    - + The following graphs illustrate the behaviour of the function for odd and + even order: +

    +

    + +

    The final Policy argument is optional and can @@ -217,7 +222,13 @@

    The coefficients of the cosine terms can be calculated iteratively starting - from C1,0 = -1: see polygamma.hpp for the full details. + from C1,0 = -1 and then using +

    +

    + +

    +

    + to generate coefficients for n+1.

    Once x is positive then we have two methods available to us, for small x diff --git a/doc/html/math_toolkit/sf_gamma/trigamma.html b/doc/html/math_toolkit/sf_gamma/trigamma.html index deb7b9446..1050f0440 100644 --- a/doc/html/math_toolkit/sf_gamma/trigamma.html +++ b/doc/html/math_toolkit/sf_gamma/trigamma.html @@ -54,7 +54,7 @@

    - +

    The final Policy argument is optional and can diff --git a/doc/html/math_toolkit/zetas/zeta.html b/doc/html/math_toolkit/zetas/zeta.html index 399700d85..5ea11daf6 100644 --- a/doc/html/math_toolkit/zetas/zeta.html +++ b/doc/html/math_toolkit/zetas/zeta.html @@ -292,6 +292,23 @@ of: ε/R(0). This saves us quite a few digits when dealing with large z, especially when ε is small.

    +

    + Finally, there are some special cases for integer arguments, there are closed + forms for negative or even integers: +

    +

    + +

    +

    + +

    +

    + +

    +

    + and for positive odd integers we simply cache pre-computed values as these + are of great benefit to some infinite series calculations. +

    diff --git a/doc/sf/polygamma.qbk b/doc/sf/polygamma.qbk index c61f8582c..d905cbe88 100644 --- a/doc/sf/polygamma.qbk +++ b/doc/sf/polygamma.qbk @@ -23,7 +23,10 @@ derivative of the digamma function: [equation polygamma1] -[graph polygamma] +The following graphs illustrate the behaviour of the function for odd and even order: + +[graph polygamma2] +[graph polygamma3] [optional_policy] @@ -70,7 +73,11 @@ has the general form: [equation polygamma3] The coefficients of the cosine terms can be calculated iteratively starting -from ['C[sub 1,0] = -1]: see polygamma.hpp for the full details. +from ['C[sub 1,0] = -1] and then using + +[equation polygamma7] + +to generate coefficients for n+1. Once x is positive then we have two methods available to us, for small x we use the series expansion: diff --git a/doc/sf/trigamma.qbk b/doc/sf/trigamma.qbk index e2514963c..3a2719c8e 100644 --- a/doc/sf/trigamma.qbk +++ b/doc/sf/trigamma.qbk @@ -23,7 +23,7 @@ derivative of the digamma function: [equation trigamma1] -[graph digamma] +[graph trigamma] [optional_policy] diff --git a/doc/sf/zeta.qbk b/doc/sf/zeta.qbk index 08186c6a4..b8520685c 100644 --- a/doc/sf/zeta.qbk +++ b/doc/sf/zeta.qbk @@ -112,6 +112,18 @@ required for R(z-n) is not full machine precision, but an absolute error of: [epsilon]/R(0). This saves us quite a few digits when dealing with large z, especially when [epsilon] is small. +Finally, there are some special cases for integer arguments, there are +closed forms for negative or even integers: + +[equation zeta7] + +[equation zeta8] + +[equation zeta9] + +and for positive odd integers we simply cache pre-computed values as these are of great +benefit to some infinite series calculations. + [endsect] [/ :error_function The Error Functions] From 04207ee4303566efbc12586e9e1cb594e0574d37 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 9 Nov 2014 18:22:21 +0000 Subject: [PATCH 60/69] Fix some typos. --- doc/graphs/sf_graphs.cpp | 6 +++--- doc/html/index.html | 2 +- doc/html/indexes/s01.html | 2 +- doc/html/indexes/s02.html | 2 +- doc/html/indexes/s03.html | 2 +- doc/html/indexes/s04.html | 2 +- doc/html/indexes/s05.html | 2 +- doc/html/math_toolkit/conventions.html | 2 +- doc/html/math_toolkit/navigation.html | 2 +- doc/html/math_toolkit/sf_gamma/digamma.html | 2 +- doc/html/math_toolkit/sf_gamma/polygamma.html | 4 ++-- doc/html/math_toolkit/sf_gamma/trigamma.html | 2 +- doc/sf/digamma.qbk | 2 +- doc/sf/polygamma.qbk | 6 +++--- doc/sf/trigamma.qbk | 4 ++-- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/graphs/sf_graphs.cpp b/doc/graphs/sf_graphs.cpp index 37a94f394..713665c60 100644 --- a/doc/graphs/sf_graphs.cpp +++ b/doc/graphs/sf_graphs.cpp @@ -249,7 +249,7 @@ int main() double (*f3)(double, double, double); double (*f4)(double, double, double, double); double max_val; -#if 0 + f = boost::math::zeta; plot.add(f, find_end_point(f, 0.1, 40.0, false, 1.0), 10, ""); plot.add(f, -20, find_end_point(f, -0.1, -40.0, false, 1.0), ""); @@ -402,7 +402,7 @@ int main() max_val = f(4); plot.clear(); plot.add(f, find_end_point(f, 0.1, -max_val, true), 4, ""); - plot.add(f, find_end_point(f, -0.1, -max_val, false), ""); + plot.add(f, -3, find_end_point(f, -0.1, -max_val, false), ""); plot.plot("Exponential Integral Ei", "expint_i.svg", "z", "expint(z)"); f2u = boost::math::expint; @@ -696,7 +696,7 @@ int main() plot.clear(); plot.add(f, -20, 3, ""); plot.plot("Bi'", "airy_bip.svg", "z", "airy_bi_prime(z)"); -#endif + f = boost::math::trigamma; max_val = 30; plot.clear(); diff --git a/doc/html/index.html b/doc/html/index.html index 777a4d471..9ce744172 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -111,7 +111,7 @@ This manual is also available in - +

    Last revised: November 08, 2014 at 18:57:03 GMT

    Last revised: November 09, 2014 at 11:25:57 GMT


    diff --git a/doc/html/indexes/s01.html b/doc/html/indexes/s01.html index d02c44a2d..62b8cd377 100644 --- a/doc/html/indexes/s01.html +++ b/doc/html/indexes/s01.html @@ -24,7 +24,7 @@

    -Function Index

    +Function Index

    A B C D E F G H I J K L M N O P Q R S T U V Z

    diff --git a/doc/html/indexes/s02.html b/doc/html/indexes/s02.html index 545564900..85073ff5e 100644 --- a/doc/html/indexes/s02.html +++ b/doc/html/indexes/s02.html @@ -24,7 +24,7 @@

    -Class Index

    +Class Index

    B C D E F G H I L M N O P Q R S T U W

    diff --git a/doc/html/indexes/s03.html b/doc/html/indexes/s03.html index ae7fc8495..6b9c13bdc 100644 --- a/doc/html/indexes/s03.html +++ b/doc/html/indexes/s03.html @@ -24,7 +24,7 @@

    -Typedef Index

    +Typedef Index

    A B C D E F G H I L N O P R S T U V W

    diff --git a/doc/html/indexes/s04.html b/doc/html/indexes/s04.html index a85a8acb9..b1cf452d9 100644 --- a/doc/html/indexes/s04.html +++ b/doc/html/indexes/s04.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B F

    diff --git a/doc/html/indexes/s05.html b/doc/html/indexes/s05.html index bbcfaf2cf..551f9d26d 100644 --- a/doc/html/indexes/s05.html +++ b/doc/html/indexes/s05.html @@ -23,7 +23,7 @@

    -Index

    +Index

    A B C D E F G H I J K L M N O P Q R S T U V W Z

    diff --git a/doc/html/math_toolkit/conventions.html b/doc/html/math_toolkit/conventions.html index f81a789d4..0af9f10d5 100644 --- a/doc/html/math_toolkit/conventions.html +++ b/doc/html/math_toolkit/conventions.html @@ -27,7 +27,7 @@ Document Conventions

    - +

    This documentation aims to use of the following naming and formatting conventions. diff --git a/doc/html/math_toolkit/navigation.html b/doc/html/math_toolkit/navigation.html index fb5c1af8e..46ca1b620 100644 --- a/doc/html/math_toolkit/navigation.html +++ b/doc/html/math_toolkit/navigation.html @@ -27,7 +27,7 @@ Navigation

    - +

    Boost.Math documentation is provided in both HTML and PDF formats. diff --git a/doc/html/math_toolkit/sf_gamma/digamma.html b/doc/html/math_toolkit/sf_gamma/digamma.html index 5e6a74a82..d4fad0162 100644 --- a/doc/html/math_toolkit/sf_gamma/digamma.html +++ b/doc/html/math_toolkit/sf_gamma/digamma.html @@ -316,7 +316,7 @@

    The arbitrary precision version of this function uses recurrence relations - until x > BIG, and then evaluation via the asymtotic expansion above. + until x > BIG, and then evaluation via the asymptotic expansion above. As special cases integer and half integer arguments are handled via:

    diff --git a/doc/html/math_toolkit/sf_gamma/polygamma.html b/doc/html/math_toolkit/sf_gamma/polygamma.html index 4862b1e50..008cf0954 100644 --- a/doc/html/math_toolkit/sf_gamma/polygamma.html +++ b/doc/html/math_toolkit/sf_gamma/polygamma.html @@ -180,11 +180,11 @@

    - As shown above, error rates are generally very acceptible for moderately + As shown above, error rates are generally very acceptable for moderately sized arguments. Error rates generally increase with increasing n - this is particularly true for negative x and even n - in this situation there is a root between each negative - integer and cancellation errors incured in computing the result increase + integer and cancellation errors incurred in computing the result increase with increasing n. By the time n=170 the errors are so bad we can no longer even tell the sign of the result at double precision. It should diff --git a/doc/html/math_toolkit/sf_gamma/trigamma.html b/doc/html/math_toolkit/sf_gamma/trigamma.html index 1050f0440..46abe5504 100644 --- a/doc/html/math_toolkit/sf_gamma/trigamma.html +++ b/doc/html/math_toolkit/sf_gamma/trigamma.html @@ -169,7 +169,7 @@ Implementation

    - The arbitary precision version of this function simply calls polygamma. + The arbitrary precision version of this function simply calls polygamma.

    For built in fixed precision types, negative arguments are first made positive diff --git a/doc/sf/digamma.qbk b/doc/sf/digamma.qbk index b0c142bfd..d62466ac3 100644 --- a/doc/sf/digamma.qbk +++ b/doc/sf/digamma.qbk @@ -94,7 +94,7 @@ the series to truncated after a suitably small number of terms and evaluated as a polynomial in `1/(x*x)`. The arbitrary precision version of this function uses recurrence relations until -x > BIG, and then evaluation via the asymtotic expansion above. As special cases +x > BIG, and then evaluation via the asymptotic expansion above. As special cases integer and half integer arguments are handled via: [equation digamma4] diff --git a/doc/sf/polygamma.qbk b/doc/sf/polygamma.qbk index d905cbe88..85df23a12 100644 --- a/doc/sf/polygamma.qbk +++ b/doc/sf/polygamma.qbk @@ -47,10 +47,10 @@ than the one shown will have __zero_error. [[113] [Win64 Mingw GCC __float128] [Peak=6.5 Mean=1][Peak=30 Mean=4] ] ] -As shown above, error rates are generally very acceptible for moderately sized +As shown above, error rates are generally very acceptable for moderately sized arguments. Error rates generally increase with increasing /n/ - this is particularly true for negative /x/ and even /n/ - in this situation there is a root between each negative integer -and cancellation errors incured in computing the result increase with increasing /n/. By the time +and cancellation errors incurred in computing the result increase with increasing /n/. By the time /n=170/ the errors are so bad we can no longer even tell the sign of the result at `double` precision. It should also be noted that for large /n/ the function becomes increasingly badly behaved when /x/ is negative and is very sensitive to slight changes in input. @@ -103,7 +103,7 @@ to make x large enough for the asymptotic expansion to be used. [endsect][/section:polygamma The Polygamma Function] [/ - Copyright 2006 John Maddock and Paul A. Bristow. + Copyright 2014 John Maddock and Paul A. Bristow. 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). diff --git a/doc/sf/trigamma.qbk b/doc/sf/trigamma.qbk index 3a2719c8e..827c8fb52 100644 --- a/doc/sf/trigamma.qbk +++ b/doc/sf/trigamma.qbk @@ -54,7 +54,7 @@ Testing is against Mathematica generated spot values to 35 digit precision. [h4 Implementation] -The arbitary precision version of this function simply calls __polygamma. +The arbitrary precision version of this function simply calls __polygamma. For built in fixed precision types, negative arguments are first made positive via: @@ -76,7 +76,7 @@ and for large x of the form: [endsect][/section:digamma The Trigamma Function] [/ - Copyright 2006 John Maddock and Paul A. Bristow. + Copyright 2014 John Maddock and Paul A. Bristow. 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). From 23081c32f45759a64f59aa8b31e90b696cdf0464 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 14 Nov 2014 12:46:46 +0000 Subject: [PATCH 61/69] [polygamma] Update negative arg behavior. --- doc/sf/polygamma.qbk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/sf/polygamma.qbk b/doc/sf/polygamma.qbk index 85df23a12..699a45972 100644 --- a/doc/sf/polygamma.qbk +++ b/doc/sf/polygamma.qbk @@ -49,8 +49,7 @@ than the one shown will have __zero_error. As shown above, error rates are generally very acceptable for moderately sized arguments. Error rates generally increase with increasing /n/ - this is particularly true -for negative /x/ and even /n/ - in this situation there is a root between each negative integer -and cancellation errors incurred in computing the result increase with increasing /n/. By the time +for negative /x/. Indeed by the time /n=170/ the errors are so bad we can no longer even tell the sign of the result at `double` precision. It should also be noted that for large /n/ the function becomes increasingly badly behaved when /x/ is negative and is very sensitive to slight changes in input. From 9d6df5d8354e00e956b19341bfe61432b38791f3 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 14 Nov 2014 17:05:41 +0000 Subject: [PATCH 62/69] [polygamma] Remove some dead code and tidy up initialization and policy usage. --- .../math/special_functions/detail/polygamma.hpp | 2 -- include/boost/math/special_functions/digamma.hpp | 14 ++++++++++---- include/boost/math/special_functions/trigamma.hpp | 13 ++++++++++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 13fea20d8..7dbc0d9ea 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -579,8 +579,6 @@ BOOST_MATH_STD_USING static const char* function = "boost::math::polygamma<%1%>(int, %1%)"; polygamma_initializer::initializer.force_instantiate(); - if(n == 0) - return boost::math::digamma(x); if(n < 0) return policies::raise_domain_error(function, "Order must be >= 0, but got %1%", n, pol); if(x < 0) diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index ef9521333..d9e576e5e 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -524,7 +524,6 @@ T digamma_imp(T x, const mpl::int_<0>* t, const Policy& pol) for(int k = n; k <= 2 * n - 1; ++k) result += 2 / T(k); } - return result; } else { @@ -575,7 +574,7 @@ const typename digamma_initializer::init digamma_initializer inline typename tools::promote_args::type - digamma(T x, const Policy& pol) + digamma(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; @@ -601,12 +600,19 @@ inline typename tools::promote_args::type >::type >::type tag_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + // Force initialization of constants: - detail::digamma_initializer::force_instantiate(); + detail::digamma_initializer::force_instantiate(); return policies::checked_narrowing_cast(detail::digamma_imp( static_cast(x), - static_cast(0), pol), "boost::math::digamma<%1%>(%1%)"); + static_cast(0), forwarding_policy()), "boost::math::digamma<%1%>(%1%)"); } template diff --git a/include/boost/math/special_functions/trigamma.hpp b/include/boost/math/special_functions/trigamma.hpp index ad2dd6ef5..6fccb36a3 100644 --- a/include/boost/math/special_functions/trigamma.hpp +++ b/include/boost/math/special_functions/trigamma.hpp @@ -419,7 +419,7 @@ const typename trigamma_initializer::init trigamma_initializer inline typename tools::promote_args::type - trigamma(T x, const Policy& pol) + trigamma(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; @@ -441,12 +441,19 @@ inline typename tools::promote_args::type >::type >::type tag_type; + typedef typename policies::normalise< + Policy, + policies::promote_float, + policies::promote_double, + policies::discrete_quantile<>, + policies::assert_undefined<> >::type forwarding_policy; + // Force initialization of constants: - detail::trigamma_initializer::force_instantiate(); + detail::trigamma_initializer::force_instantiate(); return policies::checked_narrowing_cast(detail::trigamma_imp( static_cast(x), - static_cast(0), pol), "boost::math::trigamma<%1%>(%1%)"); + static_cast(0), forwarding_policy()), "boost::math::trigamma<%1%>(%1%)"); } template From 26f063eca4cf95e424a47089cad16d4be1d5b8c2 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 16 Nov 2014 17:18:17 +0000 Subject: [PATCH 63/69] Fix accuracy issue in cos_pi. Add tests for cos_pi and sin_pi. Doc regen. --- doc/html/index.html | 2 +- doc/html/indexes/s01.html | 2 +- doc/html/indexes/s02.html | 2 +- doc/html/indexes/s03.html | 2 +- doc/html/indexes/s04.html | 2 +- doc/html/indexes/s05.html | 2 +- doc/html/math_toolkit/conventions.html | 2 +- doc/html/math_toolkit/navigation.html | 2 +- doc/html/math_toolkit/sf_gamma/polygamma.html | 15 +- .../boost/math/special_functions/cos_pi.hpp | 23 +- .../boost/math/special_functions/sin_pi.hpp | 11 +- test/Jamfile.v2 | 1 + .../double_test_instances_6.cpp | 2 + .../test_instances/float_test_instances_6.cpp | 2 + .../ldouble_test_instances_6.cpp | 2 + .../real_concept_test_instances_6.cpp | 2 + test/test_instances/test_instances.hpp | 6 + test/test_trig.cpp | 82 ++++ test/test_trig.hpp | 81 ++++ test/trig_data.ipp | 421 ++++++++++++++++++ test/trig_data2.ipp | 155 +++++++ tools/trig_data.cpp | 83 ++++ 22 files changed, 878 insertions(+), 24 deletions(-) create mode 100644 test/test_trig.cpp create mode 100644 test/test_trig.hpp create mode 100644 test/trig_data.ipp create mode 100644 test/trig_data2.ipp create mode 100644 tools/trig_data.cpp diff --git a/doc/html/index.html b/doc/html/index.html index 9ce744172..2017c71c9 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -111,7 +111,7 @@ This manual is also available in -

    Last revised: November 09, 2014 at 11:25:57 GMT

    +

    Last revised: November 14, 2014 at 17:06:36 GMT


    diff --git a/doc/html/indexes/s01.html b/doc/html/indexes/s01.html index 62b8cd377..d753f84c8 100644 --- a/doc/html/indexes/s01.html +++ b/doc/html/indexes/s01.html @@ -24,7 +24,7 @@

    -Function Index

    +Function Index

    A B C D E F G H I J K L M N O P Q R S T U V Z

    diff --git a/doc/html/indexes/s02.html b/doc/html/indexes/s02.html index 85073ff5e..153e14e32 100644 --- a/doc/html/indexes/s02.html +++ b/doc/html/indexes/s02.html @@ -24,7 +24,7 @@

    -Class Index

    +Class Index

    B C D E F G H I L M N O P Q R S T U W

    diff --git a/doc/html/indexes/s03.html b/doc/html/indexes/s03.html index 6b9c13bdc..64efd0370 100644 --- a/doc/html/indexes/s03.html +++ b/doc/html/indexes/s03.html @@ -24,7 +24,7 @@

    -Typedef Index

    +Typedef Index

    A B C D E F G H I L N O P R S T U V W

    diff --git a/doc/html/indexes/s04.html b/doc/html/indexes/s04.html index b1cf452d9..d212d8c6d 100644 --- a/doc/html/indexes/s04.html +++ b/doc/html/indexes/s04.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B F

    diff --git a/doc/html/indexes/s05.html b/doc/html/indexes/s05.html index 551f9d26d..e83adeeb2 100644 --- a/doc/html/indexes/s05.html +++ b/doc/html/indexes/s05.html @@ -23,7 +23,7 @@

    -Index

    +Index

    A B C D E F G H I J K L M N O P Q R S T U V W Z

    diff --git a/doc/html/math_toolkit/conventions.html b/doc/html/math_toolkit/conventions.html index 0af9f10d5..985f76e85 100644 --- a/doc/html/math_toolkit/conventions.html +++ b/doc/html/math_toolkit/conventions.html @@ -27,7 +27,7 @@ Document Conventions

    - +

    This documentation aims to use of the following naming and formatting conventions. diff --git a/doc/html/math_toolkit/navigation.html b/doc/html/math_toolkit/navigation.html index 46ca1b620..01e2bc85c 100644 --- a/doc/html/math_toolkit/navigation.html +++ b/doc/html/math_toolkit/navigation.html @@ -27,7 +27,7 @@ Navigation

    - +

    Boost.Math documentation is provided in both HTML and PDF formats. diff --git a/doc/html/math_toolkit/sf_gamma/polygamma.html b/doc/html/math_toolkit/sf_gamma/polygamma.html index 008cf0954..e16218e27 100644 --- a/doc/html/math_toolkit/sf_gamma/polygamma.html +++ b/doc/html/math_toolkit/sf_gamma/polygamma.html @@ -182,15 +182,12 @@

    As shown above, error rates are generally very acceptable for moderately sized arguments. Error rates generally increase with increasing n - - this is particularly true for negative x and even - n - in this situation there is a root between each negative - integer and cancellation errors incurred in computing the result increase - with increasing n. By the time n=170 - the errors are so bad we can no longer even tell the sign of the result at - double precision. It should - also be noted that for large n the function becomes - increasingly badly behaved when x is negative and is - very sensitive to slight changes in input. + - this is particularly true for negative x. Indeed by + the time n=170 the errors are so bad we can no longer + even tell the sign of the result at double + precision. It should also be noted that for large n + the function becomes increasingly badly behaved when x + is negative and is very sensitive to slight changes in input.

    For these reasons results should be treated with extreme diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index 18d06c00d..669a2c87a 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -25,10 +25,10 @@ T cos_pi_imp(T x, const Policy& pol) BOOST_MATH_STD_USING // ADL of std names // cos of pi*x: bool invert = false; - if(fabs(x) < 0.5) + if(fabs(x) < 0.25) return cos(constants::pi() * x); - if(x < 1) + if(x < 0) { x = -x; } @@ -44,17 +44,30 @@ T cos_pi_imp(T x, const Policy& pol) if(rem == 0.5f) return 0; - rem = cos(constants::pi() * rem); + if(rem > 0.25f) + { + rem = 0.5f - rem; + rem = sin(constants::pi() * rem); + } + else + rem = cos(constants::pi() * rem); return invert ? T(-rem) : rem; } } // namespace detail template -inline typename tools::promote_args::type cos_pi(T x, const Policy& pol) +inline typename tools::promote_args::type cos_pi(T x, const Policy&) { typedef typename tools::promote_args::type result_type; - return boost::math::detail::cos_pi_imp(x, pol); + 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(boost::math::detail::cos_pi_imp(x, forwarding_policy()), "cos_pi"); } template diff --git a/include/boost/math/special_functions/sin_pi.hpp b/include/boost/math/special_functions/sin_pi.hpp index 16aed51d2..ae6b3e744 100644 --- a/include/boost/math/special_functions/sin_pi.hpp +++ b/include/boost/math/special_functions/sin_pi.hpp @@ -53,10 +53,17 @@ T sin_pi_imp(T x, const Policy& pol) } // namespace detail template -inline typename tools::promote_args::type sin_pi(T x, const Policy& pol) +inline typename tools::promote_args::type sin_pi(T x, const Policy&) { typedef typename tools::promote_args::type result_type; - return boost::math::detail::sin_pi_imp(x, pol); + 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(boost::math::detail::sin_pi_imp(x, forwarding_policy()), "cos_pi"); } template diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index ca1acaec4..d57581907 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -668,6 +668,7 @@ run test_skew_normal.cpp ../../test/build//boost_unit_test_framework ; run test_tgamma_ratio.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ; run test_toms748_solve.cpp pch ../../test/build//boost_unit_test_framework ; run test_triangular.cpp pch ../../test/build//boost_unit_test_framework ; +run test_trig.cpp test_instances//test_instances pch_light ../../test/build//boost_unit_test_framework ; run test_uniform.cpp pch ../../test/build//boost_unit_test_framework ; run test_weibull.cpp ../../test/build//boost_unit_test_framework ; run test_zeta.cpp ../../test/build//boost_unit_test_framework test_instances//test_instances pch_light ; diff --git a/test/test_instances/double_test_instances_6.cpp b/test/test_instances/double_test_instances_6.cpp index 2edbc5d37..5fc890867 100644 --- a/test/test_instances/double_test_instances_6.cpp +++ b/test/test_instances/double_test_instances_6.cpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #endif #define BOOST_MATH_TEST_TYPE double diff --git a/test/test_instances/float_test_instances_6.cpp b/test/test_instances/float_test_instances_6.cpp index 580a9adac..8d8400131 100644 --- a/test/test_instances/float_test_instances_6.cpp +++ b/test/test_instances/float_test_instances_6.cpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #endif #define BOOST_MATH_TEST_TYPE float diff --git a/test/test_instances/ldouble_test_instances_6.cpp b/test/test_instances/ldouble_test_instances_6.cpp index 5a03396b2..c56695fec 100644 --- a/test/test_instances/ldouble_test_instances_6.cpp +++ b/test/test_instances/ldouble_test_instances_6.cpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #endif #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS diff --git a/test/test_instances/real_concept_test_instances_6.cpp b/test/test_instances/real_concept_test_instances_6.cpp index 05ad5324b..18137510d 100644 --- a/test/test_instances/real_concept_test_instances_6.cpp +++ b/test/test_instances/real_concept_test_instances_6.cpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #endif #include diff --git a/test/test_instances/test_instances.hpp b/test/test_instances/test_instances.hpp index e13dad959..949618fab 100644 --- a/test/test_instances/test_instances.hpp +++ b/test/test_instances/test_instances.hpp @@ -337,6 +337,12 @@ namespace boost{ namespace math{ template tools::promote_args::type sqrt1pm1(const BOOST_MATH_TEST_TYPE& val); template tools::promote_args::type sqrt1pm1(const BOOST_MATH_TEST_TYPE& val, const policies::policy<>&); + + // sin_pi, cos_pi + template tools::promote_args::type sin_pi(const BOOST_MATH_TEST_TYPE val); + template tools::promote_args::type sin_pi(const BOOST_MATH_TEST_TYPE val, const policies::policy<>&); + template tools::promote_args::type cos_pi(const BOOST_MATH_TEST_TYPE val); + template tools::promote_args::type cos_pi(const BOOST_MATH_TEST_TYPE val, const policies::policy<>&); #endif #ifdef TEST_GROUP_7 // Bessel functions: diff --git a/test/test_trig.cpp b/test/test_trig.cpp new file mode 100644 index 000000000..142910c81 --- /dev/null +++ b/test/test_trig.cpp @@ -0,0 +1,82 @@ +// Copyright John Maddock 2014. +// 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 "test_trig.hpp" + +// +// DESCRIPTION: +// ~~~~~~~~~~~~ +// +// This file tests the functions sin_pi, cos_pi, with test data +// generated at high precision naively using sin(pi*x) rather than +// our routines. +// + +void expected_results() +{ + // + // Define the max and mean errors expected for + // various compilers and platforms. + // + const char* largest_type; +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + if(boost::math::policies::digits >() == boost::math::policies::digits >()) + { + largest_type = "(long\\s+)?double|real_concept"; + } + else + { + largest_type = "long double|real_concept"; + } +#else + largest_type = "(long\\s+)?double"; +#endif + // + // On MacOS X erfc has much higher error levels than + // expected: given that the implementation is basically + // just a rational function evaluation combined with + // exponentiation, we conclude that exp and pow are less + // accurate on this platform, especially when the result + // is outside the range of a double. + // + add_expected_result( + ".*", // compiler + ".*", // stdlib + ".*", // platform + largest_type, // test type(s) + ".*", // test data group + ".*", 2, 1); // test function + + // + // Finish off by printing out the compiler/stdlib/platform names, + // we do this to make it easier to mark up expected error rates. + // + std::cout << "Tests run with " << BOOST_COMPILER << ", " + << BOOST_STDLIB << ", " << BOOST_PLATFORM << std::endl; +} + +BOOST_AUTO_TEST_CASE( test_main ) +{ + BOOST_MATH_CONTROL_FP; + expected_results(); + + test_trig(0.1F, "float"); + test_trig(0.1, "double"); +#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS + test_trig(0.1L, "long double"); +#ifndef BOOST_MATH_NO_REAL_CONCEPT_TESTS +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + test_trig(boost::math::concepts::real_concept(0.1), "real_concept"); +#endif +#endif +#else + std::cout << "The long double tests have been disabled on this platform " + "either because the long double overloads of the usual math functions are " + "not available at all, or because they are too inaccurate for these tests " + "to pass." << std::cout; +#endif +} + diff --git a/test/test_trig.hpp b/test/test_trig.hpp new file mode 100644 index 000000000..c3b1887ca --- /dev/null +++ b/test/test_trig.hpp @@ -0,0 +1,81 @@ +// Copyright John Maddock 2014. +// 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 +#define BOOST_TEST_MAIN +#include +#include +#include +#include +#include +#include +#include "functor.hpp" + +#include "handle_test_result.hpp" +#include "table_type.hpp" + +#ifndef SC_ +#define SC_(x) static_cast::type>(BOOST_JOIN(x, L)) +#endif + +template +void do_test_trig(const T& data, const char* type_name, const char* test_name) +{ + typedef Real value_type; + + typedef value_type (*pg)(value_type); +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + pg funcp = boost::math::sin_pi; +#else + pg funcp = boost::math::sin_pi; +#endif + + boost::math::tools::test_result result; + + std::cout << "Testing " << test_name << " with type " << type_name + << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; + + // + // test sin_pi against data: + // + result = boost::math::tools::test_hetero( + data, + bind_func(funcp, 0), + extract_result(1)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::sin_pi", test_name); + // + // test cos_pi against data: + // +#if defined(BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS) + funcp = boost::math::cos_pi; +#else + funcp = boost::math::cos_pi; +#endif + result = boost::math::tools::test_hetero( + data, + bind_func(funcp, 0), + extract_result(2)); + handle_test_result(result, data[result.worst()], result.worst(), type_name, "boost::math::cos_pi", test_name); + std::cout << std::endl; +} + +template +void test_trig(T, const char* name) +{ + // + // The actual test data is rather verbose, so it's in a separate file + // + // The contents are as follows, each row of data contains + // three items, input value a, input value b and erf(a, b): + // +# include "trig_data.ipp" + + do_test_trig(trig_data, name, "sin_pi and cos_pi"); + +# include "trig_data2.ipp" + + do_test_trig(trig_data2, name, "sin_pi and cos_pi near integers and half integers"); +} + diff --git a/test/trig_data.ipp b/test/trig_data.ipp new file mode 100644 index 000000000..406fde947 --- /dev/null +++ b/test/trig_data.ipp @@ -0,0 +1,421 @@ +#ifndef SC_ +# define SC_(x) static_cast(BOOST_JOIN(x, L)) +#endif + static const boost::array, 414> trig_data = {{ + { SC_(-3.9774532318115234375000000000000000000000e+00), SC_(7.0773544860026243860279929113278325110375e-02), SC_(9.9749240866682582129171337066426038082437e-01) }, + { SC_(-3.9617328643798828125000000000000000000000e+00), SC_(1.1993037621708977961146677085715171980751e-01), SC_(9.9278230486870952597534166945986069243176e-01) }, + { SC_(-3.9047842025756835937500000000000000000000e+00), SC_(2.9468823519354637105911947101495882286179e-01), SC_(9.5559345123253806128916838776381320091963e-01) }, + { SC_(-3.8916873931884765625000000000000000000000e+00), SC_(3.3374547909601862041893513083013201963857e-01), SC_(9.4266322469001038147288152092736823391568e-01) }, + { SC_(-3.8578090667724609375000000000000000000000e+00), SC_(4.3199709903403737307912472091970588030864e-01), SC_(9.0187499490016691899377344383391047319671e-01) }, + { SC_(-3.7453374862670898437500000000000000000000e+00), SC_(7.1738805664233213419617848590715510878805e-01), SC_(6.9667379467505311174160335392136633824863e-01) }, + { SC_(-3.7244319915771484375000000000000000000000e+00), SC_(7.6156366259470177260070281063647817588426e-01), SC_(6.4809010779006898537856851402643268133964e-01) }, + { SC_(-3.7143068313598632812500000000000000000000e+00), SC_(7.8179011765786965192070724412252980346206e-01), SC_(6.2354166816059239705031197761170482474277e-01) }, + { SC_(-3.7084703445434570312500000000000000000000e+00), SC_(7.9309123554739645631663479916579239803262e-01), SC_(6.0910285838920844088315459958697481264632e-01) }, + { SC_(-3.6306295394897460937500000000000000000000e+00), SC_(9.1696736941200755880066612020982424508209e-01), SC_(3.9896220802680404308672276469459511697767e-01) }, + { SC_(-3.5902690887451171875000000000000000000000e+00), SC_(9.6005749263309399424762040094854912358485e-01), SC_(2.7980280706071672819250833169767675946625e-01) }, + { SC_(-3.5683994293212890625000000000000000000000e+00), SC_(9.7700131832151631709443635682201094394830e-01), SC_(2.1323326194104695723693260957232796074504e-01) }, + { SC_(-3.4592370986938476562500000000000000000000e+00), SC_(9.9181146279384676289373069342215326327259e-01), SC_(-1.2771069755791767012021871220455601680871e-01) }, + { SC_(-3.3931655883789062500000000000000000000000e+00), SC_(9.4420293088917725164777488803566691613860e-01), SC_(-3.2936427447476383305860665908806457784788e-01) }, + { SC_(-3.2229461669921875000000000000000000000000e+00), SC_(6.4452819092715720460681805414890459455338e-01), SC_(-7.6458054585515448444199304174329276576484e-01) }, + { SC_(-3.2196769714355468750000000000000000000000e+00), SC_(6.3664172619341055705211898635086791126371e-01), SC_(-7.7115971916943020671267760720429588807288e-01) }, + { SC_(-3.1211061477661132812500000000000000000000e+00), SC_(3.7135335780369037404310918499389657193681e-01), SC_(-9.2849161743546414936854741692037249771494e-01) }, + { SC_(-3.1002845764160156250000000000000000000000e+00), SC_(3.0986713733563102476788873073830476308206e-01), SC_(-9.5077986789762286248285770175256182955887e-01) }, + { SC_(-3.0480184555053710937500000000000000000000e+00), SC_(1.5028291058010493207025880578034599707430e-01), SC_(-9.8864303304457275939138181401436526701454e-01) }, + { SC_(-2.9985380172729492187500000000000000000000e+00), SC_(-4.5929380467587678038943727972886926572694e-03), SC_(-9.9998945240442343165400505621385600628710e-01) }, + { SC_(-2.9928274154663085937500000000000000000000e+00), SC_(-2.2531432037793477675469226940100283743575e-02), SC_(-9.9974613506145963677579891828378701312519e-01) }, + { SC_(-2.9841060638427734375000000000000000000000e+00), SC_(-4.9911526865301578262897706703502998396013e-02), SC_(-9.9875364304015145795419227904280421041712e-01) }, + { SC_(-2.9607505798339843750000000000000000000000e+00), SC_(-1.2299346485981660064237020203833067995992e-01), SC_(-9.9240748062566369342250467688663564344568e-01) }, + { SC_(-2.9161844253540039062500000000000000000000e+00), SC_(-2.6028213071204756629425186005846465917215e-01), SC_(-9.6553260557683736103737209395477391945707e-01) }, + { SC_(-2.8910045623779296875000000000000000000000e+00), SC_(-3.3576688840249427771925848349727492747208e-01), SC_(-9.4194511339701049149409128507465051072874e-01) }, + { SC_(-2.8649091720581054687500000000000000000000e+00), SC_(-4.1177440566510667850464728538235996067571e-01), SC_(-9.1128581621747419851467502037941438628419e-01) }, + { SC_(-2.8070888519287109375000000000000000000000e+00), SC_(-5.6962394780317258349095500647963019767726e-01), SC_(-8.2190544352080338079904161219679275645723e-01) }, + { SC_(-2.8056478500366210937500000000000000000000e+00), SC_(-5.7333889774547421097781817548901513478394e-01), SC_(-8.1931831929476876961507584991747574097795e-01) }, + { SC_(-2.7644929885864257812500000000000000000000e+00), SC_(-6.7418976093170810969556332422484681604555e-01), SC_(-7.3855816714382508099719065401369284800331e-01) }, + { SC_(-2.7390956878662109375000000000000000000000e+00), SC_(-7.3091046787338668451145170450133524796388e-01), SC_(-6.8247336061791230280379473053114594954268e-01) }, + { SC_(-2.7355394363403320312500000000000000000000e+00), SC_(-7.3848948635740579707953709312462199704324e-01), SC_(-6.7426499133469398680589790058582600474355e-01) }, + { SC_(-2.6991062164306640625000000000000000000000e+00), SC_(-8.1066424743162907541066892533920219267801e-01), SC_(-5.8551129616439550978746461056239261291598e-01) }, + { SC_(-2.6305065155029296875000000000000000000000e+00), SC_(-9.1712149632570388738239981145670570715552e-01), SC_(-3.9860777837029461434452340017415559695465e-01) }, + { SC_(-2.6090793609619140625000000000000000000000e+00), SC_(-9.4185655472943839830579836290050447836428e-01), SC_(-3.3601522333547986304807314632542163159655e-01) }, + { SC_(-2.5050191879272460937500000000000000000000e+00), SC_(-9.9987568381768953436701127766269045040788e-01), SC_(-1.5767590497845478262656414731631988934965e-02) }, + { SC_(-2.4929447174072265625000000000000000000000e+00), SC_(-9.9975437034566987067580804393808517747219e-01), SC_(2.2163009153388271557271132253243652915113e-02) }, + { SC_(-2.4272384643554687500000000000000000000000e+00), SC_(-9.7398753115843827533170990651639503684643e-01), SC_(2.2660160888195438795075340941984049712659e-01) }, + { SC_(-2.3354558944702148437500000000000000000000e+00), SC_(-8.6934023639191873450982490002851733105284e-01), SC_(4.9421407647905260119880040102899169441924e-01) }, + { SC_(-2.3183279037475585937500000000000000000000e+00), SC_(-8.4150156664834359869540818771524073982051e-01), SC_(5.4025467450859075039160413881361295523246e-01) }, + { SC_(-2.3046054840087890625000000000000000000000e+00), SC_(-8.1743642279419458878430396216469861867532e-01), SC_(5.7601883188783919247059390170720375367970e-01) }, + { SC_(-2.2620973587036132812500000000000000000000e+00), SC_(-7.3346328340507778941301945165878879887661e-01), SC_(6.7972907242271353377593468076196477559511e-01) }, + { SC_(-2.2317276000976562500000000000000000000000e+00), SC_(-6.6537326993316934952514665105248864416333e-01), SC_(7.4651082487693489365391928166376502681137e-01) }, + { SC_(-2.2095050811767578125000000000000000000000e+00), SC_(-6.1167775393828157540960701817140835841373e-01), SC_(7.9110702521025501171584436651855140566145e-01) }, + { SC_(-2.1587514877319335937500000000000000000000e+00), SC_(-4.7831282457156194256147826366717615468415e-01), SC_(8.7818952501744986937643074486430914859891e-01) }, + { SC_(-2.0518007278442382812500000000000000000000e+00), SC_(-1.6201943644875820325965658806034453314425e-01), SC_(9.8678756691236579534545882522215038541766e-01) }, + { SC_(-1.9913291931152343750000000000000000000000e+00), SC_(2.7236774521824119247640639457167240403283e-02), SC_(9.9962901024012268934784446000199714742073e-01) }, + { SC_(-1.9808664321899414062500000000000000000000e+00), SC_(6.0073684468702575262797776910860329709958e-02), SC_(9.9819394530038838689681575445113488209634e-01) }, + { SC_(-1.9657425880432128906250000000000000000000e+00), SC_(1.0741519398297458068845667640105099725089e-01), SC_(9.9421425060275611673890046532660283866692e-01) }, + { SC_(-1.9592390060424804687500000000000000000000e+00), SC_(1.2770475450980803702535188445773082653842e-01), SC_(9.9181222803290223591996402565002586050197e-01) }, + { SC_(-1.9399342536926269531250000000000000000000e+00), SC_(1.8758420016848789064877165024139046518307e-01), SC_(9.8224852651818657111887581810958489845723e-01) }, + { SC_(-1.8726687431335449218750000000000000000000e+00), SC_(3.8943947239907955191806267942993095630447e-01), SC_(9.2105206005823935504113082081651078396843e-01) }, + { SC_(-1.8622159957885742187500000000000000000000e+00), SC_(4.1946983932693600433549716080531291905775e-01), SC_(9.0776927349136162127391594039572935545573e-01) }, + { SC_(-1.8571534156799316406250000000000000000000e+00), SC_(4.3385385318065783138522312391833924596257e-01), SC_(9.0098325960047459614595694068784152978597e-01) }, + { SC_(-1.8542351722717285156250000000000000000000e+00), SC_(4.4209565798070871752154886197372379282014e-01), SC_(8.9696790867600398251070757116939705415091e-01) }, + { SC_(-1.8153147697448730468750000000000000000000e+00), SC_(5.4819603791581527487211750854339931561457e-01), SC_(8.3634986938087221868046812319445417842653e-01) }, + { SC_(-1.7951345443725585937500000000000000000000e+00), SC_(6.0008215809974023581434137516121683653367e-01), SC_(7.9993837483293571774722252288759286003132e-01) }, + { SC_(-1.7917995452880859375000000000000000000000e+00), SC_(6.0843019022618795009788527140260807985237e-01), SC_(7.9360739892047676462942185706066696498359e-01) }, + { SC_(-1.7846164703369140625000000000000000000000e+00), SC_(6.2618253814748614262259811608337148376852e-01), SC_(7.7967648991050901236982422793142962643534e-01) }, + { SC_(-1.7720141410827636718750000000000000000000e+00), SC_(6.5655224709393941166212925616015192588965e-01), SC_(7.5428054915654475424462469532824344031256e-01) }, + { SC_(-1.7132878303527832031250000000000000000000e+00), SC_(7.8378224352958754678835476318536431268280e-01), SC_(6.2103574351862093135376998317963401489884e-01) }, + { SC_(-1.6237645149230957031250000000000000000000e+00), SC_(9.2535791354740309366987559846725871864256e-01), SC_(3.7909462121638822065656109832689999162915e-01) }, + { SC_(-1.6114730834960937500000000000000000000000e+00), SC_(9.3930307831262708058711419944650941883676e-01), SC_(3.4308851200881494653328085763181866157541e-01) }, + { SC_(-1.6098384857177734375000000000000000000000e+00), SC_(9.4105252753749888823550959379536266333425e-01), SC_(3.3826046238850454312441253682427645862925e-01) }, + { SC_(-1.6013464927673339843750000000000000000000e+00), SC_(9.4974082848623693795720143987094090825340e-01), SC_(3.1303731200333974188394551215433704440959e-01) }, + { SC_(-1.5846953392028808593750000000000000000000e+00), SC_(9.6480953481970116774592198724118779033893e-01), SC_(2.6294973192797105413764821926664215930415e-01) }, + { SC_(-1.5605530738830566406250000000000000000000e+00), SC_(9.8196018693108534535704372647626920244478e-01), SC_(1.8908778723721932992809652230019128825755e-01) }, + { SC_(-1.5501422882080078125000000000000000000000e+00), SC_(9.8761831389905454265970551125211297990428e-01), SC_(1.5687595753074646574707218589497119732404e-01) }, + { SC_(-1.5346636772155761718750000000000000000000e+00), SC_(9.9407634470097495678440728067370155376700e-01), SC_(1.0868404163421794168841468106351872585391e-01) }, + { SC_(-1.4992690086364746093750000000000000000000e+00), SC_(9.9999736309762923085701730064921942403709e-01), SC_(-2.2964750789599640237311476160375647471297e-03) }, + { SC_(-1.4964137077331542968750000000000000000000e+00), SC_(9.9993653175125560985405906117690348917772e-01), SC_(-1.1266431079546957052007973149282697740413e-02) }, + { SC_(-1.4920530319213867187500000000000000000000e+00), SC_(9.9968836220097897515421090351123102378467e-01), SC_(-2.4963543016252140624424353620834798422298e-02) }, + { SC_(-1.4675965309143066406250000000000000000000e+00), SC_(9.9482300571031767470545247345135328742037e-01), SC_(-1.0162276964090895700009449059085389237392e-01) }, + { SC_(-1.4632043838500976562500000000000000000000e+00), SC_(9.9332612227433410103147521255561275226122e-01), SC_(-1.1533956306244036792882185538617246505954e-01) }, + { SC_(-1.4580922126770019531250000000000000000000e+00), SC_(9.9134570296562978571638835022392061422831e-01), SC_(-1.3127717703996121305882839967483442627768e-01) }, + { SC_(-1.4324545860290527343750000000000000000000e+00), SC_(9.7756989934671019373169629057504194866857e-01), SC_(-2.1061123401011376426045773413676664246694e-01) }, + { SC_(-1.4035444259643554687500000000000000000000e+00), SC_(9.5443843267148546358442745434898986199886e-01), SC_(-2.9840790579272243805349313736867888474031e-01) }, + { SC_(-1.3695478439331054687500000000000000000000e+00), SC_(9.1718955527685559847290691336960412613353e-01), SC_(-3.9845115094706885361124346266024345228301e-01) }, + { SC_(-1.3404140472412109375000000000000000000000e+00), SC_(8.7693258816614827774022620024409696405300e-01), SC_(-4.8061339537326732482363246144236277866115e-01) }, + { SC_(-1.3152532577514648437500000000000000000000e+00), SC_(8.3624391727841423335265182846988227041057e-01), SC_(-5.4835764863349238490645223769948911756242e-01) }, + { SC_(-1.3045396804809570312500000000000000000000e+00), SC_(8.1731732617615535993972423284173533764089e-01), SC_(-5.7618780647655159179892641392622477267985e-01) }, + { SC_(-1.3030190467834472656250000000000000000000e+00), SC_(8.1455543925394655461272630731962754843475e-01), SC_(-5.8008571468517493943647864535875052887067e-01) }, + { SC_(-1.2769141197204589843750000000000000000000e+00), SC_(7.6429757445950074729137528619490067922475e-01), SC_(-6.4486372023499966079783788886350455652073e-01) }, + { SC_(-1.2525095939636230468750000000000000000000e+00), SC_(7.1265966298712510976727080775393286775191e-01), SC_(-7.0150994629518779252029019684147294502654e-01) }, + { SC_(-1.2464723587036132812500000000000000000000e+00), SC_(6.9922707000180267922218828300011329952476e-01), SC_(-7.1489964650760188760883502369405946194110e-01) }, + { SC_(-1.2001299858093261718750000000000000000000e+00), SC_(5.8811557544674391201807840618842034354183e-01), SC_(-8.0877689749209903443231961711462521827931e-01) }, + { SC_(-1.1867241859436035156250000000000000000000e+00), SC_(5.5354205085637434626546678256347217807178e-01), SC_(-8.3282122807582124987721942593859613012643e-01) }, + { SC_(-1.1779007911682128906250000000000000000000e+00), SC_(5.3024695959373754552303103234918288901743e-01), SC_(-8.4784324131386296186416330083981392494060e-01) }, + { SC_(-1.1591639518737792968750000000000000000000e+00), SC_(4.7945037568626914655477387944495383191264e-01), SC_(-8.7756899287423286625851917347611833444398e-01) }, + { SC_(-1.1523027420043945312500000000000000000000e+00), SC_(4.6042435215361969792282407073518388211496e-01), SC_(-8.8769894443100448931565479086756325580560e-01) }, + { SC_(-1.1492390632629394531250000000000000000000e+00), SC_(4.5185920599520057053276864006142326681945e-01), SC_(-8.9208926568891461848383857895451033722071e-01) }, + { SC_(-1.1158638000488281250000000000000000000000e+00), SC_(3.5601206097761990452977868423235984965323e-01), SC_(-9.3448136013430864303645437573928108578348e-01) }, + { SC_(-1.1096482276916503906250000000000000000000e+00), SC_(3.3769792246460164629474039532696958192046e-01), SC_(-9.4125454217394982766035943636083719035312e-01) }, + { SC_(-9.9043321609497070312500000000000000000000e-01), SC_(-3.0050413471461695540024564936224673638671e-02), SC_(-9.9954838434674796559331625390455526383528e-01) }, + { SC_(-9.5643329620361328125000000000000000000000e-01), SC_(-1.3644190756047759246554033570694178287822e-01), SC_(-9.9064807366756540198038975645604554633439e-01) }, + { SC_(-9.4753241539001464843750000000000000000000e-01), SC_(-1.6408639175605146962710766285506114119657e-01), SC_(-9.8644597218523813297671237540079338723261e-01) }, + { SC_(-9.2857670783996582031250000000000000000000e-01), SC_(-2.2250476444283772218673996900250402304488e-01), SC_(-9.7493160262668544704751699124979976907538e-01) }, + { SC_(-9.0163278579711914062500000000000000000000e-01), SC_(-3.0413446038713361333822828583779165454320e-01), SC_(-9.5262911461125680576016437426221838649931e-01) }, + { SC_(-8.9230823516845703125000000000000000000000e-01), SC_(-3.3190624435937551944026868331727174806526e-01), SC_(-9.4331237930775323106949286771312588863657e-01) }, + { SC_(-8.9144158363342285156250000000000000000000e-01), SC_(-3.3447333562412172678970446066984069391038e-01), SC_(-9.4240521420271950010600975154227611905033e-01) }, + { SC_(-8.8600707054138183593750000000000000000000e-01), SC_(-3.5051351674611297773892844232778109262325e-01), SC_(-9.3655767285217004788794178878222072725075e-01) }, + { SC_(-8.6218380928039550781250000000000000000000e-01), SC_(-4.1956162799502567154232074130357340928086e-01), SC_(-9.0772685336182695234250043188704963864421e-01) }, + { SC_(-8.6143636703491210937500000000000000000000e-01), SC_(-4.2169195637805975119285327312737312233359e-01), SC_(-9.0673915429193006252439409007275140629891e-01) }, + { SC_(-8.4073424339294433593750000000000000000000e-01), SC_(-4.7973102317517230304261884461240907857963e-01), SC_(-8.7741560585808040133569859818046730577292e-01) }, + { SC_(-8.1188225746154785156250000000000000000000e-01), SC_(-5.5718281505427452448329165251503905335361e-01), SC_(-8.3038985459132032336863115402098077691083e-01) }, + { SC_(-8.1009173393249511718750000000000000000000e-01), SC_(-5.6184499762684714941201079089906385083574e-01), SC_(-8.2724252709933144553839916770138677027624e-01) }, + { SC_(-8.0491924285888671875000000000000000000000e-01), SC_(-5.7521280306139546882966748568272662288193e-01), SC_(-8.1800380878957542391952832960065838706905e-01) }, + { SC_(-7.9234766960144042968750000000000000000000e-01), SC_(-6.0706271013464043353366890549457782214483e-01), SC_(-7.9465392842669916991006928492234100087798e-01) }, + { SC_(-7.8027653694152832031250000000000000000000e-01), SC_(-6.3675435324887283807387968443064323927454e-01), SC_(-7.7106672449186241936833965977451467018076e-01) }, + { SC_(-7.7507114410400390625000000000000000000000e-01), SC_(-6.4927807697058951839952462358015400901876e-01), SC_(-7.6055110200786194960603336466921442346690e-01) }, + { SC_(-7.6733183860778808593750000000000000000000e-01), SC_(-6.6757619728604092071453324386955542070385e-01), SC_(-7.4454148361062392239556769325773825702564e-01) }, + { SC_(-7.6633191108703613281250000000000000000000e-01), SC_(-6.6991177608595655051935696217363478255092e-01), SC_(-7.4244071296054287243575657514607719322578e-01) }, + { SC_(-7.4602651596069335937500000000000000000000e-01), SC_(-7.1587832171963837887635431025898472882166e-01), SC_(-6.9822505576058635858412171583081361890022e-01) }, + { SC_(-7.3379826545715332031250000000000000000000e-01), SC_(-7.4216668263972512989393331690792412278837e-01), SC_(-6.7021534985372091334416257663429154500405e-01) }, + { SC_(-7.3160219192504882812500000000000000000000e-01), SC_(-7.4677291162121044357118392614751604427866e-01), SC_(-6.6507910692546929235444637559841943883780e-01) }, + { SC_(-7.3015069961547851562500000000000000000000e-01), SC_(-7.4979789619975431859407425681834155793237e-01), SC_(-6.6166692138448514733500503346266288770938e-01) }, + { SC_(-7.2904610633850097656250000000000000000000e-01), SC_(-7.5208948172407025528198849071078367555793e-01), SC_(-6.5906100740372995720833771145494015491300e-01) }, + { SC_(-7.1622729301452636718750000000000000000000e-01), SC_(-7.7801389255273384361671151573028725535226e-01), SC_(-6.2824707161668737687554440833515396883131e-01) }, + { SC_(-6.9866776466369628906250000000000000000000e-01), SC_(-8.1146998296245819360997140966632402827569e-01), SC_(-5.8439410225541103503434006174383390019441e-01) }, + { SC_(-6.8477392196655273437500000000000000000000e-01), SC_(-8.3619709128502380052191736485373876087540e-01), SC_(-5.4842905149751647086512164896949709113631e-01) }, + { SC_(-6.2590980529785156250000000000000000000000e-01), SC_(-9.2278195998532618711876533583518132364809e-01), SC_(-3.8532253285480186101800088717832245706995e-01) }, + { SC_(-6.2329864501953125000000000000000000000000e-01), SC_(-9.2591175509822434191601497566806265470122e-01), SC_(-3.7773988639131799973972992658851246182229e-01) }, + { SC_(-6.2323617935180664062500000000000000000000e-01), SC_(-9.2598586557992392706129793388845742526082e-01), SC_(-3.7755817663798390607300611567844842451415e-01) }, + { SC_(-6.1467909812927246093750000000000000000000e-01), SC_(-9.3579990857438429046804091642616234433613e-01), SC_(-3.5253160299776529867139565344134595722872e-01) }, + { SC_(-5.7615137100219726562500000000000000000000e-01), SC_(-9.7151915689578774494869132124118403599895e-01), SC_(-2.3696102587661489811187077067744115225597e-01) }, + { SC_(-5.5793190002441406250000000000000000000000e-01), SC_(-9.8348395008111562039809975749836686477222e-01), SC_(-1.8099535887100994524708884360178660464816e-01) }, + { SC_(-5.5482411384582519531250000000000000000000e-01), SC_(-9.8520417735968563737667037948690963338512e-01), SC_(-1.7138473944031623193691095714321985250340e-01) }, + { SC_(-4.9999964237213134765625000000000000000000e-01), SC_(-9.9999999999936885018591827017238645533757e-01), SC_(1.1235210848769422650061483788666125928854e-06) }, + { SC_(-4.9999952316284179687500000000000000000000e-01), SC_(-9.9999999999887795588607701655175253650385e-01), SC_(1.4980281131690112288542788461553611206918e-06) }, + { SC_(-4.9999821186065673828125000000000000000000e-01), SC_(-9.9999999998422125464799658931844288845336e-01), SC_(5.6176054243563469200773000686083983167359e-06) }, + { SC_(-4.9999654293060302734375000000000000000000e-01), SC_(-9.9999999994102255626249187643087021470265e-01), SC_(1.0860703820265881289283604713526279435907e-05) }, + { SC_(-4.9999570846557617187500000000000000000000e-01), SC_(-9.9999999990911442677359804232502397526992e-01), SC_(1.3482253018117696189242608854023945230621e-05) }, + { SC_(-4.9998497962951660156250000000000000000000e-01), SC_(-9.9999999888665172816630219829107169151373e-01), SC_(4.7187885547329319055657947640681604270190e-05) }, + { SC_(-4.9997079372406005859375000000000000000000e-01), SC_(-9.9999999579058138181322106904089468671587e-01), SC_(9.1754221802892278460653643781329654613072e-05) }, + { SC_(-4.9996280670166015625000000000000000000000e-01), SC_(-9.9999999317348361865817975703384517397171e-01), SC_(1.1684619256134242811309917534624539649780e-04) }, + { SC_(-4.9990046024322509765625000000000000000000e-01), SC_(-9.9999995110517494031950602050113650140195e-01), SC_(3.1271336352745955257438826774914611254936e-04) }, + { SC_(-4.9984037876129150390625000000000000000000e-01), SC_(-9.9999987426647421111465519406831701300167e-01), SC_(5.0146488986653011967572952923949622011443e-04) }, + { SC_(-4.9973213672637939453125000000000000000000e-01), SC_(-9.9999964592434404522856871599729444235462e-01), SC_(8.4151719325274199816762458443766057922935e-04) }, + { SC_(-4.9924457073211669921875000000000000000000e-01), SC_(-9.9999718384107642318385022061791039708231e-01), SC_(2.3732488104711122888975542758864726809649e-03) }, + { SC_(-4.9875152111053466796875000000000000000000e-01), SC_(-9.9999230813595346585340014254398865673184e-01), SC_(3.9222020509269767647741982519122733031044e-03) }, + { SC_(-4.9767899513244628906250000000000000000000e-01), SC_(-9.9997341602450135387659472378982173884007e-01), SC_(7.2915872270404153887073312687679308998549e-03) }, + { SC_(-4.9395751953125000000000000000000000000000e-01), SC_(-9.9981982803353944005287225251112677857740e-01), SC_(1.8981872167508178357172130364879478736824e-02) }, + { SC_(-4.9004507064819335937500000000000000000000e-01), SC_(-9.9951099790928556667259410781791684423868e-01), SC_(3.1269235014373849691623925611210178296109e-02) }, + { SC_(-4.8443067073822021484375000000000000000000e-01), SC_(-9.9880402260967383350104913506749804650695e-01), SC_(4.8892989464075129410881960564239566356159e-02) }, + { SC_(-4.7376620769500732421875000000000000000000e-01), SC_(-9.9660573252044816164949064267275474142215e-01), SC_(8.2322620872886047296075858223633591242075e-02) }, + { SC_(-4.6941399574279785156250000000000000000000e-01), SC_(-9.9538702545592996217602751881533829549808e-01), SC_(9.5940969111197941216571259124451089062976e-02) }, + { SC_(-4.4300353527069091796875000000000000000000e-01), SC_(-9.8401160380662433728097415173321874784567e-01), SC_(1.7810436146797465795076411723785630146946e-01) }, + { SC_(-4.3761062622070312500000000000000000000000e-01), SC_(-9.8085302335197751084221022090414475952815e-01), SC_(1.9474944565077729586702134297397558908793e-01) }, + { SC_(-4.3531036376953125000000000000000000000000e-01), SC_(-9.7942007014122136260839903400131683850089e-01), SC_(2.0183242109375051114419382469832542056336e-01) }, + { SC_(-4.3109190464019775390625000000000000000000e-01), SC_(-9.7665931966111574917260180371016061375191e-01), SC_(2.1479425811479813351335297938533711689703e-01) }, + { SC_(-4.0594112873077392578125000000000000000000e-01), SC_(-9.5665820818914221120054446914475175799646e-01), SC_(2.9121310531008016143287012525633902034398e-01) }, + { SC_(-4.0504586696624755859375000000000000000000e-01), SC_(-9.5583537471139125170268184218278625567668e-01), SC_(2.9390259687579195874776972222125494935775e-01) }, + { SC_(-3.8366591930389404296875000000000000000000e-01), SC_(-9.3395435745292818950500377706390876384678e-01), SC_(3.5739230293150975861604557304399827529203e-01) }, + { SC_(-3.7719452381134033203125000000000000000000e-01), SC_(-9.2649588941063948114565037576896742966883e-01), SC_(3.7630488557177688673822323825781455055180e-01) }, + { SC_(-3.6507534980773925781250000000000000000000e-01), SC_(-9.1150066412057132064413124408292341887704e-01), SC_(4.1129860114976980837100694121882074588146e-01) }, + { SC_(-3.5173749923706054687500000000000000000000e-01), SC_(-8.9347135185389664492608804389344290514666e-01), SC_(4.4912018816389273992181501551656719931300e-01) }, + { SC_(-3.3608675003051757812500000000000000000000e-01), SC_(-8.7031800693966543320350860436306967348037e-01), SC_(4.9249016923850213119131115646030866731998e-01) }, + { SC_(-3.1295490264892578125000000000000000000000e-01), SC_(-8.3226273881953944562958166501881716256484e-01), SC_(5.5438139721007871269431006077170037182167e-01) }, + { SC_(-3.1164932250976562500000000000000000000000e-01), SC_(-8.2998189329385915216798094773699578116858e-01), SC_(5.5779033409009607911385726274888562536223e-01) }, + { SC_(-2.7741205692291259765625000000000000000000e-01), SC_(-7.6530540944132762347540484149979476997405e-01), SC_(6.4366732888957622161629948954256886761344e-01) }, + { SC_(-2.5403821468353271484375000000000000000000e-01), SC_(-7.1602029608992953382227635470280008247722e-01), SC_(6.9807946222997396038983310091489535537995e-01) }, + { SC_(-2.4502253532409667968750000000000000000000e-01), SC_(-6.9596363589832268991123680045799720786793e-01), SC_(7.1807702755845554542015683130542500947272e-01) }, + { SC_(-2.4487495422363281250000000000000000000000e-01), SC_(-6.9563063208909269862653780978177888009691e-01), SC_(7.1839962673941399778860782267787561799555e-01) }, + { SC_(-2.1765518188476562500000000000000000000000e-01), SC_(-6.3173078874875549667469135116007165277939e-01), SC_(7.7518785500475641518666097320612357319575e-01) }, + { SC_(-2.1368932723999023437500000000000000000000e-01), SC_(-6.2202386486692776449886525877848335545149e-01), SC_(7.8299828322673223309743602710693663069307e-01) }, + { SC_(-2.1059674024581909179687500000000000000000e-01), SC_(-6.1438729101183683608883217648211171284716e-01), SC_(7.8900459861976502657750920268897367146832e-01) }, + { SC_(-2.0252293348312377929687500000000000000000e-01), SC_(-5.9417901474396082934749814580791914920940e-01), SC_(8.0433282814883042629694480486807704619554e-01) }, + { SC_(-2.0193052291870117187500000000000000000000e-01), SC_(-5.9268103254443150996575881860022625766732e-01), SC_(8.0543726860759709778836038114230871482678e-01) }, + { SC_(-1.6804337501525878906250000000000000000000e-01), SC_(-5.0374092089163148946618998984850108614529e-01), SC_(8.6385478213600870567222096491880130749985e-01) }, + { SC_(-1.5647745132446289062500000000000000000000e-01), SC_(-4.7202680156423389647157458723053975980849e-01), SC_(8.8158419825053543001708103931554730229580e-01) }, + { SC_(-1.1699485778808593750000000000000000000000e-01), SC_(-3.5933032028529929530469713105447105627606e-01), SC_(9.3321043764183447208457988309703282077611e-01) }, + { SC_(-1.0096526145935058593750000000000000000000e-01), SC_(-3.1189960836173143727543603824518581260722e-01), SC_(9.5011506371796808223989920232214847699279e-01) }, + { SC_(-9.9448680877685546875000000000000000000000e-02), SC_(-3.0736928268291189056245817195475556312613e-01), SC_(9.5159031314058267928741366405400232279103e-01) }, + { SC_(-8.1884860992431640625000000000000000000000e-02), SC_(-2.5442092538066790930565147205451845021489e-01), SC_(9.6709358012988826356985074356311455428879e-01) }, + { SC_(-7.5287580490112304687500000000000000000000e-02), SC_(-2.3432376652499588701838575690686786656742e-01), SC_(9.7215861485744146902547330728628459024868e-01) }, + { SC_(-5.8497428894042968750000000000000000000000e-02), SC_(-1.8274239020840994778024779066783021334913e-01), SC_(9.8316083059737344076524840489058370319455e-01) }, + { SC_(-4.9724340438842773437500000000000000000000e-02), SC_(-1.5557905845488543885312766674675549571917e-01), SC_(9.8782344402746958678323909764838465267242e-01) }, + { SC_(-4.0942430496215820312500000000000000000000e-02), SC_(-1.2827006640310072052424311269660830382159e-01), SC_(9.9173927524573923762600689524600414466974e-01) }, + { SC_(-3.7643790245056152343750000000000000000000e-02), SC_(-1.1798598463919036806396859702888971422609e-01), SC_(9.9301526042086620820691531388584889622794e-01) }, + { SC_(-2.9248714447021484375000000000000000000000e-02), SC_(-9.1758295000034082027002552701767092555474e-02), SC_(9.9578130897234997276990448032172635803157e-01) }, + { SC_(-1.3087511062622070312500000000000000000000e-02), SC_(-4.1104045293708104407288819751202788055321e-02), SC_(9.9915487160924796875744234149878204112867e-01) }, + { SC_(4.3266379634587792679667472839355468750000e-07), SC_(1.3592534040740619706779610326861001654897e-06), SC_(9.9999999999907621509175611071696794110532e-01) }, + { SC_(5.4143765737535431981086730957031250000000e-07), SC_(1.7009765667864604184755441004045916835365e-06), SC_(9.9999999999855333935962062666627307461693e-01) }, + { SC_(1.8175046534452121704816818237304687500000e-06), SC_(5.7098592670977157072989540126815453407108e-06), SC_(9.9999999998369875357483630310113587760776e-01) }, + { SC_(3.5000011848751455545425415039062500000000e-06), SC_(1.0995578009737763119439960636873651974923e-05), SC_(9.9999999993954863211405848208762186048286e-01) }, + { SC_(4.2991123336832970380783081054687500000000e-06), SC_(1.3506059724046102849155020671161951640821e-05), SC_(9.9999999990879317536109051164750827168428e-01) }, + { SC_(1.5021269064163789153099060058593750000000e-05), SC_(4.7190708522057261760788416021622962926434e-05), SC_(9.9999999888651851397319555483294537971851e-01) }, + { SC_(2.9195798560976982116699218750000000000000e-05), SC_(9.1721306146247273447149831706287604114171e-05), SC_(9.9999999579360099056629475651173461585519e-01) }, + { SC_(3.7263002013787627220153808593750000000000e-05), SC_(1.1706517310983505348361202316956281869806e-04), SC_(9.9999999314787259890635099603563404925619e-01) }, + { SC_(9.9631288321688771247863769531250000000000e-05), SC_(3.1300091834834262754869101448379462507049e-04), SC_(9.9999995101521135679231652819210798878235e-01) }, + { SC_(1.5968835214152932167053222656250000000000e-04), SC_(5.0167573290818330889234395033921802084588e-04), SC_(9.9999987416072158775656565179455465157942e-01) }, + { SC_(2.6795419398695230484008789062500000000000e-04), SC_(8.4180282790654826545804640080269836983800e-04), SC_(9.9999964568393669433278420176617458678238e-01) }, + { SC_(7.5547862797975540161132812500000000000000e-04), SC_(2.3734038793507862338875984277728034790946e-03), SC_(9.9999718347304632927889439367053946747070e-01) }, + { SC_(1.2485333718359470367431640625000000000000e-03), SC_(3.9223732110256432324523442725717533074569e-03), SC_(9.9999230746460916382277793622681636974491e-01) }, + { SC_(2.3210579529404640197753906250000000000000e-03), SC_(7.2917539952678701084037683250818457156304e-03), SC_(9.9997341480845004265309260924926091312942e-01) }, + { SC_(6.0425046831369400024414062500000000000000e-03), SC_(1.8981948225542250316374610856647080308219e-02), SC_(9.9981982658955250056570779062314008929280e-01) }, + { SC_(7.3254108428955078125000000000000000000000e-03), SC_(2.3011425547596871441918317481228034288225e-02), SC_(9.9973520208816664736064961441785617136149e-01) }, + { SC_(1.4650821685791015625000000000000000000000e-02), SC_(4.6010664340327118254150114416531299714854e-02), SC_(9.9894094858853481205059395189866449477251e-01) }, + { SC_(1.5569385141134262084960937500000000000000e-02), SC_(4.8893164804289854476092991237587407645619e-02), SC_(9.9880401402648585462910686304657318353997e-01) }, + { SC_(2.9301643371582031250000000000000000000000e-02), SC_(9.1923873362630087657532412256452714370418e-02), SC_(9.9576603753392350101603503508172913724917e-01) }, + { SC_(3.0586041510105133056640625000000000000000e-02), SC_(9.5941085604771316768085451064236775366471e-02), SC_(9.9538701422762088493914326074304340289989e-01) }, + { SC_(4.7656536102294921875000000000000000000000e-02), SC_(1.4915872325264163418011625059388154411208e-01), SC_(9.8881326613149859371779592440701520332605e-01) }, + { SC_(6.2389418482780456542968750000000000000000e-02), SC_(1.9474958340190698798717487882189992143950e-01), SC_(9.8085299600132928084969236920300869776998e-01) }, + { SC_(9.3762993812561035156250000000000000000000e-02), SC_(2.9032374052866115624523246250757006188327e-01), SC_(9.5692848514685078924747011591238920416053e-01) }, + { SC_(9.4441175460815429687500000000000000000000e-02), SC_(2.9236188363443580531878426206975893994594e-01), SC_(9.5630775851591030434790501957749321532648e-01) }, + { SC_(1.2280553579330444335937500000000000000000e-01), SC_(3.7630505906138142353083651135748077379234e-01), SC_(9.2649581894621102417883022496077542353252e-01) }, + { SC_(1.8752598762512207031250000000000000000000e-01), SC_(5.5563811445251817951602041289839833731771e-01), SC_(8.3142425137089326314567378101647774469588e-01) }, + { SC_(1.8888235092163085937500000000000000000000e-01), SC_(5.5917587522787340988979924197133119827530e-01), SC_(8.2904905799544923445249768934109054593180e-01) }, + { SC_(2.1897172927856445312500000000000000000000e-01), SC_(6.3493159620419406345635238222941832237409e-01), SC_(7.7256835823219828445022501968227276225912e-01) }, + { SC_(2.4596184492111206054687500000000000000000e-01), SC_(6.9807959630727836454168797571135865708139e-01), SC_(7.1602016537208452474905408469995390715758e-01) }, + { SC_(2.4638032913208007812500000000000000000000e-01), SC_(6.9902034940513949391212656719293343534798e-01), SC_(7.1510177675455169993189720867072602090539e-01) }, + { SC_(2.6471853256225585937500000000000000000000e-01), SC_(7.3903569051771558856508127536694662611127e-01), SC_(6.7366627356652144137630156031564192215880e-01) }, + { SC_(2.7952671051025390625000000000000000000000e-01), SC_(7.6956461663549903043783586896628844814904e-01), SC_(6.3856894758722601773867312847833637212198e-01) }, + { SC_(2.8940320014953613281250000000000000000000e-01), SC_(7.8900448357357190506916947609555659455861e-01), SC_(6.1438743875570983374750220189262336594174e-01) }, + { SC_(3.1148135662078857421875000000000000000000e-01), SC_(8.2968744272649370343629160126126543723377e-01), SC_(5.5822822159218287824183611128426782583130e-01) }, + { SC_(3.5747027397155761718750000000000000000000e-01), SC_(9.0141468847825773753334585012065896365062e-01), SC_(4.3295676388716409247982544083589690990554e-01) }, + { SC_(3.6271905899047851562500000000000000000000e-01), SC_(9.0843107791662533445839388702373430912235e-01), SC_(4.1803465965783051394311430789283080754524e-01) }, + { SC_(3.7505197525024414062500000000000000000000e-01), SC_(9.2394200668363927173078929094288575918620e-01), SC_(3.8253257153530061632247453438154414410921e-01) }, + { SC_(3.7772417068481445312500000000000000000000e-01), SC_(9.2712075330418120688363763383575284802393e-01), SC_(3.7476273666506328862476711475996433628584e-01) }, + { SC_(3.7776470184326171875000000000000000000000e-01), SC_(9.2716846522289861500880897655062060342404e-01), SC_(3.7464468112628349643869883931576769920045e-01) }, + { SC_(3.9778900146484375000000000000000000000000e-01), SC_(9.4888714091948151577078679209168934604460e-01), SC_(3.1561557914281105333039532216374512397784e-01) }, + { SC_(4.5167791843414306640625000000000000000000e-01), SC_(9.8849923302968707504021021497429203528978e-01), SC_(1.5122587840617891145460860258123470441026e-01) }, + { SC_(4.9245977401733398437500000000000000000000e-01), SC_(9.9971944490156151620025264430521645555204e-01), SC_(2.3686103219265674984235773857091406676367e-02) }, + { SC_(5.0000023841857910156250000000000000000000e-01), SC_(9.9999999999971948897151921479471958445202e-01), SC_(-7.4901405658471572113049856673065563715596e-07) }, + { SC_(5.0000047683715820312500000000000000000000e-01), SC_(9.9999999999887795588607701655175253650385e-01), SC_(-1.4980281131690112288542788461553611206918e-06) }, + { SC_(5.0000166893005371093750000000000000000000e-01), SC_(9.9999999998625495960447237002460255656405e-01), SC_(-5.2430983960694780971372955823540956317309e-06) }, + { SC_(5.0000333786010742187500000000000000000000e-01), SC_(9.9999999994501983841826733236935959894956e-01), SC_(-1.0486196791994822995771188961609302512444e-05) }, + { SC_(5.0000429153442382812500000000000000000000e-01), SC_(9.9999999990911442677359804232502397526992e-01), SC_(-1.3482253018117696189242608854023945230621e-05) }, + { SC_(5.0001502037048339843750000000000000000000e-01), SC_(9.9999999888665172816630219829107169151373e-01), SC_(-4.7187885547329319055657947640681604270190e-05) }, + { SC_(5.0002908706665039062500000000000000000000e-01), SC_(9.9999999582487385499707753413380040254131e-01), SC_(-9.1379714776169916676504893028080336305096e-05) }, + { SC_(5.0003719329833984375000000000000000000000e-01), SC_(9.9999999317348361865817975703384517397171e-01), SC_(-1.1684619256134242811309917534624539649780e-04) }, + { SC_(5.0009965896606445312500000000000000000000e-01), SC_(9.9999995098799146008382980990445170109932e-01), SC_(-3.1308787053741855117950880780497680759570e-04) }, + { SC_(5.0015950202941894531250000000000000000000e-01), SC_(9.9999987445420620906323428975050136718796e-01), SC_(-5.0109038288529065804374478551472874530555e-04) }, + { SC_(5.0026798248291015625000000000000000000000e-01), SC_(9.9999964560911981419424672295679903989178e-01), SC_(-8.4189170014837154687588880235168421682168e-04) }, + { SC_(5.0075531005859375000000000000000000000000e-01), SC_(9.9999718472980465503219274828524949063826e-01), SC_(-2.3728743044973247838253172935228172467424e-03) }, + { SC_(5.0124835968017578125000000000000000000000e-01), SC_(9.9999230960477557309064944107279076437187e-01), SC_(-3.9218275467790664715140272043149223642317e-03) }, + { SC_(5.0232100486755371093750000000000000000000e-01), SC_(9.9997341602450135387659472378982173884007e-01), SC_(-7.2915872270404153887073312687679308998549e-03) }, + { SC_(5.0604248046875000000000000000000000000000e-01), SC_(9.9981982803353944005287225251112677857740e-01), SC_(-1.8981872167508178357172130364879478736824e-02) }, + { SC_(5.1556921005249023437500000000000000000000e-01), SC_(9.9880404092037197813676426019506317879923e-01), SC_(-4.8892615404945346627001407931204211546893e-02) }, + { SC_(5.2943706512451171875000000000000000000000e-01), SC_(9.9572683932746093128653255090270967383525e-01), SC_(-9.2347503717993389411862662274142639701433e-02) }, + { SC_(5.3058600425720214843750000000000000000000e-01), SC_(9.9538702545592996217602751881533829549808e-01), SC_(-9.5940969111197941216571259124451089062976e-02) }, + { SC_(5.4257297515869140625000000000000000000000e-01), SC_(9.9106920215903227605044870658837494754048e-01), SC_(-1.3334855279251895255487521999710771239693e-01) }, + { SC_(5.5058908462524414062500000000000000000000e-01), SC_(9.8739714174382138915453149696987252659096e-01), SC_(-1.5826207529326756656343050232717560850220e-01) }, + { SC_(5.5905342102050781250000000000000000000000e-01), SC_(9.8284013469059532781132507838476113550991e-01), SC_(-1.8445939835468518211677992486313122667274e-01) }, + { SC_(5.6238937377929687500000000000000000000000e-01), SC_(9.8085302335197751084221022090414475952815e-01), SC_(-1.9474944565077729586702134297397558908793e-01) }, + { SC_(5.8441448211669921875000000000000000000000e-01), SC_(9.6504116991468772916767426390583385372372e-01), SC_(-2.6209834102811640519063851794361108683088e-01) }, + { SC_(5.8525204658508300781250000000000000000000e-01), SC_(9.6434817410492476051162649965646040210442e-01), SC_(-2.6463673044476974412739688083545564527880e-01) }, + { SC_(5.9003734588623046875000000000000000000000e-01), SC_(9.6026094627939906631076805397577486803884e-01), SC_(-2.7910377111496193552779011382411954822304e-01) }, + { SC_(5.9585714340209960937500000000000000000000e-01), SC_(9.5499776001978266636141692238567105276142e-01), SC_(-2.9661301110571261633642980390047730394775e-01) }, + { SC_(5.9621167182922363281250000000000000000000e-01), SC_(9.5466680494688901845095401803252261966867e-01), SC_(-2.9767648804112587677259085827521093667614e-01) }, + { SC_(6.0056090354919433593750000000000000000000e-01), SC_(9.5051051175135299491269304678178521337214e-01), SC_(-3.1069239940845196054659054661322750736300e-01) }, + { SC_(6.2191152572631835937500000000000000000000e-01), SC_(9.2754905951703243153883926482789755369534e-01), SC_(-3.7370140779647676895907118856367789499671e-01) }, + { SC_(6.2280535697937011718750000000000000000000e-01), SC_(9.2649603033939893545876174372382758963708e-01), SC_(-3.7630453859252822903265212796461262419442e-01) }, + { SC_(6.2296271324157714843750000000000000000000e-01), SC_(9.2630989126115333502365248057892626137266e-01), SC_(-3.7676250523605753878823975673132999953907e-01) }, + { SC_(6.2944722175598144531250000000000000000000e-01), SC_(9.1844293010181728336965244165781907892841e-01), SC_(-3.9555351615930349591296252540630912224997e-01) }, + { SC_(6.4765357971191406250000000000000000000000e-01), SC_(8.9432887529239949134050237395878828178190e-01), SC_(-4.4741017290427333178127297787300468277305e-01) }, + { SC_(6.5442204475402832031250000000000000000000e-01), SC_(8.8461379298050095431129585172737434703837e-01), SC_(-4.6632439060020375534346915352785901416480e-01) }, + { SC_(6.7001700401306152343750000000000000000000e-01), SC_(8.6071483294500626682601333005079288538374e-01), SC_(-5.0908739558984364499817281559875753702128e-01) }, + { SC_(6.8211269378662109375000000000000000000000e-01), SC_(8.4075295212816897851858279003682255858268e-01), SC_(-5.4141894452241768771763399670177979476562e-01) }, + { SC_(6.8214178085327148437500000000000000000000e-01), SC_(8.4070347390919447310792480017212755537161e-01), SC_(-5.4149577002688799196360063837903210919181e-01) }, + { SC_(6.9825863838195800781250000000000000000000e-01), SC_(8.1222043896020003746691461356380945497683e-01), SC_(-5.8335063086903400132164783701410063178688e-01) }, + { SC_(7.1494054794311523437500000000000000000000e-01), SC_(7.8054717288780521994787822312700291432230e-01), SC_(-6.2509688120870888550628828335146370413120e-01) }, + { SC_(7.2543811798095703125000000000000000000000e-01), SC_(7.5951135295894516997773320112577896731863e-01), SC_(-6.5049404664952361883049988945867404359846e-01) }, + { SC_(7.4259090423583984375000000000000000000000e-01), SC_(7.2337262491951824535987456504101927606464e-01), SC_(-6.9045785209312086671882625196264011240830e-01) }, + { SC_(7.4596190452575683593750000000000000000000e-01), SC_(7.1602003465421440923170662542985439906727e-01), SC_(-6.9807973038455829131535264868499063685839e-01) }, + { SC_(7.5602865219116210937500000000000000000000e-01), SC_(6.9358846545678693591707541926346337018824e-01), SC_(-7.2037146014073841524897653425660582431075e-01) }, + { SC_(7.5686120986938476562500000000000000000000e-01), SC_(6.9170192246211764852258989945441407825294e-01), SC_(-7.2218311421841661919026098389544915612558e-01) }, + { SC_(7.7931451797485351562500000000000000000000e-01), SC_(6.3908181476044847352855857953085128291641e-01), SC_(-7.6913876124044861687290402084436955287024e-01) }, + { SC_(7.8940320014953613281250000000000000000000e-01), SC_(6.1438743875570983374750220189262336594174e-01), SC_(-7.8900448357357190506916947609555659455861e-01) }, + { SC_(8.1158375740051269531250000000000000000000e-01), SC_(5.5796128098493693774956426339216825838485e-01), SC_(-8.2986698266749247144544102221617571588371e-01) }, + { SC_(8.2418441772460937500000000000000000000000e-01), SC_(5.2468150511589894314211461443671616291377e-01), SC_(-8.5129860694665471251751588130558874493180e-01) }, + { SC_(8.2675170898437500000000000000000000000000e-01), SC_(5.1779846465489559902121104745771879513585e-01), SC_(-8.5550263003747266858935406540162582481289e-01) }, + { SC_(8.3147096633911132812500000000000000000000e-01), SC_(5.0505835326047255373670879218520777551429e-01), SC_(-8.6308519846062689441236636551061290362475e-01) }, + { SC_(8.3745932579040527343750000000000000000000e-01), SC_(4.8873272661607996842476388746265342403592e-01), SC_(-8.7243356304902211093269502281486894853917e-01) }, + { SC_(8.6291933059692382812500000000000000000000e-01), SC_(4.1746301773122492119427397853204125415748e-01), SC_(-9.0869391371723129146579397894656016506109e-01) }, + { SC_(8.6798644065856933593750000000000000000000e-01), SC_(4.0294542272514587374578878976636209227899e-01), SC_(-9.1522400881142398889062108323306662423626e-01) }, + { SC_(9.0335583686828613281250000000000000000000e-01), SC_(2.9897332963749714086784291370982450399144e-01), SC_(-9.5426146740055918163080761149229731108190e-01) }, + { SC_(9.1433382034301757812500000000000000000000e-01), SC_(2.6589115917260285325419947744388835665930e-01), SC_(-9.6400305573885478922438156284639798679215e-01) }, + { SC_(9.1501355171203613281250000000000000000000e-01), SC_(2.6383198469828112364614953143053397663241e-01), SC_(-9.6456865170404846359354329855525529190741e-01) }, + { SC_(9.1898488998413085937500000000000000000000e-01), SC_(2.5177748924368554685468194066253512457048e-01), SC_(-9.6778514966398704745696155605927835685840e-01) }, + { SC_(9.2835760116577148437500000000000000000000e-01), SC_(2.2317579991567085324239821780226102833604e-01), SC_(-9.7477821186770503727532894707931011073242e-01) }, + { SC_(9.2977690696716308593750000000000000000000e-01), SC_(2.1882717603870224476267802834508622324807e-01), SC_(-9.7576363276509071694966752194335069876463e-01) }, + { SC_(9.3538975715637207031250000000000000000000e-01), SC_(2.0158812621802170363247911522191766491009e-01), SC_(-9.7947038105698068659823110207787727736299e-01) }, + { SC_(9.3773555755615234375000000000000000000000e-01), SC_(1.9436446216493438141119284520433099703994e-01), SC_(-9.8092938372103819416138438587083223662527e-01) }, + { SC_(9.4118547439575195312500000000000000000000e-01), SC_(1.8372171307544965759678633944069390248341e-01), SC_(-9.8297829688382344788580833680059302401033e-01) }, + { SC_(9.6221923828125000000000000000000000000000e-01), SC_(1.1841327668470778668387435536216132833424e-01), SC_(-9.9296439810538566926151547176977895353997e-01) }, + { SC_(9.6258902549743652343750000000000000000000e-01), SC_(1.1725964964250181903523453754202053343958e-01), SC_(-9.9310129119124486365547911348556621357001e-01) }, + { SC_(9.7252988815307617187500000000000000000000e-01), SC_(8.6192819213782638491394074725634953259967e-02), SC_(-9.9627847408040498244177144451542073663079e-01) }, + { SC_(9.8576259613037109375000000000000000000000e-01), SC_(4.4713211010059575627083311486688378377719e-02), SC_(-9.9899986424482054938737871374409867247170e-01) }, + { SC_(9.9292254447937011718750000000000000000000e-01), SC_(2.2232650296677842324843007375331301285692e-02), SC_(-9.9975282408242570097649527615446008373997e-01) }, + { SC_(1.0187463760375976562500000000000000000000e+00), SC_(-5.8859438379765556734934765870123841904071e-02), SC_(-9.9826628036492276451542505637106691321082e-01) }, + { SC_(1.0309605598449707031250000000000000000000e+00), SC_(-9.7112175410510007601029626216402477139612e-02), SC_(-9.9527344252071668318741827285042372117656e-01) }, + { SC_(1.0549998283386230468750000000000000000000e+00), SC_(-1.7192856901965710009702375791535159035281e-01), SC_(-9.8510941887429591504244360987374814133690e-01) }, + { SC_(1.0588741302490234375000000000000000000000e+00), SC_(-1.8390577599379700926290144073364960721909e-01), SC_(-9.8294387711411039423820236376193318593662e-01) }, + { SC_(1.0620670318603515625000000000000000000000e+00), SC_(-1.9375606847029838950934029494285126550764e-01), SC_(-9.8104973672639708950242367913096020108473e-01) }, + { SC_(1.1181068420410156250000000000000000000000e+00), SC_(-3.6258819984772992518820799231180569098655e-01), SC_(-9.3194946071725513105727048061861964248840e-01) }, + { SC_(1.1516876220703125000000000000000000000000e+00), SC_(-4.5870805413268734595578922345765392547914e-01), SC_(-8.8858703629627839370537670785560916829442e-01) }, + { SC_(1.1688289642333984375000000000000000000000e+00), SC_(-5.0587137931694450781374785885405701636209e-01), SC_(-8.6260891926061838537701835838343488118058e-01) }, + { SC_(1.1705040931701660156250000000000000000000e+00), SC_(-5.1040389561102171232839945628556712931483e-01), SC_(-8.5993480179900455684911569359172121555871e-01) }, + { SC_(1.1758999824523925781250000000000000000000e+00), SC_(-5.2490720932590276678010742901107605851182e-01), SC_(-8.5115945720980677796658745692560098624430e-01) }, + { SC_(1.1807994842529296875000000000000000000000e+00), SC_(-5.3794576213351449656101999511619722673799e-01), SC_(-8.4297945230153281643104823762844171586293e-01) }, + { SC_(1.1891193389892578125000000000000000000000e+00), SC_(-5.5979296377411862460909241358429271770818e-01), SC_(-8.2863251065172932498700305887284525583529e-01) }, + { SC_(1.1917142868041992187500000000000000000000e+00), SC_(-5.6652952239735693608437886823307669062541e-01), SC_(-8.2404144328560480824870475299437311924647e-01) }, + { SC_(1.1924233436584472656250000000000000000000e+00), SC_(-5.6836372349206491783475196579351205405939e-01), SC_(-8.2277741693500288574227483911028922710579e-01) }, + { SC_(1.2011218070983886718750000000000000000000e+00), SC_(-5.9063278311796687106048524371800444570677e-01), SC_(-8.0694046589963791967243971905935296149430e-01) }, + { SC_(1.2301239967346191406250000000000000000000e+00), SC_(-6.6160401882998010552323897836460784408889e-01), SC_(-7.4985340051774075418915199622139603735114e-01) }, + { SC_(1.2407841682434082031250000000000000000000e+00), SC_(-6.8634086817568556959518811234659813992437e-01), SC_(-7.2728000981179608062625166204271349414266e-01) }, + { SC_(1.2438230514526367187500000000000000000000e+00), SC_(-6.9325277868362607621169323879677758902929e-01), SC_(-7.2069451562186274391997419869940171414363e-01) }, + { SC_(1.2459254264831542968750000000000000000000e+00), SC_(-6.9799767051298434555785079496813786840958e-01), SC_(-7.1610002929649943133658617561573135501453e-01) }, + { SC_(1.2588944435119628906250000000000000000000e+00), SC_(-7.2658666078685446797639705399050314266709e-01), SC_(-6.8707483170802325627138896477699785637260e-01) }, + { SC_(1.2876129150390625000000000000000000000000e+00), SC_(-7.8553649455508062633354679972242824219306e-01), SC_(-6.1881533248790449269207655071666186653763e-01) }, + { SC_(1.2938313484191894531250000000000000000000e+00), SC_(-7.9747487466040254374645405690408172736269e-01), SC_(-6.0335215611231162056565909258670606785548e-01) }, + { SC_(1.3088440895080566406250000000000000000000e+00), SC_(-8.2503397585633381997831954679820574155855e-01), SC_(-5.6508312546269719893450093013241323592207e-01) }, + { SC_(1.3400340080261230468750000000000000000000e+00), SC_(-8.7635814529904118601081188137331304659294e-01), SC_(-4.8166004730310009054647063509859160339415e-01) }, + { SC_(1.3965172767639160156250000000000000000000e+00), SC_(-9.4761861094431282961431221933813838997905e-01), SC_(-3.1940408292940006983994341565252068119454e-01) }, + { SC_(1.4298810958862304687500000000000000000000e+00), SC_(-9.7583520681688387292687121126643613552707e-01), SC_(-2.1850777820629058444501355498206934411146e-01) }, + { SC_(1.4376215934753417968750000000000000000000e+00), SC_(-9.8085973279310576031594549102020869559287e-01), SC_(-1.9471565059089926259012117189023181391949e-01) }, + { SC_(1.4385581016540527343750000000000000000000e+00), SC_(-9.8142836496821321166874402715990365296483e-01), SC_(-1.9182899790130710683882258658552936374515e-01) }, + { SC_(1.4508762359619140625000000000000000000000e+00), SC_(-9.8811522692503775605543313370282778446190e-01), SC_(-1.5371499054705478001378349197656046515917e-01) }, + { SC_(1.4897150993347167968750000000000000000000e+00), SC_(-9.9947804607370551197887811849305109310236e-01), SC_(-3.2305346565047120856279614352034044384070e-02) }, + { SC_(1.5137224197387695312500000000000000000000e+00), SC_(-9.9907089694911573167196250726697255573847e-01), SC_(4.3096900924421168880110982366284253390397e-02) }, + { SC_(1.5586290359497070312500000000000000000000e+00), SC_(-9.8308519067229837832374427345689099932686e-01), SC_(1.8314886808498364717878744696881145525833e-01) }, + { SC_(1.5618629455566406250000000000000000000000e+00), SC_(-9.8117376294453180844784495147829791557972e-01), SC_(1.9312702273184791024579531762719304741666e-01) }, + { SC_(1.5926136970520019531250000000000000000000e+00), SC_(-9.5797049469247552574933165756478309905204e-01), SC_(2.8686674833213716432580156340994598821683e-01) }, + { SC_(1.6231675148010253906250000000000000000000e+00), SC_(-9.2606728939251711681210496158583747975198e-01), SC_(3.7735841784329650003568967393481656850060e-01) }, + { SC_(1.6461939811706542968750000000000000000000e+00), SC_(-8.9637104909034604680551976122265063246194e-01), SC_(4.4330457064265921856241299960951200122656e-01) }, + { SC_(1.6483688354492187500000000000000000000000e+00), SC_(-8.9332126879167771624500856665660808282240e-01), SC_(4.4941863637862982231027837081647791310565e-01) }, + { SC_(1.6535034179687500000000000000000000000000e+00), SC_(-8.8595589668325703520032148888999797693220e-01), SC_(4.6376950000206566612805157359154672321704e-01) }, + { SC_(1.6629419326782226562500000000000000000000e+00), SC_(-8.7181677811602472074961654135259089550517e-01), SC_(4.8983211960363942589644354461303346098625e-01) }, + { SC_(1.6749186515808105468750000000000000000000e+00), SC_(-8.5277366812066057977271247471049374587809e-01), SC_(5.2228064386882407763197582250756453836773e-01) }, + { SC_(1.6834988594055175781250000000000000000000e+00), SC_(-8.3838723382722668560374055777113354384596e-01), SC_(5.4507508304409872951355341198113988021048e-01) }, + { SC_(1.6856307983398437500000000000000000000000e+00), SC_(-8.3471771610393185875563541949577581755489e-01), SC_(5.5067806786019344468370501442029345114677e-01) }, + { SC_(1.7359728813171386718750000000000000000000e+00), SC_(-7.3757065023744374233427634183853418901443e-01), SC_(6.7526997260970699051610458511780887005999e-01) }, + { SC_(1.8008880615234375000000000000000000000000e+00), SC_(-5.8552586884378704483186312375203910002446e-01), SC_(8.1065372195206030005809439123205755456281e-01) }, + { SC_(1.8067116737365722656250000000000000000000e+00), SC_(-5.7059745650701822420377393113337032791919e-01), SC_(8.2122989633093694745423101092710740880020e-01) }, + { SC_(1.8156375885009765625000000000000000000000e+00), SC_(-5.4734755935044899228708043061162129375783e-01), SC_(8.3690540043251406773419700909631405067317e-01) }, + { SC_(1.8286676406860351562500000000000000000000e+00), SC_(-5.1263977987267075841172991479886096563513e-01), SC_(8.5860378294769914714655242739801923124408e-01) }, + { SC_(1.8300271034240722656250000000000000000000e+00), SC_(-5.0896812351364833785558141036682842052014e-01), SC_(8.6078536770033191005955516536698911049468e-01) }, + { SC_(1.8379697799682617187500000000000000000000e+00), SC_(-4.8733303021944621194189301241962776135329e-01), SC_(8.7321619182029161751058004085362886491765e-01) }, + { SC_(1.8595538139343261718750000000000000000000e+00), SC_(-4.2704720047850023183941099428684119119884e-01), SC_(9.0422933405385363629189377994064683541132e-01) }, + { SC_(1.8623895645141601562500000000000000000000e+00), SC_(-4.1897478653374016114126977981026475973993e-01), SC_(9.0799786797602496580256760833692713013283e-01) }, + { SC_(1.8707795143127441406250000000000000000000e+00), SC_(-3.9489919760665687393025430422008659421735e-01), SC_(9.1872445473581390125453764320348506116740e-01) }, + { SC_(1.8754711151123046875000000000000000000000e+00), SC_(-3.8131562417744025560344214560627023472595e-01), SC_(9.2444491169467158271243610711145803084185e-01) }, + { SC_(1.8823709487915039062500000000000000000000e+00), SC_(-3.6118891323896796352020720713034429892546e-01), SC_(9.3249266428924430063283450002888042014372e-01) }, + { SC_(1.9244384765625000000000000000000000000000e+00), SC_(-2.3516033602183473124666530333004541872733e-01), SC_(9.7195659180958167856656353854565326670155e-01) }, + { SC_(1.9251780509948730468750000000000000000000e+00), SC_(-2.3290141892920310132381860854941592667200e-01), SC_(9.7250034913143544604665034305341085814036e-01) }, + { SC_(1.9450597763061523437500000000000000000000e+00), SC_(-1.7174410080599115791878144870207974985610e-01), SC_(9.8514159583196036484926931679731931240176e-01) }, + { SC_(1.9715251922607421875000000000000000000000e+00), SC_(-8.9336983457999063135421037776092465621819e-02), SC_(9.9600145752233977428946067619207389818633e-01) }, + { SC_(1.9762740135192871093750000000000000000000e+00), SC_(-7.4468384593612646979323710048902730053452e-02), SC_(9.9722337502488267463745494415864182250959e-01) }, + { SC_(1.9858450889587402343750000000000000000000e+00), SC_(-4.4454309841881304935514957598710154439302e-02), SC_(9.9901141852157126129931083219525854429922e-01) }, + { SC_(2.0101366043090820312500000000000000000000e+00), SC_(3.1839699504165833040696856658722832974329e-02), SC_(9.9949298823727844199208912730644750424459e-01) }, + { SC_(2.0298328399658203125000000000000000000000e+00), SC_(9.3585482259217083943722897191362156410110e-02), SC_(9.9561124818390323590034941369048956558885e-01) }, + { SC_(2.0374927520751953125000000000000000000000e+00), SC_(1.1751478523147387713056326549682140475556e-01), SC_(9.9307113302723716274685474269250180568265e-01) }, + { SC_(2.0576019287109375000000000000000000000000e+00), SC_(1.7997574747222497593604700115767608457458e-01), SC_(9.8367104782127948181350173374240863950588e-01) }, + { SC_(2.0619211196899414062500000000000000000000e+00), SC_(1.9330633826298797623479689902574087695130e-01), SC_(9.8113845077407667087335299035355773609465e-01) }, + { SC_(2.0938491821289062500000000000000000000000e+00), SC_(2.9058283605133940895196038349312146948496e-01), SC_(9.5684983952152095341562328895723679333882e-01) }, + { SC_(2.1099996566772460937500000000000000000000e+00), SC_(3.3873690542968736401825168823472196107080e-01), SC_(9.4088113430970600963774297340199588888937e-01) }, + { SC_(2.1241340637207031250000000000000000000000e+00), SC_(3.8016867992385600615924107152723370088748e-01), SC_(9.2491717186186608460538995036149309316917e-01) }, + { SC_(2.1913366317749023437500000000000000000000e+00), SC_(5.6555144959238575986298051424240553269548e-01), SC_(8.2471301545686251460782779794050924721187e-01) }, + { SC_(2.2311811447143554687500000000000000000000e+00), SC_(6.6409072491386110431221716662816882524076e-01), SC_(7.4765199731117047178284416396271497606128e-01) }, + { SC_(2.2333374023437500000000000000000000000000e+00), SC_(6.6914010605322762479513348096476764142743e-01), SC_(7.4313627180421982616113592960004612209391e-01) }, + { SC_(2.3376579284667968750000000000000000000000e+00), SC_(8.7273832759493568470846274321787972310865e-01), SC_(4.8818829517594409686222473986620551444155e-01) }, + { SC_(2.3487806320190429687500000000000000000000e+00), SC_(8.8926086331413399471006293915063362270572e-01), SC_(4.5740039022480194691544525128597463590371e-01) }, + { SC_(2.3517999649047851562500000000000000000000e+00), SC_(8.9355947075069965065490920875297802645467e-01), SC_(4.4894484319538579092387834408066355537480e-01) }, + { SC_(2.3615989685058593750000000000000000000000e+00), SC_(9.0695444786248140377665977375260325926430e-01), SC_(4.2122871400518448160209063533603877707564e-01) }, + { SC_(2.3782386779785156250000000000000000000000e+00), SC_(9.2772529803464095872112040596631014126442e-01), SC_(3.7326367541797662646784647430196344006644e-01) }, + { SC_(2.3834285736083984375000000000000000000000e+00), SC_(9.3368761060044476921711548941438701101882e-01), SC_(3.5808860050444529143114408314332600529137e-01) }, + { SC_(2.3848466873168945312500000000000000000000e+00), SC_(9.3527367258872278243326920322096935824487e-01), SC_(3.5392535563647114688274932903268095238901e-01) }, + { SC_(2.4022436141967773437500000000000000000000e+00), SC_(9.5321098636962397016546799166066099108051e-01), SC_(3.0230583101264941654714139135400476632369e-01) }, + { SC_(2.4602479934692382812500000000000000000000e+00), SC_(9.9221204663172793548513469089523554880392e-01), SC_(1.2456024453603865992531044703030770606574e-01) }, + { SC_(2.4654035568237304687500000000000000000000e+00), SC_(9.9409927898231117057693037228057679279072e-01), SC_(1.0847406845347446518601579735745017867104e-01) }, + { SC_(2.4778757095336914062500000000000000000000e+00), SC_(9.9758546444116512850079355986107988926734e-01), SC_(6.9449558211012868711701254228877324083109e-02) }, + { SC_(2.5142784118652343750000000000000000000000e+00), SC_(9.9899409553284540256810561838332194308754e-01), SC_(-4.4841912208470250395938017310281418704264e-02) }, + { SC_(2.5177888870239257812500000000000000000000e+00), SC_(9.9843881536284522828028348393187866490264e-01), SC_(-5.5856351266783040410469084720035114498915e-02) }, + { SC_(2.5667257308959960937500000000000000000000e+00), SC_(9.7810900468525295373101076810092704203059e-01), SC_(-2.0809318814805979949884912276499020086767e-01) }, + { SC_(2.5699672698974609375000000000000000000000e+00), SC_(9.7593918728194691849177504208954489276700e-01), SC_(-2.1804289194434414788759075840709254785401e-01) }, + { SC_(2.5752258300781250000000000000000000000000e+00), SC_(9.7220405411897038987674094446364189936340e-01), SC_(-2.3413516855576842900574271401719103593906e-01) }, + { SC_(2.5876626968383789062500000000000000000000e+00), SC_(9.6231637014349867626162609217881995793322e-01), SC_(-2.7193235142924949432619478747905995121995e-01) }, + { SC_(2.6466283798217773437500000000000000000000e+00), SC_(8.9576523522202297669181665064798731910975e-01), SC_(-4.4452743826183985868905617130138276115396e-01) }, + { SC_(2.6800680160522460937500000000000000000000e+00), SC_(8.4421341143838647980035969183880613057605e-01), SC_(-5.3600719766395076638299146307861267938126e-01) }, + { SC_(2.7257375717163085937500000000000000000000e+00), SC_(7.5889905709718526647373257399273129873174e-01), SC_(-6.5120827784742043835386853758773237310974e-01) }, + { SC_(2.7877416610717773437500000000000000000000e+00), SC_(6.1849755782607421827792609946160229156438e-01), SC_(-7.8578672104024637717491890266603742140897e-01) }, + { SC_(2.7930345535278320312500000000000000000000e+00), SC_(6.0534650679100039131411264058534198908238e-01), SC_(-7.9596206361605784580057896592926540608297e-01) }, + { SC_(2.9794301986694335937500000000000000000000e+00), SC_(6.4576969325134380719184170853709332046455e-02), SC_(-9.9791272916662439637917978556650177608583e-01) }, + { SC_(3.0140590667724609375000000000000000000000e+00), SC_(-4.4153501845982175189175058527762162423716e-02), SC_(-9.9902475858946401221242382128074456077456e-01) }, + { SC_(3.0274448394775390625000000000000000000000e+00), SC_(-8.6113718924577264256191741572510303127778e-02), SC_(-9.9628531426142125159845398506889259793638e-01) }, + { SC_(3.1272258758544921875000000000000000000000e+00), SC_(-3.8913452368727790960356345180278976524450e-01), SC_(-9.2118093905305886299976636088054353344837e-01) }, + { SC_(3.2463350296020507812500000000000000000000e+00), SC_(-6.9891857428318090957573573027947012586588e-01), SC_(-7.1520124896560809131726883061795792563693e-01) }, + { SC_(3.2589178085327148437500000000000000000000e+00), SC_(-7.2663709244263817401414242437628248351839e-01), SC_(-6.8702149594209125055751180411261051580649e-01) }, + { SC_(3.3070068359375000000000000000000000000000e+00), SC_(-8.2175864645735172534612332054328975554008e-01), SC_(-5.6983570173566802821049780901183552862792e-01) }, + { SC_(3.3258838653564453125000000000000000000000e+00), SC_(-8.5408772066117639250002441486943704634544e-01), SC_(-5.2012898920921176087604522292013122428088e-01) }, + { SC_(3.3375492095947265625000000000000000000000e+00), SC_(-8.7257153578052091358315534289731125877922e-01), SC_(-4.8848635082837587004720613584405617142606e-01) }, + { SC_(3.3669977188110351562500000000000000000000e+00), SC_(-9.1396798220297561033487383312195293377728e-01), SC_(-4.0578630768893774739693190146836884794326e-01) }, + { SC_(3.4341087341308593750000000000000000000000e+00), SC_(-9.7865116955588442390300932302401182353872e-01), SC_(-2.0552831514635533577558252681957801819126e-01) }, + { SC_(3.4719457626342773437500000000000000000000e+00), SC_(-9.9611862556712482137384040772481006307913e-01), SC_(-8.8020928183371141600457936465291857450722e-02) }, + { SC_(3.4720849990844726562500000000000000000000e+00), SC_(-9.9615703275215020366558951270835450836767e-01), SC_(-8.7585193374402881607363783226196334139273e-02) }, + { SC_(3.5205917358398437500000000000000000000000e+00), SC_(-9.9790827684402469941929089861198503088668e-01), SC_(6.4645734632606333231408358461321085923473e-02) }, + { SC_(3.6017761230468750000000000000000000000000e+00), SC_(-9.4931744975485974001547195314422483338195e-01), SC_(3.1431891382945658324672056757940637855560e-01) }, + { SC_(3.6401405334472656250000000000000000000000e+00), SC_(-9.0463898322145714242894381928150807960181e-01), SC_(4.2617873015443671099809962769068440492845e-01) }, + { SC_(3.6573352813720703125000000000000000000000e+00), SC_(-8.8030890857630174758369213697721090228597e-01), SC_(4.7440091218419933754908503670548458480608e-01) }, + { SC_(3.6600542068481445312500000000000000000000e+00), SC_(-8.7622462669288746421939513920418821059507e-01), SC_(4.8190289849399121987063030800400737550306e-01) }, + { SC_(3.6743307113647460937500000000000000000000e+00), SC_(-8.5373690109536976936966210865941858472063e-01), SC_(5.2070462232255516658865250812898441468120e-01) }, + { SC_(3.6759395599365234375000000000000000000000e+00), SC_(-8.5109418559293582989264089230338154739944e-01), SC_(5.2501303531426465035302709741556823160457e-01) }, + { SC_(3.6779518127441406250000000000000000000000e+00), SC_(-8.4775823766338649388282137669646806530795e-01), SC_(5.3038285273363532972430422102518080779833e-01) }, + { SC_(3.7191076278686523437500000000000000000000e+00), SC_(-7.7229721139647358113807359437680820809513e-01), SC_(6.3526137712695126271658979722161374772548e-01) }, + { SC_(3.7197303771972656250000000000000000000000e+00), SC_(-7.7105289310908725572881798363458383569997e-01), SC_(6.3677110175329601145198110228336758429305e-01) }, + { SC_(3.7415590286254882812500000000000000000000e+00), SC_(-7.2560709999357252492032097752516068559035e-01), SC_(6.8810924745923713178558423965711944178988e-01) }, + { SC_(3.7509422302246093750000000000000000000000e+00), SC_(-7.0501057704102466691892843105783269928843e-01), SC_(7.0919678951633828078444575818375506502661e-01) }, + { SC_(3.7647418975830078125000000000000000000000e+00), SC_(-6.7361202403588387903950332613071875859902e-01), SC_(7.3908513790650654594303944610931020837681e-01) }, + { SC_(3.8488769531250000000000000000000000000000e+00), SC_(-4.5713127745715697303348813361224351474208e-01), SC_(8.8939923272419555705330444258023019744461e-01) }, + { SC_(3.8996763229370117187500000000000000000000e+00), SC_(-3.0998392718517287188809579093624249170750e-01), SC_(9.5074179717042915066727903436561012864445e-01) }, + { SC_(3.9081726074218750000000000000000000000000e+00), SC_(-2.8449945044851010534076472484154609631230e-01), SC_(9.5867620325868929081685950779266605717363e-01) }, + { SC_(3.9430503845214843750000000000000000000000e+00), SC_(-1.7795953146963244992533370940904044176079e-01), SC_(9.8403780677325040351109357253557270668483e-01) }, + { SC_(3.9525480270385742187500000000000000000000e+00), SC_(-1.4852322763418675969604894254451481003482e-01), SC_(9.8890891939203558912519717829149622171011e-01) }, + { SC_(3.9716901779174804687500000000000000000000e+00), SC_(-8.8820726269070577371479191303757464259147e-02), SC_(9.9604762867296402989876530880328911976327e-01) } + }}; +//#undef SC_ + diff --git a/test/trig_data2.ipp b/test/trig_data2.ipp new file mode 100644 index 000000000..8f9953f4c --- /dev/null +++ b/test/trig_data2.ipp @@ -0,0 +1,155 @@ +#ifndef SC_ +# define SC_(x) static_cast(BOOST_JOIN(x, L)) +#endif + static const boost::array, 148> trig_data2 = {{ + { SC_(-1.9999995231628417968750000000000000000000e+00), SC_(1.4980281131690112288542788461553611206918e-06), SC_(9.9999999999887795588607701655175253650385e-01) }, + { SC_(-1.9999985694885253906250000000000000000000e+00), SC_(4.4940843394935868575478645466191072371308e-06), SC_(9.9999999998990160297470825676169589344081e-01) }, + { SC_(-1.9999966621398925781250000000000000000000e+00), SC_(1.0486196791994822995771188961609302512444e-05), SC_(9.9999999994501983841826733236935959894956e-01) }, + { SC_(-1.9999957084655761718750000000000000000000e+00), SC_(1.3482253018117696189242608854023945230621e-05), SC_(9.9999999990911442677359804232502397526992e-01) }, + { SC_(-1.9999852180480957031250000000000000000000e+00), SC_(4.6438871491565280117698474932339407631997e-05), SC_(9.9999999892171560671359413131460719431659e-01) }, + { SC_(-1.9999709129333496093750000000000000000000e+00), SC_(9.1379714776169916676504893028080336305096e-05), SC_(9.9999999582487385499707753413380040254131e-01) }, + { SC_(-1.9999628067016601562500000000000000000000e+00), SC_(1.1684619256134242811309917534624539649780e-04), SC_(9.9999999317348361865817975703384517397171e-01) }, + { SC_(-1.9999003410339355468750000000000000000000e+00), SC_(3.1308787053741855117950880780497680759570e-04), SC_(9.9999995098799146008382980990445170109932e-01) }, + { SC_(-1.9998402595520019531250000000000000000000e+00), SC_(5.0183939684769924809171253847476904900975e-04), SC_(9.9999987407860195766947052118236852970333e-01) }, + { SC_(-1.9997320175170898437500000000000000000000e+00), SC_(8.4189170014837154687588880235168421682168e-04), SC_(9.9999964560911981419424672295679903989178e-01) }, + { SC_(-1.9992446899414062500000000000000000000000e+00), SC_(2.3728743044973247838253172935228172467424e-03), SC_(9.9999718472980465503219274828524949063826e-01) }, + { SC_(-1.9987516403198242187500000000000000000000e+00), SC_(3.9218275467790664715140272043149223642317e-03), SC_(9.9999230960477557309064944107279076437187e-01) }, + { SC_(-1.9976792335510253906250000000000000000000e+00), SC_(7.2908382328935566307435101112900335063237e-03), SC_(9.9997342148572217817205233668312377823042e-01) }, + { SC_(-1.9939575195312500000000000000000000000000e+00), SC_(1.8981872167508178357172130364879478736824e-02), SC_(9.9981982803353944005287225251112677857740e-01) }, + { SC_(-1.9844307899475097656250000000000000000000e+00), SC_(4.8892615404945346627001407931204211546893e-02), SC_(9.9880404092037197813676426019506317879923e-01) }, + { SC_(-1.9694142341613769531250000000000000000000e+00), SC_(9.5940223552297220176859818946140456738044e-02), SC_(9.9538709731678521178505835566419054715492e-01) }, + { SC_(-1.9376106262207031250000000000000000000000e+00), SC_(1.9474944565077729586702134297397558908793e-01), SC_(9.8085302335197751084221022090414475952815e-01) }, + { SC_(-1.8771944046020507812500000000000000000000e+00), SC_(3.7630523255097276560855730503841419331357e-01), SC_(9.2649574848175008067512810410200333264846e-01) }, + { SC_(-1.7540383338928222656250000000000000000000e+00), SC_(6.9807919407529171997035782798891723621393e-01), SC_(7.1602055752554423261801142921491759740208e-01) }, + { SC_(-1.7105970382690429687500000000000000000000e+00), SC_(7.8900402338852276350219626277702904546800e-01), SC_(6.1438802973098639626496377371872238232214e-01) }, + { SC_(-1.4999995231628417968750000000000000000000e+00), SC_(9.9999999999887795588607701655175253650385e-01), SC_(-1.4980281131690112288542788461553611206918e-06) }, + { SC_(-1.4999985694885253906250000000000000000000e+00), SC_(9.9999999998990160297470825676169589344081e-01), SC_(-4.4940843394935868575478645466191072371308e-06) }, + { SC_(-1.4999966621398925781250000000000000000000e+00), SC_(9.9999999994501983841826733236935959894956e-01), SC_(-1.0486196791994822995771188961609302512444e-05) }, + { SC_(-1.4999957084655761718750000000000000000000e+00), SC_(9.9999999990911442677359804232502397526992e-01), SC_(-1.3482253018117696189242608854023945230621e-05) }, + { SC_(-1.4999852180480957031250000000000000000000e+00), SC_(9.9999999892171560671359413131460719431659e-01), SC_(-4.6438871491565280117698474932339407631997e-05) }, + { SC_(-1.4999709129333496093750000000000000000000e+00), SC_(9.9999999582487385499707753413380040254131e-01), SC_(-9.1379714776169916676504893028080336305096e-05) }, + { SC_(-1.4999628067016601562500000000000000000000e+00), SC_(9.9999999317348361865817975703384517397171e-01), SC_(-1.1684619256134242811309917534624539649780e-04) }, + { SC_(-1.4999003410339355468750000000000000000000e+00), SC_(9.9999995098799146008382980990445170109932e-01), SC_(-3.1308787053741855117950880780497680759570e-04) }, + { SC_(-1.4998402595520019531250000000000000000000e+00), SC_(9.9999987407860195766947052118236852970333e-01), SC_(-5.0183939684769924809171253847476904900975e-04) }, + { SC_(-1.4997320175170898437500000000000000000000e+00), SC_(9.9999964560911981419424672295679903989178e-01), SC_(-8.4189170014837154687588880235168421682168e-04) }, + { SC_(-1.4992446899414062500000000000000000000000e+00), SC_(9.9999718472980465503219274828524949063826e-01), SC_(-2.3728743044973247838253172935228172467424e-03) }, + { SC_(-1.4987516403198242187500000000000000000000e+00), SC_(9.9999230960477557309064944107279076437187e-01), SC_(-3.9218275467790664715140272043149223642317e-03) }, + { SC_(-1.4976792335510253906250000000000000000000e+00), SC_(9.9997342148572217817205233668312377823042e-01), SC_(-7.2908382328935566307435101112900335063237e-03) }, + { SC_(-1.4939575195312500000000000000000000000000e+00), SC_(9.9981982803353944005287225251112677857740e-01), SC_(-1.8981872167508178357172130364879478736824e-02) }, + { SC_(-1.4844307899475097656250000000000000000000e+00), SC_(9.9880404092037197813676426019506317879923e-01), SC_(-4.8892615404945346627001407931204211546893e-02) }, + { SC_(-1.4694142341613769531250000000000000000000e+00), SC_(9.9538709731678521178505835566419054715492e-01), SC_(-9.5940223552297220176859818946140456738044e-02) }, + { SC_(-1.4376106262207031250000000000000000000000e+00), SC_(9.8085302335197751084221022090414475952815e-01), SC_(-1.9474944565077729586702134297397558908793e-01) }, + { SC_(-1.3771944046020507812500000000000000000000e+00), SC_(9.2649574848175008067512810410200333264846e-01), SC_(-3.7630523255097276560855730503841419331357e-01) }, + { SC_(-1.2540383338928222656250000000000000000000e+00), SC_(7.1602055752554423261801142921491759740208e-01), SC_(-6.9807919407529171997035782798891723621393e-01) }, + { SC_(-1.2105970382690429687500000000000000000000e+00), SC_(6.1438802973098639626496377371872238232214e-01), SC_(-7.8900402338852276350219626277702904546800e-01) }, + { SC_(-1.1370806694030761718750000000000000000000e+00), SC_(4.1746301773122492119427397853204125415748e-01), SC_(-9.0869391371723129146579397894656016506109e-01) }, + { SC_(-9.9999976158142089843750000000000000000000e-01), SC_(-7.4901405658471572113049856673065563715596e-07), SC_(-9.9999999999971948897151921479471958445202e-01) }, + { SC_(-9.9999952316284179687500000000000000000000e-01), SC_(-1.4980281131690112288542788461553611206918e-06), SC_(-9.9999999999887795588607701655175253650385e-01) }, + { SC_(-9.9999833106994628906250000000000000000000e-01), SC_(-5.2430983960694780971372955823540956317309e-06), SC_(-9.9999999998625495960447237002460255656405e-01) }, + { SC_(-9.9999666213989257812500000000000000000000e-01), SC_(-1.0486196791994822995771188961609302512444e-05), SC_(-9.9999999994501983841826733236935959894956e-01) }, + { SC_(-9.9999570846557617187500000000000000000000e-01), SC_(-1.3482253018117696189242608854023945230621e-05), SC_(-9.9999999990911442677359804232502397526992e-01) }, + { SC_(-9.9998497962951660156250000000000000000000e-01), SC_(-4.7187885547329319055657947640681604270190e-05), SC_(-9.9999999888665172816630219829107169151373e-01) }, + { SC_(-9.9997091293334960937500000000000000000000e-01), SC_(-9.1379714776169916676504893028080336305096e-05), SC_(-9.9999999582487385499707753413380040254131e-01) }, + { SC_(-9.9996280670166015625000000000000000000000e-01), SC_(-1.1684619256134242811309917534624539649780e-04), SC_(-9.9999999317348361865817975703384517397171e-01) }, + { SC_(-9.9990034103393554687500000000000000000000e-01), SC_(-3.1308787053741855117950880780497680759570e-04), SC_(-9.9999995098799146008382980990445170109932e-01) }, + { SC_(-9.9984049797058105468750000000000000000000e-01), SC_(-5.0109038288529065804374478551472874530555e-04), SC_(-9.9999987445420620906323428975050136718796e-01) }, + { SC_(-9.9973201751708984375000000000000000000000e-01), SC_(-8.4189170014837154687588880235168421682168e-04), SC_(-9.9999964560911981419424672295679903989178e-01) }, + { SC_(-9.9924468994140625000000000000000000000000e-01), SC_(-2.3728743044973247838253172935228172467424e-03), SC_(-9.9999718472980465503219274828524949063826e-01) }, + { SC_(-9.9875164031982421875000000000000000000000e-01), SC_(-3.9218275467790664715140272043149223642317e-03), SC_(-9.9999230960477557309064944107279076437187e-01) }, + { SC_(-9.9767899513244628906250000000000000000000e-01), SC_(-7.2915872270404153887073312687679308998549e-03), SC_(-9.9997341602450135387659472378982173884007e-01) }, + { SC_(-9.9395751953125000000000000000000000000000e-01), SC_(-1.8981872167508178357172130364879478736824e-02), SC_(-9.9981982803353944005287225251112677857740e-01) }, + { SC_(-9.8443078994750976562500000000000000000000e-01), SC_(-4.8892615404945346627001407931204211546893e-02), SC_(-9.9880404092037197813676426019506317879923e-01) }, + { SC_(-9.6941399574279785156250000000000000000000e-01), SC_(-9.5940969111197941216571259124451089062976e-02), SC_(-9.9538702545592996217602751881533829549808e-01) }, + { SC_(-9.3761062622070312500000000000000000000000e-01), SC_(-1.9474944565077729586702134297397558908793e-01), SC_(-9.8085302335197751084221022090414475952815e-01) }, + { SC_(-8.7719464302062988281250000000000000000000e-01), SC_(-3.7630453859252822903265212796461262419442e-01), SC_(-9.2649603033939893545876174372382758963708e-01) }, + { SC_(-7.5403809547424316406250000000000000000000e-01), SC_(-6.9807973038455829131535264868499063685839e-01), SC_(-7.1602003465421440923170662542985439906727e-01) }, + { SC_(-7.1059679985046386718750000000000000000000e-01), SC_(-7.8900448357357190506916947609555659455861e-01), SC_(-6.1438743875570983374750220189262336594174e-01) }, + { SC_(-6.3708066940307617187500000000000000000000e-01), SC_(-9.0869391371723129146579397894656016506109e-01), SC_(-4.1746301773122492119427397853204125415748e-01) }, + { SC_(-1.3708055019378662109375000000000000000000e-01), SC_(-4.1746267741893839183276264415132105419314e-01), SC_(9.0869407006000175929162295142108224164498e-01) }, + { SC_(1.0000004768371582031250000000000000000000e+00), SC_(-1.4980281131690112288542788461553611206918e-06), SC_(-9.9999999999887795588607701655175253650385e-01) }, + { SC_(1.0000014305114746093750000000000000000000e+00), SC_(-4.4940843394935868575478645466191072371308e-06), SC_(-9.9999999998990160297470825676169589344081e-01) }, + { SC_(1.0000033378601074218750000000000000000000e+00), SC_(-1.0486196791994822995771188961609302512444e-05), SC_(-9.9999999994501983841826733236935959894956e-01) }, + { SC_(1.0000042915344238281250000000000000000000e+00), SC_(-1.3482253018117696189242608854023945230621e-05), SC_(-9.9999999990911442677359804232502397526992e-01) }, + { SC_(1.0000147819519042968750000000000000000000e+00), SC_(-4.6438871491565280117698474932339407631997e-05), SC_(-9.9999999892171560671359413131460719431659e-01) }, + { SC_(1.0000290870666503906250000000000000000000e+00), SC_(-9.1379714776169916676504893028080336305096e-05), SC_(-9.9999999582487385499707753413380040254131e-01) }, + { SC_(1.0000371932983398437500000000000000000000e+00), SC_(-1.1684619256134242811309917534624539649780e-04), SC_(-9.9999999317348361865817975703384517397171e-01) }, + { SC_(1.0000996589660644531250000000000000000000e+00), SC_(-3.1308787053741855117950880780497680759570e-04), SC_(-9.9999995098799146008382980990445170109932e-01) }, + { SC_(1.0001597404479980468750000000000000000000e+00), SC_(-5.0183939684769924809171253847476904900975e-04), SC_(-9.9999987407860195766947052118236852970333e-01) }, + { SC_(1.0002679824829101562500000000000000000000e+00), SC_(-8.4189170014837154687588880235168421682168e-04), SC_(-9.9999964560911981419424672295679903989178e-01) }, + { SC_(1.0007553100585937500000000000000000000000e+00), SC_(-2.3728743044973247838253172935228172467424e-03), SC_(-9.9999718472980465503219274828524949063826e-01) }, + { SC_(1.0012483596801757812500000000000000000000e+00), SC_(-3.9218275467790664715140272043149223642317e-03), SC_(-9.9999230960477557309064944107279076437187e-01) }, + { SC_(1.0023207664489746093750000000000000000000e+00), SC_(-7.2908382328935566307435101112900335063237e-03), SC_(-9.9997342148572217817205233668312377823042e-01) }, + { SC_(1.0060424804687500000000000000000000000000e+00), SC_(-1.8981872167508178357172130364879478736824e-02), SC_(-9.9981982803353944005287225251112677857740e-01) }, + { SC_(1.0155692100524902343750000000000000000000e+00), SC_(-4.8892615404945346627001407931204211546893e-02), SC_(-9.9880404092037197813676426019506317879923e-01) }, + { SC_(1.0305857658386230468750000000000000000000e+00), SC_(-9.5940223552297220176859818946140456738044e-02), SC_(-9.9538709731678521178505835566419054715492e-01) }, + { SC_(1.0623893737792968750000000000000000000000e+00), SC_(-1.9474944565077729586702134297397558908793e-01), SC_(-9.8085302335197751084221022090414475952815e-01) }, + { SC_(1.1228055953979492187500000000000000000000e+00), SC_(-3.7630523255097276560855730503841419331357e-01), SC_(-9.2649574848175008067512810410200333264846e-01) }, + { SC_(1.2459616661071777343750000000000000000000e+00), SC_(-6.9807919407529171997035782798891723621393e-01), SC_(-7.1602055752554423261801142921491759740208e-01) }, + { SC_(1.2894029617309570312500000000000000000000e+00), SC_(-7.8900402338852276350219626277702904546800e-01), SC_(-6.1438802973098639626496377371872238232214e-01) }, + { SC_(1.5000004768371582031250000000000000000000e+00), SC_(-9.9999999999887795588607701655175253650385e-01), SC_(1.4980281131690112288542788461553611206918e-06) }, + { SC_(1.5000014305114746093750000000000000000000e+00), SC_(-9.9999999998990160297470825676169589344081e-01), SC_(4.4940843394935868575478645466191072371308e-06) }, + { SC_(1.5000033378601074218750000000000000000000e+00), SC_(-9.9999999994501983841826733236935959894956e-01), SC_(1.0486196791994822995771188961609302512444e-05) }, + { SC_(1.5000042915344238281250000000000000000000e+00), SC_(-9.9999999990911442677359804232502397526992e-01), SC_(1.3482253018117696189242608854023945230621e-05) }, + { SC_(1.5000147819519042968750000000000000000000e+00), SC_(-9.9999999892171560671359413131460719431659e-01), SC_(4.6438871491565280117698474932339407631997e-05) }, + { SC_(1.5000290870666503906250000000000000000000e+00), SC_(-9.9999999582487385499707753413380040254131e-01), SC_(9.1379714776169916676504893028080336305096e-05) }, + { SC_(1.5000371932983398437500000000000000000000e+00), SC_(-9.9999999317348361865817975703384517397171e-01), SC_(1.1684619256134242811309917534624539649780e-04) }, + { SC_(1.5000996589660644531250000000000000000000e+00), SC_(-9.9999995098799146008382980990445170109932e-01), SC_(3.1308787053741855117950880780497680759570e-04) }, + { SC_(1.5001597404479980468750000000000000000000e+00), SC_(-9.9999987407860195766947052118236852970333e-01), SC_(5.0183939684769924809171253847476904900975e-04) }, + { SC_(1.5002679824829101562500000000000000000000e+00), SC_(-9.9999964560911981419424672295679903989178e-01), SC_(8.4189170014837154687588880235168421682168e-04) }, + { SC_(1.5007553100585937500000000000000000000000e+00), SC_(-9.9999718472980465503219274828524949063826e-01), SC_(2.3728743044973247838253172935228172467424e-03) }, + { SC_(1.5012483596801757812500000000000000000000e+00), SC_(-9.9999230960477557309064944107279076437187e-01), SC_(3.9218275467790664715140272043149223642317e-03) }, + { SC_(1.5023207664489746093750000000000000000000e+00), SC_(-9.9997342148572217817205233668312377823042e-01), SC_(7.2908382328935566307435101112900335063237e-03) }, + { SC_(1.5060424804687500000000000000000000000000e+00), SC_(-9.9981982803353944005287225251112677857740e-01), SC_(1.8981872167508178357172130364879478736824e-02) }, + { SC_(1.5155692100524902343750000000000000000000e+00), SC_(-9.9880404092037197813676426019506317879923e-01), SC_(4.8892615404945346627001407931204211546893e-02) }, + { SC_(1.5305857658386230468750000000000000000000e+00), SC_(-9.9538709731678521178505835566419054715492e-01), SC_(9.5940223552297220176859818946140456738044e-02) }, + { SC_(1.5623893737792968750000000000000000000000e+00), SC_(-9.8085302335197751084221022090414475952815e-01), SC_(1.9474944565077729586702134297397558908793e-01) }, + { SC_(1.6228055953979492187500000000000000000000e+00), SC_(-9.2649574848175008067512810410200333264846e-01), SC_(3.7630523255097276560855730503841419331357e-01) }, + { SC_(1.7459616661071777343750000000000000000000e+00), SC_(-7.1602055752554423261801142921491759740208e-01), SC_(6.9807919407529171997035782798891723621393e-01) }, + { SC_(1.7894029617309570312500000000000000000000e+00), SC_(-6.1438802973098639626496377371872238232214e-01), SC_(7.8900402338852276350219626277702904546800e-01) }, + { SC_(1.8629193305969238281250000000000000000000e+00), SC_(-4.1746301773122492119427397853204125415748e-01), SC_(9.0869391371723129146579397894656016506109e-01) }, + { SC_(2.0000000000000000000000000000000000000000e+00), SC_(0.0000000000000000000000000000000000000000e+00), SC_(1.0000000000000000000000000000000000000000e+00) }, + { SC_(2.0000019073486328125000000000000000000000e+00), SC_(5.9921124526424278428797118088908617299872e-06), SC_(9.9999999998204729417728262414778410737964e-01) }, + { SC_(2.0000028610229492187500000000000000000000e+00), SC_(8.9881686788964076192450246007437023043257e-06), SC_(9.9999999995960641189903698229174441602069e-01) }, + { SC_(2.0000038146972656250000000000000000000000e+00), SC_(1.1984224905069706421521561596988984804732e-05), SC_(9.9999999992818917670977509588385049026048e-01) }, + { SC_(2.0000143051147460937500000000000000000000e+00), SC_(4.4940843379959462761564286047113411974000e-05), SC_(9.9999999899016029763908875325140940739113e-01) }, + { SC_(2.0000286102294921875000000000000000000000e+00), SC_(8.9881686669152829717795387171401845170856e-05), SC_(9.9999999596064119259590746193438526128523e-01) }, + { SC_(2.0000371932983398437500000000000000000000e+00), SC_(1.1684619256134242811309917534624539649780e-04), SC_(9.9999999317348361865817975703384517397171e-01) }, + { SC_(2.0000991821289062500000000000000000000000e+00), SC_(3.1158984249731960822405142280490373395657e-04), SC_(9.9999995145588384798217323600349215222192e-01) }, + { SC_(2.0001592636108398437500000000000000000000e+00), SC_(5.0034136892260094523844706589235605397421e-04), SC_(9.9999987482924943847047044738353787252112e-01) }, + { SC_(2.0002679824829101562500000000000000000000e+00), SC_(8.4189170014837154687588880235168421682168e-04), SC_(9.9999964560911981419424672295679903989178e-01) }, + { SC_(2.0007553100585937500000000000000000000000e+00), SC_(2.3728743044973247838253172935228172467424e-03), SC_(9.9999718472980465503219274828524949063826e-01) }, + { SC_(2.0012483596801757812500000000000000000000e+00), SC_(3.9218275467790664715140272043149223642317e-03), SC_(9.9999230960477557309064944107279076437187e-01) }, + { SC_(2.0023202896118164062500000000000000000000e+00), SC_(7.2893402445875685718309310011223138924629e-03), SC_(9.9997343240648080532241755401327069531063e-01) }, + { SC_(2.0060424804687500000000000000000000000000e+00), SC_(1.8981872167508178357172130364879478736824e-02), SC_(9.9981982803353944005287225251112677857740e-01) }, + { SC_(2.0155687332153320312500000000000000000000e+00), SC_(4.8891119168357641426955981953471866397804e-02), SC_(9.9880411416176367891009655338470382368524e-01) }, + { SC_(2.0305852890014648437500000000000000000000e+00), SC_(9.5938732434334304771023968784410054299194e-02), SC_(9.9538724103682040861237580872061890490118e-01) }, + { SC_(2.0623893737792968750000000000000000000000e+00), SC_(1.9474944565077729586702134297397558908793e-01), SC_(9.8085302335197751084221022090414475952815e-01) }, + { SC_(2.1228055953979492187500000000000000000000e+00), SC_(3.7630523255097276560855730503841419331357e-01), SC_(9.2649574848175008067512810410200333264846e-01) }, + { SC_(2.2459611892700195312500000000000000000000e+00), SC_(6.9807812145558366410510314778327047985312e-01), SC_(7.1602160326699876911924965932760594412897e-01) }, + { SC_(2.2894029617309570312500000000000000000000e+00), SC_(7.8900402338852276350219626277702904546800e-01), SC_(6.1438802973098639626496377371872238232214e-01) }, + { SC_(2.3629188537597656250000000000000000000000e+00), SC_(9.0869328834487492706020241698554993000928e-01), SC_(4.1746437897978552326073028034696674963028e-01) }, + { SC_(2.5000000000000000000000000000000000000000e+00), SC_(1.0000000000000000000000000000000000000000e+00), SC_(0.0000000000000000000000000000000000000000e+00) }, + { SC_(2.5000019073486328125000000000000000000000e+00), SC_(9.9999999998204729417728262414778410737964e-01), SC_(-5.9921124526424278428797118088908617299872e-06) }, + { SC_(2.5000028610229492187500000000000000000000e+00), SC_(9.9999999995960641189903698229174441602069e-01), SC_(-8.9881686788964076192450246007437023043257e-06) }, + { SC_(2.5000038146972656250000000000000000000000e+00), SC_(9.9999999992818917670977509588385049026048e-01), SC_(-1.1984224905069706421521561596988984804732e-05) }, + { SC_(2.5000143051147460937500000000000000000000e+00), SC_(9.9999999899016029763908875325140940739113e-01), SC_(-4.4940843379959462761564286047113411974000e-05) }, + { SC_(2.5000286102294921875000000000000000000000e+00), SC_(9.9999999596064119259590746193438526128523e-01), SC_(-8.9881686669152829717795387171401845170856e-05) }, + { SC_(2.5000371932983398437500000000000000000000e+00), SC_(9.9999999317348361865817975703384517397171e-01), SC_(-1.1684619256134242811309917534624539649780e-04) }, + { SC_(2.5000991821289062500000000000000000000000e+00), SC_(9.9999995145588384798217323600349215222192e-01), SC_(-3.1158984249731960822405142280490373395657e-04) }, + { SC_(2.5001592636108398437500000000000000000000e+00), SC_(9.9999987482924943847047044738353787252112e-01), SC_(-5.0034136892260094523844706589235605397421e-04) }, + { SC_(2.5002679824829101562500000000000000000000e+00), SC_(9.9999964560911981419424672295679903989178e-01), SC_(-8.4189170014837154687588880235168421682168e-04) }, + { SC_(2.5007553100585937500000000000000000000000e+00), SC_(9.9999718472980465503219274828524949063826e-01), SC_(-2.3728743044973247838253172935228172467424e-03) }, + { SC_(2.5012483596801757812500000000000000000000e+00), SC_(9.9999230960477557309064944107279076437187e-01), SC_(-3.9218275467790664715140272043149223642317e-03) }, + { SC_(2.5023202896118164062500000000000000000000e+00), SC_(9.9997343240648080532241755401327069531063e-01), SC_(-7.2893402445875685718309310011223138924629e-03) }, + { SC_(2.5060424804687500000000000000000000000000e+00), SC_(9.9981982803353944005287225251112677857740e-01), SC_(-1.8981872167508178357172130364879478736824e-02) }, + { SC_(2.5155687332153320312500000000000000000000e+00), SC_(9.9880411416176367891009655338470382368524e-01), SC_(-4.8891119168357641426955981953471866397804e-02) }, + { SC_(2.5305852890014648437500000000000000000000e+00), SC_(9.9538724103682040861237580872061890490118e-01), SC_(-9.5938732434334304771023968784410054299194e-02) }, + { SC_(2.5623893737792968750000000000000000000000e+00), SC_(9.8085302335197751084221022090414475952815e-01), SC_(-1.9474944565077729586702134297397558908793e-01) }, + { SC_(2.6228055953979492187500000000000000000000e+00), SC_(9.2649574848175008067512810410200333264846e-01), SC_(-3.7630523255097276560855730503841419331357e-01) }, + { SC_(2.7459611892700195312500000000000000000000e+00), SC_(7.1602160326699876911924965932760594412897e-01), SC_(-6.9807812145558366410510314778327047985312e-01) }, + { SC_(2.7894029617309570312500000000000000000000e+00), SC_(6.1438802973098639626496377371872238232214e-01), SC_(-7.8900402338852276350219626277702904546800e-01) }, + { SC_(2.8629188537597656250000000000000000000000e+00), SC_(4.1746437897978552326073028034696674963028e-01), SC_(-9.0869328834487492706020241698554993000928e-01) }, + { SC_(3.3629188537597656250000000000000000000000e+00), SC_(-9.0869328834487492706020241698554993000928e-01), SC_(-4.1746437897978552326073028034696674963028e-01) } + }}; +//#undef SC_ + diff --git a/tools/trig_data.cpp b/tools/trig_data.cpp new file mode 100644 index 000000000..41233578f --- /dev/null +++ b/tools/trig_data.cpp @@ -0,0 +1,83 @@ +// (C) Copyright John Maddock 2006. +// 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 "mp_t.hpp" + +using namespace boost::math::tools; +using namespace std; + +float external_f; +float force_truncate(const float* f) +{ + external_f = *f; + return external_f; +} + +float truncate_to_float(mp_t r) +{ + float f = boost::math::tools::real_cast(r); + return force_truncate(&f); +} + +struct trig_data_generator +{ + boost::math::tuple operator()(mp_t z) + { + return boost::math::make_tuple(sin(z * boost::math::constants::pi()), cos(z * boost::math::constants::pi())); + } +}; + + +int main(int argc, char*argv []) +{ + parameter_info arg1; + test_data data; + + bool cont; + std::string line; + + std::cout << "Welcome.\n" + "This program will generate spot tests for the cos_pi and sin_pi functions:\n"; + + do{ + if(0 == get_user_parameter_info(arg1, "a")) + return 1; + data.insert(trig_data_generator(), arg1); + + std::cout << "Any more data [y/n]?"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + cont = (line == "y"); + }while(cont); + + std::cout << "Enter name of test data file [default=trig_data.ipp]"; + std::getline(std::cin, line); + boost::algorithm::trim(line); + if(line == "") + line = "trig_data.ipp"; + std::ofstream ofs(line.c_str()); + ofs << std::scientific << std::setprecision(40); + write_code(ofs, data, "trig_data"); + + return 0; +} + +/* Output for asymptotic limits: + +Erf asymptotic limit for 24 bit numbers is 2.8 after approximately 6 terms. +Erfc asymptotic limit for 24 bit numbers is 4.12064 after approximately 17 terms. +Erf asymptotic limit for 53 bit numbers is 4.3 after approximately 11 terms. +Erfc asymptotic limit for 53 bit numbers is 6.19035 after approximately 29 terms. +Erf asymptotic limit for 64 bit numbers is 4.8 after approximately 12 terms. +Erfc asymptotic limit for 64 bit numbers is 7.06004 after approximately 29 terms. +Erf asymptotic limit for 106 bit numbers is 6.5 after approximately 14 terms. +Erfc asymptotic limit for 106 bit numbers is 11.6626 after approximately 29 terms. +Erf asymptotic limit for 113 bit numbers is 6.8 after approximately 14 terms. +Erfc asymptotic limit for 113 bit numbers is 12.6802 after approximately 29 terms. +*/ + From f4b86c2996703f8047f23dc0b99646d119752d7d Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 17 Nov 2014 18:12:25 +0000 Subject: [PATCH 64/69] [polygamma] Switch to new better method for handling negative arguments. --- .../special_functions/detail/polygamma.hpp | 23 +++++++++++++-- test/test_polygamma.hpp | 29 ++++++++++++------- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 7dbc0d9ea..1baf2f585 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -497,6 +497,7 @@ int index = n - 1; +#if 0 if(index >= (int)table.size()) { // @@ -522,8 +523,8 @@ } } - T sum = 0; int power = n & 1 ? 0 : 1; + T sum = 0; // // Compute the sum of the cosine terms: // @@ -532,6 +533,24 @@ sum += table[index][j] * boost::math::cos_pi(x * power, pol); power += 2; } +#else + if(index >= (int)table.size()) + { + for(int i = (int)table.size() - 1; i < index; ++i) + { + int sin_order = i + 2; + table.push_back(std::vector(i + 2, T(0))); + table[i + 1][1] -= sin_order * table[i][0] / (sin_order - 1); + for(int cos_order = 1; cos_order < i + 1; ++cos_order) + { + table[i + 1][cos_order + 1] += ((cos_order - sin_order) * table[i][cos_order]) / (sin_order - 1); + table[i + 1][cos_order - 1] += (-cos_order * table[i][cos_order]) / (sin_order - 1); + } + } + + } + T sum = boost::math::tools::evaluate_polynomial(&table[index][0], boost::math::cos_pi(x, pol), n); +#endif if(sum == 0) return sum; // @@ -542,7 +561,7 @@ 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 + 1)); + power_terms += boost::math::lgamma(T(n)); power_terms += log(fabs(sum)); if(power_terms > boost::math::tools::log_max_value()) diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 79d637c5d..74296093f 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -137,17 +137,17 @@ void test_polygamma(T, const char* name) } }; do_test_polygamma(big_data, name, "Mathematica Data - large arguments"); - boost::array, 471> neg_data = + boost::array, 654> neg_data = { { - { 1, SC_(-12.750), SC_(19.663772856722737612034697464751605) }, { 1, SC_(-12.250), SC_(19.660817549236368273654684043826967) }, { 1, SC_(-11.750), SC_(19.657621376522814505537196503582823) }, { 1, SC_(-11.250), SC_(19.654153659190554029589711115880278) }, { 1, SC_(-10.750), SC_(19.650378280099093364749509767503149) }, { 1, SC_(-10.250), SC_(19.646252424622652795021809881312377) }, { 1, SC_(-9.7500), SC_(19.641724953976865133273035997897957) }, { 1, SC_(-9.2500), SC_(19.636734280660725370869519577921538) }, { 1, SC_(-8.7500), SC_(19.631205558842085383108670448917024) }, { 1, SC_(-8.2500), SC_(19.625046917622010980803778160828770) }, { 1, SC_(-7.7500), SC_(19.618144334352289464741323510141514) }, { 1, SC_(-7.2500), SC_(19.610354539293269015698176691590937) }, { 1, SC_(-6.7500), SC_(19.601495010731061577124257953429755) }, { 1, SC_(-6.2500), SC_(19.591329569019785068016844943671793) }, { 1, SC_(-5.7500), SC_(19.579547136931335925546754524074474) }, { 1, SC_(-5.2500), SC_(19.565729569019785068016844943671793) }, { 1, SC_(-4.7500), SC_(19.549301390239464469970194977760674) }, { 1, SC_(-4.2500), SC_(19.529448389881463072551992335962043) }, { 1, SC_(-3.7500), SC_(19.504980060599575273294294700752364) }, { 1, SC_(-3.2500), SC_(19.474085068082155114074483685443011) }, { 1, SC_(-2.7500), SC_(19.433868949488464162183183589641253) }, { 1, SC_(-2.2500), SC_(19.379410511869137362595193744614609) }, { 1, SC_(-1.7500), SC_(19.301637544529786476232770366500757) }, { 1, SC_(-1.2500), SC_(19.181879647671606498397662880417078) }, { 1, SC_(-0.75000), SC_(18.975106932284888517049096897113002) }, { 1, SC_(-0.25000), SC_(18.541879647671606498397662880417078) }, - { 2, SC_(-12.750), SC_(-124.03079461415823384604153251543681) }, { 2, SC_(-12.250), SC_(124.01896466745858356132308878716344) }, { 2, SC_(-11.750), SC_(-124.03175955222881001960976796032603) }, { 2, SC_(-11.250), SC_(124.01787668541028735821044014586602) }, { 2, SC_(-10.750), SC_(-124.03299241970518808612682102178640) }, { 2, SC_(-10.250), SC_(124.01647202148710491650947992638728) }, { 2, SC_(-9.7500), SC_(-124.03460234084420729198290916496876) }, { 2, SC_(-9.2500), SC_(124.01461482266526541911391108670126) }, { 2, SC_(-8.7500), SC_(-124.03676016548723903560636876475972) }, { 2, SC_(-8.2500), SC_(124.01208782525148933477537240192445) }, { 2, SC_(-7.7500), SC_(-124.03974558822776381694747663647984) }, { 2, SC_(-7.2500), SC_(124.00852603656573370687098416695770) }, { 2, SC_(-6.7500), SC_(-124.04404218787195165891317097369578) }, { 2, SC_(-6.2500), SC_(124.00327776890408296268303058132483) }, { 2, SC_(-5.7500), SC_(-124.05054526159038888901020902683808) }, { 2, SC_(-5.2500), SC_(123.99508576890408296268303058132483) }, { 2, SC_(-4.7500), SC_(-124.06106552130930069964553408642549) }, { 2, SC_(-4.2500), SC_(123.98126436732757934536308673076874) }, { 2, SC_(-3.7500), SC_(-124.07972713378925404561433420306057) }, { 2, SC_(-3.2500), SC_(123.95521103942202265902072971875978) }, { 2, SC_(-2.7500), SC_(-124.11765305971517997154026012898649) }, { 2, SC_(-2.2500), SC_(123.89694977406016558118732052440384) }, { 2, SC_(-1.7500), SC_(-124.21382135423058192495874247308867) }, { 2, SC_(-1.2500), SC_(123.72136678366236036856729308956159) }, { 2, SC_(-0.75000), SC_(-124.58699919679617959259722643810325) }, { 2, SC_(-0.25000), SC_(122.69736678366236036856729308956159) }, - { 3, SC_(-12.750), SC_(1558.5445992104061926890981987122713) }, { 3, SC_(-12.250), SC_(1558.5444945580353369268010524200916) }, { 3, SC_(-11.750), SC_(1558.5443721661542924129644962546503) }, { 3, SC_(-11.250), SC_(1558.5442281134520807137938731609983) }, { 3, SC_(-10.750), SC_(1558.5440573914794724810878018559796) }, { 3, SC_(-10.250), SC_(1558.5438535364058987293402837691373) }, { 3, SC_(-9.7500), SC_(1558.5436081111616066561977307462543) }, { 3, SC_(-9.2500), SC_(1558.5433099660190188764440197184975) }, { 3, SC_(-8.7500), SC_(1558.5429441651175968889289739463186) }, { 3, SC_(-8.2500), SC_(1558.5424903992902266328747639288402) }, { 3, SC_(-7.7500), SC_(1558.5419205916065598210405941045860) }, { 3, SC_(-7.2500), SC_(1558.5411952034044973136368045706704) }, { 3, SC_(-6.7500), SC_(1558.5402573917442935596345188772766) }, { 3, SC_(-6.2500), SC_(1558.5390235064410556263866168800637) }, { 3, SC_(-5.7500), SC_(1558.5373671367583214573691686314356) }, { 3, SC_(-5.2500), SC_(1558.5350913464410556263866168800637) }, { 3, SC_(-4.7500), SC_(1558.5318783056006283387768251220856) }, { 3, SC_(-4.2500), SC_(1558.5271934026830535593466489654603) }, { 3, SC_(-3.7500), SC_(1558.5200920240343420150070566273687) }, { 3, SC_(-3.2500), SC_(1558.5088028182791311925167498981598) }, { 3, SC_(-2.7500), SC_(1558.4897512832936012742663158866280) }, { 3, SC_(-2.2500), SC_(1558.4550231887143400437474491033697) }, { 3, SC_(-1.7500), SC_(1558.3848404165495264159916078748802) }, { 3, SC_(-1.2500), SC_(1558.2209125348505997602540791902467) }, { 3, SC_(-0.75000), SC_(1557.7451069721513589857542067919980) }, { 3, SC_(-0.25000), SC_(1555.7633125348505997602540791902467) }, - { 4, SC_(-12.750), SC_(-24481.574976569827769932951761311307) }, { 4, SC_(-12.250), SC_(24481.574556933476371183897773040987) }, { 4, SC_(-11.750), SC_(-24481.575047799396993548993707180364) }, { 4, SC_(-11.250), SC_(24481.574469931163471195977061446181) }, { 4, SC_(-10.750), SC_(-24481.575154956733102461973007401188) }, { 4, SC_(-10.250), SC_(24481.574336748213717601504674106852) }, { 4, SC_(-9.7500), SC_(-24481.575322130804866489839080372249) }, { 4, SC_(-9.2500), SC_(24481.574124623184691317447595452944) }, { 4, SC_(-8.7500), SC_(-24481.575594518925485881539083161966) }, { 4, SC_(-8.2500), SC_(24481.573770215950618995904133489849) }, { 4, SC_(-7.7500), SC_(-24481.576062438244817112573771089615) }, { 4, SC_(-7.2500), SC_(24481.573142242187841144152395619221) }, { 4, SC_(-6.7500), SC_(-24481.576920863980180344267229271453) }, { 4, SC_(-6.2500), SC_(24481.571944064552838833945395514059) }, { 4, SC_(-5.7500), SC_(-24481.578633607675571219683733120840) }, { 4, SC_(-5.2500), SC_(24481.569427482152838833945395514059) }, { 4, SC_(-4.7500), SC_(-24481.582451925002662084791450344735) }, { 4, SC_(-4.2500), SC_(24481.563410001194361068581610436266) }, { 4, SC_(-3.7500), SC_(-24481.592377214742692673229150129760) }, { 4, SC_(-3.2500), SC_(24481.546101215873022370388764255277) }, { 4, SC_(-2.7500), SC_(-24481.624740671532816130019273586550) }, { 4, SC_(-2.2500), SC_(24481.479910902562510187288086353997) }, { 4, SC_(-1.7500), SC_(-24481.777338295887834105691576149093) }, { 4, SC_(-1.2500), SC_(24481.063714184582527461077650952890) }, { 4, SC_(-0.75000), SC_(-24483.239586168797931089091350052823) }, { 4, SC_(-0.25000), SC_(24473.199394184582527461077650952890) }, - { 5, SC_(-12.750), SC_(492231.26705220367447285602722829798) }, { 5, SC_(-12.250), SC_(492231.26703986858726773334478356804) }, { 5, SC_(-11.750), SC_(492231.26702427051007143797156325129) }, { 5, SC_(-11.250), SC_(492231.26700435743914528929551352935) }, { 5, SC_(-10.750), SC_(492231.26697867164364211329952060413) }, { 5, SC_(-10.250), SC_(492231.26694516501703258064111915631) }, { 5, SC_(-9.7500), SC_(492231.26690091626142628638506805946) }, { 5, SC_(-9.2500), SC_(492231.26684168939311732012547103246) }, { 5, SC_(-8.7500), SC_(492231.26676123004572403423122047499) }, { 5, SC_(-8.2500), SC_(492231.26665011791524038956143753889) }, { 5, SC_(-7.7500), SC_(492231.26649384757753475935425594490) }, { 5, SC_(-7.2500), SC_(492231.26626952775598108546947519306) }, { 5, SC_(-6.7500), SC_(492231.26594002452246170664879905339) }, { 5, SC_(-6.2500), SC_(492231.26544319835253121636119925846) }, { 5, SC_(-5.7500), SC_(492231.26467132548883883596990731311) }, { 5, SC_(-5.2500), SC_(492231.26342993243253121636119925846) }, { 5, SC_(-4.7500), SC_(492231.26135104955223808370232711841) }, { 5, SC_(-4.2500), SC_(492231.25769899818636191601473727961) }, { 5, SC_(-3.7500), SC_(492231.25090337614167956955737997628) }, { 5, SC_(-3.2500), SC_(492231.23733572133772815343491824315) }, { 5, SC_(-2.7500), SC_(492231.20775210042151496050388203390) }, { 5, SC_(-2.2500), SC_(492231.13550447009078633328002916426) }, { 5, SC_(-1.7500), SC_(492230.93030187432148227746333192018) }, { 5, SC_(-1.2500), SC_(492230.21062287457971360836795049513) }, { 5, SC_(-0.75000), SC_(492226.75245080886406232489254933809) }, { 5, SC_(-0.25000), SC_(492198.75334287457971360836795049513) }, - { 6, SC_(-12.750), SC_(-1.1791224761262553923199740571475659e7) }, { 6, SC_(-12.250), SC_(1.1791224761212959953338096554813394e7) }, { 6, SC_(-11.750), SC_(-1.1791224761275698941741584362376857e7) }, { 6, SC_(-11.250), SC_(1.1791224761195566737931185183742355e7) }, { 6, SC_(-10.750), SC_(-1.1791224761298983469279962918313528e7) }, { 6, SC_(-10.250), SC_(1.1791224761163997446137740568065356e7) }, { 6, SC_(-9.7500), SC_(-1.1791224761342381822144610498473088e7) }, { 6, SC_(-9.2500), SC_(1.1791224761103426349211734412564015e7) }, { 6, SC_(-8.7500), SC_(-1.1791224761428342570269073362379294e7) }, { 6, SC_(-8.2500), SC_(1.1791224760979163768967238911569317e7) }, { 6, SC_(-7.7500), SC_(-1.1791224761611690548456004706583543e7) }, { 6, SC_(-7.2500), SC_(1.1791224760702370925869563208323974e7) }, { 6, SC_(-6.7500), SC_(-1.1791224762040456784641593897905007e7) }, { 6, SC_(-6.2500), SC_(1.1791224760018512109221395670440442e7) }, { 6, SC_(-5.7500), SC_(-1.1791224763168189258973034501364332e7) }, { 6, SC_(-5.2500), SC_(1.1791224758085776826021395670440442e7) }, { 6, SC_(-4.7500), SC_(-1.1791224766632825018904254258839318e7) }, { 6, SC_(-4.2500), SC_(1.1791224751536137687542195274483895e7) }, { 6, SC_(-3.7500), SC_(-1.1791224779829886169083430020877813e7) }, { 6, SC_(-3.2500), SC_(1.1791224722787982136529824573562902e7) }, { 6, SC_(-2.7500), SC_(-1.1791224848871927321346804506474521e7) }, { 6, SC_(-2.2500), SC_(1.1791224534791825988329541210690757e7) }, { 6, SC_(-1.7500), SC_(-1.1791225454217875175963567504038405e7) }, { 6, SC_(-1.2500), SC_(1.1791222068440904625468941445147639e7) }, { 6, SC_(-0.75000), SC_(-1.1791239778278671029974833461007258e7) }, { 6, SC_(-0.25000), SC_(1.1791071073496904625468941445147639e7) }, - { 7, SC_(-12.750), SC_(3.3035269585550319411369451657990653e8) }, { 7, SC_(-12.250), SC_(3.3035269585550014530679554645726841e8) }, { 7, SC_(-11.750), SC_(3.3035269585549597724076958273392155e8) }, { 7, SC_(-11.250), SC_(3.3035269585549020632656302567379925e8) }, { 7, SC_(-10.750), SC_(3.3035269585548210560734246359421460e8) }, { 7, SC_(-10.250), SC_(3.3035269585547056321166932680182245e8) }, { 7, SC_(-9.7500), SC_(3.3035269585545384621477943726294791e8) }, { 7, SC_(-9.2500), SC_(3.3035269585542919758450034698830934e8) }, { 7, SC_(-8.7500), SC_(3.3035269585539213080586956648886140e8) }, { 7, SC_(-8.2500), SC_(3.3035269585533516103728829633890794e8) }, { 7, SC_(-7.7500), SC_(3.3035269585524545242332002141349801e8) }, { 7, SC_(-7.2500), SC_(3.3035269585510030650375087453009371e8) }, { 7, SC_(-6.7500), SC_(3.3035269585485817969386206988585281e8) }, { 7, SC_(-6.2500), SC_(3.3035269585444002902560781621765444e8) }, { 7, SC_(-5.7500), SC_(3.3035269585368867935011094629708018e8) }, { 7, SC_(-5.2500), SC_(3.3035269585227536550842381621765444e8) }, { 7, SC_(-4.7500), SC_(3.3035269584947086190323815702711063e8) }, { 7, SC_(-4.2500), SC_(3.3035269584354251332378488235637904e8) }, { 7, SC_(-3.7500), SC_(3.3035269583002256126086884537779074e8) }, { 7, SC_(-3.2500), SC_(3.3035269579619261006329391884897976e8) }, { 7, SC_(-2.7500), SC_(3.3035269570114408444331054633801022e8) }, { 7, SC_(-2.2500), SC_(3.3035269539127781220563177006740899e8) }, { 7, SC_(-1.7500), SC_(3.3035269416026348990428605870784761e8) }, { 7, SC_(-1.2500), SC_(3.3035268771818605685450990413016373e8) }, { 7, SC_(-0.75000), SC_(3.3035263686402030648824099487997220e8) }, { 7, SC_(-0.25000), SC_(3.3035184214649965685450990413016373e8) }, - { 8, SC_(-7.7500), SC_(-1.0569114259666913771892699180522388e10) }, { 8, SC_(-7.2500), SC_(1.0569114259666319911021283350705169e10) }, { 8, SC_(-6.7500), SC_(-1.0569114259667313537290849324034796e10) }, { 8, SC_(-6.2500), SC_(1.0569114259665591328976435838084546e10) }, { 8, SC_(-5.7500), SC_(-1.0569114259668699611772332137177045e10) }, { 8, SC_(-5.2500), SC_(1.0569114259662820559674440318084546e10) }, { 8, SC_(-4.7500), SC_(-1.0569114259674567879524502974422220e10) }, { 8, SC_(-4.2500), SC_(1.0569114259649513356345466704581650e10) }, { 8, SC_(-3.7500), SC_(-1.0569114259707322912185335499305285e10) }, { 8, SC_(-3.2500), SC_(1.0569114259560384126678660185038311e10) }, { 8, SC_(-2.7500), SC_(-1.0569114259982263662729459870590150e10) }, { 8, SC_(-2.2500), SC_(1.0569114258563670778105953357268290e10) }, { 8, SC_(-1.7500), SC_(-1.0569114264464825392297531107332441e10) }, { 8, SC_(-1.2500), SC_(1.0569114231281566759079742278380307e10) }, { 8, SC_(-0.75000), SC_(-1.0569114526390508516485165684831300e10) }, { 8, SC_(-0.25000), SC_(1.0569108819622773799079742278380307e10) }, - { 9, SC_(-7.7500), SC_(3.8051374324233954962308727459400485e11) }, { 9, SC_(-7.2500), SC_(3.8051374324233938918730928010849146e11) }, { 9, SC_(-6.7500), SC_(3.8051374324233908537939910023379690e11) }, { 9, SC_(-6.2500), SC_(3.8051374324233848474063291767903138e11) }, { 9, SC_(-5.7500), SC_(3.8051374324233723728009045648294056e11) }, { 9, SC_(-5.2500), SC_(3.8051374324233449483283804413023138e11) }, { 9, SC_(-4.7500), SC_(3.8051374324232805216534792821594812e11) }, { 9, SC_(-4.2500), SC_(3.8051374324231168248427408936422641e11) }, { 9, SC_(-3.7500), SC_(3.8051374324226598999820108764248547e11) }, { 9, SC_(-3.2500), SC_(3.8051374324212293823321496967578170e11) }, { 9, SC_(-2.7500), SC_(3.8051374324160613219689518915140179e11) }, { 9, SC_(-2.2500), SC_(3.8051374323936280896024439692195702e11) }, { 9, SC_(-1.7500), SC_(3.8051374322693593017285422874024520e11) }, { 9, SC_(-1.2500), SC_(3.8051374313023439288413955260640509e11) }, { 9, SC_(-0.75000), SC_(3.8051374187988955981988925091310821e11) }, { 9, SC_(-0.25000), SC_(3.8051370416629108357213955260640509e11) }, + { SC_(1.0), SC_(-12.750), SC_(19.663772856722737612034697464751605) }, { SC_(1.0), SC_(-12.250), SC_(19.660817549236368273654684043826967) }, { SC_(1.0), SC_(-11.750), SC_(19.657621376522814505537196503582823) }, { SC_(1.0), SC_(-11.250), SC_(19.654153659190554029589711115880278) }, { SC_(1.0), SC_(-10.750), SC_(19.650378280099093364749509767503149) }, { SC_(1.0), SC_(-10.250), SC_(19.646252424622652795021809881312377) }, { SC_(1.0), SC_(-9.7500), SC_(19.641724953976865133273035997897957) }, { SC_(1.0), SC_(-9.2500), SC_(19.636734280660725370869519577921538) }, { SC_(1.0), SC_(-8.7500), SC_(19.631205558842085383108670448917024) }, { SC_(1.0), SC_(-8.2500), SC_(19.625046917622010980803778160828770) }, { SC_(1.0), SC_(-7.7500), SC_(19.618144334352289464741323510141514) }, { SC_(1.0), SC_(-7.2500), SC_(19.610354539293269015698176691590937) }, { SC_(1.0), SC_(-6.7500), SC_(19.601495010731061577124257953429755) }, { SC_(1.0), SC_(-6.2500), SC_(19.591329569019785068016844943671793) }, { SC_(1.0), SC_(-5.7500), SC_(19.579547136931335925546754524074474) }, { SC_(1.0), SC_(-5.2500), SC_(19.565729569019785068016844943671793) }, { SC_(1.0), SC_(-4.7500), SC_(19.549301390239464469970194977760674) }, { SC_(1.0), SC_(-4.2500), SC_(19.529448389881463072551992335962043) }, { SC_(1.0), SC_(-3.7500), SC_(19.504980060599575273294294700752364) }, { SC_(1.0), SC_(-3.2500), SC_(19.474085068082155114074483685443011) }, { SC_(1.0), SC_(-2.7500), SC_(19.433868949488464162183183589641253) }, { SC_(1.0), SC_(-2.2500), SC_(19.379410511869137362595193744614609) }, { SC_(1.0), SC_(-1.7500), SC_(19.301637544529786476232770366500757) }, { SC_(1.0), SC_(-1.2500), SC_(19.181879647671606498397662880417078) }, { SC_(1.0), SC_(-0.75000), SC_(18.975106932284888517049096897113002) }, { SC_(1.0), SC_(-0.25000), SC_(18.541879647671606498397662880417078) }, + { SC_(2.0), SC_(-12.750), SC_(-124.03079461415823384604153251543681) }, { SC_(2.0), SC_(-12.250), SC_(124.01896466745858356132308878716344) }, { SC_(2.0), SC_(-11.750), SC_(-124.03175955222881001960976796032603) }, { SC_(2.0), SC_(-11.250), SC_(124.01787668541028735821044014586602) }, { SC_(2.0), SC_(-10.750), SC_(-124.03299241970518808612682102178640) }, { SC_(2.0), SC_(-10.250), SC_(124.01647202148710491650947992638728) }, { SC_(2.0), SC_(-9.7500), SC_(-124.03460234084420729198290916496876) }, { SC_(2.0), SC_(-9.2500), SC_(124.01461482266526541911391108670126) }, { SC_(2.0), SC_(-8.7500), SC_(-124.03676016548723903560636876475972) }, { SC_(2.0), SC_(-8.2500), SC_(124.01208782525148933477537240192445) }, { SC_(2.0), SC_(-7.7500), SC_(-124.03974558822776381694747663647984) }, { SC_(2.0), SC_(-7.2500), SC_(124.00852603656573370687098416695770) }, { SC_(2.0), SC_(-6.7500), SC_(-124.04404218787195165891317097369578) }, { SC_(2.0), SC_(-6.2500), SC_(124.00327776890408296268303058132483) }, { SC_(2.0), SC_(-5.7500), SC_(-124.05054526159038888901020902683808) }, { SC_(2.0), SC_(-5.2500), SC_(123.99508576890408296268303058132483) }, { SC_(2.0), SC_(-4.7500), SC_(-124.06106552130930069964553408642549) }, { SC_(2.0), SC_(-4.2500), SC_(123.98126436732757934536308673076874) }, { SC_(2.0), SC_(-3.7500), SC_(-124.07972713378925404561433420306057) }, { SC_(2.0), SC_(-3.2500), SC_(123.95521103942202265902072971875978) }, { SC_(2.0), SC_(-2.7500), SC_(-124.11765305971517997154026012898649) }, { SC_(2.0), SC_(-2.2500), SC_(123.89694977406016558118732052440384) }, { SC_(2.0), SC_(-1.7500), SC_(-124.21382135423058192495874247308867) }, { SC_(2.0), SC_(-1.2500), SC_(123.72136678366236036856729308956159) }, { SC_(2.0), SC_(-0.75000), SC_(-124.58699919679617959259722643810325) }, { SC_(2.0), SC_(-0.25000), SC_(122.69736678366236036856729308956159) }, + { SC_(3.0), SC_(-12.750), SC_(1558.5445992104061926890981987122713) }, { SC_(3.0), SC_(-12.250), SC_(1558.5444945580353369268010524200916) }, { SC_(3.0), SC_(-11.750), SC_(1558.5443721661542924129644962546503) }, { SC_(3.0), SC_(-11.250), SC_(1558.5442281134520807137938731609983) }, { SC_(3.0), SC_(-10.750), SC_(1558.5440573914794724810878018559796) }, { SC_(3.0), SC_(-10.250), SC_(1558.5438535364058987293402837691373) }, { SC_(3.0), SC_(-9.7500), SC_(1558.5436081111616066561977307462543) }, { SC_(3.0), SC_(-9.2500), SC_(1558.5433099660190188764440197184975) }, { SC_(3.0), SC_(-8.7500), SC_(1558.5429441651175968889289739463186) }, { SC_(3.0), SC_(-8.2500), SC_(1558.5424903992902266328747639288402) }, { SC_(3.0), SC_(-7.7500), SC_(1558.5419205916065598210405941045860) }, { SC_(3.0), SC_(-7.2500), SC_(1558.5411952034044973136368045706704) }, { SC_(3.0), SC_(-6.7500), SC_(1558.5402573917442935596345188772766) }, { SC_(3.0), SC_(-6.2500), SC_(1558.5390235064410556263866168800637) }, { SC_(3.0), SC_(-5.7500), SC_(1558.5373671367583214573691686314356) }, { SC_(3.0), SC_(-5.2500), SC_(1558.5350913464410556263866168800637) }, { SC_(3.0), SC_(-4.7500), SC_(1558.5318783056006283387768251220856) }, { SC_(3.0), SC_(-4.2500), SC_(1558.5271934026830535593466489654603) }, { SC_(3.0), SC_(-3.7500), SC_(1558.5200920240343420150070566273687) }, { SC_(3.0), SC_(-3.2500), SC_(1558.5088028182791311925167498981598) }, { SC_(3.0), SC_(-2.7500), SC_(1558.4897512832936012742663158866280) }, { SC_(3.0), SC_(-2.2500), SC_(1558.4550231887143400437474491033697) }, { SC_(3.0), SC_(-1.7500), SC_(1558.3848404165495264159916078748802) }, { SC_(3.0), SC_(-1.2500), SC_(1558.2209125348505997602540791902467) }, { SC_(3.0), SC_(-0.75000), SC_(1557.7451069721513589857542067919980) }, { SC_(3.0), SC_(-0.25000), SC_(1555.7633125348505997602540791902467) }, + { SC_(4.0), SC_(-12.750), SC_(-24481.574976569827769932951761311307) }, { SC_(4.0), SC_(-12.250), SC_(24481.574556933476371183897773040987) }, { SC_(4.0), SC_(-11.750), SC_(-24481.575047799396993548993707180364) }, { SC_(4.0), SC_(-11.250), SC_(24481.574469931163471195977061446181) }, { SC_(4.0), SC_(-10.750), SC_(-24481.575154956733102461973007401188) }, { SC_(4.0), SC_(-10.250), SC_(24481.574336748213717601504674106852) }, { SC_(4.0), SC_(-9.7500), SC_(-24481.575322130804866489839080372249) }, { SC_(4.0), SC_(-9.2500), SC_(24481.574124623184691317447595452944) }, { SC_(4.0), SC_(-8.7500), SC_(-24481.575594518925485881539083161966) }, { SC_(4.0), SC_(-8.2500), SC_(24481.573770215950618995904133489849) }, { SC_(4.0), SC_(-7.7500), SC_(-24481.576062438244817112573771089615) }, { SC_(4.0), SC_(-7.2500), SC_(24481.573142242187841144152395619221) }, { SC_(4.0), SC_(-6.7500), SC_(-24481.576920863980180344267229271453) }, { SC_(4.0), SC_(-6.2500), SC_(24481.571944064552838833945395514059) }, { SC_(4.0), SC_(-5.7500), SC_(-24481.578633607675571219683733120840) }, { SC_(4.0), SC_(-5.2500), SC_(24481.569427482152838833945395514059) }, { SC_(4.0), SC_(-4.7500), SC_(-24481.582451925002662084791450344735) }, { SC_(4.0), SC_(-4.2500), SC_(24481.563410001194361068581610436266) }, { SC_(4.0), SC_(-3.7500), SC_(-24481.592377214742692673229150129760) }, { SC_(4.0), SC_(-3.2500), SC_(24481.546101215873022370388764255277) }, { SC_(4.0), SC_(-2.7500), SC_(-24481.624740671532816130019273586550) }, { SC_(4.0), SC_(-2.2500), SC_(24481.479910902562510187288086353997) }, { SC_(4.0), SC_(-1.7500), SC_(-24481.777338295887834105691576149093) }, { SC_(4.0), SC_(-1.2500), SC_(24481.063714184582527461077650952890) }, { SC_(4.0), SC_(-0.75000), SC_(-24483.239586168797931089091350052823) }, { SC_(4.0), SC_(-0.25000), SC_(24473.199394184582527461077650952890) }, + { SC_(5.0), SC_(-12.750), SC_(492231.26705220367447285602722829798) }, { SC_(5.0), SC_(-12.250), SC_(492231.26703986858726773334478356804) }, { SC_(5.0), SC_(-11.750), SC_(492231.26702427051007143797156325129) }, { SC_(5.0), SC_(-11.250), SC_(492231.26700435743914528929551352935) }, { SC_(5.0), SC_(-10.750), SC_(492231.26697867164364211329952060413) }, { SC_(5.0), SC_(-10.250), SC_(492231.26694516501703258064111915631) }, { SC_(5.0), SC_(-9.7500), SC_(492231.26690091626142628638506805946) }, { SC_(5.0), SC_(-9.2500), SC_(492231.26684168939311732012547103246) }, { SC_(5.0), SC_(-8.7500), SC_(492231.26676123004572403423122047499) }, { SC_(5.0), SC_(-8.2500), SC_(492231.26665011791524038956143753889) }, { SC_(5.0), SC_(-7.7500), SC_(492231.26649384757753475935425594490) }, { SC_(5.0), SC_(-7.2500), SC_(492231.26626952775598108546947519306) }, { SC_(5.0), SC_(-6.7500), SC_(492231.26594002452246170664879905339) }, { SC_(5.0), SC_(-6.2500), SC_(492231.26544319835253121636119925846) }, { SC_(5.0), SC_(-5.7500), SC_(492231.26467132548883883596990731311) }, { SC_(5.0), SC_(-5.2500), SC_(492231.26342993243253121636119925846) }, { SC_(5.0), SC_(-4.7500), SC_(492231.26135104955223808370232711841) }, { SC_(5.0), SC_(-4.2500), SC_(492231.25769899818636191601473727961) }, { SC_(5.0), SC_(-3.7500), SC_(492231.25090337614167956955737997628) }, { SC_(5.0), SC_(-3.2500), SC_(492231.23733572133772815343491824315) }, { SC_(5.0), SC_(-2.7500), SC_(492231.20775210042151496050388203390) }, { SC_(5.0), SC_(-2.2500), SC_(492231.13550447009078633328002916426) }, { SC_(5.0), SC_(-1.7500), SC_(492230.93030187432148227746333192018) }, { SC_(5.0), SC_(-1.2500), SC_(492230.21062287457971360836795049513) }, { SC_(5.0), SC_(-0.75000), SC_(492226.75245080886406232489254933809) }, { SC_(5.0), SC_(-0.25000), SC_(492198.75334287457971360836795049513) }, + { SC_(6.0), SC_(-12.750), SC_(-1.1791224761262553923199740571475659e7) }, { SC_(6.0), SC_(-12.250), SC_(1.1791224761212959953338096554813394e7) }, { SC_(6.0), SC_(-11.750), SC_(-1.1791224761275698941741584362376857e7) }, { SC_(6.0), SC_(-11.250), SC_(1.1791224761195566737931185183742355e7) }, { SC_(6.0), SC_(-10.750), SC_(-1.1791224761298983469279962918313528e7) }, { SC_(6.0), SC_(-10.250), SC_(1.1791224761163997446137740568065356e7) }, { SC_(6.0), SC_(-9.7500), SC_(-1.1791224761342381822144610498473088e7) }, { SC_(6.0), SC_(-9.2500), SC_(1.1791224761103426349211734412564015e7) }, { SC_(6.0), SC_(-8.7500), SC_(-1.1791224761428342570269073362379294e7) }, { SC_(6.0), SC_(-8.2500), SC_(1.1791224760979163768967238911569317e7) }, { SC_(6.0), SC_(-7.7500), SC_(-1.1791224761611690548456004706583543e7) }, { SC_(6.0), SC_(-7.2500), SC_(1.1791224760702370925869563208323974e7) }, { SC_(6.0), SC_(-6.7500), SC_(-1.1791224762040456784641593897905007e7) }, { SC_(6.0), SC_(-6.2500), SC_(1.1791224760018512109221395670440442e7) }, { SC_(6.0), SC_(-5.7500), SC_(-1.1791224763168189258973034501364332e7) }, { SC_(6.0), SC_(-5.2500), SC_(1.1791224758085776826021395670440442e7) }, { SC_(6.0), SC_(-4.7500), SC_(-1.1791224766632825018904254258839318e7) }, { SC_(6.0), SC_(-4.2500), SC_(1.1791224751536137687542195274483895e7) }, { SC_(6.0), SC_(-3.7500), SC_(-1.1791224779829886169083430020877813e7) }, { SC_(6.0), SC_(-3.2500), SC_(1.1791224722787982136529824573562902e7) }, { SC_(6.0), SC_(-2.7500), SC_(-1.1791224848871927321346804506474521e7) }, { SC_(6.0), SC_(-2.2500), SC_(1.1791224534791825988329541210690757e7) }, { SC_(6.0), SC_(-1.7500), SC_(-1.1791225454217875175963567504038405e7) }, { SC_(6.0), SC_(-1.2500), SC_(1.1791222068440904625468941445147639e7) }, { SC_(6.0), SC_(-0.75000), SC_(-1.1791239778278671029974833461007258e7) }, { SC_(6.0), SC_(-0.25000), SC_(1.1791071073496904625468941445147639e7) }, + { SC_(7.0), SC_(-12.750), SC_(3.3035269585550319411369451657990653e8) }, { SC_(7.0), SC_(-12.250), SC_(3.3035269585550014530679554645726841e8) }, { SC_(7.0), SC_(-11.750), SC_(3.3035269585549597724076958273392155e8) }, { SC_(7.0), SC_(-11.250), SC_(3.3035269585549020632656302567379925e8) }, { SC_(7.0), SC_(-10.750), SC_(3.3035269585548210560734246359421460e8) }, { SC_(7.0), SC_(-10.250), SC_(3.3035269585547056321166932680182245e8) }, { SC_(7.0), SC_(-9.7500), SC_(3.3035269585545384621477943726294791e8) }, { SC_(7.0), SC_(-9.2500), SC_(3.3035269585542919758450034698830934e8) }, { SC_(7.0), SC_(-8.7500), SC_(3.3035269585539213080586956648886140e8) }, { SC_(7.0), SC_(-8.2500), SC_(3.3035269585533516103728829633890794e8) }, { SC_(7.0), SC_(-7.7500), SC_(3.3035269585524545242332002141349801e8) }, { SC_(7.0), SC_(-7.2500), SC_(3.3035269585510030650375087453009371e8) }, { SC_(7.0), SC_(-6.7500), SC_(3.3035269585485817969386206988585281e8) }, { SC_(7.0), SC_(-6.2500), SC_(3.3035269585444002902560781621765444e8) }, { SC_(7.0), SC_(-5.7500), SC_(3.3035269585368867935011094629708018e8) }, { SC_(7.0), SC_(-5.2500), SC_(3.3035269585227536550842381621765444e8) }, { SC_(7.0), SC_(-4.7500), SC_(3.3035269584947086190323815702711063e8) }, { SC_(7.0), SC_(-4.2500), SC_(3.3035269584354251332378488235637904e8) }, { SC_(7.0), SC_(-3.7500), SC_(3.3035269583002256126086884537779074e8) }, { SC_(7.0), SC_(-3.2500), SC_(3.3035269579619261006329391884897976e8) }, { SC_(7.0), SC_(-2.7500), SC_(3.3035269570114408444331054633801022e8) }, { SC_(7.0), SC_(-2.2500), SC_(3.3035269539127781220563177006740899e8) }, { SC_(7.0), SC_(-1.7500), SC_(3.3035269416026348990428605870784761e8) }, { SC_(7.0), SC_(-1.2500), SC_(3.3035268771818605685450990413016373e8) }, { SC_(7.0), SC_(-0.75000), SC_(3.3035263686402030648824099487997220e8) }, { SC_(7.0), SC_(-0.25000), SC_(3.3035184214649965685450990413016373e8) }, + { SC_(8.0), SC_(-7.7500), SC_(-1.0569114259666913771892699180522388e10) }, { SC_(8.0), SC_(-7.2500), SC_(1.0569114259666319911021283350705169e10) }, { SC_(8.0), SC_(-6.7500), SC_(-1.0569114259667313537290849324034796e10) }, { SC_(8.0), SC_(-6.2500), SC_(1.0569114259665591328976435838084546e10) }, { SC_(8.0), SC_(-5.7500), SC_(-1.0569114259668699611772332137177045e10) }, { SC_(8.0), SC_(-5.2500), SC_(1.0569114259662820559674440318084546e10) }, { SC_(8.0), SC_(-4.7500), SC_(-1.0569114259674567879524502974422220e10) }, { SC_(8.0), SC_(-4.2500), SC_(1.0569114259649513356345466704581650e10) }, { SC_(8.0), SC_(-3.7500), SC_(-1.0569114259707322912185335499305285e10) }, { SC_(8.0), SC_(-3.2500), SC_(1.0569114259560384126678660185038311e10) }, { SC_(8.0), SC_(-2.7500), SC_(-1.0569114259982263662729459870590150e10) }, { SC_(8.0), SC_(-2.2500), SC_(1.0569114258563670778105953357268290e10) }, { SC_(8.0), SC_(-1.7500), SC_(-1.0569114264464825392297531107332441e10) }, { SC_(8.0), SC_(-1.2500), SC_(1.0569114231281566759079742278380307e10) }, { SC_(8.0), SC_(-0.75000), SC_(-1.0569114526390508516485165684831300e10) }, { SC_(8.0), SC_(-0.25000), SC_(1.0569108819622773799079742278380307e10) }, + { SC_(9.0), SC_(-7.7500), SC_(3.8051374324233954962308727459400485e11) }, { SC_(9.0), SC_(-7.2500), SC_(3.8051374324233938918730928010849146e11) }, { SC_(9.0), SC_(-6.7500), SC_(3.8051374324233908537939910023379690e11) }, { SC_(9.0), SC_(-6.2500), SC_(3.8051374324233848474063291767903138e11) }, { SC_(9.0), SC_(-5.7500), SC_(3.8051374324233723728009045648294056e11) }, { SC_(9.0), SC_(-5.2500), SC_(3.8051374324233449483283804413023138e11) }, { SC_(9.0), SC_(-4.7500), SC_(3.8051374324232805216534792821594812e11) }, { SC_(9.0), SC_(-4.2500), SC_(3.8051374324231168248427408936422641e11) }, { SC_(9.0), SC_(-3.7500), SC_(3.8051374324226598999820108764248547e11) }, { SC_(9.0), SC_(-3.2500), SC_(3.8051374324212293823321496967578170e11) }, { SC_(9.0), SC_(-2.7500), SC_(3.8051374324160613219689518915140179e11) }, { SC_(9.0), SC_(-2.2500), SC_(3.8051374323936280896024439692195702e11) }, { SC_(9.0), SC_(-1.7500), SC_(3.8051374322693593017285422874024520e11) }, { SC_(9.0), SC_(-1.2500), SC_(3.8051374313023439288413955260640509e11) }, { SC_(9.0), SC_(-0.75000), SC_(3.8051374187988955981988925091310821e11) }, { SC_(9.0), SC_(-0.25000), SC_(3.8051370416629108357213955260640509e11) }, { SC_(10.0), SC_(-7.7500), SC_(-1.5220204740668341333676731352020598e13)}, { SC_(10.0), SC_(-7.2500), SC_(1.5220204740668340669650877835677384e13) }, { SC_(10.0), SC_(-6.7500), SC_(-1.5220204740668341932700845125388608e13) }, { SC_(10.0), SC_(-6.2500), SC_(1.5220204740668339422138220784050543e13) }, { SC_(10.0), SC_(-5.7500), SC_(-1.5220204740668344670625746819834321e13) }, { SC_(10.0), SC_(-5.2500), SC_(1.5220204740668333038285748986372463e13) }, { SC_(10.0), SC_(-4.7500), SC_(-1.5220204740668360644738342521168221e13) }, { SC_(10.0), SC_(-4.2500), SC_(1.5220204740668289586193246215389596e13) }, { SC_(10.0), SC_(-3.7500), SC_(-1.5220204740668491301932335869743932e13) }, { SC_(10.0), SC_(-3.2500), SC_(1.5220204740667845482073107110240315e13) }, { SC_(10.0), SC_(-2.7500), SC_(-1.5220204740670250922735818265720155e13) }, { SC_(10.0), SC_(-2.2500), SC_(1.5220204740659352776617813040228546e13) }, { SC_(10.0), SC_(-1.7500), SC_(-1.5220204740723597111914149030851634e13) }, { SC_(10.0), SC_(-1.2500), SC_(1.5220204740174337594057347065492760e13) }, { SC_(10.0), SC_(-0.75000), SC_(-1.5220204748421004942502520332720988e13) }, { SC_(10.0), SC_(-0.25000), SC_(1.5220204428462791119561347065492760e13) }, { SC_(11.0), SC_(-7.7500), SC_(6.6969403856797204470999075620782555e14)}, { SC_(11.0), SC_(-7.2500), SC_(6.6969403856797204443997065278152669e14) }, { SC_(11.0), SC_(-6.7500), SC_(6.6969403856797204385976298181981934e14) }, { SC_(11.0), SC_(-6.2500), SC_(6.6969403856797204254719282828940321e14) }, { SC_(11.0), SC_(-5.7500), SC_(6.6969403856797203939795943831775966e14) }, { SC_(11.0), SC_(-5.2500), SC_(6.6969403856797203131161247792548979e14) }, { SC_(11.0), SC_(-4.7500), SC_(6.6969403856797200883878751610651220e14) }, { SC_(11.0), SC_(-4.2500), SC_(6.6969403856797194026913294831009712e14) }, { SC_(11.0), SC_(-3.7500), SC_(6.6969403856797170626423300519402108e14) }, { SC_(11.0), SC_(-3.2500), SC_(6.6969403856797079082317494121441662e14) }, { SC_(11.0), SC_(-2.7500), SC_(6.6969403856796654470987612349915749e14) }, { SC_(11.0), SC_(-2.2500), SC_(6.6969403856794204628163394590053064e14) }, { SC_(11.0), SC_(-1.7500), SC_(6.6969403856775315995316280043863158e14) }, { SC_(11.0), SC_(-1.2500), SC_(6.6969403856557086094467166780182235e14) }, { SC_(11.0), SC_(-0.75000), SC_(6.6969403851936945358946446654116707e14) }, { SC_(11.0), SC_(-0.25000), SC_(6.6969403582250925196910686780182235e14) }, { SC_(12.0), SC_(-7.7500), SC_(-3.2145233093874118337222380549030432e16)}, { SC_(12.0), SC_(-7.2500), SC_(3.2145233093874118336089459241510371e16) }, { SC_(12.0), SC_(-6.7500), SC_(-3.2145233093874118338538862264211861e16) }, { SC_(12.0), SC_(-6.2500), SC_(3.2145233093874118332956585600971684e16) }, { SC_(12.0), SC_(-5.7500), SC_(-3.2145233093874118346470957452659967e16) }, { SC_(12.0), SC_(-5.2500), SC_(3.2145233093874118311384271328272970e16) }, { SC_(12.0), SC_(-4.7500), SC_(-3.2145233093874118410246620594666049e16) }, { SC_(12.0), SC_(-4.2500), SC_(3.2145233093874118103287175260580644e16) }, { SC_(12.0), SC_(-3.7500), SC_(-3.2145233093874119174645495148550237e16) }, { SC_(12.0), SC_(-3.2500), SC_(3.2145233093874114857792705593486958e16) }, { SC_(12.0), SC_(-2.7500), SC_(-3.2145233093874135691619437169973801e16) }, { SC_(12.0), SC_(-2.2500), SC_(3.2145233093874008724100861918481841e16) }, { SC_(12.0), SC_(-1.7500), SC_(-3.2145233093875066825103277125147005e16) }, { SC_(12.0), SC_(-1.2500), SC_(3.2145233093861362402303729768622063e16) }, { SC_(12.0), SC_(-0.75000), SC_(-3.2145233094206840811597208557586761e16) }, { SC_(12.0), SC_(-0.25000), SC_(3.2145233067527970956138307688622063e16) }, @@ -160,6 +160,15 @@ void test_polygamma(T, const char* name) { SC_(2.0), SC_(-9.5), SC_(-0.0099751442477151692853059194570941025) }, { SC_(4.0), SC_(-9.5), SC_(-0.00059506011900940675655749713967447346) }, { SC_(6.0), SC_(-9.5), SC_(-0.00011794286977626608581527674104044053) }, { SC_(8.0), SC_(-9.5), SC_(-0.000048934615584055214532361558113243801) }, { SC_(10.0), SC_(-9.5), SC_(-0.000034696555222805555969152083201249795) }, { SC_(12.0), SC_(-9.5), SC_(-0.000037470635416758472254487967117333555) }, { SC_(14.0), SC_(-9.5), SC_(-0.000057218576281198884425118075685027774) }, { SC_(16.0), SC_(-9.5), SC_(-0.00011728023376485851827598955099805232) }, { SC_(18.0), SC_(-9.5), SC_(-0.00031049110045758006635527458576736345) }, { SC_(20.0), SC_(-9.5), SC_(-0.0010307637762451416598018081796345932) }, { SC_(2.0), SC_(-9.5367431640625000000000000000000000e-7), SC_(2.3058430092136939495958800005662742e18) }, { SC_(2.0), SC_(-4.7683715820312500000000000000000000e-7), SC_(1.8446744073709551613595883097126372e19) }, { SC_(2.0), SC_(-2.3841857910156250000000000000000000e-7), SC_(1.4757395258967641292559588464540430e20) }, { SC_(2.0), SC_(-1.1920928955078125000000000000000000e-7), SC_(1.1805916207174113034215958854195427e21) }, { SC_(2.0), SC_(-5.9604644775390625000000000000000000e-8), SC_(9.4447329657392904273895958858066118e21) }, { SC_(2.0), SC_(-2.9802322387695312500000000000000000e-8), SC_(7.5557863725914323419133595886000146e22) }, { SC_(2.0), SC_(-1.4901161193847656250000000000000000e-8), SC_(6.0446290980731458735308559588609691e23) }, { SC_(2.0), SC_(-7.4505805969238281250000000000000000e-9), SC_(4.8357032784585166988247015958861453e24) }, { SC_(2.0), SC_(-3.7252902984619140625000000000000000e-9), SC_(3.8685626227668133590597629595886169e25) }, { SC_(2.0), SC_(-1.8626451492309570312500000000000000e-9), SC_(3.0948500982134506872478105359588618e26) }, { SC_(2.0), SC_(-9.3132257461547851562500000000000000e-10), SC_(2.4758800785707605497982484455958862e27) }, { SC_(2.0), SC_(-4.6566128730773925781250000000000000e-10), SC_(1.9807040628566084398385987581595886e28) }, { SC_(2.0), SC_(-2.3283064365386962890625000000000000e-10), SC_(1.5845632502852867518708790066959589e29) }, { SC_(2.0), SC_(-1.1641532182693481445312500000000000e-10), SC_(1.2676506002282294014967032053735959e30) }, { SC_(2.0), SC_(-5.8207660913467407226562500000000000e-11), SC_(1.0141204801825835211973625643005596e31) }, { SC_(2.0), SC_(-2.9103830456733703613281250000000000e-11), SC_(8.1129638414606681695789005144061596e31) }, { SC_(2.0), SC_(-1.4551915228366851806640625000000000e-11), SC_(6.4903710731685345356631204115250960e32) }, { SC_(2.0), SC_(-7.2759576141834259033203125000000000e-12), SC_(5.1922968585348276285304963292200936e33) }, { SC_(2.0), SC_(-3.6379788070917129516601562500000000e-12), SC_(4.1538374868278621028243970633760766e34) }, { SC_(2.0), SC_(-1.8189894035458564758300781250000000e-12), SC_(3.3230699894622896822595176507008614e35) }, { SC_(2.0), SC_(-9.0949470177292823791503906250000000e-13), SC_(2.6584559915698317458076141205606891e36) }, { SC_(2.0), SC_(-4.5474735088646411895751953125000000e-13), SC_(2.1267647932558653966460912964485513e37) }, { SC_(2.0), SC_(-2.2737367544323205947875976562500000e-13), SC_(1.7014118346046923173168730371588411e38) }, { SC_(2.0), SC_(-1.1368683772161602973937988281250000e-13), SC_(1.3611294676837538538534984297270728e39) }, { SC_(2.0), SC_(-5.6843418860808014869689941406250000e-14), SC_(1.0889035741470030830827987437816583e40) }, { SC_(2.0), SC_(-2.8421709430404007434844970703125000e-14), SC_(8.7112285931760246646623899502532662e40) }, { SC_(2.0), SC_(-1.4210854715202003717422485351562500e-14), SC_(6.9689828745408197317299119602026130e41) }, { SC_(2.0), SC_(-7.1054273576010018587112426757812500e-15), SC_(5.5751862996326557853839295681620904e42) }, { SC_(2.0), SC_(-3.5527136788005009293556213378906250e-15), SC_(4.4601490397061246283071436545296723e43) }, { SC_(2.0), SC_(-1.7763568394002504646778106689453125e-15), SC_(3.5681192317648997026457149236237378e44) }, { SC_(2.0), SC_(-8.8817841970012523233890533447265625e-16), SC_(2.8544953854119197621165719388989903e45) }, { SC_(2.0), SC_(-4.4408920985006261616945266723632812e-16), SC_(2.2835963083295358096932575511191922e46) }, { SC_(2.0), SC_(-2.2204460492503130808472633361816406e-16), SC_(1.8268770466636286477546060408953538e47) }, { SC_(2.0), SC_(-1.1102230246251565404236316680908203e-16), SC_(1.4615016373309029182036848327162830e48) }, { SC_(2.0), SC_(-5.5511151231257827021181583404541016e-17), SC_(1.1692013098647223345629478661730264e49) }, { SC_(2.0), SC_(-2.7755575615628913510590791702270508e-17), SC_(9.3536104789177786765035829293842113e49) }, { SC_(2.0), SC_(-1.3877787807814456755295395851135254e-17), SC_(7.4828883831342229412028663435073691e50) }, { SC_(2.0), SC_(-6.9388939039072283776476979255676270e-18), SC_(5.9863107065073783529622930748058952e51) }, { SC_(2.0), SC_(-3.4694469519536141888238489627838135e-18), SC_(4.7890485652059026823698344598447162e52) }, { SC_(2.0), SC_(-1.7347234759768070944119244813919067e-18), SC_(3.8312388521647221458958675678757730e53) }, { SC_(2.0), SC_(-8.6736173798840354720596224069595337e-19), SC_(3.0649910817317777167166940543006184e54) }, { SC_(2.0), SC_(-4.3368086899420177360298112034797668e-19), SC_(2.4519928653854221733733552434404947e55) }, { SC_(2.0), SC_(-2.1684043449710088680149056017398834e-19), SC_(1.9615942923083377386986841947523958e56) }, { SC_(2.0), SC_(-1.0842021724855044340074528008699417e-19), SC_(1.5692754338466701909589473558019166e57) }, { SC_(2.0), SC_(-5.4210108624275221700372640043497086e-20), SC_(1.2554203470773361527671578846415333e58) }, { SC_(2.0), SC_(-2.7105054312137610850186320021748543e-20), SC_(1.0043362776618689222137263077132266e59) }, { SC_(2.0), SC_(-1.3552527156068805425093160010874271e-20), SC_(8.0346902212949513777098104617058130e59) }, { SC_(2.0), SC_(-6.7762635780344027125465800054371357e-21), SC_(6.4277521770359611021678483693646504e60) }, { SC_(2.0), SC_(-3.3881317890172013562732900027185678e-21), SC_(5.1422017416287688817342786954917203e61) }, { SC_(3.0), SC_(-9.5367431640625000000000000000000000e-7), SC_(7.2535549176877750482370624939631357e24) }, { SC_(3.0), SC_(-4.7683715820312500000000000000000000e-7), SC_(1.1605687868300440077179290249395127e26) }, { SC_(3.0), SC_(-2.3841857910156250000000000000000000e-7), SC_(1.8569100589280704123486863424939453e27) }, { SC_(3.0), SC_(-1.1920928955078125000000000000000000e-7), SC_(2.9710560942849126597578981382493942e28) }, { SC_(3.0), SC_(-5.9604644775390625000000000000000000e-8), SC_(4.7536897508558602556126370202249394e29) }, { SC_(3.0), SC_(-2.9802322387695312500000000000000000e-8), SC_(7.6059036013693764089802192322624939e30) }, { SC_(3.0), SC_(-1.4901161193847656250000000000000000e-8), SC_(1.2169445762191002254368350771610249e32) }, { SC_(3.0), SC_(-7.4505805969238281250000000000000000e-9), SC_(1.9471113219505603606989361234575425e33) }, { SC_(3.0), SC_(-3.7252902984619140625000000000000000e-9), SC_(3.1153781151208965771182977975320582e34) }, { SC_(3.0), SC_(-1.8626451492309570312500000000000000e-9), SC_(4.9846049841934345233892764760512922e35) }, { SC_(3.0), SC_(-9.3132257461547851562500000000000000e-10), SC_(7.9753679747094952374228423616820675e36) }, { SC_(3.0), SC_(-4.6566128730773925781250000000000000e-10), SC_(1.2760588759535192379876547778691308e38) }, { SC_(3.0), SC_(-2.3283064365386962890625000000000000e-10), SC_(2.0416942015256307807802476445906093e39) }, { SC_(3.0), SC_(-1.1641532182693481445312500000000000e-10), SC_(3.2667107224410092492483962313449748e40) }, { SC_(3.0), SC_(-5.8207660913467407226562500000000000e-11), SC_(5.2267371559056147987974339701519597e41) }, { SC_(3.0), SC_(-2.9103830456733703613281250000000000e-11), SC_(8.3627794494489836780758943522431356e42) }, { SC_(3.0), SC_(-1.4551915228366851806640625000000000e-11), SC_(1.3380447119118373884921430963589017e44) }, { SC_(3.0), SC_(-7.2759576141834259033203125000000000e-12), SC_(2.1408715390589398215874289541742427e45) }, { SC_(3.0), SC_(-3.6379788070917129516601562500000000e-12), SC_(3.4253944624943037145398863266787883e46) }, { SC_(3.0), SC_(-1.8189894035458564758300781250000000e-12), SC_(5.4806311399908859432638181226860613e47) }, { SC_(3.0), SC_(-9.0949470177292823791503906250000000e-13), SC_(8.7690098239854175092221089962976981e48) }, { SC_(3.0), SC_(-4.5474735088646411895751953125000000e-13), SC_(1.4030415718376668014755374394076317e50) }, { SC_(3.0), SC_(-2.2737367544323205947875976562500000e-13), SC_(2.2448665149402668823608599030522107e51) }, { SC_(3.0), SC_(-1.1368683772161602973937988281250000e-13), SC_(3.5917864239044270117773758448835371e52) }, { SC_(3.0), SC_(-5.6843418860808014869689941406250000e-14), SC_(5.7468582782470832188438013518136594e53) }, { SC_(3.0), SC_(-2.8421709430404007434844970703125000e-14), SC_(9.1949732451953331501500821629018551e54) }, { SC_(3.0), SC_(-1.4210854715202003717422485351562500e-14), SC_(1.4711957192312533040240131460642968e56) }, { SC_(3.0), SC_(-7.1054273576010018587112426757812500e-15), SC_(2.3539131507700052864384210337028749e57) }, { SC_(3.0), SC_(-3.5527136788005009293556213378906250e-15), SC_(3.7662610412320084583014736539245998e58) }, { SC_(3.0), SC_(-1.7763568394002504646778106689453125e-15), SC_(6.0260176659712135332823578462793598e59) }, { SC_(3.0), SC_(-8.8817841970012523233890533447265625e-16), SC_(9.6416282655539416532517725540469756e60) }, { SC_(3.0), SC_(-4.4408920985006261616945266723632812e-16), SC_(1.5426605224886306645202836086475161e62) }, { SC_(3.0), SC_(-2.2204460492503130808472633361816406e-16), SC_(2.4682568359818090632324537738360258e63) }, { SC_(3.0), SC_(-1.1102230246251565404236316680908203e-16), SC_(3.9492109375708945011719260381376412e64) }, { SC_(3.0), SC_(-5.5511151231257827021181583404541016e-17), SC_(6.3187375001134312018750816610202259e65) }, { SC_(3.0), SC_(-2.7755575615628913510590791702270508e-17), SC_(1.0109980000181489923000130657632362e67) }, { SC_(3.0), SC_(-1.3877787807814456755295395851135254e-17), SC_(1.6175968000290383876800209052211778e68) }, { SC_(3.0), SC_(-6.9388939039072283776476979255676270e-18), SC_(2.5881548800464614202880334483538845e69) }, { SC_(3.0), SC_(-3.4694469519536141888238489627838135e-18), SC_(4.1410478080743382724608535173662153e70) }, { SC_(3.0), SC_(-1.7347234759768070944119244813919067e-18), SC_(6.6256764929189412359373656277859444e71) }, { SC_(3.0), SC_(-8.6736173798840354720596224069595337e-19), SC_(1.0601082388670305977499785004457511e73) }, { SC_(3.0), SC_(-4.3368086899420177360298112034797668e-19), SC_(1.6961731821872489563999656007132018e74) }, { SC_(3.0), SC_(-2.1684043449710088680149056017398834e-19), SC_(2.7138770914995983302399449611411228e75) }, { SC_(3.0), SC_(-1.0842021724855044340074528008699417e-19), SC_(4.3422033463993573283839119378257965e76) }, { SC_(3.0), SC_(-5.4210108624275221700372640043497086e-20), SC_(6.9475253542389717254142591005212745e77) }, { SC_(3.0), SC_(-2.7105054312137610850186320021748543e-20), SC_(1.1116040566782354760662814560834039e79) }, { SC_(3.0), SC_(-1.3552527156068805425093160010874271e-20), SC_(1.7785664906851767617060503297334463e80) }, { SC_(3.0), SC_(-6.7762635780344027125465800054371357e-21), SC_(2.8457063850962828187296805275735140e81) }, { SC_(3.0), SC_(-3.3881317890172013562732900027185678e-21), SC_(4.5531302161540525099674888441176224e82) }, + { SC_(124.0), SC_(-1.500), SC_(-2.7249890458922632375522129837125443e157) }, { SC_(124.0), SC_(-2.500), SC_(-1.4769313224896369911103029786543928e139) }, { SC_(124.0), SC_(-3.500), SC_(-3.3597086916687478281510460837686247e125) }, { SC_(124.0), SC_(-4.500), SC_(-4.2907148995777554014718947851654811e114) }, { SC_(124.0), SC_(-5.500), SC_(-3.6618139249627692553752809354502259e105) }, { SC_(124.0), SC_(-6.500), SC_(-6.2403362354301509400433157402892941e97) }, { SC_(124.0), SC_(-7.500), SC_(-1.0011531735317576688720095395178850e91) }, { SC_(124.0), SC_(-8.500), SC_(-9.1710019415963060853316564350633528e84) }, { SC_(124.0), SC_(-9.500), SC_(-3.3822714836539651302726236480037681e79) }, { SC_(124.0), SC_(-10.50), SC_(-3.8962670995991768118677582868234531e74) }, { SC_(124.0), SC_(-11.50), SC_(-1.1591591018132801852584224474253891e70) }, { SC_(124.0), SC_(-12.50), SC_(-7.6948850968760327095578155247202587e65) }, { SC_(124.0), SC_(-13.50), SC_(-1.0161777096507539745875317371106118e62) }, { SC_(124.0), SC_(-14.50), SC_(-2.4354484351409547531920463990216679e58) }, { SC_(124.0), SC_(-15.50), SC_(-9.8321990426222594076174716964878395e54) }, { SC_(124.0), SC_(-16.50), SC_(-6.2882245279340391405004802996498744e51) }, { SC_(124.0), SC_(-17.50), SC_(-6.0534504786126893203140318104359656e48) }, { SC_(124.0), SC_(-18.50), SC_(-8.4019112566928602772066808945728022e45) }, { SC_(124.0), SC_(-19.50), SC_(-1.6209265582255125824031570171026802e43) }, { SC_(124.0), SC_(-20.50), SC_(-4.2125071484047517848318042867661534e40) }, + { SC_(125.0), SC_(-1.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-2.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-3.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-4.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-5.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-6.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-7.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-8.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-9.500), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-10.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-11.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-12.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-13.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-14.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-15.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-16.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-17.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-18.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-19.50), SC_(3.2032092294989705945080639466924596e247) }, { SC_(125.0), SC_(-20.50), SC_(3.2032092294989705945080639466924596e247) }, + { SC_(125.0), SC_(-1.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-2.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-3.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-4.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-5.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-6.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-7.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-8.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-9.5000002384185791015625000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-10.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-11.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-12.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-13.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-14.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-15.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-16.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-17.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-18.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-19.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-20.500000238418579101562500000000000), SC_(3.2032092353263025675858789018286326e247) }, + { SC_(125.0), SC_(-1.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-2.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-3.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-4.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-5.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-6.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-7.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-8.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-9.4999997615814208984375000000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-10.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-11.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-12.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-13.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-14.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-15.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-16.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-17.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-18.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-19.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, { SC_(125.0), SC_(-20.499999761581420898437500000000000), SC_(3.2032092353263025675858789018286326e247) }, + { SC_(124.0), SC_(-1.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-2.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-3.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-4.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-5.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-6.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-7.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-8.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-9.4999997615814208984375000000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-10.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-11.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-12.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-13.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-14.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-15.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-16.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-17.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-18.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-19.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-20.499999761581420898437500000000000), SC_(7.6370459352527012474320227016934851e240) }, + { SC_(124.0), SC_(-1.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-2.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-3.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-4.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-5.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-6.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-7.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-8.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-9.5000002384185791015625000000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-10.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-11.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-12.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-13.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-14.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-15.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-16.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-17.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-18.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-19.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, { SC_(124.0), SC_(-20.500000238418579101562500000000000), SC_(-7.6370459352527012474320227016934851e240) }, + { SC_(1.0), SC_(-0.500), SC_(8.9348022005446793094172454999380756) }, { SC_(2.0), SC_(-0.500), SC_(-0.82879664423431999559633426116029987) }, { SC_(3.0), SC_(-0.500), SC_(193.40909103400243723644033268870511) }, { SC_(4.0), SC_(-0.500), SC_(-3.4742498266672251905359219240334210) }, { SC_(5.0), SC_(-0.500), SC_(15371.113548602435496241755549219359) }, { SC_(6.0), SC_(-0.500), SC_(-43.457923803023286231087958265415698) }, { SC_(7.0), SC_(-0.500), SC_(2.5806802181855980649694862685313201e6) }, { SC_(8.0), SC_(-0.500), SC_(-1059.9617600414264025178879353865365) }, { SC_(9.0), SC_(-0.500), SC_(7.4318457238509742722370782665375996e8) }, { SC_(10.), SC_(-0.500), SC_(-42108.858768975491796771277214753871) }, { SC_(11.), SC_(-0.500), SC_(3.2699873393475880004602936491973290e11) }, { SC_(12.), SC_(-0.500), SC_(-2.4644776094268285475780118302319831e6) }, { SC_(13.), SC_(-0.500), SC_(2.0404703892185195041277151739878551e14) }, { SC_(14.), SC_(-0.500), SC_(-1.9917964814708338071590970890436861e8) }, { SC_(15.), SC_(-0.500), SC_(1.7139949675391451725203269743703670e17) }, { SC_(16.), SC_(-0.500), SC_(-2.1239385116043117742696464301184360e10) }, { SC_(17.), SC_(-0.500), SC_(1.8648265054229230657699496051237022e20) }, { SC_(18.), SC_(-0.500), SC_(-2.8882421804274914449348671586694211e12) }, { SC_(19.), SC_(-0.500), SC_(2.5510826564916635359511595679555294e23) }, { SC_(20.), SC_(-0.500), SC_(-4.8777294946260987363553987421237456e14) }, { SC_(21.), SC_(-0.500), SC_(4.2858188623596794335838558079810850e26) }, + { SC_(1.0), SC_(-0.50000023841857910156250000000000000), SC_(8.9348023981506946089014375825505155) }, { SC_(2.0), SC_(-0.50000023841857910156250000000000000), SC_(-0.82884275655508842604754532179574729) }, { SC_(3.0), SC_(-0.50000023841857910156250000000000000), SC_(193.40909186276501767728859938348815) }, { SC_(4.0), SC_(-0.50000023841857910156250000000000000), SC_(-3.4779145857199327369685563062655118) }, { SC_(5.0), SC_(-0.50000023841857910156250000000000000), SC_(15371.113559036959283359095676640936) }, { SC_(6.0), SC_(-0.50000023841857910156250000000000000), SC_(-44.073205913790411411330389206216025) }, { SC_(7.0), SC_(-0.50000023841857910156250000000000000), SC_(2.5806802184594352176701819301926979e6) }, { SC_(8.0), SC_(-0.50000023841857910156250000000000000), SC_(-1237.1507698016190706446362670415721) }, { SC_(9.0), SC_(-0.50000023841857910156250000000000000), SC_(7.4318457240443082449903207673842183e8) }, { SC_(10.), SC_(-0.50000023841857910156250000000000000), SC_(-120071.43228224150936593763797588950) }, { SC_(11.), SC_(-0.50000023841857910156250000000000000), SC_(3.2699873394114574294629126382636465e11) }, { SC_(12.), SC_(-0.50000023841857910156250000000000000), SC_(-5.1113082699448800419004327980237078e7) }, { SC_(13.), SC_(-0.50000023841857910156250000000000000), SC_(2.0404703892677090523475108203530504e14) }, { SC_(14.), SC_(-0.50000023841857910156250000000000000), SC_(-4.1064004123360078851054877806228941e10) }, { SC_(15.), SC_(-0.50000023841857910156250000000000000), SC_(1.7139949675921973682361201187974158e17) }, { SC_(16.), SC_(-0.50000023841857910156250000000000000), SC_(-4.4482167955078907488604509935932075e13) }, { SC_(17.), SC_(-0.50000023841857910156250000000000000), SC_(1.8648265054954360818722434334340996e20) }, { SC_(18.), SC_(-0.50000023841857910156250000000000000), SC_(-6.0825438456286690418846111378451293e16) }, { SC_(19.), SC_(-0.50000023841857910156250000000000000), SC_(2.5510826566134749972709942636451521e23) }, { SC_(20.), SC_(-0.50000023841857910156250000000000000), SC_(-1.0218237211995580504353583819436291e20) }, { SC_(21.), SC_(-0.50000023841857910156250000000000000), SC_(4.2858188626062237162861505116019247e26) }, + { SC_(1.0), SC_(-0.49999976158142089843750000000000000), SC_(8.9348020029496580439061915046847633) }, { SC_(2.0), SC_(-0.49999976158142089843750000000000000), SC_(-0.82875053191374905338324754695139008) }, { SC_(3.0), SC_(-0.49999976158142089843750000000000000), SC_(193.40909020611360344139301017638823) }, { SC_(4.0), SC_(-0.49999976158142089843750000000000000), SC_(-3.4705850676169879410688441586536334) }, { SC_(5.0), SC_(-0.49999976158142089843750000000000000), SC_(15371.113538314606395712740903053532) }, { SC_(6.0), SC_(-0.49999976158142089843750000000000000), SC_(-42.842641692316412901148012739850716) }, { SC_(7.0), SC_(-0.49999976158142089843750000000000000), SC_(2.5806802179540060642078552424908302e6) }, { SC_(8.0), SC_(-0.49999976158142089843750000000000000), SC_(-882.77275028362734588789574976519641) }, { SC_(9.0), SC_(-0.49999976158142089843750000000000000), SC_(7.4318457238435175594844592942103986e8) }, { SC_(10.), SC_(-0.49999976158142089843750000000000000), SC_(35853.714744150436439369297880163123) }, { SC_(11.), SC_(-0.49999976158142089843750000000000000), SC_(3.2699873393997058844655604408250598e11) }, { SC_(12.), SC_(-0.49999976158142089843750000000000000), SC_(4.6184127480583821271680125577145403e7) }, { SC_(13.), SC_(-0.49999976158142089843750000000000000), SC_(2.0404703892667592897735663251491103e14) }, { SC_(14.), SC_(-0.49999976158142089843750000000000000), SC_(4.0665644827064704770358560360332387e10) }, { SC_(15.), SC_(-0.49999976158142089843750000000000000), SC_(1.7139949675920960909557128308150980e17) }, { SC_(16.), SC_(-0.49999976158142089843750000000000000), SC_(4.4439689184846657075559083382657063e13) }, { SC_(17.), SC_(-0.49999976158142089843750000000000000), SC_(1.8648265054954223096603082369745267e20) }, { SC_(18.), SC_(-0.49999976158142089843750000000000000), SC_(6.0819661971925807709274166342293111e16) }, { SC_(19.), SC_(-0.49999976158142089843750000000000000), SC_(2.5510826566134726713883235580466596e23) }, { SC_(20.), SC_(-0.49999976158142089843750000000000000), SC_(1.0218139657405687413065653078640133e20) }, { SC_(21.), SC_(-0.49999976158142089843750000000000000), SC_(4.2858188626062232387116210610555278e26) }, } }; do_test_polygamma(neg_data, name, "Mathematica Data - negative arguments"); From 495d4655b4e5ecd0e5a7f6eb4cbd114dd815cfa8 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 17 Nov 2014 18:23:30 +0000 Subject: [PATCH 65/69] [polygamma] remove dead code. --- .../special_functions/detail/polygamma.hpp | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 1baf2f585..bdadc7a8d 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -497,43 +497,6 @@ int index = n - 1; -#if 0 - if(index >= (int)table.size()) - { - // - // We need to compute new coefficients for the cosine terms to the derivative. - // The following code follows immediately from differentiating - // - // C * cos(power * x) * csc^n(power * x) - // - for(int i = table.size(); i <= index; ++i) - { - table.push_back(std::vector((i + 2) / 2, T(0))); - for(int power = (i & 1 ? 0 : 1); power < i; power += 2) - { - dereference_table(table, i, std::abs(1 - power)) += -(power + i + 1) * dereference_table(table, i - 1, power) / 2; - dereference_table(table, i, power + 1) += -(i + 1 - power) * dereference_table(table, i - 1, power) / 2; - } - // - // The coefficients as calculated above grow so large so fast that we scale them all - // by n! And since current order = i+1 just divide each row by that as we create it: - // - for(unsigned j = 0; j < table[i].size(); ++j) - table[i][j] /= (i + 1); - } - } - - int power = n & 1 ? 0 : 1; - T sum = 0; - // - // Compute the sum of the cosine terms: - // - for(unsigned j = 0; j < table[index].size(); ++j) - { - sum += table[index][j] * boost::math::cos_pi(x * power, pol); - power += 2; - } -#else if(index >= (int)table.size()) { for(int i = (int)table.size() - 1; i < index; ++i) @@ -550,7 +513,6 @@ } T sum = boost::math::tools::evaluate_polynomial(&table[index][0], boost::math::cos_pi(x, pol), n); -#endif if(sum == 0) return sum; // From 075f9f893b449d0e5501dadf0ff6b2c3d7fc4f4d Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 18 Nov 2014 18:27:21 +0000 Subject: [PATCH 66/69] [polygamma] Change low order negative-x cases to use new polynomial method. Change expected error rates to match. --- .../special_functions/detail/polygamma.hpp | 179 +++++------------- test/test_polygamma.cpp | 2 +- 2 files changed, 52 insertions(+), 129 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index bdadc7a8d..be80a60dd 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -299,189 +299,112 @@ } case 3: { - T c = boost::math::cos_pi(2 * x, pol); - return -2 * boost::math::pow<3>(constants::pi(), pol) * (c + 2) / boost::math::pow<4>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { T c = boost::math::cos_pi(x, pol); - T c2 = boost::math::cos_pi(2 * x, pol); - return 4 * boost::math::pow<4>(constants::pi(), pol) * (c2 + 5) * c / boost::math::pow<5>(s, pol); + 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: { - T c2 = boost::math::cos_pi(2 * x, pol); - T c4 = boost::math::cos_pi(4 * x, pol); - return -2 * boost::math::pow<5>(constants::pi(), pol) *(26 * c2 + c4 + 33) / boost::math::pow<6>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { T c = boost::math::cos_pi(x, pol); - T c2 = boost::math::cos_pi(2 * x, pol); - T c4 = boost::math::cos_pi(4 * x, pol); - return 4 * boost::math::pow<6>(constants::pi(), pol) * (56 * c2 + c4 + 123) * c / boost::math::pow<7>(s, pol); + 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: { - T c2 = boost::math::cos_pi(2 * x, pol); - T c4 = boost::math::cos_pi(4 * x, pol); - T c6 = boost::math::cos_pi(6 * x, pol); - return -2 * boost::math::pow<7>(constants::pi(), pol) * (1191 * c2 + 120 * c4 + c6 + 1208) / boost::math::pow<8>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { T c = boost::math::cos_pi(x, pol); - T c3 = boost::math::cos_pi(3 * x, pol); - T c5 = boost::math::cos_pi(5 * x, pol); - T c7 = boost::math::cos_pi(7 * x, pol); - return 2 * boost::math::pow<8>(constants::pi(), pol) * (15619 * c + 4293 * c3 + 247 * c5 + c7) / boost::math::pow<9>(s, pol); + 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: { - T c2 = boost::math::cos_pi(2 * x, pol); - T c4 = boost::math::cos_pi(4 * x, pol); - T c6 = boost::math::cos_pi(6 * x, pol); - T c8 = boost::math::cos_pi(8 * x, pol); - return -2 * boost::math::pow<9>(constants::pi(), pol) * (88234 * c2 + 14608 * c4 + 502 * c6 + c8 + 78095) / boost::math::pow<10>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { T c = boost::math::cos_pi(x, pol); - T c3 = boost::math::cos_pi(3 * x, pol); - T c5 = boost::math::cos_pi(5 * x, pol); - T c7 = boost::math::cos_pi(7 * x, pol); - T c9 = boost::math::cos_pi(9 * x, pol); - return 2 * boost::math::pow<10>(constants::pi(), pol) * (1310354 * c + 455192 * c3 + 47840 * c5 + 1013 * c7 + c9) / boost::math::pow<11>(s, pol); + 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: { - T c2 = boost::math::cos_pi(2 * x, pol); - T c4 = boost::math::cos_pi(4 * x, pol); - T c6 = boost::math::cos_pi(6 * x, pol); - T c8 = boost::math::cos_pi(8 * x, pol); - T c10 = boost::math::cos_pi(10 * x, pol); - return -2 * boost::math::pow<11>(constants::pi(), pol) * (7862124 + 9738114 * c2 + 2203488 * c4 + 152637 * c6 + 2036 * c8 + c10) / boost::math::pow<12>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { T c = boost::math::cos_pi(x, pol); - T c3 = boost::math::cos_pi(3 * x, pol); - T c5 = boost::math::cos_pi(5 * x, pol); - T c7 = boost::math::cos_pi(7 * x, pol); - T c9 = boost::math::cos_pi(9 * x, pol); - T c11 = boost::math::cos_pi(11 * x, pol); - return 2 * boost::math::pow<12>(constants::pi(), pol) * (162512286 * c + 66318474 * c3 + 10187685 * c5 + 478271 * c7 + 4083 * c9 + c11) / boost::math::pow<13>(s, pol); - } - case 13: - { - T c2 = boost::math::cos_pi(2 * x, pol); - T c4 = boost::math::cos_pi(4 * x, pol); - T c6 = boost::math::cos_pi(6 * x, pol); - T c8 = boost::math::cos_pi(8 * x, pol); - T c10 = boost::math::cos_pi(10 * x, pol); - T c12 = boost::math::cos_pi(12 * x, pol); - return -2 * boost::math::pow<13>(constants::pi(), pol) * (1137586002 + 1505621508 * c2 + 423281535 * c4 + 45533450 * c6 + 1479726 * c8 + 8178 * c10 + c12) / boost::math::pow<14>(s, pol); + 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); } #ifndef BOOST_NO_LONG_LONG + case 13: + { + T c = boost::math::cos_pi(x, pol); + 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: { T c = boost::math::cos_pi(x, pol); - T c3 = boost::math::cos_pi(3 * x, pol); - T c5 = boost::math::cos_pi(5 * x, pol); - T c7 = boost::math::cos_pi(7 * x, pol); - T c9 = boost::math::cos_pi(9 * x, pol); - T c11 = boost::math::cos_pi(11 * x, pol); - T c13 = boost::math::cos_pi(13 * x, pol); - return 2 * boost::math::pow<14>(constants::pi(), pol) * (27971176092uLL * c + 12843262863uLL * c3 + 2571742175uLL * c5 + 198410786 * c7 + 4537314 * c9 + 16369 * c11 + c13) / boost::math::pow<15>(s, pol); + 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: { - return -2 * boost::math::pow<15>(constants::pi(), pol) * - (223769408736uLL + 311387598411uLL * boost::math::cos_pi(2 * x, pol) - + 102776998928uLL * boost::math::cos_pi(4 * x, pol) - + 15041229521uLL * boost::math::cos_pi(6 * x, pol) - + 848090912 * boost::math::cos_pi(8 * x, pol) - + 13824739 * boost::math::cos_pi(10 * x, pol) - + 32752 * boost::math::cos_pi(12 * x, pol) - + boost::math::cos_pi(14 * x, pol)) / boost::math::pow<16>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { - return 2 * boost::math::pow<16>(constants::pi(), pol) * - (6382798925475uLL * boost::math::cos_pi(x, pol) - + 3207483178157uLL * boost::math::cos_pi(3 * x, pol) - + 782115518299uLL * boost::math::cos_pi(5 * x, pol) - + 85383238549uLL * boost::math::cos_pi(7 * x, pol) - + 3572085255uLL * boost::math::cos_pi(9 * x, pol) - + 41932745 * boost::math::cos_pi(11 * x, pol) - + 65519 * boost::math::cos_pi(13 * x, pol) - + boost::math::cos_pi(15 * x, pol)) / boost::math::pow<17>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { - return -2 * boost::math::pow<17>(constants::pi(), pol) * - (57445190329275uLL + 83137223185370uLL * boost::math::cos_pi(2 * x, pol) - + 31055652948388uLL * boost::math::cos_pi(4 * x, pol) - + 5717291972382uLL * boost::math::cos_pi(6 * x, pol) - + 473353301060uLL * boost::math::cos_pi(8 * x, pol) - + 14875399450uLL * boost::math::cos_pi(10 * x, pol) - + 126781020 * boost::math::cos_pi(12 * x, pol) - + 131054 * boost::math::cos_pi(14 * x, pol) - + boost::math::cos_pi(16 * x, pol)) / boost::math::pow<18>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { - return 2 * boost::math::pow<18>(constants::pi(), pol) * - (1865385657780650uLL * boost::math::cos_pi(x, pol) - + 1006709967915228uLL * boost::math::cos_pi(3 * x, pol) - + 285997074307300uLL * boost::math::cos_pi(5 * x, pol) - + 40457344748072uLL * boost::math::cos_pi(7 * x, pol) - + 2575022097600uLL * boost::math::cos_pi(9 * x, pol) - + 61403313100uLL * boost::math::cos_pi(11 * x, pol) - + 382439924 * boost::math::cos_pi(13 * x, pol) - + 262125 * boost::math::cos_pi(15 * x, pol) - + boost::math::cos_pi(17 * x, pol)) / boost::math::pow<19>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { - return -2 * boost::math::pow<19>(constants::pi(), pol) * - (18653856577806500uLL + 27862280567093358uLL * boost::math::cos_pi(2 * x, pol) - + 11485644635009424uLL * boost::math::cos_pi(4 * x, pol) - + 2527925001876036uLL * boost::math::cos_pi(6 * x, pol) - + 278794377854832uLL * boost::math::cos_pi(8 * x, pol) - + 13796160184500uLL * boost::math::cos_pi(10 * x, pol) - + 251732291184uLL * boost::math::cos_pi(12 * x, pol) - + 1151775897uLL * boost::math::cos_pi(14 * x, pol) - + 524268 * boost::math::cos_pi(16 * x, pol) - + boost::math::cos_pi(18 * x, pol)) / boost::math::pow<20>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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: { - return 2 * boost::math::pow<20>(constants::pi(), pol) * - (679562217794156938uLL * boost::math::cos_pi(x, pol) - + 388588260723953310uLL * boost::math::cos_pi(3 * x, pol) - + 124748182104463860uLL * boost::math::cos_pi(5 * x, pol) - + 21598596303099900uLL * boost::math::cos_pi(7 * x, pol) - + 1879708669896492uLL * boost::math::cos_pi(9 * x, pol) - + 73008517581444uLL * boost::math::cos_pi(11 * x, pol) - + 1026509354985uLL * boost::math::cos_pi(13 * x, pol) - + 3464764515uLL * boost::math::cos_pi(15 * x, pol) - + 1048555 * boost::math::cos_pi(17 * x, pol) - + boost::math::cos_pi(19 * x, pol)) / boost::math::pow<21>(s, pol); - } - case 21: - { - return -2 * boost::math::pow<21>(constants::pi(), pol) * - (7475184395735726318uLL + 11458681306629009100uLL * boost::math::cos_pi(2 * x, pol) - + 5119020713873609970uLL * boost::math::cos_pi(4 * x, pol) - + 1300365805079109480uLL * boost::math::cos_pi(6 * x, pol) - + 179385804170146680uLL * boost::math::cos_pi(8 * x, pol) - + 12446388300682056uLL * boost::math::cos_pi(10 * x, pol) - + 382493246941965uLL * boost::math::cos_pi(12 * x, pol) - + 4168403181210uLL * boost::math::cos_pi(14 * x, pol) - + 10414216090uLL * boost::math::cos_pi(16 * x, pol) - + 2097130 * boost::math::cos_pi(18 * x, pol) - + boost::math::cos_pi(20 * x, pol)) / boost::math::pow<22>(s, pol); + T c = boost::math::cos_pi(x, pol); + 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); } #endif } diff --git a/test/test_polygamma.cpp b/test/test_polygamma.cpp index 7c0ec3b78..c6a6f3950 100644 --- a/test/test_polygamma.cpp +++ b/test/test_polygamma.cpp @@ -40,7 +40,7 @@ void expected_results() ".*", // platform largest_type, // test type(s) ".*negative.*", // test data group - ".*", 4000, 1000); // test function + ".*", 800, 400); // test function if((std::numeric_limits::digits > std::numeric_limits::digits) && (std::numeric_limits::digits - std::numeric_limits::digits < 20)) { From e2cd2e72dc02c0d8ea995af60a7c19c046a3713c Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 20 Nov 2014 09:56:21 +0000 Subject: [PATCH 67/69] [polygamma] Document new method for negative x in code comments, simply some code, change table to coefficients to store only non-zero values. --- .../special_functions/detail/polygamma.hpp | 74 ++++++++++--------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index be80a60dd..27003fc3a 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -116,7 +116,6 @@ if(k > policies::get_max_series_iterations()) { return policies::raise_evaluation_error(function, "Series did not converge, closest value was %1%", sum, pol); - break; } } @@ -230,7 +229,7 @@ // Series acceleration: c = b - c; sum = sum + c * term; - b = (k + nd) * (k - nd) * b / ((k + 0.5) * (k + 1)); + b = (k + nd) * (k - nd) * b / ((k + 0.5f) * (k + 1)); // Termination condition: if(fabs(c * term) < (sum + prefix * d) * boost::math::policies::get_epsilon()) break; @@ -276,133 +275,125 @@ // // The general form of each derivative is: // - // pi^n * SUM{k=0, n} C[k,n] * cos(k * pi * x) * csc^(n+1)(pi * x) + // pi^n * SUM{k=0, n} C[k,n] * cos^k(pi * x) * csc^(n+1)(pi * x) // // With constant C[0,1] = -1 and all other C[k,n] = 0; // Then for each k < n+1: - // C[|1 - k|, n+1] += -(k + n + 2) * C[k, n] / 2; - // C[k + 1, n+1] += -(n + 2 - k) * C[k, n] / 2; + // C[k-1, n+1] -= k * C[k, n]; + // C[k+1, n+1] += (k-n-1) * C[k, n]; // - // It's worth noting however, that as well as requiring quite a bit - // of storage space, this method has no better accuracy than recursion - // on x to x > 0 when computing polygamma :-( + // Note that there are many different ways of representing this derivative thanks to + // the many trigomonetric identies available. In particular, the sum of powers of + // cosines could be replaced by a sum of cosine multiple angles, and indeed if you + // plug the derivative into Mathematica this is the form it will give. The two + // forms are related via the Chebeshev polynomials of the first kind and + // T_n(cos(x)) = cos(n x). The polynomial form has the great advantage that + // all the cosine terms are zero at half integer arguments - right where this + // function has it's minumum - thus avoiding cancellation error in this region. + // + // And finally, since every other term in the polynomials is zero, we can save + // space by only storing the non-zero terms. This greatly complexifies + // subscripting the tables in the calculation, but halves the storage space + // (and complexity for that matter). // 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: { - T c = boost::math::cos_pi(x, pol); return 2 * constants::pi() * constants::pi() * c / boost::math::pow<3>(s, pol); } case 3: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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); } #ifndef BOOST_NO_LONG_LONG case 13: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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: { - T c = boost::math::cos_pi(x, pol); 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); } @@ -410,7 +401,7 @@ } // - // We'll have to compute the corefficients up to n: + // We'll have to compute the coefficients up to n: // #ifdef BOOST_HAS_THREADS static boost::detail::lightweight_mutex m; @@ -424,18 +415,29 @@ { for(int i = (int)table.size() - 1; i < index; ++i) { - int sin_order = i + 2; - table.push_back(std::vector(i + 2, T(0))); - table[i + 1][1] -= sin_order * table[i][0] / (sin_order - 1); - for(int cos_order = 1; cos_order < i + 1; ++cos_order) + int offset = i & 1; // 1 if the first cos power is 0, otherwise 0. + int sin_order = i + 2; // order of the sin term + int max_cos_order = sin_order - 1; // largest order of the polynomial of cos terms + int max_columns = (max_cos_order - offset) / 2; // How many entries there are in the current row. + int next_offset = offset ? 0 : 1; + int next_max_columns = (max_cos_order + 1 - next_offset) / 2; // How many entries there will be in the next row + table.push_back(std::vector(next_max_columns + 1, T(0))); + + for(int column = 0; column <= max_columns; ++column) { - table[i + 1][cos_order + 1] += ((cos_order - sin_order) * table[i][cos_order]) / (sin_order - 1); - table[i + 1][cos_order - 1] += (-cos_order * table[i][cos_order]) / (sin_order - 1); + int cos_order = 2 * column + offset; // order of the cosine term in entry "column" + BOOST_ASSERT(column < table[i].size()); + BOOST_ASSERT((cos_order + 1) / 2 < table[i + 1].size()); + 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_polynomial(&table[index][0], boost::math::cos_pi(x, pol), n); + T sum = boost::math::tools::evaluate_even_polynomial(&table[index][0], c, table[index].size()); + if(index & 1) + sum *= c; // First coeffient is order 1, and really an odd polynomial. if(sum == 0) return sum; // @@ -463,7 +465,7 @@ init() { // Forces initialization of our table of coefficients and mutex: - boost::math::polygamma(30, T(-2.5), Policy()); + boost::math::polygamma(30, T(-2.5f), Policy()); } void force_instantiate()const{} }; From ea950fbd279cb63ad82e8d9e516b9603a1d426f3 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 20 Nov 2014 10:41:26 +0000 Subject: [PATCH 68/69] Synch docs to code. --- doc/equations/polygamma3.mml | 274 +++++------------- doc/equations/polygamma3.png | Bin 13457 -> 6970 bytes doc/equations/polygamma3.svg | 2 +- doc/equations/polygamma7.mml | 99 +++---- doc/equations/polygamma7.png | Bin 8498 -> 7776 bytes doc/equations/polygamma7.svg | 2 +- doc/html/index.html | 2 +- doc/html/indexes/s01.html | 2 +- doc/html/indexes/s02.html | 2 +- doc/html/indexes/s03.html | 2 +- doc/html/indexes/s04.html | 2 +- doc/html/indexes/s05.html | 2 +- doc/html/math_toolkit/conventions.html | 2 +- doc/html/math_toolkit/navigation.html | 2 +- doc/html/math_toolkit/sf_gamma/polygamma.html | 14 +- doc/sf/polygamma.qbk | 10 +- 16 files changed, 149 insertions(+), 268 deletions(-) diff --git a/doc/equations/polygamma3.mml b/doc/equations/polygamma3.mml index 215ecf2bc..3568763aa 100644 --- a/doc/equations/polygamma3.mml +++ b/doc/equations/polygamma3.mml @@ -9,202 +9,86 @@ - - - - - - - - n - - cot - - - π - x - - - - - - - x - n - - - - - - = - - - - - - π - n - - - - - sin - - n - + - 1 - - - - - π - x - - - - - - - - k - = - 0 - - - - - n - - 2 - - 2 - - - - - C - - n - , - k - - - cos - - - - - 1 - + - 2 - k - - - π - x - - - - - ; - - + + + + + n + + cot + + + π + x + + + + + + + x + n + + + + = + + + + π + n + + + + + sin + n - 2 - - - - - - - - - - - = - - - - - - π - n - - - - - sin - - n - + - 1 - - - - - π - x - - - - - - - - C - - n - , - 0 - - - + - - - - k - = - 1 - - - - n - 2 - - - - - C - - n - , - k - - - cos - - - 2 - k - π - x - - - - - - - ; - - - n - 2 - - - - - - + + + 1 + + + + + π + x + + + + + + + + + k + = + 0 + + + n + + 1 + + + + C + + k + , + n + + + cos + + + k + + + + π + n + + diff --git a/doc/equations/polygamma3.png b/doc/equations/polygamma3.png index 156285b330b119a481230b1f04e73ad368fcf464..e3e38511ffdab3b3d86b6e218c296e6feb83907a 100644 GIT binary patch delta 6957 zcmbQ3xywwkGr-TCmrII^fq{Y7)59f*fq^lUfq}u3gN=cKp*MeP)kH;~da3Q6E{-7; zbKcIa+!K5G=JEagcX*UI6&00)Iu~&WZsu}Y;ghvy=B)M=;jUfVmvznBn!hsgLQs}Q z)Y?cN(|*IN0TUG*k6e%tYWZ`|e%{vN@^g2e-%}5T$CnO zso3({1ih_uiSm850vl(w2ln(1<5dxLD_dDXl3doI^Rx2<#4auHcI(PLi?PY-(^ z&uy;*3C7hz5OQec$Q`7Khq-F2?vm`(xzwWhGxX{^_6z=( z)?}3{U7C=_8R{uNYbL{)oazUf4}=!53$$h}(fuG{!2TliY26o=MFDFajasufw%%rq zVBFz;>Fvt9&JEWao;R#Juzb?8X*=i7oDmtG(6MB9k=^@E2l!QN=RL1fUMufud?ttg zLEVD-*n{sX56B&uZE1R)HG;&nq#z?iAbn-G>`^KV(c?t#X$8WQjQ&i%$Hqe{;D?q82o# z-EG*gW@NK^elAe_ zUU%%BVcNE0$y;-}&!1D^x;iVBaiP{r+f<8nUR44T4fd*&C(dS^&a~e9)UQNck;JO4 zzQ@+hXZB{^{`78|;5t@6lM{|{NmXE?7eZB zzrp6Ir!G93{DVh}>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ygamma7.mml b/doc/equations/polygamma7.mml index f96ff49a9..d3ea70c85 100644 --- a/doc/equations/polygamma7.mml +++ b/doc/equations/polygamma7.mml @@ -19,10 +19,13 @@ cos + + + k + - k - x + θ @@ -33,61 +36,14 @@ - x + θ = - 1 - 2 - - - - - - k - + - n - - - cos - - - - - k - - 1 - - - x - - - + - - - n - - k - - - cos - - - - - k - + - 1 - - - x - - - sin @@ -99,11 +55,52 @@ - x + θ + + + + + + k + + n + + + + cos + + n + + + 1 + + + + + θ + + + + k + + cos + + n + + 1 + + + + + θ + + + + + diff --git a/doc/equations/polygamma7.png b/doc/equations/polygamma7.png index f8fdae91d5b000ae0ad7a51533909a2767778be7..36a0c03c8c05f07e8a1964673381c09e7fc814fe 100644 GIT binary patch delta 7769 zcmdnw^uR{3Gr-TCmrII^fq{Y7)59f*fq`)u0|SFG2O9$e!=1Hj+$Spf)XU!Wba4!+ znDcgS`3%vkKabnTGqN%|vbYAYY-~t!RCE&&II>_(uSOZGPZQhGHmTqGSviIq8+AJc z1s8AZR&_hN;GzWgF}Wm9lVdA33Yae1_~h^3kMk1K)6eg%e!r>w{iZYDE1%7*_Mcgt zcJ55&`RM*LJ=ZuqWgBc8^O@Uc-n6e@eP^kRWzmxpflOg5%GkA7jeql0u->py_W}uS ze6!%H(6WZNjn%8}c0!a{MOi1VVthAk%dRE!9%j7#K1bQTPv*2q)LRwZmDU?HKUl|{ zH{q7xS>fP zvv2e#o<753HT$N2aArN*KGuXZbH;e)`gD`r_aG-G|8%>#XwQQ9i8KGMXZo9|#lw8h zeDiOWwd`+HUh*H{(!Bh!xPdS2o6ELMOC}yrJg~y&+NlGxR{mek_}**R?K5)OpLT<+ z?t3brTI_Rh(OaPhzBNYwT9-_fy1ZgZ*`#fgwrpQw+BN02$EAIf%(#Eeiei)6JnU}h}PZb^X@`7w9&b7zG%iTp9hu3v*&xhXRVp>$8fWMgS*qur$Uq5 zyrP!h`U|q^wWDW?=8M2ICbl^&b9i$&W5U<xxn zPjjD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LArC`#&iw&fAXu@*Cy3&y8niOfq}u()z4*}Q$iB}GjJfz diff --git a/doc/equations/polygamma7.svg b/doc/equations/polygamma7.svg index e068a4d0a..2f83cc0b4 100644 --- a/doc/equations/polygamma7.svg +++ b/doc/equations/polygamma7.svg @@ -1,2 +1,2 @@ -xcos(kx)sinn(x)=12(k+n)cos((k1)x)+(nk)cos((k+1)x)sinn+1(x) \ No newline at end of file +xcosk(θ)sinn(θ)=1sinn+1(θ)((kn)cosn+1(θ)kcosn1(θ)) \ No newline at end of file diff --git a/doc/html/index.html b/doc/html/index.html index 2017c71c9..64be12973 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -111,7 +111,7 @@ This manual is also available in -

    Last revised: November 14, 2014 at 17:06:36 GMT

    +

    Last revised: November 20, 2014 at 10:35:49 GMT


    diff --git a/doc/html/indexes/s01.html b/doc/html/indexes/s01.html index d753f84c8..7ed2007d0 100644 --- a/doc/html/indexes/s01.html +++ b/doc/html/indexes/s01.html @@ -24,7 +24,7 @@

    -Function Index

    +Function Index

    A B C D E F G H I J K L M N O P Q R S T U V Z

    diff --git a/doc/html/indexes/s02.html b/doc/html/indexes/s02.html index 153e14e32..08a77ab5a 100644 --- a/doc/html/indexes/s02.html +++ b/doc/html/indexes/s02.html @@ -24,7 +24,7 @@

    -Class Index

    +Class Index

    B C D E F G H I L M N O P Q R S T U W

    diff --git a/doc/html/indexes/s03.html b/doc/html/indexes/s03.html index 64efd0370..7bdc0e8cd 100644 --- a/doc/html/indexes/s03.html +++ b/doc/html/indexes/s03.html @@ -24,7 +24,7 @@

    -Typedef Index

    +Typedef Index

    A B C D E F G H I L N O P R S T U V W

    diff --git a/doc/html/indexes/s04.html b/doc/html/indexes/s04.html index d212d8c6d..bc332ea5b 100644 --- a/doc/html/indexes/s04.html +++ b/doc/html/indexes/s04.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B F

    diff --git a/doc/html/indexes/s05.html b/doc/html/indexes/s05.html index e83adeeb2..005563e7f 100644 --- a/doc/html/indexes/s05.html +++ b/doc/html/indexes/s05.html @@ -23,7 +23,7 @@

    -Index

    +Index

    A B C D E F G H I J K L M N O P Q R S T U V W Z

    diff --git a/doc/html/math_toolkit/conventions.html b/doc/html/math_toolkit/conventions.html index 985f76e85..36b191315 100644 --- a/doc/html/math_toolkit/conventions.html +++ b/doc/html/math_toolkit/conventions.html @@ -27,7 +27,7 @@ Document Conventions

    - +

    This documentation aims to use of the following naming and formatting conventions. diff --git a/doc/html/math_toolkit/navigation.html b/doc/html/math_toolkit/navigation.html index 01e2bc85c..4b912f43f 100644 --- a/doc/html/math_toolkit/navigation.html +++ b/doc/html/math_toolkit/navigation.html @@ -27,7 +27,7 @@ Navigation

    - +

    Boost.Math documentation is provided in both HTML and PDF formats. diff --git a/doc/html/math_toolkit/sf_gamma/polygamma.html b/doc/html/math_toolkit/sf_gamma/polygamma.html index e16218e27..a5528f5ca 100644 --- a/doc/html/math_toolkit/sf_gamma/polygamma.html +++ b/doc/html/math_toolkit/sf_gamma/polygamma.html @@ -181,13 +181,9 @@

    As shown above, error rates are generally very acceptable for moderately - sized arguments. Error rates generally increase with increasing n - - this is particularly true for negative x. Indeed by - the time n=170 the errors are so bad we can no longer - even tell the sign of the result at double - precision. It should also be noted that for large n - the function becomes increasingly badly behaved when x - is negative and is very sensitive to slight changes in input. + sized arguments. Error rates should stay low for exact inputs, however, please + note that the function becomes exceptionally sensitive to small changes in + input for large n and negative x.

    For these reasons results should be treated with extreme @@ -227,6 +223,10 @@

    to generate coefficients for n+1.

    +

    + Note that every other coefficient is zero, and therefore what we have are + even or odd polynomials depending on whether n is even or odd. +

    Once x is positive then we have two methods available to us, for small x we use the series expansion: diff --git a/doc/sf/polygamma.qbk b/doc/sf/polygamma.qbk index 699a45972..1f44e02d2 100644 --- a/doc/sf/polygamma.qbk +++ b/doc/sf/polygamma.qbk @@ -48,11 +48,8 @@ than the one shown will have __zero_error. ] As shown above, error rates are generally very acceptable for moderately sized -arguments. Error rates generally increase with increasing /n/ - this is particularly true -for negative /x/. Indeed by the time -/n=170/ the errors are so bad we can no longer even tell the sign of the result at `double` precision. -It should also be noted that for large /n/ the function becomes increasingly badly behaved -when /x/ is negative and is very sensitive to slight changes in input. +arguments. Error rates should stay low for exact inputs, however, please note that the +function becomes exceptionally sensitive to small changes in input for large n and negative x. [*For these reasons results should be treated with extreme caution when /n/ is large and x negative]. @@ -78,6 +75,9 @@ from ['C[sub 1,0] = -1] and then using to generate coefficients for n+1. +Note that every other coefficient is zero, and therefore what we have are +even or odd polynomials depending on whether n is even or odd. + Once x is positive then we have two methods available to us, for small x we use the series expansion: From a663232f38e971dd573bb5161d7f6519366f0d28 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 22 Nov 2014 18:37:31 +0000 Subject: [PATCH 69/69] [polygamma] Add two special cases for x = 1 and x = 0.5. --- doc/equations/polygamma8.mml | 52 +++++++++++++ doc/equations/polygamma8.png | Bin 0 -> 2767 bytes doc/equations/polygamma8.svg | 2 + doc/equations/polygamma9.mml | 69 ++++++++++++++++++ doc/equations/polygamma9.png | Bin 0 -> 4071 bytes doc/equations/polygamma9.svg | 2 + doc/html/index.html | 2 +- doc/html/indexes/s01.html | 2 +- doc/html/indexes/s02.html | 2 +- doc/html/indexes/s03.html | 2 +- doc/html/indexes/s04.html | 2 +- doc/html/indexes/s05.html | 2 +- doc/html/math_toolkit/conventions.html | 2 +- doc/html/math_toolkit/navigation.html | 2 +- doc/html/math_toolkit/sf_gamma/polygamma.html | 13 +++- doc/sf/polygamma.qbk | 10 ++- .../special_functions/detail/polygamma.hpp | 16 +++- test/test_polygamma.cpp | 2 +- test/test_polygamma.hpp | 6 +- 19 files changed, 173 insertions(+), 15 deletions(-) create mode 100644 doc/equations/polygamma8.mml create mode 100644 doc/equations/polygamma8.png create mode 100644 doc/equations/polygamma8.svg create mode 100644 doc/equations/polygamma9.mml create mode 100644 doc/equations/polygamma9.png create mode 100644 doc/equations/polygamma9.svg diff --git a/doc/equations/polygamma8.mml b/doc/equations/polygamma8.mml new file mode 100644 index 000000000..a76cb5f1c --- /dev/null +++ b/doc/equations/polygamma8.mml @@ -0,0 +1,52 @@ + +]> + +polygamma8 + + + + + + + ψ + + + n + + + + + + 1 + + + = + + + + + 1 + + + + n + + + 1 + + + n + ! + ς + + + n + + + 1 + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma8.png b/doc/equations/polygamma8.png new file mode 100644 index 0000000000000000000000000000000000000000..c39f4f668e58453dc80a6a41f02d4a412eac6310 GIT binary patch literal 2767 zcmeAS@N?(olHy`uVBq!ia0y~yV7SJ>z#z%N#=yYf8+*Z@fq{Xg*vT`5gM)*kh9jke zfq{Xuz$3DlfkCJQgc>t*I;7bhncr0V4trO$q6 zBgMeL<>Tq%7*a9k?VRcj;i00(?c<-m^iVh@UD>&S$<8fU=G}~h3@(jMsi{jfS)=yN z+O%oT3KnVk-djHo)EH#iRjttY=^%Vo{8fe>o3pnjtEeN#hsH%Uzmwl9w-?v%FRuUo zr|!G^rN8Iy+}ywU+pX;NwdW$M*YCY%7rsrC%af^(QEua2mG<`;59)5`i@#eVy7q@i z;%cqi|9L9Z&aY7V$Ko@6OYPLZTNjDW=Mpi~@toXvZd-g#*Y$5~52hbzb^V>~dfM?) z-K46VJlkz5B1UUoFwNtQnZ2lV!j|nz3_n&me3Cx!EhwR5$;HrDce>J?g3LXwr!2_V zf4TesQ^N6I+1s8jdeOC2e}ndi?;>m23-k&mEa^ND^5B`z?&ppAB5yW}9^EKzpyb_C zeQ!Rq^s99j#rhVtZ8hF-=o>rd!EgH;-yKLw5d0u8p;UM}^KX#yRE3q*ugW)n+sJou z_4n*`SN>aeNriJ8 z(ImJ(FoVUkX-S=f`0evo9j+-n;Jy8Rd4@IPjXKNI`PDm@h#t6mK%yzSob7|Wr#iE< zQnr0U^AhDpUzKi$hpf(@Y4}F+>H5`9#|jeoZ|`3{H|?rpP<+DLw^ucz^b>Rn=5DUk zzJ2zevP4ItpXRN#2RJ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>+jF14WzKH= zxN%NmweO!=i4A=l{I%L&8(&vGaeuQ@!NLV!c29Uw*l7OD^0*)q*V1qAW((Uk@;6+c zT(G-wdyal*;_c?f-AQ*%9*BN&e&qTgNN2W@PU@+k7j8G6>F@ntP3c*Z%MrM@np5$q8)Hw!u7`1+ z?#oW}3x1P5t$J7QsR{X!Ydp`hI^FbF6F^Zag1ivF7T5$)caq zCfdy2RC_d7JhsuEX^HW1cgD>eoX4{{Ij`Rr?t6R1Mp*854av-O?9I8BYZ`;YRZHhm3^B%ZXTH)y~TyrUR^_0&n1&Q9TXTN&S^x$6A*Xggy`3ju( z{?1+2cetS}_0=wcMV02v$5URh9plVie%7|F>G3@8S04($d0ZAqSoyX+w)*;dL7Bdr zf7&J}YqNM(3)Vc4zwWi3%Ru&pUS`N%tDgJ2c~g^H-qj0j6W>*mw~}8`=#N37QjO8& zJVQmvzpJZWM0y`7aSV47lFs%GPS>7|8B~cy;a)bA|GE|cRdj3R~xu~ zM~|vcKco81x-?^rAEJlayFY6^k>`=|{;@ARHTaKi +ψ(n)(1)=(1)n+1n!ς(n+1) \ No newline at end of file diff --git a/doc/equations/polygamma9.mml b/doc/equations/polygamma9.mml new file mode 100644 index 000000000..1fd598cfe --- /dev/null +++ b/doc/equations/polygamma9.mml @@ -0,0 +1,69 @@ + +]> + +polygamma9 + + + + + + + ψ + + + n + + + + + + + 1 + 2 + + + + = + + + + + 1 + + + + n + + + 1 + + + n + ! + + + + 2 + + n + + + 1 + + + + 1 + + + ς + + + n + + + 1 + + + + + + \ No newline at end of file diff --git a/doc/equations/polygamma9.png b/doc/equations/polygamma9.png new file mode 100644 index 0000000000000000000000000000000000000000..505ba0e7dd46e44d6e97461e47caab230e761525 GIT binary patch literal 4071 zcmeAS@N?(olHy`uVBq!ia0y~yU{qsZU{K&-V_;y||LSTn0|Ns~v6E*A2L}g74M$1` z0|NtRfk$L91A|Zr2s7SGldoW4V2~_vjVKAuPb(=;EJ|f4FE7{2%*!rLPAo{(%P&f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!PWHpzH+yD0H)j2@*!y38^z0AWNoMc3&D7_VeZT%7l7GkT-uLeJ z^l$uQ+<5Kzg2om6yB4P$&P-aobs@v?OWpg~_sv|p{Y^t~%Va@Vd3rLo|j&=u$9-iX>%=$UAa+c2k#C(iTf|2R6XY_eEVp5XsfX8_2nC< z-dTI3(Ph!&Yj4+StW~!XzHxcu^j}V#$DN)OM|!koYfn7$RXXSYLax((N51WjW=`Lw zl6vf0<$=SQfj^xZRi>O%JXW;bAuMRI(K2?<^v?~g8LGByHFwMIKJoQT7tUU@DsTS; zp;K{+K6{t1`nZ)lv+?8Qyu9>dZl~fKIT+8E?Tk-f=zQtlhQArM_gn=}dhXrvmOVP; z9$Sm&^-X)f+-5v#X1iM`dFOSO+ujDeY$~!$Z&IqyTh(lC(9M;PYtNT{P;h&0z1syx zc5cn6Px^;`cdl;m4S5`2?R{%fKw|%jW0Mc-Jh-i!6%Fbxa!8aMoRaf2xZ^Ib)`XTz zbuD5~WNJ-C|CP^K;?L-PbKi7O7jfay1+$AJRbn}7%=JT5a@}*zR&s9K%l<{@{|vX5 zS@-?-9Pa2ivXWUM^v!~1zFQ3oRc5#`wcpxjFt>i%iL%%|r*x;^vePO5U!rvN;p1)F fRyFg9S^lwC^ZFdSIglIFjc4$5^>bP0l+XkK8@Ji0 literal 0 HcmV?d00001 diff --git a/doc/equations/polygamma9.svg b/doc/equations/polygamma9.svg new file mode 100644 index 000000000..1af965392 --- /dev/null +++ b/doc/equations/polygamma9.svg @@ -0,0 +1,2 @@ + +ψ(n)(12)=(1)n+1n!(2n+11)ς(n+1) \ No newline at end of file diff --git a/doc/html/index.html b/doc/html/index.html index 64be12973..b46ccec43 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -111,7 +111,7 @@ This manual is also available in -

    Last revised: November 20, 2014 at 10:35:49 GMT

    +

    Last revised: November 22, 2014 at 18:29:53 GMT


    diff --git a/doc/html/indexes/s01.html b/doc/html/indexes/s01.html index 7ed2007d0..2b6714bc2 100644 --- a/doc/html/indexes/s01.html +++ b/doc/html/indexes/s01.html @@ -24,7 +24,7 @@

    -Function Index

    +Function Index

    A B C D E F G H I J K L M N O P Q R S T U V Z

    diff --git a/doc/html/indexes/s02.html b/doc/html/indexes/s02.html index 08a77ab5a..706f10955 100644 --- a/doc/html/indexes/s02.html +++ b/doc/html/indexes/s02.html @@ -24,7 +24,7 @@

    -Class Index

    +Class Index

    B C D E F G H I L M N O P Q R S T U W

    diff --git a/doc/html/indexes/s03.html b/doc/html/indexes/s03.html index 7bdc0e8cd..4c84fa6f5 100644 --- a/doc/html/indexes/s03.html +++ b/doc/html/indexes/s03.html @@ -24,7 +24,7 @@

    -Typedef Index

    +Typedef Index

    A B C D E F G H I L N O P R S T U V W

    diff --git a/doc/html/indexes/s04.html b/doc/html/indexes/s04.html index bc332ea5b..fd80d790d 100644 --- a/doc/html/indexes/s04.html +++ b/doc/html/indexes/s04.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B F

    diff --git a/doc/html/indexes/s05.html b/doc/html/indexes/s05.html index 005563e7f..47275e61e 100644 --- a/doc/html/indexes/s05.html +++ b/doc/html/indexes/s05.html @@ -23,7 +23,7 @@

    -Index

    +Index

    A B C D E F G H I J K L M N O P Q R S T U V W Z

    diff --git a/doc/html/math_toolkit/conventions.html b/doc/html/math_toolkit/conventions.html index 36b191315..783456eef 100644 --- a/doc/html/math_toolkit/conventions.html +++ b/doc/html/math_toolkit/conventions.html @@ -27,7 +27,7 @@ Document Conventions

    - +

    This documentation aims to use of the following naming and formatting conventions. diff --git a/doc/html/math_toolkit/navigation.html b/doc/html/math_toolkit/navigation.html index 4b912f43f..307a922db 100644 --- a/doc/html/math_toolkit/navigation.html +++ b/doc/html/math_toolkit/navigation.html @@ -27,7 +27,7 @@ Navigation

    - +

    Boost.Math documentation is provided in both HTML and PDF formats. diff --git a/doc/html/math_toolkit/sf_gamma/polygamma.html b/doc/html/math_toolkit/sf_gamma/polygamma.html index a5528f5ca..013db9e7b 100644 --- a/doc/html/math_toolkit/sf_gamma/polygamma.html +++ b/doc/html/math_toolkit/sf_gamma/polygamma.html @@ -183,7 +183,9 @@ As shown above, error rates are generally very acceptable for moderately sized arguments. Error rates should stay low for exact inputs, however, please note that the function becomes exceptionally sensitive to small changes in - input for large n and negative x. + input for large n and negative x, indeed for cases where n! + would overflow, the function changes directly from -∞ to +∞ somewhere between + each negative integer - these cases are not handled correctly.

    For these reasons results should be treated with extreme @@ -257,6 +259,15 @@

    to make x large enough for the asymptotic expansion to be used.

    +

    + There are also two special cases: +

    +

    + +

    +

    + +

    diff --git a/doc/sf/polygamma.qbk b/doc/sf/polygamma.qbk index 1f44e02d2..873403216 100644 --- a/doc/sf/polygamma.qbk +++ b/doc/sf/polygamma.qbk @@ -49,7 +49,9 @@ than the one shown will have __zero_error. As shown above, error rates are generally very acceptable for moderately sized arguments. Error rates should stay low for exact inputs, however, please note that the -function becomes exceptionally sensitive to small changes in input for large n and negative x. +function becomes exceptionally sensitive to small changes in input for large n and negative x, +indeed for cases where ['n!] would overflow, the function changes directly from -[infin] to ++[infin] somewhere between each negative integer - ['these cases are not handled correctly]. [*For these reasons results should be treated with extreme caution when /n/ is large and x negative]. @@ -99,6 +101,12 @@ For x in-between the two extremes we use the relation: to make x large enough for the asymptotic expansion to be used. +There are also two special cases: + +[equation polygamma8] + +[equation polygamma9] + [endsect][/section:polygamma The Polygamma Function] [/ diff --git a/include/boost/math/special_functions/detail/polygamma.hpp b/include/boost/math/special_functions/detail/polygamma.hpp index 27003fc3a..f9ce7509b 100644 --- a/include/boost/math/special_functions/detail/polygamma.hpp +++ b/include/boost/math/special_functions/detail/polygamma.hpp @@ -426,8 +426,8 @@ for(int column = 0; column <= max_columns; ++column) { int cos_order = 2 * column + offset; // order of the cosine term in entry "column" - BOOST_ASSERT(column < table[i].size()); - BOOST_ASSERT((cos_order + 1) / 2 < table[i + 1].size()); + BOOST_ASSERT(column < (int)table[i].size()); + BOOST_ASSERT((cos_order + 1) / 2 < (int)table[i + 1].size()); 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); @@ -520,6 +520,18 @@ { 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); diff --git a/test/test_polygamma.cpp b/test/test_polygamma.cpp index c6a6f3950..f87ae95c6 100644 --- a/test/test_polygamma.cpp +++ b/test/test_polygamma.cpp @@ -65,7 +65,7 @@ void expected_results() ".*", // platform largest_type, // test type(s) ".*", // test data group - ".*", 20, 10); // test function + ".*", 30, 10); // test function // // Finish off by printing out the compiler/stdlib/platform names, // we do this to make it easier to mark up expected error rates. diff --git a/test/test_polygamma.hpp b/test/test_polygamma.hpp index 74296093f..e7559bf18 100644 --- a/test/test_polygamma.hpp +++ b/test/test_polygamma.hpp @@ -62,7 +62,7 @@ void test_polygamma(T, const char* name) { typedef typename table_type::type value_type; - boost::array, 384> data = + boost::array, 484> data = { { { 1, SC_(0.1250000), SC_(65.388133444988034473142999334395961) }, { 1, SC_(2.250000), SC_(0.55732915450711073927131911933522402) }, { 1, SC_(4.375000), SC_(0.25666408805722660683906428275458774) }, { 1, SC_(6.500000), SC_(0.16628453574995823763989666631218566) }, { 1, SC_(8.625000), SC_(0.12292237374423990274075995315923687) }, { 1, SC_(10.75000), SC_(0.097483848201852104395946001854344927) }, { 1, SC_(12.87500), SC_(0.080764208092843621858393487209278638) }, { 1, SC_(15.00000), SC_(0.068938227847683806226155216756371670) }, { 1, SC_(17.12500), SC_(0.060132263162293455894576107399989891) }, { 1, SC_(19.25000), SC_(0.053320703915617277211139745531295189) }, { 1, SC_(21.37500), SC_(0.047895038036916716105500109226810942) }, { 1, SC_(23.50000), SC_(0.043471416266946770249685779030294199) }, { 1, SC_(25.62500), SC_(0.039795743807625238080963836217545550) }, { 1, SC_(27.75000), SC_(0.036693131333593477569076090983653779) }, { 1, SC_(29.87500), SC_(0.034039266877179098641898178094001935) }, { 1, SC_(32.00000), SC_(0.031743366520302090126581680438741427) }, { 1, SC_(34.12500), SC_(0.029737585673522726661363528635488348) }, { 1, SC_(36.25000), SC_(0.027970204614894933106878169214392067) }, { 1, SC_(38.37500), SC_(0.026401106865951764123858232364900665) }, { 1, SC_(40.50000), SC_(0.024998698201356741322280011143883922) }, { 1, SC_(42.62500), SC_(0.023737757818075642720991864115881164) }, { 1, SC_(44.75000), SC_(0.022597908441287364284087900916682571) }, { 1, SC_(46.87500), SC_(0.021562506914486557632388530071308920) }, { 1, SC_(49.00000), SC_(0.020617826354560516060031453062401102) }, { 1, SC_(51.12500), SC_(0.019752444228552790805040230288386135) }, { 1, SC_(53.25000), SC_(0.018956778300513446216011889734099110) }, { 1, SC_(55.37500), SC_(0.018222730375562878627773770314126276) }, { 1, SC_(57.50000), SC_(0.017543409716574620734228673575882677) }, { 1, SC_(59.62500), SC_(0.016912916093398919581541485278641593) }, { 1, SC_(61.75000), SC_(0.016326167985389235938281994221076159) }, { 1, SC_(63.87500), SC_(0.015778765341125640054231784371915358) }, { 1, SC_(66.00000), SC_(0.015266879048806385777045778219279459) }, { 1, SC_(68.12500), SC_(0.014787161242916062152535888615850260) }, { 1, SC_(70.25000), SC_(0.014336672004276912093324664070489886) }, { 1, SC_(72.37500), SC_(0.013912819061256593888508241399678441) }, { 1, SC_(74.50000), SC_(0.013513307879079644573772830117155790) }, { 1, SC_(76.62500), SC_(0.013136100107643257539226305043251166) }, { 1, SC_(78.75000), SC_(0.012779378799112389298746113446648982) }, { 1, SC_(80.87500), SC_(0.012441519142554280549428650598112729) }, { 1, SC_(83.00000), SC_(0.012121063720980953787190412456820037) }, { 1, SC_(85.12500), SC_(0.011816701495952671887865236708275449) }, { 1, SC_(87.25000), SC_(0.011527249880640584213306489206202069) }, { 1, SC_(89.37500), SC_(0.011251639384481213426240562514542477) }, { 1, SC_(91.50000), SC_(0.010988900409103388104670465071922664) }, { 1, SC_(93.62500), SC_(0.010738151851930343087942933225290955) }, { 1, SC_(95.75000), SC_(0.010498591235178571927709342934117247) }, { 1, SC_(97.87500), SC_(0.010269486127251686167359605922136260) }, { 1, SC_(100.0000), SC_(0.010050166663333571395245668465701423) }, { 2, SC_(0.1250000), -SC_(1025.7533381181356825956689300565174) }, { 2, SC_(2.250000), -SC_(0.30373993753692033333796717884398989) }, { 2, SC_(4.375000), -SC_(0.065528725397877855792664680804766330) }, { 2, SC_(6.500000), -SC_(0.027587910706876798794117450572831562) }, { 2, SC_(8.625000), -SC_(0.015091062676061564388822078971884395) }, { 2, SC_(10.75000), -SC_(0.0094956196449265900776488965631791775) }, { 2, SC_(12.87500), -SC_(0.0065193261909178260169885198194705291) }, { 2, SC_(15.00000), -SC_(0.0047506027165515547467791223768191188) }, { 2, SC_(17.12500), -SC_(0.0036148020016626802195565448384834283) }, { 2, SC_(19.25000), -SC_(0.0028424250740909855631736845850335535) }, { 2, SC_(21.37500), -SC_(0.0022934967923297751145806065882712900) }, { 2, SC_(23.50000), -SC_(0.0018894667868625909895476094900477678) }, { 2, SC_(25.62500), -SC_(0.0015834924252652953218803111387922996) }, { 2, SC_(27.75000), -SC_(0.0013462349527320363170378913859580860) }, { 2, SC_(29.87500), -SC_(0.0011585598948326545653381467670779893) }, { 2, SC_(32.00000), -SC_(0.0010075567602140907392185110593117265) }, { 2, SC_(34.12500), -SC_(0.00088425886906787461365402045268994574) }, { 2, SC_(36.25000), -SC_(0.00078228136778540401396894643668418462) }, { 2, SC_(38.37500), -SC_(0.00069697797537723210697105880606724159) }, { 2, SC_(40.50000), -SC_(0.00062490237932923289658683588812998732) }, { 2, SC_(42.62500), -SC_(0.00056345469641484389456121935536309197) }, { 2, SC_(44.75000), -SC_(0.00051064374134295093656385520125286421) }, { 2, SC_(46.87500), -SC_(0.00046492369550612086723038302919171885) }, { 2, SC_(49.00000), -SC_(0.00042507970884222510504308867471824948) }, { 2, SC_(51.12500), -SC_(0.00039014637079445100439645401142194535) }, { 2, SC_(53.25000), -SC_(0.00035934868438211062777790080207505881) }, { 2, SC_(55.37500), -SC_(0.00033205871518117505559928737076624192) }, { 2, SC_(57.50000), -SC_(0.00030776333242771756953580263456220628) }, { 2, SC_(59.62500), -SC_(0.00028603991345613245802207114123372414) }, { 2, SC_(61.75000), -SC_(0.00026653784162151616772904552992231739) }, { 2, SC_(63.87500), -SC_(0.00024896427102287300629668349085350311) }, { 2, SC_(66.00000), -SC_(0.00023307306946180321476975587412226332) }, { 2, SC_(68.12500), -SC_(0.00021865615382096049855997233359992101) }, { 2, SC_(70.25000), -SC_(0.00020553664405312492990454318541834320) }, { 2, SC_(72.37500), -SC_(0.00019356341228034103704385457246984425) }, { 2, SC_(74.50000), -SC_(0.00018260671130395075946075978013398780) }, { 2, SC_(76.62500), -SC_(0.00017255464497899193114313963889049197) }, { 2, SC_(78.75000), -SC_(0.00016331030013937037094502788633900241) }, { 2, SC_(80.87500), -SC_(0.00015478940207215993505449988937898640) }, { 2, SC_(83.00000), -SC_(0.00014691838710034332570083901051760808) }, { 2, SC_(85.12500), -SC_(0.00013963280957351165370765015817038278) }, { 2, SC_(87.25000), -SC_(0.00013287601856558888563037791437997733) }, { 2, SC_(89.37500), -SC_(0.00012659805332837531702241737466058293) }, { 2, SC_(91.50000), -SC_(0.00012075471712784846612240303590084686) }, { 2, SC_(93.62500), -SC_(0.00011530679728326736002584104318350829) }, { 2, SC_(95.75000), -SC_(0.00011021940561565095981861374083495299) }, { 2, SC_(97.87500), -SC_(0.00010546141852085692313553484671110170) }, { 2, SC_(100.0000), -SC_(0.00010100499983334999700083300446059382) }, @@ -119,7 +119,9 @@ void test_polygamma(T, const char* name) { 9, SC_(0.1250000), SC_(3.8963943320506514766700086867372762e14) }, { 9, SC_(2.250000), SC_(112.10537259293726188704511169205760) }, { 9, SC_(4.375000), SC_(0.16363919906361224458550935569570297) }, { 9, SC_(6.500000), SC_(0.0036236228486465262827554601212241334) }, { 9, SC_(8.625000), SC_(0.00024724827512609608284324030730925865) }, { 9, SC_(10.75000), SC_(0.000031173409615380334086095590039151370) }, { 9, SC_(12.87500), SC_(5.7824557132102074668570643058203530e-6) }, { 9, SC_(15.00000), SC_(1.3980855499116564037825647833211369e-6) }, { 9, SC_(17.12500), SC_(4.1002910484982160273499509487840966e-7) }, { 9, SC_(19.25000), SC_(1.3928434419796988121776758599785632e-7) }, { 9, SC_(21.37500), SC_(5.3108201638858702713365922453188085e-8) }, { 9, SC_(23.50000), SC_(2.2228120959414339842295401083512930e-8) }, { 9, SC_(25.62500), SC_(1.0046019155325212007574589173916857e-8) }, { 9, SC_(27.75000), SC_(4.8421087709589697640039499715706350e-9) }, { 9, SC_(29.87500), SC_(2.4651114661905897591489828702449678e-9) }, { 9, SC_(32.00000), SC_(1.3154897461853304542190391130140025e-9) }, { 9, SC_(34.12500), SC_(7.3134444425276046658844002904667737e-10) }, { 9, SC_(36.25000), SC_(4.2146721224691157996140805304942419e-10) }, { 9, SC_(38.37500), SC_(2.5073387292785072270991813660631786e-10) }, { 9, SC_(40.50000), SC_(1.5344896969374692327054949367251260e-10) }, { 9, SC_(42.62500), SC_(9.6326225603670754883495513330468241e-11) }, { 9, SC_(44.75000), SC_(6.1868579168628392331266656512721531e-11) }, { 9, SC_(46.87500), SC_(4.0570340164556015067828668493424902e-11) }, { 9, SC_(49.00000), SC_(2.7111471879948743580114339016340155e-11) }, { 9, SC_(51.12500), SC_(1.8433178567812423799249519881074934e-11) }, { 9, SC_(53.25000), SC_(1.2733080158190412770374826663936684e-11) }, { 9, SC_(55.37500), SC_(8.9250208887659481803261595053553675e-12) }, { 9, SC_(57.50000), SC_(6.3408264036510339424452353875188095e-12) }, { 9, SC_(59.62500), SC_(4.5615718874164287974321379689375635e-12) }, { 9, SC_(61.75000), SC_(3.3199519699896432328216923633601725e-12) }, { 9, SC_(63.87500), SC_(2.4426063512782352683767956278168985e-12) }, { 9, SC_(66.00000), SC_(1.8153877149006577317987652651306379e-12) }, { 9, SC_(68.12500), SC_(1.3620688165735114474674715908706633e-12) }, { 9, SC_(70.25000), SC_(1.0310696339614726306516051424066462e-12) }, { 9, SC_(72.37500), SC_(7.8705425492600705644491688042239872e-13) }, { 9, SC_(74.50000), SC_(6.0553290145315817804599098427153448e-13) }, { 9, SC_(76.62500), SC_(4.6934676954218461465393390444338856e-13) }, { 9, SC_(78.75000), SC_(3.6634942521175284527379986400237305e-13) }, { 9, SC_(80.87500), SC_(2.8785887689513567008615786864512179e-13) }, { 9, SC_(83.00000), SC_(2.2761232508374172373558791779207099e-13) }, { 9, SC_(85.12500), SC_(1.8105271275784390697733304142062576e-13) }, { 9, SC_(87.25000), SC_(1.4483676610519321733096991924616972e-13) }, { 9, SC_(89.37500), SC_(1.1649247346426341778218700567243322e-13) }, { 9, SC_(91.50000), SC_(9.4178413859615655080323473554582586e-14) }, { 9, SC_(93.62500), SC_(7.6513170761508530170189422972149840e-14) }, { 9, SC_(95.75000), SC_(6.2453415533716351149737976646666822e-14) }, { 9, SC_(97.87500), SC_(5.1206083919072129278059542340974138e-14) }, { 9, SC_(100.0000), SC_(4.2164633350081151607323910418414347e-14) }, { SC_(12.0), SC_(0.1250000), SC_(-2.6333391446175784623707514121843937e20) }, { SC_(12.0), SC_(2.250000), SC_(-12755.934552347367694976392995238872) }, { SC_(12.0), SC_(4.375000), SC_(-2.3995726885358590731215736760290659) }, { SC_(12.0), SC_(6.500000), SC_(-0.015498964669830504389631890538267195) }, { SC_(12.0), SC_(8.625000), SC_(-0.00043875188128348404126256495384460962) }, { SC_(12.0), SC_(10.75000), SC_(-0.000027944407762544917990491373502083128) }, { SC_(12.0), SC_(12.87500), SC_(-2.9683309167523389772660608703858297e-6) }, { SC_(12.0), SC_(15.00000), SC_(-4.4822030612790888239848346241379762e-7) }, { SC_(12.0), SC_(17.12500), SC_(-8.7479493941258027953346726543995677e-8) }, { SC_(12.0), SC_(19.25000), SC_(-2.0757514198487629655709801633624060e-8) }, { SC_(12.0), SC_(21.37500), SC_(-5.7438353740388980670397346200747331e-9) }, { SC_(12.0), SC_(23.50000), SC_(-1.7993432749405246733914335090978470e-9) }, { SC_(12.0), SC_(25.62500), SC_(-6.2435444143873592979499739047338207e-10) }, { SC_(12.0), SC_(27.75000), SC_(-2.3603187097640550778749196581740161e-10) }, { SC_(12.0), SC_(29.87500), SC_(-9.5975541975412793814120279791068637e-11) }, { SC_(12.0), SC_(32.00000), SC_(-4.1552035282000578511439617844316334e-11) }, { SC_(12.0), SC_(34.12500), SC_(-1.8998432787826251814581286958206123e-11) }, { SC_(12.0), SC_(36.25000), SC_(-9.1125382347537588010833133716666482e-12) }, { SC_(12.0), SC_(38.37500), SC_(-4.5599501480319696078145812150042737e-12) }, { SC_(12.0), SC_(40.50000), SC_(-2.3695979124099134723655912747303232e-12) }, { SC_(12.0), SC_(42.62500), SC_(-1.2737626539048915719376237689570656e-12) }, { SC_(12.0), SC_(44.75000), SC_(-7.0592220046106837677774762353832582e-13) }, { SC_(12.0), SC_(46.87500), SC_(-4.0219605264396476495155503895759108e-13) }, { SC_(12.0), SC_(49.00000), SC_(-2.3499370395545407582624144041709511e-13) }, { SC_(12.0), SC_(51.12500), SC_(-1.4049959061173089543038862427082956e-13) }, { SC_(12.0), SC_(53.25000), SC_(-8.5797116983505159074486972598899288e-14) }, { SC_(12.0), SC_(55.37500), SC_(-5.3422568073471069670219359482696794e-14) }, { SC_(12.0), SC_(57.50000), SC_(-3.3867985175935679891876577636637264e-14) }, { SC_(12.0), SC_(59.62500), SC_(-2.1832074877153446073077836903455745e-14) }, { SC_(12.0), SC_(61.75000), SC_(-1.4293240909063248751348970309438269e-14) }, { SC_(12.0), SC_(63.87500), SC_(-9.4937480883301538244379833116307891e-15) }, { SC_(12.0), SC_(66.00000), SC_(-6.3914967852421984438071853365851405e-15) }, { SC_(12.0), SC_(68.12500), SC_(-4.3576413857619763879519099830883388e-15) }, { SC_(12.0), SC_(70.25000), SC_(-3.0063897012087057369199810835484853e-15) }, { SC_(12.0), SC_(72.37500), SC_(-2.0973711510201259912443465435969711e-15) }, { SC_(12.0), SC_(74.50000), SC_(-1.4786311290892013378232248983192765e-15) }, { SC_(12.0), SC_(76.62500), SC_(-1.0527885762581410791135439292370286e-15) }, { SC_(12.0), SC_(78.75000), SC_(-7.5662859409010038912157660753875556e-16) }, { SC_(12.0), SC_(80.87500), SC_(-5.4861427907366815368388985862444385e-16) }, { SC_(12.0), SC_(83.00000), SC_(-4.0113795601837316346341436637916290e-16) }, { SC_(12.0), SC_(85.12500), SC_(-2.9564974628089487210535317533851159e-16) }, { SC_(12.0), SC_(87.25000), SC_(-2.1955682892705039626630737602169576e-16) }, { SC_(12.0), SC_(89.37500), SC_(-1.6422644673043790572542870203840550e-16) }, { SC_(12.0), SC_(91.50000), SC_(-1.2368534305097629421391380808602245e-16) }, { SC_(12.0), SC_(93.62500), SC_(-9.3763732289494543868014071205929613e-17) }, { SC_(12.0), SC_(95.75000), SC_(-7.1526151114554258090139227356676697e-17) }, { SC_(12.0), SC_(97.87500), SC_(-5.4889394969371742548386275256109609e-17) }, { SC_(12.0), SC_(100.0000), SC_(-4.2363681689608104413899863907775333e-17) }, { SC_(21.0), SC_(0.1250000), SC_(3.7698461389048740847200205590867822e39) }, { SC_(21.0), SC_(2.250000), SC_(9.1298158507949915159597719407312508e11) }, { SC_(21.0), SC_(4.375000), SC_(408886.47063811418290988174462904689) }, { SC_(21.0), SC_(6.500000), SC_(69.783498668647519157069128850360732) }, { SC_(21.0), SC_(8.625000), SC_(0.14574011463957290617412866498392900) }, { SC_(21.0), SC_(10.75000), SC_(0.0012181648740805635977027563578320036) }, { SC_(21.0), SC_(12.87500), SC_(0.000024558760763169978336155197432207549) }, { SC_(21.0), SC_(15.00000), SC_(9.0946144696294632279197453808024020e-7) }, { SC_(21.0), SC_(17.12500), SC_(5.2548180764045016519118256734019257e-8) }, { SC_(21.0), SC_(19.25000), SC_(4.2632373548174335144878212855377856e-9) }, { SC_(21.0), SC_(21.37500), SC_(4.5191821412507380972584044138294203e-10) }, { SC_(21.0), SC_(23.50000), SC_(5.9459999472668271337052481421711044e-11) }, { SC_(21.0), SC_(25.62500), SC_(9.3494613148584596286144185433362367e-12) }, { SC_(21.0), SC_(27.75000), SC_(1.7071269974977763414024284983419274e-12) }, { SC_(21.0), SC_(29.87500), SC_(3.5397471216602229335658443914126577e-13) }, { SC_(21.0), SC_(32.00000), SC_(8.1890165923201938880286772740175496e-14) }, { SC_(21.0), SC_(34.12500), SC_(2.0838387642645373192280813068168954e-14) }, { SC_(21.0), SC_(36.25000), SC_(5.7652633708208411748169589666923627e-15) }, { SC_(21.0), SC_(38.37500), SC_(1.7175814132832512497760866952875142e-15) }, { SC_(21.0), SC_(40.50000), SC_(5.4658871187824521586899247607212215e-16) }, { SC_(21.0), SC_(42.62500), SC_(1.8454073409395762586978128093893739e-16) }, { SC_(21.0), SC_(44.75000), SC_(6.5718894398363114531765518843039215e-17) }, { SC_(21.0), SC_(46.87500), SC_(2.4563292426503881973678226160508883e-17) }, { SC_(21.0), SC_(49.00000), SC_(9.5940884241955097871390055431773988e-18) }, { SC_(21.0), SC_(51.12500), SC_(3.9012613551839347983144664217896505e-18) }, { SC_(21.0), SC_(53.25000), SC_(1.6460967024588312755378806948280578e-18) }, { SC_(21.0), SC_(55.37500), SC_(7.1860306265059509271853406338496567e-19) }, { SC_(21.0), SC_(57.50000), SC_(3.2373123407072660945448849676538922e-19) }, { SC_(21.0), SC_(59.62500), SC_(1.5015620637437584782988688648328655e-19) }, { SC_(21.0), SC_(61.75000), SC_(7.1560282337372458319334209159595311e-20) }, { SC_(21.0), SC_(63.87500), SC_(3.4975910507684158405937390693690592e-20) }, { SC_(21.0), SC_(66.00000), SC_(1.7502964214288619731071110181806997e-20) }, { SC_(21.0), SC_(68.12500), SC_(8.9546013195046736291336879943433535e-21) }, { SC_(21.0), SC_(70.25000), SC_(4.6771364193808931649132626805767700e-21) }, { SC_(21.0), SC_(72.37500), SC_(2.4909977030434827195554109631354701e-21) }, { SC_(21.0), SC_(74.50000), SC_(1.3512434774057027230504407213596735e-21) }, { SC_(21.0), SC_(76.62500), SC_(7.4577901408689598214597184764730976e-22) }, { SC_(21.0), SC_(78.75000), SC_(4.1839783582393157943543388920119532e-22) }, { SC_(21.0), SC_(80.87500), SC_(2.3839167824682948660923670294251560e-22) }, { SC_(21.0), SC_(83.00000), SC_(1.3783660126553262954802012537509343e-22) }, { SC_(21.0), SC_(85.12500), SC_(8.0813880329362090238603817798156305e-23) }, { SC_(21.0), SC_(87.25000), SC_(4.8012632134261346749651412145722164e-23) }, { SC_(21.0), SC_(89.37500), SC_(2.8886517006206031302171279370237901e-23) }, { SC_(21.0), SC_(91.50000), SC_(1.7589221011224124901492492436031577e-23) }, { SC_(21.0), SC_(93.62500), SC_(1.0833513342557474766046276358625049e-23) }, { SC_(21.0), SC_(95.75000), SC_(6.7458879620191471687975317800222219e-24) }, { SC_(21.0), SC_(97.87500), SC_(4.2446964227424748308143188339893397e-24) }, { SC_(21.0), SC_(100.0000), SC_(2.6977147877389616650544376447910561e-24) }, - { SC_(30.0), SC_(0.1250000), SC_(-2.6269370855717061268373196091559060e60) }, { SC_(30.0), SC_(2.250000), SC_(-3.2063201132225624894497621128724710e21) }, { SC_(30.0), SC_(4.375000), SC_(-3.5816122065666942298125086110013811e12) }, { SC_(30.0), SC_(6.500000), SC_(-1.6926495147567915305098150929608351e7) }, { SC_(30.0), SC_(8.625000), SC_(-2691.9893080722988179729741180559768) }, { SC_(30.0), SC_(10.75000), SC_(-3.0129827880548721952335149662772758) }, { SC_(30.0), SC_(12.87500), SC_(-0.011679541591944513522798667560485778) }, { SC_(30.0), SC_(15.00000), SC_(-0.00010699799160744992062995477402482814) }, { SC_(30.0), SC_(17.12500), SC_(-1.8412916811312822615145612742242341e-6) }, { SC_(30.0), SC_(19.25000), SC_(-5.1296809753659048984675389168991678e-8) }, { SC_(30.0), SC_(21.37500), SC_(-2.0897092756900426602247473552496515e-9) }, { SC_(30.0), SC_(23.50000), SC_(-1.1575741931670926101304469613657363e-10) }, { SC_(30.0), SC_(25.62500), SC_(-8.2634766034599236789755939810493909e-12) }, { SC_(30.0), SC_(27.75000), SC_(-7.2982420192371959627923444899651880e-13) }, { SC_(30.0), SC_(29.87500), SC_(-7.7259330615365968247618603604357394e-14) }, { SC_(30.0), SC_(32.00000), SC_(-9.5598830564651701596127591449043084e-15) }, { SC_(30.0), SC_(34.12500), SC_(-1.3549801683291963236022185422404195e-15) }, { SC_(30.0), SC_(36.25000), SC_(-2.1637420158752325246771018243486794e-16) }, { SC_(30.0), SC_(38.37500), SC_(-3.8399012944498044530335003629202925e-17) }, { SC_(30.0), SC_(40.50000), SC_(-7.4867790463777103523228388855693400e-18) }, { SC_(30.0), SC_(42.62500), SC_(-1.5882468053156791511681017429675896e-18) }, { SC_(30.0), SC_(44.75000), SC_(-3.6357619494056634364065401737558109e-19) }, { SC_(30.0), SC_(46.87500), SC_(-8.9173782150303341835362824820507660e-20) }, { SC_(30.0), SC_(49.00000), SC_(-2.3289849068324860513642836089935388e-20) }, { SC_(30.0), SC_(51.12500), SC_(-6.4424396179339080523684393804219419e-21) }, { SC_(30.0), SC_(53.25000), SC_(-1.8786312072016996388558435362347671e-21) }, { SC_(30.0), SC_(55.37500), SC_(-5.7508919690939180263189604207862429e-22) }, { SC_(30.0), SC_(57.50000), SC_(-1.8413295011736722141223685570224223e-22) }, { SC_(30.0), SC_(59.62500), SC_(-6.1461867250080302453576793713083061e-23) }, { SC_(30.0), SC_(61.75000), SC_(-2.1324740914631425269500808021967305e-23) }, { SC_(30.0), SC_(63.87500), SC_(-7.6704605421877601246419439338550908e-24) }, { SC_(30.0), SC_(66.00000), SC_(-2.8535639781622817027659809125071790e-24) }, { SC_(30.0), SC_(68.12500), SC_(-1.0955940788660649214956488504913491e-24) }, { SC_(30.0), SC_(70.25000), SC_(-4.3327278415671627426087404900842932e-25) }, { SC_(30.0), SC_(72.37500), SC_(-1.7617839186667213519985857533371320e-25) }, { SC_(30.0), SC_(74.50000), SC_(-7.3539453800410337613851853725254145e-26) }, { SC_(30.0), SC_(76.62500), SC_(-3.1464535209737263958150922875079198e-26) }, { SC_(30.0), SC_(78.75000), SC_(-1.3780503803711969857070836997294630e-26) }, { SC_(30.0), SC_(80.87500), SC_(-6.1703357256500029511495096803651889e-27) }, { SC_(30.0), SC_(83.00000), SC_(-2.8213173028841107933813502855693772e-27) }, { SC_(30.0), SC_(85.12500), SC_(-1.3159280846978733546278731706334709e-27) }, { SC_(30.0), SC_(87.25000), SC_(-6.2549157954995389707945629132366569e-28) }, { SC_(30.0), SC_(89.37500), SC_(-3.0270730786291364371674711274018267e-28) }, { SC_(30.0), SC_(91.50000), SC_(-1.4902791126813033033236323354658204e-28) }, { SC_(30.0), SC_(93.62500), SC_(-7.4578261147126651898615763642561310e-29) }, { SC_(30.0), SC_(95.75000), SC_(-3.7908508349033587121694154134344755e-29) }, { SC_(30.0), SC_(97.87500), SC_(-1.9558790071355202604313002586790408e-29) }, { SC_(30.0), SC_(100.0000), SC_(-1.0236429687189538253202730650097974e-29) } + { SC_(30.0), SC_(0.1250000), SC_(-2.6269370855717061268373196091559060e60) }, { SC_(30.0), SC_(2.250000), SC_(-3.2063201132225624894497621128724710e21) }, { SC_(30.0), SC_(4.375000), SC_(-3.5816122065666942298125086110013811e12) }, { SC_(30.0), SC_(6.500000), SC_(-1.6926495147567915305098150929608351e7) }, { SC_(30.0), SC_(8.625000), SC_(-2691.9893080722988179729741180559768) }, { SC_(30.0), SC_(10.75000), SC_(-3.0129827880548721952335149662772758) }, { SC_(30.0), SC_(12.87500), SC_(-0.011679541591944513522798667560485778) }, { SC_(30.0), SC_(15.00000), SC_(-0.00010699799160744992062995477402482814) }, { SC_(30.0), SC_(17.12500), SC_(-1.8412916811312822615145612742242341e-6) }, { SC_(30.0), SC_(19.25000), SC_(-5.1296809753659048984675389168991678e-8) }, { SC_(30.0), SC_(21.37500), SC_(-2.0897092756900426602247473552496515e-9) }, { SC_(30.0), SC_(23.50000), SC_(-1.1575741931670926101304469613657363e-10) }, { SC_(30.0), SC_(25.62500), SC_(-8.2634766034599236789755939810493909e-12) }, { SC_(30.0), SC_(27.75000), SC_(-7.2982420192371959627923444899651880e-13) }, { SC_(30.0), SC_(29.87500), SC_(-7.7259330615365968247618603604357394e-14) }, { SC_(30.0), SC_(32.00000), SC_(-9.5598830564651701596127591449043084e-15) }, { SC_(30.0), SC_(34.12500), SC_(-1.3549801683291963236022185422404195e-15) }, { SC_(30.0), SC_(36.25000), SC_(-2.1637420158752325246771018243486794e-16) }, { SC_(30.0), SC_(38.37500), SC_(-3.8399012944498044530335003629202925e-17) }, { SC_(30.0), SC_(40.50000), SC_(-7.4867790463777103523228388855693400e-18) }, { SC_(30.0), SC_(42.62500), SC_(-1.5882468053156791511681017429675896e-18) }, { SC_(30.0), SC_(44.75000), SC_(-3.6357619494056634364065401737558109e-19) }, { SC_(30.0), SC_(46.87500), SC_(-8.9173782150303341835362824820507660e-20) }, { SC_(30.0), SC_(49.00000), SC_(-2.3289849068324860513642836089935388e-20) }, { SC_(30.0), SC_(51.12500), SC_(-6.4424396179339080523684393804219419e-21) }, { SC_(30.0), SC_(53.25000), SC_(-1.8786312072016996388558435362347671e-21) }, { SC_(30.0), SC_(55.37500), SC_(-5.7508919690939180263189604207862429e-22) }, { SC_(30.0), SC_(57.50000), SC_(-1.8413295011736722141223685570224223e-22) }, { SC_(30.0), SC_(59.62500), SC_(-6.1461867250080302453576793713083061e-23) }, { SC_(30.0), SC_(61.75000), SC_(-2.1324740914631425269500808021967305e-23) }, { SC_(30.0), SC_(63.87500), SC_(-7.6704605421877601246419439338550908e-24) }, { SC_(30.0), SC_(66.00000), SC_(-2.8535639781622817027659809125071790e-24) }, { SC_(30.0), SC_(68.12500), SC_(-1.0955940788660649214956488504913491e-24) }, { SC_(30.0), SC_(70.25000), SC_(-4.3327278415671627426087404900842932e-25) }, { SC_(30.0), SC_(72.37500), SC_(-1.7617839186667213519985857533371320e-25) }, { SC_(30.0), SC_(74.50000), SC_(-7.3539453800410337613851853725254145e-26) }, { SC_(30.0), SC_(76.62500), SC_(-3.1464535209737263958150922875079198e-26) }, { SC_(30.0), SC_(78.75000), SC_(-1.3780503803711969857070836997294630e-26) }, { SC_(30.0), SC_(80.87500), SC_(-6.1703357256500029511495096803651889e-27) }, { SC_(30.0), SC_(83.00000), SC_(-2.8213173028841107933813502855693772e-27) }, { SC_(30.0), SC_(85.12500), SC_(-1.3159280846978733546278731706334709e-27) }, { SC_(30.0), SC_(87.25000), SC_(-6.2549157954995389707945629132366569e-28) }, { SC_(30.0), SC_(89.37500), SC_(-3.0270730786291364371674711274018267e-28) }, { SC_(30.0), SC_(91.50000), SC_(-1.4902791126813033033236323354658204e-28) }, { SC_(30.0), SC_(93.62500), SC_(-7.4578261147126651898615763642561310e-29) }, { SC_(30.0), SC_(95.75000), SC_(-3.7908508349033587121694154134344755e-29) }, { SC_(30.0), SC_(97.87500), SC_(-1.9558790071355202604313002586790408e-29) }, { SC_(30.0), SC_(100.0000), SC_(-1.0236429687189538253202730650097974e-29) }, + { SC_(1.0), SC_(1.0), SC_(1.6449340668482264364724151666460252) }, { SC_(2.0), SC_(1.0), SC_(-2.4041138063191885707994763230229000) }, { SC_(3.0), SC_(1.0), SC_(6.4939394022668291490960221792470074) }, { SC_(4.0), SC_(1.0), SC_(-24.886266123440878231952771674968820) }, { SC_(5.0), SC_(1.0), SC_(122.08116743813389676574215157491046) }, { SC_(6.0), SC_(1.0), SC_(-726.01147971498443532465423589185367) }, { SC_(7.0), SC_(1.0), SC_(5060.5498752376394704685736020836084) }, { SC_(8.0), SC_(1.0), SC_(-40400.978398747634885327823655450854) }, { SC_(9.0), SC_(1.0), SC_(363240.91142238262680714352556574776) }, { SC_(10.0), SC_(1.0), SC_(-3.6305933116066287129906188428320541e6) }, { SC_(11.0), SC_(1.0), SC_(3.9926622987731086702327073240472015e7) }, { SC_(12.0), SC_(1.0), SC_(-4.7906037988983145242687676449906363e8) }, { SC_(13.0), SC_(1.0), SC_(6.2274021934109717641928534089474159e9) }, { SC_(14.0), SC_(1.0), SC_(-8.7180957830172067845191220310364358e10) }, { SC_(15.0), SC_(1.0), SC_(1.3076943522189138208900999074851102e12) }, { SC_(16.0), SC_(1.0), SC_(-2.0922949679481510906631655688111514e13) }, { SC_(17.0), SC_(1.0), SC_(3.5568878585922371597561239671618245e14) }, { SC_(18.0), SC_(1.0), SC_(-6.4023859228189214007356494533239755e15) }, { SC_(19.0), SC_(1.0), SC_(1.2164521645363939666987669627404138e17) }, { SC_(20.0), SC_(1.0), SC_(-2.4329031685078613217372568182431975e18) }, { SC_(21.0), SC_(1.0), SC_(5.1090954354370285677650274860473481e19) }, { SC_(22.0), SC_(1.0), SC_(-1.1240008617808912306021529490019443e21) }, { SC_(23.0), SC_(1.0), SC_(2.5852018279876877767780261785042411e22) }, { SC_(24.0), SC_(1.0), SC_(-6.2044842022477556107699152049463576e23) }, { SC_(25.0), SC_(1.0), SC_(1.5511210274472132898983174657140502e25) }, { SC_(26.0), SC_(1.0), SC_(-4.0329146413141407973995741108882374e26) }, { SC_(27.0), SC_(1.0), SC_(1.0888869490983028015891074275710607e28) }, { SC_(28.0), SC_(1.0), SC_(-3.0488834517961710017831014422416477e29) }, { SC_(29.0), SC_(1.0), SC_(8.8417620019742774502390188870678590e30) }, { SC_(30.0), SC_(1.0), SC_(-2.6525285993570947629478654469554513e32) }, { SC_(31.0), SC_(1.0), SC_(8.2228386560924560722190676893264356e33) }, { SC_(32.0), SC_(1.0), SC_(-2.6313083696432603856870073439642460e35) }, { SC_(33.0), SC_(1.0), SC_(8.6833176193173226237779341368101141e36) }, { SC_(34.0), SC_(1.0), SC_(-2.9523279904819655207731742551529264e38) }, { SC_(35.0), SC_(1.0), SC_(1.0333147966536512091762081841406431e40) }, { SC_(36.0), SC_(1.0), SC_(-3.7199332679260782597263218144656884e41) }, { SC_(37.0), SC_(1.0), SC_(1.3763753091276417298557030711497089e43) }, { SC_(38.0), SC_(1.0), SC_(-5.2302261746755248448805548317868492e44) }, { SC_(39.0), SC_(1.0), SC_(2.0397882081215995125998316157358476e46) }, { SC_(40.0), SC_(1.0), SC_(-8.1591528324826876968158659241126765e47) }, { SC_(41.0), SC_(1.0), SC_(3.3452526613171413332404690085486207e49) }, { SC_(42.0), SC_(1.0), SC_(-1.4050061177530396292499296757724836e51) }, { SC_(43.0), SC_(1.0), SC_(6.0415263063377269847520379087368697e52) }, { SC_(44.0), SC_(1.0), SC_(-2.6582715747885243206668113464973395e54) }, { SC_(45.0), SC_(1.0), SC_(1.1962222086548189449597808756809115e56) }, { SC_(46.0), SC_(1.0), SC_(-5.5026221598121280483325452519279417e57) }, { SC_(47.0), SC_(1.0), SC_(2.5862324151116909945729536986576770e59) }, { SC_(48.0), SC_(1.0), SC_(-1.2413915592536094722406207462376651e61) }, { SC_(49.0), SC_(1.0), SC_(6.0828186403426810113507774083359074e62) }, { SC_(50.0), SC_(1.0), SC_(-3.0414093201713391550183240542952737e64) }, + { SC_(1.0), SC_(0.5), SC_(4.9348022005446793094172454999380756) }, { SC_(2.0), SC_(0.5), SC_(-16.828796644234319995596334261160300) }, { SC_(3.0), SC_(0.5), SC_(97.409091034002437236440332688705111) }, { SC_(4.0), SC_(0.5), SC_(-771.47424982666722519053592192403342) }, { SC_(5.0), SC_(0.5), SC_(7691.1135486024354962417555492193592) }, { SC_(6.0), SC_(0.5), SC_(-92203.457923803023286231087958265416) }, { SC_(7.0), SC_(0.5), SC_(1.2904402181855980649694862685313201e6) }, { SC_(8.0), SC_(0.5), SC_(-2.0644899961760041426402517887935387e7) }, { SC_(9.0), SC_(0.5), SC_(3.7159545238509742722370782665375996e8) }, { SC_(10.0), SC_(0.5), SC_(-7.4318245088587689754917967712772148e9) }, { SC_(11.0), SC_(0.5), SC_(1.6349952113475880004602936491973290e11) }, { SC_(12.0), SC_(0.5), SC_(-3.9239835716776094268285475780118302e12) }, { SC_(13.0), SC_(0.5), SC_(1.0202353013465195041277151739878551e14) }, { SC_(14.0), SC_(0.5), SC_(-2.8566584452212481470833807159097089e15) }, { SC_(15.0), SC_(0.5), SC_(8.5699749372666517252032697437036695e16) }, { SC_(16.0), SC_(0.5), SC_(-2.7423919374393211160431177426964643e18) }, { SC_(17.0), SC_(0.5), SC_(9.3241325391494482576994960512370215e19) }, { SC_(18.0), SC_(0.5), SC_(-3.3566877083169638444274914449348672e21) }, { SC_(19.0), SC_(0.5), SC_(1.2755413284287493036311595679555294e23) }, { SC_(20.0), SC_(0.5), SC_(-5.1021653127394298787426098736355399e24) }, { SC_(21.0), SC_(0.5), SC_(2.1429094312139835232862558079810850e26) }, { SC_(22.0), SC_(0.5), SC_(-9.4288014971412166432678344430683531e27) }, { SC_(23.0), SC_(0.5), SC_(4.3372486886542455183876952472394031e29) }, { SC_(24.0), SC_(0.5), SC_(-2.0818793705491236054644197662022342e31) }, { SC_(25.0), SC_(0.5), SC_(1.0409396852737427640356547073711139e33) }, { SC_(26.0), SC_(0.5), SC_(-5.4128863634220427078493834793146517e34) }, { SC_(27.0), SC_(0.5), SC_(2.9229586362476475227234677536391722e36) }, { SC_(28.0), SC_(0.5), SC_(-1.6368568362986349120390762957016873e38) }, { SC_(29.0), SC_(0.5), SC_(9.4937696505319902685274359255316741e39) }, { SC_(30.0), SC_(0.5), SC_(-5.6962617903191757168598825608931775e41) }, { SC_(31.0), SC_(0.5), SC_(3.5316823099978851326405053801048261e43) }, { SC_(32.0), SC_(0.5), SC_(-2.2602766783986456717032825683189511e45) }, { SC_(33.0), SC_(0.5), SC_(1.4917826077431059644231123371238779e47) }, { SC_(34.0), SC_(0.5), SC_(-1.0144121732653120152568117095915465e49) }, { SC_(35.0), SC_(0.5), SC_(7.1008852128571840121789056825569522e50) }, { SC_(36.0), SC_(0.5), SC_(-5.1126373532571724660603059705232204e52) }, { SC_(37.0), SC_(0.5), SC_(3.7833516414103076192831949360932899e54) }, { SC_(38.0), SC_(0.5), SC_(-2.8753472474718337892361988468491097e56) }, { SC_(39.0), SC_(0.5), SC_(2.2427708530280303552352874820086301e58) }, { SC_(40.0), SC_(0.5), SC_(-1.7942166824224242840898439541031383e60) }, { SC_(41.0), SC_(0.5), SC_(1.4712576795863879129267798604374659e62) }, { SC_(42.0), SC_(0.5), SC_(-1.2358564508525658468509652718307801e64) }, { SC_(43.0), SC_(0.5), SC_(1.0628365477332066282896715879731180e66) }, { SC_(44.0), SC_(0.5), SC_(-9.3529616200522183289427782398136808e67) }, { SC_(45.0), SC_(0.5), SC_(8.4176654580469964960466008955275434e69) }, { SC_(46.0), SC_(0.5), SC_(-7.7442522214032367763622903043252397e71) }, { SC_(47.0), SC_(0.5), SC_(7.2795970881190425697803703632702328e73) }, { SC_(48.0), SC_(0.5), SC_(-6.9884132045942808669890971414448669e75) }, { SC_(49.0), SC_(0.5), SC_(6.8486449405023952496492961188997479e77) }, { SC_(50.0), SC_(0.5), SC_(-6.8486449405023952496492897589943408e79) }, }}; do_test_polygamma(data, name, "Mathematica Data");