diff --git a/src/lmo/pi_lmo3.cpp b/src/lmo/pi_lmo3.cpp index 484317b6..fbb946ff 100644 --- a/src/lmo/pi_lmo3.cpp +++ b/src/lmo/pi_lmo3.cpp @@ -9,15 +9,16 @@ /// pi(x) = pi(y) + S1(x, a) + S2(x, a) - 1 - P2(x, a) /// with y = x^(1/3), a = pi(y) /// -/// Copyright (C) 2023 Kim Walisch, +/// Copyright (C) 2024 Kim Walisch, /// /// This file is distributed under the BSD License. See the COPYING /// file in the top level directory. /// #include -#include #include +#include +#include #include #include #include @@ -25,8 +26,6 @@ #include #include -using std::min; -using std::max; using namespace primecount; namespace { diff --git a/src/lmo/pi_lmo4.cpp b/src/lmo/pi_lmo4.cpp index 6beafa5a..3f1d49e8 100644 --- a/src/lmo/pi_lmo4.cpp +++ b/src/lmo/pi_lmo4.cpp @@ -11,15 +11,16 @@ /// pi(x) = pi(y) + S1(x, a) + S2(x, a) - 1 - P2(x, a) /// with y = x^(1/3), a = pi(y) /// -/// Copyright (C) 2023 Kim Walisch, +/// Copyright (C) 2024 Kim Walisch, /// /// This file is distributed under the BSD License. See the COPYING /// file in the top level directory. /// #include -#include #include +#include +#include #include #include #include @@ -28,8 +29,6 @@ #include #include -using std::min; -using std::max; using namespace primecount; namespace { diff --git a/src/util.cpp b/src/util.cpp index 68267d80..3edecf9d 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -23,9 +24,6 @@ #include #include -using std::min; -using std::max; - namespace { int status_precision_ = -1; @@ -432,7 +430,7 @@ int64_t get_x_star_gourdon(maxint_t x, int64_t y) // numbers below 10^6. x_star = min(x_star, y); x_star = min(x_star, sqrt_xy); - x_star = max(x_star, (int64_t) 1); + x_star = max(x_star, 1); return x_star; } diff --git a/test/deleglise-rivat/S2_easy.cpp b/test/deleglise-rivat/S2_easy.cpp index c136a1ca..b7b80d40 100644 --- a/test/deleglise-rivat/S2_easy.cpp +++ b/test/deleglise-rivat/S2_easy.cpp @@ -4,7 +4,7 @@ /// S2_easy(x, y) used in the Lagarias-Miller-Odlyzko /// and Deleglise-Rivat prime counting algorithms. /// -/// Copyright (C) 2023 Kim Walisch, +/// Copyright (C) 2024 Kim Walisch, /// /// This file is distributed under the BSD License. See the COPYING /// file in the top level directory. @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -25,8 +26,6 @@ #include #include -using std::min; -using std::max; using namespace primecount; void check(bool OK)