I'm looking for a c++ class/library that provides 1024 bit and bigger integers and bit operations like:
- bit shifting,
- bitwise OR/AND,
- position first zero bit
speed is crucial, so it would have to be implemented with some SIMD assembly.
There are several, including GMP, but for speed, the best is likely TTmath. TTmath's design decision to use templated fixed lengths at compiletime lets it be quite fast.
I'd like to implement a big int class in C++ as a programming exercise—a class that can handle numbers bigger than a long int. I know that there are several open source implementations out there already, but I'd like …
I am using the RSA Algorithm for encryption/decryption, and in order to decrypt the files you have to deal with some pretty big values. More specifically, things like
P = C^d % n
= 62^65 % 133
Now that is really the only calculations …
What is the best way to handle large numeric inputs in C++ (for example 10^100)?
For algorithms I usually switch over to ruby and I sometimes use strings.
Any other good methods?