@@ -28,14 +28,40 @@ TEST_CASE("hyp2f1 complex scipy.special cases", "[hyp2f1][complex][scipy-special
28
28
auto [desired, fallback] = output;
29
29
auto out = xsf::hyp2f1 (a, b, c, z);
30
30
auto error = xsf::extended_relative_error (out, desired);
31
+ tol = adjust_tolerance (tol);
31
32
INFO (" a := " << std::setprecision (std::numeric_limits<double >::max_digits10) << a << ' \n '
32
33
<< " b := " << b << ' \n '
33
34
<< " c := " << c << ' \n '
34
35
<< " z := " << z << ' \n '
35
36
<< " out := " << out << ' \n '
36
37
<< " desired := " << desired << ' \n '
37
38
<< " error := " << error << ' \n '
38
- << " tolerance := " << 2 * tol << ' \n '
39
+ << " tolerance := " << tol << ' \n '
39
40
);
40
- REQUIRE (error < 2 *tol);
41
+ REQUIRE (error <= tol);
42
+ }
43
+
44
+ TEST_CASE (" hyp2f1 real scipy.special cases" , " [hyp2f1][real][scipy-special]" ) {
45
+ auto [input, output, tol] = GENERATE (
46
+ xsf_test_cases<
47
+ std::tuple<double , double , double , double >, std::tuple<double , bool >, double >(
48
+ hyp2f1_tables_path / " In_d_d_d_d-d.parquet" , hyp2f1_tables_path / " Out_d_d_d_d-d.parquet" ,
49
+ hyp2f1_tables_path / " Err_d_d_d_d-d_gcc-linux-x86_64.parquet"
50
+ )
51
+ );
52
+ auto [a, b, c, z] = input;
53
+ auto [desired, fallback] = output;
54
+ auto out = xsf::hyp2f1 (a, b, c, z);
55
+ auto error = xsf::extended_relative_error (out, desired);
56
+ tol = adjust_tolerance (tol);
57
+ INFO (" a := " << std::setprecision (std::numeric_limits<double >::max_digits10) << a << ' \n '
58
+ << " b := " << b << ' \n '
59
+ << " c := " << c << ' \n '
60
+ << " z := " << z << ' \n '
61
+ << " out := " << out << ' \n '
62
+ << " desired := " << desired << ' \n '
63
+ << " error := " << error << ' \n '
64
+ << " tolerance := " << tol << ' \n '
65
+ );
66
+ REQUIRE (error <= tol);
41
67
}
0 commit comments