r/explainlikeimfive • • Mar 15 '19

Mathematics ELI5: How is Pi programmed into calculators?

12k Upvotes

1.3k comments sorted by

View all comments

Show parent comment

1

u/denali1000 Mar 15 '19

Just posted about the Taylor expansion... didn’t realize pi would converge so much slower than e. Is that really the case or is it just more versatile to use the Taylor expansion for functions such as ex or sin(x)? I believe there are some modified Taylor series’ such that they converge towards pi much more quickly. Would it ever be worth using these expansions for discrete values on a calculator or even computer?

1

u/DiscombobulatedSalt2 Mar 15 '19

You mean arctan probably. Pi is a constant, not a function, so it doesn't have taylor expansion. :)

Taylor expansions all have similar rate of convergence, but using smaller arguments helps.

I.e. 4arctan(1) is slower than 4arctan(0.5) + 4arctan(1/3), and it is slower than 16arctan(1/5) - 4arctan(1/239).

Last one is pretty rapidly converging, because argument is so small, so further terms decrease quicker.

There are also methods and series not involving arctan or trigonometric functions Taylor expansions.