Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

π Project

Math 242, spring 2024

Due: Wednesday, February 21

(Following the due date and initial grading, there will be an opportunity to revise and resubmit for a higher grade.)

In this project, you will investigate the question:

How much time would it take to compute 1 trillion digits of π?

To investigate this question, first choose two different methods for computing digits of π from Chapter 1 in our text. You should choose two methods that involve substantially different mathe-matics, not two methods that are nearly the same (for example, don’t choose Machin’s formula and Ferguson’s formula). Implement each method in Mathematica and determine how the accuracy and efficiency depends on the number of iterations or terms computed. Extrapolate from your calculations to estimate how much time it would take to compute 1 trillion (that is, 1012) digits of π using each method. Express your answers in convenient units, such as days or years.

This project asks you for time estimates, not an actual computation of 1 trillion digits. (Your computer probably doesn’t have enough memory to compute 1 trillion digits!) Use the results of smaller calculations to estimate how much time it would take to compute 1 trillion correct digits of π.

For projects in Math 242, communication is as important as computation. You should turn in a well-organized notebook that clearly explains, using sentences and paragraphs, what you computed and what conclusions you can draw.

This project will be graded on the EMRN scale, as described in the syllabus. To receive a grade of Meets Expectations, your notebook should exhibit the following characteristics:

• Computations are complete, resulting in estimates of the time required to compute 1 trillion digits of π.

• Notebook includes sample output that demonstrates that your code works as expected.

• Your reasoning is explained using sentences, and your notebook is well-formatted and easy to read.

• No significant gaps or errors are present.

To receive a grade of Excellent, your notebook should further exhibit the following:

• Computational methodology demonstrates mastery of the computational techniques that we have studied in this course.

• Mathematica code is of high quality, demonstrating skillful use of programming constructs (e.g., variables, lists, functions, modules).

• Exposition is clear and precise, thoroughly explaining your methodology and reasoning. Any assumptions necessary for the estimates are reasonable and clearly stated.

• The work may extend beyond the project requirements in a creative or insightful direction.

Lastly, keep in mind the computational notes on the next page.

Computational notes

(a) To make sure that previouly-computed results do not interfere with runtime measurements, run ClearSystemCache[] before each use of Timing.

(b) If your method for computing an approximation of π returns an algebraic (exact) expression, then your runtime measurement should also include the time required to convert the algebraic expression to the desired number of decimal digits. In other words, make sure you are actually measuring the time it takes to compute K decimal digits of π, not simply the time it takes to compute an algebraic expression that differs from π by less than 10−K. For some methods, the time required to generate the algebraic expression is much less than the time required to convert the algebraic expression into a decimal number with the desired number of digits.

(c) If you get an “internal precision limit reached” error, try setting the $MaxExtraPrecision parameter to a larger value.

(d) If you use a “step” interval greater than 1 for the numbers of iterations when measuring runtimes, be sure to take this step interval into account when analyzing your results.