Hi All --
Regarding primes ...
If anyone has any suggestions, they would be
appreciated!
I think we tried to direct you in the past towards arbitrary precision
integer arithmetic for your calculations, as you chose to deviate
from that it is my belief, at least, that you chose to waste your own
time.
I say read Knuth instead. Just reading a section on largest known primes
in the form of 2^n -1 you get some rather big numbers: 2^20996011 - 1 is
6,300,000 decimal digits.
Ben alias woodelf
I believe there's no way to do anything at all with primes unless
all your numbers are accurate to (at least) 2^0, that is, they
are integers. (Otherwise you don't even know if they're even or odd!)
So if you're using floating point numbers, you are limited to
the size of your mantissa; which might be a convenient way to
get something bigger than 32 bits, but it won't get you any
bigger than your mantissa. (Well, you get one bit for free
if your floating point representation uses the implied leading
zero.)
So I'm with the others: Knuth + arbitrary precision. There
are some other good books on specifically arithmetic with
primes.
May I ask what it's for?
Best regards,
J.