Subj : Re: Floating point exceptions To : borland.public.cpp.borlandcpp From : Mohsen Date : Wed Jan 19 2005 01:42 pm lotter_NO_SpaM_@zsw-bw.de (Erwin Lotter) wrote: >Hi all, > >I have trouble with floating point exceptions of type 'Invalid >operation' which occure after comparing a NAN with some other value. >I have installed a signal() handler which catches and resolves the >exception (and sets the signal handler again). But after the first >occurance of such an exception, the fpu throws floating point >exceptions even on legal operations. And, the subsequent exception is >not guided to my exception handler. Instead, it is caught by the >debugger. >I have tried to call _clear87() and/or _fpreset() with no success. >Does anybody have an idea what might be going wrong? > >Thanks > >Erwin Lotter Other exceptions might come from math functions such as sqrt(). If that's the problem check with _matherr(). Mohsen .