I wanted to implement Miller Rabin Primality Test for large numbers. I wanted to know how to deal with such huge numbers in C++. Should I w开发者_JAVA技巧rite any special function to store and process those large numbers or care is taken automatically?
You should use an arbitrary precision library. Since you only need integers, GMP is a very popular and well-maintained such library. It has a nice C++ interface provided by <gmpxx.h>
.
精彩评论