Skip to content

Correct 'g' format type handling#881

Merged
skirpichev merged 2 commits intompmath:masterfrom
skirpichev:fix-880
Oct 21, 2024
Merged

Correct 'g' format type handling#881
skirpichev merged 2 commits intompmath:masterfrom
skirpichev:fix-880

Conversation

@skirpichev
Copy link
Copy Markdown
Collaborator

Closes #880

    $ python3.9
    Python 3.9.19+ (heads/3.9:3f5d9d12c7, Aug 29 2024, 13:17:09)
    [GCC 12.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> format(240605919345005.0, '.14g')
    '2.40605919345e+14'
    $ python3.8
    Python 3.8.19+ (heads/3.8:e319f774f9, Aug 29 2024, 12:59:09)
    [GCC 12.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> format(240605919345005.0, '.14g')
    '2.4060591934500e+14'
@skirpichev skirpichev merged commit 5235f44 into mpmath:master Oct 21, 2024
@skirpichev skirpichev deleted the fix-880 branch October 21, 2024 06:04
@skirpichev skirpichev added this to the 1.4 milestone May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatible (wrt CPython) formatting for format(mpmath.mpf(9.995074823339339e-05), '.0g')

1 participant