Question: LC 1 : Round Off Error ( comparing summations in single and double precision ) My Solutions > Round - off error can often accumulate
LC: Round Off Error comparing summations in single and double precision
My Solutions
Roundoff error can often accumulate when performing computations with repeated additions and subtractions. The error accumulates differently depending on the precision with which the numbers are stored. To demonstrate this concept, consider the following summation:
The analytical result for is exactly zero, but you will find that does not equal zero when performing this computation with MATLAB due to the finite precision with which numbers are stored in memory. For this problem, write a script that performs the computation two different ways:
Use all double precision MATLABs default numbers numbers in the calculation. Assign the result for to the variable named ZeroDouble.
Use all single precision numbers in the calculation. Assign the result for using single precision to the variable named ZeroSingle.
to create a single precision number, the following can be used single
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
