The objectives of this lab are to write one fairly small program to exercise some of our numeric processing algorithms and some of the new programming constructs and operators in Chapter 5. Once again we will be using a makefile to build this program. I have provided a skeleton makefile for you which you can download from here. You should fill in the missing dependencies and action lines.
Note: You WILL have some trouble with this problem, even once you design your algorithm and get all the code written and compiled - this is expected. You should use your debugging skills and the techniqes we have discussed in previous labs to figure out what is going on. Use your knowledge of limitations of number representation (and a little knowledge of trigonometry) to fix the problem to meet the spec.
For this lab, you are encouraged to work closely with your teammates on the problem. You will still turn in your programs individually, even if there are similarities. Work as a team to figure out the difficulties and solve them.
double cos(float);
make trig
Use the "grade" command to turn in the all of the source files (.c and .h files) in your Lab11 directory. Your command will look like the following.
If you are in Section 001 use:
grade -lab11s1,ee160 *.c *.h makefile
If you are in Section 002 use:
grade -lab11s2,ee160 *.c *.h makefile
If you are in Section 003 use:
grade -lab11s3,ee160 *.c *.h makefile
If you are in Section 004 use:
grade -lab11s4,ee160 *.c *.h makefile
NOTE: this command will send in ALL files named with .c and .h extensions in the current directory which are really your files. The grade command will give you a message for files that are links and not submit the files - that is ok, we only want the files which you wrote. You should verify that you turned in things successfully, which you can do with the command (which simply leaves the file names off from the previous command).
grade -lab11s1,ee160
OR
grade -lab11s2,ee160
OR
grade -lab11s3,ee160
NOTE: after the files are prepared for grading, you will no longer be able to see your file listing using the above command.
NOTE: BE CAREFUL to use the correct form of the grade command given above. If you do not, your files will be sent to the wrong place, and we will not guarantee we will find them for grading.