Repetition control structures using factorial in Srinivasa Ramanujan equation
4 views (last 30 days)
Show older comments
A very powerful approximation for ππ was developed by a brilliant mathematician named Srinivasa Ramanujan. The approximation is the following: 1/π = (2√2/9801)* ∑*N k=0 ((4k)!*(1103+26390*k)*(k!)43964k))/((k!)^(4)*396^(4)*k)
! stand for factorial, k =0 is a lower bound of the summation
YOU CAN ALSO GOOGLE SEARCH SRINIVASA RAMANUJAN EQUATION IF YOU DON"T GET THE ONE I TYPED
- Implement Ramanujan’s formula for N=5N=5 to approximate ππ using a for loop.
- Using a while loop and Ramanujan’s formula, determine the value for NN such that ππ is approximated with an error less than 1e-6. (You may NOT use the MATLAB value of ππ to find $N.
Note: 0!=10!=1 by definition.
0 Comments
Answers (1)
See Also
Categories
Find more on Robotics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!