Mark J. Reed <[EMAIL PROTECTED]> wrote:
I believe mod should be defined in the conventional way: x mod y = x - floor(x/y) * y, which does yield 0.8 for 3.2 mod 2.4. However, for 3.2 mod - 2.4 it yields -1.6. To get 0.8 you would have to round toward zero instead of taking the floor, and that complicates any computation that crosses zero.
Personally, I like the fact that the Euclidian definition yields a positive remainder for all real numbers. That said, I'm still trying to wrap my head around how the Euclidiean definition would work for complex numbers. What would be the quotient and remainder for, e.g., 8i / 3; 8 / 3i; (3 + 4i) / 3; 8 / (4 + 3i); or (12 + 5i) / (3 + 4i)? -- Jonathan "Dataweaver" Lang