{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

FoatingPointNotes

FoatingPointNotes - Silvana Ilie MTH510 Lecture Notes...

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

View Full Document Right Arrow Icon
Silvana Ilie - MTH510 Lecture Notes Binary Floats Machine numbers in floating point representation are of the form: x = ± (1 + f )2 e where f is mantissa, f = (0 .d 1 d 2 . . . d t - 1 d t ) 2 (in base 2) t = precision (number of digits, t > 0) e min = lower bound on exponent e max = upper bound on exponent d k = 0 or 1 are binary digits, k = 1 , . . . , t e = exponent, e min e e max in normalized form: leading implicit bit 1, not stored Toy floating point system Assume t = 2 , e min = - 1 , e max = 1. Then [1 . 00] 2 · 2 - 1 = 1 2 [1 . 00] 2 · 2 0 = 1 [1 . 00] 2 · 2 1 = 2 [1 . 01] 2 · 2 - 1 = 1 2 (1 + 1 4 ) = 5 8 [1 . 01] 2 · 2 0 = 5 4 [1 . 01] 2 · 2 1 = 5 2 [1 . 10] 2 · 2 - 1 = 1 2 (1 + 1 2 ) = 3 4 [1 . 10] 2 · 2 0 = 3 2 [1 . 10] 2 · 2 1 = 3 [1 . 11] 2 · 2 - 1 = 7 8 [1 . 11] 2 · 2 0 = 7 4 [1 . 11] 2 · 2 1 = 7 2 3 possible exponents, 4 mantissas, 2 signs give 24 possible machine numbers (excluding 0) Non-uniform spacing of machine numbers: [2 - 1 , 2 0 ] | {z } spacing 2 - 3 , [2 0 , 2 1 ] | {z } spacing 2 - 2 , [2 1 , 2 2 ] | {z } spacing 2 - 1 Observations: machine numbers are not uniformly spaced in general for interval 2 e x 2 e +1
Background image of page 1

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

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

{[ snackBarMessage ]}