Floating Points

# Floating Points - Floating Point Faculty of Engineering...

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

Faculty of Engineering, McMaster University Floating Point Dr. Spencer Smith and Dr. William Farmer December 3, 2009 Smith: Floating Point (slide 1) Floating Point Administrative Details Motivation of the Importance of Floating Point Decimal versus binary Representation on integers Representation of floating point numbers Round-off errors Examples How to defend against floating point pitfalls Format of Final Exam Smith: Floating Point (slide 2) Administrative Details Final marked lab this week Extra help session, Dec 14, 10:30 am, JHE/264 - bring your iClickers I will try to bring a few example questions The majority of the time will be driven by your questions Smith: Floating Point (slide 3) Floating Point Problems Patriot missile disaster http://www.ima.umn.edu/~arnold/disasters/patriot.html Arianne 5 rocket http://www.ima.umn.edu/~arnold/disasters/ariane.html Sleipner A offshore platform http://www.ima.umn.edu/~arnold/disasters/sleipner.html Smith: Floating Point (slide 4)

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

View Full Document
Decimal versus Binary Base 10: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Base 2: 0, 1 Position of place value specifies magnitude (86409) 10 = 9 × 1 + 0 × 10 + 4 × 100 + 6 × 1000 + 8 × 10000 (86409) 10 = 9 × 10 0 + 0 × 10 1 + 4 × 10 2 + 6 × 10 3 + 8 × 10 4 (10101101) 2 = 1 × 1+0 × 2+1 × 4+1 × 8+0 × 16+1 × 32+0 × 64+1 × 128 = 173 (10101101) 2 = 1 × 2 0 +0 × 2 1 +1 × 2 2 +1 × 2 3 +0 × 2 4 +1 × 2 5 +0 × 2 6 +1 × 2 7 = 173 Smith: Floating Point (slide 5) Binary Numbers?: iClicker What is the binary number 111 equal to in decimal? A. 8 B. 7 C. 6 D. 3 E. None of the above Smith: Floating Point (slide 6) Representation of Integers Signed magnitude approach First bit is 0 for positive 1 for negative
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