I have a program that calculates large numbers by storing them as strings, so that I can have very large digits that extend beyond long long.
I can add the strings using a function I've written that models how we humans do addition by hand on paper, and it works. I'm able to add large "string integers" together accurately, even when they have hundreds of digits in them.
I now want to use this to enumerate large numbers and test for primality. The problem is, I don't know how I would do this on a string-int that is very large, because I can't convert it to a long long and then perform the test.
Are there techniques for testing for prime numbers that would work on the digits of the number or something? How would I try to factor large numbers that are represented as strings, and test if numbers are factors of it, etc? How do I approach this problem?