4 releases (2 stable)

1.0.1 May 22, 2024
1.0.0 Jun 6, 2023
0.1.2 Jun 6, 2023
0.1.1 May 12, 2023
0.1.0 May 12, 2023

#409 in Math

BSD-3-Clause

10KB
224 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