CS520
Spring 2013
Laboratory 5
Tuesday February 22
The lab must be submitted prior to 8am on Saturday February 23.


  1. (50 points) Attend lab.

  2. (10 points) Be sure your source code for the s2d is properly organized, structured and documented. Be sure your implementation decomposes the problem into a set of functions. Also be sure that you make proper use of the static keyword.

  3. (10 points) Re-test your program using the public testS2D.c file.

  4. (10 points) Write code to break out the three components of an input to d2s sign, exponent and fraction. Insert debugging code to display these three components in hex to stderr.

  5. (10 points) Write code to categorize an input to d2s as either zero, infinity, NaN, denormalized value, or a "regular" normalized value. Insert debugging code to display this categorization to stderr.

  6. (10 points) Handle zero and infinity inputs to d2s.

  7. Turn in this laboratory by typing:
    % ~cs520/bin/submit lab5 s2d.c d2s.c
    

    Submissions can be checked by typing:

    % ~cs520/bin/scheck lab5
    

    Use #if C preprocessor commands to control whether the debugging prints are enabled. (See the Program 2 specification for more information about how to do this.) Leave the debugging prints enabled for your submission of this lab.

Remember that there are no late submissions of labs. Submit what you have prior to 8am on Saturday February 23.


Last modified on February 23, 2013.

Comments and questions should be directed to hatcher@unh.edu