Simple yet efficient terminal RPN calcultator.
Grab a release.
Using Go 1.11:
export GO111MODULES=on
git clone https://github.com/leucos/gorpn
cd gorpn
go install
+
,-
,*
,/
,%
pow
,^
(e.g.2⏎3⏎pow⏎
yields8
),sqrt
sin
,cos
,tan
,asin
,acos
,atan
,abs
,ceil
,floor
,round
,trunc
(e.g.3.14159⏎2⏎trunc⏎
)rad
,deg
for angle modesdup
(a.k.a empty input and ⏎) duplicates last stack itemswap
exchanges last 2 items in the stackdrop
removes last item in the stackpi
,phi
constantsprecision
,#
(e.g.2⏎precision⏎
or ``2⏎#⏎`) limits number of displayed digitscu1_cu2
returns exchange rate betweencu1
andcu2
(e.g.isk_eur
for xchange rate between ISK and EUR)quit
or<ESC>
existsgorpn
<UP>/<DOWN>
key walks input history up or down
Mode is shown in the bottom line. If an error occurs, a red E
will
show at the bottom right corner.
- undo
- non-intercative mode support (stdin / stdout)
- sentence recall (vs token recall) with PgUp/PgDown
- stack save on exit / load on start
- completion
DWTFYWPL
@leucos
Inspired by https://medium.com/@jhh3/anonymous-functions-and-reflection-in-go-71274dd9e83a