long doubles

hey there,

i've been trrying to calculate the first 10000 fibonacci numbers using a long double. weird thing is that from a certain value it returns Inf.

i'm declaring the vars as
long double var;

and printing them to a file using:
fprintf(filepointer, "%.0Ld\n", var);

am i doing something wrong?
do i have to activate some special support for long doubles (using FreeBSD)? or compile it in a different way?

thx in advance

There is no guarantee that long double is different from double, nor that double is different from float. You should be able to see the limits of each type by looking at <float.h>.

Hmmm...according to this fibonacci calculator, fib(10000) is an integer with 2090 digits. Your floating point unit is going to need a rather large mantissa. Good thing you went with long double.