Future division patch available (PEP 238)
eppstein at ics.uci.edu
Sun Jul 22 19:33:47 CEST 2001
In article <ctvkltgbid3h8oo52shhr66pl30lg3q8gi at 4ax.com>,
Stephen Horne <steve at lurking.demon.co.uk> wrote:
> Division in the set of integers can only have
> an integer result by definition. The fact that in mathematics it is
> common to assume real numbers even if no point is specified is largely
> irrelevant - programmers often have to be more explicit than
> mathemeticians because programs are read by computers - not people.
As a further point in this direction, floats are *not* the same as real
numbers and it is usually a mistake to forget this. In mathematics, the
result of dividing two integers is a rational number.
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list