05 - Lecture 5 Todays class Representations of numbers in...

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

View Full Document Right Arrow Icon
Lecture 5 Today’s class: Representations of numbers in different bases Floating-point numbers & machine representations Arithmetic with floating-point numbers Material on floating-point numbers, machine arithmetic, and rounding errors introduces many extremely technical subtleties. Unfortunately, it is often required (even for non- computer scientists) to understand these technicalities as consumers of numerical software! Taylor’s theorem and truncation errors (next time)
Image of page 1

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

View Full Document Right Arrow Icon
Representations of numbers XLIII × XXXVII MDXCI 43 × 37 301 1290 1591
Image of page 2
Decimal representations Recall: 71 . 32 actually means 7 1 . 3 2 = 7 · 10 + 1 · 1 + 3 10 + 2 100 = 7 · 10 1 + 1 · 10 0 + 3 · 10 - 1 + 2 · 10 - 2 7 tens + 1 unit + 3 tenths + 2 one hundredths integer part = 71 , fractional part = 0 . 32 Positional notation needs digit zero & decimal point Decimal system favoured by most modern humans
Image of page 3

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

View Full Document Right Arrow Icon
Floating-point format Floating-point format : scientific notation Normalised: shift decimal point ( × powers of 10) - 1 . 3701542 · 10 3 = - 1370 . 1542 9 . 376 · 10 - 7 = 0 . 0000009376 Terminology: if x = s · 10 e = ( a 0 .a 1 a 2 . . . a t ) 10 · 10 e s = ( a 0 .a 1 a 2 . . . a t ) 10 = significand f = (0 .a 1 a 2 . . . a t ) 10 = mantissa (fraction) t = precision = # digits in mantissa e = exponent of base b = 10
Image of page 4
Different number systems Different civilisations used different numeral bases Number systems distinguished by numerals
Image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
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