@@ -285,15 +285,17 @@ void test_bessel(T, const char* name)
285285 SC_ (0.3810550980268886849843356923521907577982 ), SC_ (0.3648312306136669944635769493587219791343 ), SC_ (0.3466185870197064968846647990300282094299 )
286286 }};
287287
288- const T tolerance { 128 * boost::math::tools::epsilon<T>() };
288+ using value_type = table_entry_type;
289+
290+ const value_type tolerance { 128 * boost::math::tools::epsilon<value_type>() };
289291
290292 int n_val { 9 };
291293
292- for (const T & ctrl: ctrl_data)
294+ for (const value_type & ctrl: ctrl_data)
293295 {
294- const T x_val { static_cast <T >(static_cast <T >(n_val) / 10 ) };
296+ const value_type x_val { static_cast <value_type >(static_cast <value_type >(n_val) / 10 ) };
295297
296- const T jn_val { boost::math::cyl_bessel_j (3 , x_val) };
298+ const value_type jn_val { boost::math::cyl_bessel_j (3 , x_val) };
297299
298300 ++n_val;
299301
@@ -303,39 +305,41 @@ void test_bessel(T, const char* name)
303305
304306 // More specific tests for Git-issue1292.
305307 {
306- using local_ctrl_array_type = std::array<table_entry_type, std::size_t { UINT8_C (43 ) }>;
308+ using local_ctrl_array_type = std::array<table_entry_type, std::size_t { UINT8_C (43 ) }>;
309+
310+ // Table[N[BesselJ[31 / 10, n/10], 40], {n, 9, 51, 1}]
311+ static const local_ctrl_array_type ctrl_data =
312+ {{
313+ SC_ (0.01175139795214295170487105485346781171863 ), SC_ (0.01610092560641321584451701371378836908343 ), SC_ (0.02135659148701787280713314897691402425560 ), SC_ (0.02757316602094671775387912184375438913864 ),
314+ SC_ (0.03479372470942323424236519547108889796879 ), SC_ (0.04304884612770317349181083608393216357649 ), SC_ (0.05235595486839477302545989170267853515412 ), SC_ (0.06271881444009116864560457340917173135492 ),
315+ SC_ (0.07412717428914531462554459978389560408816 ), SC_ (0.08655657401374878955779092959288219537482 ), SC_ (0.09996830657138141192006478769855556316995 ), SC_ (0.1143095409011066041623799431143340837007 ),
316+ SC_ (0.1295136029333754366226206053365805922136 ), SC_ (0.1455004124749064242445094865982308151833 ), SC_ (0.1621770719619318324763655518038365467780 ), SC_ (0.1794386015949089605595848208470049166853 ),
317+ SC_ (0.1971688139222575484595939469080319406355 ), SC_ (0.2152413195483352761119610246805962611319 ), SC_ (0.2335206543185642795903443565627832597552 ), SC_ (0.2518635170977563283446184976264924077045 ),
318+ SC_ (0.2701201061202457234361463802484836927464 ), SC_ (0.2881355408650536940851830262098172944660 ), SC_ (0.3057513555072237123913927136839853900197 ), SC_ (0.3228070492275195774383850177821175151772 ),
319+ SC_ (0.3391416780352496831991017115498371039332 ), SC_ (0.3545954722799571667706920253581728149226 ), SC_ (0.3690114637024459111815176585531943143085 ), SC_ (0.3822371057078773326211699424651752096338 ),
320+ SC_ (0.3941258705356621024731438508712990073773 ), SC_ (0.4045388071531719615179931506197074798366 ), SC_ (0.4133460440118967760814988295083688541739 ), SC_ (0.4204282212729730452147271372029342292548 ),
321+ SC_ (0.4256778377298582292448895379334671298297 ), SC_ (0.4290004984236535775073755577697874033289 ), SC_ (0.4303160498540635572666996674883665298558 ), SC_ (0.4295595907277138677145484170304736319185 ),
322+ SC_ (0.4266823473457215250850626209433240464185 ), SC_ (0.4216524040030023831246842156638018726147 ), SC_ (0.4144552801406973126588418824207056743782 ), SC_ (0.4050943474472003316564108983454900189419 ),
323+ SC_ (0.3935910816286283019261303507307813773886 ), SC_ (0.3799851451515116989978414766085547417497 ), SC_ (0.3643342988837623802358278078893847672838 )
324+ }};
307325
308- // Table[N[BesselJ[31 / 10, n/10], 40], {n, 9, 51, 1}]
309- static const local_ctrl_array_type ctrl_data =
310- {{
311- SC_ (0.01175139795214295170487105485346781171863 ), SC_ (0.01610092560641321584451701371378836908343 ), SC_ (0.02135659148701787280713314897691402425560 ), SC_ (0.02757316602094671775387912184375438913864 ),
312- SC_ (0.03479372470942323424236519547108889796879 ), SC_ (0.04304884612770317349181083608393216357649 ), SC_ (0.05235595486839477302545989170267853515412 ), SC_ (0.06271881444009116864560457340917173135492 ),
313- SC_ (0.07412717428914531462554459978389560408816 ), SC_ (0.08655657401374878955779092959288219537482 ), SC_ (0.09996830657138141192006478769855556316995 ), SC_ (0.1143095409011066041623799431143340837007 ),
314- SC_ (0.1295136029333754366226206053365805922136 ), SC_ (0.1455004124749064242445094865982308151833 ), SC_ (0.1621770719619318324763655518038365467780 ), SC_ (0.1794386015949089605595848208470049166853 ),
315- SC_ (0.1971688139222575484595939469080319406355 ), SC_ (0.2152413195483352761119610246805962611319 ), SC_ (0.2335206543185642795903443565627832597552 ), SC_ (0.2518635170977563283446184976264924077045 ),
316- SC_ (0.2701201061202457234361463802484836927464 ), SC_ (0.2881355408650536940851830262098172944660 ), SC_ (0.3057513555072237123913927136839853900197 ), SC_ (0.3228070492275195774383850177821175151772 ),
317- SC_ (0.3391416780352496831991017115498371039332 ), SC_ (0.3545954722799571667706920253581728149226 ), SC_ (0.3690114637024459111815176585531943143085 ), SC_ (0.3822371057078773326211699424651752096338 ),
318- SC_ (0.3941258705356621024731438508712990073773 ), SC_ (0.4045388071531719615179931506197074798366 ), SC_ (0.4133460440118967760814988295083688541739 ), SC_ (0.4204282212729730452147271372029342292548 ),
319- SC_ (0.4256778377298582292448895379334671298297 ), SC_ (0.4290004984236535775073755577697874033289 ), SC_ (0.4303160498540635572666996674883665298558 ), SC_ (0.4295595907277138677145484170304736319185 ),
320- SC_ (0.4266823473457215250850626209433240464185 ), SC_ (0.4216524040030023831246842156638018726147 ), SC_ (0.4144552801406973126588418824207056743782 ), SC_ (0.4050943474472003316564108983454900189419 ),
321- SC_ (0.3935910816286283019261303507307813773886 ), SC_ (0.3799851451515116989978414766085547417497 ), SC_ (0.3643342988837623802358278078893847672838 )
322- }};
326+ using value_type = table_entry_type;
323327
324- const T tolerance { 128 * boost::math::tools::epsilon<T >() };
328+ const value_type tolerance { 128 * boost::math::tools::epsilon<value_type >() };
325329
326- const T vu_val { static_cast <T >(static_cast <T >(31 ) / 10 ) };
330+ const value_type vu_val { static_cast <value_type >(static_cast <value_type >(31 ) / 10 ) };
327331
328- int n_val { 9 };
332+ int n_val { 9 };
329333
330- for (const T & ctrl : ctrl_data)
331- {
332- const T x_val { static_cast <T >(static_cast <T >(n_val) / 10 ) };
334+ for (const value_type & ctrl : ctrl_data)
335+ {
336+ const value_type x_val { static_cast <value_type >(static_cast <value_type >(n_val) / 10 ) };
333337
334- const T jn_val { boost::math::cyl_bessel_j (vu_val, x_val) };
338+ const value_type jn_val { boost::math::cyl_bessel_j (vu_val, x_val) };
335339
336- ++n_val;
340+ ++n_val;
337341
338- BOOST_CHECK_CLOSE_FRACTION (jn_val, ctrl, tolerance);
342+ BOOST_CHECK_CLOSE_FRACTION (jn_val, ctrl, tolerance);
339343 }
340344 }
341345
0 commit comments