CS-SE-4X03 (1).pdf - Comp Sci\/Sfwr Eng 4X03 Comp Sci\/Sfwr Eng 4X03 Final Examination DAY CLASS DURATION OF EXAMINATION 2.0 hours MCMASTER UNIVERSITY

CS-SE-4X03 (1).pdf - Comp Sci/Sfwr Eng 4X03 Comp Sci/Sfwr...

This preview shows page 1 - 3 out of 6 pages.

Do Not Share this document Comp Sci/Sfwr Eng 4X03 Comp Sci/Sfwr Eng 4X03 Final Examination DAY CLASS Dr. N. Nedialkov DURATION OF EXAMINATION: 2.0 hours MCMASTER UNIVERSITY FINAL EXAMINATION 23 April, 2019 Please CLEARLY print : NAME: Student ID: THIS EXAMINATION PAPER INCLUDES 6 PAGES AND 10 QUESTIONS. YOU ARE RESPON- SIBLE FOR ENSURING THAT YOUR COPY OF THE EXAMINATION PAPER IS COMPLETE. BRING ANY DISCREPANCY TO THE ATTENTION OF YOUR INVIGILATOR. Special Instructions : 1. You are allowed to use one sheet letter size, both sides containing course material. 2. McMaster standard calculator, Casio fx-991 or Casio fx-991MS are allowed . 3. Textbooks are not allowed . 4. This paper must be returned with your answers. 5. Do not write answers in this paper. Page 1 of 6
Image of page 1
Do Not Share this document Comp Sci/Sfwr Eng 4X03 Problem 1 [4 points] Let x and y be finite IEEE-754 double precision numbers. Consider the evaluation of x xy , that is, the expression x*sqrt(x*y) evaluated in double precision. Assume no overflows or underflows occur in this evaluation. Derive a bound for the relative error of the result. The unit roundoff in double precision when rounding to the nearest is 1 . 1102 × 10 - 16 . Solution. Since x and y are FP numbers, fl ( x ) = x and fl ( y ) = y . We have fl ( x xy ) = fl ( x ) fl ( xy )(1 + δ 1 ) = x p fl ( xy )(1 + δ 2 )(1 + δ 1 ) = x p xy (1 + δ 3 )(1 + δ 2 )(1 + δ 1 ) = x xy p (1 + δ 3 )(1 + δ 2 )(1 + δ 1 ) x xy (1 + δ 3 / 2)(1 + δ 1 + δ 2 ) x xy (1 + δ 1 + δ 2 + δ 3 / 2) = x xy (1 + δ ) . Assuming | δ i | ≤ u , the unit roundoff, | δ | ≤ 2 u + u/ 2 = 2 . 5 u 2 . 7756 × 10 - 16 .
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 6 pages?

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

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes