4 releases (2 stable)

new 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

#268 in Math

Download history 2/week @ 2024-02-22 1/week @ 2024-02-29 1/week @ 2024-03-14 1/week @ 2024-03-21 10/week @ 2024-03-28 1/week @ 2024-04-04

302 downloads per month

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