CS520
Spring 2013
Laboratory 4
Friday February 15
The lab must be submitted prior to 8am on Saturday February 16.


  1. (50 points) Attend lab.

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

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

  4. (10 points) Handle zero and infinity inputs to s2d.

  5. (10 points) Handle NaN inputs to s2d.

  6. (10 points) Handle denormalized and "regular" normalized inputs to s2d.

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

    Submissions can be checked by typing:

    % ~cs520/bin/scheck lab4
    

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


Last modified on January 17, 2013.

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