A use for integer quotients
Rainer Deyke
root at rainerdeyke.com
Tue Jul 24 11:24:37 EDT 2001
"Paul Foley" <see at below> wrote in message
news:m2wv4yhm6v.fsf at mycroft.actrix.gen.nz...
> If you want integers, write floor(a,b) [or floor(a/b)], since that's
> what you really mean.
That would be incorrect though. When I write "a / b", I mean "the largest
integer 'c' such that c * b <= a". I don't mean "some approximation loosely
resembling a / b", which floating point calculations give me.
--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
More information about the Python-list
mailing list