Q: Feature Wish: "%" Extension
Hans Nowak
wurmy at earthlink.net
Wed Nov 7 08:13:53 EST 2001
Rainer Deyke wrote:
> "John Roth" <johnroth at ameritech.net> wrote in message
> news:tugphsjop81s04 at news.supernews.com...
> > Integer division is not an inverse of integer multiplication, therefore
> > the proposed counterexample fails.
>
> What do you mean? '(a * b) / b' equals 'a' for all integers 'a' and 'b'
> (assuming 'a * b' evaluates without overflow), except when 'b' equals 0.
I think the idea is that (a / b) * b does not equal a in current
(non-__future__) Python...?
>>> (9 / 4) * 4
8
--Hans Nowak
More information about the Python-list
mailing list