FIX: F6099: Int Overflow Unreported on Exponential Math (86063)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 4.0
- Microsoft FORTRAN Compiler for MS-DOS 4.01
- Microsoft FORTRAN Compiler for MS-DOS 4.1
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 4.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q86063 SYMPTOMS
Programs compiled with Microsoft FORTRAN version 4.0, 4.01, 4.1, 5.0, or
5.1 with the /4Yb compiler option or the $DEBUG metacommand may not report
the following run-time error message
run-time error F6099: $DEBUG
- INTEGER overflow
if an integer is raised to a power, which is an integer other than 2. If
the exponent is a REAL number, the following error may be generated:
run-time error M6101: MATH
-floating-point error:invalid
CAUSE
The /4Yb compiler option or $DEBUG metacommand directs the compiler to do
testing for INTEGER overflow, but it fails to do this for the exponential
arithmetic if the exponent is an integer other than 2. If the exponent is
2, the algorithm is implemented as simple multiplication and the INTEGER
overflow error is generated. In the case of REAL exponents, INTEGER
overflow is still incorrectly not being checked; however, a floating-point
math exception eventually is generated because intermediate values are
being computed using floating-point values.
RESOLUTION
Code should be written to check INTEGERS that are raised to a power for
overflow.
STATUS
Microsoft has confirmed this to be a problem in Microsoft FORTRAN versions
4.0, 4.01, 4.1, 5.0, and 5.1 for MS-DOS and OS/2. This problem was
corrected in FORTRAN PowerStation, version 1.0.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbfix KB86063 |
---|
|