Microsoft KB Archive/40722

From BetaArchive Wiki
Knowledge Base


BUG: Mac QuickBasic Compiled Decimal Math Div Error 1D+62 / x

Article ID: 40722

Article Last Modified on 11/21/2006

This article was previously published under Q40722

SYMPTOMS

The expression 1D+62 / x, where x is in the range of 0.1000001 to 0.99999999, incorrectly produces the result "0". This incorrect calculation result occurs only in an application compiled in Microsoft QuickBasic (d), the decimal math version of QuickBasic Version 1.00 for the Macintosh. The problem does not occur in the Microsoft QuickBasic (d) Interpreter, or in the interpreter or compiler of Microsoft QuickBasic (b), the binary math version.

Microsoft has confirmed this to be a bug in Version 1.00. We are researching this problem and will post new information as it becomes available.

To work around this problem, restate the expression in the following form:

   1D+62 * (1 / x)
                

This expression was computed correctly in the following earlier products: the Microsoft Basic Interpreter (Versions 2.00, 2.10, and 3.00) and Microsoft Basic Compiler Version 1.00.


Additional query words: MQuickB

Keywords: kbbug KB40722