Cogman
Lifer
So, I'm doing some number crunching (3x+1 if you must know). Since I will be dealing with large numbers, I need to use a library that supports them. Unfortunately, the NTL is out. It is not thread safe (the program is multithreaded, and needs to stay that way).
Any other suggestions for a free large number crunching library that is thread safe? It needs to support mod, divide, and addition, it would be nice if it where fairly quick as well.
As a side note, It was interesting how I discovered that the NTL isn't thread safe. All the numbers I am checking are odd, but just for my sanity, I decided to check that it was working ever 1000001 numbers. I started noticing that some of those numbers where even.... Last I checked an odd + an even doesn't equal an even 🙂.
Any other suggestions for a free large number crunching library that is thread safe? It needs to support mod, divide, and addition, it would be nice if it where fairly quick as well.
As a side note, It was interesting how I discovered that the NTL isn't thread safe. All the numbers I am checking are odd, but just for my sanity, I decided to check that it was working ever 1000001 numbers. I started noticing that some of those numbers where even.... Last I checked an odd + an even doesn't equal an even 🙂.