Skip to content

Commit

Permalink
still better parsing (for singular)
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Jul 20, 2024
1 parent 249abad commit 191dd38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sage/rings/complex_mpfr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ CDF = CLF = RLF = None

# useful for parsing
NUMBERS = re.compile("[0-9]")
BLOCK = re.compile(r'[+-]?[0-9\.]*(?:e[+-]?[0-9]*|)\*?I?')
BLOCK = re.compile(r'[+-]?(?:I\*|)[0-9\.]*(?:e[+-]?[0-9]*|)\*?I?')


def late_import():
Expand Down Expand Up @@ -504,6 +504,8 @@ class ComplexField_class(sage.rings.abc.ComplexField):
3.40000000000000 + 1.20000000000000*I
sage: CC('1.2*I')
1.20000000000000*I
sage: CC('9-I*1.2')
9.00000000000000 - 1.20000000000000*I
sage: CC('3.4')
3.40000000000000
sage: CC('3.4e-6+7.8e11*I')
Expand Down

0 comments on commit 191dd38

Please sign in to comment.