Skip to content

Commit fce31eb

Browse files
author
Reimar Döffinger
committed
Update tests to take promote_double policy into account
Makes it easier to change its default to false in the future. The remaining failing tests are test_nc_chi_squared test_bessel_j_prime and test_bessel_y_prime. They probably have incorrect logic for the double == long double case already now.
1 parent 5229890 commit fce31eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+51
-48
lines changed

test/test_0F1.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void expected_results()
1616
//
1717
const char* largest_type;
1818
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
19-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
19+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
2020
{
2121
largest_type = "(long\\s+)?double|real_concept|cpp_bin_float_quad|dec_40";
2222
}

test/test_1F1.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void expected_results()
1515
//
1616
const char* largest_type;
1717
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
18-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
18+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
1919
{
2020
largest_type = "(long\\s+)?double|real_concept|cpp_bin_float_quad|dec_40|cpp_bin_float_double_extended";
2121
}
@@ -71,6 +71,8 @@ void expected_results()
7171
"Small.*", // test data group
7272
".*", 1000, 300); // test function
7373

74+
if(boost::math::policies::promote_double<>())
75+
{
7476
#if (LDBL_MANT_DIG < DBL_MANT_DIG * 2) && (LDBL_MANT_DIG != DBL_MANT_DIG)
7577
//
7678
// long double has only a little extra precision and errors may creep
@@ -116,6 +118,7 @@ void expected_results()
116118
".*", 10, 5); // test function
117119

118120
#endif
121+
}
119122

