Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.5k
gh-142019: Add description about the exponent of result formatted with presentation type 'e'.#142084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
python-cla-botbot commentedNov 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
| || 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.| |
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading.Please reload this page.
📚 Documentation preview 📚:https://cpython-previews--142084.org.readthedocs.build/