Although I said that in theory we create two children when we split an interval, in practice we only create one , for the left-hand part of the interval. Representing the function The function to be integrated takes one double-precision real parameter as input and returns a result of that same type. It is called evaluate . I will use a number of modules with different functions to test your solution. Here are some functions you might like to try for testing purposes.
Trigonometric functions are much more interesting.
This information is given in a single line of the form x x tolerance which are all double precision real numbers in floating point format. If I sort the lines of output of your program and mine, there must be no difference. Note that mutexes must be declared globally, i.e. not as local variables. Write a noweb source simpson.nw . This time, I will provide a Makefile .