{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture07 - 0306-381 Applied Programming Floating-Point...

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

View Full Document Right Arrow Icon
0306-381 Applied Programming Floating-Point Addition Floating-Point Division
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
Floating-Point Nomenclature 2 Decimal Scientific Notation X = a · 10 b a : Significand or mantissa b : Exponent • Binary Scientific Notation X = a · 2 b a : Binary significand or mantissa b : Binary exponent Basis of binary floating-point representations
Background image of page 2
IEEE-754 Floating Point Format 3 Normalized Value = ( - 1) S · 2 E - Bias · 1. F S : sign E : biased exponent F : fractional part of significand Special case: zero value—detection • Only normalized allowed E = 0 for normalized values • Denormalized allowed E = 0 and F = 0
Background 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 Addition: Operands 4 Two floating-point numbers A = ( - 1) S A · 2 E A - Bias · 1. F A B = ( - 1) S B · 2 E B - Bias · 1. F B Sum C = A + B = ( - 1) S C · 2 E C - Bias · 1. F C
Background image of page 4
Floating-Point Addition 5 [ ] ( ) [ ] ( ) [ ] ( ) [ ] ( ) [ ] ( ) ( ) ( ) [ ] ( ) ( ) [ ] ( ) ( ) [ ] ( ) [ ] ( ) Bias E E E B S A S Bias E E E B S Bias E A S Bias E Bias E Bias E B S Bias E A S B Bias E Bias E Bias E S A Bias E S B Bias E S A Bias E S A A B B A A A B B A A A A B B A A B A A B A A B B A A F F F F F F F F F F B A - - - - - - - - - - - - - - - · · · - + · - = · · · - + · · - = ° ° l ± ² ² L ³ · oe û ø OE º Ø · · - + · · - = ° ° l ± ² ² L ³ · · · - + · · - = · · - + · · - = + 2 2 . 1 1 . 1 1 2 2 . 1 1 2 . 1 1 2 2 2 . 1 1 2 . 1 1 . 1 2 2 2 1 . 1 2 1 . 1 2 1 . 1 2 1
Background image of page 5

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

View Full Document Right Arrow Icon
( ) ( ) C Bias E S Bias E E E B S A S F C F F B A C C A A B B A . . . 1 2 1 2 ] 2 1 ) 1 [( ] 1 ) 1 [( · · - = · · · - + · - = + - - - Floating-Point Addition Algorithm: Sign 6 If E A > E B A and B have same sign ( S A == S B ) C has that same sign ( S C = S A ; S C = S B ) A and B have different signs ( S A != S B ) C has sign of A or B with maximum magnitude ( S C = S MAX( A,B ) ) A and B have different exponents ( E A != E B ) C has sign of number with largest exponent ( S C = S MAX( EA,EB ) ) A and B have same exponent ( E A == E B ) C has sign of number with largest significand ( S C = S MAX(
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}