Skip to content

Commit

Permalink
Rename --R-inverse --RiemannR-inverse
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Feb 17, 2024
1 parent 45da3eb commit 42a90d1
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Changes in version 12.0, 13/02/2024
Changes in version 12.0, 17/02/2024
===================================

* stressTest.cpp: New --stress-test[=MODE] command-line option.
* RiemannR.cpp: Faster Riemann R function implementation #144.
* CmdOptions.cpp: New -R && --RiemannR command line options.
* CmdOptions.cpp: New --R-inverse command line option.
* CmdOptions.cpp: New --RiemannR-inverse command line option.
* CmdOptions.cpp: Add new --timeout option for stress testing.
* main.cpp: Improve command-line option handling.

Expand Down
6 changes: 3 additions & 3 deletions doc/primesieve.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: primesieve
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 02/16/2024
.\" Date: 02/17/2024
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "PRIMESIEVE" "1" "02/16/2024" "\ \&" "\ \&"
.TH "PRIMESIEVE" "1" "02/17/2024" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down Expand Up @@ -113,7 +113,7 @@ Quiet mode, prints less output\&.
Approximate PrimePi(x) using the Riemann R function: R(x)\&.
.RE
.PP
\fB\-\-R\-inverse\fR
\fB\-\-RiemannR\-inverse\fR
.RS 4
Approximate the nth prime using the inverse Riemann R function: R^\-1(x)\&.
.RE
Expand Down
2 changes: 1 addition & 1 deletion doc/primesieve.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ OPTIONS
*-R, --RiemannR*::
Approximate PrimePi(x) using the Riemann R function: R(x).

*--R-inverse*::
*--RiemannR-inverse*::
Approximate the nth prime using the inverse Riemann R function: R^-1(x).

