3 releases (1 stable)

1.0.0 Jun 6, 2023
0.1.2 Jun 6, 2023
0.1.1 May 12, 2023
0.1.0 May 12, 2023

#598 in Math

BSD-3-Clause

11KB
245 lines

stcalc

Stack-based Calculator

Calculate stacking and unstacking values.

Installation

cargo install stcalc

Commands

  • Floating point numbers are pushed into the stack top
  • + unstack adding
  • - invert stack top signal
  • * unstack multiplying
  • / invert stack top
  • ! discard stack top
  • = show stack top as a number
  • . show stack top as a character

Example:

echo '33 100 108 3 24 55 32 3 7 29 72 . + . + . . + . ! . + . + . + . ! . ! . ! . .' | stcalc

License: BSD-3-Clause

No runtime deps