1 //  (C) Copyright John Maddock 2008.
2 //  Use, modification and distribution are subject to the
3 //  Boost Software License, Version 1.0. (See accompanying file
4 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #define BOOST_TEST_MAIN
7 #include <boost/test/unit_test.hpp>
8 #include <boost/test/floating_point_comparison.hpp>
9 #include <boost/math/tools/precision.hpp>
10 #include <math.h>  // ldexpf
11 #include <iostream>
12 #include <iomanip>
13 
14 #ifdef TEST_STD
15 #include <cmath>
16 namespace tr1 = std::tr1;
17 #else
18 #include <boost/math/tr1.hpp>
19 namespace tr1 = boost::math::tr1;
20 #endif
21 
22 #ifdef _MSC_VER
23 #  pragma warning (disable : 4100) // unreferenced formal parameter
24 // Can't just comment parameter out because reference or not depends on macro define.
25 #endif
26 
test_values(float,const char * name)27 void test_values(float, const char* name)
28 {
29    std::cout << "Testing type " << name << std::endl;
30 #ifndef TEST_LD
31    //
32    // First the C99 math functions:
33    //
34    float eps = boost::math::tools::epsilon<float>();
35    BOOST_CHECK_CLOSE(tr1::acoshf(std::cosh(0.5f)), 0.5f, 5000 * eps);
36    BOOST_CHECK_CLOSE(tr1::asinhf(std::sinh(0.5f)), 0.5f, 5000 * eps);
37    BOOST_CHECK_CLOSE(tr1::atanhf(std::tanh(0.5f)), 0.5f, 5000 * eps);
38 
39    BOOST_CHECK_CLOSE(tr1::cbrtf(1.5f * 1.5f * 1.5f), 1.5f, 5000 * eps);
40 
41    BOOST_CHECK(tr1::copysignf(1.0f, 1.0f) == 1.0f);
42    BOOST_CHECK(tr1::copysignf(1.0f, -1.0f) == -1.0f);
43    BOOST_CHECK(tr1::copysignf(-1.0f, 1.0f) == 1.0f);
44    BOOST_CHECK(tr1::copysignf(-1.0f, -1.0f) == -1.0f);
45 
46    BOOST_CHECK_CLOSE(tr1::erfcf(static_cast<float>(0.125)), static_cast<float>(0.85968379519866618260697055347837660181302041685015L), eps * 1000);
47    BOOST_CHECK_CLOSE(tr1::erfcf(static_cast<float>(0.5)), static_cast<float>(0.47950012218695346231725334610803547126354842424204L), eps * 1000);
48    BOOST_CHECK_CLOSE(tr1::erfcf(static_cast<float>(1)), static_cast<float>(0.15729920705028513065877936491739074070393300203370L), eps * 1000);
49    BOOST_CHECK_CLOSE(tr1::erfcf(static_cast<float>(5)), static_cast<float>(1.5374597944280348501883434853833788901180503147234e-12L), eps * 1000);
50    BOOST_CHECK_CLOSE(tr1::erfcf(static_cast<float>(-0.125)), static_cast<float>(1.1403162048013338173930294465216233981869795831498L), eps * 1000);
51    BOOST_CHECK_CLOSE(tr1::erfcf(static_cast<float>(-0.5)), static_cast<float>(1.5204998778130465376827466538919645287364515757580L), eps * 1000);
52    BOOST_CHECK_CLOSE(tr1::erfcf(static_cast<float>(0)), static_cast<float>(1), eps * 1000);
53 
54    BOOST_CHECK_CLOSE(tr1::erff(static_cast<float>(0.125)), static_cast<float>(0.14031620480133381739302944652162339818697958314985L), eps * 1000);
55    BOOST_CHECK_CLOSE(tr1::erff(static_cast<float>(0.5)), static_cast<float>(0.52049987781304653768274665389196452873645157575796L), eps * 1000);
56    BOOST_CHECK_CLOSE(tr1::erff(static_cast<float>(1)), static_cast<float>(0.84270079294971486934122063508260925929606699796630L), eps * 1000);
57    BOOST_CHECK_CLOSE(tr1::erff(static_cast<float>(5)), static_cast<float>(0.9999999999984625402055719651498116565146166211099L), eps * 1000);
58    BOOST_CHECK_CLOSE(tr1::erff(static_cast<float>(-0.125)), static_cast<float>(-0.14031620480133381739302944652162339818697958314985L), eps * 1000);
59    BOOST_CHECK_CLOSE(tr1::erff(static_cast<float>(-0.5)), static_cast<float>(-0.52049987781304653768274665389196452873645157575796L), eps * 1000);
60    BOOST_CHECK_CLOSE(tr1::erff(static_cast<float>(0)), static_cast<float>(0), eps * 1000);
61 
62    BOOST_CHECK_CLOSE(tr1::log1pf(static_cast<float>(0.582029759883880615234375e0)), static_cast<float>(0.4587086807259736626531803258754840111707e0L), eps * 1000);
63    BOOST_CHECK_CLOSE(tr1::expm1f(static_cast<float>(0.582029759883880615234375e0)), static_cast<float>(0.7896673415707786528734865994546559029663e0L), eps * 1000);
64    BOOST_CHECK_CLOSE(tr1::log1pf(static_cast<float>(-0.2047410048544406890869140625e-1)), static_cast<float>(-0.2068660038044094868521052319477265955827e-1L), eps * 1000);
65    BOOST_CHECK_CLOSE(tr1::expm1f(static_cast<float>(-0.2047410048544406890869140625e-1)), static_cast<float>(-0.2026592921724753704129022027337835687888e-1L), eps * 1000);
66 
67    BOOST_CHECK_EQUAL(tr1::fmaxf(0.1f, -0.1f), 0.1f);
68    BOOST_CHECK_EQUAL(tr1::fminf(0.1f, -0.1f), -0.1f);
69 
70    BOOST_CHECK_CLOSE(tr1::hypotf(1.0f, 3.0f), std::sqrt(10.0f), eps * 500);
71 
72    BOOST_CHECK_CLOSE(tr1::lgammaf(static_cast<float>(3.5)), static_cast<float>(1.2009736023470742248160218814507129957702389154682L), 5000 * eps);
73    BOOST_CHECK_CLOSE(tr1::lgammaf(static_cast<float>(0.125)), static_cast<float>(2.0194183575537963453202905211670995899482809521344L), 5000 * eps);
74    BOOST_CHECK_CLOSE(tr1::lgammaf(static_cast<float>(-0.125)), static_cast<float>(2.1653002489051702517540619481440174064962195287626L), 5000 * eps);
75    BOOST_CHECK_CLOSE(tr1::lgammaf(static_cast<float>(-3.125)), static_cast<float>(0.1543111276840418242676072830970532952413339012367L), 5000 * eps);
76    BOOST_CHECK_CLOSE(tr1::lgammaf(static_cast<float>(-53249.0/1024)), static_cast<float>(-149.43323093420259741100038126078721302600128285894L), 5000 * eps);
77 
78    BOOST_CHECK_CLOSE(tr1::tgammaf(static_cast<float>(3.5)), static_cast<float>(3.3233509704478425511840640312646472177454052302295L), 5000 * eps);
79    BOOST_CHECK_CLOSE(tr1::tgammaf(static_cast<float>(0.125)), static_cast<float>(7.5339415987976119046992298412151336246104195881491L), 5000 * eps);
80    BOOST_CHECK_CLOSE(tr1::tgammaf(static_cast<float>(-0.125)), static_cast<float>(-8.7172188593831756100190140408231437691829605421405L), 5000 * eps);
81    BOOST_CHECK_CLOSE(tr1::tgammaf(static_cast<float>(-3.125)), static_cast<float>(1.1668538708507675587790157356605097019141636072094L), 5000 * eps);
82 
83 #ifdef BOOST_HAS_LONG_LONG
84    BOOST_CHECK(tr1::llroundf(2.5f) == 3LL);
85    BOOST_CHECK(tr1::llroundf(2.25f) == 2LL);
86 #endif
87    BOOST_CHECK(tr1::lroundf(2.5f) == 3L);
88    BOOST_CHECK(tr1::lroundf(2.25f) == 2L);
89    BOOST_CHECK(tr1::roundf(2.5f) == 3.0f);
90    BOOST_CHECK(tr1::roundf(2.25f) == 2.0f);
91 
92    BOOST_CHECK(tr1::nextafterf(1.0f, 2.0f) > 1.0f);
93    BOOST_CHECK(tr1::nextafterf(1.0f, -2.0f) < 1.0f);
94    BOOST_CHECK(tr1::nextafterf(tr1::nextafterf(1.0f, 2.0f), -2.0f) == 1.0f);
95    BOOST_CHECK(tr1::nextafterf(tr1::nextafterf(1.0f, -2.0f), 2.0f) == 1.0f);
96    BOOST_CHECK(tr1::nextafterf(1.0f, 2.0f) > 1.0f);
97    BOOST_CHECK(tr1::nextafterf(1.0f, -2.0f) < 1.0f);
98    BOOST_CHECK(tr1::nextafterf(tr1::nextafterf(1.0f, 2.0f), -2.0f) == 1.0f);
99    BOOST_CHECK(tr1::nextafterf(tr1::nextafterf(1.0f, -2.0f), 2.0f) == 1.0f);
100 
101    BOOST_CHECK(tr1::truncf(2.5f) == 2.0f);
102    BOOST_CHECK(tr1::truncf(2.25f) == 2.0f);
103 
104    //
105    // And again but without the "f" suffix on the function names:
106    //
107    BOOST_CHECK_CLOSE(tr1::acosh(std::cosh(0.5f)), 0.5f, 5000 * eps);
108    BOOST_CHECK_CLOSE(tr1::asinh(std::sinh(0.5f)), 0.5f, 5000 * eps);
109    BOOST_CHECK_CLOSE(tr1::atanh(std::tanh(0.5f)), 0.5f, 5000 * eps);
110 
111    BOOST_CHECK_CLOSE(tr1::cbrt(1.5f * 1.5f * 1.5f), 1.5f, 5000 * eps);
112 
113    BOOST_CHECK(tr1::copysign(1.0f, 1.0f) == 1.0f);
114    BOOST_CHECK(tr1::copysign(1.0f, -1.0f) == -1.0f);
115    BOOST_CHECK(tr1::copysign(-1.0f, 1.0f) == 1.0f);
116    BOOST_CHECK(tr1::copysign(-1.0f, -1.0f) == -1.0f);
117 
118    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<float>(0.125)), static_cast<float>(0.85968379519866618260697055347837660181302041685015L), eps * 1000);
119    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<float>(0.5)), static_cast<float>(0.47950012218695346231725334610803547126354842424204L), eps * 1000);
120    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<float>(1)), static_cast<float>(0.15729920705028513065877936491739074070393300203370L), eps * 1000);
121    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<float>(5)), static_cast<float>(1.5374597944280348501883434853833788901180503147234e-12L), eps * 1000);
122    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<float>(-0.125)), static_cast<float>(1.1403162048013338173930294465216233981869795831498L), eps * 1000);
123    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<float>(-0.5)), static_cast<float>(1.5204998778130465376827466538919645287364515757580L), eps * 1000);
124    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<float>(0)), static_cast<float>(1), eps * 1000);
125 
126    BOOST_CHECK_CLOSE(tr1::erf(static_cast<float>(0.125)), static_cast<float>(0.14031620480133381739302944652162339818697958314985L), eps * 1000);
127    BOOST_CHECK_CLOSE(tr1::erf(static_cast<float>(0.5)), static_cast<float>(0.52049987781304653768274665389196452873645157575796L), eps * 1000);
128    BOOST_CHECK_CLOSE(tr1::erf(static_cast<float>(1)), static_cast<float>(0.84270079294971486934122063508260925929606699796630L), eps * 1000);
129    BOOST_CHECK_CLOSE(tr1::erf(static_cast<float>(5)), static_cast<float>(0.9999999999984625402055719651498116565146166211099L), eps * 1000);
130    BOOST_CHECK_CLOSE(tr1::erf(static_cast<float>(-0.125)), static_cast<float>(-0.14031620480133381739302944652162339818697958314985L), eps * 1000);
131    BOOST_CHECK_CLOSE(tr1::erf(static_cast<float>(-0.5)), static_cast<float>(-0.52049987781304653768274665389196452873645157575796L), eps * 1000);
132    BOOST_CHECK_CLOSE(tr1::erf(static_cast<float>(0)), static_cast<float>(0), eps * 1000);
133 
134    BOOST_CHECK_CLOSE(tr1::log1p(static_cast<float>(0.582029759883880615234375e0)), static_cast<float>(0.4587086807259736626531803258754840111707e0L), eps * 1000);
135    BOOST_CHECK_CLOSE(tr1::expm1(static_cast<float>(0.582029759883880615234375e0)), static_cast<float>(0.7896673415707786528734865994546559029663e0L), eps * 1000);
136    BOOST_CHECK_CLOSE(tr1::log1p(static_cast<float>(-0.2047410048544406890869140625e-1)), static_cast<float>(-0.2068660038044094868521052319477265955827e-1L), eps * 1000);
137    BOOST_CHECK_CLOSE(tr1::expm1(static_cast<float>(-0.2047410048544406890869140625e-1)), static_cast<float>(-0.2026592921724753704129022027337835687888e-1L), eps * 1000);
138 
139    BOOST_CHECK_EQUAL(tr1::fmax(0.1f, -0.1f), 0.1f);
140    BOOST_CHECK_EQUAL(tr1::fmin(0.1f, -0.1f), -0.1f);
141 
142    BOOST_CHECK_CLOSE(tr1::hypot(1.0f, 3.0f), std::sqrt(10.0f), eps * 500);
143 
144    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<float>(3.5)), static_cast<float>(1.2009736023470742248160218814507129957702389154682L), 5000 * eps);
145    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<float>(0.125)), static_cast<float>(2.0194183575537963453202905211670995899482809521344L), 5000 * eps);
146    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<float>(-0.125)), static_cast<float>(2.1653002489051702517540619481440174064962195287626L), 5000 * eps);
147    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<float>(-3.125)), static_cast<float>(0.1543111276840418242676072830970532952413339012367L), 5000 * eps);
148    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<float>(-53249.0/1024)), static_cast<float>(-149.43323093420259741100038126078721302600128285894L), 5000 * eps);
149 
150    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<float>(3.5)), static_cast<float>(3.3233509704478425511840640312646472177454052302295L), 5000 * eps);
151    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<float>(0.125)), static_cast<float>(7.5339415987976119046992298412151336246104195881491L), 5000 * eps);
152    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<float>(-0.125)), static_cast<float>(-8.7172188593831756100190140408231437691829605421405L), 5000 * eps);
153    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<float>(-3.125)), static_cast<float>(1.1668538708507675587790157356605097019141636072094L), 5000 * eps);
154 
155 #ifdef BOOST_HAS_LONG_LONG
156    BOOST_CHECK(tr1::llround(2.5f) == 3LL);
157    BOOST_CHECK(tr1::llround(2.25f) == 2LL);
158 #endif
159    BOOST_CHECK(tr1::lround(2.5f) == 3L);
160    BOOST_CHECK(tr1::lround(2.25f) == 2L);
161    BOOST_CHECK(tr1::round(2.5f) == 3.0f);
162    BOOST_CHECK(tr1::round(2.25f) == 2.0f);
163 
164    BOOST_CHECK(tr1::nextafter(1.0f, 2.0f) > 1.0f);
165    BOOST_CHECK(tr1::nextafter(1.0f, -2.0f) < 1.0f);
166    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0f, 2.0f), -2.0f) == 1.0f);
167    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0f, -2.0f), 2.0f) == 1.0f);
168    BOOST_CHECK(tr1::nextafter(1.0f, 2.0f) > 1.0f);
169    BOOST_CHECK(tr1::nextafter(1.0f, -2.0f) < 1.0f);
170    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0f, 2.0f), -2.0f) == 1.0f);
171    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0f, -2.0f), 2.0f) == 1.0f);
172 
173    BOOST_CHECK(tr1::trunc(2.5f) == 2.0f);
174    BOOST_CHECK(tr1::trunc(2.25f) == 2.0f);
175 
176    //
177    // Now for the TR1 math functions:
178    //
179    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerref(4, 5, static_cast<float>(0.5L)), static_cast<float>(88.31510416666666666666666666666666666667L), eps * 100);
180    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerref(10, 0, static_cast<float>(2.5L)), static_cast<float>(-0.8802526766660982969576719576719576719577L), eps * 100);
181    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerref(10, 1, static_cast<float>(4.5L)), static_cast<float>(1.564311458042689732142857142857142857143L), eps * 100);
182    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerref(10, 6, static_cast<float>(8.5L)), static_cast<float>(20.51596541066649098875661375661375661376L), eps * 100);
183    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerref(10, 12, static_cast<float>(12.5L)), static_cast<float>(-199.5560968456234671241181657848324514991L), eps * 100);
184    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerref(50, 40, static_cast<float>(12.5L)), static_cast<float>(-4.996769495006119488583146995907246595400e16L), eps * 100);
185 
186    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(1, static_cast<float>(0.5L)), static_cast<float>(0.5L), eps * 100);
187    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(4, static_cast<float>(0.5L)), static_cast<float>(-0.3307291666666666666666666666666666666667L), eps * 100);
188    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(7, static_cast<float>(0.5L)), static_cast<float>(-0.5183392237103174603174603174603174603175L), eps * 100);
189    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(20, static_cast<float>(0.5L)), static_cast<float>(0.3120174870800154148915399248893113634676L), eps * 100);
190    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(50, static_cast<float>(0.5L)), static_cast<float>(-0.3181388060269979064951118308575628226834L), eps * 100);
191 
192    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(1, static_cast<float>(-0.5L)), static_cast<float>(1.5L), eps * 100);
193    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(4, static_cast<float>(-0.5L)), static_cast<float>(3.835937500000000000000000000000000000000L), eps * 100);
194    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(7, static_cast<float>(-0.5L)), static_cast<float>(7.950934709821428571428571428571428571429L), eps * 100);
195    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(20, static_cast<float>(-0.5L)), static_cast<float>(76.12915699869631476833699787070874048223L), eps * 100);
196    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(50, static_cast<float>(-0.5L)), static_cast<float>(2307.428631277506570629232863491518399720L), eps * 100);
197 
198    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(1, static_cast<float>(4.5L)), static_cast<float>(-3.500000000000000000000000000000000000000L), eps * 100);
199    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(4, static_cast<float>(4.5L)), static_cast<float>(0.08593750000000000000000000000000000000000L), eps * 100);
200    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(7, static_cast<float>(4.5L)), static_cast<float>(-1.036928013392857142857142857142857142857L), eps * 100);
201    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(20, static_cast<float>(4.5L)), static_cast<float>(1.437239150257817378525582974722170737587L), eps * 100);
202    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerref(50, static_cast<float>(4.5L)), static_cast<float>(-0.7795068145562651416494321484050019245248L), eps * 100);
203 
204    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendref(4, 2, static_cast<float>(0.5L)), static_cast<float>(4.218750000000000000000000000000000000000L), eps * 100);
205    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendref(7, 5, static_cast<float>(0.5L)), static_cast<float>(5696.789530152175143607977274672800795328L), eps * 100);
206    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendref(4, 2, static_cast<float>(-0.5L)), static_cast<float>(4.218750000000000000000000000000000000000L), eps * 100);
207    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendref(7, 5, static_cast<float>(-0.5L)), static_cast<float>(5696.789530152175143607977274672800795328L), eps * 100);
208 
209    BOOST_CHECK_CLOSE_FRACTION(tr1::legendref(1, static_cast<float>(0.5L)), static_cast<float>(0.5L), eps * 100);
210    BOOST_CHECK_CLOSE_FRACTION(tr1::legendref(4, static_cast<float>(0.5L)), static_cast<float>(-0.2890625000000000000000000000000000000000L), eps * 100);
211    BOOST_CHECK_CLOSE_FRACTION(tr1::legendref(7, static_cast<float>(0.5L)), static_cast<float>(0.2231445312500000000000000000000000000000L), eps * 100);
212    BOOST_CHECK_CLOSE_FRACTION(tr1::legendref(40, static_cast<float>(0.5L)), static_cast<float>(-0.09542943523261546936538467572384923220258L), eps * 100);
213 
214    float sv = eps / 1024;
215    BOOST_CHECK_CLOSE(tr1::betaf(static_cast<float>(1), static_cast<float>(1)), static_cast<float>(1), eps * 20 * 100);
216    BOOST_CHECK_CLOSE(tr1::betaf(static_cast<float>(1), static_cast<float>(4)), static_cast<float>(0.25), eps * 20 * 100);
217    BOOST_CHECK_CLOSE(tr1::betaf(static_cast<float>(4), static_cast<float>(1)), static_cast<float>(0.25), eps * 20 * 100);
218    BOOST_CHECK_CLOSE(tr1::betaf(sv, static_cast<float>(4)), 1/sv, eps * 20 * 100);
219    BOOST_CHECK_CLOSE(tr1::betaf(static_cast<float>(4), sv), 1/sv, eps * 20 * 100);
220    BOOST_CHECK_CLOSE(tr1::betaf(static_cast<float>(4), static_cast<float>(20)), static_cast<float>(0.00002823263692828910220214568040654997176736L), eps * 20 * 100);
221    BOOST_CHECK_CLOSE(tr1::betaf(static_cast<float>(0.0125L), static_cast<float>(0.000023L)), static_cast<float>(43558.24045647538375006349016083320744662L), eps * 20 * 100);
222 
223    BOOST_CHECK_CLOSE(tr1::comp_ellint_1f(static_cast<float>(0)), static_cast<float>(1.5707963267948966192313216916397514420985846996876), eps * 5000);
224    BOOST_CHECK_CLOSE(tr1::comp_ellint_1f(static_cast<float>(0.125)), static_cast<float>(1.5769867712158131421244030532288080803822271060839), eps * 5000);
225    BOOST_CHECK_CLOSE(tr1::comp_ellint_1f(static_cast<float>(0.25)), static_cast<float>(1.5962422221317835101489690714979498795055744578951), eps * 5000);
226    BOOST_CHECK_CLOSE(tr1::comp_ellint_1f(static_cast<float>(300)/1024), static_cast<float>(1.6062331054696636704261124078746600894998873503208), eps * 5000);
227    BOOST_CHECK_CLOSE(tr1::comp_ellint_1f(static_cast<float>(400)/1024), static_cast<float>(1.6364782007562008756208066125715722889067992997614), eps * 5000);
228    BOOST_CHECK_CLOSE(tr1::comp_ellint_1f(static_cast<float>(-0.5)), static_cast<float>(1.6857503548125960428712036577990769895008008941411), eps * 5000);
229    BOOST_CHECK_CLOSE(tr1::comp_ellint_1f(static_cast<float>(-0.75)), static_cast<float>(1.9109897807518291965531482187613425592531451316788), eps * 5000);
230 
231    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(-1)), static_cast<float>(1), eps * 5000);
232    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(0)), static_cast<float>(1.5707963267948966192313216916397514420985846996876), eps * 5000);
233    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(100) / 1024), static_cast<float>(1.5670445330545086723323795143598956428788609133377), eps * 5000);
234    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(200) / 1024), static_cast<float>(1.5557071588766556854463404816624361127847775545087), eps * 5000);
235    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(300) / 1024), static_cast<float>(1.5365278991162754883035625322482669608948678755743), eps * 5000);
236    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(400) / 1024), static_cast<float>(1.5090417763083482272165682786143770446401437564021), eps * 5000);
237    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(-0.5)), static_cast<float>(1.4674622093394271554597952669909161360253617523272), eps * 5000);
238    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(-600) / 1024), static_cast<float>(1.4257538571071297192428217218834579920545946473778), eps * 5000);
239    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(-800) / 1024), static_cast<float>(1.2927868476159125056958680222998765985004489572909), eps * 5000);
240    BOOST_CHECK_CLOSE(tr1::comp_ellint_2f(static_cast<float>(-900) / 1024), static_cast<float>(1.1966864890248739524112920627353824133420353430982), eps * 5000);
241 
242    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(0.2), static_cast<float>(0)), static_cast<float>(1.586867847454166237308008033828114192951), eps * 5000);
243    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(0.4), static_cast<float>(0)), static_cast<float>(1.639999865864511206865258329748601457626), eps * 5000);
244    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(0), static_cast<float>(0)), static_cast<float>(1.57079632679489661923132169163975144209858469968755291048747), eps * 5000);
245    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(0), static_cast<float>(0.5)), static_cast<float>(2.221441469079183123507940495030346849307), eps * 5000);
246    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(0.3), static_cast<float>(-4)), static_cast<float>(0.712708870925620061597924858162260293305195624270730660081949), eps * 5000);
247    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(-0.5), static_cast<float>(-1e+05)), static_cast<float>(0.00496944596485066055800109163256108604615568144080386919012831), eps * 5000);
248    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(-0.75), static_cast<float>(-1e+10)), static_cast<float>(0.0000157080225184890546939710019277357161497407143903832703317801), eps * 5000);
249    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(-0.875), static_cast<float>(1) / 1024), static_cast<float>(2.18674503176462374414944618968850352696579451638002110619287), eps * 5000);
250    BOOST_CHECK_CLOSE(tr1::comp_ellint_3f(static_cast<float>(-0.875), static_cast<float>(1023)/1024), static_cast<float>(101.045289804941384100960063898569538919135722087486350366997), eps * 5000);
251 
252    BOOST_CHECK_CLOSE(tr1::cyl_bessel_if(static_cast<float>(2.25), static_cast<float>(1)/(1024*1024)), static_cast<float>(2.34379212133481347189068464680335815256364262507955635911656e-15), eps * 5000);
253    BOOST_CHECK_CLOSE(tr1::cyl_bessel_if(static_cast<float>(5.5), static_cast<float>(3.125)), static_cast<float>(0.0583514045989371500460946536220735787163510569634133670181210), eps * 5000);
254    BOOST_CHECK_CLOSE(tr1::cyl_bessel_if(static_cast<float>(-5) + static_cast<float>(1)/1024, static_cast<float>(2.125)), static_cast<float>(0.0267920938009571023702933210070984416052633027166975342895062), eps * 5000);
255    BOOST_CHECK_CLOSE(tr1::cyl_bessel_if(static_cast<float>(-5.5), static_cast<float>(10)), static_cast<float>(597.577606961369169607937419869926705730305175364662688426534), eps * 5000);
256    BOOST_CHECK_CLOSE(tr1::cyl_bessel_if(static_cast<float>(-10486074)/(1024*1024), static_cast<float>(1)/1024), static_cast<float>(1.41474005665181350367684623930576333542989766867888186478185e35), eps * 5000);
257    BOOST_CHECK_CLOSE(tr1::cyl_bessel_if(static_cast<float>(-10486074)/(1024*1024), static_cast<float>(50)), static_cast<float>(1.07153277202900671531087024688681954238311679648319534644743e20), eps * 5000);
258    BOOST_CHECK_CLOSE(tr1::cyl_bessel_if(static_cast<float>(144794)/1024, static_cast<float>(100)), static_cast<float>(2066.27694757392660413922181531984160871678224178890247540320), eps * 5000);
259    BOOST_CHECK_CLOSE(tr1::cyl_bessel_if(static_cast<float>(-144794)/1024, static_cast<float>(100)), static_cast<float>(2066.27694672763190927440969155740243346136463461655104698748), eps * 5000);
260 
261    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(2457)/1024, static_cast<float>(1)/1024), static_cast<float>(3.80739920118603335646474073457326714709615200130620574875292e-9), eps * 5000);
262    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(5.5), static_cast<float>(3217)/1024), static_cast<float>(0.0281933076257506091621579544064767140470089107926550720453038), eps * 5000);
263    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(-5.5), static_cast<float>(3217)/1024), static_cast<float>(-2.55820064470647911823175836997490971806135336759164272675969), eps * 5000);
264    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(-5.5), static_cast<float>(1e+04)), static_cast<float>(2.449843111985605522111159013846599118397e-03), eps * 5000);
265    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(5.5), static_cast<float>(1e+04)), static_cast<float>(0.00759343502722670361395585198154817047185480147294665270646578), eps * 5000);
266    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(5.5), static_cast<float>(1e+06)), static_cast<float>(-0.000747424248595630177396350688505919533097973148718960064663632), eps * 5000);
267    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(5.125), static_cast<float>(1e+06)), static_cast<float>(-0.000776600124835704280633640911329691642748783663198207360238214), eps * 5000);
268    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(5.875), static_cast<float>(1e+06)), static_cast<float>(-0.000466322721115193071631008581529503095819705088484386434589780), eps * 5000);
269    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(0.5), static_cast<float>(101)), static_cast<float>(0.0358874487875643822020496677692429287863419555699447066226409), eps * 5000);
270    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(-5.5), static_cast<float>(1e+04)), static_cast<float>(0.00244984311198560552211115901384659911839737686676766460822577), eps * 5000);
271    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(-5.5), static_cast<float>(1e+06)), static_cast<float>(0.000279243200433579511095229508894156656558211060453622750659554), eps * 5000);
272    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(-0.5), static_cast<float>(101)), static_cast<float>(0.0708184798097594268482290389188138201440114881159344944791454), eps * 5000);
273    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(1)/1024), static_cast<float>(1.41474013160494695750009004222225969090304185981836460288562e35), eps * 5000);
274    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(15)), static_cast<float>(-0.0902239288885423309568944543848111461724911781719692852541489), eps * 5000);
275    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(10486074) / (1024*1024), static_cast<float>(1e+02)), static_cast<float>(-0.0547064914615137807616774867984047583596945624129838091326863), eps * 5000);
276    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(10486074) / (1024*1024), static_cast<float>(2e+04)), static_cast<float>(-0.00556783614400875611650958980796060611309029233226596737701688), eps * 5000);
277    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jf(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(1e+02)), static_cast<float>(-0.0547613660316806551338637153942604550779513947674222863858713), eps * 5000);
278 
279    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(0.5), static_cast<float>(0.875)), static_cast<float>(0.558532231646608646115729767013630967055657943463362504577189), eps * 5000);
280    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(0.5), static_cast<float>(1.125)), static_cast<float>(0.383621010650189547146769320487006220295290256657827220786527), eps * 5000);
281    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(2.25), static_cast<float>(std::ldexp(1.0, -30))), static_cast<float>(5.62397392719283271332307799146649700147907612095185712015604e20), eps * 5000);
282    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(5.5), static_cast<float>(3217)/1024), static_cast<float>(1.30623288775012596319554857587765179889689223531159532808379), eps * 5000);
283    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(-5.5), static_cast<float>(10)), static_cast<float>(0.0000733045300798502164644836879577484533096239574909573072142667), eps * 5000);
284    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(-5.5), static_cast<float>(100)), static_cast<float>(5.41274555306792267322084448693957747924412508020839543293369e-45), eps * 5000);
285    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(10240)/1024, static_cast<float>(1)/1024), static_cast<float>(2.35522579263922076203415803966825431039900000000993410734978e38), eps * 5000);
286    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(10240)/1024, static_cast<float>(10)), static_cast<float>(0.00161425530039067002345725193091329085443750382929208307802221), eps * 5000);
287    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(144793)/1024, static_cast<float>(100)), static_cast<float>(1.39565245860302528069481472855619216759142225046370312329416e-6), eps * 5000);
288    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kf(static_cast<float>(144793)/1024, static_cast<float>(200)), static_cast<float>(9.11950412043225432171915100042647230802198254567007382956336e-68), eps * 5000);
289 
290    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(0.5), static_cast<float>(1) / (1024*1024)), static_cast<float>(-817.033790261762580469303126467917092806755460418223776544122), eps * 5000);
291    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(5.5), static_cast<float>(3.125)), static_cast<float>(-2.61489440328417468776474188539366752698192046890955453259866), eps * 5000);
292    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(-5.5), static_cast<float>(3.125)), static_cast<float>(-0.0274994493896489729948109971802244976377957234563871795364056), eps * 5000);
293    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(-5.5), static_cast<float>(1e+04)), static_cast<float>(-0.00759343502722670361395585198154817047185480147294665270646578), eps * 5000);
294    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(1)/1024), static_cast<float>(-1.50382374389531766117868938966858995093408410498915220070230e38), eps * 5000);
295    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(1e+02)), static_cast<float>(0.0583041891319026009955779707640455341990844522293730214223545), eps * 5000);
296    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(141.75), static_cast<float>(1e+02)), static_cast<float>(-5.38829231428696507293191118661269920130838607482708483122068e9), eps * 5000);
297    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(141.75), static_cast<float>(2e+04)), static_cast<float>(-0.00376577888677186194728129112270988602876597726657372330194186), eps * 5000);
298    BOOST_CHECK_CLOSE(tr1::cyl_neumannf(static_cast<float>(-141.75), static_cast<float>(1e+02)), static_cast<float>(-3.81009803444766877495905954105669819951653361036342457919021e9), eps * 5000);
299 
300    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0), static_cast<float>(0)), static_cast<float>(0), eps * 5000);
301    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0), static_cast<float>(-10)), static_cast<float>(-10), eps * 5000);
302    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(-1), static_cast<float>(-1)), static_cast<float>(-1.2261911708835170708130609674719067527242483502207), eps * 5000);
303    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.875), static_cast<float>(-4)), static_cast<float>(-5.3190556182262405182189463092940736859067548232647), eps * 5000);
304    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(-0.625), static_cast<float>(8)), static_cast<float>(9.0419973860310100524448893214394562615252527557062), eps * 5000);
305    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.875), static_cast<float>(1e-05)), static_cast<float>(0.000010000000000127604166668510945638036143355898993088), eps * 5000);
306    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(10)/1024, static_cast<float>(1e+05)), static_cast<float>(100002.38431454899771096037307519328741455615271038), eps * 5000);
307    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(1), static_cast<float>(1e-20)), static_cast<float>(1.0000000000000000000000000000000000000000166666667e-20), eps * 5000);
308    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(1e-20), static_cast<float>(1e-20)), static_cast<float>(1.000000000000000e-20), eps * 5000);
309    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(400)/1024, static_cast<float>(1e+20)), static_cast<float>(1.0418143796499216839719289963154558027005142709763e20), eps * 5000);
310    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.5), static_cast<float>(2)), static_cast<float>(2.1765877052210673672479877957388515321497888026770), eps * 5000);
311    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.5), static_cast<float>(4)), static_cast<float>(4.2543274975235836861894752787874633017836785640477), eps * 5000);
312    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.5), static_cast<float>(6)), static_cast<float>(6.4588766202317746302999080620490579800463614807916), eps * 5000);
313    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.5), static_cast<float>(10)), static_cast<float>(10.697409951222544858346795279378531495869386960090), eps * 5000);
314    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.5), static_cast<float>(-2)), static_cast<float>(-2.1765877052210673672479877957388515321497888026770), eps * 5000);
315    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.5), static_cast<float>(-4)), static_cast<float>(-4.2543274975235836861894752787874633017836785640477), eps * 5000);
316    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.5), static_cast<float>(-6)), static_cast<float>(-6.4588766202317746302999080620490579800463614807916), eps * 5000);
317    BOOST_CHECK_CLOSE(tr1::ellint_1f(static_cast<float>(0.5), static_cast<float>(-10)), static_cast<float>(-10.697409951222544858346795279378531495869386960090), eps * 5000);
318 
319    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(0), static_cast<float>(0)), static_cast<float>(0), eps * 5000);
320    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(0), static_cast<float>(-10)), static_cast<float>(-10), eps * 5000);
321    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(-1), static_cast<float>(-1)), static_cast<float>(-0.84147098480789650665250232163029899962256306079837), eps * 5000);
322    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(900) / 1024, static_cast<float>(-4)), static_cast<float>(-3.1756145986492562317862928524528520686391383168377), eps * 5000);
323    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(-600) / 1024, static_cast<float>(8)), static_cast<float>(7.2473147180505693037677015377802777959345489333465), eps * 5000);
324    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(800) / 1024, static_cast<float>(1e-05)), static_cast<float>(9.999999999898274739584436515967055859383969942432E-6), eps * 5000);
325    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(100) / 1024, static_cast<float>(1e+05)), static_cast<float>(99761.153306972066658135668386691227343323331995888), eps * 5000);
326    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(-0.5), static_cast<float>(1e+10)), static_cast<float>(9.3421545766487137036576748555295222252286528414669e9), eps * 5000);
327    BOOST_CHECK_CLOSE(tr1::ellint_2f(static_cast<float>(400) / 1024, ldexp(static_cast<float>(1), 66)), static_cast<float>(7.0886102721911705466476846969992069994308167515242e19), eps * 5000);
328 
329    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(1), static_cast<float>(-1)), static_cast<float>(-1.557407724654902230506974807458360173087), eps * 5000);
330    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.4), static_cast<float>(0), static_cast<float>(-4)), static_cast<float>(-4.153623371196831087495427530365430979011), eps * 5000);
331    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(-0.6), static_cast<float>(0), static_cast<float>(8)), static_cast<float>(8.935930619078575123490612395578518914416), eps * 5000);
332    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.25), static_cast<float>(0), static_cast<float>(0.5)), static_cast<float>(0.501246705365439492445236118603525029757890291780157969500480), eps * 5000);
333    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(0), static_cast<float>(0.5)), static_cast<float>(0.5), eps * 5000);
334    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(-2), static_cast<float>(0.5)), static_cast<float>(0.437501067017546278595664813509803743009132067629603474488486), eps * 5000);
335    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(0.25), static_cast<float>(0.5)), static_cast<float>(0.510269830229213412212501938035914557628394166585442994564135), eps * 5000);
336    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(0.75), static_cast<float>(0.5)), static_cast<float>(0.533293253875952645421201146925578536430596894471541312806165), eps * 5000);
337    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(0.75), static_cast<float>(0.75)), static_cast<float>(0.871827580412760575085768367421866079353646112288567703061975), eps * 5000);
338    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(1), static_cast<float>(0.25)), static_cast<float>(0.255341921221036266504482236490473678204201638800822621740476), eps * 5000);
339    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(2), static_cast<float>(0.25)), static_cast<float>(0.261119051639220165094943572468224137699644963125853641716219), eps * 5000);
340    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0), static_cast<float>(1023)/1024, static_cast<float>(1.5)), static_cast<float>(13.2821612239764190363647953338544569682942329604483733197131), eps * 5000);
341    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.5), static_cast<float>(0.5), static_cast<float>(-1)), static_cast<float>(-1.228014414316220642611298946293865487807), eps * 5000);
342    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.5), static_cast<float>(0.5), static_cast<float>(1e+10)), static_cast<float>(1.536591003599172091573590441336982730551e+10), eps * 5000);
343    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.75), static_cast<float>(-1e+05), static_cast<float>(10)), static_cast<float>(0.0347926099493147087821620459290460547131012904008557007934290), eps * 5000);
344    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.875), static_cast<float>(-1e+10), static_cast<float>(10)), static_cast<float>(0.000109956202759561502329123384755016959364346382187364656768212), eps * 5000);
345    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.875), static_cast<float>(-1e+10), static_cast<float>(1e+20)), static_cast<float>(1.00000626665567332602765201107198822183913978895904937646809e15), eps * 5000);
346    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.875), static_cast<float>(-1e+10), static_cast<float>(1608)/1024), static_cast<float>(0.0000157080616044072676127333183571107873332593142625043567690379), eps * 5000);
347    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.875), 1-static_cast<float>(1) / 1024, static_cast<float>(1e+20)), static_cast<float>(6.43274293944380717581167058274600202023334985100499739678963e21), eps * 5000);
348    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.25), static_cast<float>(50), static_cast<float>(0.1)), static_cast<float>(0.124573770342749525407523258569507331686458866564082916835900), eps * 5000);
349    BOOST_CHECK_CLOSE(tr1::ellint_3f(static_cast<float>(0.25), static_cast<float>(1.125), static_cast<float>(1)), static_cast<float>(1.77299767784815770192352979665283069318388205110727241629752), eps * 5000);
350 
351    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(1)/1024), static_cast<float>(-6.35327933972759151358547423727042905862963067106751711596065L), eps * 5000);
352    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(0.125)), static_cast<float>(-1.37320852494298333781545045921206470808223543321810480716122L), eps * 5000);
353    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(0.5)), static_cast<float>(0.454219904863173579920523812662802365281405554352642045162818L), eps * 5000);
354    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(1)), static_cast<float>(1.89511781635593675546652093433163426901706058173270759164623L), eps * 5000);
355    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(50.5)), static_cast<float>(1.72763195602911805201155668940185673806099654090456049881069e20L), eps * 5000);
356    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(-1)/1024), static_cast<float>(-6.35523246483107180261445551935803221293763008553775821607264L), eps * 5000);
357    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(-0.125)), static_cast<float>(-1.62342564058416879145630692462440887363310605737209536579267L), eps * 5000);
358    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(-0.5)), static_cast<float>(-0.559773594776160811746795939315085235226846890316353515248293L), eps * 5000);
359    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(-1)), static_cast<float>(-0.219383934395520273677163775460121649031047293406908207577979L), eps * 5000);
360    BOOST_CHECK_CLOSE(tr1::expintf(static_cast<float>(-50.5)), static_cast<float>(-2.27237132932219350440719707268817831250090574830769670186618e-24L), eps * 5000);
361 
362    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(0, static_cast<float>(1)), static_cast<float>(1.L), 100 * eps);
363    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(1, static_cast<float>(1)), static_cast<float>(2.L), 100 * eps);
364    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(1, static_cast<float>(2)), static_cast<float>(4.L), 100 * eps);
365    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(1, static_cast<float>(10)), static_cast<float>(20), 100 * eps);
366    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(1, static_cast<float>(100)), static_cast<float>(200), 100 * eps);
367    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(1, static_cast<float>(1e6)), static_cast<float>(2e6), 100 * eps);
368    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(10, static_cast<float>(30)), static_cast<float>(5.896624628001300E+17L), 100 * eps);
369    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(10, static_cast<float>(1000)), static_cast<float>(1.023976960161280E+33L), 100 * eps);
370    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(10, static_cast<float>(10)), static_cast<float>(8.093278209760000E+12L), 100 * eps);
371    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(10, static_cast<float>(-10)), static_cast<float>(8.093278209760000E+12L), 100 * eps);
372    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(3, static_cast<float>(-10)), static_cast<float>(-7.880000000000000E+3L), 100 * eps);
373    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(3, static_cast<float>(-1000)), static_cast<float>(-7.999988000000000E+9L), 100 * eps);
374    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitef(3, static_cast<float>(-1000000)), static_cast<float>(-7.999999999988000E+18L), 100 * eps);
375 
376    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(0.125)), static_cast<float>(-0.63277562349869525529352526763564627152686379131122L), eps * 5000);
377    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(1023) / static_cast<float>(1024)), static_cast<float>(-1023.4228554489429786541032870895167448906103303056L), eps * 5000);
378    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(1025) / static_cast<float>(1024)), static_cast<float>(1024.5772867695045940578681624248887776501597556226L), eps * 5000);
379    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(0.5)), static_cast<float>(-1.46035450880958681288949915251529801246722933101258149054289L), eps * 5000);
380    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(1.125)), static_cast<float>(8.5862412945105752999607544082693023591996301183069L), eps * 5000);
381    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(2)), static_cast<float>(1.6449340668482264364724151666460251892189499012068L), eps * 5000);
382    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(3.5)), static_cast<float>(1.1267338673170566464278124918549842722219969574036L), eps * 5000);
383    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(4)), static_cast<float>(1.08232323371113819151600369654116790277475095191872690768298L), eps * 5000);
384    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(4 + static_cast<float>(1) / 1024), static_cast<float>(1.08225596856391369799036835439238249195298434901488518878804L), eps * 5000);
385    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(4.5)), static_cast<float>(1.05470751076145426402296728896028011727249383295625173068468L), eps * 5000);
386    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(6.5)), static_cast<float>(1.01200589988852479610078491680478352908773213619144808841031L), eps * 5000);
387    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(7.5)), static_cast<float>(1.00582672753652280770224164440459408011782510096320822989663L), eps * 5000);
388    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(8.125)), static_cast<float>(1.0037305205308161603183307711439385250181080293472L), eps * 5000);
389    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(16.125)), static_cast<float>(1.0000140128224754088474783648500235958510030511915L), eps * 5000);
390    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(0)), static_cast<float>(-0.5L), eps * 5000);
391    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-0.125)), static_cast<float>(-0.39906966894504503550986928301421235400280637468895L), eps * 5000);
392    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-1)), static_cast<float>(-0.083333333333333333333333333333333333333333333333333L), eps * 5000);
393    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-2)), static_cast<float>(0L), eps * 5000);
394    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-2.5)), static_cast<float>(0.0085169287778503305423585670283444869362759902200745L), eps * 5000 * 3);
395    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-3)), static_cast<float>(0.0083333333333333333333333333333333333333333333333333L), eps * 5000);
396    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-4)), static_cast<float>(0), eps * 5000);
397    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-20)), static_cast<float>(0), eps * 5000 * 100);
398    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-21)), static_cast<float>(-281.46014492753623188405797101449275362318840579710L), eps * 5000 * 100);
399    BOOST_CHECK_CLOSE(tr1::riemann_zetaf(static_cast<float>(-30.125)), static_cast<float>(2.2762941726834511267740045451463455513839970804578e7L), eps * 5000 * 100);
400 
401    BOOST_CHECK_CLOSE(tr1::sph_besself(0, static_cast<float>(0.1433600485324859619140625e-1)), static_cast<float>(0.9999657468461303487880990241993035937654e0),  eps * 5000 * 100);
402    BOOST_CHECK_CLOSE(tr1::sph_besself(0, static_cast<float>(0.1760916970670223236083984375e-1)), static_cast<float>(0.9999483203249623334100130061926184665364e0),  eps * 5000 * 100);
403    BOOST_CHECK_CLOSE(tr1::sph_besself(2, static_cast<float>(0.1433600485324859619140625e-1)), static_cast<float>(0.1370120120703995134662099191103188366059e-4),  eps * 5000 * 100);
404    BOOST_CHECK_CLOSE(tr1::sph_besself(2, static_cast<float>(0.1760916970670223236083984375e-1)), static_cast<float>(0.2067173265753174063228459655801741280461e-4),  eps * 5000 * 100);
405    BOOST_CHECK_CLOSE(tr1::sph_besself(7, static_cast<float>(0.1252804412841796875e3)), static_cast<float>(0.7887555711993028736906736576314283291289e-2),  eps * 5000 * 100);
406    BOOST_CHECK_CLOSE(tr1::sph_besself(7, static_cast<float>(0.25554705810546875e3)), static_cast<float>(-0.1463292767579579943284849187188066532514e-2),  eps * 5000 * 100);
407 
408    BOOST_CHECK_CLOSE(tr1::sph_neumannf(0, static_cast<float>(0.408089816570281982421875e0)), static_cast<float>(-0.2249212131304610409189209411089291558038e1), eps * 5000 * 100);
409    BOOST_CHECK_CLOSE(tr1::sph_neumannf(0, static_cast<float>(0.6540834903717041015625e0)), static_cast<float>(-0.1213309779166084571756446746977955970241e1),   eps * 5000 * 100);
410    BOOST_CHECK_CLOSE(tr1::sph_neumannf(2, static_cast<float>(0.408089816570281982421875e0)), static_cast<float>(-0.4541702641837159203058389758895634766256e2),   eps * 5000 * 100);
411    BOOST_CHECK_CLOSE(tr1::sph_neumannf(2, static_cast<float>(0.6540834903717041015625e0)), static_cast<float>(-0.1156112621471167110574129561700037138981e2),   eps * 5000 * 100);
412    BOOST_CHECK_CLOSE(tr1::sph_neumannf(10, static_cast<float>(0.1097540378570556640625e1)), static_cast<float>(-0.2427889658115064857278886600528596240123e9),   eps * 5000 * 100);
413    BOOST_CHECK_CLOSE(tr1::sph_neumannf(10, static_cast<float>(0.30944411754608154296875e1)), static_cast<float>(-0.3394649246350136450439882104151313759251e4),   eps * 5000 * 100);
414 
415    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendref(3, 2, static_cast<float>(0.5)), static_cast<float>(0.2061460599687871330692286791802688341213L), eps * 5000);
416    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendref(40, 15, static_cast<float>(0.75)), static_cast<float>(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000);
417 
418    //
419    // Now all over again but without the "f" suffix on the function names this time:
420    //
421    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(4, 5, static_cast<float>(0.5L)), static_cast<float>(88.31510416666666666666666666666666666667L), eps * 100);
422    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10, 0, static_cast<float>(2.5L)), static_cast<float>(-0.8802526766660982969576719576719576719577L), eps * 100);
423    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10, 1, static_cast<float>(4.5L)), static_cast<float>(1.564311458042689732142857142857142857143L), eps * 100);
424    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10, 6, static_cast<float>(8.5L)), static_cast<float>(20.51596541066649098875661375661375661376L), eps * 100);
425    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10, 12, static_cast<float>(12.5L)), static_cast<float>(-199.5560968456234671241181657848324514991L), eps * 100);
426    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(50, 40, static_cast<float>(12.5L)), static_cast<float>(-4.996769495006119488583146995907246595400e16L), eps * 100);
427 
428    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1, static_cast<float>(0.5L)), static_cast<float>(0.5L), eps * 100);
429    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4, static_cast<float>(0.5L)), static_cast<float>(-0.3307291666666666666666666666666666666667L), eps * 100);
430    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7, static_cast<float>(0.5L)), static_cast<float>(-0.5183392237103174603174603174603174603175L), eps * 100);
431    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20, static_cast<float>(0.5L)), static_cast<float>(0.3120174870800154148915399248893113634676L), eps * 100);
432    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50, static_cast<float>(0.5L)), static_cast<float>(-0.3181388060269979064951118308575628226834L), eps * 100);
433 
434    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1, static_cast<float>(-0.5L)), static_cast<float>(1.5L), eps * 100);
435    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4, static_cast<float>(-0.5L)), static_cast<float>(3.835937500000000000000000000000000000000L), eps * 100);
436    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7, static_cast<float>(-0.5L)), static_cast<float>(7.950934709821428571428571428571428571429L), eps * 100);
437    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20, static_cast<float>(-0.5L)), static_cast<float>(76.12915699869631476833699787070874048223L), eps * 100);
438    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50, static_cast<float>(-0.5L)), static_cast<float>(2307.428631277506570629232863491518399720L), eps * 100);
439 
440    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1, static_cast<float>(4.5L)), static_cast<float>(-3.500000000000000000000000000000000000000L), eps * 100);
441    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4, static_cast<float>(4.5L)), static_cast<float>(0.08593750000000000000000000000000000000000L), eps * 100);
442    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7, static_cast<float>(4.5L)), static_cast<float>(-1.036928013392857142857142857142857142857L), eps * 100);
443    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20, static_cast<float>(4.5L)), static_cast<float>(1.437239150257817378525582974722170737587L), eps * 100);
444    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50, static_cast<float>(4.5L)), static_cast<float>(-0.7795068145562651416494321484050019245248L), eps * 100);
445 
446    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(4, 2, static_cast<float>(0.5L)), static_cast<float>(4.218750000000000000000000000000000000000L), eps * 100);
447    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(7, 5, static_cast<float>(0.5L)), static_cast<float>(5696.789530152175143607977274672800795328L), eps * 100);
448    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(4, 2, static_cast<float>(-0.5L)), static_cast<float>(4.218750000000000000000000000000000000000L), eps * 100);
449    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(7, 5, static_cast<float>(-0.5L)), static_cast<float>(5696.789530152175143607977274672800795328L), eps * 100);
450 
451    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(1, static_cast<float>(0.5L)), static_cast<float>(0.5L), eps * 100);
452    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(4, static_cast<float>(0.5L)), static_cast<float>(-0.2890625000000000000000000000000000000000L), eps * 100);
453    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(7, static_cast<float>(0.5L)), static_cast<float>(0.2231445312500000000000000000000000000000L), eps * 100);
454    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(40, static_cast<float>(0.5L)), static_cast<float>(-0.09542943523261546936538467572384923220258L), eps * 100);
455 
456    BOOST_CHECK_CLOSE(tr1::beta(static_cast<float>(1), static_cast<float>(1)), static_cast<float>(1), eps * 20 * 100);
457    BOOST_CHECK_CLOSE(tr1::beta(static_cast<float>(1), static_cast<float>(4)), static_cast<float>(0.25), eps * 20 * 100);
458    BOOST_CHECK_CLOSE(tr1::beta(static_cast<float>(4), static_cast<float>(1)), static_cast<float>(0.25), eps * 20 * 100);
459    BOOST_CHECK_CLOSE(tr1::beta(sv, static_cast<float>(4)), 1/sv, eps * 20 * 100);
460    BOOST_CHECK_CLOSE(tr1::beta(static_cast<float>(4), sv), 1/sv, eps * 20 * 100);
461    BOOST_CHECK_CLOSE(tr1::beta(static_cast<float>(4), static_cast<float>(20)), static_cast<float>(0.00002823263692828910220214568040654997176736L), eps * 20 * 100);
462    BOOST_CHECK_CLOSE(tr1::beta(static_cast<float>(0.0125L), static_cast<float>(0.000023L)), static_cast<float>(43558.24045647538375006349016083320744662L), eps * 20 * 100);
463 
464    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<float>(0)), static_cast<float>(1.5707963267948966192313216916397514420985846996876), eps * 5000);
465    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<float>(0.125)), static_cast<float>(1.5769867712158131421244030532288080803822271060839), eps * 5000);
466    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<float>(0.25)), static_cast<float>(1.5962422221317835101489690714979498795055744578951), eps * 5000);
467    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<float>(300)/1024), static_cast<float>(1.6062331054696636704261124078746600894998873503208), eps * 5000);
468    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<float>(400)/1024), static_cast<float>(1.6364782007562008756208066125715722889067992997614), eps * 5000);
469    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<float>(-0.5)), static_cast<float>(1.6857503548125960428712036577990769895008008941411), eps * 5000);
470    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<float>(-0.75)), static_cast<float>(1.9109897807518291965531482187613425592531451316788), eps * 5000);
471 
472    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(-1)), static_cast<float>(1), eps * 5000);
473    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(0)), static_cast<float>(1.5707963267948966192313216916397514420985846996876), eps * 5000);
474    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(100) / 1024), static_cast<float>(1.5670445330545086723323795143598956428788609133377), eps * 5000);
475    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(200) / 1024), static_cast<float>(1.5557071588766556854463404816624361127847775545087), eps * 5000);
476    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(300) / 1024), static_cast<float>(1.5365278991162754883035625322482669608948678755743), eps * 5000);
477    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(400) / 1024), static_cast<float>(1.5090417763083482272165682786143770446401437564021), eps * 5000);
478    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(-0.5)), static_cast<float>(1.4674622093394271554597952669909161360253617523272), eps * 5000);
479    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(-600) / 1024), static_cast<float>(1.4257538571071297192428217218834579920545946473778), eps * 5000);
480    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(-800) / 1024), static_cast<float>(1.2927868476159125056958680222998765985004489572909), eps * 5000);
481    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<float>(-900) / 1024), static_cast<float>(1.1966864890248739524112920627353824133420353430982), eps * 5000);
482 
483    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(0.2), static_cast<float>(0)), static_cast<float>(1.586867847454166237308008033828114192951), eps * 5000);
484    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(0.4), static_cast<float>(0)), static_cast<float>(1.639999865864511206865258329748601457626), eps * 5000);
485    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(0), static_cast<float>(0)), static_cast<float>(1.57079632679489661923132169163975144209858469968755291048747), eps * 5000);
486    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(0), static_cast<float>(0.5)), static_cast<float>(2.221441469079183123507940495030346849307), eps * 5000);
487    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(0.3), static_cast<float>(-4)), static_cast<float>(0.712708870925620061597924858162260293305195624270730660081949), eps * 5000);
488    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(-0.5), static_cast<float>(-1e+05)), static_cast<float>(0.00496944596485066055800109163256108604615568144080386919012831), eps * 5000);
489    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(-0.75), static_cast<float>(-1e+10)), static_cast<float>(0.0000157080225184890546939710019277357161497407143903832703317801), eps * 5000);
490    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(-0.875), static_cast<float>(1) / 1024), static_cast<float>(2.18674503176462374414944618968850352696579451638002110619287), eps * 5000);
491    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<float>(-0.875), static_cast<float>(1023)/1024), static_cast<float>(101.045289804941384100960063898569538919135722087486350366997), eps * 5000);
492 
493    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<float>(2.25), static_cast<float>(1)/(1024*1024)), static_cast<float>(2.34379212133481347189068464680335815256364262507955635911656e-15), eps * 5000);
494    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<float>(5.5), static_cast<float>(3.125)), static_cast<float>(0.0583514045989371500460946536220735787163510569634133670181210), eps * 5000);
495    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<float>(-5) + static_cast<float>(1)/1024, static_cast<float>(2.125)), static_cast<float>(0.0267920938009571023702933210070984416052633027166975342895062), eps * 5000);
496    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<float>(-5.5), static_cast<float>(10)), static_cast<float>(597.577606961369169607937419869926705730305175364662688426534), eps * 5000);
497    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<float>(-10486074)/(1024*1024), static_cast<float>(1)/1024), static_cast<float>(1.41474005665181350367684623930576333542989766867888186478185e35), eps * 5000);
498    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<float>(-10486074)/(1024*1024), static_cast<float>(50)), static_cast<float>(1.07153277202900671531087024688681954238311679648319534644743e20), eps * 5000);
499    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<float>(144794)/1024, static_cast<float>(100)), static_cast<float>(2066.27694757392660413922181531984160871678224178890247540320), eps * 5000);
500    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<float>(-144794)/1024, static_cast<float>(100)), static_cast<float>(2066.27694672763190927440969155740243346136463461655104698748), eps * 5000);
501 
502    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(2457)/1024, static_cast<float>(1)/1024), static_cast<float>(3.80739920118603335646474073457326714709615200130620574875292e-9), eps * 5000);
503    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(5.5), static_cast<float>(3217)/1024), static_cast<float>(0.0281933076257506091621579544064767140470089107926550720453038), eps * 5000);
504    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(-5.5), static_cast<float>(3217)/1024), static_cast<float>(-2.55820064470647911823175836997490971806135336759164272675969), eps * 5000);
505    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(-5.5), static_cast<float>(1e+04)), static_cast<float>(2.449843111985605522111159013846599118397e-03), eps * 5000);
506    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(5.5), static_cast<float>(1e+04)), static_cast<float>(0.00759343502722670361395585198154817047185480147294665270646578), eps * 5000);
507    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(5.5), static_cast<float>(1e+06)), static_cast<float>(-0.000747424248595630177396350688505919533097973148718960064663632), eps * 5000);
508    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(5.125), static_cast<float>(1e+06)), static_cast<float>(-0.000776600124835704280633640911329691642748783663198207360238214), eps * 5000);
509    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(5.875), static_cast<float>(1e+06)), static_cast<float>(-0.000466322721115193071631008581529503095819705088484386434589780), eps * 5000);
510    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(0.5), static_cast<float>(101)), static_cast<float>(0.0358874487875643822020496677692429287863419555699447066226409), eps * 5000);
511    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(-5.5), static_cast<float>(1e+04)), static_cast<float>(0.00244984311198560552211115901384659911839737686676766460822577), eps * 5000);
512    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(-5.5), static_cast<float>(1e+06)), static_cast<float>(0.000279243200433579511095229508894156656558211060453622750659554), eps * 5000);
513    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(-0.5), static_cast<float>(101)), static_cast<float>(0.0708184798097594268482290389188138201440114881159344944791454), eps * 5000);
514    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(1)/1024), static_cast<float>(1.41474013160494695750009004222225969090304185981836460288562e35), eps * 5000);
515    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(15)), static_cast<float>(-0.0902239288885423309568944543848111461724911781719692852541489), eps * 5000);
516    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(10486074) / (1024*1024), static_cast<float>(1e+02)), static_cast<float>(-0.0547064914615137807616774867984047583596945624129838091326863), eps * 5000);
517    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(10486074) / (1024*1024), static_cast<float>(2e+04)), static_cast<float>(-0.00556783614400875611650958980796060611309029233226596737701688), eps * 5000);
518    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(1e+02)), static_cast<float>(-0.0547613660316806551338637153942604550779513947674222863858713), eps * 5000);
519 
520    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(0.5), static_cast<float>(0.875)), static_cast<float>(0.558532231646608646115729767013630967055657943463362504577189), eps * 5000);
521    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(0.5), static_cast<float>(1.125)), static_cast<float>(0.383621010650189547146769320487006220295290256657827220786527), eps * 5000);
522    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(2.25), static_cast<float>(std::ldexp(1.0, -30))), static_cast<float>(5.62397392719283271332307799146649700147907612095185712015604e20), eps * 5000);
523    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(5.5), static_cast<float>(3217)/1024), static_cast<float>(1.30623288775012596319554857587765179889689223531159532808379), eps * 5000);
524    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(-5.5), static_cast<float>(10)), static_cast<float>(0.0000733045300798502164644836879577484533096239574909573072142667), eps * 5000);
525    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(-5.5), static_cast<float>(100)), static_cast<float>(5.41274555306792267322084448693957747924412508020839543293369e-45), eps * 5000);
526    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(10240)/1024, static_cast<float>(1)/1024), static_cast<float>(2.35522579263922076203415803966825431039900000000993410734978e38), eps * 5000);
527    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(10240)/1024, static_cast<float>(10)), static_cast<float>(0.00161425530039067002345725193091329085443750382929208307802221), eps * 5000);
528    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(144793)/1024, static_cast<float>(100)), static_cast<float>(1.39565245860302528069481472855619216759142225046370312329416e-6), eps * 5000);
529    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<float>(144793)/1024, static_cast<float>(200)), static_cast<float>(9.11950412043225432171915100042647230802198254567007382956336e-68), eps * 5000);
530 
531    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(0.5), static_cast<float>(1) / (1024*1024)), static_cast<float>(-817.033790261762580469303126467917092806755460418223776544122), eps * 5000);
532    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(5.5), static_cast<float>(3.125)), static_cast<float>(-2.61489440328417468776474188539366752698192046890955453259866), eps * 5000);
533    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(-5.5), static_cast<float>(3.125)), static_cast<float>(-0.0274994493896489729948109971802244976377957234563871795364056), eps * 5000);
534    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(-5.5), static_cast<float>(1e+04)), static_cast<float>(-0.00759343502722670361395585198154817047185480147294665270646578), eps * 5000);
535    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(1)/1024), static_cast<float>(-1.50382374389531766117868938966858995093408410498915220070230e38), eps * 5000);
536    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(-10486074) / (1024*1024), static_cast<float>(1e+02)), static_cast<float>(0.0583041891319026009955779707640455341990844522293730214223545), eps * 5000);
537    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(141.75), static_cast<float>(1e+02)), static_cast<float>(-5.38829231428696507293191118661269920130838607482708483122068e9), eps * 5000);
538    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(141.75), static_cast<float>(2e+04)), static_cast<float>(-0.00376577888677186194728129112270988602876597726657372330194186), eps * 5000);
539    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<float>(-141.75), static_cast<float>(1e+02)), static_cast<float>(-3.81009803444766877495905954105669819951653361036342457919021e9), eps * 5000);
540 
541    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0), static_cast<float>(0)), static_cast<float>(0), eps * 5000);
542    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0), static_cast<float>(-10)), static_cast<float>(-10), eps * 5000);
543    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(-1), static_cast<float>(-1)), static_cast<float>(-1.2261911708835170708130609674719067527242483502207), eps * 5000);
544    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.875), static_cast<float>(-4)), static_cast<float>(-5.3190556182262405182189463092940736859067548232647), eps * 5000);
545    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(-0.625), static_cast<float>(8)), static_cast<float>(9.0419973860310100524448893214394562615252527557062), eps * 5000);
546    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.875), static_cast<float>(1e-05)), static_cast<float>(0.000010000000000127604166668510945638036143355898993088), eps * 5000);
547    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(10)/1024, static_cast<float>(1e+05)), static_cast<float>(100002.38431454899771096037307519328741455615271038), eps * 5000);
548    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(1), static_cast<float>(1e-20)), static_cast<float>(1.0000000000000000000000000000000000000000166666667e-20), eps * 5000);
549    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(1e-20), static_cast<float>(1e-20)), static_cast<float>(1.000000000000000e-20), eps * 5000);
550    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(400)/1024, static_cast<float>(1e+20)), static_cast<float>(1.0418143796499216839719289963154558027005142709763e20), eps * 5000);
551    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.5), static_cast<float>(2)), static_cast<float>(2.1765877052210673672479877957388515321497888026770), eps * 5000);
552    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.5), static_cast<float>(4)), static_cast<float>(4.2543274975235836861894752787874633017836785640477), eps * 5000);
553    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.5), static_cast<float>(6)), static_cast<float>(6.4588766202317746302999080620490579800463614807916), eps * 5000);
554    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.5), static_cast<float>(10)), static_cast<float>(10.697409951222544858346795279378531495869386960090), eps * 5000);
555    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.5), static_cast<float>(-2)), static_cast<float>(-2.1765877052210673672479877957388515321497888026770), eps * 5000);
556    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.5), static_cast<float>(-4)), static_cast<float>(-4.2543274975235836861894752787874633017836785640477), eps * 5000);
557    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.5), static_cast<float>(-6)), static_cast<float>(-6.4588766202317746302999080620490579800463614807916), eps * 5000);
558    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<float>(0.5), static_cast<float>(-10)), static_cast<float>(-10.697409951222544858346795279378531495869386960090), eps * 5000);
559 
560    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(0), static_cast<float>(0)), static_cast<float>(0), eps * 5000);
561    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(0), static_cast<float>(-10)), static_cast<float>(-10), eps * 5000);
562    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(-1), static_cast<float>(-1)), static_cast<float>(-0.84147098480789650665250232163029899962256306079837), eps * 5000);
563    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(900) / 1024, static_cast<float>(-4)), static_cast<float>(-3.1756145986492562317862928524528520686391383168377), eps * 5000);
564    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(-600) / 1024, static_cast<float>(8)), static_cast<float>(7.2473147180505693037677015377802777959345489333465), eps * 5000);
565    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(800) / 1024, static_cast<float>(1e-05)), static_cast<float>(9.999999999898274739584436515967055859383969942432E-6), eps * 5000);
566    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(100) / 1024, static_cast<float>(1e+05)), static_cast<float>(99761.153306972066658135668386691227343323331995888), eps * 5000);
567    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(-0.5), static_cast<float>(1e+10)), static_cast<float>(9.3421545766487137036576748555295222252286528414669e9), eps * 5000);
568    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(400) / 1024, static_cast<float>(ldexp(static_cast<double>(1), 66))), static_cast<float>(7.0886102721911705466476846969992069994308167515242e19), eps * 5000);
569 
570    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(1), static_cast<float>(-1)), static_cast<float>(-1.557407724654902230506974807458360173087), eps * 5000);
571    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.4), static_cast<float>(0), static_cast<float>(-4)), static_cast<float>(-4.153623371196831087495427530365430979011), eps * 5000);
572    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(-0.6), static_cast<float>(0), static_cast<float>(8)), static_cast<float>(8.935930619078575123490612395578518914416), eps * 5000);
573    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.25), static_cast<float>(0), static_cast<float>(0.5)), static_cast<float>(0.501246705365439492445236118603525029757890291780157969500480), eps * 5000);
574    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(0), static_cast<float>(0.5)), static_cast<float>(0.5), eps * 5000);
575    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(-2), static_cast<float>(0.5)), static_cast<float>(0.437501067017546278595664813509803743009132067629603474488486), eps * 5000);
576    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(0.25), static_cast<float>(0.5)), static_cast<float>(0.510269830229213412212501938035914557628394166585442994564135), eps * 5000);
577    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(0.75), static_cast<float>(0.5)), static_cast<float>(0.533293253875952645421201146925578536430596894471541312806165), eps * 5000);
578    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(0.75), static_cast<float>(0.75)), static_cast<float>(0.871827580412760575085768367421866079353646112288567703061975), eps * 5000);
579    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(1), static_cast<float>(0.25)), static_cast<float>(0.255341921221036266504482236490473678204201638800822621740476), eps * 5000);
580    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(2), static_cast<float>(0.25)), static_cast<float>(0.261119051639220165094943572468224137699644963125853641716219), eps * 5000);
581    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(1023)/1024, static_cast<float>(1.5)), static_cast<float>(13.2821612239764190363647953338544569682942329604483733197131), eps * 5000);
582    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.5), static_cast<float>(0.5), static_cast<float>(-1)), static_cast<float>(-1.228014414316220642611298946293865487807), eps * 5000);
583    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.5), static_cast<float>(0.5), static_cast<float>(1e+10)), static_cast<float>(1.536591003599172091573590441336982730551e+10), eps * 5000);
584    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.75), static_cast<float>(-1e+05), static_cast<float>(10)), static_cast<float>(0.0347926099493147087821620459290460547131012904008557007934290), eps * 5000);
585    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.875), static_cast<float>(-1e+10), static_cast<float>(10)), static_cast<float>(0.000109956202759561502329123384755016959364346382187364656768212), eps * 5000);
586    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.875), static_cast<float>(-1e+10), static_cast<float>(1e+20)), static_cast<float>(1.00000626665567332602765201107198822183913978895904937646809e15), eps * 5000);
587    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.875), static_cast<float>(-1e+10), static_cast<float>(1608)/1024), static_cast<float>(0.0000157080616044072676127333183571107873332593142625043567690379), eps * 5000);
588    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.875), 1-static_cast<float>(1) / 1024, static_cast<float>(1e+20)), static_cast<float>(6.43274293944380717581167058274600202023334985100499739678963e21), eps * 5000);
589    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.25), static_cast<float>(50), static_cast<float>(0.1)), static_cast<float>(0.124573770342749525407523258569507331686458866564082916835900), eps * 5000);
590    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.25), static_cast<float>(1.125), static_cast<float>(1)), static_cast<float>(1.77299767784815770192352979665283069318388205110727241629752), eps * 5000);
591 
592    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(1)/1024), static_cast<float>(-6.35327933972759151358547423727042905862963067106751711596065L), eps * 5000);
593    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(0.125)), static_cast<float>(-1.37320852494298333781545045921206470808223543321810480716122L), eps * 5000);
594    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(0.5)), static_cast<float>(0.454219904863173579920523812662802365281405554352642045162818L), eps * 5000);
595    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(1)), static_cast<float>(1.89511781635593675546652093433163426901706058173270759164623L), eps * 5000);
596    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(50.5)), static_cast<float>(1.72763195602911805201155668940185673806099654090456049881069e20L), eps * 5000);
597    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(-1)/1024), static_cast<float>(-6.35523246483107180261445551935803221293763008553775821607264L), eps * 5000);
598    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(-0.125)), static_cast<float>(-1.62342564058416879145630692462440887363310605737209536579267L), eps * 5000);
599    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(-0.5)), static_cast<float>(-0.559773594776160811746795939315085235226846890316353515248293L), eps * 5000);
600    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(-1)), static_cast<float>(-0.219383934395520273677163775460121649031047293406908207577979L), eps * 5000);
601    BOOST_CHECK_CLOSE(tr1::expint(static_cast<float>(-50.5)), static_cast<float>(-2.27237132932219350440719707268817831250090574830769670186618e-24L), eps * 5000);
602 
603    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(0, static_cast<float>(1)), static_cast<float>(1.L), 100 * eps);
604    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<float>(1)), static_cast<float>(2.L), 100 * eps);
605    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<float>(2)), static_cast<float>(4.L), 100 * eps);
606    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<float>(10)), static_cast<float>(20), 100 * eps);
607    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<float>(100)), static_cast<float>(200), 100 * eps);
608    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<float>(1e6)), static_cast<float>(2e6), 100 * eps);
609    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10, static_cast<float>(30)), static_cast<float>(5.896624628001300E+17L), 100 * eps);
610    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10, static_cast<float>(1000)), static_cast<float>(1.023976960161280E+33L), 100 * eps);
611    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10, static_cast<float>(10)), static_cast<float>(8.093278209760000E+12L), 100 * eps);
612    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10, static_cast<float>(-10)), static_cast<float>(8.093278209760000E+12L), 100 * eps);
613    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3, static_cast<float>(-10)), static_cast<float>(-7.880000000000000E+3L), 100 * eps);
614    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3, static_cast<float>(-1000)), static_cast<float>(-7.999988000000000E+9L), 100 * eps);
615    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3, static_cast<float>(-1000000)), static_cast<float>(-7.999999999988000E+18L), 100 * eps);
616 
617    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(0.125)), static_cast<float>(-0.63277562349869525529352526763564627152686379131122L), eps * 5000);
618    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(1023) / static_cast<float>(1024)), static_cast<float>(-1023.4228554489429786541032870895167448906103303056L), eps * 5000);
619    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(1025) / static_cast<float>(1024)), static_cast<float>(1024.5772867695045940578681624248887776501597556226L), eps * 5000);
620    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(0.5)), static_cast<float>(-1.46035450880958681288949915251529801246722933101258149054289L), eps * 5000);
621    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(1.125)), static_cast<float>(8.5862412945105752999607544082693023591996301183069L), eps * 5000);
622    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(2)), static_cast<float>(1.6449340668482264364724151666460251892189499012068L), eps * 5000);
623    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(3.5)), static_cast<float>(1.1267338673170566464278124918549842722219969574036L), eps * 5000);
624    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(4)), static_cast<float>(1.08232323371113819151600369654116790277475095191872690768298L), eps * 5000);
625    BOOST_CHECK_CLOSE(tr1::riemann_zeta(4 + static_cast<float>(1) / 1024), static_cast<float>(1.08225596856391369799036835439238249195298434901488518878804L), eps * 5000);
626    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(4.5)), static_cast<float>(1.05470751076145426402296728896028011727249383295625173068468L), eps * 5000);
627    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(6.5)), static_cast<float>(1.01200589988852479610078491680478352908773213619144808841031L), eps * 5000);
628    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(7.5)), static_cast<float>(1.00582672753652280770224164440459408011782510096320822989663L), eps * 5000);
629    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(8.125)), static_cast<float>(1.0037305205308161603183307711439385250181080293472L), eps * 5000);
630    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(16.125)), static_cast<float>(1.0000140128224754088474783648500235958510030511915L), eps * 5000);
631    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(0)), static_cast<float>(-0.5L), eps * 5000);
632    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-0.125)), static_cast<float>(-0.39906966894504503550986928301421235400280637468895L), eps * 5000);
633    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-1)), static_cast<float>(-0.083333333333333333333333333333333333333333333333333L), eps * 5000);
634    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-2)), static_cast<float>(0L), eps * 5000);
635    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-2.5)), static_cast<float>(0.0085169287778503305423585670283444869362759902200745L), eps * 5000 * 3);
636    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-3)), static_cast<float>(0.0083333333333333333333333333333333333333333333333333L), eps * 5000);
637    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-4)), static_cast<float>(0), eps * 5000);
638    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-20)), static_cast<float>(0), eps * 5000 * 100);
639    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-21)), static_cast<float>(-281.46014492753623188405797101449275362318840579710L), eps * 5000 * 100);
640    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<float>(-30.125)), static_cast<float>(2.2762941726834511267740045451463455513839970804578e7L), eps * 5000 * 100);
641 
642    BOOST_CHECK_CLOSE(tr1::sph_bessel(0, static_cast<float>(0.1433600485324859619140625e-1)), static_cast<float>(0.9999657468461303487880990241993035937654e0),  eps * 5000 * 100);
643    BOOST_CHECK_CLOSE(tr1::sph_bessel(0, static_cast<float>(0.1760916970670223236083984375e-1)), static_cast<float>(0.9999483203249623334100130061926184665364e0),  eps * 5000 * 100);
644    BOOST_CHECK_CLOSE(tr1::sph_bessel(2, static_cast<float>(0.1433600485324859619140625e-1)), static_cast<float>(0.1370120120703995134662099191103188366059e-4),  eps * 5000 * 100);
645    BOOST_CHECK_CLOSE(tr1::sph_bessel(2, static_cast<float>(0.1760916970670223236083984375e-1)), static_cast<float>(0.2067173265753174063228459655801741280461e-4),  eps * 5000 * 100);
646    BOOST_CHECK_CLOSE(tr1::sph_bessel(7, static_cast<float>(0.1252804412841796875e3)), static_cast<float>(0.7887555711993028736906736576314283291289e-2),  eps * 5000 * 100);
647    BOOST_CHECK_CLOSE(tr1::sph_bessel(7, static_cast<float>(0.25554705810546875e3)), static_cast<float>(-0.1463292767579579943284849187188066532514e-2),  eps * 5000 * 100);
648 
649    BOOST_CHECK_CLOSE(tr1::sph_neumann(0, static_cast<float>(0.408089816570281982421875e0)), static_cast<float>(-0.2249212131304610409189209411089291558038e1), eps * 5000 * 100);
650    BOOST_CHECK_CLOSE(tr1::sph_neumann(0, static_cast<float>(0.6540834903717041015625e0)), static_cast<float>(-0.1213309779166084571756446746977955970241e1),   eps * 5000 * 100);
651    BOOST_CHECK_CLOSE(tr1::sph_neumann(2, static_cast<float>(0.408089816570281982421875e0)), static_cast<float>(-0.4541702641837159203058389758895634766256e2),   eps * 5000 * 100);
652    BOOST_CHECK_CLOSE(tr1::sph_neumann(2, static_cast<float>(0.6540834903717041015625e0)), static_cast<float>(-0.1156112621471167110574129561700037138981e2),   eps * 5000 * 100);
653    BOOST_CHECK_CLOSE(tr1::sph_neumann(10, static_cast<float>(0.1097540378570556640625e1)), static_cast<float>(-0.2427889658115064857278886600528596240123e9),   eps * 5000 * 100);
654    BOOST_CHECK_CLOSE(tr1::sph_neumann(10, static_cast<float>(0.30944411754608154296875e1)), static_cast<float>(-0.3394649246350136450439882104151313759251e4),   eps * 5000 * 100);
655 
656    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(3, 2, static_cast<float>(0.5)), static_cast<float>(0.2061460599687871330692286791802688341213L), eps * 5000);
657    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(40, 15, static_cast<float>(0.75)), static_cast<float>(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000);
658 #endif
659 }
660 
test_values(double,const char * name)661 void test_values(double, const char* name)
662 {
663    std::cout << "Testing type " << name << std::endl;
664 
665 #ifndef TEST_LD
666    double eps = boost::math::tools::epsilon<double>();
667    BOOST_CHECK_CLOSE(tr1::acosh(std::cosh(0.5)), 0.5, 500 * eps);
668    BOOST_CHECK_CLOSE(tr1::asinh(std::sinh(0.5)), 0.5, 500 * eps);
669    BOOST_CHECK_CLOSE(tr1::atanh(std::tanh(0.5)), 0.5, 500 * eps);
670 
671    BOOST_CHECK_CLOSE(tr1::cbrt(1.5 * 1.5 * 1.5), 1.5, 500 * eps);
672 
673    BOOST_CHECK(tr1::copysign(1.0, 1.0) == 1.0);
674    BOOST_CHECK(tr1::copysign(1.0, -1.0) == -1.0);
675    BOOST_CHECK(tr1::copysign(-1.0, 1.0) == 1.0);
676    BOOST_CHECK(tr1::copysign(-1.0, -1.0) == -1.0);
677 
678    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<double>(0.125)), static_cast<double>(0.85968379519866618260697055347837660181302041685015L), eps * 1000);
679    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<double>(0.5)), static_cast<double>(0.47950012218695346231725334610803547126354842424204L), eps * 1000);
680    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<double>(1)), static_cast<double>(0.15729920705028513065877936491739074070393300203370L), eps * 1000);
681    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<double>(5)), static_cast<double>(1.5374597944280348501883434853833788901180503147234e-12L), eps * 1000);
682    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<double>(-0.125)), static_cast<double>(1.1403162048013338173930294465216233981869795831498L), eps * 1000);
683    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<double>(-0.5)), static_cast<double>(1.5204998778130465376827466538919645287364515757580L), eps * 1000);
684    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<double>(0)), static_cast<double>(1), eps * 1000);
685 
686    BOOST_CHECK_CLOSE(tr1::erf(static_cast<double>(0.125)), static_cast<double>(0.14031620480133381739302944652162339818697958314985L), eps * 1000);
687    BOOST_CHECK_CLOSE(tr1::erf(static_cast<double>(0.5)), static_cast<double>(0.52049987781304653768274665389196452873645157575796L), eps * 1000);
688    BOOST_CHECK_CLOSE(tr1::erf(static_cast<double>(1)), static_cast<double>(0.84270079294971486934122063508260925929606699796630L), eps * 1000);
689    BOOST_CHECK_CLOSE(tr1::erf(static_cast<double>(5)), static_cast<double>(0.9999999999984625402055719651498116565146166211099L), eps * 1000);
690    BOOST_CHECK_CLOSE(tr1::erf(static_cast<double>(-0.125)), static_cast<double>(-0.14031620480133381739302944652162339818697958314985L), eps * 1000);
691    BOOST_CHECK_CLOSE(tr1::erf(static_cast<double>(-0.5)), static_cast<double>(-0.52049987781304653768274665389196452873645157575796L), eps * 1000);
692    BOOST_CHECK_CLOSE(tr1::erf(static_cast<double>(0)), static_cast<double>(0), eps * 1000);
693 
694    BOOST_CHECK_CLOSE(tr1::log1p(static_cast<double>(0.582029759883880615234375e0)), static_cast<double>(0.4587086807259736626531803258754840111707e0L), eps * 1000);
695    BOOST_CHECK_CLOSE(tr1::expm1(static_cast<double>(0.582029759883880615234375e0)), static_cast<double>(0.7896673415707786528734865994546559029663e0L), eps * 1000);
696    BOOST_CHECK_CLOSE(tr1::log1p(static_cast<double>(-0.2047410048544406890869140625e-1)), static_cast<double>(-0.2068660038044094868521052319477265955827e-1L), eps * 1000);
697    BOOST_CHECK_CLOSE(tr1::expm1(static_cast<double>(-0.2047410048544406890869140625e-1)), static_cast<double>(-0.2026592921724753704129022027337835687888e-1L), eps * 1000);
698 
699    BOOST_CHECK_EQUAL(tr1::fmax(0.1, -0.1), 0.1);
700    BOOST_CHECK_EQUAL(tr1::fmin(0.1, -0.1), -0.1);
701 
702    BOOST_CHECK_CLOSE(tr1::hypot(1.0, 3.0), std::sqrt(10.0), eps * 500);
703 
704    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<double>(3.5)), static_cast<double>(1.2009736023470742248160218814507129957702389154682L), 5000 * eps);
705    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<double>(0.125)), static_cast<double>(2.0194183575537963453202905211670995899482809521344L), 5000 * eps);
706    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<double>(-0.125)), static_cast<double>(2.1653002489051702517540619481440174064962195287626L), 5000 * eps);
707    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<double>(-3.125)), static_cast<double>(0.1543111276840418242676072830970532952413339012367L), 5000 * eps);
708    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<double>(-53249.0/1024)), static_cast<double>(-149.43323093420259741100038126078721302600128285894L), 5000 * eps);
709 
710    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<double>(3.5)), static_cast<double>(3.3233509704478425511840640312646472177454052302295L), 5000 * eps);
711    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<double>(0.125)), static_cast<double>(7.5339415987976119046992298412151336246104195881491L), 5000 * eps);
712    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<double>(-0.125)), static_cast<double>(-8.7172188593831756100190140408231437691829605421405L), 5000 * eps);
713    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<double>(-3.125)), static_cast<double>(1.1668538708507675587790157356605097019141636072094L), 5000 * eps);
714 
715 #ifdef BOOST_HAS_LONG_LONG
716    BOOST_CHECK(tr1::llround(2.5) == 3LL);
717    BOOST_CHECK(tr1::llround(2.25) == 2LL);
718 #endif
719    BOOST_CHECK(tr1::lround(2.5) == 3L);
720    BOOST_CHECK(tr1::lround(2.25) == 2L);
721    BOOST_CHECK(tr1::round(2.5) == 3.0);
722    BOOST_CHECK(tr1::round(2.25) == 2.0);
723 
724    BOOST_CHECK(tr1::nextafter(1.0, 2.0) > 1.0);
725    BOOST_CHECK(tr1::nextafter(1.0, -2.0) < 1.0);
726    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0, 2.0), -2.0) == 1.0);
727    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0, -2.0), 2.0) == 1.0);
728    BOOST_CHECK(tr1::nextafter(1.0, 2.0) > 1.0);
729    BOOST_CHECK(tr1::nextafter(1.0, -2.0) < 1.0);
730    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0, 2.0), -2.0) == 1.0);
731    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0, -2.0), 2.0) == 1.0);
732 
733    BOOST_CHECK(tr1::trunc(2.5) == 2.0);
734    BOOST_CHECK(tr1::trunc(2.25) == 2.0);
735 
736    //
737    // Now the TR1 functions:
738    //
739    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(4, 5, static_cast<double>(0.5L)), static_cast<double>(88.31510416666666666666666666666666666667L), eps * 100);
740    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10, 0, static_cast<double>(2.5L)), static_cast<double>(-0.8802526766660982969576719576719576719577L), eps * 100);
741    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10, 1, static_cast<double>(4.5L)), static_cast<double>(1.564311458042689732142857142857142857143L), eps * 100);
742    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10, 6, static_cast<double>(8.5L)), static_cast<double>(20.51596541066649098875661375661375661376L), eps * 100);
743    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10, 12, static_cast<double>(12.5L)), static_cast<double>(-199.5560968456234671241181657848324514991L), eps * 100);
744    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(50, 40, static_cast<double>(12.5L)), static_cast<double>(-4.996769495006119488583146995907246595400e16L), eps * 100);
745 
746    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1, static_cast<double>(0.5L)), static_cast<double>(0.5L), eps * 100);
747    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4, static_cast<double>(0.5L)), static_cast<double>(-0.3307291666666666666666666666666666666667L), eps * 100);
748    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7, static_cast<double>(0.5L)), static_cast<double>(-0.5183392237103174603174603174603174603175L), eps * 100);
749    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20, static_cast<double>(0.5L)), static_cast<double>(0.3120174870800154148915399248893113634676L), eps * 100);
750    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50, static_cast<double>(0.5L)), static_cast<double>(-0.3181388060269979064951118308575628226834L), eps * 100);
751 
752    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1, static_cast<double>(-0.5L)), static_cast<double>(1.5L), eps * 100);
753    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4, static_cast<double>(-0.5L)), static_cast<double>(3.835937500000000000000000000000000000000L), eps * 100);
754    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7, static_cast<double>(-0.5L)), static_cast<double>(7.950934709821428571428571428571428571429L), eps * 100);
755    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20, static_cast<double>(-0.5L)), static_cast<double>(76.12915699869631476833699787070874048223L), eps * 100);
756    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50, static_cast<double>(-0.5L)), static_cast<double>(2307.428631277506570629232863491518399720L), eps * 100);
757 
758    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1, static_cast<double>(4.5L)), static_cast<double>(-3.500000000000000000000000000000000000000L), eps * 100);
759    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4, static_cast<double>(4.5L)), static_cast<double>(0.08593750000000000000000000000000000000000L), eps * 100);
760    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7, static_cast<double>(4.5L)), static_cast<double>(-1.036928013392857142857142857142857142857L), eps * 100);
761    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20, static_cast<double>(4.5L)), static_cast<double>(1.437239150257817378525582974722170737587L), eps * 100);
762    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50, static_cast<double>(4.5L)), static_cast<double>(-0.7795068145562651416494321484050019245248L), eps * 100);
763 
764    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(4, 2, static_cast<double>(0.5L)), static_cast<double>(4.218750000000000000000000000000000000000L), eps * 100);
765    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(7, 5, static_cast<double>(0.5L)), static_cast<double>(5696.789530152175143607977274672800795328L), eps * 100);
766    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(4, 2, static_cast<double>(-0.5L)), static_cast<double>(4.218750000000000000000000000000000000000L), eps * 100);
767    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(7, 5, static_cast<double>(-0.5L)), static_cast<double>(5696.789530152175143607977274672800795328L), eps * 100);
768 
769    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(1, static_cast<double>(0.5L)), static_cast<double>(0.5L), eps * 100);
770    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(4, static_cast<double>(0.5L)), static_cast<double>(-0.2890625000000000000000000000000000000000L), eps * 100);
771    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(7, static_cast<double>(0.5L)), static_cast<double>(0.2231445312500000000000000000000000000000L), eps * 100);
772    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(40, static_cast<double>(0.5L)), static_cast<double>(-0.09542943523261546936538467572384923220258L), eps * 100);
773 
774    double sv = eps / 1024;
775 
776    BOOST_CHECK_CLOSE(tr1::beta(static_cast<double>(1), static_cast<double>(1)), static_cast<double>(1), eps * 20 * 100);
777    BOOST_CHECK_CLOSE(tr1::beta(static_cast<double>(1), static_cast<double>(4)), static_cast<double>(0.25), eps * 20 * 100);
778    BOOST_CHECK_CLOSE(tr1::beta(static_cast<double>(4), static_cast<double>(1)), static_cast<double>(0.25), eps * 20 * 100);
779    BOOST_CHECK_CLOSE(tr1::beta(sv, static_cast<double>(4)), 1/sv, eps * 20 * 100);
780    BOOST_CHECK_CLOSE(tr1::beta(static_cast<double>(4), sv), 1/sv, eps * 20 * 100);
781    BOOST_CHECK_CLOSE(tr1::beta(static_cast<double>(4), static_cast<double>(20)), static_cast<double>(0.00002823263692828910220214568040654997176736L), eps * 20 * 100);
782    BOOST_CHECK_CLOSE(tr1::beta(static_cast<double>(0.0125L), static_cast<double>(0.000023L)), static_cast<double>(43558.24045647538375006349016083320744662L), eps * 20 * 100);
783 
784    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<double>(0)), static_cast<double>(1.5707963267948966192313216916397514420985846996876), eps * 5000);
785    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<double>(0.125)), static_cast<double>(1.5769867712158131421244030532288080803822271060839), eps * 5000);
786    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<double>(0.25)), static_cast<double>(1.5962422221317835101489690714979498795055744578951), eps * 5000);
787    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<double>(300)/1024), static_cast<double>(1.6062331054696636704261124078746600894998873503208), eps * 5000);
788    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<double>(400)/1024), static_cast<double>(1.6364782007562008756208066125715722889067992997614), eps * 5000);
789    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<double>(-0.5)), static_cast<double>(1.6857503548125960428712036577990769895008008941411), eps * 5000);
790    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<double>(-0.75)), static_cast<double>(1.9109897807518291965531482187613425592531451316788), eps * 5000);
791 
792    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(-1)), static_cast<double>(1), eps * 5000);
793    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(0)), static_cast<double>(1.5707963267948966192313216916397514420985846996876), eps * 5000);
794    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(100) / 1024), static_cast<double>(1.5670445330545086723323795143598956428788609133377), eps * 5000);
795    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(200) / 1024), static_cast<double>(1.5557071588766556854463404816624361127847775545087), eps * 5000);
796    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(300) / 1024), static_cast<double>(1.5365278991162754883035625322482669608948678755743), eps * 5000);
797    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(400) / 1024), static_cast<double>(1.5090417763083482272165682786143770446401437564021), eps * 5000);
798    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(-0.5)), static_cast<double>(1.4674622093394271554597952669909161360253617523272), eps * 5000);
799    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(-600) / 1024), static_cast<double>(1.4257538571071297192428217218834579920545946473778), eps * 5000);
800    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(-800) / 1024), static_cast<double>(1.2927868476159125056958680222998765985004489572909), eps * 5000);
801    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<double>(-900) / 1024), static_cast<double>(1.1966864890248739524112920627353824133420353430982), eps * 5000);
802 
803    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(0.2), static_cast<double>(0)), static_cast<double>(1.586867847454166237308008033828114192951), eps * 5000);
804    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(0.4), static_cast<double>(0)), static_cast<double>(1.639999865864511206865258329748601457626), eps * 5000);
805    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(0), static_cast<double>(0)), static_cast<double>(1.57079632679489661923132169163975144209858469968755291048747), eps * 5000);
806    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(0), static_cast<double>(0.5)), static_cast<double>(2.221441469079183123507940495030346849307), eps * 5000);
807    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(0.3), static_cast<double>(-4)), static_cast<double>(0.712708870925620061597924858162260293305195624270730660081949), eps * 5000);
808    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(-0.5), static_cast<double>(-1e+05)), static_cast<double>(0.00496944596485066055800109163256108604615568144080386919012831), eps * 5000);
809    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(-0.75), static_cast<double>(-1e+10)), static_cast<double>(0.0000157080225184890546939710019277357161497407143903832703317801), eps * 5000);
810    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(-0.875), static_cast<double>(1) / 1024), static_cast<double>(2.18674503176462374414944618968850352696579451638002110619287), eps * 5000);
811    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<double>(-0.875), static_cast<double>(1023)/1024), static_cast<double>(101.045289804941384100960063898569538919135722087486350366997), eps * 5000);
812 
813    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<double>(2.25), static_cast<double>(1)/(1024*1024)), static_cast<double>(2.34379212133481347189068464680335815256364262507955635911656e-15), eps * 5000);
814    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<double>(5.5), static_cast<double>(3.125)), static_cast<double>(0.0583514045989371500460946536220735787163510569634133670181210), eps * 5000);
815    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<double>(-5) + static_cast<double>(1)/1024, static_cast<double>(2.125)), static_cast<double>(0.0267920938009571023702933210070984416052633027166975342895062), eps * 5000);
816    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<double>(-5.5), static_cast<double>(10)), static_cast<double>(597.577606961369169607937419869926705730305175364662688426534), eps * 5000);
817    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<double>(-10486074)/(1024*1024), static_cast<double>(1)/1024), static_cast<double>(1.41474005665181350367684623930576333542989766867888186478185e35), eps * 5000);
818    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<double>(-10486074)/(1024*1024), static_cast<double>(50)), static_cast<double>(1.07153277202900671531087024688681954238311679648319534644743e20), eps * 5000);
819    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<double>(144794)/1024, static_cast<double>(100)), static_cast<double>(2066.27694757392660413922181531984160871678224178890247540320), eps * 5000);
820    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<double>(-144794)/1024, static_cast<double>(100)), static_cast<double>(2066.27694672763190927440969155740243346136463461655104698748), eps * 5000);
821 
822    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(2457)/1024, static_cast<double>(1)/1024), static_cast<double>(3.80739920118603335646474073457326714709615200130620574875292e-9), eps * 5000);
823    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(5.5), static_cast<double>(3217)/1024), static_cast<double>(0.0281933076257506091621579544064767140470089107926550720453038), eps * 5000);
824    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(-5.5), static_cast<double>(3217)/1024), static_cast<double>(-2.55820064470647911823175836997490971806135336759164272675969), eps * 5000);
825    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(-5.5), static_cast<double>(1e+04)), static_cast<double>(2.449843111985605522111159013846599118397e-03), eps * 5000);
826    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(5.5), static_cast<double>(1e+04)), static_cast<double>(0.00759343502722670361395585198154817047185480147294665270646578), eps * 5000);
827    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(5.5), static_cast<double>(1e+06)), static_cast<double>(-0.000747424248595630177396350688505919533097973148718960064663632), eps * 5000);
828    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(5.125), static_cast<double>(1e+06)), static_cast<double>(-0.000776600124835704280633640911329691642748783663198207360238214), eps * 5000);
829    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(5.875), static_cast<double>(1e+06)), static_cast<double>(-0.000466322721115193071631008581529503095819705088484386434589780), eps * 5000);
830    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(0.5), static_cast<double>(101)), static_cast<double>(0.0358874487875643822020496677692429287863419555699447066226409), eps * 5000);
831    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(-5.5), static_cast<double>(1e+04)), static_cast<double>(0.00244984311198560552211115901384659911839737686676766460822577), eps * 5000);
832    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(-5.5), static_cast<double>(1e+06)), static_cast<double>(0.000279243200433579511095229508894156656558211060453622750659554), eps * 5000);
833    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(-0.5), static_cast<double>(101)), static_cast<double>(0.0708184798097594268482290389188138201440114881159344944791454), eps * 5000);
834    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(-10486074) / (1024*1024), static_cast<double>(1)/1024), static_cast<double>(1.41474013160494695750009004222225969090304185981836460288562e35), eps * 5000);
835    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(-10486074) / (1024*1024), static_cast<double>(15)), static_cast<double>(-0.0902239288885423309568944543848111461724911781719692852541489), eps * 5000);
836    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(10486074) / (1024*1024), static_cast<double>(1e+02)), static_cast<double>(-0.0547064914615137807616774867984047583596945624129838091326863), eps * 5000);
837    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(10486074) / (1024*1024), static_cast<double>(2e+04)), static_cast<double>(-0.00556783614400875611650958980796060611309029233226596737701688), eps * 5000);
838    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<double>(-10486074) / (1024*1024), static_cast<double>(1e+02)), static_cast<double>(-0.0547613660316806551338637153942604550779513947674222863858713), eps * 5000);
839 
840    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(0.5), static_cast<double>(0.875)), static_cast<double>(0.558532231646608646115729767013630967055657943463362504577189), eps * 5000);
841    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(0.5), static_cast<double>(1.125)), static_cast<double>(0.383621010650189547146769320487006220295290256657827220786527), eps * 5000);
842    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(2.25), static_cast<double>(std::ldexp(1.0, -30))), static_cast<double>(5.62397392719283271332307799146649700147907612095185712015604e20), eps * 5000);
843    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(5.5), static_cast<double>(3217)/1024), static_cast<double>(1.30623288775012596319554857587765179889689223531159532808379), eps * 5000);
844    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(-5.5), static_cast<double>(10)), static_cast<double>(0.0000733045300798502164644836879577484533096239574909573072142667), eps * 5000);
845    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(-5.5), static_cast<double>(100)), static_cast<double>(5.41274555306792267322084448693957747924412508020839543293369e-45), eps * 5000);
846    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(10240)/1024, static_cast<double>(1)/1024), static_cast<double>(2.35522579263922076203415803966825431039900000000993410734978e38), eps * 5000);
847    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(10240)/1024, static_cast<double>(10)), static_cast<double>(0.00161425530039067002345725193091329085443750382929208307802221), eps * 5000);
848    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(144793)/1024, static_cast<double>(100)), static_cast<double>(1.39565245860302528069481472855619216759142225046370312329416e-6), eps * 5000);
849    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<double>(144793)/1024, static_cast<double>(200)), static_cast<double>(9.11950412043225432171915100042647230802198254567007382956336e-68), eps * 5000);
850 
851    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(0.5), static_cast<double>(1) / (1024*1024)), static_cast<double>(-817.033790261762580469303126467917092806755460418223776544122), eps * 5000);
852    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(5.5), static_cast<double>(3.125)), static_cast<double>(-2.61489440328417468776474188539366752698192046890955453259866), eps * 5000);
853    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(-5.5), static_cast<double>(3.125)), static_cast<double>(-0.0274994493896489729948109971802244976377957234563871795364056), eps * 5000);
854    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(-5.5), static_cast<double>(1e+04)), static_cast<double>(-0.00759343502722670361395585198154817047185480147294665270646578), eps * 5000);
855    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(-10486074) / (1024*1024), static_cast<double>(1)/1024), static_cast<double>(-1.50382374389531766117868938966858995093408410498915220070230e38), eps * 5000);
856    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(-10486074) / (1024*1024), static_cast<double>(1e+02)), static_cast<double>(0.0583041891319026009955779707640455341990844522293730214223545), eps * 5000);
857    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(141.75), static_cast<double>(1e+02)), static_cast<double>(-5.38829231428696507293191118661269920130838607482708483122068e9), eps * 5000);
858    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(141.75), static_cast<double>(2e+04)), static_cast<double>(-0.00376577888677186194728129112270988602876597726657372330194186), eps * 5000);
859    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<double>(-141.75), static_cast<double>(1e+02)), static_cast<double>(-3.81009803444766877495905954105669819951653361036342457919021e9), eps * 5000);
860 
861    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0), static_cast<double>(0)), static_cast<double>(0), eps * 5000);
862    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0), static_cast<double>(-10)), static_cast<double>(-10), eps * 5000);
863    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(-1), static_cast<double>(-1)), static_cast<double>(-1.2261911708835170708130609674719067527242483502207), eps * 5000);
864    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.875), static_cast<double>(-4)), static_cast<double>(-5.3190556182262405182189463092940736859067548232647), eps * 5000);
865    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(-0.625), static_cast<double>(8)), static_cast<double>(9.0419973860310100524448893214394562615252527557062), eps * 5000);
866    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.875), static_cast<double>(1e-05)), static_cast<double>(0.000010000000000127604166668510945638036143355898993088), eps * 5000);
867    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(10)/1024, static_cast<double>(1e+05)), static_cast<double>(100002.38431454899771096037307519328741455615271038), eps * 5000);
868    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(1), static_cast<double>(1e-20)), static_cast<double>(1.0000000000000000000000000000000000000000166666667e-20), eps * 5000);
869    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(1e-20), static_cast<double>(1e-20)), static_cast<double>(1.000000000000000e-20), eps * 5000);
870    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(400)/1024, static_cast<double>(1e+20)), static_cast<double>(1.0418143796499216839719289963154558027005142709763e20), eps * 5000);
871    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.5), static_cast<double>(2)), static_cast<double>(2.1765877052210673672479877957388515321497888026770), eps * 5000);
872    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.5), static_cast<double>(4)), static_cast<double>(4.2543274975235836861894752787874633017836785640477), eps * 5000);
873    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.5), static_cast<double>(6)), static_cast<double>(6.4588766202317746302999080620490579800463614807916), eps * 5000);
874    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.5), static_cast<double>(10)), static_cast<double>(10.697409951222544858346795279378531495869386960090), eps * 5000);
875    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.5), static_cast<double>(-2)), static_cast<double>(-2.1765877052210673672479877957388515321497888026770), eps * 5000);
876    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.5), static_cast<double>(-4)), static_cast<double>(-4.2543274975235836861894752787874633017836785640477), eps * 5000);
877    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.5), static_cast<double>(-6)), static_cast<double>(-6.4588766202317746302999080620490579800463614807916), eps * 5000);
878    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<double>(0.5), static_cast<double>(-10)), static_cast<double>(-10.697409951222544858346795279378531495869386960090), eps * 5000);
879 
880    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(0), static_cast<double>(0)), static_cast<double>(0), eps * 5000);
881    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(0), static_cast<double>(-10)), static_cast<double>(-10), eps * 5000);
882    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(-1), static_cast<double>(-1)), static_cast<double>(-0.84147098480789650665250232163029899962256306079837), eps * 5000);
883    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(900) / 1024, static_cast<double>(-4)), static_cast<double>(-3.1756145986492562317862928524528520686391383168377), eps * 5000);
884    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(-600) / 1024, static_cast<double>(8)), static_cast<double>(7.2473147180505693037677015377802777959345489333465), eps * 5000);
885    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(800) / 1024, static_cast<double>(1e-05)), static_cast<double>(9.999999999898274739584436515967055859383969942432E-6), eps * 5000);
886    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(100) / 1024, static_cast<double>(1e+05)), static_cast<double>(99761.153306972066658135668386691227343323331995888), eps * 5000);
887    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(-0.5), static_cast<double>(1e+10)), static_cast<double>(9.3421545766487137036576748555295222252286528414669e9), eps * 5000);
888    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<double>(400) / 1024, ldexp(static_cast<double>(1), 66)), static_cast<double>(7.0886102721911705466476846969992069994308167515242e19), eps * 5000);
889 
890    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(1), static_cast<double>(-1)), static_cast<double>(-1.557407724654902230506974807458360173087), eps * 5000);
891    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.4), static_cast<double>(0), static_cast<double>(-4)), static_cast<double>(-4.153623371196831087495427530365430979011), eps * 5000);
892    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(-0.6), static_cast<double>(0), static_cast<double>(8)), static_cast<double>(8.935930619078575123490612395578518914416), eps * 5000);
893    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.25), static_cast<double>(0), static_cast<double>(0.5)), static_cast<double>(0.501246705365439492445236118603525029757890291780157969500480), eps * 5000);
894    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(0), static_cast<double>(0.5)), static_cast<double>(0.5), eps * 5000);
895    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(-2), static_cast<double>(0.5)), static_cast<double>(0.437501067017546278595664813509803743009132067629603474488486), eps * 5000);
896    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(0.25), static_cast<double>(0.5)), static_cast<double>(0.510269830229213412212501938035914557628394166585442994564135), eps * 5000);
897    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(0.75), static_cast<double>(0.5)), static_cast<double>(0.533293253875952645421201146925578536430596894471541312806165), eps * 5000);
898    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(0.75), static_cast<double>(0.75)), static_cast<double>(0.871827580412760575085768367421866079353646112288567703061975), eps * 5000);
899    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(1), static_cast<double>(0.25)), static_cast<double>(0.255341921221036266504482236490473678204201638800822621740476), eps * 5000);
900    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(2), static_cast<double>(0.25)), static_cast<double>(0.261119051639220165094943572468224137699644963125853641716219), eps * 5000);
901    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0), static_cast<double>(1023)/1024, static_cast<double>(1.5)), static_cast<double>(13.2821612239764190363647953338544569682942329604483733197131), eps * 5000);
902    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.5), static_cast<double>(0.5), static_cast<double>(-1)), static_cast<double>(-1.228014414316220642611298946293865487807), eps * 5000);
903    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.5), static_cast<double>(0.5), static_cast<double>(1e+10)), static_cast<double>(1.536591003599172091573590441336982730551e+10), eps * 5000);
904    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.75), static_cast<double>(-1e+05), static_cast<double>(10)), static_cast<double>(0.0347926099493147087821620459290460547131012904008557007934290), eps * 5000);
905    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.875), static_cast<double>(-1e+10), static_cast<double>(10)), static_cast<double>(0.000109956202759561502329123384755016959364346382187364656768212), eps * 5000);
906    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.875), static_cast<double>(-1e+10), static_cast<double>(1e+20)), static_cast<double>(1.00000626665567332602765201107198822183913978895904937646809e15), eps * 5000);
907    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.875), static_cast<double>(-1e+10), static_cast<double>(1608)/1024), static_cast<double>(0.0000157080616044072676127333183571107873332593142625043567690379), eps * 5000);
908    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.875), 1-static_cast<double>(1) / 1024, static_cast<double>(1e+20)), static_cast<double>(6.43274293944380717581167058274600202023334985100499739678963e21), eps * 5000);
909    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.25), static_cast<double>(50), static_cast<double>(0.1)), static_cast<double>(0.124573770342749525407523258569507331686458866564082916835900), eps * 5000);
910    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<double>(0.25), static_cast<double>(1.125), static_cast<double>(1)), static_cast<double>(1.77299767784815770192352979665283069318388205110727241629752), eps * 5000);
911 
912    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(1)/1024), static_cast<double>(-6.35327933972759151358547423727042905862963067106751711596065L), eps * 5000);
913    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(0.125)), static_cast<double>(-1.37320852494298333781545045921206470808223543321810480716122L), eps * 5000);
914    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(0.5)), static_cast<double>(0.454219904863173579920523812662802365281405554352642045162818L), eps * 5000);
915    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(1)), static_cast<double>(1.89511781635593675546652093433163426901706058173270759164623L), eps * 5000);
916    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(50.5)), static_cast<double>(1.72763195602911805201155668940185673806099654090456049881069e20L), eps * 5000);
917    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(-1)/1024), static_cast<double>(-6.35523246483107180261445551935803221293763008553775821607264L), eps * 5000);
918    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(-0.125)), static_cast<double>(-1.62342564058416879145630692462440887363310605737209536579267L), eps * 5000);
919    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(-0.5)), static_cast<double>(-0.559773594776160811746795939315085235226846890316353515248293L), eps * 5000);
920    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(-1)), static_cast<double>(-0.219383934395520273677163775460121649031047293406908207577979L), eps * 5000);
921    BOOST_CHECK_CLOSE(tr1::expint(static_cast<double>(-50.5)), static_cast<double>(-2.27237132932219350440719707268817831250090574830769670186618e-24L), eps * 5000);
922 
923    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(0, static_cast<double>(1)), static_cast<double>(1.L), 100 * eps);
924    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<double>(1)), static_cast<double>(2.L), 100 * eps);
925    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<double>(2)), static_cast<double>(4.L), 100 * eps);
926    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<double>(10)), static_cast<double>(20), 100 * eps);
927    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<double>(100)), static_cast<double>(200), 100 * eps);
928    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1, static_cast<double>(1e6)), static_cast<double>(2e6), 100 * eps);
929    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10, static_cast<double>(30)), static_cast<double>(5.896624628001300E+17L), 100 * eps);
930    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10, static_cast<double>(1000)), static_cast<double>(1.023976960161280E+33L), 100 * eps);
931    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10, static_cast<double>(10)), static_cast<double>(8.093278209760000E+12L), 100 * eps);
932    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10, static_cast<double>(-10)), static_cast<double>(8.093278209760000E+12L), 100 * eps);
933    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3, static_cast<double>(-10)), static_cast<double>(-7.880000000000000E+3L), 100 * eps);
934    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3, static_cast<double>(-1000)), static_cast<double>(-7.999988000000000E+9L), 100 * eps);
935    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3, static_cast<double>(-1000000)), static_cast<double>(-7.999999999988000E+18L), 100 * eps);
936 
937    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(0.125)), static_cast<double>(-0.63277562349869525529352526763564627152686379131122L), eps * 5000);
938    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(1023) / static_cast<double>(1024)), static_cast<double>(-1023.4228554489429786541032870895167448906103303056L), eps * 5000);
939    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(1025) / static_cast<double>(1024)), static_cast<double>(1024.5772867695045940578681624248887776501597556226L), eps * 5000);
940    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(0.5)), static_cast<double>(-1.46035450880958681288949915251529801246722933101258149054289L), eps * 5000);
941    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(1.125)), static_cast<double>(8.5862412945105752999607544082693023591996301183069L), eps * 5000);
942    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(2)), static_cast<double>(1.6449340668482264364724151666460251892189499012068L), eps * 5000);
943    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(3.5)), static_cast<double>(1.1267338673170566464278124918549842722219969574036L), eps * 5000);
944    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(4)), static_cast<double>(1.08232323371113819151600369654116790277475095191872690768298L), eps * 5000);
945    BOOST_CHECK_CLOSE(tr1::riemann_zeta(4 + static_cast<double>(1) / 1024), static_cast<double>(1.08225596856391369799036835439238249195298434901488518878804L), eps * 5000);
946    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(4.5)), static_cast<double>(1.05470751076145426402296728896028011727249383295625173068468L), eps * 5000);
947    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(6.5)), static_cast<double>(1.01200589988852479610078491680478352908773213619144808841031L), eps * 5000);
948    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(7.5)), static_cast<double>(1.00582672753652280770224164440459408011782510096320822989663L), eps * 5000);
949    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(8.125)), static_cast<double>(1.0037305205308161603183307711439385250181080293472L), eps * 5000);
950    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(16.125)), static_cast<double>(1.0000140128224754088474783648500235958510030511915L), eps * 5000);
951    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(0)), static_cast<double>(-0.5L), eps * 5000);
952    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-0.125)), static_cast<double>(-0.39906966894504503550986928301421235400280637468895L), eps * 5000);
953    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-1)), static_cast<double>(-0.083333333333333333333333333333333333333333333333333L), eps * 5000);
954    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-2)), static_cast<double>(0L), eps * 5000);
955    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-2.5)), static_cast<double>(0.0085169287778503305423585670283444869362759902200745L), eps * 5000 * 3);
956    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-3)), static_cast<double>(0.0083333333333333333333333333333333333333333333333333L), eps * 5000);
957    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-4)), static_cast<double>(0), eps * 5000);
958    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-20)), static_cast<double>(0), eps * 5000 * 100);
959    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-21)), static_cast<double>(-281.46014492753623188405797101449275362318840579710L), eps * 5000 * 100);
960    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<double>(-30.125)), static_cast<double>(2.2762941726834511267740045451463455513839970804578e7L), eps * 5000 * 100);
961 
962    BOOST_CHECK_CLOSE(tr1::sph_bessel(0, static_cast<double>(0.1433600485324859619140625e-1)), static_cast<double>(0.9999657468461303487880990241993035937654e0),  eps * 5000 * 100);
963    BOOST_CHECK_CLOSE(tr1::sph_bessel(0, static_cast<double>(0.1760916970670223236083984375e-1)), static_cast<double>(0.9999483203249623334100130061926184665364e0),  eps * 5000 * 100);
964    BOOST_CHECK_CLOSE(tr1::sph_bessel(2, static_cast<double>(0.1433600485324859619140625e-1)), static_cast<double>(0.1370120120703995134662099191103188366059e-4),  eps * 5000 * 100);
965    BOOST_CHECK_CLOSE(tr1::sph_bessel(2, static_cast<double>(0.1760916970670223236083984375e-1)), static_cast<double>(0.2067173265753174063228459655801741280461e-4),  eps * 5000 * 100);
966    BOOST_CHECK_CLOSE(tr1::sph_bessel(7, static_cast<double>(0.1252804412841796875e3)), static_cast<double>(0.7887555711993028736906736576314283291289e-2),  eps * 5000 * 100);
967    BOOST_CHECK_CLOSE(tr1::sph_bessel(7, static_cast<double>(0.25554705810546875e3)), static_cast<double>(-0.1463292767579579943284849187188066532514e-2),  eps * 5000 * 100);
968 
969    BOOST_CHECK_CLOSE(tr1::sph_neumann(0, static_cast<double>(0.408089816570281982421875e0)), static_cast<double>(-0.2249212131304610409189209411089291558038e1), eps * 5000 * 100);
970    BOOST_CHECK_CLOSE(tr1::sph_neumann(0, static_cast<double>(0.6540834903717041015625e0)), static_cast<double>(-0.1213309779166084571756446746977955970241e1),   eps * 5000 * 100);
971    BOOST_CHECK_CLOSE(tr1::sph_neumann(2, static_cast<double>(0.408089816570281982421875e0)), static_cast<double>(-0.4541702641837159203058389758895634766256e2),   eps * 5000 * 100);
972    BOOST_CHECK_CLOSE(tr1::sph_neumann(2, static_cast<double>(0.6540834903717041015625e0)), static_cast<double>(-0.1156112621471167110574129561700037138981e2),   eps * 5000 * 100);
973    BOOST_CHECK_CLOSE(tr1::sph_neumann(10, static_cast<double>(0.1097540378570556640625e1)), static_cast<double>(-0.2427889658115064857278886600528596240123e9),   eps * 5000 * 100);
974    BOOST_CHECK_CLOSE(tr1::sph_neumann(10, static_cast<double>(0.30944411754608154296875e1)), static_cast<double>(-0.3394649246350136450439882104151313759251e4),   eps * 5000 * 100);
975 
976    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(3, 2, static_cast<double>(0.5)), static_cast<double>(0.2061460599687871330692286791802688341213L), eps * 5000);
977    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(40, 15, static_cast<double>(0.75)), static_cast<double>(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000);
978 #endif
979 }
980 
test_values(long double,const char * name)981 void test_values(long double, const char* name)
982 {
983 #ifdef TEST_LD
984 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
985    std::cout << "Testing type " << name << std::endl;
986 
987    long double eps = boost::math::tools::epsilon<long double>();
988    BOOST_CHECK_CLOSE(tr1::acoshl(std::cosh(0.5L)), 0.5L, 5000 * eps);
989    BOOST_CHECK_CLOSE(tr1::asinhl(std::sinh(0.5L)), 0.5L, 5000 * eps);
990    BOOST_CHECK_CLOSE(tr1::atanhl(std::tanh(0.5L)), 0.5L, 5000 * eps);
991 
992    BOOST_CHECK_CLOSE(tr1::cbrtl(1.5L * 1.5L * 1.5L), 1.5L, 5000 * eps);
993 
994    BOOST_CHECK(tr1::copysignl(1.0L, 1.0L) == 1.0L);
995    BOOST_CHECK(tr1::copysignl(1.0L, -1.0L) == -1.0L);
996    BOOST_CHECK(tr1::copysignl(-1.0L, 1.0L) == 1.0L);
997    BOOST_CHECK(tr1::copysignl(-1.0L, -1.0L) == -1.0L);
998 
999    BOOST_CHECK_CLOSE(tr1::erfcl(static_cast<long double>(0.125)), static_cast<long double>(0.85968379519866618260697055347837660181302041685015L), eps * 1000);
1000    BOOST_CHECK_CLOSE(tr1::erfcl(static_cast<long double>(0.5)), static_cast<long double>(0.47950012218695346231725334610803547126354842424204L), eps * 1000);
1001    BOOST_CHECK_CLOSE(tr1::erfcl(static_cast<long double>(1)), static_cast<long double>(0.15729920705028513065877936491739074070393300203370L), eps * 1000);
1002    BOOST_CHECK_CLOSE(tr1::erfcl(static_cast<long double>(5)), static_cast<long double>(1.5374597944280348501883434853833788901180503147234e-12L), eps * 1000);
1003    BOOST_CHECK_CLOSE(tr1::erfcl(static_cast<long double>(-0.125)), static_cast<long double>(1.1403162048013338173930294465216233981869795831498L), eps * 1000);
1004    BOOST_CHECK_CLOSE(tr1::erfcl(static_cast<long double>(-0.5)), static_cast<long double>(1.5204998778130465376827466538919645287364515757580L), eps * 1000);
1005    BOOST_CHECK_CLOSE(tr1::erfcl(static_cast<long double>(0)), static_cast<long double>(1), eps * 1000);
1006 
1007    BOOST_CHECK_CLOSE(tr1::erfl(static_cast<long double>(0.125)), static_cast<long double>(0.14031620480133381739302944652162339818697958314985L), eps * 1000);
1008    BOOST_CHECK_CLOSE(tr1::erfl(static_cast<long double>(0.5)), static_cast<long double>(0.52049987781304653768274665389196452873645157575796L), eps * 1000);
1009    BOOST_CHECK_CLOSE(tr1::erfl(static_cast<long double>(1)), static_cast<long double>(0.84270079294971486934122063508260925929606699796630L), eps * 1000);
1010    BOOST_CHECK_CLOSE(tr1::erfl(static_cast<long double>(5)), static_cast<long double>(0.9999999999984625402055719651498116565146166211099L), eps * 1000);
1011    BOOST_CHECK_CLOSE(tr1::erfl(static_cast<long double>(-0.125)), static_cast<long double>(-0.14031620480133381739302944652162339818697958314985L), eps * 1000);
1012    BOOST_CHECK_CLOSE(tr1::erfl(static_cast<long double>(-0.5)), static_cast<long double>(-0.52049987781304653768274665389196452873645157575796L), eps * 1000);
1013    BOOST_CHECK_CLOSE(tr1::erfl(static_cast<long double>(0)), static_cast<long double>(0), eps * 1000);
1014 
1015    BOOST_CHECK_CLOSE(tr1::log1pl(static_cast<long double>(0.582029759883880615234375e0)), static_cast<long double>(0.4587086807259736626531803258754840111707e0L), eps * 1000);
1016    BOOST_CHECK_CLOSE(tr1::expm1l(static_cast<long double>(0.582029759883880615234375e0)), static_cast<long double>(0.7896673415707786528734865994546559029663e0L), eps * 1000);
1017    BOOST_CHECK_CLOSE(tr1::log1pl(static_cast<long double>(-0.2047410048544406890869140625e-1)), static_cast<long double>(-0.2068660038044094868521052319477265955827e-1L), eps * 1000);
1018    BOOST_CHECK_CLOSE(tr1::expm1l(static_cast<long double>(-0.2047410048544406890869140625e-1)), static_cast<long double>(-0.2026592921724753704129022027337835687888e-1L), eps * 1000);
1019 
1020    BOOST_CHECK_EQUAL(tr1::fmaxl(0.1L, -0.1L), 0.1L);
1021    BOOST_CHECK_EQUAL(tr1::fminl(0.1L, -0.1L), -0.1L);
1022 
1023    BOOST_CHECK_CLOSE(tr1::hypotl(1.0L, 3.0L), std::sqrt(10.0L), eps * 500);
1024 
1025    BOOST_CHECK_CLOSE(tr1::lgammal(static_cast<long double>(3.5)), static_cast<long double>(1.2009736023470742248160218814507129957702389154682L), 5000 * eps);
1026    BOOST_CHECK_CLOSE(tr1::lgammal(static_cast<long double>(0.125)), static_cast<long double>(2.0194183575537963453202905211670995899482809521344L), 5000 * eps);
1027    BOOST_CHECK_CLOSE(tr1::lgammal(static_cast<long double>(-0.125)), static_cast<long double>(2.1653002489051702517540619481440174064962195287626L), 5000 * eps);
1028    BOOST_CHECK_CLOSE(tr1::lgammal(static_cast<long double>(-3.125)), static_cast<long double>(0.1543111276840418242676072830970532952413339012367L), 5000 * eps);
1029    BOOST_CHECK_CLOSE(tr1::lgammal(static_cast<long double>(-53249.0/1024)), static_cast<long double>(-149.43323093420259741100038126078721302600128285894L), 5000 * eps);
1030 
1031    BOOST_CHECK_CLOSE(tr1::tgammal(static_cast<long double>(3.5)), static_cast<long double>(3.3233509704478425511840640312646472177454052302295L), 5000 * eps);
1032    BOOST_CHECK_CLOSE(tr1::tgammal(static_cast<long double>(0.125)), static_cast<long double>(7.5339415987976119046992298412151336246104195881491L), 5000 * eps);
1033    BOOST_CHECK_CLOSE(tr1::tgammal(static_cast<long double>(-0.125)), static_cast<long double>(-8.7172188593831756100190140408231437691829605421405L), 5000 * eps);
1034    BOOST_CHECK_CLOSE(tr1::tgammal(static_cast<long double>(-3.125)), static_cast<long double>(1.1668538708507675587790157356605097019141636072094L), 5000 * eps);
1035 
1036 #ifdef BOOST_HAS_LONG_LONG
1037    BOOST_CHECK(tr1::llroundl(2.5L) == 3LL);
1038    BOOST_CHECK(tr1::llroundl(2.25L) == 2LL);
1039 #endif
1040    BOOST_CHECK(tr1::lroundl(2.5L) == 3L);
1041    BOOST_CHECK(tr1::lroundl(2.25L) == 2L);
1042    BOOST_CHECK(tr1::roundl(2.5L) == 3.0L);
1043    BOOST_CHECK(tr1::roundl(2.25L) == 2.0L);
1044 
1045    BOOST_CHECK(tr1::nextafterl(1.0L, 2.0L) > 1.0L);
1046    BOOST_CHECK(tr1::nextafterl(1.0L, -2.0L) < 1.0L);
1047    BOOST_CHECK(tr1::nextafterl(tr1::nextafterl(1.0L, 2.0L), -2.0L) == 1.0L);
1048    BOOST_CHECK(tr1::nextafterl(tr1::nextafterl(1.0L, -2.0L), 2.0L) == 1.0L);
1049    BOOST_CHECK(tr1::nextafterl(1.0L, 2.0L) > 1.0L);
1050    BOOST_CHECK(tr1::nextafterl(1.0L, -2.0L) < 1.0L);
1051    BOOST_CHECK(tr1::nextafterl(tr1::nextafterl(1.0L, 2.0L), -2.0L) == 1.0L);
1052    BOOST_CHECK(tr1::nextafterl(tr1::nextafterl(1.0L, -2.0L), 2.0L) == 1.0L);
1053 
1054    BOOST_CHECK(tr1::truncl(2.5L) == 2.0L);
1055    BOOST_CHECK(tr1::truncl(2.25L) == 2.0L);
1056 
1057    //
1058    // And again but without the "l" suffix on the function names:
1059    //
1060    BOOST_CHECK_CLOSE(tr1::acosh(std::cosh(0.5L)), 0.5L, 5000 * eps);
1061    BOOST_CHECK_CLOSE(tr1::asinh(std::sinh(0.5L)), 0.5L, 5000 * eps);
1062    BOOST_CHECK_CLOSE(tr1::atanh(std::tanh(0.5L)), 0.5L, 5000 * eps);
1063 
1064    BOOST_CHECK_CLOSE(tr1::cbrt(1.5L * 1.5L * 1.5L), 1.5L, 5000 * eps);
1065 
1066    BOOST_CHECK(tr1::copysign(1.0L, 1.0L) == 1.0L);
1067    BOOST_CHECK(tr1::copysign(1.0L, -1.0L) == -1.0L);
1068    BOOST_CHECK(tr1::copysign(-1.0L, 1.0L) == 1.0L);
1069    BOOST_CHECK(tr1::copysign(-1.0L, -1.0L) == -1.0L);
1070 
1071    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<long double>(0.125)), static_cast<long double>(0.85968379519866618260697055347837660181302041685015L), eps * 1000);
1072    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<long double>(0.5)), static_cast<long double>(0.47950012218695346231725334610803547126354842424204L), eps * 1000);
1073    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<long double>(1)), static_cast<long double>(0.15729920705028513065877936491739074070393300203370L), eps * 1000);
1074    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<long double>(5)), static_cast<long double>(1.5374597944280348501883434853833788901180503147234e-12L), eps * 1000);
1075    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<long double>(-0.125)), static_cast<long double>(1.1403162048013338173930294465216233981869795831498L), eps * 1000);
1076    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<long double>(-0.5)), static_cast<long double>(1.5204998778130465376827466538919645287364515757580L), eps * 1000);
1077    BOOST_CHECK_CLOSE(tr1::erfc(static_cast<long double>(0)), static_cast<long double>(1), eps * 1000);
1078 
1079    BOOST_CHECK_CLOSE(tr1::erf(static_cast<long double>(0.125)), static_cast<long double>(0.14031620480133381739302944652162339818697958314985L), eps * 1000);
1080    BOOST_CHECK_CLOSE(tr1::erf(static_cast<long double>(0.5)), static_cast<long double>(0.52049987781304653768274665389196452873645157575796L), eps * 1000);
1081    BOOST_CHECK_CLOSE(tr1::erf(static_cast<long double>(1)), static_cast<long double>(0.84270079294971486934122063508260925929606699796630L), eps * 1000);
1082    BOOST_CHECK_CLOSE(tr1::erf(static_cast<long double>(5)), static_cast<long double>(0.9999999999984625402055719651498116565146166211099L), eps * 1000);
1083    BOOST_CHECK_CLOSE(tr1::erf(static_cast<long double>(-0.125)), static_cast<long double>(-0.14031620480133381739302944652162339818697958314985L), eps * 1000);
1084    BOOST_CHECK_CLOSE(tr1::erf(static_cast<long double>(-0.5)), static_cast<long double>(-0.52049987781304653768274665389196452873645157575796L), eps * 1000);
1085    BOOST_CHECK_CLOSE(tr1::erf(static_cast<long double>(0)), static_cast<long double>(0), eps * 1000);
1086 
1087    BOOST_CHECK_CLOSE(tr1::log1p(static_cast<long double>(0.582029759883880615234375e0)), static_cast<long double>(0.4587086807259736626531803258754840111707e0L), eps * 1000);
1088    BOOST_CHECK_CLOSE(tr1::expm1(static_cast<long double>(0.582029759883880615234375e0)), static_cast<long double>(0.7896673415707786528734865994546559029663e0L), eps * 1000);
1089    BOOST_CHECK_CLOSE(tr1::log1p(static_cast<long double>(-0.2047410048544406890869140625e-1)), static_cast<long double>(-0.2068660038044094868521052319477265955827e-1L), eps * 1000);
1090    BOOST_CHECK_CLOSE(tr1::expm1(static_cast<long double>(-0.2047410048544406890869140625e-1)), static_cast<long double>(-0.2026592921724753704129022027337835687888e-1L), eps * 1000);
1091 
1092    BOOST_CHECK_EQUAL(tr1::fmax(0.1L, -0.1L), 0.1L);
1093    BOOST_CHECK_EQUAL(tr1::fmin(0.1L, -0.1L), -0.1L);
1094 
1095    BOOST_CHECK_CLOSE(tr1::hypot(1.0L, 3.0L), std::sqrt(10.0L), eps * 500);
1096 
1097    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<long double>(3.5)), static_cast<long double>(1.2009736023470742248160218814507129957702389154682L), 5000 * eps);
1098    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<long double>(0.125)), static_cast<long double>(2.0194183575537963453202905211670995899482809521344L), 5000 * eps);
1099    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<long double>(-0.125)), static_cast<long double>(2.1653002489051702517540619481440174064962195287626L), 5000 * eps);
1100    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<long double>(-3.125)), static_cast<long double>(0.1543111276840418242676072830970532952413339012367L), 5000 * eps);
1101    BOOST_CHECK_CLOSE(tr1::lgamma(static_cast<long double>(-53249.0/1024)), static_cast<long double>(-149.43323093420259741100038126078721302600128285894L), 5000 * eps);
1102 
1103    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<long double>(3.5)), static_cast<long double>(3.3233509704478425511840640312646472177454052302295L), 5000 * eps);
1104    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<long double>(0.125)), static_cast<long double>(7.5339415987976119046992298412151336246104195881491L), 5000 * eps);
1105    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<long double>(-0.125)), static_cast<long double>(-8.7172188593831756100190140408231437691829605421405L), 5000 * eps);
1106    BOOST_CHECK_CLOSE(tr1::tgamma(static_cast<long double>(-3.125)), static_cast<long double>(1.1668538708507675587790157356605097019141636072094L), 5000 * eps);
1107 
1108 #ifdef BOOST_HAS_LONG_LONG
1109    BOOST_CHECK(tr1::llround(2.5L) == 3LL);
1110    BOOST_CHECK(tr1::llround(2.25L) == 2LL);
1111 #endif
1112    BOOST_CHECK(tr1::lround(2.5L) == 3L);
1113    BOOST_CHECK(tr1::lround(2.25L) == 2L);
1114    BOOST_CHECK(tr1::round(2.5L) == 3.0L);
1115    BOOST_CHECK(tr1::round(2.25L) == 2.0L);
1116 
1117    BOOST_CHECK(tr1::nextafter(1.0L, 2.0L) > 1.0L);
1118    BOOST_CHECK(tr1::nextafter(1.0L, -2.0L) < 1.0L);
1119    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0L, 2.0L), -2.0L) == 1.0L);
1120    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0L, -2.0L), 2.0L) == 1.0L);
1121    BOOST_CHECK(tr1::nextafter(1.0L, 2.0L) > 1.0L);
1122    BOOST_CHECK(tr1::nextafter(1.0L, -2.0L) < 1.0L);
1123    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0L, 2.0L), -2.0L) == 1.0L);
1124    BOOST_CHECK(tr1::nextafter(tr1::nextafter(1.0L, -2.0L), 2.0L) == 1.0L);
1125 
1126    BOOST_CHECK(tr1::trunc(2.5L) == 2.0L);
1127    BOOST_CHECK(tr1::trunc(2.25L) == 2.0L);
1128 
1129    //
1130    // Now for the TR1 math functions:
1131    //
1132    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerrel(4L, 5L, static_cast<long double>(0.5L)), static_cast<long double>(88.31510416666666666666666666666666666667L), eps * 100L);
1133    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerrel(10L, 0L, static_cast<long double>(2.5L)), static_cast<long double>(-0.8802526766660982969576719576719576719577L), eps * 100L);
1134    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerrel(10L, 1L, static_cast<long double>(4.5L)), static_cast<long double>(1.564311458042689732142857142857142857143L), eps * 100L);
1135    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerrel(10L, 6L, static_cast<long double>(8.5L)), static_cast<long double>(20.51596541066649098875661375661375661376L), eps * 100L);
1136    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerrel(10L, 12L, static_cast<long double>(12.5L)), static_cast<long double>(-199.5560968456234671241181657848324514991L), eps * 100L);
1137    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerrel(50L, 40L, static_cast<long double>(12.5L)), static_cast<long double>(-4.996769495006119488583146995907246595400e16L), eps * 100L);
1138 
1139    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(1L, static_cast<long double>(0.5L)), static_cast<long double>(0.5L), eps * 100L);
1140    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(4L, static_cast<long double>(0.5L)), static_cast<long double>(-0.3307291666666666666666666666666666666667L), eps * 100L);
1141    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(7L, static_cast<long double>(0.5L)), static_cast<long double>(-0.5183392237103174603174603174603174603175L), eps * 100L);
1142    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(20L, static_cast<long double>(0.5L)), static_cast<long double>(0.3120174870800154148915399248893113634676L), eps * 100L);
1143    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(50L, static_cast<long double>(0.5L)), static_cast<long double>(-0.3181388060269979064951118308575628226834L), eps * 100L);
1144 
1145    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(1L, static_cast<long double>(-0.5L)), static_cast<long double>(1.5L), eps * 100L);
1146    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(4L, static_cast<long double>(-0.5L)), static_cast<long double>(3.835937500000000000000000000000000000000L), eps * 100L);
1147    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(7L, static_cast<long double>(-0.5L)), static_cast<long double>(7.950934709821428571428571428571428571429L), eps * 100L);
1148    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(20L, static_cast<long double>(-0.5L)), static_cast<long double>(76.12915699869631476833699787070874048223L), eps * 100L);
1149    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(50L, static_cast<long double>(-0.5L)), static_cast<long double>(2307.428631277506570629232863491518399720L), eps * 100L);
1150 
1151    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(1L, static_cast<long double>(4.5L)), static_cast<long double>(-3.500000000000000000000000000000000000000L), eps * 100L);
1152    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(4L, static_cast<long double>(4.5L)), static_cast<long double>(0.08593750000000000000000000000000000000000L), eps * 100L);
1153    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(7L, static_cast<long double>(4.5L)), static_cast<long double>(-1.036928013392857142857142857142857142857L), eps * 100L);
1154    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(20L, static_cast<long double>(4.5L)), static_cast<long double>(1.437239150257817378525582974722170737587L), eps * 100L);
1155    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerrel(50L, static_cast<long double>(4.5L)), static_cast<long double>(-0.7795068145562651416494321484050019245248L), eps * 100L);
1156 
1157    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendrel(4L, 2L, static_cast<long double>(0.5L)), static_cast<long double>(4.218750000000000000000000000000000000000L), eps * 100L);
1158    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendrel(7L, 5L, static_cast<long double>(0.5L)), static_cast<long double>(5696.789530152175143607977274672800795328L), eps * 100L);
1159    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendrel(4L, 2L, static_cast<long double>(-0.5L)), static_cast<long double>(4.218750000000000000000000000000000000000L), eps * 100L);
1160    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendrel(7L, 5L, static_cast<long double>(-0.5L)), static_cast<long double>(5696.789530152175143607977274672800795328L), eps * 100L);
1161 
1162    BOOST_CHECK_CLOSE_FRACTION(tr1::legendrel(1L, static_cast<long double>(0.5L)), static_cast<long double>(0.5L), eps * 100L);
1163    BOOST_CHECK_CLOSE_FRACTION(tr1::legendrel(4L, static_cast<long double>(0.5L)), static_cast<long double>(-0.2890625000000000000000000000000000000000L), eps * 100L);
1164    BOOST_CHECK_CLOSE_FRACTION(tr1::legendrel(7L, static_cast<long double>(0.5L)), static_cast<long double>(0.2231445312500000000000000000000000000000L), eps * 100L);
1165    BOOST_CHECK_CLOSE_FRACTION(tr1::legendrel(40L, static_cast<long double>(0.5L)), static_cast<long double>(-0.09542943523261546936538467572384923220258L), eps * 100L);
1166 
1167    long double sv = eps / 1024;
1168    BOOST_CHECK_CLOSE(tr1::betal(static_cast<long double>(1L), static_cast<long double>(1L)), static_cast<long double>(1L), eps * 20L * 100L);
1169    BOOST_CHECK_CLOSE(tr1::betal(static_cast<long double>(1L), static_cast<long double>(4L)), static_cast<long double>(0.25L), eps * 20L * 100L);
1170    BOOST_CHECK_CLOSE(tr1::betal(static_cast<long double>(4L), static_cast<long double>(1L)), static_cast<long double>(0.25L), eps * 20L * 100L);
1171    BOOST_CHECK_CLOSE(tr1::betal(sv, static_cast<long double>(4L)), 1/sv, eps * 20L * 100L);
1172    BOOST_CHECK_CLOSE(tr1::betal(static_cast<long double>(4L), sv), 1/sv, eps * 20L * 100L);
1173    BOOST_CHECK_CLOSE(tr1::betal(static_cast<long double>(4L), static_cast<long double>(20L)), static_cast<long double>(0.00002823263692828910220214568040654997176736L), eps * 20L * 100L);
1174    BOOST_CHECK_CLOSE(tr1::betal(static_cast<long double>(0.0125L), static_cast<long double>(0.000023L)), static_cast<long double>(43558.24045647538375006349016083320744662L), eps * 20L * 100L);
1175 
1176    BOOST_CHECK_CLOSE(tr1::comp_ellint_1l(static_cast<long double>(0L)), static_cast<long double>(1.5707963267948966192313216916397514420985846996876L), eps * 5000L);
1177    BOOST_CHECK_CLOSE(tr1::comp_ellint_1l(static_cast<long double>(0.125L)), static_cast<long double>(1.5769867712158131421244030532288080803822271060839L), eps * 5000L);
1178    BOOST_CHECK_CLOSE(tr1::comp_ellint_1l(static_cast<long double>(0.25L)), static_cast<long double>(1.5962422221317835101489690714979498795055744578951L), eps * 5000L);
1179    BOOST_CHECK_CLOSE(tr1::comp_ellint_1l(static_cast<long double>(300L)/1024L), static_cast<long double>(1.6062331054696636704261124078746600894998873503208L), eps * 5000L);
1180    BOOST_CHECK_CLOSE(tr1::comp_ellint_1l(static_cast<long double>(400L)/1024L), static_cast<long double>(1.6364782007562008756208066125715722889067992997614L), eps * 5000L);
1181    BOOST_CHECK_CLOSE(tr1::comp_ellint_1l(static_cast<long double>(-0.5L)), static_cast<long double>(1.6857503548125960428712036577990769895008008941411L), eps * 5000L);
1182    BOOST_CHECK_CLOSE(tr1::comp_ellint_1l(static_cast<long double>(-0.75L)), static_cast<long double>(1.9109897807518291965531482187613425592531451316788L), eps * 5000L);
1183 
1184    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(-1L)), static_cast<long double>(1L), eps * 5000L);
1185    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(0L)), static_cast<long double>(1.5707963267948966192313216916397514420985846996876L), eps * 5000L);
1186    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(100L) / 1024L), static_cast<long double>(1.5670445330545086723323795143598956428788609133377L), eps * 5000L);
1187    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(200L) / 1024L), static_cast<long double>(1.5557071588766556854463404816624361127847775545087L), eps * 5000L);
1188    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(300L) / 1024L), static_cast<long double>(1.5365278991162754883035625322482669608948678755743L), eps * 5000L);
1189    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(400L) / 1024L), static_cast<long double>(1.5090417763083482272165682786143770446401437564021L), eps * 5000L);
1190    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(-0.5L)), static_cast<long double>(1.4674622093394271554597952669909161360253617523272L), eps * 5000L);
1191    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(-600L) / 1024L), static_cast<long double>(1.4257538571071297192428217218834579920545946473778L), eps * 5000L);
1192    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(-800L) / 1024L), static_cast<long double>(1.2927868476159125056958680222998765985004489572909L), eps * 5000L);
1193    BOOST_CHECK_CLOSE(tr1::comp_ellint_2l(static_cast<long double>(-900L) / 1024L), static_cast<long double>(1.1966864890248739524112920627353824133420353430982L), eps * 5000L);
1194 
1195    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(0.2L), static_cast<long double>(0L)), static_cast<long double>(1.586867847454166237308008033828114192951L), eps * 5000L);
1196    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(0.4L), static_cast<long double>(0L)), static_cast<long double>(1.639999865864511206865258329748601457626L), eps * 5000L);
1197    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(0L), static_cast<long double>(0L)), static_cast<long double>(1.57079632679489661923132169163975144209858469968755291048747L), eps * 5000L);
1198    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(0L), static_cast<long double>(0.5L)), static_cast<long double>(2.221441469079183123507940495030346849307L), eps * 5000L);
1199    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(0.3L), static_cast<long double>(-4L)), static_cast<long double>(0.712708870925620061597924858162260293305195624270730660081949L), eps * 5000L);
1200    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(-0.5L), static_cast<long double>(-1e+05L)), static_cast<long double>(0.00496944596485066055800109163256108604615568144080386919012831L), eps * 5000L);
1201    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(-0.75L), static_cast<long double>(-1e+10L)), static_cast<long double>(0.0000157080225184890546939710019277357161497407143903832703317801L), eps * 5000L);
1202    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(-0.875L), static_cast<long double>(1L) / 1024L), static_cast<long double>(2.18674503176462374414944618968850352696579451638002110619287L), eps * 5000L);
1203    BOOST_CHECK_CLOSE(tr1::comp_ellint_3l(static_cast<long double>(-0.875L), static_cast<long double>(1023L)/1024L), static_cast<long double>(101.045289804941384100960063898569538919135722087486350366997L), eps * 5000L);
1204 
1205    BOOST_CHECK_CLOSE(tr1::cyl_bessel_il(static_cast<long double>(2.25L), static_cast<long double>(1L)/(1024*1024L)), static_cast<long double>(2.34379212133481347189068464680335815256364262507955635911656e-15L), eps * 5000L);
1206    BOOST_CHECK_CLOSE(tr1::cyl_bessel_il(static_cast<long double>(5.5L), static_cast<long double>(3.125L)), static_cast<long double>(0.0583514045989371500460946536220735787163510569634133670181210L), eps * 5000L);
1207    BOOST_CHECK_CLOSE(tr1::cyl_bessel_il(static_cast<long double>(-5L) + static_cast<long double>(1L)/1024L, static_cast<long double>(2.125L)), static_cast<long double>(0.0267920938009571023702933210070984416052633027166975342895062L), eps * 5000L);
1208    BOOST_CHECK_CLOSE(tr1::cyl_bessel_il(static_cast<long double>(-5.5L), static_cast<long double>(10L)), static_cast<long double>(597.577606961369169607937419869926705730305175364662688426534L), eps * 5000L);
1209    BOOST_CHECK_CLOSE(tr1::cyl_bessel_il(static_cast<long double>(-10486074L)/(1024*1024L), static_cast<long double>(1L)/1024L), static_cast<long double>(1.41474005665181350367684623930576333542989766867888186478185e35L), eps * 5000L);
1210    BOOST_CHECK_CLOSE(tr1::cyl_bessel_il(static_cast<long double>(-10486074L)/(1024*1024L), static_cast<long double>(50L)), static_cast<long double>(1.07153277202900671531087024688681954238311679648319534644743e20L), eps * 5000L);
1211    BOOST_CHECK_CLOSE(tr1::cyl_bessel_il(static_cast<long double>(144794L)/1024L, static_cast<long double>(100L)), static_cast<long double>(2066.27694757392660413922181531984160871678224178890247540320L), eps * 5000L);
1212    BOOST_CHECK_CLOSE(tr1::cyl_bessel_il(static_cast<long double>(-144794L)/1024L, static_cast<long double>(100L)), static_cast<long double>(2066.27694672763190927440969155740243346136463461655104698748L), eps * 5000L);
1213 
1214    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(2457L)/1024L, static_cast<long double>(1L)/1024L), static_cast<long double>(3.80739920118603335646474073457326714709615200130620574875292e-9L), eps * 50000L);
1215    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(5.5L), static_cast<long double>(3217L)/1024L), static_cast<long double>(0.0281933076257506091621579544064767140470089107926550720453038L), eps * 5000L);
1216    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(-5.5L), static_cast<long double>(3217L)/1024L), static_cast<long double>(-2.55820064470647911823175836997490971806135336759164272675969L), eps * 5000L);
1217    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(-5.5L), static_cast<long double>(1e+04L)), static_cast<long double>(2.449843111985605522111159013846599118397e-03L), eps * 50000L);
1218    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(5.5L), static_cast<long double>(1e+04L)), static_cast<long double>(0.00759343502722670361395585198154817047185480147294665270646578L), eps * 5000L);
1219    //BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(5.5L), static_cast<long double>(1e+06L)), static_cast<long double>(-0.000747424248595630177396350688505919533097973148718960064663632L), eps * 50000L);
1220    //BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(5.125L), static_cast<long double>(1e+06L)), static_cast<long double>(-0.000776600124835704280633640911329691642748783663198207360238214L), eps * 50000L);
1221    //BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(5.875L), static_cast<long double>(1e+06L)), static_cast<long double>(-0.000466322721115193071631008581529503095819705088484386434589780L), eps * 50000L);
1222    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(0.5L), static_cast<long double>(101L)), static_cast<long double>(0.0358874487875643822020496677692429287863419555699447066226409L), eps * 5000L);
1223    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(-5.5L), static_cast<long double>(1e+04L)), static_cast<long double>(0.00244984311198560552211115901384659911839737686676766460822577L), eps * 50000L);
1224    //BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(-5.5L), static_cast<long double>(1e+06L)), static_cast<long double>(0.000279243200433579511095229508894156656558211060453622750659554L), eps * 50000L);
1225    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(-0.5L), static_cast<long double>(101L)), static_cast<long double>(0.0708184798097594268482290389188138201440114881159344944791454L), eps * 5000L);
1226    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(1L)/1024L), static_cast<long double>(1.41474013160494695750009004222225969090304185981836460288562e35L), eps * 5000L);
1227    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(15L)), static_cast<long double>(-0.0902239288885423309568944543848111461724911781719692852541489L), eps * 5000L);
1228    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(10486074L) / (1024*1024L), static_cast<long double>(1e+02L)), static_cast<long double>(-0.0547064914615137807616774867984047583596945624129838091326863L), eps * 5000L);
1229    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(10486074L) / (1024*1024L), static_cast<long double>(2e+04L)), static_cast<long double>(-0.00556783614400875611650958980796060611309029233226596737701688L), eps * 5000L);
1230    BOOST_CHECK_CLOSE(tr1::cyl_bessel_jl(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(1e+02L)), static_cast<long double>(-0.0547613660316806551338637153942604550779513947674222863858713L), eps * 5000L);
1231 
1232    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(0.5L), static_cast<long double>(0.875L)), static_cast<long double>(0.558532231646608646115729767013630967055657943463362504577189L), eps * 5000L);
1233    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(0.5L), static_cast<long double>(1.125L)), static_cast<long double>(0.383621010650189547146769320487006220295290256657827220786527L), eps * 5000L);
1234    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(2.25L), static_cast<long double>(std::ldexp(1.0L, -30L))), static_cast<long double>(5.62397392719283271332307799146649700147907612095185712015604e20L), eps * 5000L);
1235    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(5.5L), static_cast<long double>(3217L)/1024L), static_cast<long double>(1.30623288775012596319554857587765179889689223531159532808379L), eps * 5000L);
1236    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(-5.5L), static_cast<long double>(10L)), static_cast<long double>(0.0000733045300798502164644836879577484533096239574909573072142667L), eps * 5000L);
1237    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(-5.5L), static_cast<long double>(100L)), static_cast<long double>(5.41274555306792267322084448693957747924412508020839543293369e-45L), eps * 5000L);
1238    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(10240L)/1024L, static_cast<long double>(1L)/1024L), static_cast<long double>(2.35522579263922076203415803966825431039900000000993410734978e38L), eps * 5000L);
1239    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(10240L)/1024L, static_cast<long double>(10L)), static_cast<long double>(0.00161425530039067002345725193091329085443750382929208307802221L), eps * 5000L);
1240    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(144793L)/1024L, static_cast<long double>(100L)), static_cast<long double>(1.39565245860302528069481472855619216759142225046370312329416e-6L), eps * 5000L);
1241    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 7000L);
1242 
1243    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(0.5L), static_cast<long double>(1L) / (1024*1024L)), static_cast<long double>(-817.033790261762580469303126467917092806755460418223776544122L), eps * 5000L);
1244    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(5.5L), static_cast<long double>(3.125L)), static_cast<long double>(-2.61489440328417468776474188539366752698192046890955453259866L), eps * 5000L);
1245    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(-5.5L), static_cast<long double>(3.125L)), static_cast<long double>(-0.0274994493896489729948109971802244976377957234563871795364056L), eps * 5000L);
1246    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(-5.5L), static_cast<long double>(1e+04L)), static_cast<long double>(-0.00759343502722670361395585198154817047185480147294665270646578L), eps * 5000L);
1247    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(1L)/1024L), static_cast<long double>(-1.50382374389531766117868938966858995093408410498915220070230e38L), eps * 5000L);
1248    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(1e+02L)), static_cast<long double>(0.0583041891319026009955779707640455341990844522293730214223545L), eps * 5000L);
1249    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(141.75L), static_cast<long double>(1e+02L)), static_cast<long double>(-5.38829231428696507293191118661269920130838607482708483122068e9L), eps * 5000L);
1250    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(141.75L), static_cast<long double>(2e+04L)), static_cast<long double>(-0.00376577888677186194728129112270988602876597726657372330194186L), eps * 50000L);
1251    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(-141.75L), static_cast<long double>(1e+02L)), static_cast<long double>(-3.81009803444766877495905954105669819951653361036342457919021e9L), eps * 5000L);
1252 
1253    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0L), static_cast<long double>(0L)), static_cast<long double>(0L), eps * 5000L);
1254    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0L), static_cast<long double>(-10L)), static_cast<long double>(-10L), eps * 5000L);
1255    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(-1L), static_cast<long double>(-1L)), static_cast<long double>(-1.2261911708835170708130609674719067527242483502207L), eps * 5000L);
1256    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.875L), static_cast<long double>(-4L)), static_cast<long double>(-5.3190556182262405182189463092940736859067548232647L), eps * 5000L);
1257    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(-0.625L), static_cast<long double>(8L)), static_cast<long double>(9.0419973860310100524448893214394562615252527557062L), eps * 5000L);
1258    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.875L), static_cast<long double>(1e-05L)), static_cast<long double>(0.000010000000000127604166668510945638036143355898993088L), eps * 5000L);
1259    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(10L)/1024L, static_cast<long double>(1e+05L)), static_cast<long double>(100002.38431454899771096037307519328741455615271038L), eps * 5000L);
1260    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(1L), static_cast<long double>(1e-20L)), static_cast<long double>(1.0000000000000000000000000000000000000000166666667e-20L), eps * 5000L);
1261    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(1e-20L), static_cast<long double>(1e-20L)), static_cast<long double>(1.000000000000000e-20L), eps * 5000L);
1262    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(400L)/1024L, static_cast<long double>(1e+20L)), static_cast<long double>(1.0418143796499216839719289963154558027005142709763e20L), eps * 5000L);
1263    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.5L), static_cast<long double>(2L)), static_cast<long double>(2.1765877052210673672479877957388515321497888026770L), eps * 5000L);
1264    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.5L), static_cast<long double>(4L)), static_cast<long double>(4.2543274975235836861894752787874633017836785640477L), eps * 5000L);
1265    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.5L), static_cast<long double>(6L)), static_cast<long double>(6.4588766202317746302999080620490579800463614807916L), eps * 5000L);
1266    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.5L), static_cast<long double>(10L)), static_cast<long double>(10.697409951222544858346795279378531495869386960090L), eps * 5000L);
1267    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.5L), static_cast<long double>(-2L)), static_cast<long double>(-2.1765877052210673672479877957388515321497888026770L), eps * 5000L);
1268    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.5L), static_cast<long double>(-4L)), static_cast<long double>(-4.2543274975235836861894752787874633017836785640477L), eps * 5000L);
1269    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.5L), static_cast<long double>(-6L)), static_cast<long double>(-6.4588766202317746302999080620490579800463614807916L), eps * 5000L);
1270    BOOST_CHECK_CLOSE(tr1::ellint_1l(static_cast<long double>(0.5L), static_cast<long double>(-10L)), static_cast<long double>(-10.697409951222544858346795279378531495869386960090L), eps * 5000L);
1271 
1272    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(0L), static_cast<long double>(0L)), static_cast<long double>(0L), eps * 5000L);
1273    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(0L), static_cast<long double>(-10L)), static_cast<long double>(-10L), eps * 5000L);
1274    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(-1L), static_cast<long double>(-1L)), static_cast<long double>(-0.84147098480789650665250232163029899962256306079837L), eps * 5000L);
1275    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(900L) / 1024L, static_cast<long double>(-4L)), static_cast<long double>(-3.1756145986492562317862928524528520686391383168377L), eps * 5000L);
1276    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(-600L) / 1024L, static_cast<long double>(8L)), static_cast<long double>(7.2473147180505693037677015377802777959345489333465L), eps * 5000L);
1277    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(800L) / 1024L, static_cast<long double>(1e-05L)), static_cast<long double>(9.999999999898274739584436515967055859383969942432E-6L), eps * 5000L);
1278    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(100L) / 1024L, static_cast<long double>(1e+05L)), static_cast<long double>(99761.153306972066658135668386691227343323331995888L), eps * 5000L);
1279    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(-0.5L), static_cast<long double>(1e+10L)), static_cast<long double>(9.3421545766487137036576748555295222252286528414669e9L), eps * 5000L);
1280    BOOST_CHECK_CLOSE(tr1::ellint_2l(static_cast<long double>(400L) / 1024L, ldexp(static_cast<long double>(1L), 66L)), static_cast<long double>(7.0886102721911705466476846969992069994308167515242e19L), eps * 5000L);
1281 
1282    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(1L), static_cast<long double>(-1L)), static_cast<long double>(-1.557407724654902230506974807458360173087L), eps * 5000L);
1283    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.4L), static_cast<long double>(0L), static_cast<long double>(-4L)), static_cast<long double>(-4.153623371196831087495427530365430979011L), eps * 5000L);
1284    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(-0.6L), static_cast<long double>(0L), static_cast<long double>(8L)), static_cast<long double>(8.935930619078575123490612395578518914416L), eps * 5000L);
1285    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.25L), static_cast<long double>(0L), static_cast<long double>(0.5L)), static_cast<long double>(0.501246705365439492445236118603525029757890291780157969500480L), eps * 5000L);
1286    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(0L), static_cast<long double>(0.5L)), static_cast<long double>(0.5L), eps * 5000L);
1287    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(-2L), static_cast<long double>(0.5L)), static_cast<long double>(0.437501067017546278595664813509803743009132067629603474488486L), eps * 5000L);
1288    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(0.25L), static_cast<long double>(0.5L)), static_cast<long double>(0.510269830229213412212501938035914557628394166585442994564135L), eps * 5000L);
1289    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(0.75L), static_cast<long double>(0.5L)), static_cast<long double>(0.533293253875952645421201146925578536430596894471541312806165L), eps * 5000L);
1290    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(0.75L), static_cast<long double>(0.75L)), static_cast<long double>(0.871827580412760575085768367421866079353646112288567703061975L), eps * 5000L);
1291    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(1L), static_cast<long double>(0.25L)), static_cast<long double>(0.255341921221036266504482236490473678204201638800822621740476L), eps * 5000L);
1292    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(2L), static_cast<long double>(0.25L)), static_cast<long double>(0.261119051639220165094943572468224137699644963125853641716219L), eps * 5000L);
1293    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0L), static_cast<long double>(1023L)/1024L, static_cast<long double>(1.5L)), static_cast<long double>(13.2821612239764190363647953338544569682942329604483733197131L), eps * 5000L);
1294    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.5L), static_cast<long double>(0.5L), static_cast<long double>(-1L)), static_cast<long double>(-1.228014414316220642611298946293865487807L), eps * 5000L);
1295    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.5L), static_cast<long double>(0.5L), static_cast<long double>(1e+10L)), static_cast<long double>(1.536591003599172091573590441336982730551e+10L), eps * 5000L);
1296    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.75L), static_cast<long double>(-1e+05L), static_cast<long double>(10L)), static_cast<long double>(0.0347926099493147087821620459290460547131012904008557007934290L), eps * 5000L);
1297    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.875L), static_cast<long double>(-1e+10L), static_cast<long double>(10L)), static_cast<long double>(0.000109956202759561502329123384755016959364346382187364656768212L), eps * 5000L);
1298    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.875L), static_cast<long double>(-1e+10L), static_cast<long double>(1e+20L)), static_cast<long double>(1.00000626665567332602765201107198822183913978895904937646809e15L), eps * 5000L);
1299    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.875L), static_cast<long double>(-1e+10L), static_cast<long double>(1608L)/1024L), static_cast<long double>(0.0000157080616044072676127333183571107873332593142625043567690379L), eps * 5000L);
1300    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.875L), 1-static_cast<long double>(1L) / 1024L, static_cast<long double>(1e+20L)), static_cast<long double>(6.43274293944380717581167058274600202023334985100499739678963e21L), eps * 5000L);
1301    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.25L), static_cast<long double>(50L), static_cast<long double>(0.1L)), static_cast<long double>(0.124573770342749525407523258569507331686458866564082916835900L), eps * 5000L);
1302    BOOST_CHECK_CLOSE(tr1::ellint_3l(static_cast<long double>(0.25L), static_cast<long double>(1.125L), static_cast<long double>(1L)), static_cast<long double>(1.77299767784815770192352979665283069318388205110727241629752L), eps * 5000L);
1303 
1304    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(1L)/1024L), static_cast<long double>(-6.35327933972759151358547423727042905862963067106751711596065L), eps * 5000L);
1305    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(0.125L)), static_cast<long double>(-1.37320852494298333781545045921206470808223543321810480716122L), eps * 5000L);
1306    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(0.5L)), static_cast<long double>(0.454219904863173579920523812662802365281405554352642045162818L), eps * 5000L);
1307    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(1L)), static_cast<long double>(1.89511781635593675546652093433163426901706058173270759164623L), eps * 5000L);
1308    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(50.5L)), static_cast<long double>(1.72763195602911805201155668940185673806099654090456049881069e20L), eps * 5000L);
1309    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(-1L)/1024L), static_cast<long double>(-6.35523246483107180261445551935803221293763008553775821607264L), eps * 5000L);
1310    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(-0.125L)), static_cast<long double>(-1.62342564058416879145630692462440887363310605737209536579267L), eps * 5000L);
1311    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(-0.5L)), static_cast<long double>(-0.559773594776160811746795939315085235226846890316353515248293L), eps * 5000L);
1312    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(-1L)), static_cast<long double>(-0.219383934395520273677163775460121649031047293406908207577979L), eps * 5000L);
1313    BOOST_CHECK_CLOSE(tr1::expintl(static_cast<long double>(-50.5L)), static_cast<long double>(-2.27237132932219350440719707268817831250090574830769670186618e-24L), eps * 5000L);
1314 
1315    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(0L, static_cast<long double>(1L)), static_cast<long double>(1.L), 100L * eps);
1316    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(1L, static_cast<long double>(1L)), static_cast<long double>(2.L), 100L * eps);
1317    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(1L, static_cast<long double>(2L)), static_cast<long double>(4.L), 100L * eps);
1318    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(1L, static_cast<long double>(10L)), static_cast<long double>(20L), 100L * eps);
1319    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(1L, static_cast<long double>(100L)), static_cast<long double>(200L), 100L * eps);
1320    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(1L, static_cast<long double>(1e6L)), static_cast<long double>(2e6L), 100L * eps);
1321    //BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(10L, static_cast<long double>(30L)), static_cast<long double>(5.896624628001300E+17L), 1000L * eps);
1322    //BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(10L, static_cast<long double>(1000L)), static_cast<long double>(1.023976960161280E+33L), 1000L * eps);
1323    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(10L, static_cast<long double>(10L)), static_cast<long double>(8.093278209760000E+12L), 100L * eps);
1324    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(10L, static_cast<long double>(-10L)), static_cast<long double>(8.093278209760000E+12L), 100L * eps);
1325    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(3L, static_cast<long double>(-10L)), static_cast<long double>(-7.880000000000000E+3L), 100L * eps);
1326    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(3L, static_cast<long double>(-1000L)), static_cast<long double>(-7.999988000000000E+9L), 100L * eps);
1327    BOOST_CHECK_CLOSE_FRACTION(tr1::hermitel(3L, static_cast<long double>(-1000000L)), static_cast<long double>(-7.999999999988000E+18L), 100L * eps);
1328 
1329    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(0.125L)), static_cast<long double>(-0.63277562349869525529352526763564627152686379131122L), eps * 5000L);
1330    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(1023L) / static_cast<long double>(1024L)), static_cast<long double>(-1023.4228554489429786541032870895167448906103303056L), eps * 5000L);
1331    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(1025L) / static_cast<long double>(1024L)), static_cast<long double>(1024.5772867695045940578681624248887776501597556226L), eps * 5000L);
1332    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(0.5L)), static_cast<long double>(-1.46035450880958681288949915251529801246722933101258149054289L), eps * 5000L);
1333    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(1.125L)), static_cast<long double>(8.5862412945105752999607544082693023591996301183069L), eps * 5000L);
1334    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(2L)), static_cast<long double>(1.6449340668482264364724151666460251892189499012068L), eps * 5000L);
1335    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(3.5L)), static_cast<long double>(1.1267338673170566464278124918549842722219969574036L), eps * 5000L);
1336    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(4L)), static_cast<long double>(1.08232323371113819151600369654116790277475095191872690768298L), eps * 5000L);
1337    BOOST_CHECK_CLOSE(tr1::riemann_zetal(4L + static_cast<long double>(1L) / 1024L), static_cast<long double>(1.08225596856391369799036835439238249195298434901488518878804L), eps * 5000L);
1338    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(4.5L)), static_cast<long double>(1.05470751076145426402296728896028011727249383295625173068468L), eps * 5000L);
1339    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(6.5L)), static_cast<long double>(1.01200589988852479610078491680478352908773213619144808841031L), eps * 5000L);
1340    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(7.5L)), static_cast<long double>(1.00582672753652280770224164440459408011782510096320822989663L), eps * 5000L);
1341    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(8.125L)), static_cast<long double>(1.0037305205308161603183307711439385250181080293472L), eps * 5000L);
1342    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(16.125L)), static_cast<long double>(1.0000140128224754088474783648500235958510030511915L), eps * 5000L);
1343    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(0L)), static_cast<long double>(-0.5L), eps * 5000L);
1344    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-0.125L)), static_cast<long double>(-0.39906966894504503550986928301421235400280637468895L), eps * 5000L);
1345    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-1L)), static_cast<long double>(-0.083333333333333333333333333333333333333333333333333L), eps * 5000L);
1346    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-2L)), static_cast<long double>(0L), eps * 5000L);
1347    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-2.5L)), static_cast<long double>(0.0085169287778503305423585670283444869362759902200745L), eps * 5000L * 3L);
1348    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-3L)), static_cast<long double>(0.0083333333333333333333333333333333333333333333333333L), eps * 5000L);
1349    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-4L)), static_cast<long double>(0L), eps * 5000L);
1350    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-20L)), static_cast<long double>(0L), eps * 5000L * 100L);
1351    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-21L)), static_cast<long double>(-281.46014492753623188405797101449275362318840579710L), eps * 5000L * 100L);
1352    BOOST_CHECK_CLOSE(tr1::riemann_zetal(static_cast<long double>(-30.125L)), static_cast<long double>(2.2762941726834511267740045451463455513839970804578e7L), eps * 5000L * 100L);
1353 
1354    BOOST_CHECK_CLOSE(tr1::sph_bessell(0L, static_cast<long double>(0.1433600485324859619140625e-1L)), static_cast<long double>(0.9999657468461303487880990241993035937654e0L),  eps * 5000L * 100L);
1355    BOOST_CHECK_CLOSE(tr1::sph_bessell(0L, static_cast<long double>(0.1760916970670223236083984375e-1L)), static_cast<long double>(0.9999483203249623334100130061926184665364e0L),  eps * 5000L * 100L);
1356    BOOST_CHECK_CLOSE(tr1::sph_bessell(2L, static_cast<long double>(0.1433600485324859619140625e-1L)), static_cast<long double>(0.1370120120703995134662099191103188366059e-4L),  eps * 5000L * 100L);
1357    BOOST_CHECK_CLOSE(tr1::sph_bessell(2L, static_cast<long double>(0.1760916970670223236083984375e-1L)), static_cast<long double>(0.2067173265753174063228459655801741280461e-4L),  eps * 5000L * 100L);
1358    BOOST_CHECK_CLOSE(tr1::sph_bessell(7L, static_cast<long double>(0.1252804412841796875e3L)), static_cast<long double>(0.7887555711993028736906736576314283291289e-2L),  eps * 50000L * 100L);
1359    BOOST_CHECK_CLOSE(tr1::sph_bessell(7L, static_cast<long double>(0.25554705810546875e3L)), static_cast<long double>(-0.1463292767579579943284849187188066532514e-2L),  eps * 5000L * 100L);
1360 
1361    BOOST_CHECK_CLOSE(tr1::sph_neumannl(0L, static_cast<long double>(0.408089816570281982421875e0L)), static_cast<long double>(-0.2249212131304610409189209411089291558038e1L), eps * 5000L * 100L);
1362    BOOST_CHECK_CLOSE(tr1::sph_neumannl(0L, static_cast<long double>(0.6540834903717041015625e0L)), static_cast<long double>(-0.1213309779166084571756446746977955970241e1L),   eps * 5000L * 100L);
1363    BOOST_CHECK_CLOSE(tr1::sph_neumannl(2L, static_cast<long double>(0.408089816570281982421875e0L)), static_cast<long double>(-0.4541702641837159203058389758895634766256e2L),   eps * 5000L * 100L);
1364    BOOST_CHECK_CLOSE(tr1::sph_neumannl(2L, static_cast<long double>(0.6540834903717041015625e0L)), static_cast<long double>(-0.1156112621471167110574129561700037138981e2L),   eps * 5000L * 100L);
1365    BOOST_CHECK_CLOSE(tr1::sph_neumannl(10L, static_cast<long double>(0.1097540378570556640625e1L)), static_cast<long double>(-0.2427889658115064857278886600528596240123e9L),   eps * 5000L * 100L);
1366    BOOST_CHECK_CLOSE(tr1::sph_neumannl(10L, static_cast<long double>(0.30944411754608154296875e1L)), static_cast<long double>(-0.3394649246350136450439882104151313759251e4L),   eps * 5000L * 100L);
1367 
1368    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendrel(3L, 2L, static_cast<long double>(0.5L)), static_cast<long double>(0.2061460599687871330692286791802688341213L), eps * 5000L);
1369    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendrel(40L, 15L, static_cast<long double>(0.75L)), static_cast<long double>(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000L);
1370 
1371    //
1372    // Now all over again but without the "f" suffix on the function names this time:
1373    //
1374    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(4L, 5L, static_cast<long double>(0.5L)), static_cast<long double>(88.31510416666666666666666666666666666667L), eps * 100L);
1375    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10L, 0L, static_cast<long double>(2.5L)), static_cast<long double>(-0.8802526766660982969576719576719576719577L), eps * 100L);
1376    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10L, 1L, static_cast<long double>(4.5L)), static_cast<long double>(1.564311458042689732142857142857142857143L), eps * 100L);
1377    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10L, 6L, static_cast<long double>(8.5L)), static_cast<long double>(20.51596541066649098875661375661375661376L), eps * 100L);
1378    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(10L, 12L, static_cast<long double>(12.5L)), static_cast<long double>(-199.5560968456234671241181657848324514991L), eps * 100L);
1379    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_laguerre(50L, 40L, static_cast<long double>(12.5L)), static_cast<long double>(-4.996769495006119488583146995907246595400e16L), eps * 100L);
1380 
1381    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1L, static_cast<long double>(0.5L)), static_cast<long double>(0.5L), eps * 100L);
1382    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4L, static_cast<long double>(0.5L)), static_cast<long double>(-0.3307291666666666666666666666666666666667L), eps * 100L);
1383    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7L, static_cast<long double>(0.5L)), static_cast<long double>(-0.5183392237103174603174603174603174603175L), eps * 100L);
1384    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20L, static_cast<long double>(0.5L)), static_cast<long double>(0.3120174870800154148915399248893113634676L), eps * 100L);
1385    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50L, static_cast<long double>(0.5L)), static_cast<long double>(-0.3181388060269979064951118308575628226834L), eps * 100L);
1386 
1387    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1L, static_cast<long double>(-0.5L)), static_cast<long double>(1.5L), eps * 100L);
1388    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4L, static_cast<long double>(-0.5L)), static_cast<long double>(3.835937500000000000000000000000000000000L), eps * 100L);
1389    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7L, static_cast<long double>(-0.5L)), static_cast<long double>(7.950934709821428571428571428571428571429L), eps * 100L);
1390    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20L, static_cast<long double>(-0.5L)), static_cast<long double>(76.12915699869631476833699787070874048223L), eps * 100L);
1391    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50L, static_cast<long double>(-0.5L)), static_cast<long double>(2307.428631277506570629232863491518399720L), eps * 100L);
1392 
1393    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(1L, static_cast<long double>(4.5L)), static_cast<long double>(-3.500000000000000000000000000000000000000L), eps * 100L);
1394    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(4L, static_cast<long double>(4.5L)), static_cast<long double>(0.08593750000000000000000000000000000000000L), eps * 100L);
1395    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(7L, static_cast<long double>(4.5L)), static_cast<long double>(-1.036928013392857142857142857142857142857L), eps * 100L);
1396    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(20L, static_cast<long double>(4.5L)), static_cast<long double>(1.437239150257817378525582974722170737587L), eps * 100L);
1397    BOOST_CHECK_CLOSE_FRACTION(tr1::laguerre(50L, static_cast<long double>(4.5L)), static_cast<long double>(-0.7795068145562651416494321484050019245248L), eps * 100L);
1398 
1399    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(4L, 2L, static_cast<long double>(0.5L)), static_cast<long double>(4.218750000000000000000000000000000000000L), eps * 100L);
1400    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(7L, 5L, static_cast<long double>(0.5L)), static_cast<long double>(5696.789530152175143607977274672800795328L), eps * 100L);
1401    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(4L, 2L, static_cast<long double>(-0.5L)), static_cast<long double>(4.218750000000000000000000000000000000000L), eps * 100L);
1402    BOOST_CHECK_CLOSE_FRACTION(tr1::assoc_legendre(7L, 5L, static_cast<long double>(-0.5L)), static_cast<long double>(5696.789530152175143607977274672800795328L), eps * 100L);
1403 
1404    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(1L, static_cast<long double>(0.5L)), static_cast<long double>(0.5L), eps * 100L);
1405    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(4L, static_cast<long double>(0.5L)), static_cast<long double>(-0.2890625000000000000000000000000000000000L), eps * 100L);
1406    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(7L, static_cast<long double>(0.5L)), static_cast<long double>(0.2231445312500000000000000000000000000000L), eps * 100L);
1407    BOOST_CHECK_CLOSE_FRACTION(tr1::legendre(40L, static_cast<long double>(0.5L)), static_cast<long double>(-0.09542943523261546936538467572384923220258L), eps * 100L);
1408 
1409    BOOST_CHECK_CLOSE(tr1::beta(static_cast<long double>(1L), static_cast<long double>(1L)), static_cast<long double>(1L), eps * 20L * 100L);
1410    BOOST_CHECK_CLOSE(tr1::beta(static_cast<long double>(1L), static_cast<long double>(4L)), static_cast<long double>(0.25L), eps * 20L * 100L);
1411    BOOST_CHECK_CLOSE(tr1::beta(static_cast<long double>(4L), static_cast<long double>(1L)), static_cast<long double>(0.25L), eps * 20L * 100L);
1412    BOOST_CHECK_CLOSE(tr1::beta(sv, static_cast<long double>(4L)), 1/sv, eps * 20L * 100L);
1413    BOOST_CHECK_CLOSE(tr1::beta(static_cast<long double>(4L), sv), 1/sv, eps * 20L * 100L);
1414    BOOST_CHECK_CLOSE(tr1::beta(static_cast<long double>(4L), static_cast<long double>(20L)), static_cast<long double>(0.00002823263692828910220214568040654997176736L), eps * 20L * 100L);
1415    BOOST_CHECK_CLOSE(tr1::beta(static_cast<long double>(0.0125L), static_cast<long double>(0.000023L)), static_cast<long double>(43558.24045647538375006349016083320744662L), eps * 20L * 100L);
1416 
1417    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<long double>(0L)), static_cast<long double>(1.5707963267948966192313216916397514420985846996876L), eps * 5000L);
1418    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<long double>(0.125L)), static_cast<long double>(1.5769867712158131421244030532288080803822271060839L), eps * 5000L);
1419    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<long double>(0.25L)), static_cast<long double>(1.5962422221317835101489690714979498795055744578951L), eps * 5000L);
1420    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<long double>(300L)/1024L), static_cast<long double>(1.6062331054696636704261124078746600894998873503208L), eps * 5000L);
1421    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<long double>(400L)/1024L), static_cast<long double>(1.6364782007562008756208066125715722889067992997614L), eps * 5000L);
1422    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<long double>(-0.5L)), static_cast<long double>(1.6857503548125960428712036577990769895008008941411L), eps * 5000L);
1423    BOOST_CHECK_CLOSE(tr1::comp_ellint_1(static_cast<long double>(-0.75L)), static_cast<long double>(1.9109897807518291965531482187613425592531451316788L), eps * 5000L);
1424 
1425    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(-1L)), static_cast<long double>(1L), eps * 5000L);
1426    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(0L)), static_cast<long double>(1.5707963267948966192313216916397514420985846996876L), eps * 5000L);
1427    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(100L) / 1024L), static_cast<long double>(1.5670445330545086723323795143598956428788609133377L), eps * 5000L);
1428    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(200L) / 1024L), static_cast<long double>(1.5557071588766556854463404816624361127847775545087L), eps * 5000L);
1429    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(300L) / 1024L), static_cast<long double>(1.5365278991162754883035625322482669608948678755743L), eps * 5000L);
1430    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(400L) / 1024L), static_cast<long double>(1.5090417763083482272165682786143770446401437564021L), eps * 5000L);
1431    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(-0.5L)), static_cast<long double>(1.4674622093394271554597952669909161360253617523272L), eps * 5000L);
1432    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(-600L) / 1024L), static_cast<long double>(1.4257538571071297192428217218834579920545946473778L), eps * 5000L);
1433    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(-800L) / 1024L), static_cast<long double>(1.2927868476159125056958680222998765985004489572909L), eps * 5000L);
1434    BOOST_CHECK_CLOSE(tr1::comp_ellint_2(static_cast<long double>(-900L) / 1024L), static_cast<long double>(1.1966864890248739524112920627353824133420353430982L), eps * 5000L);
1435 
1436    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(0.2L), static_cast<long double>(0L)), static_cast<long double>(1.586867847454166237308008033828114192951L), eps * 5000L);
1437    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(0.4L), static_cast<long double>(0L)), static_cast<long double>(1.639999865864511206865258329748601457626L), eps * 5000L);
1438    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(0L), static_cast<long double>(0L)), static_cast<long double>(1.57079632679489661923132169163975144209858469968755291048747L), eps * 5000L);
1439    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(0L), static_cast<long double>(0.5L)), static_cast<long double>(2.221441469079183123507940495030346849307L), eps * 5000L);
1440    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(0.3L), static_cast<long double>(-4L)), static_cast<long double>(0.712708870925620061597924858162260293305195624270730660081949L), eps * 5000L);
1441    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(-0.5L), static_cast<long double>(-1e+05L)), static_cast<long double>(0.00496944596485066055800109163256108604615568144080386919012831L), eps * 5000L);
1442    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(-0.75L), static_cast<long double>(-1e+10L)), static_cast<long double>(0.0000157080225184890546939710019277357161497407143903832703317801L), eps * 5000L);
1443    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(-0.875L), static_cast<long double>(1L) / 1024L), static_cast<long double>(2.18674503176462374414944618968850352696579451638002110619287L), eps * 5000L);
1444    BOOST_CHECK_CLOSE(tr1::comp_ellint_3(static_cast<long double>(-0.875L), static_cast<long double>(1023L)/1024L), static_cast<long double>(101.045289804941384100960063898569538919135722087486350366997L), eps * 5000L);
1445 
1446    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<long double>(2.25L), static_cast<long double>(1L)/(1024*1024L)), static_cast<long double>(2.34379212133481347189068464680335815256364262507955635911656e-15L), eps * 5000L);
1447    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<long double>(5.5L), static_cast<long double>(3.125L)), static_cast<long double>(0.0583514045989371500460946536220735787163510569634133670181210L), eps * 5000L);
1448    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<long double>(-5L) + static_cast<long double>(1L)/1024L, static_cast<long double>(2.125L)), static_cast<long double>(0.0267920938009571023702933210070984416052633027166975342895062L), eps * 5000L);
1449    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<long double>(-5.5L), static_cast<long double>(10L)), static_cast<long double>(597.577606961369169607937419869926705730305175364662688426534L), eps * 5000L);
1450    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<long double>(-10486074L)/(1024*1024L), static_cast<long double>(1L)/1024L), static_cast<long double>(1.41474005665181350367684623930576333542989766867888186478185e35L), eps * 5000L);
1451    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<long double>(-10486074L)/(1024*1024L), static_cast<long double>(50L)), static_cast<long double>(1.07153277202900671531087024688681954238311679648319534644743e20L), eps * 5000L);
1452    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<long double>(144794L)/1024L, static_cast<long double>(100L)), static_cast<long double>(2066.27694757392660413922181531984160871678224178890247540320L), eps * 5000L);
1453    BOOST_CHECK_CLOSE(tr1::cyl_bessel_i(static_cast<long double>(-144794L)/1024L, static_cast<long double>(100L)), static_cast<long double>(2066.27694672763190927440969155740243346136463461655104698748L), eps * 5000L);
1454 
1455    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(2457L)/1024L, static_cast<long double>(1L)/1024L), static_cast<long double>(3.80739920118603335646474073457326714709615200130620574875292e-9L), eps * 5000L);
1456    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(5.5L), static_cast<long double>(3217L)/1024L), static_cast<long double>(0.0281933076257506091621579544064767140470089107926550720453038L), eps * 5000L);
1457    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(-5.5L), static_cast<long double>(3217L)/1024L), static_cast<long double>(-2.55820064470647911823175836997490971806135336759164272675969L), eps * 5000L);
1458    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(-5.5L), static_cast<long double>(1e+04L)), static_cast<long double>(2.449843111985605522111159013846599118397e-03L), eps * 50000L);
1459    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(5.5L), static_cast<long double>(1e+04L)), static_cast<long double>(0.00759343502722670361395585198154817047185480147294665270646578L), eps * 5000L);
1460    //BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(5.5L), static_cast<long double>(1e+06L)), static_cast<long double>(-0.000747424248595630177396350688505919533097973148718960064663632L), eps * 50000L);
1461    //BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(5.125L), static_cast<long double>(1e+06L)), static_cast<long double>(-0.000776600124835704280633640911329691642748783663198207360238214L), eps * 50000L);
1462    //BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(5.875L), static_cast<long double>(1e+06L)), static_cast<long double>(-0.000466322721115193071631008581529503095819705088484386434589780L), eps * 50000L);
1463    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(0.5L), static_cast<long double>(101L)), static_cast<long double>(0.0358874487875643822020496677692429287863419555699447066226409L), eps * 5000L);
1464    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(-5.5L), static_cast<long double>(1e+04L)), static_cast<long double>(0.00244984311198560552211115901384659911839737686676766460822577L), eps * 50000L);
1465    //BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(-5.5L), static_cast<long double>(1e+06L)), static_cast<long double>(0.000279243200433579511095229508894156656558211060453622750659554L), eps * 50000L);
1466    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(-0.5L), static_cast<long double>(101L)), static_cast<long double>(0.0708184798097594268482290389188138201440114881159344944791454L), eps * 5000L);
1467    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(1L)/1024L), static_cast<long double>(1.41474013160494695750009004222225969090304185981836460288562e35L), eps * 5000L);
1468    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(15L)), static_cast<long double>(-0.0902239288885423309568944543848111461724911781719692852541489L), eps * 5000L);
1469    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(10486074L) / (1024*1024L), static_cast<long double>(1e+02L)), static_cast<long double>(-0.0547064914615137807616774867984047583596945624129838091326863L), eps * 5000L);
1470    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(10486074L) / (1024*1024L), static_cast<long double>(2e+04L)), static_cast<long double>(-0.00556783614400875611650958980796060611309029233226596737701688L), eps * 5000L);
1471    BOOST_CHECK_CLOSE(tr1::cyl_bessel_j(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(1e+02L)), static_cast<long double>(-0.0547613660316806551338637153942604550779513947674222863858713L), eps * 5000L);
1472 
1473    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(0.5L), static_cast<long double>(0.875L)), static_cast<long double>(0.558532231646608646115729767013630967055657943463362504577189L), eps * 5000L);
1474    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(0.5L), static_cast<long double>(1.125L)), static_cast<long double>(0.383621010650189547146769320487006220295290256657827220786527L), eps * 5000L);
1475    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(2.25L), static_cast<long double>(std::ldexp(1.0L, -30L))), static_cast<long double>(5.62397392719283271332307799146649700147907612095185712015604e20L), eps * 5000L);
1476    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(5.5L), static_cast<long double>(3217L)/1024L), static_cast<long double>(1.30623288775012596319554857587765179889689223531159532808379L), eps * 5000L);
1477    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(-5.5L), static_cast<long double>(10L)), static_cast<long double>(0.0000733045300798502164644836879577484533096239574909573072142667L), eps * 5000L);
1478    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(-5.5L), static_cast<long double>(100L)), static_cast<long double>(5.41274555306792267322084448693957747924412508020839543293369e-45L), eps * 5000L);
1479    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(10240L)/1024L, static_cast<long double>(1L)/1024L), static_cast<long double>(2.35522579263922076203415803966825431039900000000993410734978e38L), eps * 5000L);
1480    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(10240L)/1024L, static_cast<long double>(10L)), static_cast<long double>(0.00161425530039067002345725193091329085443750382929208307802221L), eps * 5000L);
1481    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(144793L)/1024L, static_cast<long double>(100L)), static_cast<long double>(1.39565245860302528069481472855619216759142225046370312329416e-6L), eps * 5000L);
1482    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 7000L);
1483 
1484    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(0.5L), static_cast<long double>(1L) / (1024*1024L)), static_cast<long double>(-817.033790261762580469303126467917092806755460418223776544122L), eps * 5000L);
1485    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(5.5L), static_cast<long double>(3.125L)), static_cast<long double>(-2.61489440328417468776474188539366752698192046890955453259866L), eps * 5000L);
1486    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(-5.5L), static_cast<long double>(3.125L)), static_cast<long double>(-0.0274994493896489729948109971802244976377957234563871795364056L), eps * 5000L);
1487    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(-5.5L), static_cast<long double>(1e+04L)), static_cast<long double>(-0.00759343502722670361395585198154817047185480147294665270646578L), eps * 5000L);
1488    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(1L)/1024L), static_cast<long double>(-1.50382374389531766117868938966858995093408410498915220070230e38L), eps * 5000L);
1489    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(-10486074L) / (1024*1024L), static_cast<long double>(1e+02L)), static_cast<long double>(0.0583041891319026009955779707640455341990844522293730214223545L), eps * 5000L);
1490    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(141.75L), static_cast<long double>(1e+02L)), static_cast<long double>(-5.38829231428696507293191118661269920130838607482708483122068e9L), eps * 5000L);
1491    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(141.75L), static_cast<long double>(2e+04L)), static_cast<long double>(-0.00376577888677186194728129112270988602876597726657372330194186L), eps * 50000L);
1492    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(-141.75L), static_cast<long double>(1e+02L)), static_cast<long double>(-3.81009803444766877495905954105669819951653361036342457919021e9L), eps * 5000L);
1493 
1494    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0L), static_cast<long double>(0L)), static_cast<long double>(0L), eps * 5000L);
1495    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0L), static_cast<long double>(-10L)), static_cast<long double>(-10L), eps * 5000L);
1496    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(-1L), static_cast<long double>(-1L)), static_cast<long double>(-1.2261911708835170708130609674719067527242483502207L), eps * 5000L);
1497    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.875L), static_cast<long double>(-4L)), static_cast<long double>(-5.3190556182262405182189463092940736859067548232647L), eps * 5000L);
1498    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(-0.625L), static_cast<long double>(8L)), static_cast<long double>(9.0419973860310100524448893214394562615252527557062L), eps * 5000L);
1499    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.875L), static_cast<long double>(1e-05L)), static_cast<long double>(0.000010000000000127604166668510945638036143355898993088L), eps * 5000L);
1500    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(10L)/1024L, static_cast<long double>(1e+05L)), static_cast<long double>(100002.38431454899771096037307519328741455615271038L), eps * 5000L);
1501    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(1L), static_cast<long double>(1e-20L)), static_cast<long double>(1.0000000000000000000000000000000000000000166666667e-20L), eps * 5000L);
1502    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(1e-20L), static_cast<long double>(1e-20L)), static_cast<long double>(1.000000000000000e-20L), eps * 5000L);
1503    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(400L)/1024L, static_cast<long double>(1e+20L)), static_cast<long double>(1.0418143796499216839719289963154558027005142709763e20L), eps * 5000L);
1504    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.5L), static_cast<long double>(2L)), static_cast<long double>(2.1765877052210673672479877957388515321497888026770L), eps * 5000L);
1505    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.5L), static_cast<long double>(4L)), static_cast<long double>(4.2543274975235836861894752787874633017836785640477L), eps * 5000L);
1506    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.5L), static_cast<long double>(6L)), static_cast<long double>(6.4588766202317746302999080620490579800463614807916L), eps * 5000L);
1507    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.5L), static_cast<long double>(10L)), static_cast<long double>(10.697409951222544858346795279378531495869386960090L), eps * 5000L);
1508    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.5L), static_cast<long double>(-2L)), static_cast<long double>(-2.1765877052210673672479877957388515321497888026770L), eps * 5000L);
1509    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.5L), static_cast<long double>(-4L)), static_cast<long double>(-4.2543274975235836861894752787874633017836785640477L), eps * 5000L);
1510    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.5L), static_cast<long double>(-6L)), static_cast<long double>(-6.4588766202317746302999080620490579800463614807916L), eps * 5000L);
1511    BOOST_CHECK_CLOSE(tr1::ellint_1(static_cast<long double>(0.5L), static_cast<long double>(-10L)), static_cast<long double>(-10.697409951222544858346795279378531495869386960090L), eps * 5000L);
1512 
1513    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(0L), static_cast<long double>(0L)), static_cast<long double>(0L), eps * 5000L);
1514    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(0L), static_cast<long double>(-10L)), static_cast<long double>(-10L), eps * 5000L);
1515    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(-1L), static_cast<long double>(-1L)), static_cast<long double>(-0.84147098480789650665250232163029899962256306079837L), eps * 5000L);
1516    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(900L) / 1024L, static_cast<long double>(-4L)), static_cast<long double>(-3.1756145986492562317862928524528520686391383168377L), eps * 5000L);
1517    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(-600L) / 1024L, static_cast<long double>(8L)), static_cast<long double>(7.2473147180505693037677015377802777959345489333465L), eps * 5000L);
1518    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(800L) / 1024L, static_cast<long double>(1e-05L)), static_cast<long double>(9.999999999898274739584436515967055859383969942432E-6L), eps * 5000L);
1519    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(100L) / 1024L, static_cast<long double>(1e+05L)), static_cast<long double>(99761.153306972066658135668386691227343323331995888L), eps * 5000L);
1520    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(-0.5L), static_cast<long double>(1e+10L)), static_cast<long double>(9.3421545766487137036576748555295222252286528414669e9L), eps * 5000L);
1521    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<long double>(400L) / 1024L, ldexp(static_cast<long double>(1L), 66L)), static_cast<long double>(7.0886102721911705466476846969992069994308167515242e19L), eps * 5000L);
1522 
1523    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(1L), static_cast<long double>(-1L)), static_cast<long double>(-1.557407724654902230506974807458360173087L), eps * 5000L);
1524    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.4L), static_cast<long double>(0L), static_cast<long double>(-4L)), static_cast<long double>(-4.153623371196831087495427530365430979011L), eps * 5000L);
1525    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(-0.6L), static_cast<long double>(0L), static_cast<long double>(8L)), static_cast<long double>(8.935930619078575123490612395578518914416L), eps * 5000L);
1526    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.25L), static_cast<long double>(0L), static_cast<long double>(0.5L)), static_cast<long double>(0.501246705365439492445236118603525029757890291780157969500480L), eps * 5000L);
1527    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(0L), static_cast<long double>(0.5L)), static_cast<long double>(0.5L), eps * 5000L);
1528    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(-2L), static_cast<long double>(0.5L)), static_cast<long double>(0.437501067017546278595664813509803743009132067629603474488486L), eps * 5000L);
1529    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(0.25L), static_cast<long double>(0.5L)), static_cast<long double>(0.510269830229213412212501938035914557628394166585442994564135L), eps * 5000L);
1530    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(0.75L), static_cast<long double>(0.5L)), static_cast<long double>(0.533293253875952645421201146925578536430596894471541312806165L), eps * 5000L);
1531    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(0.75L), static_cast<long double>(0.75L)), static_cast<long double>(0.871827580412760575085768367421866079353646112288567703061975L), eps * 5000L);
1532    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(1L), static_cast<long double>(0.25L)), static_cast<long double>(0.255341921221036266504482236490473678204201638800822621740476L), eps * 5000L);
1533    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(2L), static_cast<long double>(0.25L)), static_cast<long double>(0.261119051639220165094943572468224137699644963125853641716219L), eps * 5000L);
1534    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0L), static_cast<long double>(1023L)/1024L, static_cast<long double>(1.5L)), static_cast<long double>(13.2821612239764190363647953338544569682942329604483733197131L), eps * 5000L);
1535    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.5L), static_cast<long double>(0.5L), static_cast<long double>(-1L)), static_cast<long double>(-1.228014414316220642611298946293865487807L), eps * 5000L);
1536    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.5L), static_cast<long double>(0.5L), static_cast<long double>(1e+10L)), static_cast<long double>(1.536591003599172091573590441336982730551e+10L), eps * 5000L);
1537    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.75L), static_cast<long double>(-1e+05L), static_cast<long double>(10L)), static_cast<long double>(0.0347926099493147087821620459290460547131012904008557007934290L), eps * 5000L);
1538    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.875L), static_cast<long double>(-1e+10L), static_cast<long double>(10L)), static_cast<long double>(0.000109956202759561502329123384755016959364346382187364656768212L), eps * 5000L);
1539    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.875L), static_cast<long double>(-1e+10L), static_cast<long double>(1e+20L)), static_cast<long double>(1.00000626665567332602765201107198822183913978895904937646809e15L), eps * 5000L);
1540    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.875L), static_cast<long double>(-1e+10L), static_cast<long double>(1608L)/1024L), static_cast<long double>(0.0000157080616044072676127333183571107873332593142625043567690379L), eps * 5000L);
1541    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.875L), 1-static_cast<long double>(1L) / 1024L, static_cast<long double>(1e+20L)), static_cast<long double>(6.43274293944380717581167058274600202023334985100499739678963e21L), eps * 5000L);
1542    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.25L), static_cast<long double>(50L), static_cast<long double>(0.1L)), static_cast<long double>(0.124573770342749525407523258569507331686458866564082916835900L), eps * 5000L);
1543    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<long double>(0.25L), static_cast<long double>(1.125L), static_cast<long double>(1L)), static_cast<long double>(1.77299767784815770192352979665283069318388205110727241629752L), eps * 5000L);
1544 
1545    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(1L)/1024L), static_cast<long double>(-6.35327933972759151358547423727042905862963067106751711596065L), eps * 5000L);
1546    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(0.125L)), static_cast<long double>(-1.37320852494298333781545045921206470808223543321810480716122L), eps * 5000L);
1547    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(0.5L)), static_cast<long double>(0.454219904863173579920523812662802365281405554352642045162818L), eps * 5000L);
1548    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(1L)), static_cast<long double>(1.89511781635593675546652093433163426901706058173270759164623L), eps * 5000L);
1549    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(50.5L)), static_cast<long double>(1.72763195602911805201155668940185673806099654090456049881069e20L), eps * 5000L);
1550    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(-1L)/1024L), static_cast<long double>(-6.35523246483107180261445551935803221293763008553775821607264L), eps * 5000L);
1551    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(-0.125L)), static_cast<long double>(-1.62342564058416879145630692462440887363310605737209536579267L), eps * 5000L);
1552    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(-0.5L)), static_cast<long double>(-0.559773594776160811746795939315085235226846890316353515248293L), eps * 5000L);
1553    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(-1L)), static_cast<long double>(-0.219383934395520273677163775460121649031047293406908207577979L), eps * 5000L);
1554    BOOST_CHECK_CLOSE(tr1::expint(static_cast<long double>(-50.5L)), static_cast<long double>(-2.27237132932219350440719707268817831250090574830769670186618e-24L), eps * 5000L);
1555 
1556    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(0L, static_cast<long double>(1L)), static_cast<long double>(1.L), 100L * eps);
1557    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1L, static_cast<long double>(1L)), static_cast<long double>(2.L), 100L * eps);
1558    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1L, static_cast<long double>(2L)), static_cast<long double>(4.L), 100L * eps);
1559    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1L, static_cast<long double>(10L)), static_cast<long double>(20L), 100L * eps);
1560    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1L, static_cast<long double>(100L)), static_cast<long double>(200L), 100L * eps);
1561    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(1L, static_cast<long double>(1e6L)), static_cast<long double>(2e6L), 100L * eps);
1562    //BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10L, static_cast<long double>(30L)), static_cast<long double>(5.896624628001300E+17L), 100L * eps);
1563    //BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10L, static_cast<long double>(1000L)), static_cast<long double>(1.023976960161280E+33L), 100L * eps);
1564    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10L, static_cast<long double>(10L)), static_cast<long double>(8.093278209760000E+12L), 100L * eps);
1565    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(10L, static_cast<long double>(-10L)), static_cast<long double>(8.093278209760000E+12L), 100L * eps);
1566    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3L, static_cast<long double>(-10L)), static_cast<long double>(-7.880000000000000E+3L), 100L * eps);
1567    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3L, static_cast<long double>(-1000L)), static_cast<long double>(-7.999988000000000E+9L), 100L * eps);
1568    BOOST_CHECK_CLOSE_FRACTION(tr1::hermite(3L, static_cast<long double>(-1000000L)), static_cast<long double>(-7.999999999988000E+18L), 100L * eps);
1569 
1570    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(0.125L)), static_cast<long double>(-0.63277562349869525529352526763564627152686379131122L), eps * 5000L);
1571    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(1023L) / static_cast<long double>(1024L)), static_cast<long double>(-1023.4228554489429786541032870895167448906103303056L), eps * 5000L);
1572    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(1025L) / static_cast<long double>(1024L)), static_cast<long double>(1024.5772867695045940578681624248887776501597556226L), eps * 5000L);
1573    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(0.5L)), static_cast<long double>(-1.46035450880958681288949915251529801246722933101258149054289L), eps * 5000L);
1574    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(1.125L)), static_cast<long double>(8.5862412945105752999607544082693023591996301183069L), eps * 5000L);
1575    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(2L)), static_cast<long double>(1.6449340668482264364724151666460251892189499012068L), eps * 5000L);
1576    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(3.5L)), static_cast<long double>(1.1267338673170566464278124918549842722219969574036L), eps * 5000L);
1577    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(4L)), static_cast<long double>(1.08232323371113819151600369654116790277475095191872690768298L), eps * 5000L);
1578    BOOST_CHECK_CLOSE(tr1::riemann_zeta(4L + static_cast<long double>(1L) / 1024L), static_cast<long double>(1.08225596856391369799036835439238249195298434901488518878804L), eps * 5000L);
1579    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(4.5L)), static_cast<long double>(1.05470751076145426402296728896028011727249383295625173068468L), eps * 5000L);
1580    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(6.5L)), static_cast<long double>(1.01200589988852479610078491680478352908773213619144808841031L), eps * 5000L);
1581    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(7.5L)), static_cast<long double>(1.00582672753652280770224164440459408011782510096320822989663L), eps * 5000L);
1582    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(8.125L)), static_cast<long double>(1.0037305205308161603183307711439385250181080293472L), eps * 5000L);
1583    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(16.125L)), static_cast<long double>(1.0000140128224754088474783648500235958510030511915L), eps * 5000L);
1584    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(0L)), static_cast<long double>(-0.5L), eps * 5000L);
1585    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-0.125L)), static_cast<long double>(-0.39906966894504503550986928301421235400280637468895L), eps * 5000L);
1586    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-1L)), static_cast<long double>(-0.083333333333333333333333333333333333333333333333333L), eps * 5000L);
1587    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-2L)), static_cast<long double>(0L), eps * 5000L);
1588    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-2.5L)), static_cast<long double>(0.0085169287778503305423585670283444869362759902200745L), eps * 5000L * 3L);
1589    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-3L)), static_cast<long double>(0.0083333333333333333333333333333333333333333333333333L), eps * 5000L);
1590    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-4L)), static_cast<long double>(0L), eps * 5000L);
1591    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-20L)), static_cast<long double>(0L), eps * 5000L * 100L);
1592    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-21L)), static_cast<long double>(-281.46014492753623188405797101449275362318840579710L), eps * 5000L * 100L);
1593    BOOST_CHECK_CLOSE(tr1::riemann_zeta(static_cast<long double>(-30.125L)), static_cast<long double>(2.2762941726834511267740045451463455513839970804578e7L), eps * 5000L * 100L);
1594 
1595    BOOST_CHECK_CLOSE(tr1::sph_bessel(0L, static_cast<long double>(0.1433600485324859619140625e-1L)), static_cast<long double>(0.9999657468461303487880990241993035937654e0L),  eps * 5000L * 100L);
1596    BOOST_CHECK_CLOSE(tr1::sph_bessel(0L, static_cast<long double>(0.1760916970670223236083984375e-1L)), static_cast<long double>(0.9999483203249623334100130061926184665364e0L),  eps * 5000L * 100L);
1597    BOOST_CHECK_CLOSE(tr1::sph_bessel(2L, static_cast<long double>(0.1433600485324859619140625e-1L)), static_cast<long double>(0.1370120120703995134662099191103188366059e-4L),  eps * 5000L * 100L);
1598    BOOST_CHECK_CLOSE(tr1::sph_bessel(2L, static_cast<long double>(0.1760916970670223236083984375e-1L)), static_cast<long double>(0.2067173265753174063228459655801741280461e-4L),  eps * 5000L * 100L);
1599    BOOST_CHECK_CLOSE(tr1::sph_bessel(7L, static_cast<long double>(0.1252804412841796875e3L)), static_cast<long double>(0.7887555711993028736906736576314283291289e-2L),  eps * 5000L * 100L);
1600    BOOST_CHECK_CLOSE(tr1::sph_bessel(7L, static_cast<long double>(0.25554705810546875e3L)), static_cast<long double>(-0.1463292767579579943284849187188066532514e-2L),  eps * 5000L * 100L);
1601 
1602    BOOST_CHECK_CLOSE(tr1::sph_neumann(0L, static_cast<long double>(0.408089816570281982421875e0L)), static_cast<long double>(-0.2249212131304610409189209411089291558038e1L), eps * 5000L * 100L);
1603    BOOST_CHECK_CLOSE(tr1::sph_neumann(0L, static_cast<long double>(0.6540834903717041015625e0L)), static_cast<long double>(-0.1213309779166084571756446746977955970241e1L),   eps * 5000L * 100L);
1604    BOOST_CHECK_CLOSE(tr1::sph_neumann(2L, static_cast<long double>(0.408089816570281982421875e0L)), static_cast<long double>(-0.4541702641837159203058389758895634766256e2L),   eps * 5000L * 100L);
1605    BOOST_CHECK_CLOSE(tr1::sph_neumann(2L, static_cast<long double>(0.6540834903717041015625e0L)), static_cast<long double>(-0.1156112621471167110574129561700037138981e2L),   eps * 5000L * 100L);
1606    BOOST_CHECK_CLOSE(tr1::sph_neumann(10L, static_cast<long double>(0.1097540378570556640625e1L)), static_cast<long double>(-0.2427889658115064857278886600528596240123e9L),   eps * 5000L * 100L);
1607    BOOST_CHECK_CLOSE(tr1::sph_neumann(10L, static_cast<long double>(0.30944411754608154296875e1L)), static_cast<long double>(-0.3394649246350136450439882104151313759251e4L),   eps * 5000L * 100L);
1608 
1609    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(3L, 2L, static_cast<long double>(0.5L)), static_cast<long double>(0.2061460599687871330692286791802688341213L), eps * 5000L);
1610    BOOST_CHECK_CLOSE_FRACTION(tr1::sph_legendre(40L, 15L, static_cast<long double>(0.75L)), static_cast<long double>(-0.406036847302819452666908966769096223205057182668333862900509L), eps * 5000L);
1611 #endif
1612 #endif
1613 }
1614 
BOOST_AUTO_TEST_CASE(test_main)1615 BOOST_AUTO_TEST_CASE( test_main )
1616 {
1617 #ifndef TEST_LD
1618    test_values(1.0f, "float");
1619    test_values(1.0, "double");
1620 #else
1621 #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
1622    test_values(1.0L, "long double");
1623 #endif
1624 #endif
1625 
1626 }
1627 
1628