{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture08

Lecture08 - 0306-381 Applied Programming Exam One Results...

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

0306-381 Applied Programming Exam One Results Floating-Point Algorithm Summary Number Representations Fixed-Point Numbers

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

View Full Document
Generate Significands of A and B: If Exponent is 0? ° 0 Otherwise ° 1 concatenated with Fraction Compute Sign of C: XOR signs of A and B Compute Exponent of C: Add unbiased Exponents and then bias Compute Significand of C: Multiply Significands of A and B Truncate extra fractional bits Normalize, if necessary: If there is a second integer bit >>= 1 Exponent++ Assign Fraction of C Floating-Point Multiplication: C A · B 2
Approximate reciprocal of B Multiply A and reciprocal of B Floating-Point Division: C A B “Approximation” Implementation 3

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

View Full Document
Generate Significands of A and B : If Exponent is 0? ° 0 Otherwise ° 1 concatenated with Fraction Compute Sign of C: (Maybe change Significand) Do A and B have same sign? ° same as A and B Otherwise: ° same as sign of larger Is A Exponent larger than B Exponent? ° A larger Is B Exponent larger than A Exponent? ° B larger Otherwise (Exponents are equal): Is A Significand larger than B Significand? A larger also Negate B Significand Is B Significand larger than A Significand? B larger also Negate A Significand Otherwise numbers are equal Floating-Point Additon: C A + B Page 1 of 2 4
Compute Exponent of C: Larger of A and B Exponents Align smaller of A or B Compute Significand of C: Add Significands of A and B Normalize, if necessary:

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• 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.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern