alok wrote:
The most probable reason for that is the variable overflows the
specified size (assuming int is 4 bytes) , try to use long . may be it
able to solve your problem
On 32-bit systems, long will usually still be 32-bits (the same as int).
On 64-bit systems long will usually be 64 bits.
long long will typically be 64 bits on a 32-bit system, assuming it it
supported. (I'm not sure about a 64-bit system)
Even better would be unsigned long long.
Even better would be to make use of the GNU GMP library.
If the original poster just wants the numbers produced once, I don't
mind building his code on my Sun (64-bit) or writing a Mathematica
program which will handle thosands of digits very easily.
--
Dave K
http://www.southminster-branch-line.org.uk/
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually. The month is
always written in 3 letters (e.g. Jan, not January etc)