November 11, 2006

BC

Ever want to use a simple calculator while programming? Mathematica cost too much money? Xcalc look too goofy, and gcalctool too difficult to remember? Well, have I got a simple program for you! As far as I am aware, most major Posix distributions come with a command-line calculator called “BC.” It’s great for simple number crunching and can deal with n-digit floating point operations. It’s similar to mathematica, matlab, etc. in that it can store temporary variables, write functions, and work with arrays. Reading through the man page again, bc’s actually a simplified version of C, allowing for loops, comments, and so on. Of course, I’ve never used it to these capacities, but maybe you will find it more interesting! So far, I know that bc comes standard with Debian, Ubuntu, and FreeBsd.