Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LC 1 : Round Off Error ( comparing summations in single and double precision ) My Solutions > Round - off error can often accumulate

LC1: Round Off Error (comparing summations in single and double precision)
My Solutions >
Round-off 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:
x=5-i=15000000.00001
The analytical result for x is exactly zero, but you will find that x 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 (MATLAB's default numbers) numbers in the calculation. Assign the result for x to the variable named ZeroDouble.
Use all single precision numbers* in the calculation. Assign the result for x using single precision to the variable named ZeroSingle.
"(to create a single precision number, the following can be used single(0.00001
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago