#158: upgraded manual on entry

This commit is contained in:
Louis Rubet 2017-07-01 02:12:09 +02:00
parent 61102de4fe
commit 5e6aa1b197
2 changed files with 21 additions and 6 deletions

View file

@ -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 `<base>b<number>`
ex:
```
rpn> 5.6 0xaabb 0b1101 7b1252
4> 5.6
3> 0xaabb
2> 0b1101
1> 7b1252
```
## keywords
### general

View file

@ -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" },