FIX: Result Differs When Comparing Single w/ Double PrecisionLast reviewed: October 30, 1997Article ID: Q93437 |
2.00
WINDOWS
kbenv kbbuglist
The information in this article applies to: - The Standard and Professional Editions of Microsoft Visual Basic for Windows, version 2.0
SYMPTOMSWhen you compare a real number stored as a Single precision variable to the same real number stored as a Double precision variable, the result may be that they are not equal. Storage of real numbers is different within the two data types. Therefore, the number may be represented differently, so a check for equivalence can return false.
WORKAROUNDIn Microsoft Visual Basic version 2.0 for Windows, this problem occurs only on computers that do not have coprocessors. If your computer does not have a coprocessor, add some extra code when comparing data stored in Single data types to those stored in Double data types.
STATUSMicrosoft has confirmed this to be a problem in the Standard and Professional Editions of Microsoft Visual Basic version 2.0 for Windows. It was corrected in Microsoft Visual Basic version 3.0 for Windows.
MORE INFORMATION
Steps to Reproduce the Problem
|
Additional reference words: buglist2.00 fixlist3.00 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |