FIX: QuickWin Floating-Point Error Output Sent to COM1Last reviewed: September 16, 1997Article ID: Q86065 |
5.10 | 5.10
MS-DOS | OS/2
kbprg kbfixlist kbbuglist kberrmsg
The information in this article applies to:
SYMPTOMSWhen running a QuickWin application created by Microsoft FORTRAN version 5.1 in Microsoft Windows version 3.0 or 3.1 and a math exception is raised, Windows may generate the following error message:
System Error: Cannot write to device AUX.Subsequently, under Windows 3.0 a dialog box reports
UNRECOVERABLE APPLICATION ERROR, floating point error: <errortype>where <errortype> is the type of error that occurred. The errors may be any of the following:
CAUSEThe UAE is expected behavior, but the error output text is also being redirected to COM1. If COM1 is not connected to a receiving-capable device, the error (above) referring to AUX may result. The FORTRAN QuickWin run- time library is using an error message output routine that includes some internal debugging output directed to COM1. The actual messages shown on a debug terminal are:
C RUNTIME ERROR M6101: MATH - floating-point error: invalid C RUNTIME ERROR M6102: MATH - floating-point error: denormal C RUNTIME ERROR M6103: MATH - floating-point error: divide by 0 C RUNTIME ERROR M6104: MATH - floating-point error: overflow C RUNTIME ERROR M6105: MATH - floating-point error: underflow C RUNTIME ERROR M6106: MATH - floating-point error: inexact C RUNTIME ERROR M6107: MATH - floating-point error: unemulated C RUNTIME ERROR M6108: MATH - floating-point error: square root C RUNTIME ERROR M6110: MATH - floating-point error: stack overflow C RUNTIME ERROR M6111: MATH - floating-point error: stack underflow RESOLUTIONError checking prior to a numeric division may prevent this problem. Also, installing a user-defined floating-point exception handling procedure with the SIGNALQQ() function can be used to prevent the output of floating-point errors.
STATUSMicrosoft has confirmed this to be a problem in Microsoft FORTRAN version 5.1 for MS-DOS and OS/2. This problem was corrected in FORTRAN PowerStation.
MORE INFORMATION
Sample Code 1The following code when compiled with the /MW option will reproduce the problem:
PROGRAM Test_Math_Exception REAL*4 Divisor, Result /10.0/ REAL*4 A /1.0/, B /1.0/c This code will generate an M6103 - floating point error: divide by 0 Divisor = A - B Result = 10.0 / Divisor END |
Additional reference words: 5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |