The information in this article applies to:
SYMPTOMSPrograms 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 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:
CAUSEThe /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. RESOLUTIONCode should be written to check INTEGERS that are raised to a power for overflow. STATUSMicrosoft 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. MORE INFORMATIONThe following code reproduces the problem: Sample Code 1
Sample Code 2The following code is an example of a way of avoiding INTEGER overflows.
Additional query words: 4.00 4.10 5.00 5.10 buglist5.00 buglist5.10 fixlist1.00
Keywords : |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |