Help catching floating point exceptions

Zvika Bar-Deroma AER7101 at TECHNION.BITNET
Thu May 30 04:37:02 AEST 1991


In article <1991May27.213751.24223 at murdoch.acc.Virginia.EDU>,
gl8f at astsun.astro.Virginia.EDU (Greg Lindahl) says:
>
>The program below calls fp_enable_all() and then divides by zero. No
>signal is generated, but an explicit test for divide by zero produces
>a positive result.
>
>a is 1.000000
>b is 0.000000
>floating point traps ARE enabled.
>divide by zero trap IS enabled.
>a/b is 1.000000
>divide by zero error.
>
>How do I get AIX to generate a signal? And why isn't this discussed in
>the Fortran manual?

I've been told by my IBM rep.  that as IEEE didn't require that division
by zero  be trapped and  signalled, then (some/many/most)  RISC machines
don't, and he thinks, that unless  there's such a requirement from IEEE,
they won't also in the forseeable future.

I very strongly think, that a company  that is trying to give some added
value to  its products should provide  the users with it.  The least I'd
expect is some flag,  that will enable such traps, even  if they are not
from the h/w but from the compiler.  I realize that this mode would mean
much slower performance,  but we are talking about  debugging (other IBM
compilers trap division  by zero/overflow, etc.). There are  quiet a few
people  here, willing  to pay  for  a WATFOR77  (WATFIV's successor  for
FORTRAN-77, from WATCOM) compiler for the rs/6k.

So - my suggestion - let's open DCR's; let's have IBM at least provide
a s/w option for the purpose discussed above |

/Zvika

Zvika Bar-Deroma                                  Phone: (+972)-4-292706
Faculty of Aerospace Engineering,                 Fax  : (+972)-4-231848
Technion
Haifa 32000
Israel

BITNET        :   AER7101 at TECHNION
Internet      :   AER7101 at TECHNION.TECHNION.AC.IL
UUCP          :   ...!uunet!pucc.princeton.edu!technion!aer7101



More information about the Comp.unix.aix mailing list