From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Floating Point Exception Date: Sun, 21 Sep 1997 00:35:21 +0100 Organization: None Distribution: world Message-ID: References: <01bcc6d2$36f52ac0$0bf682c1 AT nicland> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 18 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Nicholas Law writes: >What does a floating point exception actually mean? I keep getting it in my >3D rotation code. Is it something to do with the cos and sin functions, or >am I dividing by zero or something? It could be almost anything: division by zero, overflow, taking the square root of a negative number, or trying to do math operations on a NaN ("not-a-number", ie. some garbage bit pattern that isn't a valid floating point value). The coprocessor trig functions only accept a small range of input values, and will generate an exception if you feed them anything else, but if you are using the libc sin() and cos() routines they will convert the parameters into a suitable format for the hardware to work with, so it's probably something other than that... -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ Beauty is a French phonetic corruption of a short cloth neck ornament.