diff --git a/MANUAL.md b/MANUAL.md index 8ee5e84..0cae099 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -1,9 +1,9 @@ # **rpn** - reference manual **rpn** -- is a full-featured **math-oriented language** inspired by Hewlett-Packard **R**everse **P**olish **L**isp (**HP28S** user manual is provided as a reference), it includes at least **stack**, **store**, **branch**, **program**, **complex**, **real**, **test**, **trig** and **logs** commands -- is implemented as a **command-line calculator** for GNU/Linux -- brings powerfull calculation facilities on floating point numbers with __arbitrary precision__, provided by **GNU MP** and **GNU MPFR** libraries +- is a structured full-featured **math-oriented language** inspired by Hewlett-Packard **R**everse **P**olish **L**isp (**HP28S** and **HP48GX** user manual are provided as references), including **real**, **complex**, **stack**, **store**, **branch**, **program**, **test**, **trig** and **logs** commands and more to come +- is implemented as a **command-line calculator** for most popular Linux distributions +- brings powerfull calculation facilities on floating point numbers with __arbitrary precision__ provided by **GNU MP** and **GNU MPFR** libraries - uses that so cool **reverse polish notation** ## Quick examples @@ -45,7 +45,7 @@ rpn> erase 10000 prec pi rpn> ``` -### Objects +### object types Following objects are managed: **floating numbers**, **complexes**, **symbols**, **strings**, **programs**, plus language **keywords** (commands and flow controls) ``` @@ -57,7 +57,7 @@ Following objects are managed: **floating numbers**, **complexes**, **symbols**, rpn> ``` -### Command line +### command line **rpn** is a cli interface with an **interactive editor** with autocompletion provided by **linenoise-ng**, see https://github.com/arangodb/linenoise-ng @@ -74,6 +74,21 @@ q - pow bin mant max p->r default == rpn> ``` +## entry + +**reals** can be entered in decimal, binary, hexadecimal or arbitrary base from 2 to 62 + +base is entered with format `b` + +ex: +``` +rpn> 5.6 0xaabb 0b1101 7b1252 +4> 5.6 +3> 0xaabb +2> 0b1101 +1> 7b1252 +``` + ## keywords ### general diff --git a/src/program.cpp b/src/program.cpp index 86c1782..64378c4 100644 --- a/src/program.cpp +++ b/src/program.cpp @@ -21,7 +21,7 @@ program::keyword_t program::s_keywords[] = { cmd_keyword, "uname", &program::rpn_uname, "show rpn complete identification string" }, { cmd_keyword, "history", &program::rpn_history, "see commands history" }, - //USUAL OPERATIONS ON REALS AND COMPLEXEXE + //USUAL OPERATIONS ON REALS AND COMPLEXES { cmd_undef, "", NULL, "\nUSUAL OPERATIONS ON REALS AND COMPLEXES"}, { cmd_keyword, "+", &program::rpn_plus, "addition" }, { cmd_keyword, "-", &program::rpn_minus, "substraction" },