2 ms·
> I imagine bc is using some sort of power series to compute arctan I didn't know or didn't remember that pi could be calculated with a power series. I thought
by jolmg 7y ago
> I imagine bc is using some sort of power series to compute arctan
I didn't know or didn't remember that pi could be calculated with a power series. I thought, bc is probably using a constant estimation of pi and this is going to fail, but sure enough, bc/libmath.b:273 in bc's source is the location of the imagined power series in a()'s definition.
I found this page explaining the formula:
http://blog.recursiveprocess.com/2015/03/12/using-the-arctan-power-series-to-calculate-pi/ http://blog.recursiveprocess.com/2015/03/12/using-the-arctan...