[fpc-pascal]Double-precision recursion

Johan Blok johanbloK at ix.nl
Fri Mar 30 21:35:55 CEST 2001


Sebastian Günther wrote:
> 
> Rich Pasco wrote:
> >
> > I would deeply appreciate anyone telling me just why the Pascal version
> > fails.
> 
> Looks like a FPU stack overflow...?

In that case it should give runtime error 202, I checked that with stack
checking
on. It gives runtime error 207 (Invalid Floating Point operation).

I also tried to start with different n. It allways crashes at the
starting n + 8.

I did this on linux.

> If you reduce the line "p := get+cof(n);" just to "p := cof(n);", then
> the program works. (ehmm, it doesn't crash anymore...)
> 
I also tried different things with this: allways when you are doing some
calculation it
crashes.


Besides this I compiled it using the GNU Pascal Compiler. Now it works,
as I expected, because
gpc shares almost all important compiler stuff with gcc.

Isn't it a bug of fpc? 

Johan Blok




More information about the fpc-pascal mailing list