Gnuplot
gnuplot - an interactive plotting program
Follow the above link or type gnuplot form the prompt then help inside the gnuplot interpreter.
Gnuplot is a program born to plot data, but can be used for calculation too. It offer the advantage that you can define functions and or use the built-in ones.
echo "pr 20+5/2" | gnuplot # Lazy-note `pr` instead of print
22 # Integer calculation & result
echo "pr 20.+5/2" | gnuplot # Lazy-note `pr` instead of print
22.0 # Floating point result
echo "pr sin(2*pi/3.)" | gnuplot # Some functions ...
0.866025403784439
Root (or some other C interpreter)
The ROOT system provides a set of OO frameworks with all the functionality needed to handle and analyze large amounts of data in a very efficient way...
You can use it as C interpreter, CINT, or you can use one of the many many other C interpreters many many other C interpreters . IMHO, it's huge, complex, powerful, and not always friendly but can give big satisfaction too.
If you really do not want to listen the little voice inside you that cites Confucio and you are ready to break a (butter)fly on the wheel you can use root. In this case -l is mandatory to avoid to show splash screen...
echo "20+5/2" | root -l
(const int)22
echo "20+5/2." | root -l
(const double)2.25000000000000000e+01
echo "cout<< 20+5/2 << endl;" | root -l
22