Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/test_Cl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,17 @@ TEST_CASE("test_real_fixed_values")
}

if (std::abs(x128 - 2*pi128) > 1e-10L) {
CHECK_CLOSE(cl128_poly , cl128_expected, 6*eps128);
CHECK_CLOSE(cl128_poly , cl128_expected, 10*eps128);
} else {
CHECK_CLOSE(cl128_poly , cl128_expected, 50*eps128);
}
if (std::abs(x128 - 2*pi128) > 1e-10L) {
CHECK_CLOSE(cl128_poly_c, cl128_expected, 6*eps128);
CHECK_CLOSE(cl128_poly_c, cl128_expected, 10*eps128);
} else {
CHECK_CLOSE(cl128_poly_c, cl128_expected, 50*eps128);
}
if (std::abs(x128 - 2*pi128) > 1e-10L) {
CHECK_CLOSE(cl128_koelbig, cl128_expected, 6*eps128);
CHECK_CLOSE(cl128_koelbig, cl128_expected, 10*eps128);
} else {
CHECK_CLOSE(cl128_koelbig, cl128_expected, 50*eps128);
}
Expand Down
4 changes: 2 additions & 2 deletions test/test_Cl3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ TEST_CASE("test_real_fixed_values")
#endif
CHECK_CLOSE(cl64_pade , cl64_expected , 2*eps64 );
CHECK_CLOSE(cl64_wu , cl64_expected , 2*eps64 );
CHECK_CLOSE(cl128_poly , cl128_expected, 5*eps128);
CHECK_CLOSE(cl128_poly_c, cl128_expected, 5*eps128);
CHECK_CLOSE(cl128_poly , cl128_expected, 10*eps128);
CHECK_CLOSE(cl128_poly_c, cl128_expected, 10*eps128);
CHECK_CLOSE(cl128_li3 , cl128_expected, 2*eps128);

// test symmetries
Expand Down
12 changes: 6 additions & 6 deletions test/test_Cl5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ TEST_CASE("test_real_fixed_values")
CHECK_CLOSE(cl64_poly_f , cl64_expected , 2*eps64 );
#endif
CHECK_CLOSE(cl128_li , cl128_expected, 4*eps128);
CHECK_CLOSE(cl128_poly , cl128_expected, 7*eps128);
CHECK_CLOSE(cl128_poly_c, cl128_expected, 7*eps128);
CHECK_CLOSE(cl128_poly , cl128_expected, 20*eps128);
CHECK_CLOSE(cl128_poly_c, cl128_expected, 10*eps128);

// test symmetries
if (std::abs(std::fmod(x64, 2*M_PI)) > 0.1 && std::abs(x64 - 2*M_PI) > 0.1) {
Expand All @@ -137,10 +137,10 @@ TEST_CASE("test_real_fixed_values")
CHECK_CLOSE( poly_Cl5_fortran(-x64 ), cl64_expected , 10*eps64);
#endif

CHECK_CLOSE(polylogarithm::Cl5(x128 + 2*M_PIL), cl128_expected, 10*eps128);
CHECK_CLOSE(polylogarithm::Cl5(x128 - 2*M_PIL), cl128_expected, 10*eps128);
CHECK_CLOSE(polylogarithm::Cl5(-x128 ), cl128_expected, 10*eps128);
CHECK_CLOSE(polylogarithm::Cl5(-x128 ), cl128_expected, 10*eps128);
CHECK_CLOSE(polylogarithm::Cl5(x128 + 2*M_PIL), cl128_expected, 20*eps128);
CHECK_CLOSE(polylogarithm::Cl5(x128 - 2*M_PIL), cl128_expected, 20*eps128);
CHECK_CLOSE(polylogarithm::Cl5(-x128 ), cl128_expected, 20*eps128);
CHECK_CLOSE(polylogarithm::Cl5(-x128 ), cl128_expected, 20*eps128);
}
}
}
18 changes: 10 additions & 8 deletions test/test_Li2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ TEST_CASE("test_special_values")

