Date: Sun, 30 Jun 1996 22:58:59 -0800 (GMT) From: "Rafael R. Sevilla" To: DJGPP Mail Server Subject: Floating point exceptions Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Is there something different about the way Sparcs and Pentiums handle floating point exceptions? I've been developing a ray tracer portable between djgpp, Solaris 5.3, and Linux, and the Pentium versions (djgpp and Linux) seem to not work the same way as the Sun version. In particular the Sparc seems to forget that it's dividing by zero somewhere! There's a portion of code in the ray tracer that inverts a 3x3 matrix, and one of my scenes happens to create a matrix that has a zero determinant. The Sparc eats it, no sweat, and presses on without telling me anything! Since I use curses with it, I have a signal handler that takes care of such things, lest I mess up the screen, but I don't get a word from the Sparc. Can anyone tell me anything about this rather odd behavior? Must I explicitly check for division by zero everywhere just to ensure that my code acts the same way across all platforms? ------------------------------------------------------------------------- University of the Philippines Rafael R. Sevilla PABX/OVCA: Diliman Networking Project rsevilla AT sauron DOT upd DOT edu DOT ph ------------------------------------------------------------------------- P.S.: The Sun's compiler is gcc 2.7.2.f1.