From a663232f38e971dd573bb5161d7f6519366f0d28 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sat, 22 Nov 2014 18:37:31 +0000 Subject: [PATCH] [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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=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&fw z{mw>;fq_58)5S5QV$R#Sl~ZIx=N`9@-&Eo;frW!bKp;|B;E*261Y31(jt(Aghr$T{ z-%1_Iiwn{k93x%ZTn!suSS&s)Q5Yb=7HOmK`oIajP3seT9hf@q|9o7&diSoly-VZw zU%$)wzWSW?)vv4L?=F3H?ft)P)zRA|wI*!Y{&s%Y&TYCMOcV5PfA(5;p5fj0zd_Z} zHyzn!w@7zyT_oV?ePyTJvPL66mU)^B{U?>k6)+q0zRKOl{iEE|`&xb>yKITUl#BWY zRWkQ1ncN^)8nJ!KmfGH;eH=X-Yu!K2dh4De&;Dmo80)rpW<6%T756{!S-nWmSe$uK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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");