Select the product you need help with
ACC2000: Rounding Errors When You Use Floating-Point NumbersArticle ID: 210423 - View products that this article applies to. This article was previously published under Q210423 Novice: Requires knowledge of the user interface on single-user computers.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp). On This PageSYMPTOMS
When you calculate by using floating-point numbers, the result is not always what you expect.
CAUSE
Errors similar to the example in the "More Information" section of this article occur in any programming language that uses floating-point numbers. This is because decimal fractions do not always have exact binary equivalents, which can result in rounding errors.
RESOLUTION
There are several methods that you can use to avoid rounding errors when you are using floating-point numbers:
MORE INFORMATIONSteps to Reproduce the BehaviorThe following steps demonstrate the way floating point calculations may affect the final result:
REFERENCESFor more information about data types, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type Data Types in the Office Assistant or the Answer Wizard, and then click Search to view the topic. PropertiesArticle ID: 210423 - Last Review: June 24, 2004 - Revision: 2.0
|


Back to the top








