27 May
2006
27 May
'06
12:07 a.m.
I introduce the issue of integer versus floating point division by giving (high school) students a self-directed programming challenge that will lead them to the head scratching conclusion that division doesn't work exactly in the manner that they expect. Using long division on the board, it's pretty easy to demonstrate how integer division and use of the modulo division complement one another. As time is also of the essense in my course, we usually settle on the pragmatic axiom of almost always using a floating-point divisor. This reminds me of the recent thread regarding equal sign ambiguity. Perhaps we could start collecting examples of familiar symbols from mathematics that might confuse a new programmer. Kevin Driscoll