8 #ifndef PROGS_SRC_SEQUENTIAL_SEQUENTIAL_SEQUENTIAL__INLINE_HPP_ 9 #define PROGS_SRC_SEQUENTIAL_SEQUENTIAL_SEQUENTIAL__INLINE_HPP_ 18 #include "../../common/sigmaodd/helper.hpp" 34 for (
unsigned int i = 1; i < size; ++i) {
35 min = std::min(min, ns[i]);
45 const std::set<nat_type> &bad_table,
52 && (bad_table.find(n) == bad_table.cend())
61 const std::set<nat_type> &bad_table,
68 && (bad_table.find(n) == bad_table.cend())
77 const std::set<nat_type> &bad_table,
86 && (bad_table.find(n) == bad_table.cend())
95 const std::set<nat_type> &bad_table,
103 : ((bad_first_n <= n) && (n <= bad_last_n) && (
sigmaodd::square(sqrt_n) != n)
104 && (bad_table.find(n) == bad_table.cend())
111 #endif // PROGS_SRC_SEQUENTIAL_SEQUENTIAL_SEQUENTIAL__INLINE_HPP_ unsigned long nat_type
Type for natural number used in all code, on 64 bits.
sigmaodd::nat_type nat_type
constexpr bool is_odd(nat_type n)
Return true iff n is odd.
nat_type ceil_eighth_root(nat_type n)
Return the eighth root of n rounded to above.
bool is_square(nat_type n)
Return true iff n is a perfect square.
constexpr nat_type sequential_sigma_odd_upper_bound(nat_type n, const std::set< nat_type > &bad_table, nat_type bad_first_n)
Return an upper bound of varsigma_odd(n).
constexpr nat_type sequential_min_array(const nat_type ns[], size_t size)
Return the minimum of the first size values of ns.
constexpr nat_type sequential_sigma_odd_upper_bound_with_sqrt(nat_type n, const std::set< nat_type > &bad_table, nat_type bad_first_n, nat_type sqrt_n)
Return an upper bound of varsigma_odd(n).
constexpr double square(double x)
Return x*x.