> I imagine bc is using some sort of power series
There is also a cool Haskell package, numbers, that has all arithmetics defined via power series:
$ cabal v2-repl -b numbers
⡇
λ> import Data.Number.CReal
λ> cos pi + 1 :: CReal
0.0
λ> :set +s
λ> showCReal 10000 pi
"3.141592653589793238462643383279502884197169399375105820…
(2.69 secs, 688,668,864 bytes)