Lines Matching full:decimal
15 fractions. For example, the decimal fraction ::
27 Unfortunately, most decimal fractions cannot be represented exactly as binary
28 fractions. A consequence is that, in general, the decimal floating-point
50 decimal value 0.1 cannot be represented exactly as a base 2 fraction. In base
63 displayed. Python only prints a decimal approximation to the true decimal
65 Python were to print the true decimal value of the binary approximation stored
80 Interestingly, there are many different decimal numbers that share the same
84 approximated by ``3602879701896397 / 2 ** 55``. Since all of these decimal
143 tasks, but you do need to keep in mind that it's not decimal arithmetic and
148 display of your final results to the number of decimal digits you expect.
152 For use cases which require exact decimal representation, try using the
153 :mod:`decimal` module which implements decimal arithmetic suitable for
216 decimal fractions cannot be represented exactly as binary (base 2) fractions.
218 others) often won't display the exact decimal number you expect.
271 55 decimal digits::
277 the decimal value 0.1000000000000000055511151231257827021181583404541015625.
278 Instead of displaying the full decimal value, many languages (including
284 The :mod:`fractions` and :mod:`decimal` modules make these calculations
287 >>> from decimal import Decimal
296 >>> Decimal.from_float(0.1)
297 Decimal('0.1000000000000000055511151231257827021181583404541015625')
299 >>> format(Decimal.from_float(0.1), '.17')