My app is written in Delphi5. I am using madExcept to track down bugs. I tracked down a "Floating point dvision by zero" exception, where it shouldn't be. The code segment, where it is raised, goes as followed:
val:=100*Power(1.25,c);
where 'c' actually always has the value '1'.
The stack trace of the log:
main thread ($338f8):
00403504 +010 MyApp.exe System 1970 +5 @FRAC
00479148 +058 MyApp.exe Math Power
007ae8a6 +262 MyApp.exe MyClass 1962 +36 TMyClass.FormMouseWheel
I had another exception at one point, where a division did take place, however the divisor was a variable, which also had the value '1' when the exception occured. That i was able to debug and reproduce.
My question: what am i missing? Are there some false positives about floating point division that i am not aware of?
Furthermore: I am not using any C++ DLLs at the exception points as they tend to handle FP divisions differently (returning NaN or +/-INF rather than raising an exception).
Any pointers appreciated.
System._Frac
code. – Archduchy