120123
add_expected_result(
121124
".*", // compiler

test/test_1F1_log.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void expected_results()
1515
//
1616
const char* largest_type;
1717
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
18-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
18+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
1919
{
2020
largest_type = "(long\\s+)?double|real_concept|cpp_bin_float_quad|dec_40|cpp_bin_float_double_extended";
2121
}

test/test_1F1_regularized.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void expected_results()
1717
//
1818
const char* largest_type;
1919
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
20-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
20+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
2121
{
2222
largest_type = "(long\\s+)?double|real_concept|cpp_bin_float_quad|dec_40|cpp_bin_float_double_extended";
2323
}

test/test_2F0.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void expected_results()
1616
//
1717
const char* largest_type;
1818
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
19-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
19+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
2020
{
2121
largest_type = "(long\\s+)?double|real_concept|cpp_bin_float_quad|dec_40";
2222
}
@@ -29,7 +29,7 @@ void expected_results()
2929
#endif
3030

3131
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
32-
if (boost::math::policies::digits<double, boost::math::policies::policy<> >() != boost::math::policies::digits<long double, boost::math::policies::policy<> >())
32+
if (boost::math::policies::promote_double<>() && boost::math::policies::digits<double, boost::math::policies::policy<> >() != boost::math::policies::digits<long double, boost::math::policies::policy<> >())
3333
{
3434
add_expected_result(
3535
".*", // compiler

test/test_bessel_i.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void expected_results()
5151
//
5252
const char* largest_type;
5353
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
54-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
54+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5555
{
5656
largest_type = "(long\\s+)?double";
5757
}

test/test_bessel_i_prime.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void expected_results()
3737
//
3838
const char* largest_type;
3939
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
40-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
40+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4141
{
4242
largest_type = "(long\\s+)?double";
4343
}

test/test_bessel_j.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void expected_results()
5151
//
5252
const char* largest_type;
5353
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
54-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
54+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5555
{
5656
largest_type = "(long\\s+)?double|real_concept";
5757
}
@@ -194,7 +194,7 @@ void expected_results()
194194

195195

196196
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
197-
BOOST_IF_CONSTEXPR ((std::numeric_limits<double>::digits != std::numeric_limits<long double>::digits)
197+
BOOST_IF_CONSTEXPR (boost::math::policies::promote_double<>() && (std::numeric_limits<double>::digits != std::numeric_limits<long double>::digits)
198198
&& (std::numeric_limits<long double>::digits < 90))
199199
{
200200
// some errors spill over into type double as well:
@@ -251,7 +251,7 @@ void expected_results()
251251
".*(JN|j).*|.*Tricky.*", // test data group
252252
".*", 33000, 20000); // test function
253253
}
254-
else BOOST_IF_CONSTEXPR (std::numeric_limits<long double>::digits >= 90)
254+
else BOOST_IF_CONSTEXPR (boost::math::policies::promote_double<>() && std::numeric_limits<long double>::digits >= 90)
255255
{
256256
add_expected_result(
257257
".*", // compiler

test/test_bessel_j_prime.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void expected_results()
177177

178178

179179
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
180-
if((std::numeric_limits<double>::digits != std::numeric_limits<long double>::digits)
180+
if(boost::math::policies::promote_double<>() && (std::numeric_limits<double>::digits != std::numeric_limits<long double>::digits)
181181
&& (std::numeric_limits<long double>::digits < 90))
182182
{
183183
// some errors spill over into type double as well:

test/test_bessel_k.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void expected_results()
5858
//
5959
const char* largest_type;
6060
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
61-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
61+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
6262
{
6363
largest_type = "(long\\s+)?double|real_concept";
6464
}

test/test_bessel_k_prime.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void expected_results()
4343
//
4444
const char* largest_type;
4545
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
46-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
46+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4747
{
4848
largest_type = "(long\\s+)?double|real_concept";
4949
}

test/test_bessel_y.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void expected_results()
5151
//
5252
const char* largest_type;
5353
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
54-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
54+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5555
{
5656
largest_type = "(long\\s+)?double|real_concept";
5757
}
@@ -201,7 +201,7 @@ void expected_results()
201201
".*", 2000, 2000); // test function
202202

203203
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
204-
BOOST_IF_CONSTEXPR((std::numeric_limits<double>::digits != std::numeric_limits<long double>::digits)
204+
BOOST_IF_CONSTEXPR(boost::math::policies::promote_double<>() && (std::numeric_limits<double>::digits != std::numeric_limits<long double>::digits)
205205
&& (std::numeric_limits<long double>::digits < 90))
206206
{
207207
// some errors spill over into type double as well:
@@ -220,7 +220,7 @@ void expected_results()
220220
".*Yv.*", // test data group
221221
".*", 80, 70); // test function
222222
}
223-
else BOOST_IF_CONSTEXPR(std::numeric_limits<long double>::digits >= 90)
223+
else BOOST_IF_CONSTEXPR(boost::math::policies::promote_double<>() && std::numeric_limits<long double>::digits >= 90)
224224
{
225225
add_expected_result(
226226
".*", // compiler

test/test_bessel_y_prime.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void expected_results()
3838
//
3939
const char* largest_type;
4040
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
41-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
41+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4242
{
4343
largest_type = "(long\\s+)?double|real_concept";
4444
}
@@ -220,7 +220,7 @@ void expected_results()
220220
".*", 2000, 2000); // test function
221221

222222
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
223-
if((std::numeric_limits<double>::digits != std::numeric_limits<long double>::digits)
223+
if(boost::math::policies::promote_double<>() && (std::numeric_limits<double>::digits != std::numeric_limits<long double>::digits)
224224
&& (std::numeric_limits<long double>::digits < 90))
225225
{
226226
// some errors spill over into type double as well:

test/test_binomial_coeff.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void expected_results()
3636
//
3737
const char* largest_type;
3838
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
39-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
39+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4040
{
4141
largest_type = "(long\\s+)?double";
4242
}

test/test_carlson.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void expected_results()
4343
//
4444
const char* largest_type;
4545
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
46-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
46+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4747
{
4848
largest_type = "(long\\s+)?double";
4949
}

test/test_cbrt.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void expected_results()
4646
//
4747
const char* largest_type;
4848
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
49-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
49+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5050
{
5151
largest_type = "(long\\s+)?double|real_concept";
5252
}

test/test_ellint_1.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void expected_results()
4848
//
4949
const char* largest_type;
5050
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
51-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
51+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5252
{
5353
largest_type = "(long\\s+)?double";
5454
}

test/test_ellint_2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void expected_results()
4444
//
4545
const char* largest_type;
4646
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
47-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
47+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4848
{
4949
largest_type = "(long\\s+)?double";
5050
}

test/test_ellint_3.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void expected_results()
4141
//
4242
const char* largest_type;
4343
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
44-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
44+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4545
{
4646
largest_type = "(long\\s+)?double|real_concept";
4747
}

test/test_ellint_d.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void expected_results()
4242
//
4343
const char* largest_type;
4444
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
45-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
45+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4646
{
4747
largest_type = "(long\\s+)?double";
4848
}

test/test_gamma.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void expected_results()
4343
//
4444
const char* largest_type;
4545
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
46-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
46+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4747
{
4848
largest_type = "(long\\s+)?double";
4949
}

test/test_hermite.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void expected_results()
4747
//
4848
const char* largest_type;
4949
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
50-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
50+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5151
{
5252
largest_type = "(long\\s+)?double";
5353
}

test/test_heuman_lambda.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void expected_results()
4242
//
4343
const char* largest_type;
4444
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
45-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
45+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
4646
{
4747
largest_type = "(long\\s+)?double";
4848
}

test/test_hypergeometric_dist.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void expected_results()
5757
//
5858
const char* largest_type;
5959
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
60-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
60+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
6161
{
6262
largest_type = "(long\\s+)?double|real_concept";
6363
}

test/test_ibeta.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void expected_results()
5656
//
5757
const char* largest_type;
5858
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
59-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
59+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
6060
{
6161
largest_type = "(long\\s+)?double";
6262
}

test/test_ibeta_derivative.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void expected_results()
4848
//
4949
const char* largest_type;
5050
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
51-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
51+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5252
{
5353
largest_type = "(long\\s+)?double|real_concept";
5454
}

test/test_ibeta_inv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void expected_results()
6767
//
6868
const char* largest_type;
6969
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
70-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
70+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
7171
{
7272
largest_type = "(long\\s+)?double";
7373
}

test/test_ibeta_inv_ab.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void expected_results()
5555
//
5656
const char* largest_type;
5757
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
58-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
58+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5959
{
6060
largest_type = "(long\\s+)?double";
6161
}

test/test_igamma.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void expected_results()
4949
//
5050
const char* largest_type;
5151
#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
52-
if(boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
52+
if(!boost::math::policies::promote_double<>() || boost::math::policies::digits<double, boost::math::policies::policy<> >() == boost::math::policies::digits<long double, boost::math::policies::policy<> >())
5353
{
5454
largest_type = "(long\\s+)?double";
5555
}

0 commit comments

Comments
 (0)