Most formulas will show no visible difference, but calculations that result in or use extremely small numbers may now show an even more accurate answer.
In previous versions of Numbers, Pages, and Keynote, a calculation such as
= 10.0 - 9.8 results in a value of
Altering the number of decimals shown in the cell (between 1 and 14 decimal places) can remedy the issue to show the expected result of
0.2. Increasing the number of decimals shown in the cell displays
This happens because of the way binary stores decimal numbers internally. Binary representations of decimal numbers can induce very small discrepancies. The calculation engine in Pages, Numbers, and Keynote has always employed sophisticated techniques to keep these differences from aggregating within calculations, but at very high precisions the differences can become apparent.
The new calculation engine dramatically improves upon previous versions by using a decimal representation of numbers throughout the calculation.
The result is that the same calculation
= 10.0 - 9.8 now results in a value of
0.2. Increasing the number of displayed decimals now shows a value of
In previous versions of Numbers, the formula
8.41. This also happens because of the way values are stored internally in binary.
With the new calculation engine,
About Binary Coded Decimal versus Decimal Floating Point encoding
Most computers store numbers as a series of zeros and ones, which are binary values. A process called Binary Coded Decimal (BCD) encoding converts fractional numbers to their binary counterparts. When numbers are encoded using BCD, some values can't be represented with complete accuracy. For example,
0.2 in binary form
0.001100110011... (repeating). The value must be truncated in order to encode it using BCD, which slightly alters the stored value. Even though discrepancies introduced by BCD can be very small, these discrepancies become more apparent when amplified through certain types of calculation chains.
The latest versions of Pages, Numbers and Keynote encode numbers using 128-bit Decimal Floating Point (DFP) encoding. This is a much more accurate way to encode decimal fractions that avoids rounding errors typical of BCD encoding. In addition, the updated calculation engine operates directly with numbers encoded with DFP—values in table cells are stored more accurately, and formula results are computed more accurately.
Many formulas will show no visible difference, but calculations that result in or use extremely small numbers may now show an even more accurate answer.