1. Cosine recursion

I implemented a (buggy) version of the cosine recursion function, but did not iron out the kinds, as evidenced by this plot:

2. Timing funcitons

I ran each program test times in order to gauge consistency and get a good average, and in each test I performed the operation of interest 10,000 times. The results, with and without optimization, appear below:

There is a clear improvement in speed for most operations when the higher level of compiler optimization is employed. Also interesting is the improved consistency in some functions, likely due to smarte cache usage (I would say garbage collecting as well, but C doesn't use GC).

3. Bessel back recursion

This recursion converges extremely quickly. The below graph shows that it reaches 4-decimal precision in a couple of steps, 8-digit precision in around 3, and approaches the same order of magnitude as machine precision within around 5 steps (depending somewhat on what value of x the Bessel function is being calculated for):