hw1 - [1/7 Floating Point Arithmetic Part 1 Homework 1...

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

View Full Document Right Arrow Icon
3/15/2016 [1/7] Floating Point Arithmetic Part 1 - Homework 1 - RELATE https://relate.cs.illinois.edu/course/cs357-sp16/flow-session/82201/0/ 1/1 Floating Point Arithmetic Part 1 Consider the following equivalent expressions: 1. 2. Which of the following statements is true under IEEE double-precision arithmetic? 1−1−x x1+1−x Choice* For some , the second expression will underflow. x [ϵmach,1) For near , the first expression will be more accurate. x 0 For some , the first expression will underflow. x [ϵmach,1) For near , the second expression will be more accurate. x 0
Image of page 1

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

View Full Document Right Arrow Icon
3/15/2016 [2/7] Floating Point Arithmetic Part 2 - Homework 1 - RELATE https://relate.cs.illinois.edu/course/cs357-sp16/flow-session/82201/1/ 1/1 Floating Point Arithmetic Part 2 Which of the following is a legitimate reason why cancellation in floating-point computation is usually bad? Choice* Subsequent operations are likely to underflow or overflow The digits lost are the least significant The digits lost are the most significant The result is usually not exactly representable
Image of page 2
3/15/2016 [3/7] Machine Numbers Part 1 - Homework 1 - RELATE https://relate.cs.illinois.edu/course/cs357-sp16/flow-session/82201/2/ 1/1 Binary Representation Find the first 8 digits of the binary decimal representation of 1/3, with the assumption that rounding toward zero is used. Return these 8 digits as a string in a variable named user_str . The string should not contain any decimal points. For example, both '0.0011100' and '.0011100' would be formated as '0011100'. This problem should be worked by hand (i.e. pencil and paper) and just your final solution entered in the text box below.
Image of page 3

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

View Full Document Right Arrow Icon
3/15/2016 [4/7] Machine Numbers Part 2 - Homework 1 - RELATE https://relate.cs.illinois.edu/course/cs357-sp16/flow-session/82201/3/
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the 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