5302_HW1-ANS.PDF - ANSWERS CSci 5302 Homework 1 Due 30 Jan...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ANSWERS
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ANSWERS CSci 5302 Homework 1 Due: 30 Jan 2018 1. 1a. 1b. 1c. 1d. 1e. 1f. 1h. 1i. 2a. There are 15 subquestions over 3 questions worth a total of 100 points over 2 pages. Assume you use the following 3 digit decimal arithmetic :l: X.YZ X 10*" where o X is any decimal digit 1, . . . , 9 (0 is allowed only for true zero) a Y,Z,W are any decimal digits 0, . . . ,9. Assume that we use the “round—to—even” rule, that overflows become inf ’s and that underflows become zeroes. The “round—to—even” rule says that any result that is not already representable should be rounded to the nearest representable number. If the result is exactly half way between two representable numbers, it should be rounded to the representable number that ends in an even digit. Answer the following questions (5 pts) Compute 2.04 x 10+1 144.50 x 10—1. 3.0 85.110 @ 108 Y 1'?) (5 pts) Compute 9.04 x 10+3»+ 9.55 x 10+? 191‘? 5 110B=> 1.0 o No“? (5 pts) Compute 9.04 x 10+9 + 9.55 x 10+8. 1°: 9 81‘ 10* 9:3 W FL (5 pts) Compute 1.44 x 10—8 — 1.40 x 10—8. 0 .o Lmo" g a) O {5 pts) Compute 1.44 x 10 3 — 1. 40 x 10 8 in a modified system that allows for subnormal numbers. 0 O I" " '9 8—7—5 0. H 0 x :5 ‘7 (5 pts) Give the largest positive floating point number s such that fl(9 99 X 10“1 - a) = 9.99-x10-1. s: a. $111041 1 “1120' '41 ‘1qu =9 c18801110 17711119 ( 5 pts} Give an example of a positive floating point number of the form a— H 1. 00 x 101 such that the fioatingfiproduct fl(a >1< a) > 0 but fl(a * a >1< a)— — 0. "111100110 4 )cz—LI ( 5 pts) How manyfiilsitinc ct positive numbers can be represented in this system? \0 00 f 5 pts) How [ma-1190 distinct 11d 131011.111 positive numbers can be represented in a modified system that allows for subnormal numbers. Just cOunt the numbers that can be represented in the modified system which cannot be represented in the original system as given above. 0 \l %1 (0 cl —\3( 10110 100 -\'- CH (1111.: M11915) In the following, use the same 3 digit floating point system as 111 the previous question for all calculations. ( 12 pts) Compute the mathematically equivalent expressions y2 —:r2 and [y —a:] - [y+x] with a: = 2.22 X 102 and y = 2.23 x 102. Fill in the table of intermediate values (a) 112 = 11.51? 110L1 ((1) y _ x = \«Ofl-X’OO (b) 952 = ”1331/09 (e) y + m = 4.115103 (C) y2_x2 = 9:031 IDL (f) (y—$)(y+m) = “fisxmk 2b. 3a. 3b. 3c. 3d. (8 pts) For the final results (c) and (f), answer the following (i) Which of (c) (f) are accurate to the full accuracy of the underlying arithmetic, if any? (:6 (ii) Between (c) & (f), treat the more accurate answer as the “true” answer and the other 5s)t11l§}“eomputed” answer. Give the absolute error in the .compflted ? eeeeew c - e w 2 mm- as Ewe-leg = e. . (iii) Give the Wriii?relaltiir2§rr0r betweeln like compute and t 1; meifiswgfg ”0 (iv) the numbef (if digits 1' accuracy in the computed answer. A I‘m \VQ, QFFOV . #(Lfii‘s «(Mugs \ Let 19(93) = 11:3 — 2.5x2 + 2:10 — .5011002. ( 10 pts) You buy a used calculator at a flea market which claims to be able to find roots of polynomials. When you use it to find the root of this 19(1):), the answer it gives is 5: = 1.0. What is the backward error in this answer? @U-Obz-«OOMDLo- \L .1: .00 ex (5 pts) Pick one of the £0110;ng ig’t‘éffv girldiilttfiiii use to .st ltObieection to find the root of the polynomial of question 3: [—1,0], [0, 1], [1, 2], assuming your calculator is more accurate than the one from the flea market. Identify your chosen interval and show why you know the interval will work. Starting with your chosen interval, what would be the interval you’d have after- 2 iterations of bisection? . P t- 13 = era :“5 NOV ”5' u em": ‘WH‘ "i use #1394‘5 ““3“" "‘ DEL] (10 p-ts) Apply 2 iterations of Newton’s method to find a; root of 11(33) = $3 — 2._5a:2'+ a“ . 2:1: — .5011002 = 0 with the starting value 1100 = l and then again with .399 = 0.9. Show ‘lQ‘C‘ W A the formula for Newton’s method and a short table of Values 5:“ I. E} J ‘H .00?) ”9(71 new 'Ltl'i-‘t verse-3. 3800‘ 3.95 Hr ”bee—9V Use :50 = 1 and again with x0 = 0.9. If it fails, explain Why. Stop after 2 iterations. (10 pts) Treat xt = 232 from one of the previous results as a true root pf p(a:). Let fix) = 51:3 — 2.551:2 +2m— .5 be an approximate polynomial. Evaluate p(a:t), p(f:), Mart), and 13(57). Use these four values to give an estimate of the condition number of the solution to p(x) = 0, pretending that p(:v) is the exact polynomial and act is the correct answer. NM: a l-Se—S met ,5 W H“ :0“ . ”in- _ eW tuber-wiewei: 2 “(ll Phil“: Lit—‘35 ...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern