Skip to content

Numerical separators behave inconsistently #34819

@io4

Description

@io4

PEP 515 numerical separators (such as 1_000_000, as introduced in #28490) behave inconsistently, ignoring everything after the first separator upon conversion to a different precision.

Reproduction:

    sage: z = 1_0000.000000000000000000000000000000000000
    sage: z # works as expected without the conversion
    10000.000000000000000000000000000000000000
    sage: RR(z)
    1.00000000000000

SageMath version 9.5, Release Date: 2022-01-30, Using Python 3.10.6, OS: Ubuntu 22.04.1

Also reproduces on Sage 9.7

Component: python3

Author: Lucas Fiegl

Branch/Commit: 7aac175

Reviewer: Marc Mezzarobba

Issue created by migration from https://trac.sagemath.org/ticket/34819

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions