Bret Jolly wrote: > Jim Freeze <jim / freeze.org> wrote in message news:<20030421154222.A38737 / freeze.org>... > > >>Is the problem that you are asking for 5/9 not to be zero? > > > The problem is that, when mathn is not required, matrix.rb > allows 5/9 to be zero and this is just wrong. (Yes, I know C; > it's my job, but this is still mathematically wrong.) Ahem, it's not. The program just "interprets" these numbers in a different way than you do. You think of them as real (in the methematical sense), which can be OK because natural numbers can be trivially incorporated into real numbers. The progam just uses what you give it: Natural numbers. And consequently it uses the appropriate operators / (and % probably). Than is, it uses the (in computer jargon) integer division and modulo operator (often given as %). Now speaking in integers 5 / 9 IS 0, while 5 % 9 IS 5. There's nothing more to it. I personally think that you should be as explicit as possible (which is why I dislike impicit arguments as used in, eg. Perl - note that I'm not against default values for arguments, though. They are a completely different thing - and they're given exlicitly in the definition). In this case that means that you should probably feed the matrices with floating point numbers rather than integers. My (floating point) 0,02 Cheers Stephan