[fpc-pascal] Strange Floating Point Exception problem
JeLlyFish.software at gmx.net
Sat Aug 23 01:06:33 CEST 2008
Marco van de Voort wrote:
> In our previous episode, Tom Verhoeff said:
>> This means that the if statement is passed 7 times without problem with
>> x = -1, and on the 8th pass, where x = -1 again, it bails out with an FPE.
> Hmm, didn't the x87 copro stack had 7ish registers? And recursive you say?
Interestingly, I just wanted to give an example and tried the old
infamous recursive Fibonacci, which on an older compiler failed for N >=
15 with a FP stack overflow (apart from being darn slow, of course).
Now it seems, Florian's Tail-Recursion-Optimization invalidated this
particular example of "don't do this". :D
More information about the fpc-pascal