Commit 45fe62dc authored by Eric V. Smith's avatar Eric V. Smith

Issue #17728: Specify default precision for float.format for presentation types e, f, and g.

parent f1465f05
...@@ -432,12 +432,13 @@ The available presentation types for floating point and decimal values are: ...@@ -432,12 +432,13 @@ The available presentation types for floating point and decimal values are:
+=========+==========================================================+ +=========+==========================================================+
| ``'e'`` | Exponent notation. Prints the number in scientific | | ``'e'`` | Exponent notation. Prints the number in scientific |
| | notation using the letter 'e' to indicate the exponent. | | | notation using the letter 'e' to indicate the exponent. |
| | The default precision is ``6``. |
+---------+----------------------------------------------------------+ +---------+----------------------------------------------------------+
| ``'E'`` | Exponent notation. Same as ``'e'`` except it uses an | | ``'E'`` | Exponent notation. Same as ``'e'`` except it uses an |
| | upper case 'E' as the separator character. | | | upper case 'E' as the separator character. |
+---------+----------------------------------------------------------+ +---------+----------------------------------------------------------+
| ``'f'`` | Fixed point. Displays the number as a fixed-point | | ``'f'`` | Fixed point. Displays the number as a fixed-point |
| | number. | | | number. The default precision is ``6``. |
+---------+----------------------------------------------------------+ +---------+----------------------------------------------------------+
| ``'F'`` | Fixed point. Same as ``'f'``, but converts ``nan`` to | | ``'F'`` | Fixed point. Same as ``'f'``, but converts ``nan`` to |
| | ``NAN`` and ``inf`` to ``INF``. | | | ``NAN`` and ``inf`` to ``INF``. |
...@@ -464,7 +465,7 @@ The available presentation types for floating point and decimal values are: ...@@ -464,7 +465,7 @@ The available presentation types for floating point and decimal values are:
| | the precision. | | | the precision. |
| | | | | |
| | A precision of ``0`` is treated as equivalent to a | | | A precision of ``0`` is treated as equivalent to a |
| | precision of ``1``. | | | precision of ``1``. The default precision is ``6``. |
+---------+----------------------------------------------------------+ +---------+----------------------------------------------------------+
| ``'G'`` | General format. Same as ``'g'`` except switches to | | ``'G'`` | General format. Same as ``'g'`` except switches to |
| | ``'E'`` if the number gets too large. The | | | ``'E'`` if the number gets too large. The |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment