{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 8 Notes

X 1521 15eps21 x eps21

Info icon This preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: per number •  x = (1+f)2^e –  f is the fracJonal part of 1+f, stored using base 2 rep. •  called the the “fracJon” or manJssa •  0 <= f < 1, 52 bits allocated for f => –  0 <= 2^52*f < 2^52 –  e is an integer exponent, stored using base 2 rep. •  11 bits allocated for e, allows for - 1022 <= e < 1024 –  s is the sign of x (just assume x is posiJve, and apply s at the end) •  s=- 1, or s=1, 1 bit allocated 7 2/20/14 “IEEE 754” •  x = (1+f)2^e –  f is the fracJonal part of 1+f, base 2 rep. –  e is an integer exponent Note: f 52 bits, base 2 rep means only certain values are possible for f •  Some Examples: What are f and e –  for x = 2? •  1x2^1 ó༏ f = 0, e = 1 –  for x = 3? •  1.5x2^1 ó༏ f = .5, e = 1 Answer Time x = (1+f)2^e –  f is the fracJonal part of 1+f, base 2 rep. –  e is an integer exponent What are f and e for x=5 and x=8? –  for x = 5 •  1.25x2^2 ó༏ f = .25, e = 2 –  for x = 8 •  1x2^3 ó༏ f = 0, e = 3 eps •  x = (1+f)2^e •  For x = 2, what is the next largest floaJng point number? x = (1.0)*2^1 => (1+2^- 52)*2^1 = (1 + eps)*2^1 = x + eps*2^1 = 2 + eps*2^1 = 2 + 2*eps is next largest floaJng point number Quiz Time x = (1+f)2^e –  f is the fracJonal part of 1+f, base 2 rep. –  e is an integer exponent What are f and e for x=5 and x=8? A)  f=.5, e=0 and f=2, e=2 B)  f=.25, e=2 and f=.5, e=4 C)  f=.25, e=2 and f=0, e=3 D)  None of the above eps •  x = (1+f)2^e •  For x = 1, what is next largest floaJng point number? x = (1.0)*2^0 => (1+2^- 52)*2^0 = 1 + (2^- 52) = 1 + eps! is next floaJng point number •  Why 2^- 52? •  2^- 52 is referred to as “machine epsilon” –  It is the difference between 1 and the next largest floaJng number that can be represented –  It is available as eps in matlab eps •  x = (1+f)2^e •  For x = 3, what is the next...
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