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:
![](https://dsd5zvtm8ll6.cloudfront.net/questions/2024/03/65fdddaa60aad_1711136168841.jpg)
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
-
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. 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 self-concept theory of charismatic leadership.
-
Find the instantaneous rate of change for each function at the given value. F(x) = x 2 + 2 at x = 0
-
3. Do you think you would benefit from becoming more comfortable with conflict management styles for which your score was low?
-
A market research consultant hired by a leading soft-drink company is interested in estimating the difference between the proportions of female and male consumers who favor the companys low-calorie...
-
Based on the information below, find the total costs for Model A. (first year and recurring costs, years 1 to 5) Remember to use the concepts of Unique, Recurring Relevant and Irrelevant Costs for...
-
How would you IRAC this law case into a brief?...
-
Why the sudden increase in income before taxes in 2021? 8. Why were the operating assets the highest in 2019? 9. Why are the short-term loans the highest in 2020? 10. Why are the other long-term...
-
Mercy wants to make sure that she will be able to provide for her daughter's college and plans to open a savings account with a bank that is ready to pay interest as shown below per year compounded...
-
Question 1. For a firm that uses portfolio management, please give a real or hypothetical example of how the CEO's personal bases for power help organizational performance. Question 2. Give a real...
-
Make a schedule that you would use that effectively illustrates working with paraprofessionals that includes collaboration time. Use the examples provided in the following resources to guide your...
-
How does the integration of technology and automation influence employee motivation and job satisfaction within modern organizational contexts ?
-
Hi, i have some few questions unser the CAFR of New Jersey 2019 Examine the reconciliation between the governmental fund balances and the governmental type activities net position. This might be on...
-
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...
-
Refer to the completely randomized design of Example 10.4, in which we concluded that at least two of the four brands of golf balls are associated with different mean distances traveled when struck...
-
Chemical properties of whole wheat breads. Whole wheat breads contain a high amount of phytic acid, which tends to lower the absorption of nutrient minerals. The Journal of Agricultural and Food...
-
A multiple-comparison procedure for comparing four treatment means produced the confidence intervals shown here. Rank the means from smallest to largest. Which means are significantly different? LO4...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App