I am struggling to get a reliable way to catch floating points exceptions under Visual Studio (2005 or 2008). By default, under visual studio, floating point exceptions are not
Additional information: If you are running 32-bit code on 64-bit windows, and use /arch:SSE2 or other options that enable the SSE2 instruction set, or one of its supersets, you may need to do a more drastic reset.
With Visual Studio 2015 (and, presumably, later versions), you need to call _fpreset() after floating-point traps generated in the SSE2 registers, rather than just _clearfp(). If you do this with Visual Studio 2013 and earlier, you get a variety of weird problems, caused by the run-time library getting confused.