Mail Archives: djgpp/1998/02/22/16:46:37
In article <34ED4ECB DOT 5A5C0CBC AT LSTM DOT Ruhr-UNI-Bochum DOT De>, Thomas Demmer
<demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De> wrote:
> Lucas Panian wrote:
> >
> > Hi,
> >
> > When I try to run my program, it crashes with SIGFPE...I used symify to
> > find that it was in the following section of code(all variables are already
> > declared)
> >
> > A = Y1 * ( Z2 - Z3 ) + Y2 * ( Z3 - Z1 ) + Y3 * ( Z1 - Z2 );
> > B = Z1 * ( X2 - X3 ) + Z2 * ( X3 - X1 ) + Z3 * ( X1 - X2 );
> > C = X1 * ( Y2 - Y3 ) + X1 * ( Y3 - Y1 ) + X3 * ( Y1 - Y2 );
> >
> > Distance = sqrt (A*A + B*B + C*C);
> >
> > Normal.X = (A / Distance) + VPoint[0]->Lx; // It crashes on this line.
Is A a positive number?
Square roots of negative numbers are not defined.
Martin.
--
___________/\/\/\/\/\/*=
- Raw text -