Madhava Series

Math 242 practice problems

Name: _________________

Learning Goals: Gain proficiency with programming in Mathematica. Develop and implement an algorithm to solve a mathematical problem, producing understandable results.

Your task: We previously computed partial sums of the Madhava series, 4(1-(1/3)+(1/5)-(1/7)+...), which converges to π. How efficient is this method for computing digits of π? Your task is to compare the runtime using floating-point, fixed precision (1000 digits), and exact arithmetic.

To do this, first write a Module that adds up n terms of the Madhava series using floating-point arithmetic. Make a plot showing how the runtime depends on the number of terms that you add up. Be sure to choose n large enough to obtain runtimes larger than 0.1 seconds.

Repeat using fixed precision arithmetic, and again using exact arithmetic.

Finally, write a few sentences summarizing your observations from your computations. Do you think the Madhava series would be useful for computing a large number of digits if π?

Due: Wednesday, Feb. 16, at 5:00pm. Upload your solution as a Mathematica notebook to the Madhava Series assignment (Moodle link).

Grading: If you successfully measure and compare runtimes using the three different number types, you will earn a Satisfactory grade.

Need help? Review the notes from class, which are posed on the course web site. If you still need help, email Prof. Wright.