CHECK_CLOSE(36.*Li2(0.5) - 36.*Li2(0.25)
- 12.*Li2(1./8.) + 6.*Li2(1./64.),
pi2, 2*eps);
pi2, 10*eps);

{
// special point wher z^2 < epsilon
Expand Down Expand Up @@ -452,13 +452,15 @@ TEST_CASE("test_overflow")
#endif
}

const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-4.241518159395905038804045816392180824073e7L, 28935.13764966185924996018620104716451L}, eps128}
};
if (std::numeric_limits<long double>::max_exponent10 >= 4000) {
const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-4.241518159395905038804045816392180824073e7L, 28935.13764966185924996018620104716451L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li2(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li2(d.z), d.li_expected, d.eps);
for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li2(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li2(d.z), d.li_expected, d.eps);
}
}
}

Expand Down Expand Up @@ -759,7 +761,7 @@ TEST_CASE("test_complex_random_values")
CHECK_CLOSE_COMPLEX(li2, li2_tsil , 10*eps);
CHECK_CLOSE_COMPLEX(li2, li2_hdecay, 10*eps);
CHECK_CLOSE_COMPLEX(li2, li2_hollik, 10*eps);
CHECK_CLOSE_COMPLEX(li2, li2_lt , 2*eps);
CHECK_CLOSE_COMPLEX(li2, li2_lt , 10*eps);
CHECK_CLOSE_COMPLEX(li2, li2_sherpa, 10*eps);
CHECK_CLOSE_COMPLEX(li2, li2_spheno, 10*eps);
}
Expand Down
16 changes: 9 additions & 7 deletions test/test_Li3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,15 @@ TEST_CASE("test_overflow")
#endif
}

const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-1.3021939960597718633480560501920418668419e11L, 1.3325123323168432929414697360944689612e8L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li3(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li3(d.z), d.li_expected, d.eps);
if (std::numeric_limits<long double>::max_exponent10 >= 4000) {
const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-1.3021939960597718633480560501920418668419e11L, 1.3325123323168432929414697360944689612e8L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li3(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li3(d.z), d.li_expected, d.eps);
}
}
}

Expand Down
16 changes: 9 additions & 7 deletions test/test_Li4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,15 @@ TEST_CASE("test_overflow")
#endif
}

const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-2.998411785811730437806291599010045237778e14L, 4.090964043497988426223363565328465514e11L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li4(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li4(d.z), d.li_expected, d.eps);
if (std::numeric_limits<long double>::max_exponent10 >= 4000) {
const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-2.998411785811730437806291599010045237778e14L, 4.090964043497988426223363565328465514e11L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li4(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li4(d.z), d.li_expected, d.eps);
}
}
}

Expand Down
16 changes: 9 additions & 7 deletions test/test_Li5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,15 @@ TEST_CASE("test_overflow")
#endif
}

const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-5.523276910915025884712078063195501148879e17L, 9.419792822533112833122424859594537172e14L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li5(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li5(d.z), d.li_expected, d.eps);
if (std::numeric_limits<long double>::max_exponent10 >= 4000) {
const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-5.523276910915025884712078063195501148879e17L, 9.419792822533112833122424859594537172e14L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li5(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li5(d.z), d.li_expected, d.eps);
}
}
}

Expand Down
16 changes: 9 additions & 7 deletions test/test_Li6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,15 @@ TEST_CASE("test_overflow")
#endif
}

const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-8.478540098238822566033321355282680660651e20L, 1.7351899625805641348387419061716509476e18L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li6(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li6(d.z), d.li_expected, d.eps);
if (std::numeric_limits<long double>::max_exponent10 >= 4000) {
const Data<long double> data128[] = {
{{1e4000L, 1.0L}, {-8.478540098238822566033321355282680660651e20L, 1.7351899625805641348387419061716509476e18L}, eps128}
};

for (const auto& d : data128) {
CHECK_CLOSE_COMPLEX(Li6(d.z), d.li_expected, d.eps);
CHECK_CLOSE_COMPLEX(poly_Li6(d.z), d.li_expected, d.eps);
}
}
}

Expand Down