FIX: Floating Point Exception Incorrect Under Win32sID: Q150405
|
There are some inconsistencies in floating point exception handling under
Win32s and Windows NT platforms. For example, the following code causes a
underflow on both platforms as expected and the exception is masked:
d1 = pow(1000000, -53);
d2 = 1/d1;
Windows NT 3.51 - Floating point Overflow.
Windows 3.1/Win32s - Denormal operand error
If you examine the exception record, you can see that the denormal operand status bit is set but the exception is masked in the control word. On the other hand, the overflow exception status bit is also set and the exception is unmasked. Even though the exception indication is incorrect, you can get the correct exception by examining the status and control words appropriately.
Microsoft has confirmed this to be a bug in Win32s version 1.30. Win32s incorrectly sets the floating point exception in the above case to a Denormal operand error instead of an Overflow exception. This problem has been corrected in Win32s version 1.30c.
Additional query words: win32s fp error
Keywords : kbWin32s
Version : 1.30
Platform : WINDOWS
Issue type :
Last Reviewed: March 11, 1999