



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Professor Bruce Char Department of Computer Science Drexel University
We decided to provide the directions on paper again this week. In future weeks, the directions may be available only on-line. A verification sheet will be passed out for each group of lab partners.
Form a group. Group members should introduce themselves to each other if they haven't already met. All of the partners should log onto a computer. Work read and attempt the problems individually, but stop frequently to compare results and help each other out. Eventually, the graders will be looking for a single collection of answers from the group that everyone in the group can explain. If you are in a room with computer projectors, then please prepare a single computer which can be used to present the group's results to the grader by projection. In most rooms, it's difficult for the grader to stare over your shoulder at results on a screen. Furthermore, the other members of the group also have to stare over a shoulder to see something that they may be asked to talk about. Write down the selected answers on the verification sheet. When you are finished with part 1, have a staff member come over to sign the verification sheet for part 1. Be prepared to show your work to the staff member, and to explain how you got your answers. This is also the opportunity to clear up any questions or uncertainties you may have at this point.
How good a job can you do emulating a calculator?
Each member of the group should undertake to calculate the following operations. The basic idea is: predict what Maple will compute as the answer when it uses its ten digit limited- precision arithmetic. Write down the answer on the whiteboard, blackboard, or other display device provided. Once you have written down your predictions, compare them with the actual results computed by Maple. You should be able to explain how you can get the results you see, by hand. You may use a calculator to help at various steps, but how do you know that what it does bears any relationship to what Maple does (as described in Chapter 3 of the course readings?)
(a) 111111.0 C555555eK 8
(b) evalf 1 K
(c) evalf 1 K evalf
$ evalf 3
(d) evalf 1234.5 $ .067892, 5
(a) Do the calculation with Maple's default ten digit floating point arithmetic by entering
7e11$ 1.0435 10 and then hitting enter or control-=.. You can convert the result into a dollar figure by right-(control- on Mac) clicking on the blue answer and selecting Numeric Formatting -> Currency in the popup menu.
(b) Why is this answer inadequate for financial purposes?
(c) Calculate the answer using limited precision numbers of 15. Is this answer adequate for financial purposes?
(d) Calculate the answer using limited precision numbers of 20 digits' accuracy. is this answer adequate for financial purposes.
(e) Calculate the answer using exact arithmetic, then approximate to 20 digits. Discuss the differences between the answers you got for (a)-(e).
(f) If you were the Secretary of the Treasury, how much accuracy would you want your calculator to have?
r =
correct answer K calculated answer correct answer In Chapter 3 of the lab reading presented four different ways of computing
a) Compute the relative error for each of the 5 ways listed in Example 3.2.3.1 Which one has the smallest relative error? Which one has the largest?
b) What is a way of adding the numbers in a way that has zero relative error?
c) Generalize from these two examples. If I give you a number k , how can you pick 4 other numbers to add together with k so that there will be at least 100% relative error.
Verification will include checking that you have used proper centering, proper use of math symbols and 2d notation proper use of Greek letters, proper use of e (from the Common Symbols Palette or by hitting e and then escape (for command completion) and then selecting the exponential item from the pop-up menu.
From Dorf and Bishop, "Modern Control Systems" p. 56
The inverse Laplace transform can be evaluated using the graphical residue evaluation. The partial fraction expansion of Equation (2.30) is
Y s =
k 1 s K s 1
k 2 s K s 2
Since s 2 is the complex conjugate of s 1 , the residue k 2 is the complex conjugate of k 1 so that we obtain
Y(s) =
k 1 s K s 1
k 2 *
s K s 2 *
where the asteriks indicates the conjugate relation. The residue k 1 is evaluated from Figure 2.11 as
k 1 =
y 0 $ s 1 C 2 $ω n
s K s 1 *^
y 0 $ M 1 ei$θ
M 2 $e
i$π 2
where M 1 is the magnitude of s 1 C 2 $ζ$ω n and M_2 is the magnitude of s K s 1 *. In this case we obtain
k 1 =
y 0 $ ω n $ei$θ
2 $ω n $ 1 Kζ
2 $e
i$π 2
y 0
2 $ω n $ 1 Kζ
2 $e
i$ π 2 K θ
Extra credit a Calculate 0.4444444449 C5eK11 and 0.4444444448 C5eK11. This seems a bit inconsistent. Experiment and determine what the general rule seems to be followed by Maple when rounding a number that is midway between two 10 digit limited precision numbers.
Notes Final grades for the course will be curved if necessary, so don't fret excessively if you don't finish but it looks like others are in the same shape. However, you should try to learn the material you don't complete in lab so that you can pass the quiz and be ready for the next lab. Computer work at this introductory level introduces a lot of ideas and concepts that appear pervasively in subsequent work. The plus side is that you'll probably see next time more of what you worked on this time, so you'll have another chance to practice and improve. The down side is that you can't ignore tough details and hope that you'll never have your grade depending on knowing them.