-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Labels
enhancementnew feature requests (or implementation)new feature requests (or implementation)
Milestone
Description
From Python 3.7 it is possible to use _ in strings converted to floats (and maybe other types), so float('1_2.3_4') is valid and gives 12.34.
This causes a problem when converting this type of numbers using from_str or more exactly here:
https://github.com/fredrik-johansson/mpmath/blob/c11db84b3237bd8fc6721f5a0c5d7c0c98a24dc1/mpmath/libmp/libmpf.py#L1303-L1306
Should be solved by replacing parts[1].rstrip('0') with parts[1].rstrip('0').replace('_', '').
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementnew feature requests (or implementation)new feature requests (or implementation)