You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I am specifically discussing float/mpfr inputs.
The behavior of the math.ceil, math.floor, math.trunc, and round changed between Python 2 and Python 3. In Python 2.x, a float was always returned. In Python 3.x, math.ceil, math.floor, and math.trunc return an integer type instead of a floating point type. round returns an integer type if the requested numbers of digits is 0 but returns a floating point type for in the requested number of digits is either greater than 0 or less than 0.
What should gmpy2 2.1 do?
Follow the behavior of the Python version?
Continue to use the Python 2 behavior even in Python 3?
Use the Python 3 behavior on Python 2?
Add a context option to allow the user to select a specific behavior?