Question: Here in exercise 5, we show you two alternative ways to compute the value of . All are substantially better than Monte Carlo! a. The
Here in exercise 5, we show you two alternative ways to compute the value of π. All are substantially better than Monte Carlo!
a. The first method for computing π is:
Use this formula to approximate π.
b. The great Indian mathematical genius Ramanujan showed that:
The n! indicates the factorial:
Excel’s function Fact computes the factorial. R’s “factorial(x)” computes the factorial of x.
Use this series to construct a program (in R or a VBA function) to value π, where n is the number of terms in the series. Show that two iterations give you over 15 digits of accuracy.
=1+ 6 23
Step by Step Solution
3.40 Rating (150 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
