Numerical Analysis Questions & Answers  




Here's a hint. Simply obtaining the 4th digit is not enough. You need to make sure the 4th significant digit is actually valid.. The best way to solve this problem is to specify what is the maximum allowable value of the relative error $\epsilon$ needed here and to determine analytically how many iterations is needed to reach this level. In the exam, I may ask you a similar question but instead of 4 significant digits, I may ask you for 100 significant digits. Solving the problem by hand one iteration at a time will take too long. Thus, you should aim to find here an analytical expression giving you number of iterations for a certain $\epsilon$ sought. 1 point bonus.




Just define $\pi$ in the preamble of your code with #define pi 3.141592920 



Yes $p$ varies as the iteration count varies. You should explain why this is. There is one reason for the discrepancy in the first few iterations and another reason when approaching machine accuracy. Explain both.




Proportional to does not exclude equal to..



$\pi$ 