Question: . The double sum starts in the lower left corner, goes up the column 1 values, then down to the bottom of column 2 then
The double sum starts in the lower left corner, goes up the column values, then down to the bottom of column then up and so on
In theory, the result should be more accurate as n gets large. BUT as n gets very large, the error actually increases!!
Indeed, the errors for n and are listed below
Grid Sizen x n Relative Error
ne
ne
ne
neWTH
Your Job: Add up the numbers fxy in the grid in different way in order to reduce rounding error for large n
New Strategy: Introduce a new variable columnSum that is initialized as in the outer loop, but before the inner loop. Replace mySum mySum Fxy in the inner loop with columnSumcolumnSum Fxy After the inner loop, but still inside the main loop, increment mySum: mySummySumcolumnSum
Table : Errors for your revised method of adding the numbers
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
