Final version

Sometimes there are precision errors, but for the most part, the code
works great!
Threaded!

Multithreading now works!!!