mirror of
https://github.com/louisrubet/rpn
synced 2024-11-16 07:47:26 +01:00
#158: V2.3 (generation, manual, version.h)
This commit is contained in:
parent
b88848fb40
commit
aec4a76e1d
3 changed files with 23 additions and 25 deletions
|
@ -1,4 +1,4 @@
|
|||
# **rpn v2.2** - generation
|
||||
# **rpn v2.3** - generation
|
||||
|
||||
For now rpn is proposed only for **GNU/Linux**
|
||||
|
||||
|
@ -6,25 +6,23 @@ It can be generated following the steps below
|
|||
|
||||
## version identification
|
||||
|
||||
rpn v2.2 is statically linked against
|
||||
rpn is dynamically linked against
|
||||
- GNU MP v6.1.2
|
||||
- GNU MPFR v3.1.5
|
||||
- linenoise-ng v1.0.1
|
||||
|
||||
## GNU MP v6.1.2
|
||||
and embeds the source code of linenoise-ng v1.0.1
|
||||
|
||||
- download and install **GNU MP v6.1.2** from https://gmplib.org/
|
||||
It is necessary to get MPFR and linenoise-ng to generate rpn.
|
||||
|
||||
## GNU MPFR v3.1.5
|
||||
## install GNU MPFR v3.1.5-p8 headers
|
||||
|
||||
- download and install **GNU MPFR v3.1.5** from http://www.mpfr.org
|
||||
- download **GNU MPFR v3.1.5-p8** from http://www.mpfr.org
|
||||
- install it with usual autotools commands `./configure && make && make install`
|
||||
|
||||
## linenoise-ng v1.0.1
|
||||
## install linenoise-ng v1.0.1 source code
|
||||
|
||||
- download **linenoise-ng v1.0.1** from https://github.com/arangodb/linenoise-ng
|
||||
|
||||
- checkout the tag v1.0.1
|
||||
|
||||
- apply the following patch to the source code
|
||||
|
||||
```
|
||||
|
@ -34,7 +32,7 @@ rpn v2.2 is statically linked against
|
|||
|
||||
// ctrl-I/tab, command completion, needs to be before switch statement
|
||||
if (c == ctrlChar('I') && completionCallback) {
|
||||
+ // lru for rpn
|
||||
+ // rpn #178: enable autocompletion on void entry
|
||||
+ #if 0
|
||||
if (pos == 0) // SERVER-4967 -- in earlier versions, you could paste
|
||||
// previous output
|
||||
|
@ -47,8 +45,9 @@ rpn v2.2 is statically linked against
|
|||
killRing.lastAction = KillRing::actionOther;
|
||||
historyRecallMostRecent = false;
|
||||
```
|
||||
- install linenoise-ng with cmake commands `mkdir build && cd build && cmake .. && make install`
|
||||
|
||||
## rpn
|
||||
## generate rpn
|
||||
|
||||
- clone [rpn project](https://github.com/louisrubet/rpn/) or download a zipped version from [the release directory](https://github.com/louisrubet/rpn/releases)
|
||||
```
|
||||
|
@ -86,6 +85,4 @@ rpn v2.2 is statically linked against
|
|||
(...)
|
||||
CPack: Create package using TGZ
|
||||
(...)
|
||||
# ls rpn*
|
||||
rpn rpn-2.1-amd64.deb rpn-2.1-amd64.rpm rpn-2.1-amd64.tar.gz
|
||||
```
|
||||
|
|
21
MANUAL.md
21
MANUAL.md
|
@ -1,4 +1,4 @@
|
|||
# **rpn v2.3**- reference manual
|
||||
# **rpn**- reference manual
|
||||
|
||||
**rpn**
|
||||
- is a **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**, **test**, **trig** and **logs** commands
|
||||
|
@ -31,7 +31,7 @@ var 1: name 'quadratic_solution', type program, value << rot * swap 2 / chs dup
|
|||
```
|
||||
rpn> << -> x y << x y + ln >> >> 'P' sto
|
||||
rpn> 1 2 P
|
||||
rpn> 1.0986122886681096914
|
||||
rpn> 1.0986122886681096913952452369225257046
|
||||
```
|
||||
|
||||
### **arbitrary precision**
|
||||
|
@ -61,14 +61,15 @@ rpn>
|
|||
|
||||
```
|
||||
rpn>
|
||||
Display all 142 possibilities? (y or n)
|
||||
nop test neg sq %CH ip arg sci < not rot rolld pos for unti purge sto/ asin e log2 tanh
|
||||
? version * sqr mod fp c->r prec <= same dup over sub next while vars sneg cos ln alog2 atanh
|
||||
h uname / abs fact min r->c round != swap dup2 ->str if step whil clusr sinv acos log exp2
|
||||
help history inv dec mant max p->r default == drop dupn str-> then ift repeat edit eval tan exp sinh
|
||||
q + ^ hex xpon re r->p type and drop2 pick chr else ifte repea sto+ -> atan log10 asinh
|
||||
quit - pow sign floor im std > or dropn depth num end do sto sto- pi d->r alog10 cosh
|
||||
exit chs sqrt % ceil conj fix >= xor erase roll size start until rcl sto* sin r->d exp10 acosh
|
||||
Display all 144 possibilities? (y or n)
|
||||
nop exit chs sqrt sign floor im std > or dropn depth num end do sto sto- pi d->r alog10 cosh
|
||||
help test neg sq % ceil conj fix >= xor erase roll size start until rcl sto* sin r->d exp10 acosh
|
||||
h version * sqr %CH ip arg sci < not rot rolld pos for unti purge sto/ asin e log2 tanh
|
||||
? uname / abs mod fp c->r prec <= same dup over sub next while vars sneg cos ln alog2 atanh
|
||||
q history inv dec fact min r->c round != swap dup2 ->str if step whil clusr sinv acos log exp2
|
||||
quit + ^ hex mant max p->r default == drop dupn str-> then ift repeat edit eval tan exp sinh
|
||||
q - pow bin xpon re r->p type and drop2 pick chr else ifte repea sto+ -> atan log10 asinh
|
||||
rpn>
|
||||
```
|
||||
|
||||
## keywords
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// version and soft name
|
||||
#define RPN_VERSION "2.2"
|
||||
#define RPN_VERSION "2.3"
|
||||
static const char version[] = RPN_VERSION;
|
||||
static const char uname[] =
|
||||
"rpn v" RPN_VERSION ", (c) 2017 <louis@rubet.fr>, GNU LGPL v3\n";
|
||||
|
|
Loading…
Reference in a new issue