echo 'scale=1000; 4*a(1)' | bc -lqscale is the number of digits. a() = arctan() arccos(-1) is also pi but bc doesn't support it.
Programming Tips - bc: calculate pi to an unlimited number of digits
Date: 2020sep28
Product: bc
OS: Linux
Keywords: π, arbitrary precision calculator language
Q. bc: calculate pi to an unlimited number of digits
A.