I have, for some time, used perl -e to do simple calculations on the Unix command line. This method has its drawbacks, so I have written a wrapper that still performs evals of given expressions, but adds the functionality of the Perl Math::Trig module, persistence of variables between sessions and a few other bits and pieces that I find useful.
SmiffyCalc may not be for everyone – whilst it is still a Perl eval at heart, the syntax is an unholy mixture of Perl, SQL (especially some new bits I have planned), Bash and you name it. Something of a mongrel application, a bit like PHP <wink/>.
The application can do all the same damage that Perl can do in the wrong hands so should not be run as root, whilst drunk or by the type of user who would be more at home with a Fisher Price Activity Center, er, Windows. That said, it may be useful to someone, especially of the Unix/Perl/Geek type, so it may be downloaded here, under the terms of this Creative Commons License.
Bug reports – or even better bug fixes – most welcome. Feature requests may be addressed if I’m likely to find them useful myself. (I did, after all, write this tool for my own purposes.)
A slightly revised version has been posted at PerlMonks.