 
            i = stop + 1;
 
-@@ -409,14 +410,14 @@ T S2_hard(T x,
-
- namespace primecount {
-
- 
-
- int64_t S2_hard(int64_t x,
-
--                int64_t y,
-
--                int64_t z,
-
--                int64_t c,
-
--                int64_t s2_hard_approx,
-
--                PiTable& pi,
-
--                vector<int32_t>& primes,
-
--                FactorTable<uint16_t>& factors,
-
--                int threads)
-
-+                 int64_t y,
-
-+                 int64_t z,
-
-+                 int64_t c,
-
-+                 int64_t s2_hard_approx,
-
-+                 PiTable& pi,
-
-+                 vector<int32_t>& primes,
-
-+                 FactorTable<uint16_t>& factors,
-
-+                 int threads)
-
- {
-
-   return S2_hard::S2_hard((intfast64_t) x, y, z, c, (intfast64_t) s2_hard_approx, pi, primes, factors, threads);
-
- }
-
-@@ -424,27 +425,27 @@ int64_t S2_hard(int64_t x,
-
- #ifdef HAVE_INT128_T
-
- 
-
- int128_t S2_hard(int128_t x,
-
--                 int64_t y,
-
--                 int64_t z,
-
--                 int64_t c,
-
--                 int128_t s2_hard_approx,
-
--                 PiTable& pi,
-
--                 vector<uint32_t>& primes,
-
--                 FactorTable<uint16_t>& factors,
-
--                 int threads)
-
-+                  int64_t y,
-
-+                  int64_t z,
-
-+                  int64_t c,
-
-+                  int128_t s2_hard_approx,
-
-+                  PiTable& pi,
-
-+                  vector<uint32_t>& primes,
-
-+                  FactorTable<uint16_t>& factors,
-
-+                  int threads)
-
- {
-
-   return S2_hard::S2_hard((intfast128_t) x, y, z, c, (intfast128_t) s2_hard_approx, pi, primes, factors, threads);
-
- }
-
- 
-
- int128_t S2_hard(int128_t x,
-
--                 int64_t y,
-
--                 int64_t z,
-
--                 int64_t c,
-
--                 int128_t s2_hard_approx,
-
--                 PiTable& pi,
-
--                 vector<int64_t>& primes,
-
--                 FactorTable<uint32_t>& factors,
-
--                 int threads)
-
-+                  int64_t y,
-
-+                  int64_t z,
-
-+                  int64_t c,
-
-+                  int128_t s2_hard_approx,
-
-+                  PiTable& pi,
-
-+                  vector<int64_t>& primes,
-
-+                  FactorTable<uint32_t>& factors,
-
-+                  int threads)
-
- {
-
-   return S2_hard::S2_hard((intfast128_t) x, y, z, c, (intfast128_t) s2_hard_approx, pi, primes, factors, threads);
-
- }
-
 
diff --git include/fast_div.hpp include/fast_div.hpp

index 355766f..17b5802 100644



 #include <algorithm>

@@ -184,8 +185,8 @@ T S2_hard_thread(T x,

       {
