From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: Floating Point Exceptions ??? Date: Wed, 24 Sep 1997 14:10:28 +0200 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 48 Message-ID: <34290334.30618995@LSTM.Ruhr-UNI-Bochum.De> References: <3428EE32 DOT FFC AT pop DOT telebyte DOT nl> NNTP-Posting-Host: c64.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk The NiBBLeR wrote: > > Hello, > > I've got a little problem: > I'm writing a 3d-engine, and I'm using floating point... > what can be wrong if I get a Floating Point Exception ???(Note: I don't > divide) > Can somebody please tell what the reason could be ??? After taking a deep breath, relaxing into the infinity of the universe and gathering all my pscychokinetic forces I came up with the following answer: It could be - mixing %f and %lf in ?scanf() - a dangling pointer pointing some integer or character that, when seen as a float, makes only little, if any, sense. - an old libm.a that has the bug in exp() - virtually anything that may go wrong in programming. My advice: Compile everything with -g (yes, it is for the weak, but sometimes helps), run the program and try to figure out with symify why it crashes when. Compile with -Wall and -pedantic and try to resolve each and every warning (Yeah, this is for them Pascal whimps, but sometimes really helps) Add some information or code snippets that exhibits the problem. My (and probably most people's) programming capabilities outperform my seer's capabilities. So we'd have half a chance to say something reasonable ;-) -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************