www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/01/12/12:09:26

Date: Thu, 12 Jan 1995 10:30:23 -0600 (CST)
From: Michael Henneke <mike AT smokey DOT me DOT utexas DOT edu>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Floating point exceptions

I am having a problem integrating a function with endpoint singularities 
using djgpp in C++.  The code works on an RS/6000 running gcc, but not on 
a PC with djgpp.  It seems that on the PC, the singularity causes a 
floating point exception that crashes the program while on the RS/6000, 
it doesn't.  For instance, the following code produces two results:

  double x=0; cout << 1/x << "\n";

On the PC, this crashes with a floating point exception, while on the RS, 
the program exits normally with a result of "Infinity".  I am a 
mechanical engineer and not particularly knowledgeable in these areas, so 
I would appreciate a response that I can use:).

Thanks for your help.

Michael Henneke                    |
(512) 471-3929 (office)            |
mike AT smokey DOT me DOT utexas DOT edu          |
ETC 7.106A                         |
The University of Texas at Austin  |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


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