[MATRIX-SIG] Re: int. division

David J. C. Beach beach@verinet.com
Sun, 18 Jan 1998 04:14:21 -0700


Charles G. Waldman wrote:

> David J. C. Beach writes:
>  >
>  > Allow me to reiterate Paul Dubois's argument.  Consider the code:
>  >
>  >             x = i / j
>  >
>  > Now, suppose i=2 and j=4.  Then x will be the integer, 2.  Everybody agrees
>  > on this.
>
> Well, not everybody.  I would have 2/4 == 2.0 and 2//4 == 2

Perhaps the truly funny thing here is that 2.0/4.0 = 1.0/2.0 = 0.5.  (WHOOPS!)

It's a known fact that mathematicians can't do simple arithmetic.   For the
record, what we *meant* to say is that 4.0/2.0 = 2.0

Dave

--
David J. C. Beach
Colorado State University
mailto:beach@verinet.com
http://www.verinet.com/~beach




_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________