*-s, --size*='SIZE'::
Expand Down
60 changes: 30 additions & 30 deletions src/app/CmdOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,36 +302,36 @@ CmdOptions parseOptions(int argc, char* argv[])
/// primesieve command-line options
const std::map<std::string, std::pair<OptionID, IsParam>> optionMap =
{
{ "-c", std::make_pair(OPTION_COUNT, OPTIONAL_PARAM) },
{ "--count", std::make_pair(OPTION_COUNT, OPTIONAL_PARAM) },
{ "--cpu-info", std::make_pair(OPTION_CPU_INFO, NO_PARAM) },
{ "-h", std::make_pair(OPTION_HELP, NO_PARAM) },
{ "--help", std::make_pair(OPTION_HELP, NO_PARAM) },
{ "-n", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) },
{ "--nthprime", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) },
{ "--nth-prime", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) },
{ "--no-status", std::make_pair(OPTION_NO_STATUS, NO_PARAM) },
{ "--number", std::make_pair(OPTION_NUMBER, REQUIRED_PARAM) },
{ "-d", std::make_pair(OPTION_DISTANCE, REQUIRED_PARAM) },
{ "--dist", std::make_pair(OPTION_DISTANCE, REQUIRED_PARAM) },
{ "-p", std::make_pair(OPTION_PRINT, OPTIONAL_PARAM) },
{ "--print", std::make_pair(OPTION_PRINT, OPTIONAL_PARAM) },
{ "-q", std::make_pair(OPTION_QUIET, NO_PARAM) },
{ "--quiet", std::make_pair(OPTION_QUIET, NO_PARAM) },
{ "-R", std::make_pair(OPTION_R, NO_PARAM) },
{ "--RiemannR", std::make_pair(OPTION_R, NO_PARAM) },
{ "--R-inverse", std::make_pair(OPTION_R_INVERSE, NO_PARAM) },
{ "-s", std::make_pair(OPTION_SIZE, REQUIRED_PARAM) },
{ "--size", std::make_pair(OPTION_SIZE, REQUIRED_PARAM) },
{ "-S", std::make_pair(OPTION_STRESS_TEST, OPTIONAL_PARAM) },
{ "--stress-test", std::make_pair(OPTION_STRESS_TEST, OPTIONAL_PARAM) },
{ "--test", std::make_pair(OPTION_TEST, NO_PARAM) },
{ "-t", std::make_pair(OPTION_THREADS, REQUIRED_PARAM) },
{ "--threads", std::make_pair(OPTION_THREADS, REQUIRED_PARAM) },
{ "--time", std::make_pair(OPTION_TIME, NO_PARAM) },
{ "--timeout", std::make_pair(OPTION_TIMEOUT, REQUIRED_PARAM) },
{ "-v", std::make_pair(OPTION_VERSION, NO_PARAM) },
{ "--version", std::make_pair(OPTION_VERSION, NO_PARAM) }
{ "-c", std::make_pair(OPTION_COUNT, OPTIONAL_PARAM) },
{ "--count", std::make_pair(OPTION_COUNT, OPTIONAL_PARAM) },
{ "--cpu-info", std::make_pair(OPTION_CPU_INFO, NO_PARAM) },
{ "-h", std::make_pair(OPTION_HELP, NO_PARAM) },
{ "--help", std::make_pair(OPTION_HELP, NO_PARAM) },
{ "-n", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) },
{ "--nthprime", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) },
{ "--nth-prime", std::make_pair(OPTION_NTH_PRIME, NO_PARAM) },
{ "--no-status", std::make_pair(OPTION_NO_STATUS, NO_PARAM) },
{ "--number", std::make_pair(OPTION_NUMBER, REQUIRED_PARAM) },
{ "-d", std::make_pair(OPTION_DISTANCE, REQUIRED_PARAM) },
{ "--dist", std::make_pair(OPTION_DISTANCE, REQUIRED_PARAM) },
{ "-p", std::make_pair(OPTION_PRINT, OPTIONAL_PARAM) },
{ "--print", std::make_pair(OPTION_PRINT, OPTIONAL_PARAM) },
{ "-q", std::make_pair(OPTION_QUIET, NO_PARAM) },
{ "--quiet", std::make_pair(OPTION_QUIET, NO_PARAM) },
{ "-R", std::make_pair(OPTION_R, NO_PARAM) },
{ "--RiemannR", std::make_pair(OPTION_R, NO_PARAM) },
{ "--RiemannR-inverse", std::make_pair(OPTION_R_INVERSE, NO_PARAM) },
{ "-s", std::make_pair(OPTION_SIZE, REQUIRED_PARAM) },
{ "--size", std::make_pair(OPTION_SIZE, REQUIRED_PARAM) },
{ "-S", std::make_pair(OPTION_STRESS_TEST, OPTIONAL_PARAM) },
{ "--stress-test", std::make_pair(OPTION_STRESS_TEST, OPTIONAL_PARAM) },
{ "--test", std::make_pair(OPTION_TEST, NO_PARAM) },
{ "-t", std::make_pair(OPTION_THREADS, REQUIRED_PARAM) },
{ "--threads", std::make_pair(OPTION_THREADS, REQUIRED_PARAM) },
{ "--time", std::make_pair(OPTION_TIME, NO_PARAM) },
{ "--timeout", std::make_pair(OPTION_TIMEOUT, REQUIRED_PARAM) },
{ "-v", std::make_pair(OPTION_VERSION, NO_PARAM) },
{ "--version", std::make_pair(OPTION_VERSION, NO_PARAM) }
};

CmdOptions opts;
Expand Down
2 changes: 1 addition & 1 deletion src/app/help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void help(int exitCode)
" -q, --quiet Quiet mode, prints less output.\n"
" -R, --RiemannR Riemann R function, very accurate\n"
" approximation of PrimePi(x).\n"
" --R-inverse Inverse Riemann R function, very accurate\n"
" --RiemannR-inverse Inverse Riemann R function, very accurate\n"
" approximation of the nth prime.\n"
" -s, --size=SIZE Set the sieve size in KiB, SIZE <= 8192.\n"
" By default primesieve uses a sieve size that\n"
Expand Down

0 comments on commit 42a90d1

Please sign in to comment.