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!
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.
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.
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.
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
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.
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).
33 comments
[ 0.20 ms ] story [ 49.5 ms ] threadhttp://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.
The project name was originally calc.go, but as you can imagine that didn't work out too well with `go get`.
-> √7×2÷π−ε0×σ+α+γ+R∞×Mτ-Φ0 = 2.26885
http://w-calc.sourceforge.net/download.php
without really providing anything useful beyond having been written in a fashionable language
The latter part of your comment sounds a bit discouraging. I think the developer didn't mean any harm an probably didn't know about this one.
PS: The dev had replied in the thread. All is well I guess.
Two programs, same funcionality, same name. Haven't we learnt anything?
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 was planning on adding a REPL-mode to it today for fun, and then someone linked me this post, saying "this could have been clac!", hehe.
https://github.com/ConceptJunkie/rpn
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.
http://qalculate.sourceforge.net/
function calc { python -c "from math import *; print $1" }
https://github.com/commondream/maths
https://play.google.com/store/apps/details?id=com.scaleasw.p...
Includes a calculator, but also a complete declarative data-processing language too.
E.g.: