Z
Zero
Hi,
I am calculating an integer to the pwer of a large integer, e.g.
2^5000.
It turns out that the result I always get is zero. I am sure that the
result is too large to store in such type as u_int64_t and long int
etc.
My power function is as follows: for(i=0; i<5000; i++) result *= 2;
Are there any ways of storing this large a number while/when
calculating this number to the power of a large number?
Assume that I could get the large number stored correctly. I will
have to carry out the number mod p, which is result%p.
The problem is if I stored the large number using linked list (which I
don't know how), for example, how would I carry out the mod p?
Thanks,
I am calculating an integer to the pwer of a large integer, e.g.
2^5000.
It turns out that the result I always get is zero. I am sure that the
result is too large to store in such type as u_int64_t and long int
etc.
My power function is as follows: for(i=0; i<5000; i++) result *= 2;
Are there any ways of storing this large a number while/when
calculating this number to the power of a large number?
Assume that I could get the large number stored correctly. I will
have to carry out the number mod p, which is result%p.
The problem is if I stored the large number using linked list (which I
don't know how), for example, how would I carry out the mod p?
Thanks,