A use for integer quotients

Johann Hibschman johann at physics.berkeley.edu
Mon Jul 23 16:57:59 EDT 2001


[followup accidentally mailed as well; sorry Steve!]

Steve Horne writes:

> Tell that to a mathematician, or an engineer, or even an accountant -
> all of these need to deal with inherently integer measures and
> therefore using integer operations. Any of these people who have
> Python scripts using division are going to have a problem.

Well, I'll believe you for accountants, but they generally want
a fixed decimal class anyway, don't they?  However...

> Engineering - How would you feel if you knew a bridge was going to be
> built with 2.5 supports on each side?

Engineers who use division almost always use floating point division.
These are the folks who invented floats.  Physical scientists like me
also have far more cause to use float than integer division.  I'd love
not to have to worry about an integer being passed to any of my
thousand lines of computational code and producing screwy results.

> Mathematics - Mathemeticians practically *invented* integers, and note
> that integers were understood thousands of years before fractions,
> decimals or standard form.

And mathematicians know you can't divide the integers, because they're
a ring and not a field.

> Have you noticed how none of these groups consists of experienced
> programmers?

Anyway, there are two camps.  The proposed new behavior would make my
life easier, so I like it.  It's also "the right thing" from a
mathematical point of view.  Others clearly disagree.

-- 
Johann Hibschman                           johann at physics.berkeley.edu



More information about the Python-list mailing list