Hacker News new | ask | show | jobs
by alfredxing 4145 days ago
The algorithm I use combines shunting-yard and postfix (RPN) evaluation, but I guess it wouldn't be too hard to modify the source to just do the RPN part.

If you want to try that, the relevant code is the Evaluate function in `compute/compute.go`.

A Google search for "command line calculator" doesn't turn up much, so I honestly didn't think there were many decent ones out there (aside from dc/bc). Are there any you have in mind?