Problem 2. Evaluate the function f(x)=x+1-1 for different values of x using a six-digit rounding computer...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem 2. Evaluate the function f(x)=x+1-1 for different values of x using a six-digit rounding computer arithmetic. a) Use hand calculations to evaluate f(x) at x = 0.001, and show how the identity a - b = (a - b)(a+ab+b) can be used to avoid catastrophic cancellation (or loss-of-significance errors) in this case. b) Write a MATLAB script to evaluate f(x) for a decreasing sequence of values of x. To be more precise, produce the results for each x (0.1.0.01, 0.001, 0.0001, 0.00001}, generate a table with the results obtained from a six-digit rounding computer arithmetic, the true values of f(x) (obtained from a double precision computer arithmetic), and the associated relative errors. c) Extend your MATLAB script from Part b) to evaluate f(x) by modifying f(x) according to Part a), and generate the same table as in Part b) (with different results). d) Compare the two tables found in Parts b) and c), and give a brief statement. Hint: In MATLAB, use round (a, b, 'significant') to round a number a using b significant digits. Note, however, that the rounding will be performed on a binary basis rather than on a decimal basis. Turn in your MATLAB script for this problem. Remember to use your name in both the MATLAB filename and the MATLAB script, and upload your MATLAB script to gradescope. Problem 2. Evaluate the function f(x)=x+1-1 for different values of x using a six-digit rounding computer arithmetic. a) Use hand calculations to evaluate f(x) at x = 0.001, and show how the identity a - b = (a - b)(a+ab+b) can be used to avoid catastrophic cancellation (or loss-of-significance errors) in this case. b) Write a MATLAB script to evaluate f(x) for a decreasing sequence of values of x. To be more precise, produce the results for each x (0.1.0.01, 0.001, 0.0001, 0.00001}, generate a table with the results obtained from a six-digit rounding computer arithmetic, the true values of f(x) (obtained from a double precision computer arithmetic), and the associated relative errors. c) Extend your MATLAB script from Part b) to evaluate f(x) by modifying f(x) according to Part a), and generate the same table as in Part b) (with different results). d) Compare the two tables found in Parts b) and c), and give a brief statement. Hint: In MATLAB, use round (a, b, 'significant') to round a number a using b significant digits. Note, however, that the rounding will be performed on a binary basis rather than on a decimal basis. Turn in your MATLAB script for this problem. Remember to use your name in both the MATLAB filename and the MATLAB script, and upload your MATLAB script to gradescope.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these mechanical engineering questions
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Please answer all questions from 1 to 12 4. Work-Power-Energy 7. A body of mass m, accelerates uniformly from rest to v, in time t,, The instantaneous power delivered to the body as a function of...
-
Briefly describe the psychoanalytic and social contagion theories.
-
For Exercises use the traditional method of hypothesis testing unless otherwise specified. Assume the assumptions have been met. A researcher conducted a study of two different diets and two...
-
What is the primary purpose of admission-seeking questions?
-
The following information is taken from the financial statements of Aruban Enterprises. The company elects to use the carryback provisions of the tax law. Instructions: 1. Given the information from...
-
Suppose carpet for a 12 ft by 10 ft room costs $400. Find the cost to carpet a room 36 ft by 30 ft. The cost to carpet the room is $
-
Considering a consumers indifference curves, which statement is true? A. utility is the same along any given indifference curve B.indifference curves can cross, but only at the axes C.a consumer is...
-
In today's fast-paced global markets, we are often interested in distributing leadership throughout the organization appropriately, empowering each employee to step forward to share his or her...
-
Make a recommend for Market Entry Strategy to Automative Industry (Tesla) for selected BRIC country China, after examining the pros and cons of each possible strategy in the table below. Discuss...
-
VWoA (Volkswagen of America) uses an OCI (Option Creation Category) when they categorize their projects. What do they mean by this and why would they use this category? How does IVK align Business...
-
You work for an energy utility company that provides heating and cooling services (HVAC) to residential clients in Ontario. The company is trying to increase its awareness and build clients in the...
-
1.Questions of purpose. What are your personal and professional goals? What do you hope to accomplish? What would make your professional life worthwhile? 2. Questions of risk. What is your risk...
-
Write a paper on the topic Investing in Sustainable Development
-
The Pletcher Transportation Company uses a responsibility reporting system to measure the performance of its three investment centers: Planes, Taxis, and Limos. Segment performance is measured using...
-
You wish to design an effusion source for Br atoms from Br 2 (g). If the source is to operate at a total pressure of 7.5 Torr, what temperature is required to produce a degree of dissociation of...
-
Why do magnetic field in-homogeneities of only a few parts per million pose difficulties in NMR experiments?
-
Using the matrix representation of the operators and spin eigenfunctions of Problem P28.7, show that the relationships listed in Equation (28.20) are obeyed. In Problem 28.7 Given that And Show that...
-
What were Aristotles two main classifications of motion?
-
One kg weighs 10 N on Earth. Would it weigh more or less on the Moon?
-
Which has the greater density1 kg of water or 10 kg of water?
Study smarter with the SolutionInn App