[Python-Dev] Integer division transition
Tue, 7 Nov 2000 03:38:35 -0500
> Note: it is open for debate whether the result of x/y for integer (or
> long integer) arguments should yield an integer (or long integer) in
> those cases where the result *is* representable as such (e.g. 4/2).
> It is possible that the numeric tower will render this problem moot --
> but that depends on what happens to Moshe's PEP 228, and that's a much
> longer story.
Note that for long ints i and j, i/j may (& easily so) be too large to
represent as a native double. Rationals (of course) have no problem with
that. It would certainly be curious if i*j didn't overflow but i/j did.
Just an observation -- I'm a fan of unintended consequences <wink>.