It is very powerful, has history, shows previous calculations, and it's pretty darn quick too.
Of course, there are plenty more calculators, powerful too. I only mention calc because it bothers me that the name of this new project collides with it, without really providing anything useful beyond having been written in a fashionable language.
wcalc is pretty much the best terminal-mode calculator anywhere. It handles significant digits very well and knows about a bunch of mathematical constants in unicode form!
Other comments are reasonable, but fantastic work alfredxing, played around with it just now and loved how simple and intuitive it was. The only feature I really miss here is being able to use the previous answer -- is this there and I just didn't find it? Thinking of an 'ans' constant that holds the previous answer
I stopped using infix calculators a while back in favor of RPN/stack calculators (dc) because I get quite tired of parens. Is the program structured such that this change would be simple? Otherwise I feel like this is simply yet another CLI calculator.
My rpn calculator started out comparable to the project described here, once I discovered the mpmath library, the project took on a life of its own and now has over 400 operations covering basic math, number theory, combinatorics, unit conversions (comparable to the GNU units program, or the Frink programming language), algebra and anything else that strikes my fancy.
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?
I find emacs calc very fitting the RPN tradition (reminiscent of HP pocket calculators), since it provides an algebraic solver; always a pleasurable thing to witness.
Most developers can't create something new and original or improve upon what's best out there so they reinvent things with very limited functions with something that people think is cool today (in this case, golang).
My personal prejudice: I reject any calculator that does not compute the Gamma function (or factorial of non-integer arguments). Therefore, I reject this one.
http://www.isthe.com/chongo/tech/comp/calc
It is very powerful, has history, shows previous calculations, and it's pretty darn quick too.
Of course, there are plenty more calculators, powerful too. I only mention calc because it bothers me that the name of this new project collides with it, without really providing anything useful beyond having been written in a fashionable language.