39 std::cerr <<
"Usage: check_varsigma_odd [options]" << std::endl
41 <<
"Options:" << std::endl
42 <<
" --first n first odd number to check (3 by default)" << std::endl
43 <<
" --last n last odd number to check (101 by default)" << std::endl
44 <<
" --nb n number of odd numbers to check" << std::endl;
56 main(
int argc,
const char*
const argv[]) {
70 for (
unsigned int i = 1; i < static_cast<unsigned int>(argc); ++i) {
71 const std::string param(argv[i]);
73 if (param ==
"--first") {
79 else if (param ==
"--last") {
85 else if (param ==
"--nb") {
98 std::cout <<
"First: " << first
100 <<
"\tNb: " << (first <= last
101 ? (last - first)/2 + 1
106 std::cout << std::endl
107 <<
"n\tLower\tLength" << std::endl;
112 const std::chrono::steady_clock::time_point clock_start = std::chrono::steady_clock::now();
117 std::chrono::duration<double> duration = std::chrono::steady_clock::now() - clock_start;
uint64_t nat_type
Type for natural number used in all code, on 64 bits.
const std::string prime_filename
Default filename for the binary file "big_data/prime28.bin".
constexpr bool is_even(nat_type n)
Return true iff n is even.
std::string duration_to_string(std::chrono::duration< double > duration_second)
Return a string with the duration expressed in milliseconds, seconds, minutes and hours...
bool read_primes_table()
Read the binary file prime_filename to fill the table with all primes < 2^28. This table must be read...
Functions to access to tables of precaculated prime numbers and offsets to iterate on possible prime ...
void check_varsigma_odd(nat_type first_n, nat_type last_n)
Iterate from first to last (included) and for each odd n such that is_little_mersenne_prime_unitary_d...
Some generic helper functions for programs.
void print_intern_config_compiler()
Print to stdcout the intern configuration of the compiler.
Main functions to deal the sigma_odd problem.
unsigned long get_ulong(int argc, const char *const argv[], unsigned int i, void(*help_and_exit_function)())
Return argv[i] converted in integer.
int main(int argc, const char *const argv[])