Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/library/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,11 @@ The available presentation types for :class:`float` and
| | :class:`float`, and shows all coefficient digits |
| | for :class:`~decimal.Decimal`. If ``p=0``, the decimal |
| | point is omitted unless the ``#`` option is used. |
| | |
| | The number of zeros padding to the exponent is |
| | determined by the implementation. When the coefficient |
| | is zero, the exponent value is also determined by the |
| | implementation. |
Comment on lines +550 to +553
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this documents something and I'm not sure if we should do something here.

For floats, we have from the C standard: "The exponent always contains at least two digits, and only as many more digits as necessary to represent the exponent. If the value is zero, the exponent is zero." Decimal's have no constraints on minimum number of digits in the exponent representation (in fact, to-scientific-string forbids leading zeros). When the number is zero, the exponent value is determined here by the sign and precision.

+---------+----------------------------------------------------------+
| ``'E'`` | Scientific notation. Same as ``'e'`` except it uses |
| | an upper case 'E' as the separator character. |
Expand Down
Loading