# hw1 - Homework 1 Math 471 Fall 2007 Assigned Friday...

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

Homework 1 Math 471, Fall 2007 Assigned: Friday, September 7, 2007 Due: Friday, September 14, 2007 Include a cover page Clearly label all plots using title , xlabel , ylabel , legend Use the subplot command to compare multiple plots Include printouts of all Matlab code and outputs, labeled with your name, date, etc. (1) (Finite precision numbers) The floating point representation of a real number takes the form x = ± (0 .a - 1 a - 2 . . . a - n ) β · β e , where a - 1 6 = 0, - M e M . Suppose that β = 2, n = 4, and M = 5. (a) Find the smallest and largest positive numbers that can be represented in this floating point system. Give your answers in decimal form. (b) Find the floating point number in this system that is closest to 2. (2) (Programming) Implement the following algorithm for converting a decimal number to its binary equivalent x = ( a n a n - 1 . . . a 0 ) 2 . Step 1: x 0 := x ; j := 0 Step 2: while x j 6 = 0 , do a j := remainder of integer division x j / 2 x j +1 := quotient of integer division x j / 2 j := j + 1 end while The Matlab functions rem , mod , and floor may be useful. Make sure your algorithm prints

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