Q: Feature Wish: "%" Extension

John Roth johnroth at ameritech.net
Wed Nov 7 11:32:37 EST 2001


"Tim Peters" <tim.one at home.com> wrote in message
news:mailman.1005094029.14146.python-list at python.org...
> [John Roth]
> > ...
> > See my comment above. I'm not refering to integer division.
> > We've been around that circuit too many times to make
> > it really appealing to do so again.
>
> That's why I pointed out in my first reply that this thread had become
> *about* integer division.  It hasn't been clear what you're on about,
and
> I'm glad to see it clarified.
>
> > I'm refering to either rational (in the future) or real division,
> > in both of which division is supposed to be the exact inverse
> > of multiplication.
>
> That's true of non-exceptional rationals but not of reals (by which I
assume
> you mean floating-point).  With floats, it's possible (actually
common,
> alas) to have non-exceptional a, b and c such that a*b == c but
neither c/a
> == b nor c/b == a.  Also possible to have a*b == c and c/a == b but
not c/b
> == a.  Float arithmetic is also an information-losing process (see
last
> reply).

Quite true, but the original point was about sign handling. The
approximate nature of floating point arithmetic does not affect
this.

John Roth
>
>





More information about the Python-list mailing list