| from the floating-point hardware, and on most machines are on the order of no |
| more than 1 part in 2\*\*53 per operation. That's more than adequate for most |
| tasks, but you do need to keep in mind that it's not decimal arithmetic, and |
| that every float operation can suffer a new rounding error. |
| |
| While pathological cases do exist, for most casual use of floating-point |
| arithmetic you'll see the result you expect in the end if you simply round the |
| display of your final results to the number of decimal digits you expect. |
t | :func:`str` usually suffices, and for finer control see the discussion of |
t | :func:`str` usually suffices, and for finer control see the :meth:`str.format` |
| Python's ``%`` format operator: the ``%g``, ``%f`` and ``%e`` format codes |
| method's format specifiers in :ref:`formatstrings`. |
| supply flexible and easy ways to round float results for display. |
| |
| |
| .. _tut-fp-error: |
| |
| Representation Error |
| ==================== |
| |
| This section explains the "0.1" example in detail, and shows how you can perform |