Skip to content

Commit

Permalink
update math_functions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
i80287 committed Nov 24, 2024
1 parent 8bcd002 commit 2605c37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion number_theory/test_math_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3530,7 +3530,7 @@ void test_pow_arange() {
const vector<double> pow_range = pow_arange(n, p);
assert(pow_range.size() == n + 1);
for (uint32_t i = 0; i <= n; i++) {
const double eps = i <= 20 ? 1e-11
double eps = i <= 20 ? 1e-11
: i <= 30 ? 1e-10
: i <= 40 ? 1e-8
: i <= 50 ? 1e-7
Expand All @@ -3541,6 +3541,9 @@ void test_pow_arange() {
: i < 90 ? 1e-2
: i < 95 ? 1e-1
: 1;
#ifdef __MINGW32__
eps *= 10;
#endif
assert(std::abs(pow_range[i] - std::pow(p, i)) <= eps);
}
}
Expand Down

0 comments on commit 2605c37

Please sign in to comment.