Problem 2. Evaluate the function f(x)=x+11 for different values of x using a sixdigit 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+11 for different values of x using a sixdigit 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 lossofsignificance 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 sixdigit 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+11 for different values of x using a sixdigit 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 lossofsignificance 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 sixdigit 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

Suppose that the following model Rt = 1 + 2 M K Tt + 3 S M Bt + 4 H M Lt + 5 M OMt + ut has been estimated using 120 monthly observations. s are coefficients. (a) Assuming that we are interested in...

Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...

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. WorkPowerEnergy 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...

What new insights are provided by the theories of transformational and charismatic leadership?

(A) Nitric acid, HNO 3 is produced from ammonia and oxygen by the consecutive reactions How many grams of nitric acid can be obtained from 1.00 kg NH 3 (g), if NO(g) in the third reaction is not...

Which one of the below assertions is inaccurate concerning statistical sampling? (a) Statistical sampling involves additional costs of training auditors (b) Statistical sampling requires designing...

(Accounting for Restricted Stock) Tweedie Company issues 10,000 shares of restricted stock to its CFO, Mary Tokar, on January 1, 2010. The stock has a fair value of $500,000 on this date. The service...

Tax rate is 30%, A strike by the employees of a supplier during the month of September 2019 resulted in a pretax loss of $125,000. This was considered an unusual loss and so was recorded as Other...

3. Suppose a small grocery store was selling 300 units per week of particular SKU priced at $4.50. Further, suppose that this item's VCs were $3.60, there were incremental labor costs of $2 to...

Consider the purchases function of a manufacturing company. To overcome a downward profitability trend, management recently instituted a "justintime" system of acquiring raw materials for its...

Herbalife continues to be a successful direct selling company despite various accusations of improper activity over the yearsmost recently Bill Ackmans campaign to prove it is a pyramid scheme. In...

CVS is implementing strategies and allocating resources in the hope of achieving an ethical culture that benefits all stakeholder groups. This helps CVS to maximize ethical decision making and remain...

The example of Enron shows how an aggressive corporate culture that rewards high performance and gets rid of the weak links can backfire. Enrons culture encouraged intense competition, not only among...

Despite its continued conflict with the EU government over its tax arrangements, Apple appears optimistic about its future. The company has created a cult following of consumers who are intensely...

Question 1:ABC Builders Pvt. Ltd. is estimating the feasibility of entering into a contract to build and operate the metro rail network in Surat. As part of the financial analysis, they want to...

Which one of the following anhydrous chloride is not obtained on direct heating of its hydrated chloride? (A) BaCl2 (B) CaClz (C) MgCl2 (D) SrCl2

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 inhomogeneities 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...

2. In the documentary movie, Expelled: No Intelligence Allowed, there is a 15second clip of "Imagine," a song by John Lennon. His wife and sons, who held the copyright, sued to block this use of the...

3. For many years, the jacket design for Webster's Ninth New Collegiate Dictionary featured a bright red background. The front was dominated by a "bull'seye" logo. The center of the bull'seye was...

4. Question: Hey, Paula," a pop hit that spent months on the music charts, was back on the radio 30 years later, but in a form the song's author never intended. Talkshow host Rush Limbaugh played a...
Study smarter with the SolutionInn App