CS520
Spring 2015
Laboratory 4
Monday February 16
The lab must be submitted prior to 8am on Tuesday February 17.
The tasks for this lab are:
- (25 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.
- (25 points)
Re-test your program using the public testS2D.c file.
- (30 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.
- (20 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.
Turn in this laboratory by typing:
% ~cs520/bin/submit lab4 s2d.c d2s.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 Tuesday February 17.
Last modified on February 3, 2015.
Comments and questions should be directed to
hatcher@unh.edu