prev

Assignment 3

next

In this assignment you will create a library of functions related to radiocarbon dating and use that library to print some results. Comment the code well, ensure the compiler does not generate any warnings, and generate a tar file containing all the files as per the instructions on the home page.

Note that while you can certainly write your own exponential and logarithm functions if you want you are allowed to link to the standard math library and use the built in functions double exp (double) and double log (double) (see man 3 exp and man 3 log for more function information). To do this you should include the header math.h and link with the math library using -lm. A sample link command for two files, main.c and lib.c, that links in the math library could look like this
cc -Wall -o hw3 main.c lib.c -lm

To test your results a mass fraction of 0.17 should result in a time of 14648 years.