[Edu-sig] Rational Division

Jeffrey Kunce kuncej@mail.conservation.state.mo.us
Fri, 04 Feb 2000 15:26:14 -0600


Smalltalk has a subclass of "Number" called "Fraction". When you
write 2/3 in Smalltalk, it actually stores the numerator and the=20
denominator, and the whole roundoff question is moot. (Of course
there is a protocol for mixed-mode arithmetic.)

I taught Smalltalk to a number of programmers, and this was
always a difficult feature. The "integer vs real" dichotomy is
so engrained in the programming culture that it was hard to
accept a different representation. Usually, once I reminded
them about their high school algebra classes, and how they
dealt with fractions in equations, the concept would fall
into place.

So, what does "E" think? Does 2/3=3D=3D0 or does 2/3=3D=3D1
or does 2/3=3D0.66..67 or does 2/3=3D=3D2/3? I'm not saying
that "E" thinks of 2/3 as a rational fraction, but I think
we ought to do some asking before we decide on
something else.

  --Jeff