SET PRECISION
Topic group Related topics Example
Determines the number of digits used when comparing numbers.
Syntax
SET PRECISION TO [<expN>]
<expN>
The number of digits, from 10 to 34. The default is 10.
Description
Use SET PRECISION to change the accuracy, or precision, of numeric comparisons. You can set precision from 10 to 34 digits.
SET PRECISION affects data comparisons, but not mathematical computations or data display. Math computations always use full precision internally. To change the number of decimal places dBASE Plus displays, use SET DECIMALS.
In general, you should use as little precision as possible for comparisons. Like many programs, dBASE Plus handles numbers as base-2 floating point numbers. This format precisely represents fractional values such as 0.5 (1/2) or 0.375 (3/8).
dBASE PLUS 8 not supports High Precision Math and can handle large number correctly. To test the precision of the new dBASE implementaion here are a few tests from: http://www.sp4gl.com/index_perfect.htmlx
Examples: (in the COMMAND Window)
? 301.840002 - 301.000001
? 123456789.012345 * 87654321.123456789
OUTPUT:
0.840001
10821521028958940.344459595060205