[issue1811] True division of integers could be more accurate

Terry J. Reedy report at bugs.python.org
Wed Mar 19 05:28:41 CET 2008


Terry J. Reedy <tjreedy at udel.edu> added the comment:

To my mind, the inaccurate result is a bug that should be fixed.

Note: (3.0a3)
>>> 10e40/10e39
10.0

The rationale for the division change is that (as far as reasonably
possible) arithmetic operations with same values should give same result
regardless of types.

I have not looked at either algorithm, but if long/long started by
finding divmod(), but added fractional value when remainer is non-zero
instead of tossing it, exact quotients would easily be exact (unless too
large).

----------
nosy: +tjreedy

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1811>
__________________________________


More information about the Python-bugs-list mailing list