-
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
This is based on a discussion in SymPy
I think round should return an mpf rather then a float. Consider:
>>> mp.dps = 64
>>> x = mpmath.mpf('0.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666')
>>> round(x, 48) # is not going to give 48 digits
0.6666666666666666
>>> repr(_) # its a float
'0.6666666666666666'The current implementation of __round__ just converts to float and rounds there. I think we can do better---and are allowed to in Python 3.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementnew feature requests (or implementation)new feature requests (or implementation)