Re: [fpc-pascal] Strange Floating Point Exception problem
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? :-) 8-Register-Stack, yes. 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 Vinzent. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Strange Floating Point Exception problem
In our previous episode, Tom Verhoeff said: > What makes things complicated, is that the program has a GUI > through Lazarus, and that it is rather biggish, making it difficult > to isolate the problem. > > The place where it complains is a simple statement Sorry, forgot to mention a test/remedy if that is it: obviously check the asm code, but play with calling conventions? Could you post some runnable code? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Strange Floating Point Exception problem
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? :-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal