开发者

128 bit Miller Rabin Primality test

开发者 https://www.devze.com 2023-04-11 01:17 出处:网络
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

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>.

0

精彩评论

暂无评论...
验证码 换一张
取 消