Skip to content

Commit 0a51d96

Browse files
committed
Adjust some Bessel test tolerances
1 parent b026deb commit 0a51d96

File tree

3 files changed

+15
-33
lines changed

3 files changed

+15
-33
lines changed

include/boost/multiprecision/cpp_double_fp.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ class cpp_double_fp_backend
600600

601601
float_type C { cpp_df_qf_detail::split(float_type()) * data.first };
602602

603-
float_type hu { };
603+
float_type hu { C - float_type { C - data.first } };
604604

605605
if (cpp_df_qf_detail::ccmath::isinf(C))
606606
{
@@ -617,10 +617,6 @@ class cpp_double_fp_backend
617617

618618
hu = (data.first - C) * cpp_df_qf_detail::split(float_type());
619619
}
620-
else
621-
{
622-
hu = float_type { C - float_type { C - data.first } };
623-
}
624620

625621
C = data.first * v.data.first;
626622

test/math/test_bessel_j.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ void expected_results()
5656
".*cpp_bin_float.*", // test type(s)
5757
".*JN.*Integer.*", // test data group
5858
".*", 500000, 150000); // test function
59+
add_expected_result(
60+
".*", // compiler
61+
".*", // stdlib
62+
".*", // platform
63+
".*cpp_double_double.*", // test type(s)
64+
".*(JN|j).*|.*Tricky.*", // test data group
65+
".*", 100000, 30000); // test function
5966
add_expected_result(
6067
".*", // compiler
6168
".*", // stdlib
@@ -77,13 +84,6 @@ void expected_results()
7784
".*cpp_bin_float.*", // test type(s)
7885
".*(JN|j).*|.*Tricky.*", // test data group
7986
".*", 500000, 200000); // test function
80-
add_expected_result(
81-
".*", // compiler
82-
".*", // stdlib
83-
".*", // platform
84-
".*cpp_double_double.*", // test type(s)
85-
".*(JN|j).*|.*Tricky.*", // test data group
86-
".*", 50000, 11000); // test function
8787
add_expected_result(
8888
".*", // compiler
8989
".*", // stdlib

test/math/test_bessel_y.cpp

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ void expected_results()
4141
".*mpfr_float_backend<0>.*", // test type(s)
4242
".*(Y[nv]|y).*Random.*", // test data group
4343
".*", 150000, 15000); // test function
44+
add_expected_result(
45+
".*", // compiler
46+
".*", // stdlib
47+
".*", // platform
48+
".*cpp_double_double.*", // test type(s)
49+
".*", // test data group
50+
".*", 100000, 60000); // test function
4451
add_expected_result(
4552
".*", // compiler
4653
".*", // stdlib
4754
".*", // platform
4855
".*", // test type(s)
4956
".*(Y[nv]|y).*Random.*", // test data group
5057
".*", 70000, 4000); // test function
51-
add_expected_result(
52-
".*", // compiler
53-
".*", // stdlib
54-
".*", // platform
55-
".*cpp_double_double.*", // test type(s)
56-
".*Y[n10].*", // test data group
57-
".*", 50000, 10000); // test function
5858
add_expected_result(
5959
".*", // compiler
6060
".*", // stdlib
@@ -69,20 +69,6 @@ void expected_results()
6969
".*cpp_bin_float.*", // test type(s)
7070
".*Y0.*", // test data group
7171
".*", 40000, 20000); // test function
72-
add_expected_result(
73-
".*", // compiler
74-
".*", // stdlib
75-
".*", // platform
76-
".*cpp_double_double.*", // test type(s)
77-
".*Y0.*", // test data group
78-
".*", 900, 400); // test function
79-
add_expected_result(
80-
".*", // compiler
81-
".*", // stdlib
82-
".*", // platform
83-
".*cpp_double_double.*", // test type(s)
84-
".*Y1.*", // test data group
85-
".*", 900, 300); // test function
8672
add_expected_result(
8773
".*", // compiler
8874
".*", // stdlib

0 commit comments

Comments
 (0)