This project requires the use of programming in a computer language or a computational tool. A chemical is added a drop at a time to a container in which a reaction is occurring. Each drop is measured as precisely 0.xxxx mL. The total amount of the chemical must be computed after each drop is added. Write a program to perform the calculation in two ways: by incrementing the previous total by 0.xxxx (accumulated) and by multiplying 0.xxxx (multiplied) by the number of drops so far. At the beginning of the program, ask the user for the number of iterations and the reporting interval. Print the iteration number and both ongoing totals at the requested intervals. Use the last 4 digits of your phone number as the nonzero digits in the measurement of the drop of the chemical. Replace zeros with different odd digits. For example, with a phone number of 555-9389, use 0.9389; and with 555-8090, possibly use 8193. Sample output for 0.xxxx = 0.9389 is as follows:
Print the output and report for each of the following:
a. Run the program with a reporting interval of 1 to determine the first iteration in which there is a difference between the two computations. What are the absolute and relative errors for accumulated at that point? Is there an error for multiplied?
b. Run the program with a reporting interval of 1,000,000. What are the absolute and relative errors for both totals?
c. Run the program with a reporting interval of 999,999. What are the absolute and relative errors for both totals?
d. Run the program with a large enough number of iterations and a large reporting interval so that eventually the value of accumulated does not change from one report to the next. What explanation do you have for this phenomenon?