Mail Archives: djgpp/1997/05/09/08:31:33
Guy Rauscher (rauscher AT netvision DOT net DOT il) wrote:
: Hi!
: I've constructed a small library for easily creating 3d applications with
: Allegro. I've produced a small program to demonstrate the functionality
: of my library and it ackwardly breaks sometimes due to a floating point
: exception. The real problem is that the exception occurs when the 3d
: clipping function is used but sometimes when I run the program, it works
: fine. This is NOT because the condition that causes the exception gets
: randomly unencountered. The clipping function uses floating point
: division.
: What I'd like to know is: what is it that causes a FPE in the first place
: and more specifically, what can I do to fix my program? If necessary,
: I'll post the source code.
I think this could solve your problem:
At the beggining of the program put:
#include <float.h>
and in the beggining of the main():
_control87(MSW_EM,MSW_EM);
--
// E-mail: sime AT fly DOT cc DOT fer DOT hr
// URL: http://fly.cc.fer.hr/~sime
- Raw text -