Skip to content

Commit 769ee0f

Browse files
authored
Merge pull request #524 from boostorg/ppc64le_fixes
Collected fixes for PPC64LE
2 parents 086a9be + e7d1d5b commit 769ee0f

25 files changed

+185
-4
lines changed

include/boost/math/tools/config.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@
7070
//
7171
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
7272
#endif
73+
#if !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) && (LDBL_MANT_DIG == 106) && (LDBL_MIN_EXP > DBL_MIN_EXP)
74+
//
75+
// Generic catch all case for gcc's "double-double" long double type.
76+
// We do not support this as it's not even remotely IEEE conforming:
77+
//
78+
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
79+
#endif
7380
#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
7481
//
7582
// Intel compiler prior to version 10 has sporadic problems

test/bivariate_statistics_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,9 @@ int main()
610610
{
611611
test_covariance<float>();
612612
test_covariance<double>();
613+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
613614
test_covariance<long double>();
615+
#endif
614616
test_covariance<cpp_bin_float_50>();
615617

616618
test_integer_covariance<int>();
@@ -620,7 +622,9 @@ int main()
620622

621623
test_correlation_coefficient<float>();
622624
test_correlation_coefficient<double>();
625+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
623626
test_correlation_coefficient<long double>();
627+
#endif
624628
test_correlation_coefficient<cpp_bin_float_50>();
625629

626630
test_integer_correlation_coefficient<int>();

test/cardinal_b_spline_test.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,23 +236,33 @@ int main()
236236
{
237237
test_box<float>();
238238
test_box<double>();
239+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
239240
test_box<long double>();
241+
#endif
240242

241243
test_hat<float>();
242244
test_hat<double>();
245+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
243246
test_hat<long double>();
247+
#endif
244248

245249
test_quadratic<float>();
246250
test_quadratic<double>();
251+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
247252
test_quadratic<long double>();
253+
#endif
248254

249255
test_cubic<float>();
250256
test_cubic<double>();
257+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
251258
test_cubic<long double>();
259+
#endif
252260

253261
test_quintic<float>();
254262
test_quintic<double>();
263+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
255264
test_quintic<long double>();
265+
#endif
256266

257267
test_partition_of_unity<1, double>();
258268
test_partition_of_unity<2, double>();
@@ -269,14 +279,15 @@ int main()
269279
test_b_spline_derivatives<8, double>();
270280
test_b_spline_derivatives<9, double>();
271281

282+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
272283
test_b_spline_derivatives<3, long double>();
273284
test_b_spline_derivatives<4, long double>();
274285
test_b_spline_derivatives<5, long double>();
275286
test_b_spline_derivatives<6, long double>();
276287
test_b_spline_derivatives<7, long double>();
277288
test_b_spline_derivatives<8, long double>();
278289
test_b_spline_derivatives<9, long double>();
279-
290+
#endif
280291

281292
#ifdef BOOST_HAS_FLOAT128
282293
test_box<float128>();

test/cardinal_cubic_b_spline_test.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,32 +318,44 @@ BOOST_AUTO_TEST_CASE(test_cubic_b_spline)
318318
{
319319
test_b3_spline<float>();
320320
test_b3_spline<double>();
321+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
321322
test_b3_spline<long double>();
323+
#endif
322324
test_b3_spline<cpp_bin_float_50>();
323325

324326
test_interpolation_condition<float>();
325327
test_interpolation_condition<double>();
328+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
326329
test_interpolation_condition<long double>();
330+
#endif
327331
test_interpolation_condition<cpp_bin_float_50>();
328332

329333
test_constant_function<float>();
330334
test_constant_function<double>();
335+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
331336
test_constant_function<long double>();
337+
#endif
332338
test_constant_function<cpp_bin_float_50>();
333339

334340
test_affine_function<float>();
335341
test_affine_function<double>();
342+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
336343
test_affine_function<long double>();
344+
#endif
337345
test_affine_function<cpp_bin_float_50>();
338346

339347
test_quadratic_function<float>();
340348
test_quadratic_function<double>();
349+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
341350
test_quadratic_function<long double>();
351+
#endif
342352
test_affine_function<cpp_bin_float_50>();
343353

344354
test_trig_function<float>();
345355
test_trig_function<double>();
356+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
346357
test_trig_function<long double>();
358+
#endif
347359
test_trig_function<cpp_bin_float_50>();
348360

349361
test_copy_move<double>();

test/cardinal_quadratic_b_spline_test.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,19 @@ int main()
117117
{
118118
test_constant<float>();
119119
test_constant<double>();
120+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
120121
test_constant<long double>();
122+
#endif
121123

122124
test_linear<float>();
123125
test_linear<double>();
126+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
124127
test_linear<long double>();
128+
#endif
125129

126130
test_quadratic<double>();
131+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
127132
test_quadratic<long double>();
128-
133+
#endif
129134
return boost::math::test::report_errors();
130135
}

test/cardinal_quintic_b_spline_test.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,24 +267,35 @@ void test_quadratic_estimate_derivatives()
267267
int main()
268268
{
269269
test_constant<double>();
270+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
270271
test_constant<long double>();
272+
#endif
271273

272274
test_constant_estimate_derivatives<double>();
275+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
273276
test_constant_estimate_derivatives<long double>();
277+
#endif
274278

275279
test_linear<float>();
276280
test_linear<double>();
281+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
277282
test_linear<long double>();
283+
#endif
278284

279285
test_linear_estimate_derivatives<double>();
286+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
280287
test_linear_estimate_derivatives<long double>();
288+
#endif
281289

282290
test_quadratic<double>();
291+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
283292
test_quadratic<long double>();
293+
#endif
284294

285295
test_quadratic_estimate_derivatives<double>();
296+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
286297
test_quadratic_estimate_derivatives<long double>();
287-
298+
#endif
288299

289300
#ifdef BOOST_HAS_FLOAT128
290301
test_constant<float128>();

test/catmull_rom_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,9 @@ BOOST_AUTO_TEST_CASE(catmull_rom_test)
406406
test_alpha_distance<double>();
407407

408408
test_linear<double>();
409+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
409410
test_linear<long double>();
411+
#endif
410412

411413
test_circle<float>();
412414
test_circle<double>();

test/chebyshev_test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,23 @@ int main()
175175
{
176176
test_polynomials<float>();
177177
test_polynomials<double>();
178+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
178179
test_polynomials<long double>();
180+
#endif
179181
test_polynomials<cpp_bin_float_quad>();
180182

181183
test_derivatives<float>();
182184
test_derivatives<double>();
185+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
183186
test_derivatives<long double>();
187+
#endif
184188
test_derivatives<cpp_bin_float_quad>();
185189

186190
test_clenshaw_recurrence<float>();
187191
test_clenshaw_recurrence<double>();
192+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
188193
test_clenshaw_recurrence<long double>();
194+
#endif
189195

190196
test_translated_clenshaw_recurrence<double>();
191197
return boost::math::test::report_errors();

test/compile_test/sf_bernoulli_incl_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ void compile_and_link_test()
3030
#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
3131
constexpr float ce_f = boost::math::unchecked_bernoulli_b2n<float>(2);
3232
constexpr float ce_d = boost::math::unchecked_bernoulli_b2n<double>(2);
33+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
3334
constexpr float ce_l = boost::math::unchecked_bernoulli_b2n<long double>(2);
3435
std::ostream cnull(0);
3536
cnull << ce_f << ce_d << ce_l << std::endl;
3637
#endif
38+
#endif
3739
}

test/exp_sinh_quadrature_test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,14 @@ BOOST_AUTO_TEST_CASE(exp_sinh_quadrature_test)
578578
#endif
579579
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
580580
#ifdef TEST3
581+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
581582
test_left_limit_infinite<long double>();
582583
test_right_limit_infinite<long double>();
583584
test_nr_examples<long double>();
584585
test_crc<long double>();
585586
#endif
586587
#endif
588+
#endif
587589
#ifdef TEST4
588590
test_left_limit_infinite<cpp_bin_float_quad>();
589591
test_right_limit_infinite<cpp_bin_float_quad>();
@@ -620,13 +622,17 @@ BOOST_AUTO_TEST_CASE(exp_sinh_quadrature_test)
620622
#ifdef TEST8
621623
test_complex_modified_bessel<std::complex<float>>();
622624
test_complex_modified_bessel<std::complex<double>>();
625+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
623626
test_complex_modified_bessel<std::complex<long double>>();
627+
#endif
624628
test_complex_modified_bessel<boost::multiprecision::cpp_complex_quad>();
625629
#endif
626630
#ifdef TEST9
627631
test_complex_exponential_integral_E1<std::complex<float>>();
628632
test_complex_exponential_integral_E1<std::complex<double>>();
633+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
629634
test_complex_exponential_integral_E1<std::complex<long double>>();
635+
#endif
630636
test_complex_exponential_integral_E1<boost::multiprecision::cpp_complex_quad>();
631637
#endif
632638
#ifdef TEST10

test/gegenbauer_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,26 @@ int main()
104104
{
105105
test_parity<float>();
106106
test_parity<double>();
107+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
107108
test_parity<long double>();
109+
#endif
108110

109111
test_quadratic<float>();
110112
test_quadratic<double>();
113+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
111114
test_quadratic<long double>();
115+
#endif
112116

113117
test_cubic<double>();
118+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
114119
test_cubic<long double>();
120+
#endif
115121

116122
test_derivative<float>();
117123
test_derivative<double>();
124+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
118125
test_derivative<long double>();
126+
#endif
119127

120128
#ifdef BOOST_HAS_FLOAT128
121129
test_quadratic<boost::multiprecision::float128>();

test/jacobi_test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,21 @@ void test_derivative()
9696
int main()
9797
{
9898
test_to_quadratic<double>();
99+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
99100
test_to_quadratic<long double>();
101+
#endif
100102

101103
test_symmetry<float>();
102104
test_symmetry<double>();
105+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
103106
test_symmetry<long double>();
107+
#endif
104108

105109
test_derivative<float>();
106110
test_derivative<double>();
111+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
107112
test_derivative<long double>();
113+
#endif
108114

109115
#ifdef BOOST_HAS_FLOAT128
110116
test_to_quadratic<boost::multiprecision::float128>();

test/legendre_stieltjes_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ void test_legendre_stieltjes()
135135
BOOST_AUTO_TEST_CASE(LegendreStieltjesZeros)
136136
{
137137
test_legendre_stieltjes<double>();
138+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
138139
test_legendre_stieltjes<long double>();
140+
#endif
139141
test_legendre_stieltjes<cpp_bin_float_quad>();
140142
//test_legendre_stieltjes<boost::multiprecision::cpp_bin_float_100>();
141143
}

test/linear_regression_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,26 +252,34 @@ int main()
252252
{
253253
test_line<float>();
254254
test_line<double>();
255+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
255256
test_line<long double>();
257+
#endif
256258
test_integer_line<int>();
257259
test_integer_line<int32_t>();
258260
test_integer_line<int64_t>();
259261
test_integer_line<uint32_t>();
260262

261263
test_constant<float>();
262264
test_constant<double>();
265+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
263266
test_constant<long double>();
267+
#endif
264268
test_integer_constant<int>();
265269
test_integer_constant<int32_t>();
266270
test_integer_constant<int64_t>();
267271
test_integer_constant<uint32_t>();
268272

269273
test_permutation_invariance<float>();
270274
test_permutation_invariance<double>();
275+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
271276
test_permutation_invariance<long double>();
277+
#endif
272278

273279
test_scaling_relations<float>();
274280
test_scaling_relations<double>();
281+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
275282
test_scaling_relations<long double>();
283+
#endif
276284
return boost::math::test::report_errors();
277285
}

test/test_2F0.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ void expected_results()
2828
largest_type = "(long\\s+)?double|cpp_bin_float_quad|dec_40";
2929
#endif
3030

31+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
3132
if (boost::math::policies::digits<double, boost::math::policies::policy<> >() != boost::math::policies::digits<long double, boost::math::policies::policy<> >())
3233
{
3334
add_expected_result(
@@ -45,7 +46,8 @@ void expected_results()
4546
"a1 = a2 \\+ 0\\.5", // test data group
4647
".*", 10, 5); // test function
4748
}
48-
49+
#endif
50+
4951
add_expected_result(
5052
".*", // compiler
5153
".*", // stdlib

test/test_bernoulli_constants.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ void test(const char* name)
202202

203203
void test_real_concept_extra()
204204
{
205+
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
205206
boost::math::concepts::real_concept tol = boost::math::tools::epsilon<boost::math::concepts::real_concept>() * 20;
206207
for(unsigned i = 0; i <= boost::math::max_bernoulli_b2n<long double>::value; ++i)
207208
{
@@ -219,6 +220,7 @@ void test_real_concept_extra()
219220
BOOST_CHECK(r <= -boost::math::tools::max_value<boost::math::concepts::real_concept>());
220221
}
221222
}
223+
#endif
222224
}
223225

224226

0 commit comments

Comments
 (0)