delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/22/20:45:45

From: sime AT fly DOT cc DOT fer DOT hr (S. Mikecin)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Floating Point Exception
Date: 22 Sep 1997 11:26:35 GMT
Organization: FER, Croatia
Lines: 26
Distribution: world
Message-ID: <605klb$gj4@bagan.srce.hr>
References: <199709210121 DOT SAA23867 AT adit DOT ap DOT net>
Reply-To: sime AT fly DOT cc DOT etf DOT hr
NNTP-Posting-Host: fly.cc.etf.hr
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Nate Eldredge (eldredge AT ap DOT net) wrote:
: At 09:06  9/20/1997 GMT, Nicholas Law wrote:
: >Hi all!
: >
: >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?
: Could be any of the above. The SIGFPE indicates some sort of math error
: reported by the coprocessor, and also integer division by zero. Math errors
: can include using NaN's, dividing by zero, logs and roots of negative
: numbers, and probably several other things. Try compiling with -g and using
: symify on the traceback you get when the error happens. This should help you
: find it.

I'm also getting SIGFPE in some code I wrote. I located the instruction
which causes it. It is a division with a number which is not a ZERO! And
when I turn off FPE exceptions code works giving the right results. Can
someone explain this?

P.S. I also tried reseting the FPU before that instruction. The result was
that SIGFPE disapeared!


--
                                         // E-mail: smikecin AT bigfoot DOT com
                                        // URL:     http://fly.cc.fer.hr/~sime

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019