From: G DOT DegliEsposti AT ads DOT it To: djgpp AT delorie DOT com Message-ID: Date: Mon, 23 Feb 1998 10:30:44 +0100 Subject: Re: sqrt() in DJGPP Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Precedence: bulk >> > 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. I don't think this is the problem, since he is doing the sqrt() of a surely positive quantity and the crash happens on a different line :-) Maybe A / Distance gives a number too big (or too small) to fit within Normal.X ? What are the datatypes of the variables involved in the problem? ciao Giacomo