www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/23/22:26:21

From: leathm AT solwarra DOT gbrmpa DOT gov DOT au (Leath Muller)
Message-Id: <199709240223.MAA27878@solwarra.gbrmpa.gov.au>
Subject: Re: Floating Point Exception
To: sime AT fly DOT cc DOT etf DOT hr
Date: Wed, 24 Sep 1997 12:23:35 +1000 (EST)
Cc: djgpp AT delorie DOT com
In-Reply-To: <6089rh$2gj@bagan.srce.hr> from "S. Mikecin" at Sep 23, 97 11:40:33 am

> : > 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!
 
> : One thing that is peculiar about the FPU is the instruction that is causing
> : the exception may not be the one pointed to by the stack trace. Check the
> : instructions beforehand (I have had problems with instructions ~3 deep due
> : to the fact I intertwine the FPU and integer instructions).
 
> I looked for it but haven't find it so far. But, even if it is, how would
> you explain that code works just as it should? (not giving the wrong
> results?)

Ok, can you provide a snippet of code? :)  As for other ideas, are you
changing the accuracy level of the FPU? Are the numbers extremely small?
Extremely large? Are you sure your operating on the right number? (I know
that sounds stupid, but its easy to do... :)

If you can provide some code which exhibits the behaviour, I will have a
look...

Leathal.

- Raw text -


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