very large integer values

na> I've got a simple question for someone out there.. I am currently

na> writing a simple program to recursively compute values for a Fibonacci

na> series alrogithm (F(N)=F(N-1)+F(N-2)), a simple sum alrogithm

na> (S=1+2+3...+N), and a Towers of Hanoi alrorithm. The algorithms work

na> great, but I am having difficulties finding these return values for

na> very large N. unsigned long values work great up to a point, and it

na> doesnt seem to make much sense to store integers as floating point

na> type (float or double). What data type should I be using for the

na> return values? also, I am writing these programs for MS-DOS, is there

na> some way to check before hand if recursive F(N) will overflow the

na> stack before executing F(N)? reply here or email, thx..

You could compare any of the numbers to MAXINT or MAXLONG and take

appropriate action if the number exceeds these values.

Trevor D'Arcy-Evans

... Reality is only an approximation to theory.