Finds a value very close to the minimum of a mathematical function using a Monte Carlo method to do random sampling and pthreads to divide up the work.