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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Lecture 5 Todays 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! Taylors theorem and truncation errors (next time) Representations of numbers XLIII XXXVII MDXCI 43 37 301 1290 1591 Decimal representations Recall: 71 . 32 actually means 7 1 . 3 2 = 7 10 + 1 1 + 3 10 + 2 100 = 7 10 1 + 1 10 + 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 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 .a 1 a 2 ...a t ) 10 10 e s = ( a .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 Different number systems Different civilisations used different numeral bases Number systems distinguished by...
View Full Document

Page1 / 16

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

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online