From a7733680529e9366b8407f880fbb921348c60b66 Mon Sep 17 00:00:00 2001 From: Louis Rubet Date: Sun, 18 Jun 2017 12:29:25 +0200 Subject: [PATCH] #149: log alog -> log10 alog10 --- MANUAL.md | 8 ++++---- src/program.cpp | 10 +++++----- src/rpn-logs.hpp | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/MANUAL.md b/MANUAL.md index 4e1ecdd..5b8ca0f 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -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 diff --git a/src/program.cpp b/src/program.cpp index fc2666d..cd73cb6 100644 --- a/src/program.cpp +++ b/src/program.cpp @@ -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" }, diff --git a/src/rpn-logs.hpp b/src/rpn-logs.hpp index 247be63..c9cd46d 100644 --- a/src/rpn-logs.hpp +++ b/src/rpn-logs.hpp @@ -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);