Dec 132010
http://alien.slackbook.org/blog/calculating-pi/
1 2 3 | bc -l <<< 'scale=1000; 4*a(1)'
# which is shorter than the equivalent
echo "scale=1000;4*a(1)" | bc -l
|
One more calculation using bc: the golden ratio to 10 digits:
1 | bc -l <<< 'scale=10;(1 + sqrt(5))/2'
|