CS611
Programming Assignment 2
Fall 2000


Write a function, FloatAdd, to emulate IEEE 32-bit floating point addition. The routine should take two 32-bit integers as arguments and should return a 32-bit integer. However, the 32-bit integers should be interpreted to be actually floating point values. The floating point addition should be implemented using only integer operations. The return value should be the same as what is produced by the IEEE floating point hardware when given the same inputs. Be sure to handle NaN and Infinity inputs and results. However, you do not need to handle ``denormalized'' inputs or results (consider them to be zero).

The directory ~cs611/public/prog2 contains a stub for FloatAdd, as well as a Makefile and a main routine. This main routine performs a fairly exhaustive test of FloadAdd.

Your program will be graded primarily by testing it for correct functionality:

However, remember, you may lose points if your program is not properly structured or adequately documented.

Only the distributed test cases will be used for grading this assignment.

Your programs will be graded using an Alpha machine so be sure to test in that environment.

Your programs should be submitted for grading from a UNH CIS Alpha machine (e.g. alberti.unh.edu). Submit all your source files, as well as a Makefile for building an executable called "prog2". To turn in this assignment, type:
~cs611/bin/submit prog2 <list of files to submit>

Notes:

Submissions can be checked by typing:
~cs611/bin/scheck prog2

To receive full credit for the assignment, you must turn in your files prior to 8am on Monday October 9. Late submissions will be accepted at the penalty of 5% per day up to one week late.

Remember: as always you are expected to do your own work on this assignment.


Last modified on August 7, 2000.

Comments and questions should be directed to pjh@cs.unh.edu