Microsoft KB Archive/59227

= FIX: PRECISION Intrinsic Function Yields Incorrect Results =

Article ID: 59227

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.0

-



This article was previously published under Q59227



SYMPTOMS
The PRECISION intrinsic function produces incorrect results when an application uses it to find the precision of a REAL number.



STATUS
Microsoft has confirmed this to be a problem with FORTRAN version 5.0 for MS-DOS and OS/2. This problem was corrected in FORTRAN version 5.1 for MS-DOS and OS/2.



MORE INFORMATION
For more information on the PRECISION intrinsic function, see page 242 of the Microsoft FORTRAN &quot;Reference&quot; manual for versions 5.0 and 5.1.

The following code example demonstrates this problem.

Sample Code
C Compile options needed: None

REAL*4 VAR1 DOUBLE PRECISION VAR2 DATA VAR1, VAR2 /0, 0/

WRITE (*, *) PRECISION (VAR1) ! Should output 6, but outputs 15 WRITE (*, *) PRECISION (VAR2) ! Correctly outputs a 15 END

Additional query words: 5.00 buglist5.00 fixlist5.10

Keywords: kbfix KB59227

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.