If your application uses floating-point variables, you must link your application by using the /FPi, /FPc, or /FPa option on the link command line.
An application compiled with the /FPi option will use a math coprocessor if one is present at run time. Otherwise, the application will use a floating-point emulator. An application compiled with the /FPc option compiles the same as an application compiled with the /FPi option, except that it can be linked with the alternate math library instead, if necessary. An application compiled with the /FPa option uses an alternative math library if no coprocessor is present at run time. This is the smallest and fastest option available without a coprocessor, but this option sacrifices some accuracy for speed, relative to the emulator library.
If you use the /FPi or /FPc option, you must include WIN87EM.LIB on the link command line, as shown:
link sample, , , slibcew win87EM libw, sample.def
The Windows retail setup command automatically installs WIN87EM.DLL in the user's Windows system directory.
You can use the SIGFPE (signal floating-point error) option of the C run-time signal function to trap floating-point run-time errors, such as overflow and division by zero.
Non-Windows applications typically use the C run-time setjmp and longjmp functions to isolate floating-point exceptions. A Windows application should call the Windows Catch and Throw functions instead.