#149: log alog -> log10 alog10

This commit is contained in:
Louis Rubet 2017-06-18 12:29:25 +02:00
parent 1a47d4f289
commit a773368052
3 changed files with 11 additions and 11 deletions

View file

@ -247,12 +247,12 @@ rpn>
|keyword|description|
|-|-|
|e| exp(1) constant
|log| logarithm base 10
|alog| (or exp10) exponential base 10
|log2| logarithm base 2
|alog2| (or exp2) exponential base 2
|ln| logarithm base e
|exp| exponential
|log10| logarithm base 10
|alog10| (or exp10) exponential base 10
|log2| logarithm base 2
|alog2| (or exp2) exponential base 2
|sinh| hyperbolic sine
|asinh| inverse hyperbolic sine
|cosh| hyperbolic cosine

View file

@ -163,14 +163,14 @@ program::keyword_t program::s_keywords[] =
//LOGS
{ cmd_undef, "", NULL, "\nLOGS"},
{ cmd_keyword, "e", &program::rpn_e, "exp(1) constant" },
{ cmd_keyword, "log", &program::rpn_log, "logarithm base 10" },
{ cmd_keyword, "alog", &program::rpn_alog, "(or exp10) exponential base 10" },
{ cmd_keyword, "exp10", &program::rpn_alog, "" },
{ cmd_keyword, "ln", &program::rpn_ln, "logarithm base e" },
{ cmd_keyword, "exp", &program::rpn_exp, "exponential" },
{ cmd_keyword, "log10", &program::rpn_log10, "logarithm base 10" },
{ cmd_keyword, "alog10", &program::rpn_alog10, "(or exp10) exponential base 10" },
{ cmd_keyword, "exp10", &program::rpn_alog10, "" },
{ cmd_keyword, "log2", &program::rpn_log2, "logarithm base 2" },
{ cmd_keyword, "alog2", &program::rpn_alog2, "(or exp2) exponential base 2" },
{ cmd_keyword, "exp2", &program::rpn_alog2, "" },
{ cmd_keyword, "ln", &program::rpn_ln, "logarithm base e" },
{ cmd_keyword, "exp", &program::rpn_exp, "exponential" },
{ cmd_keyword, "sinh", &program::rpn_sinh, "hyperbolic sine" },
{ cmd_keyword, "asinh", &program::rpn_asinh, "inverse hyperbolic sine" },
{ cmd_keyword, "cosh", &program::rpn_sinh, "hyperbolic cosine" },

View file

@ -5,7 +5,7 @@ void rpn_e(void)
CHECK_MPFR(mpfr_exp(euler->_value.mpfr, euler->_value.mpfr, floating_t::s_mpfr_rnd));
}
void rpn_log()
void rpn_log10()
{
MIN_ARGUMENTS(1);
ARG_MUST_BE_OF_TYPE(0, cmd_number);
@ -29,7 +29,7 @@ void rpn_log()
CHECK_MPFR(mpfr_log10(left->_value.mpfr, left->_value.mpfr, floating_t::s_mpfr_rnd));
}
void rpn_alog()
void rpn_alog10()
{
MIN_ARGUMENTS(1);
ARG_MUST_BE_OF_TYPE(0, cmd_number);