020 exponent e weights value by a possibly negave

Info iconThis 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: g Award to William Kahan (UC Berkeley) IEEE Floa-ng Point Standard University of Washington Floa-ng Point Representa-on ¢  Numerical form: V10 = (–1)s * M * 2E §  Sign bit s determines whether number is nega=ve or posi=ve §  Significand (man=ssa) M normally a frac=onal value in range [1.0,2.0) §  Exponent E weights value by a (possibly nega=ve) power of two ¢  Representa-on in memory: §  MSB s is sign bit s §  exp field encodes E (but is not equal to E) §  frac field encodes M (but is not equal to M) s exp frac IEEE Floa-ng Point Standard University of Washington Precisions ¢  Single precision: 32 bits s exp 1 ¢  frac k=8 n=23 Double precision: 64 bits s exp 1 frac k=11 n=52 IEEE Floa-ng Point Standard University of Washington Normaliza-on and Special Values s E V = (–1) * M * 2 s exp frac k ¢  n “Normalized” means the man-ssa M has the form 1.xxxxx §  0.011 x 25 and 1.1 x 23 represent the same number, but the la[er makes be[er use of the available bits §  Since we know the man=ssa starts with a 1, we don't bother to store it! ¢  How do we represent 0.0? Or special / undefined values like 1.0/0.0? IEEE Floa-ng Point Standard University of Washington Normaliza-on and Special Values s E V = (–1) * M * 2 s exp frac k ¢  n “Normalized” means the man-ssa M has the form 1.xxxxx §  0.011 x 25 and 1.1 x 23 represent the same number, but the la[er makes be[er use of the available bits §  Since we know the man=ssa starts with a 1, we don't bother to store it ¢  Special values: §  The bit pa[ern 00...0 represents zero §  If exp == 11...1 and frac == 00...0, it represents ∞ e.g. 1.0/0.0 = -1.0/-0.0 = +∞, 1.0/-0.0 = -1.0/0.0 = -∞ §  If exp == 11...1 and frac != 00...0, it represents NaN: “Not a Number” §  Results from opera=ons with undefined result, e.g. sqrt(–1), ∞ - ∞, ∞ * 0 §  IEEE Floa-ng Point Standard University of Washington Normalized Values s E V = (–1) * M * 2 s exp frac k ¢  ¢  n Condi-on: exp ≠ 000…0 and exp ≠ 111…1 Exponent coded as...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online