BUG: /Ox and /4Ya Options Together Cause Incorrect ResultsLast reviewed: April 9, 1996Article ID: Q149517 |
The information in this article applies to:
SYMPTOMSCompiling source code that performs arithmetic calculations along with the /Ox and /4Ya compiler options together creates object code that may produce incorrect arithmetic calculation results at run time.
RESOLUTIONDo not use the /Ox and /4Ya compiler options together.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Sample Code to Illustrate ProblemC Compile options needed: /Ox /4Ya
REAL*8 a(3), x, y a(1) = -1.D0 a(2) = -2.D0 a(3) = -3.D0 x = 0.D0 y = 0.23D0 a(3) = 1.D0/SQRT(1.D0+x*x+y*y) a(1) = x*a(3) a(2) = y*a(3) PRINT *,'a(1) = ',a(1) PRINT *,'a(2) = ',a(2) PRINT *,'a(3) = ',a(3) END Correct Output
a(1) = 0.000000000000000E+000 a(2) = 2.241476929214269E-001 a(3) = 9.745551866148997E-001 Output with /Ox /4Ya
a(1) = 0.000000000000000E+000 a(2) = 2.241476929214269E-001 a(3) = 2.241476929214269E-001 |
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |